aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/expert_comp_dlg.c
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2015-10-17 13:47:17 +0100
committerAnders Broman <a.broman58@gmail.com>2015-11-12 07:14:32 +0000
commit2d7b0fc7d046154a393c9a1e5f4b2e9b5fee3738 (patch)
tree8b14d373b97ea9162a46e8b61f42919f2a6c5514 /ui/gtk/expert_comp_dlg.c
parent1ab019f409f2855d3b51717a237cc482242887e9 (diff)
[GTK] Replace deprecated gdk_pixbuf_new_from_inline()
Use GResource instead, if available. Add autotools and cmake compile time checks for build requirements (GIO >= 2.32 and GDK-Pixbuf >= 2.26). Merge all the various static pixbuf csource header files into a single pixbuf-csource.h header with external linkage through use of the tools/make-pixbuf-csource.pl script. Fix inline pixbuf build target for some image paths (broken for GTK in gb4a4de7). Add missing 'expert_ok.png' file to distribution (GTK only). Minor improvements to style/structure of ui/gtk/Makefile.am. Bug: 10750 Change-Id: I031296b666ee8b92730400dfa6f71f9ee4304863 Reviewed-on: https://code.wireshark.org/review/10992 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/gtk/expert_comp_dlg.c')
-rw-r--r--ui/gtk/expert_comp_dlg.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/ui/gtk/expert_comp_dlg.c b/ui/gtk/expert_comp_dlg.c
index 83197dbe50..950d7de4ed 100644
--- a/ui/gtk/expert_comp_dlg.c
+++ b/ui/gtk/expert_comp_dlg.c
@@ -41,10 +41,11 @@
#include "ui/gtk/help_dlg.h"
#include "ui/gtk/expert_comp_dlg.h"
#include "ui/gtk/main.h"
-#include "ui/gtk/expert_indicators.h"
+#ifndef HAVE_GRESOURCE
+#include "ui/gtk/pixbuf-csource.h"
+#endif
#include "ui/gtk/packet_panes.h"
#include "ui/gtk/edit_packet_comment_dlg.h"
-#include "ui/gtk/capture_comment_icons.h"
#include "ui/gtk/gtkglobals.h"
void register_tap_listener_expert_comp(void);
@@ -833,7 +834,11 @@ expert_comp_init(const char *opt_arg _U_, void* userdata _U_)
gtk_widget_show(ss->error_label);
hbox = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE);
if ( prefs.gui_expert_composite_eyecandy ) {
+#ifdef HAVE_GRESOURCE
+ image = pixbuf_to_widget("/org/wireshark/image/toolbar/14x14/x-expert-error.png");
+#else
image = pixbuf_to_widget(expert_error_pb_data);
+#endif
gtk_widget_show(image);
gtk_box_pack_start(GTK_BOX(hbox), image, TRUE, TRUE, 0);
}
@@ -847,7 +852,11 @@ expert_comp_init(const char *opt_arg _U_, void* userdata _U_)
gtk_widget_show(ss->warn_label);
hbox = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE);
if ( prefs.gui_expert_composite_eyecandy ) {
+#ifdef HAVE_GRESOURCE
+ image = pixbuf_to_widget("/org/wireshark/image/toolbar/14x14/x-expert-warn.png");
+#else
image = pixbuf_to_widget(expert_warn_pb_data);
+#endif
gtk_widget_show(image);
gtk_box_pack_start(GTK_BOX(hbox), image, TRUE, TRUE, 0);
@@ -862,7 +871,11 @@ expert_comp_init(const char *opt_arg _U_, void* userdata _U_)
gtk_widget_show(ss->note_label);
hbox = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE);
if ( prefs.gui_expert_composite_eyecandy ) {
+#ifdef HAVE_GRESOURCE
+ image = pixbuf_to_widget("/org/wireshark/image/toolbar/14x14/x-expert-note.png");
+#else
image = pixbuf_to_widget(expert_note_pb_data);
+#endif
gtk_widget_show(image);
gtk_box_pack_start(GTK_BOX(hbox), image, TRUE, TRUE, 0);
}
@@ -876,7 +889,11 @@ expert_comp_init(const char *opt_arg _U_, void* userdata _U_)
gtk_widget_show(ss->chat_label);
hbox = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE);
if ( prefs.gui_expert_composite_eyecandy ) {
+#ifdef HAVE_GRESOURCE
+ image = pixbuf_to_widget("/org/wireshark/image/toolbar/14x14/x-expert-chat.png");
+#else
image = pixbuf_to_widget(expert_chat_pb_data);
+#endif
gtk_widget_show(image);
gtk_box_pack_start(GTK_BOX(hbox), image, TRUE, TRUE, 0);
}
@@ -890,7 +907,11 @@ expert_comp_init(const char *opt_arg _U_, void* userdata _U_)
gtk_widget_show(ss->all_label);
hbox = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE);
if ( prefs.gui_expert_composite_eyecandy ) {
+#ifdef HAVE_GRESOURCE
+ image = pixbuf_to_widget("/org/wireshark/image/capture_comment_disabled.png");
+#else
image = pixbuf_to_widget(capture_comment_disabled_pb_data);
+#endif
gtk_widget_show(image);
gtk_box_pack_start(GTK_BOX(hbox), image, TRUE, TRUE, 0);
}
@@ -903,7 +924,11 @@ expert_comp_init(const char *opt_arg _U_, void* userdata _U_)
gtk_widget_show(ss->pkt_comments_label);
hbox = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE);
if ( prefs.gui_expert_composite_eyecandy ) {
+#ifdef HAVE_GRESOURCE
+ image = pixbuf_to_widget("/org/wireshark/image/capture_comment_update.png");
+#else
image = pixbuf_to_widget(capture_comment_update_pb_data);
+#endif
gtk_widget_show(image);
gtk_box_pack_start(GTK_BOX(hbox), image, TRUE, TRUE, 0);
}