forked from osmocom/wireshark
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>
This commit is contained in:
parent
717ca58264
commit
77ae30ffc5
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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:";
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue