aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/main_statusbar.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/main_statusbar.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/main_statusbar.c')
-rw-r--r--ui/gtk/main_statusbar.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/ui/gtk/main_statusbar.c b/ui/gtk/main_statusbar.c
index 9930fcfa29..e2e1f010c5 100644
--- a/ui/gtk/main_statusbar.c
+++ b/ui/gtk/main_statusbar.c
@@ -57,9 +57,10 @@
#include "ui/gtk/gtkglobals.h"
#include "ui/gtk/expert_comp_dlg.h"
#include "ui/gtk/stock_icons.h"
+#ifndef HAVE_GRESOURCE
+#include "ui/gtk/pixbuf-csource.h"
+#endif
#include "ui/gtk/profile_dlg.h"
-#include "ui/gtk/expert_indicators.h"
-#include "ui/gtk/capture_comment_icons.h"
#include "ui/gtk/keys.h"
#include "ui/gtk/menus.h"
#include "ui/gtk/edit_packet_comment_dlg.h"
@@ -573,28 +574,28 @@ status_expert_new(void)
{
GtkWidget *expert_image;
- expert_image = pixbuf_to_widget(expert_error_pb_data);
+ expert_image = PIXBUF_TO_WIDGET(expert_error_pb_data, "/org/wireshark/image/toolbar/14x14/x-expert-error.png");
gtk_widget_set_tooltip_text(expert_image, "ERROR is the highest expert info level");
gtk_widget_show(expert_image);
expert_info_error = gtk_event_box_new();
gtk_container_add(GTK_CONTAINER(expert_info_error), expert_image);
g_signal_connect(expert_info_error, "button_press_event", G_CALLBACK(expert_comp_dlg_event_cb), NULL);
- expert_image = pixbuf_to_widget(expert_warn_pb_data);
+ expert_image = PIXBUF_TO_WIDGET(expert_warn_pb_data, "/org/wireshark/image/toolbar/14x14/x-expert-warn.png");
gtk_widget_set_tooltip_text(expert_image, "WARNING is the highest expert info level");
gtk_widget_show(expert_image);
expert_info_warn = gtk_event_box_new();
gtk_container_add(GTK_CONTAINER(expert_info_warn), expert_image);
g_signal_connect(expert_info_warn, "button_press_event", G_CALLBACK(expert_comp_dlg_event_cb), NULL);
- expert_image = pixbuf_to_widget(expert_note_pb_data);
+ expert_image = PIXBUF_TO_WIDGET(expert_note_pb_data, "/org/wireshark/image/toolbar/14x14/x-expert-note.png");
gtk_widget_set_tooltip_text(expert_image, "NOTE is the highest expert info level");
gtk_widget_show(expert_image);
expert_info_note = gtk_event_box_new();
gtk_container_add(GTK_CONTAINER(expert_info_note), expert_image);
g_signal_connect(expert_info_note, "button_press_event", G_CALLBACK(expert_comp_dlg_event_cb), NULL);
- expert_image = pixbuf_to_widget(expert_chat_pb_data);
+ expert_image = PIXBUF_TO_WIDGET(expert_chat_pb_data, "/org/wireshark/image/toolbar/14x14/x-expert-chat.png");
gtk_widget_set_tooltip_text(expert_image, "CHAT is the highest expert info level");
gtk_widget_show(expert_image);
expert_info_chat = gtk_event_box_new();
@@ -608,14 +609,14 @@ status_expert_new(void)
gtk_container_add(GTK_CONTAINER(expert_info_comment), expert_image);
g_signal_connect(expert_info_comment, "button_press_event", G_CALLBACK(expert_comp_dlg_event_cb), NULL);
- expert_image = pixbuf_to_widget(expert_none_pb_data);
+ expert_image = PIXBUF_TO_WIDGET(expert_none_pb_data, "/org/wireshark/image/toolbar/14x14/x-expert-none.png");
gtk_widget_set_tooltip_text(expert_image, "No expert info");
gtk_widget_show(expert_image);
expert_info_none = gtk_event_box_new();
gtk_container_add(GTK_CONTAINER(expert_info_none), expert_image);
g_signal_connect(expert_info_none, "button_press_event", G_CALLBACK(expert_comp_dlg_event_cb), NULL);
- expert_image = pixbuf_to_widget(expert_none_pb_data);
+ expert_image = PIXBUF_TO_WIDGET(expert_none_pb_data, "/org/wireshark/image/toolbar/14x14/x-expert-none.png");
gtk_widget_show(expert_image);
expert_info_placeholder = gtk_event_box_new();
gtk_container_add(GTK_CONTAINER(expert_info_placeholder), expert_image);
@@ -673,28 +674,28 @@ status_capture_comment_new(void)
{
GtkWidget *comment_image;
- comment_image = pixbuf_to_widget(capture_comment_update_pb_data);
+ comment_image = PIXBUF_TO_WIDGET(capture_comment_update_pb_data, "/org/wireshark/image/capture_comment_update.png");
gtk_widget_set_tooltip_text(comment_image, "Read or edit the comment for this capture file");
gtk_widget_show(comment_image);
capture_comment = gtk_event_box_new();
gtk_container_add(GTK_CONTAINER(capture_comment), comment_image);
g_signal_connect(capture_comment, "button_press_event", G_CALLBACK(edit_capture_comment_dlg_event_cb), NULL);
- comment_image = pixbuf_to_widget(capture_comment_add_pb_data);
+ comment_image = PIXBUF_TO_WIDGET(capture_comment_add_pb_data, "/org/wireshark/image/capture_comment_add.png");
gtk_widget_set_tooltip_text(comment_image, "Add a comment to this capture file");
gtk_widget_show(comment_image);
capture_comment_none = gtk_event_box_new();
gtk_container_add(GTK_CONTAINER(capture_comment_none), comment_image);
g_signal_connect(capture_comment_none, "button_press_event", G_CALLBACK(edit_capture_comment_dlg_event_cb), NULL);
- comment_image = pixbuf_to_widget(capture_comment_add_pb_data);
+ comment_image = PIXBUF_TO_WIDGET(capture_comment_add_pb_data, "/org/wireshark/image/capture_comment_add.png");
gtk_widget_show(comment_image);
capture_comment_placeholder = gtk_event_box_new();
gtk_container_add(GTK_CONTAINER(capture_comment_placeholder), comment_image);
gtk_widget_set_sensitive(capture_comment_placeholder, FALSE);
gtk_widget_show(capture_comment_placeholder);
- /* comment_image = pixbuf_to_widget(capture_comment_disabled_pb_data); ... */
+ /* comment_image = PIXBUF_TO_WIDGET(capture_comment_disabled_pb_data, "/org/wireshark/image/toolbar/capture_comment_disabled.png"); ... */
}