[glade] GladeButtonEditor: Reworked UI



commit a4e96be158099470eb31eb09e85878b1f4784a7f
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sat Apr 20 19:04:33 2013 +0900

    GladeButtonEditor: Reworked UI

 plugins/gtk+/glade-button-editor.c  | 145 ++++------
 plugins/gtk+/glade-button-editor.ui | 563 ++++++++++++++++--------------------
 2 files changed, 315 insertions(+), 393 deletions(-)
---
diff --git a/plugins/gtk+/glade-button-editor.c b/plugins/gtk+/glade-button-editor.c
index f40d2a6..62ffead 100644
--- a/plugins/gtk+/glade-button-editor.c
+++ b/plugins/gtk+/glade-button-editor.c
@@ -33,7 +33,6 @@ static void glade_button_editor_editable_init (GladeEditableIface * iface);
 
 static void glade_button_editor_grab_focus (GtkWidget * widget);
 
-static void standard_toggled (GtkWidget * widget, GladeButtonEditor * button_editor);
 static void custom_toggled (GtkWidget * widget, GladeButtonEditor * button_editor);
 static void stock_toggled (GtkWidget * widget, GladeButtonEditor * button_editor);
 static void label_toggled (GtkWidget * widget, GladeButtonEditor * button_editor);
@@ -53,7 +52,6 @@ struct _GladeButtonEditorPrivate
 
   /* Button */
   GtkWidget *content_label;
-  GtkWidget *content_frame;
 
   GtkWidget *relief_label;
   GtkWidget *relief_shell;
@@ -61,8 +59,7 @@ struct _GladeButtonEditorPrivate
   GtkWidget *response_label;
   GtkWidget *response_shell;
 
-  GtkWidget *standard_radio; /* Use standard properties to layout a button */
-  GtkWidget *custom_radio;   /* Use a placeholder in the button */
+  GtkWidget *custom_check;   /* Use a placeholder in the button */
 
   /* Available in standard mode: */
   GtkWidget *stock_radio;    /* Create the button using the stock (Available: stock, image-position) */
@@ -92,7 +89,6 @@ glade_button_editor_class_init (GladeButtonEditorClass * klass)
   object_class->finalize = glade_button_editor_finalize;
   widget_class->grab_focus = glade_button_editor_grab_focus;
 
-
   gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/gladegtk/glade-button-editor.ui");
 
   gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, embed);
@@ -101,21 +97,18 @@ glade_button_editor_class_init (GladeButtonEditorClass * klass)
   gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, response_label);
   gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, response_shell);
   gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, content_label);
-  gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, content_frame);
   gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, group_shell);
   gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, group_label);
   gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, active_shell);
   gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, inconsistent_shell);
   gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, draw_indicator_shell);
-  gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, standard_radio);
-  gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, custom_radio);
+  gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, custom_check);
   gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, stock_radio);
   gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, label_radio);
   gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, standard_frame);
   gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, stock_frame);
   gtk_widget_class_bind_child (widget_class, GladeButtonEditorPrivate, label_frame);
 
-  gtk_widget_class_bind_callback (widget_class, standard_toggled);
   gtk_widget_class_bind_callback (widget_class, custom_toggled);
   gtk_widget_class_bind_callback (widget_class, stock_toggled);
   gtk_widget_class_bind_callback (widget_class, label_toggled);
@@ -168,8 +161,9 @@ glade_button_editor_load (GladeEditable * editable, GladeWidget * widget)
       gtk_widget_set_visible (priv->group_label, is_radio);
       gtk_widget_set_visible (priv->group_shell, is_radio);
 
-      gtk_widget_set_visible (priv->content_label, !is_menu);
-      gtk_widget_set_visible (priv->content_frame, !is_menu);
+      gtk_widget_set_visible (priv->content_label,  !is_menu);
+      gtk_widget_set_visible (priv->custom_check,   !is_menu);
+      gtk_widget_set_visible (priv->standard_frame, !is_menu);
     }
 
   /* Chain up to default implementation */
