[gimp/soc-2012-unified-transformation] transformtool: use GimpFrame + GtkBox to group the options instead of just putting GtkLabel between



commit 3bb3e7ef11d4b0d579d6fb868e3f5d9df30ba7b2
Author: Mikael Magnusson <mikachu src gnome org>
Date:   Sun Aug 19 04:18:27 2012 +0200

    transformtool: use GimpFrame + GtkBox to group the options instead of just putting GtkLabel between them

 app/tools/gimptransformoptions.c |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/app/tools/gimptransformoptions.c b/app/tools/gimptransformoptions.c
index 8a5a20c..0aa1337 100644
--- a/app/tools/gimptransformoptions.c
+++ b/app/tools/gimptransformoptions.c
@@ -497,15 +497,25 @@ gimp_transform_options_gui (GimpToolOptions *tool_options)
       gchar     *label;
       gint       i;
 
+      frame = NULL;
+
       for (i = 0; i < G_N_ELEMENTS (opt_list); i++)
         {
+          if (!opt_list[i].name && !opt_list[i].desc)
+            {
+              frame = NULL;
+              continue;
+            }
+
           label = g_strdup_printf (opt_list[i].desc,
                                    gimp_get_mod_string (opt_list[i].mod));
 
           if (opt_list[i].name)
             {
               button = gimp_prop_check_button_new (config, opt_list[i].name, label);
-              gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
+              
+              gtk_box_pack_start (GTK_BOX (frame ? grid_box : vbox), button, FALSE, FALSE, 0);
+
               gtk_widget_show (button);
 
               label = g_strdup_printf (opt_list[i].tip,
@@ -515,9 +525,13 @@ gimp_transform_options_gui (GimpToolOptions *tool_options)
             }
           else
             {
-              button = gtk_label_new (label);
-              gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
-              gtk_widget_show (button);
+              frame = gimp_frame_new (label);
+              gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
+              gtk_widget_show (frame);
+
+              grid_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
+              gtk_container_add (GTK_CONTAINER (frame), grid_box);
+              gtk_widget_show (grid_box);
             }
 
           g_free (label);



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