diff options
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/dlg_utils.c | 19 | ||||
-rw-r--r-- | gtk/stock_icons.c | 6 | ||||
-rw-r--r-- | gtk/stock_icons.h | 3 |
3 files changed, 28 insertions, 0 deletions
diff --git a/gtk/dlg_utils.c b/gtk/dlg_utils.c index 85d115f6b2..c0ed74d068 100644 --- a/gtk/dlg_utils.c +++ b/gtk/dlg_utils.c @@ -129,6 +129,9 @@ dlg_button_row_new(const gchar *stock_id_first, ...) const gchar *save_all = NULL; const gchar *stop = NULL; const gchar *yes = NULL; +#ifdef HAVE_GEOIP + const gchar *map = NULL; +#endif /* HAVE_GEOIP */ va_start(stock_id_list, stock_id_first); @@ -161,6 +164,10 @@ dlg_button_row_new(const gchar *stock_id_first, ...) } else if (strcmp(stock_id, WIRESHARK_STOCK_CAPTURE_STOP) == 0) { cap_stop = stock_id; #endif /* HAVE_LIBPCAP */ +#ifdef HAVE_GEOIP + } else if (strcmp(stock_id, WIRESHARK_STOCK_MAP) == 0) { + map = stock_id; +#endif /* HAVE_GEOIP */ } else if (strcmp(stock_id, GTK_STOCK_STOP) == 0) { stop = stock_id; } else if (strcmp(stock_id, GTK_STOCK_HELP) == 0) { @@ -235,6 +242,18 @@ dlg_button_row_new(const gchar *stock_id_first, ...) buttons--; } +#ifdef HAVE_GEOIP + /* do we have a map button? -> special handling for it */ + if (map) { + button = gtk_button_new_from_stock(map); + GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); + g_object_set_data(G_OBJECT(hbox), map, button); + gtk_box_pack_start(GTK_BOX(help_hbox), button, FALSE, FALSE, 0); + gtk_widget_show(button); + buttons--; + } +#endif /* HAVE_GEOIP */ + /* if more than one button, sort buttons from left to right */ /* (the whole button cluster will then be right aligned) */ gtk_button_box_set_layout (GTK_BUTTON_BOX(button_hbox), GTK_BUTTONBOX_END); diff --git a/gtk/stock_icons.c b/gtk/stock_icons.c index 3105c1b5a7..8850ee0b76 100644 --- a/gtk/stock_icons.c +++ b/gtk/stock_icons.c @@ -98,6 +98,9 @@ void stock_icons_init(void) { { WIRESHARK_STOCK_CAPTURE_FILTER_ENTRY, "_Capture Filter:", 0, 0, NULL }, { WIRESHARK_STOCK_CAPTURE_DETAILS, "_Details", 0, 0, NULL }, #endif +#ifdef HAVE_GEOIP + { WIRESHARK_STOCK_MAP, "Map", 0, 0, NULL }, +#endif { WIRESHARK_STOCK_DISPLAY_FILTER, "_Filter", 0, 0, NULL }, { WIRESHARK_STOCK_DISPLAY_FILTER_ENTRY, "F_ilter:", 0, 0, NULL }, { WIRESHARK_STOCK_BROWSE, "_Browse...", 0, 0, NULL }, @@ -155,6 +158,9 @@ void stock_icons_init(void) { { WIRESHARK_STOCK_CAPTURE_FILTER_ENTRY, capture_filter_24_xpm }, { WIRESHARK_STOCK_CAPTURE_DETAILS, capture_details_24_xpm }, #endif +#ifdef HAVE_GEOIP + { WIRESHARK_STOCK_MAP, internet_24_xpm}, +#endif { WIRESHARK_STOCK_DISPLAY_FILTER, display_filter_24_xpm }, { WIRESHARK_STOCK_DISPLAY_FILTER_ENTRY, display_filter_24_xpm }, { WIRESHARK_STOCK_ABOUT, wsicon16_xpm }, diff --git a/gtk/stock_icons.h b/gtk/stock_icons.h index 64a4482427..0bd0eb900e 100644 --- a/gtk/stock_icons.h +++ b/gtk/stock_icons.h @@ -37,6 +37,9 @@ #define WIRESHARK_STOCK_CAPTURE_FILTER_ENTRY "Wireshark_Stock_CaptureFilter_Entry" #define WIRESHARK_STOCK_CAPTURE_DETAILS "Wireshark_Stock_CaptureDetails" #endif +#ifdef HAVE_GEOIP +#define WIRESHARK_STOCK_MAP "Wireshark_Stock_Map" +#endif #define WIRESHARK_STOCK_DISPLAY_FILTER "Wireshark_Stock_DisplayFilter" #define WIRESHARK_STOCK_DISPLAY_FILTER_ENTRY "Wireshark_Stock_DisplayFilter_Entry" #define WIRESHARK_STOCK_BROWSE "Wireshark_Stock_Browse" |