aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-08-29 18:38:45 +0200
committerPeter Wu <peter@lekensteyn.nl>2016-09-01 08:27:59 +0000
commit77ae30ffc598a56e71e0f57e151d0b6801110b03 (patch)
treeb9d073c9c77e93b5ab130bbae33768cef779d965 /ui/gtk
parent717ca58264f1c745c3efb8d9da0050d52b51bb1f (diff)
gtk: fix compilation with GTK+ before 2.18
Removed in v1.99.2rc0-399-g43f09e6, but some includes are still needed. Basically I looked for the functions defined in the ui/gtk/old-gtk-compat.h header file that were in files below ui/gtk/. Then I matched it against the removed part in the above commit and added the header back at its old place. In two other cases, the header was only needed for Windows. If the above commit did not reference the file, I checked which function was in use and added the header on top, removing redundant conditionals. Reported and tested by a user of GTK+ 2.12.12 on top of v2.0.5. Change-Id: I649eec1e5531070f88c99d893c4920306f56d849 Reviewed-on: https://code.wireshark.org/review/17371 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'ui/gtk')
-rw-r--r--ui/gtk/color_edit_dlg.c1
-rw-r--r--ui/gtk/compare_stat.c1
-rw-r--r--ui/gtk/conversations_table.c1
-rw-r--r--ui/gtk/dcerpc_stat.c1
-rw-r--r--ui/gtk/dfilter_expr_dlg.c1
-rw-r--r--ui/gtk/dlg_utils.c1
-rw-r--r--ui/gtk/expert_comp_dlg.c1
-rw-r--r--ui/gtk/expert_comp_table.c1
-rw-r--r--ui/gtk/export_sslkeys.c1
-rw-r--r--ui/gtk/fileset_dlg.c5
-rw-r--r--ui/gtk/filter_dlg.c1
-rw-r--r--ui/gtk/filter_utils.c1
-rw-r--r--ui/gtk/flow_graph.c1
-rw-r--r--ui/gtk/funnel_stat.c1
-rw-r--r--ui/gtk/lbm_uimflow_dlg.c5
-rw-r--r--ui/gtk/mac_lte_stat_dlg.c1
-rw-r--r--ui/gtk/mcast_stream_dlg.c1
-rw-r--r--ui/gtk/packet_list_store.c1
-rw-r--r--ui/gtk/packet_panes.c1
-rw-r--r--ui/gtk/print_dlg.c1
-rw-r--r--ui/gtk/response_time_delay_table.c2
-rw-r--r--ui/gtk/rlc_lte_stat_dlg.c2
-rw-r--r--ui/gtk/rpc_stat.c1
-rw-r--r--ui/gtk/rtp_stream_dlg.c1
-rw-r--r--ui/gtk/sctp_byte_graph_dlg.c1
-rw-r--r--ui/gtk/sctp_stat_dlg.c1
-rw-r--r--ui/gtk/service_response_time_table.c2
-rw-r--r--ui/gtk/simple_dialog.c2
-rw-r--r--ui/gtk/simple_stattable.c2
-rw-r--r--ui/gtk/stats_tree_stat.c2
-rw-r--r--ui/gtk/wlan_stat_dlg.c1
31 files changed, 37 insertions, 8 deletions
diff --git a/ui/gtk/color_edit_dlg.c b/ui/gtk/color_edit_dlg.c
index 5ee13a6e47..66a4563e34 100644
--- a/ui/gtk/color_edit_dlg.c
+++ b/ui/gtk/color_edit_dlg.c
@@ -39,6 +39,7 @@
#include "ui/gtk/color_edit_dlg.h"
#include "ui/gtk/filter_autocomplete.h"
+#include "ui/gtk/old-gtk-compat.h"
/* Essentially:
diff --git a/ui/gtk/compare_stat.c b/ui/gtk/compare_stat.c
index 5787e83c05..9a5d7d04a8 100644
--- a/ui/gtk/compare_stat.c
+++ b/ui/gtk/compare_stat.c
@@ -67,6 +67,7 @@
#include <epan/color_filters.h>
#include "packet_list.h"
+#include "ui/gtk/old-gtk-compat.h"
void register_tap_listener_gtkcomparestat(void);
diff --git a/ui/gtk/conversations_table.c b/ui/gtk/conversations_table.c
index 7fc02e2eb0..588b05bc1f 100644
--- a/ui/gtk/conversations_table.c
+++ b/ui/gtk/conversations_table.c
@@ -47,6 +47,7 @@
#include "ui/gtk/follow_stream.h"
#include "ui/gtk/keys.h"
+#include "ui/gtk/old-gtk-compat.h"
#define COL_STR_LEN 16
#define CONV_PTR_KEY "conversations-pointer"
diff --git a/ui/gtk/dcerpc_stat.c b/ui/gtk/dcerpc_stat.c
index e9186fdda7..d4d3a9956a 100644
--- a/ui/gtk/dcerpc_stat.c
+++ b/ui/gtk/dcerpc_stat.c
@@ -52,6 +52,7 @@
#include "ui/gtk/main.h"
#include "ui/gtk/filter_autocomplete.h"
+#include "ui/gtk/old-gtk-compat.h"
void register_tap_listener_gtkdcerpcstat(void);
diff --git a/ui/gtk/dfilter_expr_dlg.c b/ui/gtk/dfilter_expr_dlg.c
index 713a4b1391..2354359552 100644
--- a/ui/gtk/dfilter_expr_dlg.c
+++ b/ui/gtk/dfilter_expr_dlg.c
@@ -51,6 +51,7 @@
#include "ui/gtk/dfilter_expr_dlg.h"
#include "ui/gtk/proto_hier_tree_model.h"
+#include "ui/gtk/old-gtk-compat.h"
#define E_DFILTER_EXPR_TREE_KEY "dfilter_expr_tree"
#define E_DFILTER_EXPR_CURRENT_VAR_KEY "dfilter_expr_current_var"
diff --git a/ui/gtk/dlg_utils.c b/ui/gtk/dlg_utils.c
index 7422000a66..07c889aa15 100644
--- a/ui/gtk/dlg_utils.c
+++ b/ui/gtk/dlg_utils.c
@@ -29,6 +29,7 @@
#include "ui/gtk/gui_utils.h"
#include "ui/gtk/dlg_utils.h"
#include "ui/gtk/stock_icons.h"
+#include "ui/gtk/old-gtk-compat.h"
#include "wsutil/filesystem.h"
diff --git a/ui/gtk/expert_comp_dlg.c b/ui/gtk/expert_comp_dlg.c
index 9450bbbbae..6bfed3112d 100644
--- a/ui/gtk/expert_comp_dlg.c
+++ b/ui/gtk/expert_comp_dlg.c
@@ -45,6 +45,7 @@
#include "ui/gtk/pixbuf-csource.h"
#endif
#include "ui/gtk/packet_panes.h"
+#include "ui/gtk/old-gtk-compat.h"
#include "ui/gtk/edit_packet_comment_dlg.h"
#include "ui/gtk/gtkglobals.h"
diff --git a/ui/gtk/expert_comp_table.c b/ui/gtk/expert_comp_table.c
index 1456c65caa..c215fc05a2 100644
--- a/ui/gtk/expert_comp_table.c
+++ b/ui/gtk/expert_comp_table.c
@@ -48,6 +48,7 @@
#include "ui/gtk/webbrowser.h"
#include "ui/gtk/stock_icons.h"
+#include "ui/gtk/old-gtk-compat.h"
const char *packet = "Packet:";
diff --git a/ui/gtk/export_sslkeys.c b/ui/gtk/export_sslkeys.c
index ca3f17515c..0e7cc03934 100644
--- a/ui/gtk/export_sslkeys.c
+++ b/ui/gtk/export_sslkeys.c
@@ -64,6 +64,7 @@
#include <gdk/gdkwin32.h>
#include <windows.h>
#include "ui/win32/file_dlg_win32.h"
+#include "ui/gtk/old-gtk-compat.h"
#endif
/* save the SSL Session Keys */
diff --git a/ui/gtk/fileset_dlg.c b/ui/gtk/fileset_dlg.c
index fb0aadba18..bb0e04d7fe 100644
--- a/ui/gtk/fileset_dlg.c
+++ b/ui/gtk/fileset_dlg.c
@@ -37,6 +37,7 @@
#include "ui/gtk/menus.h"
#include "ui/gtk/help_dlg.h"
#include "ui/gtk/fileset_dlg.h"
+#include "ui/gtk/old-gtk-compat.h"
@@ -213,11 +214,7 @@ fileset_dlg_add_file(fileset_entry *entry, void *window _U_) {
if (row <= 18) {
GtkRequisition requisition;
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_get_preferred_size(fs_grid, &requisition, NULL);
-#else
- gtk_widget_size_request(fs_grid, &requisition);
-#endif
/* XXX use gtk_window_set_default_size()? */
gtk_widget_set_size_request(fs_sw, -1, requisition.height);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(fs_sw), GTK_POLICY_NEVER, GTK_POLICY_NEVER);
diff --git a/ui/gtk/filter_dlg.c b/ui/gtk/filter_dlg.c
index 0a360742d1..9c5ec4c335 100644
--- a/ui/gtk/filter_dlg.c
+++ b/ui/gtk/filter_dlg.c
@@ -44,6 +44,7 @@
#include "ui/gtk/help_dlg.h"
#include "ui/gtk/filter_autocomplete.h"
+#include "ui/gtk/old-gtk-compat.h"
#define E_FILT_DIALOG_PTR_KEY "filter_dialog_ptr"
#define E_FILT_BUTTON_PTR_KEY "filter_button_ptr"
diff --git a/ui/gtk/filter_utils.c b/ui/gtk/filter_utils.c
index 502a5dfc70..d5dc2da64f 100644
--- a/ui/gtk/filter_utils.c
+++ b/ui/gtk/filter_utils.c
@@ -30,6 +30,7 @@
#include "ui/gtk/color_dlg.h"
#include "ui/gtk/filter_utils.h"
+#include "ui/gtk/old-gtk-compat.h"
void
apply_selected_filter (guint callback_action, const char *filter)
diff --git a/ui/gtk/flow_graph.c b/ui/gtk/flow_graph.c
index 5812137551..75680c0009 100644
--- a/ui/gtk/flow_graph.c
+++ b/ui/gtk/flow_graph.c
@@ -36,6 +36,7 @@
#include "ui/gtk/stock_icons.h"
#include "ui/gtk/main.h"
#include "ui/gtk/gui_stat_menu.h"
+#include "ui/gtk/old-gtk-compat.h"
void register_tap_listener_flow_graph(void);
diff --git a/ui/gtk/funnel_stat.c b/ui/gtk/funnel_stat.c
index 6b7ed726a3..29e36bce8f 100644
--- a/ui/gtk/funnel_stat.c
+++ b/ui/gtk/funnel_stat.c
@@ -54,6 +54,7 @@
#include "ui/gtk/main.h"
#include "ui/gtk/webbrowser.h"
#include "ui/gtk/gtkglobals.h"
+#include "ui/gtk/old-gtk-compat.h"
void register_tap_listener_gtkfunnel(void);
diff --git a/ui/gtk/lbm_uimflow_dlg.c b/ui/gtk/lbm_uimflow_dlg.c
index bf239f45f3..61ea3eb5ea 100644
--- a/ui/gtk/lbm_uimflow_dlg.c
+++ b/ui/gtk/lbm_uimflow_dlg.c
@@ -33,6 +33,7 @@
#include "ui/gtk/graph_analysis.h"
#include <epan/dissectors/packet-lbm.h>
#include "lbm_uimflow_dlg.h"
+#include "ui/gtk/old-gtk-compat.h"
typedef enum
{
@@ -370,11 +371,7 @@ static void lbmc_uim_flow_graph_dlg_create(void)
bt_cancel = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
gtk_container_add(GTK_CONTAINER(hbuttonbox), bt_cancel);
-#if GTK_CHECK_VERSION(2,18,0)
gtk_widget_set_can_default(bt_cancel, TRUE);
-#else
- WS_GTK_WIDGET_SET_FLAGS(bt_cancel, GTK_CAN_DEFAULT);
-#endif
gtk_widget_set_tooltip_text(bt_cancel, "Cancel this dialog");
window_set_cancel_button(flow_graph_dlg_w, bt_cancel, window_cancel_button_cb);
diff --git a/ui/gtk/mac_lte_stat_dlg.c b/ui/gtk/mac_lte_stat_dlg.c
index 78961304d1..5bb94726db 100644
--- a/ui/gtk/mac_lte_stat_dlg.c
+++ b/ui/gtk/mac_lte_stat_dlg.c
@@ -42,6 +42,7 @@
#include "ui/gtk/help_dlg.h"
#include "ui/gtk/main.h"
+#include "ui/gtk/old-gtk-compat.h"
void register_tap_listener_mac_lte_stat(void);
diff --git a/ui/gtk/mcast_stream_dlg.c b/ui/gtk/mcast_stream_dlg.c
index 6d8d535ec6..355c1b18b2 100644
--- a/ui/gtk/mcast_stream_dlg.c
+++ b/ui/gtk/mcast_stream_dlg.c
@@ -46,6 +46,7 @@
#include "ui/gtk/dlg_utils.h"
#include "ui/gtk/gui_utils.h"
#include "ui/gtk/gtkglobals.h"
+#include "ui/gtk/old-gtk-compat.h"
#include "ui/gtk/stock_icons.h"
static void mcaststream_tap_reset(mcaststream_tapinfo_t *tapinfo);
diff --git a/ui/gtk/packet_list_store.c b/ui/gtk/packet_list_store.c
index 91c4c22f8a..76ffb8e6ec 100644
--- a/ui/gtk/packet_list_store.c
+++ b/ui/gtk/packet_list_store.c
@@ -38,6 +38,7 @@
#include "ui/progress_dlg.h"
#include "ui/ui_util.h"
+#include "ui/gtk/old-gtk-compat.h"
#include <epan/epan_dissect.h>
#include <epan/column.h>
diff --git a/ui/gtk/packet_panes.c b/ui/gtk/packet_panes.c
index a46f4ee7b9..4a1cbac7df 100644
--- a/ui/gtk/packet_panes.c
+++ b/ui/gtk/packet_panes.c
@@ -68,6 +68,7 @@
#include <gdk/gdkwin32.h>
#include <windows.h>
#include "ui/win32/file_dlg_win32.h"
+#include "ui/gtk/old-gtk-compat.h"
#endif
diff --git a/ui/gtk/print_dlg.c b/ui/gtk/print_dlg.c
index 1c037ce399..e8f7b5814a 100644
--- a/ui/gtk/print_dlg.c
+++ b/ui/gtk/print_dlg.c
@@ -27,6 +27,7 @@
#include <gtk/gtk.h>
#include <epan/prefs.h>
+#include "ui/gtk/old-gtk-compat.h"
#include <wsutil/filesystem.h>
#include "ui/alert_box.h"
diff --git a/ui/gtk/response_time_delay_table.c b/ui/gtk/response_time_delay_table.c
index fb110fe018..3ee0ffff22 100644
--- a/ui/gtk/response_time_delay_table.c
+++ b/ui/gtk/response_time_delay_table.c
@@ -40,6 +40,8 @@
#include "ui/gtk/tap_param_dlg.h"
#include "ui/gtk/main.h"
+#include "ui/gtk/old-gtk-compat.h"
+
enum
{
TYPE_COLUMN,
diff --git a/ui/gtk/rlc_lte_stat_dlg.c b/ui/gtk/rlc_lte_stat_dlg.c
index fc350d4ab3..4bb6f87477 100644
--- a/ui/gtk/rlc_lte_stat_dlg.c
+++ b/ui/gtk/rlc_lte_stat_dlg.c
@@ -48,6 +48,8 @@
#include "ui/gtk/help_dlg.h"
#include "ui/gtk/main.h"
+#include "ui/gtk/old-gtk-compat.h"
+
#include "ui/recent.h"
diff --git a/ui/gtk/rpc_stat.c b/ui/gtk/rpc_stat.c
index cf18aa910e..175460c590 100644
--- a/ui/gtk/rpc_stat.c
+++ b/ui/gtk/rpc_stat.c
@@ -49,6 +49,7 @@
#include "ui/gtk/gtkglobals.h"
#include "ui/gtk/filter_autocomplete.h"
+#include "ui/gtk/old-gtk-compat.h"
void register_tap_listener_gtkrpcstat(void);
diff --git a/ui/gtk/rtp_stream_dlg.c b/ui/gtk/rtp_stream_dlg.c
index a5f0c2f484..6894354a56 100644
--- a/ui/gtk/rtp_stream_dlg.c
+++ b/ui/gtk/rtp_stream_dlg.c
@@ -45,6 +45,7 @@
#include "ui/gtk/gui_utils.h"
#include "ui/gtk/gtkglobals.h"
#include "ui/gtk/stock_icons.h"
+#include "ui/gtk/old-gtk-compat.h"
#include "ui/gtk/gui_stat_menu.h"
static const gchar FWD_LABEL_TEXT[] = "Select a forward stream with left mouse button, and then";
diff --git a/ui/gtk/sctp_byte_graph_dlg.c b/ui/gtk/sctp_byte_graph_dlg.c
index 3deb23b5a6..2cef094fe5 100644
--- a/ui/gtk/sctp_byte_graph_dlg.c
+++ b/ui/gtk/sctp_byte_graph_dlg.c
@@ -36,6 +36,7 @@
#include "ui/gtk/main.h"
#include "ui/gtk/sctp_stat_gtk.h"
+#include "ui/gtk/old-gtk-compat.h"
#include "ui/gtk/stock_icons.h"
#include "ui/gtk/old-gtk-compat.h"
diff --git a/ui/gtk/sctp_stat_dlg.c b/ui/gtk/sctp_stat_dlg.c
index 188437d6ec..de1362ac97 100644
--- a/ui/gtk/sctp_stat_dlg.c
+++ b/ui/gtk/sctp_stat_dlg.c
@@ -35,6 +35,7 @@
#include "ui/gtk/sctp_stat_gtk.h"
#include "ui/gtk/gtkglobals.h"
+#include "ui/gtk/old-gtk-compat.h"
#include "ui/gtk/stock_icons.h"
static GtkWidget *sctp_stat_dlg = NULL;
diff --git a/ui/gtk/service_response_time_table.c b/ui/gtk/service_response_time_table.c
index c1f615849a..31a083d35a 100644
--- a/ui/gtk/service_response_time_table.c
+++ b/ui/gtk/service_response_time_table.c
@@ -39,6 +39,8 @@
#include "ui/gtk/tap_param_dlg.h"
#include "ui/gtk/main.h"
+#include "ui/gtk/old-gtk-compat.h"
+
/* XXX - Part of temporary hack */
#include "epan/conversation.h"
#include "epan/dissectors/packet-scsi.h"
diff --git a/ui/gtk/simple_dialog.c b/ui/gtk/simple_dialog.c
index 8effc6195e..a8359186df 100644
--- a/ui/gtk/simple_dialog.c
+++ b/ui/gtk/simple_dialog.c
@@ -35,6 +35,8 @@
#include "gui_utils.h"
#include "stock_icons.h"
+#include "ui/gtk/old-gtk-compat.h"
+
static void simple_dialog_cancel_cb(GtkWidget *, gpointer);
diff --git a/ui/gtk/simple_stattable.c b/ui/gtk/simple_stattable.c
index 669815d916..8b9e2d0a77 100644
--- a/ui/gtk/simple_stattable.c
+++ b/ui/gtk/simple_stattable.c
@@ -40,6 +40,8 @@
#include "ui/gtk/tap_param_dlg.h"
#include "ui/gtk/main.h"
+#include "ui/gtk/old-gtk-compat.h"
+
typedef struct _gtk_simplestat_t {
GtkWidget *vbox;
GtkWidget *win;
diff --git a/ui/gtk/stats_tree_stat.c b/ui/gtk/stats_tree_stat.c
index 7979540f7f..cedab7e84c 100644
--- a/ui/gtk/stats_tree_stat.c
+++ b/ui/gtk/stats_tree_stat.c
@@ -47,6 +47,8 @@
#include "ui/gtk/tap_param_dlg.h"
#include "ui/gtk/main.h"
+#include "ui/gtk/old-gtk-compat.h"
+
#include "ui/gtk/gui_stat_menu.h"
diff --git a/ui/gtk/wlan_stat_dlg.c b/ui/gtk/wlan_stat_dlg.c
index 9cd9b86181..9cba537f6a 100644
--- a/ui/gtk/wlan_stat_dlg.c
+++ b/ui/gtk/wlan_stat_dlg.c
@@ -48,6 +48,7 @@
#include "ui/gtk/help_dlg.h"
#include "ui/gtk/main.h"
+#include "ui/gtk/old-gtk-compat.h"
void register_tap_listener_wlanstat(void);