diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2009-02-10 21:26:16 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2009-02-10 21:26:16 +0000 |
commit | 2106faabe3c5b0229ad39423c600d706323312cd (patch) | |
tree | 61261cd147197c3956a8afb886d472d948df78d0 /gtk/dlg_utils.c | |
parent | 94ee3dd51a50e5cba0473a4c53168a379fa110e0 (diff) |
add a stock icon "WIRESHARK_STOCK_MAP" to display a map
svn path=/trunk/; revision=27413
Diffstat (limited to 'gtk/dlg_utils.c')
-rw-r--r-- | gtk/dlg_utils.c | 19 |
1 files changed, 19 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); |