summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2009-04-18 16:27:11 -0400
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2009-04-18 16:27:11 -0400
commitec6f436fb257a3ecb0888fb0ebc056f0b0427045 (patch)
tree9bbbdb4f0b9a5df648dfab9620494f1ea4068571
parent702933ef37955e06542ba7541db0a5ed5f3ea63a (diff)
downloadglade-ec6f436fb257a3ecb0888fb0ebc056f0b0427045.tar.gz
* plugins/gtk+/gtk+.xml.in: Fixed GtkButton to only allow real stock items,
gave GtkImage a default icon-size of GTK_ICON_SIZE_BUTTON (better than invalid).
-rw-r--r--ChangeLog3
-rw-r--r--gladeui/glade-editor-property.c9
-rw-r--r--plugins/gtk+/gtk+.xml.in5
3 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 6d8ef449..fe053b0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2009-04-18 Tristan Van Berkom <tvb@gnome.org>
+ * plugins/gtk+/gtk+.xml.in: Fixed GtkButton to only allow real stock items,
+ gave GtkImage a default icon-size of GTK_ICON_SIZE_BUTTON (better than invalid).
+
* plugins/gtk+/glade-activatable-editor.c,
gladeui/glade-editor-property.c: Maintain current widget selection
during commits of related-action (was causing crashes when the
diff --git a/gladeui/glade-editor-property.c b/gladeui/glade-editor-property.c
index 5d3fb3bb..f5d9555f 100644
--- a/gladeui/glade-editor-property.c
+++ b/gladeui/glade-editor-property.c
@@ -2101,9 +2101,12 @@ glade_eprop_text_create_input (GladeEditorProperty *eprop)
"stock-id", COMBO_COLUMN_PIXBUF,
NULL);
- /* Allow any stock item, even when we should require valid builtin
- * item with a label */
- gtk_entry_set_editable (GTK_ENTRY (GTK_BIN (combo)->child), TRUE);
+ /* Dont allow custom items where an actual GTK+ stock item is expected
+ * (i.e. real items come with labels) */
+ if (klass->stock)
+ gtk_entry_set_editable (GTK_ENTRY (GTK_BIN (combo)->child), FALSE);
+ else
+ gtk_entry_set_editable (GTK_ENTRY (GTK_BIN (combo)->child), TRUE);
gtk_widget_show (combo);
gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, FALSE, 0);
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index c9aa0926..ef26d473 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -989,7 +989,7 @@ embedded in another object</_tooltip>
<visible-lines>2</visible-lines>
</property>
<property id="use-underline" custom-layout="True"/>
- <property id="stock" _name="Stock Button" stock-icon="True" save="False" custom-layout="True">
+ <property id="stock" _name="Stock Button" stock="True" save="False" custom-layout="True">
<parameter-spec>
<type>GParamString</type>
</parameter-spec>
@@ -1273,7 +1273,8 @@ embedded in another object</_tooltip>
<property id="pixbuf" _name="File Name" custom-layout="True"/>
<property id="pixel-size" custom-layout="True"/>
<!-- We have to save/load icon-size as int, and fake the enum -->
- <property id="icon-size" _name="Icon Size" custom-layout="True" save="False">
+ <property id="icon-size" _name="Icon Size" custom-layout="True"
+ default="GTK_ICON_SIZE_BUTTON" save="False">
<parameter-spec>
<type>GParamEnum</type>
<value-type>GtkIconSize</value-type>