[glade] Ported GladeToolButtonEditor to use a composite widget template



commit 5f894ab11196dd45c74d4874407be78b7e7e8615
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sun Apr 28 18:47:44 2013 +0900

    Ported GladeToolButtonEditor to use a composite widget template

 plugins/gtk+/Makefile.am                       |    1 +
 plugins/gtk+/glade-gtk-resources.gresource.xml |    1 +
 plugins/gtk+/glade-gtk.c                       |   37 +-
 plugins/gtk+/glade-tool-button-editor.c        |  308 ++++-----------
 plugins/gtk+/glade-tool-button-editor.h        |   29 +-
 plugins/gtk+/glade-tool-button-editor.ui       |  494 ++++++++++++++++++++++++
 plugins/gtk+/gtk+.xml.in                       |   16 +-
 po/POTFILES.in                                 |    1 +
 8 files changed, 615 insertions(+), 272 deletions(-)
---
diff --git a/plugins/gtk+/Makefile.am b/plugins/gtk+/Makefile.am
index 127ab63..4e807c3 100644
--- a/plugins/gtk+/Makefile.am
+++ b/plugins/gtk+/Makefile.am
@@ -106,6 +106,7 @@ UI_FILES =                          \
        glade-entry-editor.ui           \
        glade-image-editor.ui           \
        glade-label-editor.ui           \
+       glade-tool-button-editor.ui     \
        glade-widget-editor.ui
 
 EXTRA_DIST =                                   \
diff --git a/plugins/gtk+/glade-gtk-resources.gresource.xml b/plugins/gtk+/glade-gtk-resources.gresource.xml
index 16380e4..8b51fc6 100644
--- a/plugins/gtk+/glade-gtk-resources.gresource.xml
+++ b/plugins/gtk+/glade-gtk-resources.gresource.xml
@@ -6,6 +6,7 @@
     <file compressed="true" preprocess="xml-stripblanks">glade-entry-editor.ui</file>
     <file compressed="true" preprocess="xml-stripblanks">glade-image-editor.ui</file>
     <file compressed="true" preprocess="xml-stripblanks">glade-label-editor.ui</file>
+    <file compressed="true" preprocess="xml-stripblanks">glade-tool-button-editor.ui</file>
     <file compressed="true" preprocess="xml-stripblanks">glade-widget-editor.ui</file>
   </gresource>
 </gresources>
diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c
index a443b99..9c9beec 100644
--- a/plugins/gtk+/glade-gtk.c
+++ b/plugins/gtk+/glade-gtk.c
@@ -5975,16 +5975,10 @@ GladeEditable *
 glade_gtk_tool_button_create_editable (GladeWidgetAdaptor * adaptor,
                                        GladeEditorPageType type)
 {
-  GladeEditable *editable;
-
-  /* Get base editable */
-  editable =
-      GWA_GET_CLASS (GTK_TYPE_TOOL_ITEM)->create_editable (adaptor, type);
-
   if (type == GLADE_PAGE_GENERAL)
-    return (GladeEditable *) glade_tool_button_editor_new (adaptor, editable);
-
-  return editable;
+    return (GladeEditable *) glade_tool_button_editor_new ();
+  else
+    return GWA_GET_CLASS (GTK_TYPE_TOOL_ITEM)->create_editable (adaptor, type);
 }
 
 static void
@@ -5995,12 +5989,9 @@ glade_gtk_tool_button_set_image_mode (GObject * object, const GValue * value)
   g_return_if_fail (GTK_IS_TOOL_BUTTON (object));
   gbutton = glade_widget_get_from_gobject (object);
 
