aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2008-04-12 00:49:20 +0000
committerUlf Lamping <ulf.lamping@web.de>2008-04-12 00:49:20 +0000
commit55c2be83dbe0eccfc5bffc04c3192fee146a4bc3 (patch)
tree1a87790e2189aa0406c270b28dcf950f8628b5aa /gtk
parentca0cfac28bbd7b2d82495747e2b5cdbc29570684 (diff)
move stock icon code from toolbar.c into specific stock_icons file(s)
svn path=/trunk/; revision=24921
Diffstat (limited to 'gtk')
-rw-r--r--gtk/Makefile.am1
-rw-r--r--gtk/Makefile.common1
-rw-r--r--gtk/airpcap_dlg.c2
-rw-r--r--gtk/capture_dlg.c1
-rw-r--r--gtk/capture_if_dlg.c2
-rw-r--r--gtk/capture_info_dlg.c2
-rw-r--r--gtk/capture_prefs.c2
-rw-r--r--gtk/color_dlg.c1
-rw-r--r--gtk/color_edit_dlg.c2
-rw-r--r--gtk/compat_macros.h51
-rw-r--r--gtk/dcerpc_stat.c2
-rw-r--r--gtk/dlg_utils.c2
-rw-r--r--gtk/filter_dlg.c2
-rw-r--r--gtk/find_dlg.c2
-rw-r--r--gtk/follow_stream.c2
-rw-r--r--gtk/io_stat.c2
-rw-r--r--gtk/libui.vcproj8
-rw-r--r--gtk/main.c3
-rw-r--r--gtk/menu.c1
-rw-r--r--gtk/prefs_dlg.c2
-rw-r--r--gtk/print_dlg.c2
-rw-r--r--gtk/print_prefs.c2
-rw-r--r--gtk/rpc_stat.c2
-rw-r--r--gtk/scsi_stat.c2
-rw-r--r--gtk/simple_dialog.c1
-rw-r--r--gtk/stock_icons.c220
-rw-r--r--gtk/stock_icons.h83
-rw-r--r--gtk/tap_dfilter_dlg.c2
-rw-r--r--gtk/toolbar.c190
-rw-r--r--gtk/uat_gui.c2
30 files changed, 339 insertions, 258 deletions
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 732747c22e..0ac538ecd7 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -117,6 +117,7 @@ noinst_HEADERS = \
sctp_stat.h \
service_response_time_table.h \
gui_stat_menu.h \
+ stock_icons.h \
stream_prefs.h \
summary_dlg.h \
supported_protos_dlg.h \
diff --git a/gtk/Makefile.common b/gtk/Makefile.common
index f791404542..e4b6574315 100644
--- a/gtk/Makefile.common
+++ b/gtk/Makefile.common
@@ -110,6 +110,7 @@ WIRESHARK_GTK_SRC = \
sctp_error_dlg.c \
service_response_time_table.c \
simple_dialog.c \
+ stock_icons.c \
stream_prefs.c \
summary_dlg.c \
supported_protos_dlg.c \
diff --git a/gtk/airpcap_dlg.c b/gtk/airpcap_dlg.c
index c1675e2eb1..c4a090fbfd 100644
--- a/gtk/airpcap_dlg.c
+++ b/gtk/airpcap_dlg.c
@@ -51,7 +51,7 @@
#include "gui_utils.h"
#include "simple_dialog.h"
#include "dfilter_expr_dlg.h"
-#include "compat_macros.h"
+#include "stock_icons.h"
#include "gtkglobals.h"
#include "help_dlg.h"
diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c
index 3042bdd213..ee8c4b49b9 100644
--- a/gtk/capture_dlg.c
+++ b/gtk/capture_dlg.c
@@ -55,6 +55,7 @@
#include "ringbuffer.h"
#include <epan/filesystem.h>
#include "compat_macros.h"
+#include "stock_icons.h"
#include "capture_file_dlg.h"
#include "help_dlg.h"
#include "gtkglobals.h"
diff --git a/gtk/capture_if_dlg.c b/gtk/capture_if_dlg.c
index 3e33dffcee..b7190cf871 100644
--- a/gtk/capture_if_dlg.c
+++ b/gtk/capture_if_dlg.c
@@ -42,7 +42,7 @@
#include "capture-wpcap.h"
#endif
-#include "compat_macros.h"
+#include "stock_icons.h"
#include "simple_dialog.h"
#include "capture.h"
#include "capture_dlg.h"
diff --git a/gtk/capture_info_dlg.c b/gtk/capture_info_dlg.c
index 512b710423..fbe792a191 100644
--- a/gtk/capture_info_dlg.c
+++ b/gtk/capture_info_dlg.c
@@ -35,7 +35,7 @@
#ifdef HAVE_LIBPCAP
#include <gtk/gtk.h>
-#include "gtk/compat_macros.h"
+#include "gtk/stock_icons.h"
#include <time.h>
diff --git a/gtk/capture_prefs.c b/gtk/capture_prefs.c
index c7390bc936..4208026c5c 100644
--- a/gtk/capture_prefs.c
+++ b/gtk/capture_prefs.c
@@ -42,7 +42,7 @@
#include "capture-pcap-util.h"
#include "capture_ui_utils.h"
#include "main.h"
-#include "compat_macros.h"
+#include "stock_icons.h"
#include "capture.h"
#include <epan/strutil.h>
diff --git a/gtk/color_dlg.c b/gtk/color_dlg.c
index 8d3f4f6c69..4902ed4981 100644
--- a/gtk/color_dlg.c
+++ b/gtk/color_dlg.c
@@ -43,6 +43,7 @@
#include "gui_utils.h"
#include "dfilter_expr_dlg.h"
#include "compat_macros.h"
+#include "stock_icons.h"
#include "filter_dlg.h"
#include "capture_file_dlg.h"
#include "gtkglobals.h"
diff --git a/gtk/color_edit_dlg.c b/gtk/color_edit_dlg.c
index 9687e5ac3c..64f3a67e0e 100644
--- a/gtk/color_edit_dlg.c
+++ b/gtk/color_edit_dlg.c
@@ -37,7 +37,7 @@
#include "dlg_utils.h"
#include "gui_utils.h"
-#include "compat_macros.h"
+#include "stock_icons.h"
#include "filter_dlg.h"
#include "dfilter_expr_dlg.h"
#include "simple_dialog.h"
diff --git a/gtk/compat_macros.h b/gtk/compat_macros.h
index d85150f2d6..3c7be349be 100644
--- a/gtk/compat_macros.h
+++ b/gtk/compat_macros.h
@@ -36,57 +36,6 @@
* gtk_widget_set_size_request, ...
*/
-
-#ifdef HAVE_LIBPCAP
-#define WIRESHARK_STOCK_CAPTURE_INTERFACES "Wireshark_Stock_CaptureInterfaces"
-#define WIRESHARK_STOCK_CAPTURE_OPTIONS "Wireshark_Stock_CaptureOptionss"
-#define WIRESHARK_STOCK_CAPTURE_START "Wireshark_Stock_CaptureStart"
-#define WIRESHARK_STOCK_CAPTURE_STOP "Wireshark_Stock_CaptureStop"
-#define WIRESHARK_STOCK_CAPTURE_RESTART "Wireshark_Stock_CaptureRestart"
-#define WIRESHARK_STOCK_CAPTURE_FILTER "Wireshark_Stock_CaptureFilter"
-#define WIRESHARK_STOCK_CAPTURE_FILTER_ENTRY "Wireshark_Stock_CaptureFilter_Entry"
-#define WIRESHARK_STOCK_CAPTURE_DETAILS "Wireshark_Stock_CaptureDetails"
-#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"
-#define WIRESHARK_STOCK_CREATE_STAT "Wireshark_Stock_CreateStat"
-#define WIRESHARK_STOCK_EXPORT "Wireshark_Stock_Export"
-#define WIRESHARK_STOCK_IMPORT "Wireshark_Stock_Import"
-#define WIRESHARK_STOCK_EDIT "Wireshark_Stock_Edit"
-#define WIRESHARK_STOCK_ADD_EXPRESSION "Wireshark_Stock_Edit_Add_Expression"
-#define WIRESHARK_STOCK_DONT_SAVE "Wireshark_Stock_Continue_without_Saving"
-#define WIRESHARK_STOCK_ABOUT "Wireshark_Stock_About"
-#define WIRESHARK_STOCK_COLORIZE "Wireshark_Stock_Colorize"
-#define WIRESHARK_STOCK_AUTOSCROLL "Wireshark_Stock_Autoscroll"
-#define WIRESHARK_STOCK_RESIZE_COLUMNS "Wireshark_Stock_Resize_Columns"
-#define WIRESHARK_STOCK_TIME "Wireshark_Stock_Time"
-#define WIRESHARK_STOCK_INTERNET "Wireshark_Stock_Internet"
-#define WIRESHARK_STOCK_WEB_SUPPORT "Wireshark_Stock_Web_Support"
-#define WIRESHARK_STOCK_WIKI "Wireshark_Stock_Wiki"
-#define WIRESHARK_STOCK_CONVERSATIONS "Wireshark_Stock_Conversations"
-#define WIRESHARK_STOCK_ENDPOINTS "Wireshark_Stock_Endpoints"
-#define WIRESHARK_STOCK_GRAPHS "Wireshark_Stock_Graphs"
-#define WIRESHARK_STOCK_TELEPHONY "Wireshark_Stock_Telephony"
-#define WIRESHARK_STOCK_DECODE_AS "Wireshark_Stock_DecodeAs"
-#define WIRESHARK_STOCK_CHECKBOX "Wireshark_Stock_Checkbox"
-#define WIRESHARK_STOCK_FILE_SET_LIST "Wireshark_Stock_File_Set_List"
-#define WIRESHARK_STOCK_FILE_SET_NEXT "Wireshark_Stock_File_Set_Next"
-#define WIRESHARK_STOCK_FILE_SET_PREVIOUS "Wireshark_Stock_File_Set_Previous"
-#define WIRESHARK_STOCK_FILTER_OUT_STREAM "Wireshark_Stock_Filter_Out_This_Stream"
-#define WIRESHARK_STOCK_ENABLE "Wireshark_Stock_Enable"
-#define WIRESHARK_STOCK_DISABLE "Wireshark_Stock_Disable"
-#define WIRESHARK_STOCK_COLOR1 "Wireshark_Stock_Color_1"
-#define WIRESHARK_STOCK_COLOR2 "Wireshark_Stock_Color_2"
-#define WIRESHARK_STOCK_COLOR3 "Wireshark_Stock_Color_3"
-#define WIRESHARK_STOCK_COLOR4 "Wireshark_Stock_Color_4"
-#define WIRESHARK_STOCK_COLOR5 "Wireshark_Stock_Color_5"
-#define WIRESHARK_STOCK_COLOR6 "Wireshark_Stock_Color_6"
-#define WIRESHARK_STOCK_COLOR7 "Wireshark_Stock_Color_7"
-#define WIRESHARK_STOCK_COLOR8 "Wireshark_Stock_Color_8"
-#define WIRESHARK_STOCK_COLOR9 "Wireshark_Stock_Color_9"
-#define WIRESHARK_STOCK_COLOR0 "Wireshark_Stock_Color_10"
-
/* for details, see "Pango Text Attribute Markup" */
/* maybe it's a good idea to keep this macro beyond the ongoing GTK1 cleanup!
If we want to change the look of the dialog boxes primary line the other day,
diff --git a/gtk/dcerpc_stat.c b/gtk/dcerpc_stat.c
index ce7f9793d1..01cb0b0ac5 100644
--- a/gtk/dcerpc_stat.c
+++ b/gtk/dcerpc_stat.c
@@ -52,7 +52,7 @@
#include <epan/dissectors/packet-dcerpc.h>
#include "../globals.h"
#include "filter_dlg.h"
-#include "compat_macros.h"
+#include "stock_icons.h"
#include "service_response_time_table.h"
#include "gtkglobals.h"
diff --git a/gtk/dlg_utils.c b/gtk/dlg_utils.c
index 6eac5e0214..003b6dcac3 100644
--- a/gtk/dlg_utils.c
+++ b/gtk/dlg_utils.c
@@ -32,7 +32,7 @@
#include "gtkglobals.h"
#include "gui_utils.h"
#include "dlg_utils.h"
-#include "compat_macros.h"
+#include "stock_icons.h"
#include <string.h>
#include <stdarg.h>
diff --git a/gtk/filter_dlg.c b/gtk/filter_dlg.c
index 9de8df2788..5f59ca54ca 100644
--- a/gtk/filter_dlg.c
+++ b/gtk/filter_dlg.c
@@ -39,7 +39,7 @@
#include "gui_utils.h"
#include "simple_dialog.h"
#include "dfilter_expr_dlg.h"
-#include "compat_macros.h"
+#include "stock_icons.h"
#include "gtkglobals.h"
#include "help_dlg.h"
#include <epan/prefs.h>
diff --git a/gtk/find_dlg.c b/gtk/find_dlg.c
index 544cf87c10..fa9db5576d 100644
--- a/gtk/find_dlg.c
+++ b/gtk/find_dlg.c
@@ -42,7 +42,7 @@
#include "alert_box.h"
#include "simple_dialog.h"
#include "dlg_utils.h"
-#include "compat_macros.h"
+#include "stock_icons.h"
#include <epan/prefs.h>
#include "prefs_dlg.h"
#include "keys.h"
diff --git a/gtk/follow_stream.c b/gtk/follow_stream.c
index 1f5fcb6c84..75fea03b68 100644
--- a/gtk/follow_stream.c
+++ b/gtk/follow_stream.c
@@ -40,7 +40,7 @@
#include <epan/filesystem.h>
#include <epan/prefs.h>
#include <gtk/colors.h>
-#include <gtk/compat_macros.h>
+#include <gtk/stock_icons.h>
#include <gtk/dlg_utils.h>
#include <gtk/follow_stream.h>
#include <gtk/font_utils.h>
diff --git a/gtk/io_stat.c b/gtk/io_stat.c
index 1dec61e410..cd83f30bbb 100644
--- a/gtk/io_stat.c
+++ b/gtk/io_stat.c
@@ -51,7 +51,7 @@
#include "simple_dialog.h"
#include "../globals.h"
#include "../color.h"
-#include "compat_macros.h"
+#include "stock_icons.h"
#include "dlg_utils.h"
#include "filter_dlg.h"
#include "help_dlg.h"
diff --git a/gtk/libui.vcproj b/gtk/libui.vcproj
index 3297042a09..c888b22153 100644
--- a/gtk/libui.vcproj
+++ b/gtk/libui.vcproj
@@ -628,6 +628,10 @@
>
</File>
<File
+ RelativePath=".\stock_icons.c"
+ >
+ </File>
+ <File
RelativePath=".\stream_prefs.c"
>
</File>
@@ -1010,6 +1014,10 @@
>
</File>
<File
+ RelativePath=".\stock_icons.h"
+ >
+ </File>
+ <File
RelativePath=".\stream_prefs.h"
>
</File>
diff --git a/gtk/main.c b/gtk/main.c
index 28e0712f00..7695c66fc9 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -137,6 +137,7 @@
#include "proto_draw.h"
#include "keys.h"
#include "packet_win.h"
+#include "stock_icons.h"
#include "toolbar.h"
#include "find_dlg.h"
#include "packet_list.h"
@@ -2931,6 +2932,8 @@ main(int argc, char *argv[])
font_init();
+ stock_icons_init();
+
/* close the splash screen, as we are going to open the main window now */
splash_destroy(splash_win);
diff --git a/gtk/menu.c b/gtk/menu.c
index fa08b82542..fb63a59207 100644
--- a/gtk/menu.c
+++ b/gtk/menu.c
@@ -69,6 +69,7 @@
#include <epan/plugins.h>
#include <epan/epan_dissect.h>
#include "compat_macros.h"
+#include "stock_icons.h"
#include "toolbar.h"
#include "gtkglobals.h"
#include "register.h"
diff --git a/gtk/prefs_dlg.c b/gtk/prefs_dlg.c
index d0559ac67e..1ead8c2858 100644
--- a/gtk/prefs_dlg.c
+++ b/gtk/prefs_dlg.c
@@ -49,7 +49,7 @@
#include "gui_utils.h"
#include "dlg_utils.h"
#include "simple_dialog.h"
-#include "compat_macros.h"
+#include "stock_icons.h"
#include "help_dlg.h"
#include "keys.h"
#include "uat_gui.h"
diff --git a/gtk/print_dlg.c b/gtk/print_dlg.c
index 7d2fdeba19..ad45d377d1 100644
--- a/gtk/print_dlg.c
+++ b/gtk/print_dlg.c
@@ -47,7 +47,7 @@
#ifdef _WIN32
#include "print_mswin.h"
#endif
-#include "compat_macros.h"
+#include "stock_icons.h"
#include "range_utils.h"
#include "help_dlg.h"
#include "file_util.h"
diff --git a/gtk/print_prefs.c b/gtk/print_prefs.c
index eb7aac743b..79a2ac78c3 100644
--- a/gtk/print_prefs.c
+++ b/gtk/print_prefs.c
@@ -42,7 +42,7 @@
#endif
#include "file_dlg.h"
#include "capture_file_dlg.h"
-#include "compat_macros.h"
+#include "stock_icons.h"
#include "gtkglobals.h"
static void printer_browse_file_cb(GtkWidget *file_bt, GtkWidget *file_te);
diff --git a/gtk/rpc_stat.c b/gtk/rpc_stat.c
index 1ef5b02767..3d29d58a26 100644
--- a/gtk/rpc_stat.c
+++ b/gtk/rpc_stat.c
@@ -49,7 +49,7 @@
#include "main.h"
#include "globals.h"
#include "filter_dlg.h"
-#include "compat_macros.h"
+#include "stock_icons.h"
#include "service_response_time_table.h"
#include "gtkglobals.h"
diff --git a/gtk/scsi_stat.c b/gtk/scsi_stat.c
index 60c66cb798..33279ca0dc 100644
--- a/gtk/scsi_stat.c
+++ b/gtk/scsi_stat.c
@@ -46,7 +46,7 @@
#include "main.h"
#include "globals.h"
#include "filter_dlg.h"
-#include "compat_macros.h"
+#include "stock_icons.h"
#include "service_response_time_table.h"
#include "gtkglobals.h"
#include <epan/conversation.h>
diff --git a/gtk/simple_dialog.c b/gtk/simple_dialog.c
index 2617a33679..1fe5767b83 100644
--- a/gtk/simple_dialog.c
+++ b/gtk/simple_dialog.c
@@ -35,6 +35,7 @@
#include "dlg_utils.h"
#include "gui_utils.h"
#include "compat_macros.h"
+#include "stock_icons.h"
#include <epan/strutil.h>
diff --git a/gtk/stock_icons.c b/gtk/stock_icons.c
new file mode 100644
index 0000000000..eab3c6e255
--- /dev/null
+++ b/gtk/stock_icons.c
@@ -0,0 +1,220 @@
+/* stock_icons.c
+ * Wireshark specific stock icons
+ * Copyright 2003-2008, Ulf Lamping <ulf.lamping@web.de>
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gtk/gtk.h>
+#include "stock_icons.h"
+
+/* these icons are derived from the original stock icons */
+#ifdef HAVE_LIBPCAP
+#include "../image/toolbar/capture_interfaces_24.xpm"
+#include "../image/toolbar/capture_options_24.xpm"
+#include "../image/toolbar/capture_start_24.xpm"
+#include "../image/toolbar/capture_stop_24.xpm"
+#include "../image/toolbar/capture_restart_24.xpm"
+#include "../image/toolbar/capture_filter_24.xpm"
+#include "../image/toolbar/capture_details_24.xpm"
+#endif /* HAVE_LIBPCAP */
+#include "../image/toolbar/display_filter_24.xpm"
+/* these icons are standard stock icons, but used for Wireshark specific stock icon labels */
+#include "../image/toolbar/stock_add_24.xpm"
+#include "../image/toolbar/stock_open_24.xpm"
+#include "../image/toolbar/stock_ok_20.xpm"
+#include "../image/toolbar/stock_save_24.xpm"
+#include "../image/toolbar/stock_properties_24.xpm"
+#include "../image/wsicon16.xpm"
+#include "../image/toolbar/colorize_24.xpm"
+#include "../image/toolbar/autoscroll_24.xpm"
+#include "../image/toolbar/resize_columns_24.xpm"
+#include "../image/toolbar/time_24.xpm"
+#include "../image/toolbar/internet_24.xpm"
+#include "../image/toolbar/web_support_24.xpm"
+#include "../image/toolbar/wiki_24.xpm"
+#include "../image/toolbar/conversations_16.xpm"
+#include "../image/toolbar/endpoints_16.xpm"
+#include "../image/toolbar/graphs_16.xpm"
+#include "../image/toolbar/telephony_16.xpm"
+#include "../image/toolbar/decode_as_16.xpm"
+#include "../image/toolbar/checkbox_16.xpm"
+#include "../image/toolbar/file_set_list_16.xpm"
+#include "../image/toolbar/file_set_next_16.xpm"
+#include "../image/toolbar/file_set_previous_16.xpm"
+#include "../image/toolbar/stock_close_24.xpm"
+#include "../image/toolbar/icon_color_1.xpm"
+#include "../image/toolbar/icon_color_2.xpm"
+#include "../image/toolbar/icon_color_3.xpm"
+#include "../image/toolbar/icon_color_4.xpm"
+#include "../image/toolbar/icon_color_5.xpm"
+#include "../image/toolbar/icon_color_6.xpm"
+#include "../image/toolbar/icon_color_7.xpm"
+#include "../image/toolbar/icon_color_8.xpm"
+#include "../image/toolbar/icon_color_9.xpm"
+#include "../image/toolbar/icon_color_0.xpm"
+
+
+typedef struct stock_pixmap_tag{
+ const char * name;
+ const char ** xpm_data;
+} stock_pixmap_t;
+
+/* generate application specific stock items */
+void stock_icons_init(void) {
+ GtkIconFactory * factory;
+ gint32 i;
+
+
+ /* register non-standard pixmaps with the gtk-stock engine */
+ static const GtkStockItem stock_items[] = {
+#ifdef HAVE_LIBPCAP
+ { WIRESHARK_STOCK_CAPTURE_INTERFACES, "_Interfaces", 0, 0, NULL },
+ { WIRESHARK_STOCK_CAPTURE_OPTIONS, "_Options", 0, 0, NULL },
+ { WIRESHARK_STOCK_CAPTURE_START, "_Start", 0, 0, NULL },
+ { WIRESHARK_STOCK_CAPTURE_STOP, "S_top", 0, 0, NULL },
+ { WIRESHARK_STOCK_CAPTURE_RESTART, "_Restart", 0, 0, NULL },
+ { WIRESHARK_STOCK_CAPTURE_FILTER, "_CFilter", 0, 0, NULL },
+ { WIRESHARK_STOCK_CAPTURE_FILTER_ENTRY, "_Capture Filter:", 0, 0, NULL },
+ { WIRESHARK_STOCK_CAPTURE_DETAILS, "_Details", 0, 0, NULL },
+#endif
+ { WIRESHARK_STOCK_DISPLAY_FILTER, "_Filter", 0, 0, NULL },
+ { WIRESHARK_STOCK_DISPLAY_FILTER_ENTRY, "_Filter:", 0, 0, NULL },
+ { WIRESHARK_STOCK_BROWSE, "_Browse...", 0, 0, NULL },
+ { WIRESHARK_STOCK_CREATE_STAT, "Create _Stat", 0, 0, NULL },
+ { WIRESHARK_STOCK_EXPORT, "_Export...", 0, 0, NULL },
+ { WIRESHARK_STOCK_IMPORT, "_Import...", 0, 0, NULL },
+ { WIRESHARK_STOCK_EDIT, "_Edit...", 0, 0, NULL },
+ { WIRESHARK_STOCK_ADD_EXPRESSION, "_Expression..." , 0, 0, NULL }, /* plus sign coming from icon */
+ { WIRESHARK_STOCK_DONT_SAVE, "Continue _without Saving", 0, 0, NULL },
+ { WIRESHARK_STOCK_ABOUT, "_About", 0, 0, NULL },
+ { WIRESHARK_STOCK_COLORIZE, "_Colorize", 0, 0, NULL },
+ { WIRESHARK_STOCK_AUTOSCROLL, "_Auto Scroll in Live Capture", 0, 0, NULL },
+ { WIRESHARK_STOCK_RESIZE_COLUMNS, "Resize Columns", 0, 0, NULL },
+ { WIRESHARK_STOCK_TIME, "Time", 0, 0, NULL },
+ { WIRESHARK_STOCK_INTERNET, "Internet", 0, 0, NULL },
+ { WIRESHARK_STOCK_WEB_SUPPORT, "Web Support", 0, 0, NULL },
+ { WIRESHARK_STOCK_WIKI, "Wiki", 0, 0, NULL },
+ { WIRESHARK_STOCK_CONVERSATIONS, "Conversations", 0, 0, NULL },
+ { WIRESHARK_STOCK_ENDPOINTS, "Endpoints", 0, 0, NULL },
+ { WIRESHARK_STOCK_GRAPHS, "Graphs", 0, 0, NULL },
+ { WIRESHARK_STOCK_TELEPHONY, "Telephony", 0, 0, NULL },
+ { WIRESHARK_STOCK_DECODE_AS, "Decode As", 0, 0, NULL },
+ { WIRESHARK_STOCK_CHECKBOX, "Checkbox", 0, 0, NULL },
+ { WIRESHARK_STOCK_FILE_SET_LIST, "List Files", 0, 0, NULL },
+ { WIRESHARK_STOCK_FILE_SET_NEXT, "Next File", 0, 0, NULL },
+ { WIRESHARK_STOCK_FILE_SET_PREVIOUS, "Previous File", 0, 0, NULL },
+ { WIRESHARK_STOCK_FILTER_OUT_STREAM, "Filter Out This Stream", 0, 0, NULL },
+ { WIRESHARK_STOCK_ENABLE, "Enable", 0, 0, NULL },
+ { WIRESHARK_STOCK_DISABLE, "Disable", 0, 0, NULL },
+ { WIRESHARK_STOCK_COLOR1, "Color 1", 0, 0, NULL },
+ { WIRESHARK_STOCK_COLOR2, "Color 2", 0, 0, NULL },
+ { WIRESHARK_STOCK_COLOR3, "Color 3", 0, 0, NULL },
+ { WIRESHARK_STOCK_COLOR4, "Color 4", 0, 0, NULL },
+ { WIRESHARK_STOCK_COLOR5, "Color 5", 0, 0, NULL },
+ { WIRESHARK_STOCK_COLOR6, "Color 6", 0, 0, NULL },
+ { WIRESHARK_STOCK_COLOR7, "Color 7", 0, 0, NULL },
+ { WIRESHARK_STOCK_COLOR8, "Color 8", 0, 0, NULL },
+ { WIRESHARK_STOCK_COLOR9, "Color 9", 0, 0, NULL },
+ { WIRESHARK_STOCK_COLOR0, "Color 10", 0, 0, NULL }
+ };
+
+ static const stock_pixmap_t pixmaps[] = {
+#ifdef HAVE_LIBPCAP
+ { WIRESHARK_STOCK_CAPTURE_INTERFACES, capture_interfaces_24_xpm },
+ { WIRESHARK_STOCK_CAPTURE_OPTIONS, capture_options_24_xpm },
+ { WIRESHARK_STOCK_CAPTURE_START, capture_start_24_xpm },
+ { WIRESHARK_STOCK_CAPTURE_STOP, capture_stop_24_xpm },
+ { WIRESHARK_STOCK_CAPTURE_RESTART, capture_restart_24_xpm },
+ { WIRESHARK_STOCK_CAPTURE_FILTER, capture_filter_24_xpm },
+ { WIRESHARK_STOCK_CAPTURE_FILTER_ENTRY, capture_filter_24_xpm },
+ { WIRESHARK_STOCK_CAPTURE_DETAILS, capture_details_24_xpm },
+#endif
+ { WIRESHARK_STOCK_DISPLAY_FILTER, display_filter_24_xpm },
+ { WIRESHARK_STOCK_DISPLAY_FILTER_ENTRY, display_filter_24_xpm },
+ { WIRESHARK_STOCK_BROWSE, stock_open_24_xpm },
+ { WIRESHARK_STOCK_CREATE_STAT, stock_ok_20_xpm },
+ { WIRESHARK_STOCK_EXPORT, stock_save_24_xpm }, /* XXX: needs a better icon */
+ { WIRESHARK_STOCK_IMPORT, stock_save_24_xpm }, /* XXX: needs a better icon */
+ { WIRESHARK_STOCK_EDIT, stock_properties_24_xpm },
+ { WIRESHARK_STOCK_ADD_EXPRESSION, stock_add_24_xpm },
+ { WIRESHARK_STOCK_ABOUT, wsicon16_xpm },
+ { WIRESHARK_STOCK_COLORIZE, colorize_24_xpm },
+ { WIRESHARK_STOCK_AUTOSCROLL, autoscroll_24_xpm },
+ { WIRESHARK_STOCK_RESIZE_COLUMNS, resize_columns_24_xpm},
+ { WIRESHARK_STOCK_TIME, time_24_xpm},
+ { WIRESHARK_STOCK_INTERNET, internet_24_xpm},
+ { WIRESHARK_STOCK_WEB_SUPPORT, web_support_24_xpm},
+ { WIRESHARK_STOCK_WIKI, wiki_24_xpm},
+ { WIRESHARK_STOCK_CONVERSATIONS, conversations_16_xpm},
+ { WIRESHARK_STOCK_ENDPOINTS, endpoints_16_xpm},
+ { WIRESHARK_STOCK_GRAPHS, graphs_16_xpm},
+ { WIRESHARK_STOCK_TELEPHONY, telephony_16_xpm},
+ { WIRESHARK_STOCK_DECODE_AS, decode_as_16_xpm},
+ { WIRESHARK_STOCK_CHECKBOX, checkbox_16_xpm},
+ { WIRESHARK_STOCK_FILE_SET_LIST, file_set_list_16_xpm},
+ { WIRESHARK_STOCK_FILE_SET_NEXT, file_set_next_16_xpm},
+ { WIRESHARK_STOCK_FILE_SET_PREVIOUS, file_set_previous_16_xpm},
+ { WIRESHARK_STOCK_FILTER_OUT_STREAM, display_filter_24_xpm},
+ { WIRESHARK_STOCK_ENABLE, checkbox_16_xpm},
+ { WIRESHARK_STOCK_DISABLE, stock_close_24_xpm},
+ { WIRESHARK_STOCK_COLOR1, icon_color_1_xpm},
+ { WIRESHARK_STOCK_COLOR2, icon_color_2_xpm},
+ { WIRESHARK_STOCK_COLOR3, icon_color_3_xpm},
+ { WIRESHARK_STOCK_COLOR4, icon_color_4_xpm},
+ { WIRESHARK_STOCK_COLOR5, icon_color_5_xpm},
+ { WIRESHARK_STOCK_COLOR6, icon_color_6_xpm},
+ { WIRESHARK_STOCK_COLOR7, icon_color_7_xpm},
+ { WIRESHARK_STOCK_COLOR8, icon_color_8_xpm},
+ { WIRESHARK_STOCK_COLOR9, icon_color_9_xpm},
+ { WIRESHARK_STOCK_COLOR0, icon_color_0_xpm},
+ { NULL, NULL }
+ };
+
+ /* Register our stock items */
+ gtk_stock_add (stock_items, G_N_ELEMENTS (stock_items));
+
+ /* Add our custom icon factory to the list of defaults */
+ factory = gtk_icon_factory_new();
+ gtk_icon_factory_add_default(factory);
+
+ /* Create the stock items to add into our icon factory */
+ for (i = 0; pixmaps[i].name != NULL; i++) {
+ GdkPixbuf * pixbuf;
+ GtkIconSet *icon_set;
+
+ pixbuf = gdk_pixbuf_new_from_xpm_data((const char **) (pixmaps[i].xpm_data));
+ g_assert(pixbuf);
+ icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
+ gtk_icon_factory_add (factory, pixmaps[i].name, icon_set);
+ gtk_icon_set_unref (icon_set);
+ g_object_unref (G_OBJECT (pixbuf));
+ }
+
+ /* Drop our reference to the factory, GTK will hold a reference.*/
+ g_object_unref (G_OBJECT (factory));
+}
+
+
diff --git a/gtk/stock_icons.h b/gtk/stock_icons.h
new file mode 100644
index 0000000000..05d85032e3
--- /dev/null
+++ b/gtk/stock_icons.h
@@ -0,0 +1,83 @@
+/* stock_icons.h
+ * Wireshark specific stock icons
+ * Copyright 2003-2008, Ulf Lamping <ulf.lamping@web.de>
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __STOCK_ICONS_H__
+#define __STOCK_ICONS_H__
+
+
+#ifdef HAVE_LIBPCAP
+#define WIRESHARK_STOCK_CAPTURE_INTERFACES "Wireshark_Stock_CaptureInterfaces"
+#define WIRESHARK_STOCK_CAPTURE_OPTIONS "Wireshark_Stock_CaptureOptionss"
+#define WIRESHARK_STOCK_CAPTURE_START "Wireshark_Stock_CaptureStart"
+#define WIRESHARK_STOCK_CAPTURE_STOP "Wireshark_Stock_CaptureStop"
+#define WIRESHARK_STOCK_CAPTURE_RESTART "Wireshark_Stock_CaptureRestart"
+#define WIRESHARK_STOCK_CAPTURE_FILTER "Wireshark_Stock_CaptureFilter"
+#define WIRESHARK_STOCK_CAPTURE_FILTER_ENTRY "Wireshark_Stock_CaptureFilter_Entry"
+#define WIRESHARK_STOCK_CAPTURE_DETAILS "Wireshark_Stock_CaptureDetails"
+#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"
+#define WIRESHARK_STOCK_CREATE_STAT "Wireshark_Stock_CreateStat"
+#define WIRESHARK_STOCK_EXPORT "Wireshark_Stock_Export"
+#define WIRESHARK_STOCK_IMPORT "Wireshark_Stock_Import"
+#define WIRESHARK_STOCK_EDIT "Wireshark_Stock_Edit"
+#define WIRESHARK_STOCK_ADD_EXPRESSION "Wireshark_Stock_Edit_Add_Expression"
+#define WIRESHARK_STOCK_DONT_SAVE "Wireshark_Stock_Continue_without_Saving"
+#define WIRESHARK_STOCK_ABOUT "Wireshark_Stock_About"
+#define WIRESHARK_STOCK_COLORIZE "Wireshark_Stock_Colorize"
+#define WIRESHARK_STOCK_AUTOSCROLL "Wireshark_Stock_Autoscroll"
+#define WIRESHARK_STOCK_RESIZE_COLUMNS "Wireshark_Stock_Resize_Columns"
+#define WIRESHARK_STOCK_TIME "Wireshark_Stock_Time"
+#define WIRESHARK_STOCK_INTERNET "Wireshark_Stock_Internet"
+#define WIRESHARK_STOCK_WEB_SUPPORT "Wireshark_Stock_Web_Support"
+#define WIRESHARK_STOCK_WIKI "Wireshark_Stock_Wiki"
+#define WIRESHARK_STOCK_CONVERSATIONS "Wireshark_Stock_Conversations"
+#define WIRESHARK_STOCK_ENDPOINTS "Wireshark_Stock_Endpoints"
+#define WIRESHARK_STOCK_GRAPHS "Wireshark_Stock_Graphs"
+#define WIRESHARK_STOCK_TELEPHONY "Wireshark_Stock_Telephony"
+#define WIRESHARK_STOCK_DECODE_AS "Wireshark_Stock_DecodeAs"
+#define WIRESHARK_STOCK_CHECKBOX "Wireshark_Stock_Checkbox"
+#define WIRESHARK_STOCK_FILE_SET_LIST "Wireshark_Stock_File_Set_List"
+#define WIRESHARK_STOCK_FILE_SET_NEXT "Wireshark_Stock_File_Set_Next"
+#define WIRESHARK_STOCK_FILE_SET_PREVIOUS "Wireshark_Stock_File_Set_Previous"
+#define WIRESHARK_STOCK_FILTER_OUT_STREAM "Wireshark_Stock_Filter_Out_This_Stream"
+#define WIRESHARK_STOCK_ENABLE "Wireshark_Stock_Enable"
+#define WIRESHARK_STOCK_DISABLE "Wireshark_Stock_Disable"
+#define WIRESHARK_STOCK_COLOR1 "Wireshark_Stock_Color_1"
+#define WIRESHARK_STOCK_COLOR2 "Wireshark_Stock_Color_2"
+#define WIRESHARK_STOCK_COLOR3 "Wireshark_Stock_Color_3"
+#define WIRESHARK_STOCK_COLOR4 "Wireshark_Stock_Color_4"
+#define WIRESHARK_STOCK_COLOR5 "Wireshark_Stock_Color_5"
+#define WIRESHARK_STOCK_COLOR6 "Wireshark_Stock_Color_6"
+#define WIRESHARK_STOCK_COLOR7 "Wireshark_Stock_Color_7"
+#define WIRESHARK_STOCK_COLOR8 "Wireshark_Stock_Color_8"
+#define WIRESHARK_STOCK_COLOR9 "Wireshark_Stock_Color_9"
+#define WIRESHARK_STOCK_COLOR0 "Wireshark_Stock_Color_10"
+
+
+void stock_icons_init(void);
+
+#endif /* __STOCK_ICONS_H__ */
diff --git a/gtk/tap_dfilter_dlg.c b/gtk/tap_dfilter_dlg.c
index ae94ad6f50..c8d6e096f7 100644
--- a/gtk/tap_dfilter_dlg.c
+++ b/gtk/tap_dfilter_dlg.c
@@ -36,7 +36,7 @@
#include <gtk/gtk.h>
#include <string.h>
-#include "compat_macros.h"
+#include "stock_icons.h"
#include "../simple_dialog.h"
#include "dlg_utils.h"
#include "../file.h"
diff --git a/gtk/toolbar.c b/gtk/toolbar.c
index 9ccef2f8d4..6e8cd36832 100644
--- a/gtk/toolbar.c
+++ b/gtk/toolbar.c
@@ -47,7 +47,7 @@
#include "main.h"
#include "help_dlg.h"
#include "gtkglobals.h"
-#include "toolbar.h"
+#include "stock_icons.h"
#include "keys.h"
#include "compat_macros.h"
#include "recent.h"
@@ -56,51 +56,6 @@
#include "color_filters.h"
#include "menu.h"
-/* these icons are derived from the original stock icons */
-#ifdef HAVE_LIBPCAP
-#include "../image/toolbar/capture_interfaces_24.xpm"
-#include "../image/toolbar/capture_options_24.xpm"
-#include "../image/toolbar/capture_start_24.xpm"
-#include "../image/toolbar/capture_stop_24.xpm"
-#include "../image/toolbar/capture_restart_24.xpm"
-#include "../image/toolbar/capture_filter_24.xpm"
-#include "../image/toolbar/capture_details_24.xpm"
-#endif /* HAVE_LIBPCAP */
-#include "../image/toolbar/display_filter_24.xpm"
-/* these icons are standard stock icons, but used for Wireshark specific stock icon labels */
-#include "../image/toolbar/stock_add_24.xpm"
-#include "../image/toolbar/stock_open_24.xpm"
-#include "../image/toolbar/stock_ok_20.xpm"
-#include "../image/toolbar/stock_save_24.xpm"
-#include "../image/toolbar/stock_properties_24.xpm"
-#include "../image/wsicon16.xpm"
-#include "../image/toolbar/colorize_24.xpm"
-#include "../image/toolbar/autoscroll_24.xpm"
-#include "../image/toolbar/resize_columns_24.xpm"
-#include "../image/toolbar/time_24.xpm"
-#include "../image/toolbar/internet_24.xpm"
-#include "../image/toolbar/web_support_24.xpm"
-#include "../image/toolbar/wiki_24.xpm"
-#include "../image/toolbar/conversations_16.xpm"
-#include "../image/toolbar/endpoints_16.xpm"
-#include "../image/toolbar/graphs_16.xpm"
-#include "../image/toolbar/telephony_16.xpm"
-#include "../image/toolbar/decode_as_16.xpm"
-#include "../image/toolbar/checkbox_16.xpm"
-#include "../image/toolbar/file_set_list_16.xpm"
-#include "../image/toolbar/file_set_next_16.xpm"
-#include "../image/toolbar/file_set_previous_16.xpm"
-#include "../image/toolbar/stock_close_24.xpm"
-#include "../image/toolbar/icon_color_1.xpm"
-#include "../image/toolbar/icon_color_2.xpm"
-#include "../image/toolbar/icon_color_3.xpm"
-#include "../image/toolbar/icon_color_4.xpm"
-#include "../image/toolbar/icon_color_5.xpm"
-#include "../image/toolbar/icon_color_6.xpm"
-#include "../image/toolbar/icon_color_7.xpm"
-#include "../image/toolbar/icon_color_8.xpm"
-#include "../image/toolbar/icon_color_9.xpm"
-#include "../image/toolbar/icon_color_0.xpm"
/* XXX: add this key to some .h file, as it adds a key to the top level Widget? */
@@ -132,146 +87,6 @@ static BUTTON_TYPE *save_as_button;
#define SAVE_BUTTON_TOOLTIP_TEXT "Save this capture file..."
#define SAVE_AS_BUTTON_TOOLTIP_TEXT "Save this capture file as..."
-typedef struct stock_pixmap_tag{
- const char * name;
- const char ** xpm_data;
-} stock_pixmap_t;
-
-/* generate application specific stock items */
-static void wireshark_stock_icons(void) {
- GtkIconFactory * factory;
- gint32 i;
-
-
- /* register non-standard pixmaps with the gtk-stock engine */
- static const GtkStockItem stock_items[] = {
-#ifdef HAVE_LIBPCAP
- { WIRESHARK_STOCK_CAPTURE_INTERFACES, "_Interfaces", 0, 0, NULL },
- { WIRESHARK_STOCK_CAPTURE_OPTIONS, "_Options", 0, 0, NULL },
- { WIRESHARK_STOCK_CAPTURE_START, "_Start", 0, 0, NULL },
- { WIRESHARK_STOCK_CAPTURE_STOP, "S_top", 0, 0, NULL },
- { WIRESHARK_STOCK_CAPTURE_RESTART, "_Restart", 0, 0, NULL },
- { WIRESHARK_STOCK_CAPTURE_FILTER, "_CFilter", 0, 0, NULL },
- { WIRESHARK_STOCK_CAPTURE_FILTER_ENTRY, "_Capture Filter:", 0, 0, NULL },
- { WIRESHARK_STOCK_CAPTURE_DETAILS, "_Details", 0, 0, NULL },
-#endif
- { WIRESHARK_STOCK_DISPLAY_FILTER, "_Filter", 0, 0, NULL },
- { WIRESHARK_STOCK_DISPLAY_FILTER_ENTRY, "_Filter:", 0, 0, NULL },
- { WIRESHARK_STOCK_BROWSE, "_Browse...", 0, 0, NULL },
- { WIRESHARK_STOCK_CREATE_STAT, "Create _Stat", 0, 0, NULL },
- { WIRESHARK_STOCK_EXPORT, "_Export...", 0, 0, NULL },
- { WIRESHARK_STOCK_IMPORT, "_Import...", 0, 0, NULL },
- { WIRESHARK_STOCK_EDIT, "_Edit...", 0, 0, NULL },
- { WIRESHARK_STOCK_ADD_EXPRESSION, "_Expression..." , 0, 0, NULL }, /* plus sign coming from icon */
- { WIRESHARK_STOCK_DONT_SAVE, "Continue _without Saving", 0, 0, NULL },
- { WIRESHARK_STOCK_ABOUT, "_About", 0, 0, NULL },
- { WIRESHARK_STOCK_COLORIZE, "_Colorize", 0, 0, NULL },
- { WIRESHARK_STOCK_AUTOSCROLL, "_Auto Scroll in Live Capture", 0, 0, NULL },
- { WIRESHARK_STOCK_RESIZE_COLUMNS, "Resize Columns", 0, 0, NULL },
- { WIRESHARK_STOCK_TIME, "Time", 0, 0, NULL },
- { WIRESHARK_STOCK_INTERNET, "Internet", 0, 0, NULL },
- { WIRESHARK_STOCK_WEB_SUPPORT, "Web Support", 0, 0, NULL },
- { WIRESHARK_STOCK_WIKI, "Wiki", 0, 0, NULL },
- { WIRESHARK_STOCK_CONVERSATIONS, "Conversations", 0, 0, NULL },
- { WIRESHARK_STOCK_ENDPOINTS, "Endpoints", 0, 0, NULL },
- { WIRESHARK_STOCK_GRAPHS, "Graphs", 0, 0, NULL },
- { WIRESHARK_STOCK_TELEPHONY, "Telephony", 0, 0, NULL },
- { WIRESHARK_STOCK_DECODE_AS, "Decode As", 0, 0, NULL },
- { WIRESHARK_STOCK_CHECKBOX, "Checkbox", 0, 0, NULL },
- { WIRESHARK_STOCK_FILE_SET_LIST, "List Files", 0, 0, NULL },
- { WIRESHARK_STOCK_FILE_SET_NEXT, "Next File", 0, 0, NULL },
- { WIRESHARK_STOCK_FILE_SET_PREVIOUS, "Previous File", 0, 0, NULL },
- { WIRESHARK_STOCK_FILTER_OUT_STREAM, "Filter Out This Stream", 0, 0, NULL },
- { WIRESHARK_STOCK_ENABLE, "Enable", 0, 0, NULL },
- { WIRESHARK_STOCK_DISABLE, "Disable", 0, 0, NULL },
- { WIRESHARK_STOCK_COLOR1, "Color 1", 0, 0, NULL },
- { WIRESHARK_STOCK_COLOR2, "Color 2", 0, 0, NULL },
- { WIRESHARK_STOCK_COLOR3, "Color 3", 0, 0, NULL },
- { WIRESHARK_STOCK_COLOR4, "Color 4", 0, 0, NULL },
- { WIRESHARK_STOCK_COLOR5, "Color 5", 0, 0, NULL },
- { WIRESHARK_STOCK_COLOR6, "Color 6", 0, 0, NULL },
- { WIRESHARK_STOCK_COLOR7, "Color 7", 0, 0, NULL },
- { WIRESHARK_STOCK_COLOR8, "Color 8", 0, 0, NULL },
- { WIRESHARK_STOCK_COLOR9, "Color 9", 0, 0, NULL },
- { WIRESHARK_STOCK_COLOR0, "Color 10", 0, 0, NULL }
- };
-
- static const stock_pixmap_t pixmaps[] = {
-#ifdef HAVE_LIBPCAP
- { WIRESHARK_STOCK_CAPTURE_INTERFACES, capture_interfaces_24_xpm },
- { WIRESHARK_STOCK_CAPTURE_OPTIONS, capture_options_24_xpm },
- { WIRESHARK_STOCK_CAPTURE_START, capture_start_24_xpm },
- { WIRESHARK_STOCK_CAPTURE_STOP, capture_stop_24_xpm },
- { WIRESHARK_STOCK_CAPTURE_RESTART, capture_restart_24_xpm },
- { WIRESHARK_STOCK_CAPTURE_FILTER, capture_filter_24_xpm },
- { WIRESHARK_STOCK_CAPTURE_FILTER_ENTRY, capture_filter_24_xpm },
- { WIRESHARK_STOCK_CAPTURE_DETAILS, capture_details_24_xpm },
-#endif
- { WIRESHARK_STOCK_DISPLAY_FILTER, display_filter_24_xpm },
- { WIRESHARK_STOCK_DISPLAY_FILTER_ENTRY, display_filter_24_xpm },
- { WIRESHARK_STOCK_BROWSE, stock_open_24_xpm },
- { WIRESHARK_STOCK_CREATE_STAT, stock_ok_20_xpm },
- { WIRESHARK_STOCK_EXPORT, stock_save_24_xpm }, /* XXX: needs a better icon */
- { WIRESHARK_STOCK_IMPORT, stock_save_24_xpm }, /* XXX: needs a better icon */
- { WIRESHARK_STOCK_EDIT, stock_properties_24_xpm },
- { WIRESHARK_STOCK_ADD_EXPRESSION, stock_add_24_xpm },
- { WIRESHARK_STOCK_ABOUT, wsicon16_xpm },
- { WIRESHARK_STOCK_COLORIZE, colorize_24_xpm },
- { WIRESHARK_STOCK_AUTOSCROLL, autoscroll_24_xpm },
- { WIRESHARK_STOCK_RESIZE_COLUMNS, resize_columns_24_xpm},
- { WIRESHARK_STOCK_TIME, time_24_xpm},
- { WIRESHARK_STOCK_INTERNET, internet_24_xpm},
- { WIRESHARK_STOCK_WEB_SUPPORT, web_support_24_xpm},
- { WIRESHARK_STOCK_WIKI, wiki_24_xpm},
- { WIRESHARK_STOCK_CONVERSATIONS, conversations_16_xpm},
- { WIRESHARK_STOCK_ENDPOINTS, endpoints_16_xpm},
- { WIRESHARK_STOCK_GRAPHS, graphs_16_xpm},
- { WIRESHARK_STOCK_TELEPHONY, telephony_16_xpm},
- { WIRESHARK_STOCK_DECODE_AS, decode_as_16_xpm},
- { WIRESHARK_STOCK_CHECKBOX, checkbox_16_xpm},
- { WIRESHARK_STOCK_FILE_SET_LIST, file_set_list_16_xpm},
- { WIRESHARK_STOCK_FILE_SET_NEXT, file_set_next_16_xpm},
- { WIRESHARK_STOCK_FILE_SET_PREVIOUS, file_set_previous_16_xpm},
- { WIRESHARK_STOCK_FILTER_OUT_STREAM, display_filter_24_xpm},
- { WIRESHARK_STOCK_ENABLE, checkbox_16_xpm},
- { WIRESHARK_STOCK_DISABLE, stock_close_24_xpm},
- { WIRESHARK_STOCK_COLOR1, icon_color_1_xpm},
- { WIRESHARK_STOCK_COLOR2, icon_color_2_xpm},
- { WIRESHARK_STOCK_COLOR3, icon_color_3_xpm},
- { WIRESHARK_STOCK_COLOR4, icon_color_4_xpm},
- { WIRESHARK_STOCK_COLOR5, icon_color_5_xpm},
- { WIRESHARK_STOCK_COLOR6, icon_color_6_xpm},
- { WIRESHARK_STOCK_COLOR7, icon_color_7_xpm},
- { WIRESHARK_STOCK_COLOR8, icon_color_8_xpm},
- { WIRESHARK_STOCK_COLOR9, icon_color_9_xpm},
- { WIRESHARK_STOCK_COLOR0, icon_color_0_xpm},
- { NULL, NULL }
- };
-
- /* Register our stock items */
- gtk_stock_add (stock_items, G_N_ELEMENTS (stock_items));
-
- /* Add our custom icon factory to the list of defaults */
- factory = gtk_icon_factory_new();
- gtk_icon_factory_add_default(factory);
-
- /* Create the stock items to add into our icon factory */
- for (i = 0; pixmaps[i].name != NULL; i++) {
- GdkPixbuf * pixbuf;
- GtkIconSet *icon_set;
-
- pixbuf = gdk_pixbuf_new_from_xpm_data((const char **) (pixmaps[i].xpm_data));
- g_assert(pixbuf);
- icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
- gtk_icon_factory_add (factory, pixmaps[i].name, icon_set);
- gtk_icon_set_unref (icon_set);
- g_object_unref (G_OBJECT (pixbuf));
- }
-
- /* Drop our reference to the factory, GTK will hold a reference.*/
- g_object_unref (G_OBJECT (factory));
-}
-
/*
* Redraw all toolbars (currently only the main toolbar)
@@ -549,9 +364,6 @@ toolbar_new(void)
tooltips = gtk_tooltips_new();
- /* create application specific stock icons */
- wireshark_stock_icons();
-
/* this function should be only called once! */
g_assert(!toolbar_init);
diff --git a/gtk/uat_gui.c b/gtk/uat_gui.c
index f3dc57306a..ec27701315 100644
--- a/gtk/uat_gui.c
+++ b/gtk/uat_gui.c
@@ -52,7 +52,7 @@
#include "dlg_utils.h"
#include "help_dlg.h"
#include "menu.h"
-#include "compat_macros.h"
+#include "stock_icons.h"
#include <epan/proto.h>
#include <epan/packet.h>
#include "../stat_menu.h"