[gimp] Bug 629436 - the current tool is not shown in the tool options dialog



commit ec7fc273d89be8652e31b2a2283b861b3710af36
Author: Martin Nordholts <martinn src gnome org>
Date:   Thu Sep 16 17:46:10 2010 +0200

    Bug 629436 - the current tool is not shown in the tool options dialog

 app/widgets/gimptooloptionseditor.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimptooloptionseditor.c b/app/widgets/gimptooloptionseditor.c
index 63154bd..5e16446 100644
--- a/app/widgets/gimptooloptionseditor.c
+++ b/app/widgets/gimptooloptionseditor.c
@@ -58,6 +58,7 @@ struct _GimpToolOptionsEditorPrivate
 
   GtkWidget       *scrolled_window;
   GtkWidget       *options_vbox;
+  GtkWidget       *title_label;
 
   GtkWidget       *save_button;
   GtkWidget       *restore_button;
@@ -157,6 +158,16 @@ gimp_tool_options_editor_init (GimpToolOptionsEditor *editor)
                               gimp_tool_options_editor_drop_tool,
                               editor);
 
+  /*  The label containing the tool options title */
+  editor->p->title_label = gtk_label_new (NULL);
+  gtk_misc_set_alignment (GTK_MISC (editor->p->title_label), 0.0, 0.0);
+  gtk_box_pack_start (GTK_BOX (editor),
+                      editor->p->title_label,
+                      FALSE /*expand*/,
+                      TRUE /*fill*/,
+                      0 /*padding*/);
+  gtk_widget_show (editor->p->title_label);
+
   editor->p->scrolled_window = gtk_scrolled_window_new (NULL, NULL);
   scrolled_window = GTK_SCROLLED_WINDOW (editor->p->scrolled_window);
 
@@ -521,6 +532,16 @@ gimp_tool_options_editor_tool_changed (GimpContext           *context,
 
   gimp_tool_options_editor_presets_update (editor, presets);
 
+  if (editor->p->title_label != NULL)
+    {
+      gchar *plain_title = gimp_docked_get_title (GIMP_DOCKED (editor));
+      gchar *title = g_strconcat ("<b>", plain_title, "</b>", NULL);
+      gtk_label_set_markup (GTK_LABEL (editor->p->title_label),
+                            title);
+      g_free (title);
+      g_free (plain_title);
+    }
+
   gimp_docked_title_changed (GIMP_DOCKED (editor));
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]