-  glade_widget_property_set_sensitive (gbutton, "stock-id", FALSE,
-                                       NOT_SELECTED_MSG);
-  glade_widget_property_set_sensitive (gbutton, "icon-name", FALSE,
-                                       NOT_SELECTED_MSG);
-  glade_widget_property_set_sensitive (gbutton, "icon-widget", FALSE,
-                                       NOT_SELECTED_MSG);
+  glade_widget_property_set_sensitive (gbutton, "stock-id", FALSE, NOT_SELECTED_MSG);
+  glade_widget_property_set_sensitive (gbutton, "icon-name", FALSE, NOT_SELECTED_MSG);
+  glade_widget_property_set_sensitive (gbutton, "icon-widget", FALSE, NOT_SELECTED_MSG);
 
   switch (g_value_get_int (value))
     {
@@ -6011,8 +6002,7 @@ glade_gtk_tool_button_set_image_mode (GObject * object, const GValue * value)
         glade_widget_property_set_sensitive (gbutton, "icon-name", TRUE, NULL);
         break;
       case GLADE_TB_MODE_CUSTOM:
-        glade_widget_property_set_sensitive (gbutton, "icon-widget", TRUE,
-                                             NULL);
+        glade_widget_property_set_sensitive (gbutton, "icon-widget", TRUE, NULL);
         break;
       default:
         break;
@@ -6028,15 +6018,18 @@ glade_gtk_tool_button_set_custom_label (GObject * object, const GValue * value)
   g_return_if_fail (GTK_IS_TOOL_BUTTON (object));
   gbutton = glade_widget_get_from_gobject (object);
 
-  glade_widget_property_set_sensitive (gbutton, "label", FALSE,
-                                       NOT_SELECTED_MSG);
-  glade_widget_property_set_sensitive (gbutton, "label-widget", FALSE,
-                                       NOT_SELECTED_MSG);
+  glade_widget_property_set_sensitive (gbutton, "label", FALSE, NOT_SELECTED_MSG);
+  glade_widget_property_set_sensitive (gbutton, "label-widget", FALSE, NOT_SELECTED_MSG);
+  glade_widget_property_set_sensitive (gbutton, "use-underline", FALSE,
+                                       _("This property only applies when configuring the label with text"));
 
   if (g_value_get_boolean (value))
     glade_widget_property_set_sensitive (gbutton, "label-widget", TRUE, NULL);
   else
-    glade_widget_property_set_sensitive (gbutton, "label", TRUE, NULL);
+    {
+      glade_widget_property_set_sensitive (gbutton, "label", TRUE, NULL);
+      glade_widget_property_set_sensitive (gbutton, "use-underline", TRUE, NULL);
+    }
 }
 
 static void
diff --git a/plugins/gtk+/glade-tool-button-editor.c b/plugins/gtk+/glade-tool-button-editor.c
index 9e612a2..b4fe382 100644
--- a/plugins/gtk+/glade-tool-button-editor.c
+++ b/plugins/gtk+/glade-tool-button-editor.c
@@ -27,17 +27,41 @@
 #include "glade-tool-button-editor.h"
 
 
-static void glade_tool_button_editor_finalize (GObject * object);
-
 static void glade_tool_button_editor_editable_init (GladeEditableIface * iface);
+static void glade_tool_button_editor_grab_focus    (GtkWidget * widget);
+
+/* Callbacks */
+static void standard_label_toggled (GtkWidget             *widget,
+                                   GladeToolButtonEditor *button_editor);
+static void custom_label_toggled   (GtkWidget             *widget,
+                                   GladeToolButtonEditor *button_editor);
+static void stock_toggled          (GtkWidget             *widget,
+                                   GladeToolButtonEditor *button_editor);
+static void icon_toggled           (GtkWidget             *widget,
+                                   GladeToolButtonEditor *button_editor);
+static void custom_toggled         (GtkWidget             *widget,
+                                   GladeToolButtonEditor *button_editor);
+
+struct _GladeToolButtonEditorPrivate
+{
+  GtkWidget *embed;           /* Embedded activatable editor */
 
-static void glade_tool_button_editor_grab_focus (GtkWidget * widget);
+  GtkWidget *standard_label_radio; /* Set label with label property */
+  GtkWidget *custom_label_radio;   /* Set a widget to be placed as the tool button's label */
 
+  GtkWidget *stock_radio;    /* Create the image from stock-id */
+  GtkWidget *icon_radio;     /* Create the image with the icon theme */
+  GtkWidget *custom_radio;   /* Set a widget to be used in the image position */
+
+  /* Subclass specific stuff */
+  GtkWidget *toggle_active_editor;
+  GtkWidget *radio_group_label;
+  GtkWidget *radio_group_editor;
+};
 
 static GladeEditableIface *parent_editable_iface;
 
-G_DEFINE_TYPE_WITH_CODE (GladeToolButtonEditor, glade_tool_button_editor,
-                         GTK_TYPE_VBOX,
+G_DEFINE_TYPE_WITH_CODE (GladeToolButtonEditor, glade_tool_button_editor, GLADE_TYPE_EDITOR_SKELETON,
                          G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE,
                                                 glade_tool_button_editor_editable_init));
 
@@ -47,76 +71,81 @@ glade_tool_button_editor_class_init (GladeToolButtonEditorClass * klass)
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
-  object_class->finalize = glade_tool_button_editor_finalize;
   widget_class->grab_focus = glade_tool_button_editor_grab_focus;
