diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2015-10-17 13:47:17 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-11-12 07:14:32 +0000 |
commit | 2d7b0fc7d046154a393c9a1e5f4b2e9b5fee3738 (patch) | |
tree | 8b14d373b97ea9162a46e8b61f42919f2a6c5514 /ui/gtk/capture_dlg.c | |
parent | 1ab019f409f2855d3b51717a237cc482242887e9 (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/capture_dlg.c')
-rw-r--r-- | ui/gtk/capture_dlg.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/ui/gtk/capture_dlg.c b/ui/gtk/capture_dlg.c index 023cf696cf..e9a4f22edd 100644 --- a/ui/gtk/capture_dlg.c +++ b/ui/gtk/capture_dlg.c @@ -55,23 +55,24 @@ #include "ui/gtk/filter_dlg.h" #include "ui/gtk/dlg_utils.h" #include "ui/gtk/file_dlg.h" -#include "ui/gtk/stock_icons.h" #include "ui/gtk/capture_file_dlg.h" #include "ui/gtk/help_dlg.h" #include "ui/gtk/gtkglobals.h" #include "ui/gtk/cfilter_combo_utils.h" #include "ui/gtk/capture_if_dlg.h" #include "ui/gtk/main_welcome.h" -#include "ui/gtk/network_icons.h" #include "ui/gtk/menus.h" #include "ui/gtk/prefs_dlg.h" #include "ui/gtk/main_80211_toolbar.h" +#include "ui/gtk/stock_icons.h" +#ifndef HAVE_GRESOURCE +#include "ui/gtk/pixbuf-csource.h" +#endif #include "simple_dialog.h" #include "ui/gtk/keys.h" #include "ui/gtk/old-gtk-compat.h" -#include "ui/gtk/expert_indicators.h" #ifdef HAVE_AIRPCAP #include <caputils/airpcap.h> @@ -1970,10 +1971,18 @@ add_page(gchar *name, gchar *text, gboolean error) model = gtk_tree_view_get_model(GTK_TREE_VIEW(view)); gtk_list_store_append (GTK_LIST_STORE(model), &iter); if (error) { +#ifdef HAVE_GRESOURCE + icon = pixbuf_to_widget("/org/wireshark/image/toolbar/14x14/x-expert-error.png"); +#else icon = pixbuf_to_widget(expert_error_pb_data); +#endif gtk_list_store_set(GTK_LIST_STORE(model), &iter, COMPILE_ERROR, 1, SIGN, gtk_image_get_pixbuf(GTK_IMAGE(icon)), INAME, name, -1); } else { +#ifdef HAVE_GRESOURCE + icon = pixbuf_to_widget("/org/wireshark/image/expert_ok.png"); +#else icon = pixbuf_to_widget(expert_ok_pb_data); +#endif gtk_list_store_set(GTK_LIST_STORE(model), &iter, COMPILE_ERROR, 0, SIGN, gtk_image_get_pixbuf(GTK_IMAGE(icon)), INAME, name, -1); } g_hash_table_insert(compile_results, name, text); |