@@ -187,15 +181,13 @@ glade_button_editor_load (GladeEditable * editable, GladeWidget * widget)
         {
           /* Custom */
           gtk_widget_set_sensitive (priv->standard_frame, FALSE);
-          gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
-                                        (priv->custom_radio), TRUE);
+          gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->custom_check), TRUE);
         }
       else
         {
           /* Standard */
           gtk_widget_set_sensitive (priv->standard_frame, TRUE);
-          gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
-                                        (priv->standard_radio), TRUE);
+          gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->custom_check), FALSE);
 
           glade_widget_property_get (widget, "use-stock", &use_stock);
 
@@ -239,101 +231,84 @@ glade_button_editor_grab_focus (GtkWidget * widget)
   gtk_widget_grab_focus (button_editor->priv->embed);
 }
 
-/* Secion control radio button callbacks: */
+/* Section control radio/check button callbacks: */
 static void
-standard_toggled (GtkWidget * widget, GladeButtonEditor * button_editor)
+custom_toggled (GtkWidget * widget, GladeButtonEditor * button_editor)
 {
   GladeProperty *property;
-  GladeWidget *gchild = NULL, *gwidget;
-  GtkWidget *child, *button;
-  GValue value = { 0, };
-
-  gwidget = glade_editable_loaded_widget (GLADE_EDITABLE (button_editor));
+  GladeWidget *gwidget = glade_editable_loaded_widget (GLADE_EDITABLE (button_editor));
+  gboolean active;
 
   if (glade_editable_loading (GLADE_EDITABLE (button_editor)) || !gwidget)
     return;
 
-  if (!gtk_toggle_button_get_active
-      (GTK_TOGGLE_BUTTON (button_editor->priv->standard_radio)))
-    return;
+  active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button_editor->priv->custom_check));
 
   glade_editable_block (GLADE_EDITABLE (button_editor));
 
-  glade_command_push_group (_("Setting %s to use standard configuration"),
-                            glade_widget_get_name (gwidget));
-
-  /* If theres a widget customly inside... command remove it first... */
-  button = GTK_WIDGET (glade_widget_get_object (gwidget));
-  child = gtk_bin_get_child (GTK_BIN (button));
-  if (child)
-    gchild = glade_widget_get_from_gobject (child);
-
-  if (gchild && glade_widget_get_parent (gchild) == gwidget)
+  if (active)
     {
-      GList widgets = { 0, };
-      widgets.data = gchild;
-      glade_command_delete (&widgets);
-    }
-
-  property = glade_widget_get_property (gwidget, "custom-child");
-  glade_command_set_property (property, FALSE);
+      glade_command_push_group (_("Setting %s to use a custom child"),
+                               glade_widget_get_name (gwidget));
 
-  /* Setup reasonable defaults for button label. */
-  property = glade_widget_get_property (gwidget, "stock");
-  glade_command_set_property (property, NULL);
-
-  property = glade_widget_get_property (gwidget, "use-stock");
-  glade_command_set_property (property, FALSE);
-
-  property = glade_widget_get_property (gwidget, "label");
-  glade_property_get_default (property, &value);
-  glade_command_set_property_value (property, &value);
-  g_value_unset (&value);
+      /* clear out some things... */
+      property = glade_widget_get_property (gwidget, "image");
+      glade_command_set_property (property, NULL);
 
-  glade_command_pop_group ();
+      property = glade_widget_get_property (gwidget, "use-stock");
+      glade_command_set_property (property, FALSE);
 
-  glade_editable_unblock (GLADE_EDITABLE (button_editor));
-
-  /* reload buttons and sensitivity and stuff... */
-  glade_editable_load (GLADE_EDITABLE (button_editor), gwidget);
-}
+      property = glade_widget_get_property (gwidget, "stock");
+      glade_command_set_property (property, NULL);
 