+
+  gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/gladegtk/glade-tool-button-editor.ui");
+
+  gtk_widget_class_bind_child (widget_class, GladeToolButtonEditorPrivate, embed);
+  gtk_widget_class_bind_child (widget_class, GladeToolButtonEditorPrivate, standard_label_radio);
+  gtk_widget_class_bind_child (widget_class, GladeToolButtonEditorPrivate, custom_label_radio);
+  gtk_widget_class_bind_child (widget_class, GladeToolButtonEditorPrivate, stock_radio);
+  gtk_widget_class_bind_child (widget_class, GladeToolButtonEditorPrivate, icon_radio);
+  gtk_widget_class_bind_child (widget_class, GladeToolButtonEditorPrivate, custom_radio);
+  gtk_widget_class_bind_child (widget_class, GladeToolButtonEditorPrivate, toggle_active_editor);
+  gtk_widget_class_bind_child (widget_class, GladeToolButtonEditorPrivate, radio_group_label);
+  gtk_widget_class_bind_child (widget_class, GladeToolButtonEditorPrivate, radio_group_editor);
+
+  gtk_widget_class_bind_callback (widget_class, standard_label_toggled);
+  gtk_widget_class_bind_callback (widget_class, custom_label_toggled);
+  gtk_widget_class_bind_callback (widget_class, stock_toggled);
+  gtk_widget_class_bind_callback (widget_class, icon_toggled);
+  gtk_widget_class_bind_callback (widget_class, custom_toggled);
+
+  g_type_class_add_private (object_class, sizeof (GladeToolButtonEditorPrivate));  
 }
 
 static void
 glade_tool_button_editor_init (GladeToolButtonEditor * self)
 {
+  self->priv = 
+    G_TYPE_INSTANCE_GET_PRIVATE (self,
+                                GLADE_TYPE_TOOL_BUTTON_EDITOR,
+                                GladeToolButtonEditorPrivate);
+
+  gtk_widget_init_template (GTK_WIDGET (self));
 }
 
 static void
 glade_tool_button_editor_load (GladeEditable * editable, GladeWidget * widget)
 {
   GladeToolButtonEditor *button_editor = GLADE_TOOL_BUTTON_EDITOR (editable);
-  gboolean custom_label = FALSE, use_appearance = FALSE;
+  GladeToolButtonEditorPrivate *priv = button_editor->priv;
   GladeToolButtonImageMode image_mode = 0;
-  GList *l;
+  gboolean custom_label = FALSE;
 
   /* Chain up to default implementation */
   parent_editable_iface->load (editable, widget);
 
-  /* load the embedded editable... */
-  if (button_editor->embed)
-    glade_editable_load (GLADE_EDITABLE (button_editor->embed), widget);
-
-  for (l = button_editor->properties; l; l = l->next)
-    glade_editor_property_load_by_widget (GLADE_EDITOR_PROPERTY (l->data),
-                                          widget);
-
   if (widget)
     {
+      GObject *object = glade_widget_get_object (widget);
+
       glade_widget_property_get (widget, "image-mode", &image_mode);
       glade_widget_property_get (widget, "custom-label", &custom_label);
-      glade_widget_property_get (widget, "use-action-appearance",
-                                 &use_appearance);
 
       if (custom_label)
-        gtk_toggle_button_set_active
-            (GTK_TOGGLE_BUTTON (button_editor->custom_label_radio), TRUE);
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->custom_label_radio), TRUE);
       else
-        gtk_toggle_button_set_active
-            (GTK_TOGGLE_BUTTON (button_editor->standard_label_radio), TRUE);
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->standard_label_radio), TRUE);
 
       switch (image_mode)
         {
           case GLADE_TB_MODE_STOCK:
-            gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
-                                          (button_editor->stock_radio), TRUE);
+            gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->stock_radio), TRUE);
             break;
           case GLADE_TB_MODE_ICON:
-            gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
-                                          (button_editor->icon_radio), TRUE);
+            gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->icon_radio), TRUE);
             break;
           case GLADE_TB_MODE_CUSTOM:
-            gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
-                                          (button_editor->custom_radio), TRUE);
+            gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->custom_radio), TRUE);
             break;
           default:
             break;
         }
 
-      if (use_appearance)
-        {
-          gtk_widget_set_sensitive (button_editor->label_table, FALSE);
-          gtk_widget_set_sensitive (button_editor->image_table, FALSE);
-        }
-      else
-        {
-          gtk_widget_set_sensitive (button_editor->label_table, TRUE);
-          gtk_widget_set_sensitive (button_editor->image_table, TRUE);
-        }
+      gtk_widget_set_visible (priv->toggle_active_editor, GTK_IS_TOGGLE_TOOL_BUTTON (object));
+      gtk_widget_set_visible (priv->radio_group_label, GTK_IS_RADIO_TOOL_BUTTON (object));
+      gtk_widget_set_visible (priv->radio_group_editor, GTK_IS_RADIO_TOOL_BUTTON (object));
     }
 }
 
