mirror of
https://gitlab.gnome.org/GNOME/glade.git
synced 2025-09-24 00:04:33 -04:00
added save_always member in GladePropertyClass.
* gladeui/glade-property-class.c, gladeui/glade-property-class.h: added save_always member in GladePropertyClass. * gladeui/glade-property.c: always save if class or property save_always is true. * gladeui/glade-xml-utils.h: added GLADE_TAG_SAVE_ALWAYS tag. * plugins/gtk+/glade-gtk.c: removed, now unnecesary, call to glade_widget_property_set_save_always() in glade_gtk_dialog_post_create() * plugins/gtk+/gtk+.xml.in: set save-always true in GtkDialog's "type-hint" and GtkScrolledWindow's "can-focus" properties. svn path=/trunk/; revision=1305
This commit is contained in:
parent
d62004b9d9
commit
4cedef0e6d
15
ChangeLog
15
ChangeLog
@ -1,3 +1,18 @@
|
||||
2007-05-08 Juan Pablo Ugarte <juanpablougarte@gmail.com>
|
||||
|
||||
* gladeui/glade-property-class.c, gladeui/glade-property-class.h:
|
||||
added save_always member in GladePropertyClass.
|
||||
|
||||
* gladeui/glade-property.c: always save if class or property save_always is true.
|
||||
|
||||
* gladeui/glade-xml-utils.h: added GLADE_TAG_SAVE_ALWAYS tag.
|
||||
|
||||
* plugins/gtk+/glade-gtk.c: removed, now unnecesary, call to
|
||||
glade_widget_property_set_save_always() in glade_gtk_dialog_post_create()
|
||||
|
||||
* plugins/gtk+/gtk+.xml.in: set save-always true in GtkDialog's "type-hint" and
|
||||
GtkScrolledWindow's "can-focus" properties..
|
||||
|
||||
2007-05-04 Vincent Geddes <vincent.geddes@gmail.com>
|
||||
|
||||
* doc/tmpl/glade-project.sgml, doc/tmpl/glade-app.sgml,
|
||||
|
@ -167,6 +167,7 @@ glade_property_class_new (gpointer handle)
|
||||
property_class->is_modified = FALSE;
|
||||
property_class->visible = TRUE;
|
||||
property_class->save = TRUE;
|
||||
property_class->save_always = FALSE;
|
||||
property_class->ignore = FALSE;
|
||||
property_class->resource = FALSE;
|
||||
property_class->translatable = FALSE;
|
||||
@ -1676,7 +1677,8 @@ glade_property_class_update_from_node (GladeXmlNode *node,
|
||||
klass->resource = glade_xml_get_property_boolean (node, GLADE_TAG_RESOURCE, klass->resource);
|
||||
klass->weight = glade_xml_get_property_double (node, GLADE_TAG_WEIGHT, klass->weight);
|
||||
klass->transfer_on_paste = glade_xml_get_property_boolean (node, GLADE_TAG_TRANSFER_ON_PASTE, klass->transfer_on_paste);
|
||||
|
||||
klass->save_always = glade_xml_get_property_boolean (node, GLADE_TAG_SAVE_ALWAYS, klass->save_always);
|
||||
|
||||
/* A sprinkle of hard-code to get atk properties working right
|
||||
*/
|
||||
if (glade_xml_get_property_boolean (node, GLADE_TAG_ATK_ACTION, FALSE))
|
||||
|
@ -122,6 +122,12 @@ struct _GladePropertyClass
|
||||
gboolean save; /* Whether we should save to the glade file or not
|
||||
* (mostly just for custom glade properties)
|
||||
*/
|
||||
gboolean save_always; /* Used to make a special case exception and always
|
||||
* save this property regardless of what the default
|
||||
* value is (used for some special cases like properties
|
||||
* that are assigned initial values in composite widgets
|
||||
* or derived widget code).
|
||||
*/
|
||||
gboolean visible; /* Whether or not to show this property in the editor
|
||||
*/
|
||||
gboolean ignore; /* When true, we will not sync the object when the property
|
||||
|
@ -340,7 +340,7 @@ glade_property_write_impl (GladeProperty *property,
|
||||
/* Skip properties that are default by original pspec default
|
||||
* (excepting those that specified otherwise).
|
||||
*/
|
||||
if (!property->save_always &&
|
||||
if (!(property->klass->save_always || property->save_always) &&
|
||||
glade_property_equals_value (property, property->klass->orig_def))
|
||||
return FALSE;
|
||||
|
||||
|
@ -87,6 +87,7 @@ typedef struct _GladeXmlDoc GladeXmlDoc;
|
||||
#define GLADE_TAG_NICK "nick"
|
||||
#define GLADE_TAG_SPECIAL_CHILD_TYPE "special-child-type"
|
||||
#define GLADE_TAG_SAVE "save"
|
||||
#define GLADE_TAG_SAVE_ALWAYS "save-always"
|
||||
#define GLADE_TAG_EDITABLE "editable"
|
||||
#define GLADE_TAG_IGNORE "ignore"
|
||||
#define GLADE_TAG_VISIBLE_LINES "visible-lines"
|
||||
|
@ -3048,9 +3048,6 @@ glade_gtk_dialog_post_create (GladeWidgetAdaptor *adaptor,
|
||||
if (!widget)
|
||||
return;
|
||||
|
||||
/* Mark properties that are initially modified by the dialog */
|
||||
glade_widget_property_set_save_always (widget, "type-hint", TRUE);
|
||||
|
||||
if (reason == GLADE_CREATE_USER)
|
||||
{
|
||||
/* HIG complient border-width defaults on dialogs */
|
||||
|
@ -852,6 +852,7 @@ embedded in another object</_tooltip>
|
||||
<property id="default-width" default="0" optional="True" optional-default="False"/>
|
||||
<property id="default-height" default="0" optional="True" optional-default="False"/>
|
||||
<property id="has-separator" default="False"/>
|
||||
<property id="type-hint" save-always="True"/>
|
||||
</properties>
|
||||
|
||||
</glade-widget-class>
|
||||
@ -1160,8 +1161,9 @@ embedded in another object</_tooltip>
|
||||
|
||||
<glade-widget-class name="GtkScrolledWindow" generic-name="scrolledwindow" _title="Scrolled Window">
|
||||
<properties>
|
||||
<property id="can-focus" save-always="True"/>
|
||||
<property id="hadjustment" disabled="True"/>
|
||||
<property id="vadjustment" disabled="True"/>
|
||||
<property id="vadjustment" disabled="True"/>
|
||||
<property id="window-placement-set" ignore="True"/>
|
||||
<property id="shadow-type">
|
||||
<displayable-values>
|
||||
|
Loading…
x
Reference in New Issue
Block a user