-static void
-custom_toggled (GtkWidget * widget, GladeButtonEditor * button_editor)
-{
-  GladeProperty *property;
-  GladeWidget *gwidget = glade_editable_loaded_widget (GLADE_EDITABLE (button_editor));
+      property = glade_widget_get_property (gwidget, "label");
+      glade_command_set_property (property, NULL);
 
-  if (glade_editable_loading (GLADE_EDITABLE (button_editor)) || !gwidget)
-    return;
+      /* Add a placeholder via the custom-child property... */
+      property = glade_widget_get_property (gwidget, "custom-child");
+      glade_command_set_property (property, TRUE);
 
-  if (!gtk_toggle_button_get_active
-      (GTK_TOGGLE_BUTTON (button_editor->priv->custom_radio)))
-    return;
+      glade_command_pop_group ();
+    }
+  else
+    {
+      GtkWidget *button, *child;
+      GladeWidget *gchild = NULL;
+      GValue value = { 0, };
 
-  glade_editable_block (GLADE_EDITABLE (button_editor));
+      glade_command_push_group (_("Setting %s to use standard configuration"),
+                               glade_widget_get_name (gwidget));
 
-  glade_command_push_group (_("Setting %s to use a custom child"),
-                            glade_widget_get_name (gwidget));
+      /* If theres a widget customly inside... command remove it first... */
+      button = GTK_WIDGET (glade_widget_get_object (gwidget));
+      child = gtk_bin_get_child (GTK_BIN (button));
+      if (child)
+       gchild = glade_widget_get_from_gobject (child);
 
-  /* clear out some things... */
-  property = glade_widget_get_property (gwidget, "image");
-  glade_command_set_property (property, NULL);
+      if (gchild && glade_widget_get_parent (gchild) == gwidget)
+       {
+         GList widgets = { 0, };
+         widgets.data = gchild;
+         glade_command_delete (&widgets);
+       }
 
-  property = glade_widget_get_property (gwidget, "use-stock");
-  glade_command_set_property (property, FALSE);
+      property = glade_widget_get_property (gwidget, "custom-child");
+      glade_command_set_property (property, FALSE);
 
-  property = glade_widget_get_property (gwidget, "stock");
-  glade_command_set_property (property, NULL);
+      /* Setup reasonable defaults for button label. */
+      property = glade_widget_get_property (gwidget, "stock");
+      glade_command_set_property (property, NULL);
 
-  property = glade_widget_get_property (gwidget, "label");
-  glade_command_set_property (property, NULL);
+      property = glade_widget_get_property (gwidget, "use-stock");
+      glade_command_set_property (property, FALSE);
 
-  /* Add a placeholder via the custom-child property... */
-  property = glade_widget_get_property (gwidget, "custom-child");
-  glade_command_set_property (property, TRUE);
+      property = glade_widget_get_property (gwidget, "label");
+      glade_property_get_default (property, &value);
+      glade_command_set_property_value (property, &value);
+      g_value_unset (&value);
 
-  glade_command_pop_group ();
+      glade_command_pop_group ();
+    }
 
   glade_editable_unblock (GLADE_EDITABLE (button_editor));
 
diff --git a/plugins/gtk+/glade-button-editor.ui b/plugins/gtk+/glade-button-editor.ui
index cf1dab9..bc60b64 100644
--- a/plugins/gtk+/glade-button-editor.ui
+++ b/plugins/gtk+/glade-button-editor.ui
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface domain="glade">
-  <!-- interface-requires gtk+ 3.8 -->
   <!-- interface-requires gladeui 0.0 -->
+  <!-- interface-requires gtk+ 3.8 -->
   <!-- interface-requires glade-gtk-plugin 0.0 -->
   <template class="GladeButtonEditor" parent="GladeEditorSkeleton">
     <property name="visible">True</property>
@@ -12,7 +12,6 @@
       <object class="GtkGrid" id="attributes_grid">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="halign">start</property>
         <property name="row_spacing">6</property>
         <property name="column_spacing">6</property>
         <child>
@@ -299,336 +298,284 @@
           </packing>
         </child>
         <child>
-          <object class="GtkFrame" id="content_frame">
+          <object class="GtkCheckButton" id="custom_check">
+            <property name="label" translatable="yes">Add custom content</property>
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="margin_left">12</property>
+            <property name="xalign">0</property>
+            <property name="draw_indicator">True</property>
+            <signal name="toggled" handler="custom_toggled" swapped="no"/>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">11</property>
+            <property name="width">4</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="standard_frame">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="label_xalign">0</property>
-            <property name="shadow_type">none</property>
+            <property name="margin_left">12</property>
+            <property name="hexpand">True</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">8</property>
             <child>