@@ -125,6 +154,7 @@ static void
 standard_label_toggled (GtkWidget * widget,
                         GladeToolButtonEditor * button_editor)
 {
+  GladeToolButtonEditorPrivate *priv = button_editor->priv;
   GladeProperty *property;
   GladeWidget   *gwidget = glade_editable_loaded_widget (GLADE_EDITABLE (button_editor));
   GValue value = { 0, };
@@ -132,8 +162,7 @@ standard_label_toggled (GtkWidget * widget,
   if (glade_editable_loading (GLADE_EDITABLE (button_editor)) || !gwidget)
     return;
 
-  if (!gtk_toggle_button_get_active
-      (GTK_TOGGLE_BUTTON (button_editor->standard_label_radio)))
+  if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->standard_label_radio)))
     return;
 
   glade_editable_block (GLADE_EDITABLE (button_editor));
@@ -162,14 +191,14 @@ standard_label_toggled (GtkWidget * widget,
 static void
 custom_label_toggled (GtkWidget * widget, GladeToolButtonEditor * button_editor)
 {
+  GladeToolButtonEditorPrivate *priv = button_editor->priv;
   GladeProperty *property;
   GladeWidget   *gwidget = glade_editable_loaded_widget (GLADE_EDITABLE (button_editor));
 
   if (glade_editable_loading (GLADE_EDITABLE (button_editor)) || !gwidget)
     return;
 
-  if (!gtk_toggle_button_get_active
-      (GTK_TOGGLE_BUTTON (button_editor->custom_label_radio)))
+  if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->custom_label_radio)))
     return;
 
   glade_editable_block (GLADE_EDITABLE (button_editor));
@@ -193,14 +222,14 @@ custom_label_toggled (GtkWidget * widget, GladeToolButtonEditor * button_editor)
 static void
 stock_toggled (GtkWidget * widget, GladeToolButtonEditor * button_editor)
 {
+  GladeToolButtonEditorPrivate *priv = button_editor->priv;
   GladeProperty *property;
   GladeWidget   *gwidget = glade_editable_loaded_widget (GLADE_EDITABLE (button_editor));
 
   if (glade_editable_loading (GLADE_EDITABLE (button_editor)) || !gwidget)
     return;
 
-  if (!gtk_toggle_button_get_active
-      (GTK_TOGGLE_BUTTON (button_editor->stock_radio)))
+  if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->stock_radio)))
     return;
 
   glade_editable_block (GLADE_EDITABLE (button_editor));
@@ -225,18 +254,17 @@ stock_toggled (GtkWidget * widget, GladeToolButtonEditor * button_editor)
   glade_editable_load (GLADE_EDITABLE (button_editor), gwidget);
 }
 
-
 static void
 icon_toggled (GtkWidget * widget, GladeToolButtonEditor * button_editor)
 {
+  GladeToolButtonEditorPrivate *priv = button_editor->priv;
   GladeProperty *property;
   GladeWidget   *gwidget = glade_editable_loaded_widget (GLADE_EDITABLE (button_editor));
 
   if (glade_editable_loading (GLADE_EDITABLE (button_editor)) || !gwidget)
     return;
 
-  if (!gtk_toggle_button_get_active
-      (GTK_TOGGLE_BUTTON (button_editor->icon_radio)))
+  if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->icon_radio)))
     return;
 
   glade_editable_block (GLADE_EDITABLE (button_editor));
@@ -264,14 +292,14 @@ icon_toggled (GtkWidget * widget, GladeToolButtonEditor * button_editor)
 static void
 custom_toggled (GtkWidget * widget, GladeToolButtonEditor * button_editor)
 {
+  GladeToolButtonEditorPrivate *priv = button_editor->priv;
   GladeProperty *property;
   GladeWidget   *gwidget = glade_editable_loaded_widget (GLADE_EDITABLE (button_editor));
 
   if (glade_editable_loading (GLADE_EDITABLE (button_editor)) || !gwidget)
     return;
 
-  if (!gtk_toggle_button_get_active
-      (GTK_TOGGLE_BUTTON (button_editor->custom_radio)))
+  if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->custom_radio)))
     return;
 
   glade_editable_block (GLADE_EDITABLE (button_editor));
@@ -297,37 +325,11 @@ custom_toggled (GtkWidget * widget, GladeToolButtonEditor * button_editor)
 }
 
 static void
