[glade] Enhanced Label Editing
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] Enhanced Label Editing
- Date: Sun, 19 May 2013 09:32:42 +0000 (UTC)
commit e40034610bf633ae647774a6c2f18c85a27165bd
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Sun May 19 18:01:25 2013 +0900
Enhanced Label Editing
o Use shared GladeMiscEditor
o Allow setting of width-chars / max-width-chars separately, since 3.0
those are not mutually exclusive (maybe they never were ?)
plugins/gtk+/glade-gtk-label.c | 27 ---
plugins/gtk+/glade-label-editor.c | 85 ---------
plugins/gtk+/glade-label-editor.ui | 345 +++---------------------------------
plugins/gtk+/gtk+.xml.in | 6 -
4 files changed, 24 insertions(+), 439 deletions(-)
---
diff --git a/plugins/gtk+/glade-gtk-label.c b/plugins/gtk+/glade-gtk-label.c
index d7e5224..ebd9658 100644
--- a/plugins/gtk+/glade-gtk-label.c
+++ b/plugins/gtk+/glade-gtk-label.c
@@ -239,25 +239,6 @@ glade_gtk_label_set_content_mode (GObject * object, const GValue * value)
}
static void
-glade_gtk_label_set_use_max_width (GObject * object, const GValue * value)
-{
- GladeWidget *glabel;
-
- glabel = glade_widget_get_from_gobject (object);
-
- glade_widget_property_set_sensitive (glabel, "width-chars", FALSE,
- NOT_SELECTED_MSG);
- glade_widget_property_set_sensitive (glabel, "max-width-chars", FALSE,
- NOT_SELECTED_MSG);
-
- if (g_value_get_boolean (value))
- glade_widget_property_set_sensitive (glabel, "max-width-chars", TRUE, NULL);
- else
- glade_widget_property_set_sensitive (glabel, "width-chars", TRUE, NULL);
-}
-
-
-static void
glade_gtk_label_set_wrap_mode (GObject * object, const GValue * value)
{
GladeLabelWrapMode mode = g_value_get_int (value);
@@ -304,8 +285,6 @@ glade_gtk_label_set_property (GladeWidgetAdaptor * adaptor,
glade_gtk_label_set_attributes (object, value);
else if (!strcmp (id, "label-content-mode"))
glade_gtk_label_set_content_mode (object, value);
- else if (!strcmp (id, "use-max-width"))
- glade_gtk_label_set_use_max_width (object, value);
else if (!strcmp (id, "label-wrap-mode"))
glade_gtk_label_set_wrap_mode (object, value);
else if (!strcmp (id, "use-underline"))
@@ -420,12 +399,6 @@ glade_gtk_label_read_widget (GladeWidgetAdaptor * adaptor,
glade_widget_property_set (widget, "label-wrap-mode",
GLADE_LABEL_WRAP_FREE);
- /* Resolve "use-max-width" virtual control property */
- if (!glade_widget_property_original_default (widget, "max-width-chars"))
- glade_widget_property_set (widget, "use-max-width", TRUE);
- else
- glade_widget_property_set (widget, "use-max-width", TRUE);
-
if (glade_widget_property_original_default (widget, "use-markup"))
glade_widget_property_set_sensitive (widget, "mnemonic-widget",
FALSE, MNEMONIC_INSENSITIVE_MSG);
diff --git a/plugins/gtk+/glade-label-editor.c b/plugins/gtk+/glade-label-editor.c
index 97eb7c4..7c0cc9d 100644
--- a/plugins/gtk+/glade-label-editor.c
+++ b/plugins/gtk+/glade-label-editor.c
@@ -38,8 +38,6 @@ static void glade_label_editor_editable_init (GladeEditableIface *iface);
static void attributes_toggled (GtkWidget *widget, GladeLabelEditor *label_editor);
static void markup_toggled (GtkWidget *widget, GladeLabelEditor *label_editor);
static void pattern_toggled (GtkWidget *widget, GladeLabelEditor *label_editor);
-static void width_toggled (GtkWidget *widget, GladeLabelEditor *label_editor);
-static void max_width_toggled (GtkWidget *widget, GladeLabelEditor *label_editor);
static void wrap_free_toggled (GtkWidget *widget, GladeLabelEditor *label_editor);
static void single_toggled (GtkWidget *widget, GladeLabelEditor *label_editor);
static void wrap_mode_toggled (GtkWidget *widget, GladeLabelEditor *label_editor);
@@ -53,10 +51,6 @@ struct _GladeLabelEditorPrivate
GtkWidget *pattern_radio; /* Use a pattern string to underline portions of the text
* (pattern eprop embedded) */
- /* These control whether to use max-width-chars or just width-chars */
- GtkWidget *width_radio;
- GtkWidget *max_width_radio;
-
/* These control whether to use single-line-mode, wrap & wrap-mode or niether */
GtkWidget *wrap_free_label; /* Set boldness on this label for a fake property */
GtkWidget *wrap_free_radio;
@@ -84,8 +78,6 @@ glade_label_editor_class_init (GladeLabelEditorClass * klass)
gtk_widget_class_bind_child (widget_class, GladeLabelEditorPrivate, attributes_radio);
gtk_widget_class_bind_child (widget_class, GladeLabelEditorPrivate, markup_radio);
gtk_widget_class_bind_child (widget_class, GladeLabelEditorPrivate, pattern_radio);
- gtk_widget_class_bind_child (widget_class, GladeLabelEditorPrivate, width_radio);
- gtk_widget_class_bind_child (widget_class, GladeLabelEditorPrivate, max_width_radio);
gtk_widget_class_bind_child (widget_class, GladeLabelEditorPrivate, wrap_free_label);
gtk_widget_class_bind_child (widget_class, GladeLabelEditorPrivate, wrap_free_radio);
gtk_widget_class_bind_child (widget_class, GladeLabelEditorPrivate, single_radio);
@@ -94,8 +86,6 @@ glade_label_editor_class_init (GladeLabelEditorClass * klass)
gtk_widget_class_bind_callback (widget_class, attributes_toggled);
gtk_widget_class_bind_callback (widget_class, markup_toggled);
gtk_widget_class_bind_callback (widget_class, pattern_toggled);
- gtk_widget_class_bind_callback (widget_class, width_toggled);
- gtk_widget_class_bind_callback (widget_class, max_width_toggled);
gtk_widget_class_bind_callback (widget_class, wrap_free_toggled);
gtk_widget_class_bind_callback (widget_class, single_toggled);
gtk_widget_class_bind_callback (widget_class, wrap_mode_toggled);
@@ -187,14 +177,6 @@ glade_label_editor_load (GladeEditable * editable, GladeWidget * widget)
default:
break;
}
-
- if (use_max_width)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
- (priv->max_width_radio), TRUE);
- else
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
- (priv->width_radio), TRUE);
-
}
}
@@ -324,73 +306,6 @@ pattern_toggled (GtkWidget * widget, GladeLabelEditor * label_editor)
}
/**********************************************************************
- use-max-width radios
- **********************************************************************/
-static void
-width_toggled (GtkWidget * widget, GladeLabelEditor * label_editor)
-{
- GladeLabelEditorPrivate *priv = label_editor->priv;
- GladeProperty *property;
- GladeWidget *gwidget = glade_editable_loaded_widget (GLADE_EDITABLE (label_editor));
-
- if (glade_editable_loading (GLADE_EDITABLE (label_editor)) || !gwidget)
- return;
-
- if (!gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON (priv->width_radio)))
- return;
-
- glade_editable_block (GLADE_EDITABLE (label_editor));
-
- glade_command_push_group (_("Setting %s to set desired width in characters"),
- glade_widget_get_name (gwidget));
-
- property = glade_widget_get_property (gwidget, "max-width-chars");
- glade_command_set_property (property, -1);
- property = glade_widget_get_property (gwidget, "use-max-width");
- glade_command_set_property (property, FALSE);
-
- glade_command_pop_group ();
-
- glade_editable_unblock (GLADE_EDITABLE (label_editor));
-
- /* reload buttons and sensitivity and stuff... */
- glade_editable_load (GLADE_EDITABLE (label_editor), gwidget);
-}
-
-static void
-max_width_toggled (GtkWidget * widget, GladeLabelEditor * label_editor)
-{
- GladeLabelEditorPrivate *priv = label_editor->priv;
- GladeProperty *property;
- GladeWidget *gwidget = glade_editable_loaded_widget (GLADE_EDITABLE (label_editor));
-
- if (glade_editable_loading (GLADE_EDITABLE (label_editor)) || !gwidget)
- return;
-
- if (!gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON (priv->max_width_radio)))
- return;
-
- glade_editable_block (GLADE_EDITABLE (label_editor));
-
- glade_command_push_group (_("Setting %s to set maximum width in characters"),
- glade_widget_get_name (gwidget));
-
- property = glade_widget_get_property (gwidget, "width-chars");
- glade_command_set_property (property, -1);
- property = glade_widget_get_property (gwidget, "use-max-width");
- glade_command_set_property (property, TRUE);
-
- glade_command_pop_group ();
-
- glade_editable_unblock (GLADE_EDITABLE (label_editor));
-
- /* reload buttons and sensitivity and stuff... */
- glade_editable_load (GLADE_EDITABLE (label_editor), gwidget);
-}
-
-/**********************************************************************
label-wrap-mode radios
**********************************************************************/
static void
diff --git a/plugins/gtk+/glade-label-editor.ui b/plugins/gtk+/glade-label-editor.ui
index 335c25c..b09deab 100644
--- a/plugins/gtk+/glade-label-editor.ui
+++ b/plugins/gtk+/glade-label-editor.ui
@@ -1,27 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface domain="glade">
<!-- interface-requires gladeui 0.0 -->
- <!-- interface-requires gtk+ 3.8 -->
+ <!-- interface-requires glade-gtk-plugin 0.0 -->
+ <!-- interface-requires gtk+ 3.10 -->
<template class="GladeLabelEditor" 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="GladeEditorTable" 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>
</object>
<packing>
<property name="left_attach">0</property>
@@ -34,8 +29,6 @@
<object class="GtkLabel" id="appearance_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="halign">start</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Appearance</property>
@@ -54,8 +47,6 @@
<object class="GladePropertyLabel" id="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="margin_left">12</property>
<property name="hexpand">False</property>
<property name="property_name">label</property>
@@ -71,8 +62,6 @@
<object class="GladePropertyShell" id="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="hexpand">True</property>
<property name="property_name">label</property>
</object>
@@ -87,8 +76,6 @@
<object class="GtkRadioButton" id="attributes_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>
@@ -100,8 +87,6 @@
<object class="GladePropertyLabel" id="attributes_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">glade-attributes</property>
</object>
</child>
@@ -117,8 +102,6 @@
<object class="GladePropertyShell" id="attributes_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="hexpand">True</property>
<property name="property_name">glade-attributes</property>
</object>
@@ -133,8 +116,6 @@
<object class="GtkRadioButton" id="markup_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>
@@ -147,8 +128,6 @@
<object class="GladePropertyLabel" id="markup_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">use-markup</property>
</object>
</child>
@@ -164,8 +143,6 @@
<object class="GtkRadioButton" id="pattern_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>
@@ -178,8 +155,6 @@
<object class="GladePropertyLabel" id="pattern_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">pattern</property>
</object>
</child>
@@ -195,8 +170,6 @@
<object class="GladePropertyShell" id="pattern_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="hexpand">False</property>
<property name="property_name">pattern</property>
</object>
@@ -211,8 +184,6 @@
<object class="GtkLabel" id="format_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="halign">start</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Formatting</property>
@@ -231,8 +202,6 @@
<object class="GtkLabel" id="behaviour_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="halign">start</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Label behaviour</property>
@@ -253,8 +222,6 @@
<object class="GladePropertyShell" id="selectable_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">selectable</property>
@@ -271,8 +238,6 @@
<object class="GladePropertyShell" id="track_links_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="hexpand">False</property>
<property name="property_name">track-visited-links</property>
<property name="editor_type">GladeEpropCheck</property>
@@ -288,8 +253,6 @@
<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="margin_left">12</property>
<property name="hexpand">False</property>
<property name="property_name">use-underline</property>
@@ -306,8 +269,6 @@
<object class="GladePropertyShell" id="mnemonic_widget_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="hexpand">False</property>
<property name="property_name">mnemonic-widget</property>
</object>
@@ -322,8 +283,6 @@
<object class="GladePropertyLabel" id="ellipsize_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">ellipsize</property>
@@ -339,8 +298,6 @@
<object class="GladePropertyShell" id="ellipsize_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="hexpand">False</property>
<property name="property_name">ellipsize</property>
</object>
@@ -355,8 +312,6 @@
<object class="GladePropertyLabel" id="justify_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="halign">end</property>
<property name="hexpand">False</property>
<property name="property_name">justify</property>
@@ -372,8 +327,6 @@
<object class="GladePropertyShell" id="justify_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="hexpand">False</property>
<property name="property_name">justify</property>
</object>
@@ -388,8 +341,6 @@
<object class="GladePropertyLabel" id="angle_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">angle</property>
@@ -405,8 +356,6 @@
<object class="GladePropertyShell" id="angle_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="hexpand">False</property>
<property name="property_name">angle</property>
</object>
@@ -421,8 +370,6 @@
<object class="GtkRadioButton" id="wrap_free_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>
@@ -434,8 +381,6 @@
<object class="GtkLabel" id="wrap_free_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="label" translatable="yes">Wrap only on new line</property>
</object>
</child>
@@ -451,8 +396,6 @@
<object class="GtkRadioButton" id="single_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>
@@ -465,8 +408,6 @@
<object class="GladePropertyLabel" id="single_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">single-line-mode</property>
<property name="custom_text" translatable="yes">Never wrap</property>
</object>
@@ -483,8 +424,6 @@
<object class="GtkRadioButton" id="wrap_mode_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>
@@ -497,8 +436,6 @@
<object class="GladePropertyLabel" id="wrap_mode_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">wrap-mode</property>
<property name="custom_text" translatable="yes">Automatically wrap</property>
</object>
@@ -512,14 +449,12 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="size_label">
+ <object class="GtkLabel" id="widt_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="halign">start</property>
<property name="valign">center</property>
- <property name="label" translatable="yes">Size and Alignment</property>
+ <property name="label" translatable="yes">Label Width</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -532,41 +467,9 @@
</packing>
</child>
<child>
- <object class="GtkRadioButton" id="width_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="width_toggled" swapped="no"/>
- <child>
- <object class="GladePropertyLabel" id="width_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">width-chars</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">16</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
<object class="GladePropertyShell" id="width_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="hexpand">False</property>
<property name="property_name">width-chars</property>
</object>
@@ -578,42 +481,9 @@
</packing>
</child>
<child>
- <object class="GtkRadioButton" id="max_width_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">width_radio</property>
- <signal name="toggled" handler="max_width_toggled" swapped="no"/>
- <child>
- <object class="GladePropertyLabel" id="max_width_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">max-width-chars</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">17</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
<object class="GladePropertyShell" id="max_width_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="hexpand">False</property>
<property name="property_name">max-width-chars</property>
</object>
@@ -625,196 +495,57 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="align_label">
+ <object class="GladePropertyShell" id="wrap_mode_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="halign">start</property>
- <property name="valign">start</property>
- <property name="margin_left">12</property>
- <property name="margin_top">4</property>
<property name="hexpand">False</property>
- <property name="label" translatable="yes">Alignment</property>
+ <property name="property_name">wrap-mode</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">18</property>
+ <property name="left_attach">2</property>
+ <property name="top_attach">14</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GladePropertyLabel" id="halign_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="halign">end</property>
- <property name="margin_left">24</property>
- <property name="hexpand">False</property>
- <property name="property_name">xalign</property>
- <property name="custom_text" translatable="yes">Horizontal</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">19</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GladePropertyLabel" id="valign_label">
+ <object class="GladeMiscEditor" id="misc_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="halign">end</property>
- <property name="margin_left">24</property>
- <property name="hexpand">False</property>
- <property name="property_name">yalign</property>
- <property name="custom_text" translatable="yes">Vertical</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">20</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GladePropertyShell" id="hpad_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="hexpand">False</property>
- <property name="property_name">xpad</property>
- </object>
- <packing>
- <property name="left_attach">3</property>
- <property name="top_attach">19</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GladePropertyShell" id="vpad_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="hexpand">False</property>
- <property name="property_name">ypad</property>
- </object>
- <packing>
- <property name="left_attach">3</property>
- <property name="top_attach">20</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="padding_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="halign">start</property>
- <property name="valign">center</property>
- <property name="margin_top">4</property>
- <property name="hexpand">False</property>
- <property name="label" translatable="yes">Padding</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
<property name="top_attach">18</property>
- <property name="width">1</property>
+ <property name="width">6</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GladePropertyLabel" id="hpad_label">
+ <object class="GladePropertyLabel" id="width_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="halign">end</property>
<property name="margin_left">12</property>
- <property name="hexpand">False</property>
- <property name="property_name">xpad</property>
- <property name="custom_text" translatable="yes">Horizontal</property>
+ <property name="property_name">width-chars</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="top_attach">19</property>
- <property name="width">1</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">16</property>
+ <property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GladePropertyLabel" id="vpad_label">
+ <object class="GladePropertyLabel" id="max_width_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="halign">end</property>
<property name="margin_left">12</property>
- <property name="hexpand">False</property>
- <property name="property_name">ypad</property>
- <property name="custom_text" translatable="yes">Vertical</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">20</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GladePropertyShell" id="halign_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="hexpand">False</property>
- <property name="property_name">xalign</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">19</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GladePropertyShell" id="valign_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="hexpand">False</property>
- <property name="property_name">yalign</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">20</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GladePropertyShell" id="wrap_mode_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="hexpand">False</property>
- <property name="property_name">wrap-mode</property>
+ <property name="property_name">max-width-chars</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="top_attach">14</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">17</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
@@ -885,27 +616,6 @@
<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>
@@ -934,19 +644,12 @@
<editor id="angle_editor"/>
<editor id="single_label"/>
<editor id="wrap_mode_label"/>
- <editor id="width_label"/>
<editor id="width_editor"/>
- <editor id="max_width_label"/>
<editor id="max_width_editor"/>
- <editor id="halign_label"/>
- <editor id="valign_label"/>
- <editor id="hpad_editor"/>
- <editor id="vpad_editor"/>
- <editor id="hpad_label"/>
- <editor id="vpad_label"/>
- <editor id="halign_editor"/>
- <editor id="valign_editor"/>
<editor id="wrap_mode_editor"/>
+ <editor id="misc_editor"/>
+ <editor id="width_label"/>
+ <editor id="max_width_label"/>
</child-editors>
</template>
</interface>
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index b936ec4..e251e7f 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -960,12 +960,6 @@ embedded in another object</_tooltip>
<type>GParamInt</type>
</parameter-spec>
</property>
- <!-- Virtual label to control width-chars vs. max-width-chars -->
- <property id="use-max-width" visible="False" save="False">
- <parameter-spec>
- <type>GParamBoolean</type>
- </parameter-spec>
- </property>
<!-- Virtual label content mode property -->
<property id="label-wrap-mode" visible="False" save="False">
<parameter-spec>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]