diff options
author | Tristan Van Berkom <tvb@src.gnome.org> | 2008-04-10 03:10:11 +0000 |
---|---|---|
committer | Tristan Van Berkom <tvb@src.gnome.org> | 2008-04-10 03:10:11 +0000 |
commit | 2606b29fcca1b453992be9e56a57c3fabd0b57ff (patch) | |
tree | d58b2dddcf33aa978fd3a0f13808b121682b946c /gladeui/glade-property.h | |
parent | 1e2f5fb3af1b8ed5511b97476cdf66c232cd1ae0 (diff) | |
download | glade-2606b29fcca1b453992be9e56a57c3fabd0b57ff.tar.gz |
Loaded and watched the new support_warning on GladeWidget
* gladeui/glade-editor.c, gladeui/glade-editor.h:
Loaded and watched the new support_warning on GladeWidget
* gladeui/glade-editor-property.c, gladeui/glade-editor-property.h:
Loaded and watched the new support_warning on GladeProperty
* gladeui/glade-widget.c, gladeui/glade-widget.h: Keep a support-warning
property around as metadata updated by GladeProject.
* gladeui/glade-property.c, gladeui/glade-property.h:
Added new support_warning and state properties.
* gladeui/glade-project.c, gladeui/glade-project.h:
Now GladeProject generates strings to show in the normal
UI along with longer style reports, always updates widgets
warning message metadata when they come into the project
or when the format or target versions change.
* gladeui/glade-signal.c: Removed a bogus return.
svn path=/trunk/; revision=1788
Diffstat (limited to 'gladeui/glade-property.h')
-rw-r--r-- | gladeui/glade-property.h | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/gladeui/glade-property.h b/gladeui/glade-property.h index 12a8d4ca..7d4db03b 100644 --- a/gladeui/glade-property.h +++ b/gladeui/glade-property.h @@ -15,6 +15,14 @@ G_BEGIN_DECLS typedef struct _GladePropertyKlass GladePropertyKlass; +typedef enum { + GLADE_STATE_NORMAL = 0, + GLADE_STATE_CHANGED, + GLADE_STATE_UNSUPPORTED, + GLADE_STATE_UNSUPPORTED_CHANGED, + GLADE_N_STATES +} GladePropertyState; + /* A GladeProperty is an instance of a GladePropertyClass. * There will be one GladePropertyClass for "GtkLabel->label" but one * GladeProperty for each GtkLabel in the GladeProject. @@ -29,6 +37,9 @@ struct _GladeProperty GladeWidget *widget; /* A pointer to the GladeWidget that this * GladeProperty is modifying */ + + GladePropertyState state; /* Current property state, used by editing widgets. + */ GValue *value; /* The value of the property */ @@ -37,9 +48,16 @@ struct _GladeProperty * property is "optional" this takes precedence). */ gchar *insensitive_tooltip; /* Tooltip to display when in insensitive state - * (used to explain why the property is insensitive) + * (used to explain why the property is + * insensitive) */ + gchar *support_warning; /* Tooltip to display when the property + * has format problems + * (used to explain why the property is + * insensitive) + */ + gboolean enabled; /* Enabled is a flag that is used for GladeProperties * that have the optional flag set to let us know * if this widget has this GladeSetting enabled or @@ -78,11 +96,11 @@ struct _GladePropertyKlass void (* get_default) (GladeProperty *, GValue *); void (* sync) (GladeProperty *); void (* load) (GladeProperty *); - G_CONST_RETURN gchar * (* get_tooltip) (GladeProperty *); /* Signals */ void (* value_changed) (GladeProperty *, GValue *, GValue *); - void (* tooltip_changed) (GladeProperty *, const gchar *); + void (* tooltip_changed) (GladeProperty *, const gchar *, + const gchar *, const gchar *); }; @@ -148,12 +166,13 @@ void glade_property_write (GladeProperty GladeXmlContext *context, GladeXmlNode *node); -G_CONST_RETURN gchar *glade_property_get_tooltip (GladeProperty *property); - void glade_property_set_sensitive (GladeProperty *property, gboolean sensitive, const gchar *reason); +void glade_property_set_support_warning (GladeProperty *property, + const gchar *reason); + gboolean glade_property_get_sensitive (GladeProperty *property); |