-glade_tool_button_editor_set_show_name (GladeEditable * editable,
-                                        gboolean show_name)
-{
-  GladeToolButtonEditor *button_editor = GLADE_TOOL_BUTTON_EDITOR (editable);
-
-  glade_editable_set_show_name (GLADE_EDITABLE (button_editor->embed),
-                                show_name);
-}
-
-static void
 glade_tool_button_editor_editable_init (GladeEditableIface * iface)
 {
-  parent_editable_iface = g_type_default_interface_peek (GLADE_TYPE_EDITABLE);
+  parent_editable_iface = g_type_interface_peek_parent (iface);
 
   iface->load = glade_tool_button_editor_load;
-  iface->set_show_name = glade_tool_button_editor_set_show_name;
-}
-
-static void
-glade_tool_button_editor_finalize (GObject * object)
-{
-  GladeToolButtonEditor *button_editor = GLADE_TOOL_BUTTON_EDITOR (object);
-
-  if (button_editor->properties)
-    g_list_free (button_editor->properties);
-  button_editor->properties = NULL;
-  button_editor->embed = NULL;
-
-  glade_editable_load (GLADE_EDITABLE (object), NULL);
-
-  G_OBJECT_CLASS (glade_tool_button_editor_parent_class)->finalize (object);
 }
 
 static void
@@ -335,159 +337,11 @@ glade_tool_button_editor_grab_focus (GtkWidget * widget)
 {
   GladeToolButtonEditor *button_editor = GLADE_TOOL_BUTTON_EDITOR (widget);
 
-  gtk_widget_grab_focus (button_editor->embed);
-}
-
-static void
-table_attach (GtkWidget * table, GtkWidget * child, gint pos, gint row)
-{
-  gtk_grid_attach (GTK_GRID (table), child, pos, row, 1, 1);
-
-  if (pos)
-    gtk_widget_set_hexpand (child, TRUE);
+  gtk_widget_grab_focus (button_editor->priv->embed);
 }
 
 GtkWidget *