-              <object class="GtkBox" id="box1">
+              <object class="GtkRadioButton" id="stock_radio">
+                <property name="label" translatable="yes">Stock Button</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="xalign">0</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+                <signal name="toggled" handler="stock_toggled" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkGrid" id="stock_frame">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="orientation">vertical</property>
+                <property name="margin_left">12</property>
+                <property name="hexpand">True</property>
+                <property name="row_spacing">6</property>
+                <property name="column_spacing">6</property>
                 <child>
-                  <object class="GtkFrame" id="standard">
+                  <object class="GladePropertyLabel" id="propertylabel1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="margin_left">10</property>
-                    <property name="margin_top">4</property>
-                    <property name="label_xalign">0</property>
-                    <property name="shadow_type">none</property>
-                    <child>
-                      <object class="GtkBox" id="standard_frame">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="halign">start</property>
-                        <property name="margin_left">12</property>
-                        <property name="margin_top">6</property>
-                        <property name="hexpand">True</property>
-                        <property name="orientation">vertical</property>
-                        <property name="spacing">8</property>
-                        <child>
-                          <object class="GtkFrame" id="stock">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="hexpand">True</property>
-                            <property name="label_xalign">0</property>
-                            <property name="shadow_type">none</property>
-                            <child>
-                              <object class="GtkGrid" id="stock_frame">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="margin_left">24</property>
-                                <property name="margin_top">6</property>
-                                <property name="hexpand">True</property>
-                                <property name="row_spacing">6</property>
-                                <property name="column_spacing">6</property>
-                                <child>
-                                  <object class="GladePropertyLabel" id="propertylabel1">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="hexpand">False</property>
-                                    <property name="property_name">stock</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">0</property>
-                                    <property name="width">1</property>
-                                    <property name="height">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GladePropertyLabel" id="propertylabel2">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="hexpand">False</property>
-                                    <property name="property_name">image-position</property>
-                                    <property name="custom_text" translatable="yes">Position</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">1</property>
-                                    <property name="width">1</property>
-                                    <property name="height">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GladePropertyShell" id="propertyshell2">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="hexpand">True</property>
-                                    <property name="property_name">image-position</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="top_attach">1</property>
-                                    <property name="width">1</property>
-                                    <property name="height">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GladePropertyShell" id="propertyshell1">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="hexpand">True</property>
-                                    <property name="property_name">stock</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="top_attach">0</property>
-                                    <property name="width">2</property>
-                                    <property name="height">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GladePropertyShell" id="propertyshell8">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="halign">start</property>
-                                    <property name="property_name">always-show-image</property>
-                                    <property name="editor_type">GladeEpropCheck</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">2</property>
-                                    <property name="top_attach">1</property>
-                                    <property name="width">1</property>
-                                    <property name="height">1</property>
-                                  </packing>
-                                </child>
-                              </object>
-                            </child>
-                            <child type="label">
-                              <object class="GtkRadioButton" id="stock_radio">
-                                <property name="label" translatable="yes">Stock Button</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="xalign">0</property>
-                                <property name="active">True</property>
-                                <property name="draw_indicator">True</property>
-                                <signal name="toggled" handler="stock_toggled" swapped="no"/>
-                              </object>
-                            </child>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkFrame" id="frame2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="hexpand">True</property>
-                            <property name="label_xalign">0</property>
-                            <property name="shadow_type">none</property>
-                            <child>
-                              <object class="GtkGrid" id="label_frame">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="margin_left">24</property>
-                                <property name="margin_top">6</property>
-                                <property name="hexpand">True</property>
-                                <property name="row_spacing">6</property>
-                                <property name="column_spacing">6</property>
-                                <child>
-                                  <object class="GladePropertyShell" id="propertyshell3">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="hexpand">True</property>
-                                    <property name="property_name">label</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">0</property>
-                                    <property name="width">4</property>
-                                    <property name="height">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GladePropertyLabel" id="propertylabel5">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="halign">start</property>
-                                    <property name="hexpand">False</property>
-                                    <property name="property_name">image</property>
-                                    <property name="custom_text" translatable="yes">Image:</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">1</property>
-                                    <property name="width">1</property>
-                                    <property name="height">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GladePropertyShell" id="propertyshell5">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="hexpand">True</property>
-                                    <property name="property_name">image</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="top_attach">1</property>
-                                    <property name="width">1</property>
-                                    <property name="height">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GladePropertyShell" id="propertyshell6">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="hexpand">True</property>
-                                    <property name="property_name">image-position</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="top_attach">2</property>
-                                    <property name="width">1</property>
-                                    <property name="height">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GladePropertyLabel" id="propertylabel6">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="halign">start</property>
-                                    <property name="hexpand">False</property>
-                                    <property name="property_name">image-position</property>
-                                    <property name="custom_text" translatable="yes">Position:</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">2</property>
-                                    <property name="width">1</property>
-                                    <property name="height">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GladePropertyShell" id="propertyshell4">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="property_name">use-underline</property>
-                                    <property name="editor_type">GladeEpropCheck</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">2</property>
-                                    <property name="top_attach">1</property>
-                                    <property name="width">1</property>
-                                    <property name="height">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GladePropertyShell" id="propertyshell7">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="property_name">always-show-image</property>
-                                    <property name="editor_type">GladeEpropCheck</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">2</property>
-                                    <property name="top_attach">2</property>
-                                    <property name="width">1</property>
-                                    <property name="height">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                              </object>
-                            </child>
-                            <child type="label">
-                              <object class="GtkRadioButton" id="label_radio">
-                                <property name="label" translatable="yes">Label with optional 
image</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="xalign">0</property>
-                                <property name="draw_indicator">True</property>
-                                <property name="group">stock_radio</property>
-                                <signal name="toggled" handler="label_toggled" swapped="no"/>
-                              </object>
-                            </child>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </object>
-                    </child>
-                    <child type="label">
-                      <object class="GtkRadioButton" id="standard_radio">
-                        <property name="label" translatable="yes">Configure Button Content</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="xalign">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                        <signal name="toggled" handler="standard_toggled" swapped="no"/>
-                      </object>
-                    </child>
+                    <property name="hexpand">False</property>
+                    <property name="property_name">stock</property>
                   </object>
                   <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="custom_radio">
