[gimp] plug-ins: use gtk_window_set_icon_name() in the help browser
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: use gtk_window_set_icon_name() in the help browser
- Date: Sun, 29 Mar 2015 19:42:57 +0000 (UTC)
commit c90bcccd3a8282933a703e58bd8b2ecea5c2bfe6
Author: Michael Natterer <mitch gimp org>
Date: Sun Mar 29 21:42:03 2015 +0200
plug-ins: use gtk_window_set_icon_name() in the help browser
instead of loading all icons from the theme manually and setting them
as icon_list-.
plug-ins/help-browser/dialog.c | 24 +-----------------------
1 files changed, 1 insertions(+), 23 deletions(-)
---
diff --git a/plug-ins/help-browser/dialog.c b/plug-ins/help-browser/dialog.c
index 42447ae..60b9edd 100644
--- a/plug-ins/help-browser/dialog.c
+++ b/plug-ins/help-browser/dialog.c
@@ -104,8 +104,6 @@ static void website_callback (GtkAction *action,
static void update_actions (void);
-static void window_set_icons (GtkWidget *window);
-
static void row_activated (GtkTreeView *tree_view,
GtkTreePath *path,
GtkTreeViewColumn *column);
@@ -181,6 +179,7 @@ browser_dialog_open (const gchar *plug_in_binary)
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), _("GIMP Help Browser"));
gtk_window_set_role (GTK_WINDOW (window), plug_in_binary);
+ gtk_window_set_icon_name (GTK_WINDOW (window), GIMP_STOCK_USER_MANUAL);
gtk_window_set_default_size (GTK_WINDOW (window), data.width, data.height);
@@ -188,8 +187,6 @@ browser_dialog_open (const gchar *plug_in_binary)
G_CALLBACK (gtk_main_quit),
NULL);
- window_set_icons (window);
-
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_widget_show (vbox);
@@ -333,25 +330,6 @@ browser_dialog_load (const gchar *uri)
}
static void
-window_set_icons (GtkWidget *window)
-{
- GtkIconTheme *theme = gtk_icon_theme_get_default ();
- gint sizes[] = { 16, 24, 32, 64 };
- GList *list = NULL;
- gint i;
-
- for (i = 0; i < G_N_ELEMENTS (sizes); i++)
- list = g_list_prepend (list,
- gtk_icon_theme_load_icon (theme,
- GIMP_STOCK_USER_MANUAL,
- sizes[i], 0, NULL));
-
- gtk_window_set_icon_list (GTK_WINDOW (window), list);
-
- g_list_free_full (list, (GDestroyNotify) g_object_unref);
-}
-
-static void
browser_dialog_make_index_foreach (const gchar *help_id,
GimpHelpItem *item,
GimpHelpLocale *locale)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]