-glade_tool_button_editor_new (GladeWidgetAdaptor * adaptor,
-                              GladeEditable * embed)
+glade_tool_button_editor_new (void)
 {
-  GladeToolButtonEditor *button_editor;
-  GladeEditorProperty *eprop;
-  GtkWidget *label, *alignment, *frame, *table, *hbox;
-  gchar *str;
-
-  g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
-  g_return_val_if_fail (GLADE_IS_EDITABLE (embed), NULL);
-
-  button_editor = g_object_new (GLADE_TYPE_TOOL_BUTTON_EDITOR, NULL);
-  button_editor->embed = GTK_WIDGET (embed);
-
-  /* Pack the parent on top... */
-  gtk_box_pack_start (GTK_BOX (button_editor), GTK_WIDGET (embed), FALSE, FALSE,
-                      0);
-
-  /* Label area frame... */
-  str = g_strdup_printf ("<b>%s</b>", _("Edit Label"));
-  label = gtk_label_new (str);
-  gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
-  g_free (str);
-  frame = gtk_frame_new (NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
-  gtk_box_pack_start (GTK_BOX (button_editor), frame, FALSE, FALSE, 12);
-
-  alignment = gtk_alignment_new (0.5F, 0.5F, 1.0F, 1.0F);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 0, 12, 0);
-  gtk_container_add (GTK_CONTAINER (frame), alignment);
-
-  button_editor->label_table = table = gtk_grid_new ();
-  gtk_orientable_set_orientation (GTK_ORIENTABLE (table),
-                                  GTK_ORIENTATION_VERTICAL);
-  gtk_grid_set_row_spacing (GTK_GRID (table), 4);
-
-  gtk_container_add (GTK_CONTAINER (alignment), table);
-
-  /* Standard label... */
-  eprop =
-      glade_widget_adaptor_create_eprop_by_name (adaptor, "label", FALSE, TRUE);
-  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-  button_editor->standard_label_radio = gtk_radio_button_new (NULL);
-  gtk_box_pack_start (GTK_BOX (hbox), button_editor->standard_label_radio,
-                      FALSE, FALSE, 2);
-  gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
-  table_attach (table, hbox, 0, 0);
-  table_attach (table, GTK_WIDGET (eprop), 1, 0);
-  button_editor->properties = g_list_prepend (button_editor->properties, eprop);
-
-  /* Custom label... */
-  eprop =
-      glade_widget_adaptor_create_eprop_by_name (adaptor, "label-widget", FALSE,
-                                                 TRUE);
-  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-  button_editor->custom_label_radio = gtk_radio_button_new_from_widget
-      (GTK_RADIO_BUTTON (button_editor->standard_label_radio));
-  gtk_box_pack_start (GTK_BOX (hbox), button_editor->custom_label_radio, FALSE,
-                      FALSE, 2);
-  gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
-  table_attach (table, hbox, 0, 1);
-  table_attach (table, GTK_WIDGET (eprop), 1, 1);
-  button_editor->properties = g_list_prepend (button_editor->properties, eprop);
-
-  /* Image area frame... */
-  str = g_strdup_printf ("<b>%s</b>", _("Edit Image"));
-  label = gtk_label_new (str);
-  gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
-  g_free (str);
-  frame = gtk_frame_new (NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
-  gtk_box_pack_start (GTK_BOX (button_editor), frame, FALSE, FALSE, 8);
-
-  alignment = gtk_alignment_new (0.5F, 0.5F, 1.0F, 1.0F);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 0, 12, 0);
-  gtk_container_add (GTK_CONTAINER (frame), alignment);
-
-  button_editor->image_table = table = gtk_grid_new ();
-  gtk_orientable_set_orientation (GTK_ORIENTABLE (table),
-                                  GTK_ORIENTATION_VERTICAL);
-  gtk_grid_set_row_spacing (GTK_GRID (table), 4);
-
-  gtk_container_add (GTK_CONTAINER (alignment), table);
-
-  /* Stock image... */
-  eprop =
-      glade_widget_adaptor_create_eprop_by_name (adaptor, "stock-id", FALSE,
-                                                 TRUE);
-  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-  button_editor->stock_radio = gtk_radio_button_new (NULL);
-  gtk_box_pack_start (GTK_BOX (hbox), button_editor->stock_radio, FALSE, FALSE,
-                      2);
-  gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
-  table_attach (table, hbox, 0, 0);
-  table_attach (table, GTK_WIDGET (eprop), 1, 0);
-  button_editor->properties = g_list_prepend (button_editor->properties, eprop);
-
-  /* Icon theme image... */
-  eprop =
-      glade_widget_adaptor_create_eprop_by_name (adaptor, "icon-name", FALSE,
-                                                 TRUE);
-  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-  button_editor->icon_radio = gtk_radio_button_new_from_widget
-      (GTK_RADIO_BUTTON (button_editor->stock_radio));
-  gtk_box_pack_start (GTK_BOX (hbox), button_editor->icon_radio, FALSE, FALSE,
-                      2);
-  gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
-  table_attach (table, hbox, 0, 1);
-  table_attach (table, GTK_WIDGET (eprop), 1, 1);
-  button_editor->properties = g_list_prepend (button_editor->properties, eprop);
-
-  /* Custom embedded image widget... */
-  eprop =
-      glade_widget_adaptor_create_eprop_by_name (adaptor, "icon-widget", FALSE,
-                                                 TRUE);
-  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-  button_editor->custom_radio = gtk_radio_button_new_from_widget
-      (GTK_RADIO_BUTTON (button_editor->stock_radio));
-  gtk_box_pack_start (GTK_BOX (hbox), button_editor->custom_radio, FALSE, FALSE,
-                      2);
-  gtk_box_pack_start (GTK_BOX (hbox), glade_editor_property_get_item_label (eprop), TRUE, TRUE, 2);
-  table_attach (table, hbox, 0, 2);
-  table_attach (table, GTK_WIDGET (eprop), 1, 2);
-  button_editor->properties = g_list_prepend (button_editor->properties, eprop);
-
-  /* Connect radio button signals... */
-  g_signal_connect (G_OBJECT (button_editor->standard_label_radio), "toggled",
-                    G_CALLBACK (standard_label_toggled), button_editor);
-  g_signal_connect (G_OBJECT (button_editor->custom_label_radio), "toggled",
-                    G_CALLBACK (custom_label_toggled), button_editor);
-  g_signal_connect (G_OBJECT (button_editor->stock_radio), "toggled",
-                    G_CALLBACK (stock_toggled), button_editor);
-  g_signal_connect (G_OBJECT (button_editor->icon_radio), "toggled",
-                    G_CALLBACK (icon_toggled), button_editor);
-  g_signal_connect (G_OBJECT (button_editor->custom_radio), "toggled",
-                    G_CALLBACK (custom_toggled), button_editor);
-
-  gtk_widget_show_all (GTK_WIDGET (button_editor));
-
-  return GTK_WIDGET (button_editor);
+  return g_object_new (GLADE_TYPE_TOOL_BUTTON_EDITOR, NULL);
 }
diff --git a/plugins/gtk+/glade-tool-button-editor.h b/plugins/gtk+/glade-tool-button-editor.h
index fc59e85..b79c228 100644
--- a/plugins/gtk+/glade-tool-button-editor.h
+++ b/plugins/gtk+/glade-tool-button-editor.h
@@ -34,42 +34,29 @@ G_BEGIN_DECLS
 
 typedef struct _GladeToolButtonEditor        GladeToolButtonEditor;
 typedef struct _GladeToolButtonEditorClass   GladeToolButtonEditorClass;
