From d9e5024a5c056087bbf1a0c6bc255768e7ff9ef1 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Tue, 14 Oct 2003 16:29:33 +0000 Subject: [PATCH] set the initial stock icon on the viewable-button. 2003-10-14 Sven Neumann * app/widgets/gimptemplateeditor.c (gimp_template_editor_new): set the initial stock icon on the viewable-button. --- ChangeLog | 5 +++++ app/widgets/gimptemplateeditor.c | 16 +++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 25b860348c..c3b7c25b71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-10-14 Sven Neumann + + * app/widgets/gimptemplateeditor.c (gimp_template_editor_new): + set the initial stock icon on the viewable-button. + 2003-10-14 Helvetix Victorinox * app/composite/gimp-composite-generic.c diff --git a/app/widgets/gimptemplateeditor.c b/app/widgets/gimptemplateeditor.c index 9c989ec2d7..263f484baa 100644 --- a/app/widgets/gimptemplateeditor.c +++ b/app/widgets/gimptemplateeditor.c @@ -513,11 +513,14 @@ gimp_template_editor_new (GimpTemplate *template, if (edit_template) { - GtkWidget *table; - GtkWidget *entry; - GtkWidget *button; - GSList *stock_list; - GSList *list; + GtkWidget *table; + GtkWidget *entry; + GtkWidget *button; + GSList *stock_list; + GSList *list; + const gchar *stock_id; + + stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (editor->template)); editor->stock_id_container = gimp_list_new (GIMP_TYPE_TEMPLATE, GIMP_CONTAINER_POLICY_STRONG); @@ -538,6 +541,9 @@ gimp_template_editor_new (GimpTemplate *template, gimp_container_add (editor->stock_id_container, object); g_object_unref (object); + + if (strcmp (list->data, stock_id) == 0) + gimp_context_set_template (editor->stock_id_context, object); } g_slist_foreach (stock_list, (GFunc) g_free, NULL);