-                    <property name="label" translatable="yes">Add custom button content</property>
+                  <object class="GladePropertyLabel" id="propertylabel2">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="margin_left">12</property>
-                    <property name="xalign">0</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="group">standard_radio</property>
-                    <signal name="toggled" handler="custom_toggled" swapped="no"/>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">False</property>
+                    <property name="property_name">image-position</property>
+                    <property name="custom_text" translatable="yes">Position</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GladePropertyShell" id="propertyshell2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">False</property>
+                    <property name="property_name">image-position</property>
                   </object>
                   <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
                   </packing>
                 </child>
+                <child>
+                  <object class="GladePropertyShell" id="propertyshell1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="property_name">stock</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">3</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GladePropertyShell" id="propertyshell8">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="property_name">always-show-image</property>
+                    <property name="editor_type">GladeEpropCheck</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
               </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
             </child>
-            <child type="label_item">
-              <placeholder/>
+            <child>
+              <object class="GtkRadioButton" id="label_radio">
+                <property name="label" translatable="yes">Label with optional image</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="xalign">0</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">stock_radio</property>
+                <signal name="toggled" handler="label_toggled" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkGrid" id="label_frame">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">12</property>
+                <property name="hexpand">True</property>
+                <property name="row_spacing">6</property>
+                <property name="column_spacing">6</property>
+                <child>
+                  <object class="GladePropertyShell" id="propertyshell3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="property_name">label</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">4</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GladePropertyLabel" id="propertylabel5">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="hexpand">False</property>
+                    <property name="property_name">image</property>
+                    <property name="custom_text" translatable="yes">Image:</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GladePropertyShell" id="propertyshell5">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">False</property>
+                    <property name="property_name">image</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GladePropertyShell" id="propertyshell6">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">False</property>
+                    <property name="property_name">image-position</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GladePropertyLabel" id="propertylabel6">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="hexpand">False</property>
+                    <property name="property_name">image-position</property>
+                    <property name="custom_text" translatable="yes">Position:</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GladePropertyShell" id="propertyshell4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="property_name">use-underline</property>
+                    <property name="editor_type">GladeEpropCheck</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GladePropertyShell" id="propertyshell7">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="property_name">always-show-image</property>
+                    <property name="editor_type">GladeEpropCheck</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
             </child>
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">11</property>
+            <property name="top_attach">12</property>
             <property name="width">4</property>
             <property name="height">1</property>
           </packing>



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