+typedef struct _GladeToolButtonEditorPrivate GladeToolButtonEditorPrivate;
 
 typedef enum {
-       GLADE_TB_MODE_STOCK = 0, /* default */
-       GLADE_TB_MODE_ICON,
-       GLADE_TB_MODE_CUSTOM
+  GLADE_TB_MODE_STOCK = 0, /* default */
+  GLADE_TB_MODE_ICON,
+  GLADE_TB_MODE_CUSTOM
 } GladeToolButtonImageMode;
 
 
 struct _GladeToolButtonEditor
 {
-       GtkVBox  parent;
+  GladeEditorSkeleton  parent;
 
-       GtkWidget *embed;           /* Embedded parent class editor */
-
-       GtkWidget *label_table;
-       GtkWidget *standard_label_radio; /* Set label with label property */
-       GtkWidget *custom_label_radio;   /* Set a widget to be placed as the tool button's label */
-
-
-       GtkWidget *image_table;
-       GtkWidget *stock_radio;    /* Create the image from stock-id */
-       GtkWidget *icon_radio;     /* Create the image with the icon theme */
-       GtkWidget *custom_radio;   /* Set a widget to be used in the image position */
-
-
-       GList *properties;         /* A list of eprops to update at load() time */
+  GladeToolButtonEditorPrivate *priv;
 };
 
 struct _GladeToolButtonEditorClass
 {
-       GtkVBoxClass parent;
+  GladeEditorSkeletonClass parent;
 };
 
 GType            glade_tool_button_editor_get_type (void) G_GNUC_CONST;
-GtkWidget       *glade_tool_button_editor_new      (GladeWidgetAdaptor *adaptor,
-                                                   GladeEditable      *editable);
+GtkWidget       *glade_tool_button_editor_new      (void);
 
 G_END_DECLS
 
diff --git a/plugins/gtk+/glade-tool-button-editor.ui b/plugins/gtk+/glade-tool-button-editor.ui
new file mode 100644
index 0000000..ccb9cdb
--- /dev/null
+++ b/plugins/gtk+/glade-tool-button-editor.ui
@@ -0,0 +1,494 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gladeui 0.0 -->
+  <!-- interface-requires gtk+ 3.8 -->
+  <!-- interface-requires glade-gtk-plugin 0.0 -->
+  <template class="GladeToolButtonEditor" parent="GladeEditorSkeleton">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="has_focus">False</property>
+    <property name="is_focus">False</property>
+    <property name="orientation">vertical</property>
+    <child>
+      <object class="GtkGrid" id="grid">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="has_focus">False</property>
+        <property name="is_focus">False</property>
+        <property name="row_spacing">6</property>
+        <property name="column_spacing">6</property>
+        <child>
+          <object class="GladeActivatableEditor" id="embed">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">4</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+            <property name="width">6</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="tool_title">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="halign">start</property>
+            <property name="valign">center</property>
+            <property name="label" translatable="yes">Tool Button</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">1</property>
+            <property name="width">6</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label_title">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="halign">start</property>
+            <property name="valign">center</property>
+            <property name="label" translatable="yes">Label</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">5</property>
+            <property name="width">6</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkRadioButton" id="standard_label_radio">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="receives_default">False</property>
+            <property name="margin_left">12</property>
+            <property name="hexpand">False</property>
+            <property name="xalign">0</property>
+            <property name="active">True</property>
+            <property name="draw_indicator">True</property>
+            <signal name="toggled" handler="standard_label_toggled" swapped="no"/>
+            <child>
+              <object class="GladePropertyLabel" id="standard_label_label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="has_focus">False</property>
+                <property name="is_focus">False</property>
+                <property name="property_name">label</property>
+                <property name="custom_text" translatable="yes">Text:</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">6</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="standard_label_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="property_name">label</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">6</property>
+            <property name="width">4</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="use_underline_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_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">7</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkRadioButton" id="custom_label_radio">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="receives_default">False</property>
+            <property name="margin_left">12</property>
+            <property name="hexpand">False</property>
+            <property name="xalign">0</property>
+            <property name="active">True</property>
+            <property name="draw_indicator">True</property>
+            <property name="group">standard_label_radio</property>
+            <signal name="toggled" handler="custom_label_toggled" swapped="no"/>
+            <child>
+              <object class="GladePropertyLabel" id="custom_label_label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="has_focus">False</property>
+                <property name="is_focus">False</property>
+                <property name="property_name">label-widget</property>
+                <property name="custom_text" translatable="yes">Widget:</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">8</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="custom_label_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="property_name">label-widget</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">8</property>
+            <property name="width">4</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="image_title">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="halign">start</property>
+            <property name="valign">center</property>
+            <property name="label" translatable="yes">Image</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">9</property>
+            <property name="width">6</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkRadioButton" id="stock_radio">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="receives_default">False</property>
+            <property name="margin_left">12</property>
+            <property name="hexpand">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"/>
+            <child>
+              <object class="GladePropertyLabel" id="stock_label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="has_focus">False</property>
+                <property name="is_focus">False</property>
+                <property name="property_name">stock-id</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">10</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="stock_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="property_name">stock-id</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">10</property>
+            <property name="width">4</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkRadioButton" id="icon_radio">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="receives_default">False</property>
+            <property name="margin_left">12</property>
+            <property name="hexpand">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="icon_toggled" swapped="no"/>
+            <child>
+              <object class="GladePropertyLabel" id="icon_label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="has_focus">False</property>
+                <property name="is_focus">False</property>
+                <property name="property_name">icon-name</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">11</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkRadioButton" id="custom_radio">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="receives_default">False</property>
+            <property name="margin_left">12</property>
+            <property name="hexpand">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="custom_toggled" swapped="no"/>
+            <child>
+              <object class="GladePropertyLabel" id="custom_label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="has_focus">False</property>
+                <property name="is_focus">False</property>
+                <property name="property_name">icon-widget</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">12</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="icon_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="property_name">icon-name</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">11</property>
+            <property name="width">4</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="custom_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="property_name">icon-widget</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">12</property>
+            <property name="width">4</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="hvisible_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="margin_left">12</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">visible-horizontal</property>
+            <property name="editor_type">GladeEpropCheck</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">3</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="vvisible_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="margin_left">12</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">visible-vertical</property>
+            <property name="editor_type">GladeEpropCheck</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">4</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="important_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="property_name">is-important</property>
+            <property name="editor_type">GladeEpropCheck</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">3</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="toggle_active_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="property_name">active</property>
+            <property name="editor_type">GladeEpropCheck</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">4</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyLabel" id="radio_group_label">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="margin_left">12</property>
+            <property name="hexpand">False</property>
+            <property name="property_name">group</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">2</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GladePropertyShell" id="radio_group_editor">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <property name="property_name">group</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">2</property>
+            <property name="width">4</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child-editors>
+      <editor id="embed"/>
+      <editor id="standard_label_label"/>
+      <editor id="standard_label_editor"/>
+      <editor id="use_underline_editor"/>
+      <editor id="custom_label_label"/>
+      <editor id="custom_label_editor"/>
+      <editor id="stock_label"/>
+      <editor id="stock_editor"/>
+      <editor id="icon_label"/>
+      <editor id="custom_label"/>
+      <editor id="icon_editor"/>
+      <editor id="custom_editor"/>
+      <editor id="hvisible_editor"/>
+      <editor id="vvisible_editor"/>
+      <editor id="important_editor"/>
+      <editor id="toggle_active_editor"/>
+      <editor id="radio_group_label"/>
+      <editor id="radio_group_editor"/>
+    </child-editors>
+  </template>
+</interface>
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index d596d83..5426636 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -818,6 +818,10 @@ embedded in another object</_tooltip>
       <set-property-function>glade_gtk_tool_button_set_property</set-property-function>
       <read-widget-function>glade_gtk_tool_button_read_widget</read-widget-function>
       <properties>
