From 4688ae2eb7ef8477824b596743f4c717ee525913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= <rafael.carre@savoirfairelinux.com> Date: Fri, 26 Aug 2011 13:59:12 -0400 Subject: [PATCH] icons: cleanup --- gnome/src/icons/icon_factory.c | 15 ++++----------- gnome/src/icons/icon_factory.h | 18 ++++-------------- gnome/src/icons/pixmap_data.h | 7 +------ gnome/src/widget/imwidget.c | 3 +++ 4 files changed, 12 insertions(+), 31 deletions(-) diff --git a/gnome/src/icons/icon_factory.c b/gnome/src/icons/icon_factory.c index f0edd51d66..fc833625b0 100644 --- a/gnome/src/icons/icon_factory.c +++ b/gnome/src/icons/icon_factory.c @@ -32,6 +32,10 @@ #include "icons/pixmap_data.h" +#include <gtk/gtkiconfactory.h> +#include "icons/pixmap_data.h" +#include "sflphone_const.h" + static GtkIconFactory *icon_factory = NULL; void add_icon (GtkIconFactory *factory, const gchar *stock_id, const guint8 *icon_data, GtkIconSize size) @@ -60,12 +64,6 @@ void add_icon (GtkIconFactory *factory, const gchar *stock_id, const guint8 *ico DEBUG ("Icon %s already exists in factory\n", stock_id); } -GtkIconSet* lookup_sflphone_factory (const gchar *stock_id) -{ - - return gtk_icon_factory_lookup (icon_factory, stock_id); -} - void register_sflphone_stock_icons (GtkIconFactory *factory) { add_icon (factory, GTK_STOCK_PICKUP, gnome_stock_pickup, GTK_ICON_SIZE_SMALL_TOOLBAR); @@ -85,13 +83,8 @@ void register_sflphone_stock_icons (GtkIconFactory *factory) void init_icon_factory (void) { - // Init the factory icon_factory = gtk_icon_factory_new (); - - // Load icons register_sflphone_stock_icons (icon_factory); - - // Specify a default icon set gtk_icon_factory_add_default (icon_factory); } diff --git a/gnome/src/icons/icon_factory.h b/gnome/src/icons/icon_factory.h index ae8a453cad..2443cfca69 100644 --- a/gnome/src/icons/icon_factory.h +++ b/gnome/src/icons/icon_factory.h @@ -31,21 +31,15 @@ #ifndef ICON_FACTORY_H #define ICON_FACTORY_H -#include <gtk/gtkiconfactory.h> -#include "icons/pixmap_data.h" -#include "sflphone_const.h" - -G_BEGIN_DECLS - #define GTK_STOCK_PICKUP "gnome-stock-pickup" #define GTK_STOCK_HANGUP "gnome-stock-hangup" #define GTK_STOCK_ONHOLD "gnome-stock-onhold" #define GTK_STOCK_OFFHOLD "gnome-stock-offhold" #define GTK_STOCK_IM "gnome-stock-im" -#define GTK_STOCK_TRANSFER "gnome-stock-transfer" -#define GTK_STOCK_DIAL "gnome-stock-dial" -#define GTK_STOCK_CALL_CURRENT "gnome-stock-call-current" -#define GTK_STOCK_ADDRESSBOOK "gnome-stock-addressbook" +#define GTK_STOCK_TRANSFER "gnome-stock-transfer" +#define GTK_STOCK_DIAL "gnome-stock-dial" +#define GTK_STOCK_CALL_CURRENT "gnome-stock-call-current" +#define GTK_STOCK_ADDRESSBOOK "gnome-stock-addressbook" #define GTK_STOCK_CALLS "gnome-stock-calls" #define GTK_STOCK_SFLPHONE "gnome-stock-sflphone" #define GTK_STOCK_FAIL "gnome-stock-fail" @@ -53,8 +47,4 @@ G_BEGIN_DECLS void init_icon_factory (void); -GtkIconSet* lookup_sflphone_factory (const gchar *stock_id); - -G_END_DECLS - #endif diff --git a/gnome/src/icons/pixmap_data.h b/gnome/src/icons/pixmap_data.h index 248a226dc5..e1b8dd5122 100644 --- a/gnome/src/icons/pixmap_data.h +++ b/gnome/src/icons/pixmap_data.h @@ -31,7 +31,7 @@ #ifndef PIXMAP_DATA_H #define PIXMAP_DATA_H -G_BEGIN_DECLS +#include <glib.h> /* GdkPixbuf RGBA C-Source image dump */ @@ -2192,9 +2192,4 @@ static const guint8 gnome_stock_user[] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" }; - - - -G_END_DECLS - #endif diff --git a/gnome/src/widget/imwidget.c b/gnome/src/widget/imwidget.c index 093ed87ed5..c287e5ded6 100644 --- a/gnome/src/widget/imwidget.c +++ b/gnome/src/widget/imwidget.c @@ -34,6 +34,9 @@ #include <contacts/conferencelist.h> #include <JavaScriptCore/JavaScript.h> #include <gdk/gdkkeysyms.h> +#include <gtk/gtk.h> +#include "sflphone_const.h" + #define WEBKIT_DIR "file://" DATA_DIR "/webkit/" -- GitLab