glade3 r2101 - in trunk: . gladeui plugins/gtk+
- From: tvb svn gnome org
- To: svn-commits-list gnome org
- Subject: glade3 r2101 - in trunk: . gladeui plugins/gtk+
- Date: Tue, 27 Jan 2009 22:32:46 +0000 (UTC)
Author: tvb
Date: Tue Jan 27 22:32:46 2009
New Revision: 2101
URL: http://svn.gnome.org/viewvc/glade3?rev=2101&view=rev
Log:
* plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: Updated and virtualized properties from gtk+ 2.16
Modified:
trunk/ChangeLog
trunk/gladeui/glade-property-class.c
trunk/plugins/gtk+/glade-gtk.c
trunk/plugins/gtk+/gtk+.xml.in
Modified: trunk/gladeui/glade-property-class.c
==============================================================================
--- trunk/gladeui/glade-property-class.c (original)
+++ trunk/gladeui/glade-property-class.c Tue Jan 27 22:32:46 2009
@@ -1487,12 +1487,18 @@
/* We overrode the pspec, now it *is* a virtual property. */
klass->virt = TRUE;
- if (klass->tooltip) g_free (klass->tooltip);
- if (klass->name) g_free (klass->name);
-
- klass->tooltip = g_strdup (g_param_spec_get_blurb (klass->pspec));
- klass->name = g_strdup (g_param_spec_get_nick (klass->pspec));
-
+ if (strcmp (g_param_spec_get_blurb (klass->pspec), "dummy") != 0)
+ {
+ g_free (klass->tooltip);
+ klass->tooltip = g_strdup (g_param_spec_get_blurb (klass->pspec));
+ }
+
+ if (strcmp (g_param_spec_get_nick (klass->pspec), "dummy") != 0)
+ {
+ g_free (klass->name);
+ klass->name = g_strdup (g_param_spec_get_nick (klass->pspec));
+ }
+
if (klass->pspec->flags & G_PARAM_CONSTRUCT_ONLY)
klass->construct_only = TRUE;
Modified: trunk/plugins/gtk+/glade-gtk.c
==============================================================================
--- trunk/plugins/gtk+/glade-gtk.c (original)
+++ trunk/plugins/gtk+/glade-gtk.c Tue Jan 27 22:32:46 2009
@@ -4743,6 +4743,7 @@
{
GladeImageEditMode mode;
GladeWidget *gwidget = glade_widget_get_from_gobject (object);
+ GladeProperty *property = glade_widget_get_property (gwidget, id);
if (!strcmp (id, "primary-icon-mode"))
{
@@ -4784,7 +4785,8 @@
break;
}
}
- else
+ else if (property->klass->version_since_major <= gtk_major_version &&
+ property->klass->version_since_minor <= gtk_minor_version)
GWA_GET_CLASS (GTK_TYPE_WIDGET)->set_property (adaptor, object, id, value);
}
@@ -5735,6 +5737,9 @@
const gchar *id,
const GValue *value)
{
+ GladeWidget *widget = glade_widget_get_from_gobject (object);
+ GladeProperty *property = glade_widget_get_property (widget, id);
+
if (strcmp (id, "custom-child") == 0)
{
if (g_value_get_boolean (value))
@@ -5752,13 +5757,13 @@
}
else if (strcmp (id, "stock") == 0)
{
- GladeWidget *widget = glade_widget_get_from_gobject (object);
gboolean use_stock = FALSE;
glade_widget_property_get (widget, "use-stock", &use_stock);
if (use_stock)
gtk_button_set_label (GTK_BUTTON (object), g_value_get_string (value));
}
- else
+ else if (property->klass->version_since_major <= gtk_major_version &&
+ property->klass->version_since_minor <= gtk_minor_version)
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object,
id, value);
}
@@ -6619,11 +6624,15 @@
const gchar *id,
const GValue *value)
{
+ GladeWidget *gwidget = glade_widget_get_from_gobject (object);
+ GladeProperty *property = glade_widget_get_property (gwidget, id);
+
if (!strcmp (id, "use-underline"))
glade_gtk_menu_item_set_use_underline (object, value);
else if (!strcmp (id, "label"))
glade_gtk_menu_item_set_label (object, value);
- else
+ else if (property->klass->version_since_major <= gtk_major_version &&
+ property->klass->version_since_minor <= gtk_minor_version)
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object,
id, value);
}
@@ -7482,6 +7491,22 @@
glade_placeholder_new ());
}
+void
+glade_gtk_tool_item_set_property (GladeWidgetAdaptor *adaptor,
+ GObject *object,
+ const gchar *id,
+ const GValue *value)
+{
+ GladeWidget *gwidget = glade_widget_get_from_gobject (object);
+ GladeProperty *property = glade_widget_get_property (gwidget, id);
+
+ if (property->klass->version_since_major <= gtk_major_version &&
+ property->klass->version_since_minor <= gtk_minor_version)
+ GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor,
+ object,
+ id, value);
+}
+
/* ----------------------------- GtkToolButton ------------------------------ */
GladeEditable *
glade_gtk_tool_button_create_editable (GladeWidgetAdaptor *adaptor,
Modified: trunk/plugins/gtk+/gtk+.xml.in
==============================================================================
--- trunk/plugins/gtk+/gtk+.xml.in (original)
+++ trunk/plugins/gtk+/gtk+.xml.in Tue Jan 27 22:32:46 2009
@@ -456,18 +456,32 @@
<property id="accel-path" since="2.14"/>
<property id="right-justified" since="2.14"/>
<property id="width-chars" since="2.14"/>
- <property id="label" _name="Label" translatable="True">
+ <property id="label" _name="Label" translatable="True" gtkbuilder-since="2.16">
<parameter-spec>
<type>GParamString</type>
</parameter-spec>
<_tooltip>The text of the menu item</_tooltip>
</property>
- <property id="use-underline" _name="Use Underline">
+ <property id="use-underline" _name="Use Underline" gtkbuilder-since="2.16">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
<_tooltip>If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key</_tooltip>
</property>
+
+ <!-- GtkActivatable -->
+ <property id="related-action" _name="Related Action" since="2.16">
+ <parameter-spec>
+ <type>GParamObject</type>
+ <value-type>GtkAction</value-type>
+ </parameter-spec>
+ </property>
+ <property id="use-action-appearance" _name="Use Action Appearance" default="False" since="2.16">
+ <parameter-spec>
+ <type>GParamBoolean</type>
+ </parameter-spec>
+ </property>
+
<!-- Atk click property -->
<property id="atk-click" _name="Click" ignore="True" atk-property="True" save="False">
<parameter-spec>
@@ -491,7 +505,7 @@
<remove-child-function>glade_gtk_image_menu_item_remove_child</remove-child-function>
<create-editable-function>glade_gtk_image_menu_item_create_editable</create-editable-function>
<properties>
- <property id="use-stock" default="True" visible="False">
+ <property id="use-stock" default="True" visible="False" gtkbuilder-since="2.16">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
@@ -506,9 +520,7 @@
<property id="label" save="False" custom-layout="True"/>
<property id="use-underline" custom-layout="True"/>
<property id="image" libglade-unsupported="True" parentless-widget="True" visible="False"/>
-
- <!-- need to fake this pspec since its not available in gtk+ yet -->
- <property id="accel-group" _name="Accel Group" custom-layout="True" libglade-unsupported="True">
+ <property id="accel-group" _name="Accel Group" custom-layout="True" since="2.16" libglade-unsupported="True">
<parameter-spec>
<type>GParamObject</type>
<value-type>GtkAccelGroup</value-type>
@@ -628,6 +640,24 @@
<glade-widget-class name="GtkToolItem" generic-name="toolitem" title="GtkToolItem">
<post-create-function>glade_gtk_tool_item_post_create</post-create-function>
<constructor-function>glade_gtk_tool_item_constructor</constructor-function>
+ <set-property-function>glade_gtk_tool_item_set_property</set-property-function>
+
+ <properties>
+ <!-- GtkActivatable -->
+ <property id="related-action" _name="Related Action" since="2.16">
+ <parameter-spec>
+ <type>GParamObject</type>
+ <value-type>GtkAction</value-type>
+ </parameter-spec>
+ </property>
+ <property id="use-action-appearance" _name="Use Action Appearance" default="False" since="2.16">
+ <parameter-spec>
+ <type>GParamBoolean</type>
+ </parameter-spec>
+ </property>
+ </properties>
+
+
</glade-widget-class>
<glade-widget-class name="GtkSeparatorToolItem" generic-name="separatortoolitem" _title="Separator Tool Item"/>
@@ -787,6 +817,12 @@
<create-editable-function>glade_gtk_entry_create_editable</create-editable-function>
<set-property-function>glade_gtk_entry_set_property</set-property-function>
<read-widget-function>glade_gtk_entry_read_widget</read-widget-function>
+
+ <signals>
+ <signal id="icon-press" since="2.16"/>
+ <signal id="icon-release" since="2.16"/>
+ </signals>
+
<properties>
<property id="text" translatable="True"/>
<property id="inner-border" since="2.10"/>
@@ -794,18 +830,97 @@
<property id="shadow-type" since="2.12"/>
<property id="primary-icon-gicon" disabled="True"/>
<property id="secondary-icon-gicon" disabled="True"/>
- <property id="primary-icon-stock" since="2.16" custom-layout="True" stock-icon="True"/>
- <property id="secondary-icon-stock" since="2.16" custom-layout="True" stock-icon="True"/>
- <property id="primary-icon-pixbuf" since="2.16" custom-layout="True"/>
- <property id="secondary-icon-pixbuf" since="2.16" custom-layout="True"/>
- <property id="primary-icon-name" since="2.16" custom-layout="True" themed-icon="True"/>
- <property id="secondary-icon-name" since="2.16" custom-layout="True" themed-icon="True"/>
- <property id="primary-icon-activatable" since="2.16" custom-layout="True"/>
- <property id="secondary-icon-activatable" since="2.16" custom-layout="True"/>
- <property id="primary-icon-sensitive" since="2.16" custom-layout="True"/>
- <property id="secondary-icon-sensitive" since="2.16" custom-layout="True"/>
- <property id="progress-fraction" since="2.16" custom-layout="True"/>
- <property id="progress-pulse-step" since="2.16" custom-layout="True"/>
+ <property id="primary-icon-stock" _name="Primary Stock Icon" since="2.16" custom-layout="True" stock-icon="True">
+ <parameter-spec>
+ <type>GParamString</type>
+ </parameter-spec>
+ </property>
+ <property id="secondary-icon-stock" _name="Secondary Stock Icon" since="2.16" custom-layout="True" stock-icon="True">
+ <parameter-spec>
+ <type>GParamString</type>
+ </parameter-spec>
+ </property>
+ <property id="primary-icon-pixbuf" _name="Primary Icon Pixbuf" since="2.16" custom-layout="True">
+ <parameter-spec>
+ <type>GParamObject</type>
+ <value-type>GdkPixbuf</value-type>
+ </parameter-spec>
+ </property>
+ <property id="secondary-icon-pixbuf" _name="Secondary Icon Pixbuf" since="2.16" custom-layout="True">
+ <parameter-spec>
+ <type>GParamObject</type>
+ <value-type>GdkPixbuf</value-type>
+ </parameter-spec>
+ </property>
+ <property id="primary-icon-name" _name="Primary Icon Name" since="2.16" custom-layout="True" themed-icon="True">
+ <parameter-spec>
+ <type>GParamString</type>
+ </parameter-spec>
+ </property>
+ <property id="secondary-icon-name" _name="Secondary Icon Name" since="2.16" custom-layout="True" themed-icon="True">
+ <parameter-spec>
+ <type>GParamString</type>
+ </parameter-spec>
+ </property>
+ <property id="primary-icon-activatable" _name="Primary Icon Activatable" since="2.16" custom-layout="True">
+ <parameter-spec>
+ <type>GParamBoolean</type>
+ </parameter-spec>
+ </property>
+ <property id="secondary-icon-activatable" _name="Secondary Icon Activatable" since="2.16" custom-layout="True">
+ <parameter-spec>
+ <type>GParamBoolean</type>
+ </parameter-spec>
+ </property>
+ <property id="primary-icon-sensitive" _name="Primary Icon Sensitive" since="2.16" custom-layout="True">
+ <parameter-spec>
+ <type>GParamBoolean</type>
+ </parameter-spec>
+ </property>
+ <property id="secondary-icon-sensitive" _name="Secondary Icon Sensitive" since="2.16" custom-layout="True">
+ <parameter-spec>
+ <type>GParamBoolean</type>
+ </parameter-spec>
+ </property>
+ <property id="progress-fraction" _name="Progress Fraction" since="2.16" custom-layout="True">
+ <parameter-spec>
+ <type>GParamDouble</type>
+ </parameter-spec>
+ </property>
+ <property id="progress-pulse-step" _name="Progress Pulse Step" since="2.16" custom-layout="True">
+ <parameter-spec>
+ <type>GParamDouble</type>
+ </parameter-spec>
+ </property>
+
+ <property id="invisible-char-set" _name="Invisible Char Set" since="2.16">
+ <parameter-spec>
+ <type>GParamBoolean</type>
+ </parameter-spec>
+ </property>
+ <property id="primary-icon-tooltip-text" _name="Primary Icon Tooltip Text" since="2.16">
+ <parameter-spec>
+ <type>GParamString</type>
+ </parameter-spec>
+ </property>
+ <property id="secondary-icon-tooltip-text" _name="Secondary Icon Tooltip Text" since="2.16">
+ <parameter-spec>
+ <type>GParamString</type>
+ </parameter-spec>
+ </property>
+ <property id="primary-icon-tooltip-markup" _name="Primary Icon Tooltip Markup" since="2.16">
+ <parameter-spec>
+ <type>GParamString</type>
+ </parameter-spec>
+ </property>
+ <property id="secondary-icon-tooltip-markup" _name="Secondary Icon Tooltip Markup" since="2.16">
+ <parameter-spec>
+ <type>GParamString</type>
+ </parameter-spec>
+ </property>
+
+ <property id="im-module" disabled="True"/>
+
<!-- Virtual icon edit mode properties -->
<property id="primary-icon-mode" visible="False" save="False">
@@ -898,6 +1013,19 @@
</displayable-values>
</property>
+ <!-- GtkActivatable -->
+ <property id="related-action" _name="Related Action" since="2.16">
+ <parameter-spec>
+ <type>GParamObject</type>
+ <value-type>GtkAction</value-type>
+ </parameter-spec>
+ </property>
+ <property id="use-action-appearance" _name="Use Action Appearance" default="False" since="2.16">
+ <parameter-spec>
+ <type>GParamBoolean</type>
+ </parameter-spec>
+ </property>
+
<!-- Atk click property -->
<property id="atk-click" _name="Click" ignore="True" atk-property="True" save="False">
<parameter-spec>
@@ -3142,6 +3270,10 @@
<glade-widget-class name="GtkTextBuffer" generic-name="textbuffer" _title="Text Buffer"
libglade-unsupported="True" toplevel="True">
+ <signals>
+ <signal id="paste-done" since="2.16"/>
+ </signals>
+
<properties>
<property id="text" translatable="True">
<visible-lines>2</visible-lines>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]