+        <property id="visible-vertical" custom-layout="True"/>
+        <property id="visible-horizontal" custom-layout="True"/>
+        <property id="is-important" custom-layout="True"/>
+        <property id="use-underline" custom-layout="True"/>
 
        <!-- GtkActionable -->
        <property id="action-name" _name="Action Name" custom-layout="True" since="3.4"/>
@@ -846,9 +850,17 @@ embedded in another object</_tooltip>
       </properties>
     </glade-widget-class>
     
-    <glade-widget-class name="GtkToggleToolButton" generic-name="toggletoolbutton" _title="Toggle Tool 
Button"/>
+    <glade-widget-class name="GtkToggleToolButton" generic-name="toggletoolbutton" _title="Toggle Tool 
Button">
+      <properties>
+        <property id="active" custom-layout="True"/>
+      </properties>
+    </glade-widget-class>
     
-    <glade-widget-class name="GtkRadioToolButton" generic-name="radiotoolbutton" _title="Radio Tool Button"/>
+    <glade-widget-class name="GtkRadioToolButton" generic-name="radiotoolbutton" _title="Radio Tool Button">
+      <properties>
+        <property id="group" custom-layout="True"/>
+      </properties>
+    </glade-widget-class>
     
     <glade-widget-class name="GtkMenuToolButton" generic-name="menutoolbutton" use-placeholders="False"
                        _title="Menu Tool Button">
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1361765..f4c4760 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -83,4 +83,5 @@ plugins/gtk+/gtk+.xml.in
 [type: gettext/glade]plugins/gtk+/glade-entry-editor.ui
 [type: gettext/glade]plugins/gtk+/glade-image-editor.ui
 [type: gettext/glade]plugins/gtk+/glade-label-editor.ui
+[type: gettext/glade]plugins/gtk+/glade-tool-button-editor.ui
 [type: gettext/glade]plugins/gtk+/glade-widget-editor.ui


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