glade3 r1788 - in trunk: . gladeui plugins/gtk+
- From: tvb svn gnome org
- To: svn-commits-list gnome org
- Subject: glade3 r1788 - in trunk: . gladeui plugins/gtk+
- Date: Thu, 10 Apr 2008 04:10:12 +0100 (BST)
Author: tvb
Date: Thu Apr 10 04:10:11 2008
New Revision: 1788
URL: http://svn.gnome.org/viewvc/glade3?rev=1788&view=rev
Log:
* 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.
Modified:
trunk/ChangeLog
trunk/gladeui/glade-editor-property.c
trunk/gladeui/glade-editor-property.h
trunk/gladeui/glade-editor.c
trunk/gladeui/glade-editor.h
trunk/gladeui/glade-project.c
trunk/gladeui/glade-project.h
trunk/gladeui/glade-property.c
trunk/gladeui/glade-property.h
trunk/gladeui/glade-signal.c
trunk/gladeui/glade-widget.c
trunk/gladeui/glade-widget.h
trunk/plugins/gtk+/gtk+.xml.in
Modified: trunk/gladeui/glade-editor-property.c
==============================================================================
--- trunk/gladeui/glade-editor-property.c (original)
+++ trunk/gladeui/glade-editor-property.c Thu Apr 10 04:10:11 2008
@@ -107,14 +107,23 @@
}
-
static void
glade_editor_property_tooltip_cb (GladeProperty *property,
const gchar *tooltip,
+ const gchar *insensitive,
+ const gchar *support,
GladeEditorProperty *eprop)
{
- gtk_widget_set_tooltip_text (eprop->input, tooltip);
- gtk_widget_set_tooltip_text (eprop->item_label, tooltip);
+ const gchar *choice_tooltip;
+
+ if (glade_property_get_sensitive (property))
+ choice_tooltip = tooltip;
+ else
+ choice_tooltip = insensitive;
+
+ gtk_widget_set_tooltip_text (eprop->input, choice_tooltip);
+ gtk_widget_set_tooltip_text (eprop->label, choice_tooltip);
+ gtk_widget_set_tooltip_text (eprop->warning, support);
}
static void
@@ -141,6 +150,59 @@
glade_editor_property_load (eprop, eprop->property);
}
+
+
+
+static void
+glade_editor_property_fix_label (GladeEditorProperty *eprop)
+{
+ gchar *text = NULL;
+
+ if (!eprop->property)
+ return;
+
+ /* refresh label */
+ switch (eprop->property->state)
+ {
+ case GLADE_STATE_NORMAL:
+ case GLADE_STATE_UNSUPPORTED:
+ text = g_strdup_printf ("%s:", eprop->klass->name);
+ break;
+ case GLADE_STATE_CHANGED:
+ case GLADE_STATE_UNSUPPORTED_CHANGED:
+ text = g_strdup_printf ("<b>%s:</b>", eprop->klass->name);
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ /* refresh icon */
+ switch (eprop->property->state)
+ {
+ case GLADE_STATE_NORMAL:
+ case GLADE_STATE_CHANGED:
+ gtk_widget_hide (eprop->warning);
+ break;
+ case GLADE_STATE_UNSUPPORTED:
+ case GLADE_STATE_UNSUPPORTED_CHANGED:
+ gtk_widget_show (eprop->warning);
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ gtk_label_set_markup (GTK_LABEL (eprop->label), text);
+ g_free (text);
+}
+
+static void
+glade_editor_property_state_cb (GladeProperty *property,
+ GParamSpec *pspec,
+ GladeEditorProperty *eprop)
+{
+ glade_editor_property_fix_label (eprop);
+}
+
static void
glade_editor_property_enabled_cb (GladeProperty *property,
GParamSpec *pspec,
@@ -210,6 +272,16 @@
return button;
}
+static GtkWidget *
+glade_editor_property_create_warning_icon (GladeEditorProperty *eprop)
+{
+ GtkWidget *widget = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
+ GTK_ICON_SIZE_MENU);
+ gtk_widget_set_no_show_all (widget, TRUE);
+ return widget;
+}
+
+
static GObject *
glade_editor_property_constructor (GType type,
guint n_construct_properties,
@@ -217,7 +289,6 @@
{
GObject *obj;
GladeEditorProperty *eprop;
- gchar *text;
/* Invoke parent constructor (eprop->klass should be resolved by this point) . */
obj = G_OBJECT_CLASS (table_class)->constructor
@@ -225,13 +296,6 @@
eprop = GLADE_EDITOR_PROPERTY (obj);
- /* Create label */
- text = g_strdup_printf ("%s:", eprop->klass->name);
- eprop->item_label = gtk_label_new (text);
- g_free (text);
-
- gtk_misc_set_alignment (GTK_MISC (eprop->item_label), 1.0, 0.5);
-
/* Create hbox and possibly check button
*/
if (eprop->klass->optional)
@@ -246,14 +310,25 @@
/* Create the class specific input widget and add it */
eprop->input = GLADE_EDITOR_PROPERTY_GET_CLASS (eprop)->create_input (eprop);
gtk_widget_show (eprop->input);
- gtk_box_pack_start (GTK_BOX (eprop), eprop->input, TRUE, TRUE, 0);
/* Create the informational button and add it */
eprop->info = glade_editor_property_create_info_button (eprop);
g_signal_connect (G_OBJECT (eprop->info), "clicked",
G_CALLBACK (glade_editor_property_info_clicked_cb), eprop);
+ /* Create the warning icon and add it */
+ eprop->warning = glade_editor_property_create_warning_icon (eprop);
+
+ /* Create label */
+ eprop->item_label = gtk_hbox_new (FALSE, 4);
+ eprop->label = gtk_label_new (NULL);
+ gtk_misc_set_alignment (GTK_MISC (eprop->label), 1.0, 0.5);
+ gtk_box_pack_start (GTK_BOX (eprop->item_label), eprop->label, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (eprop->item_label), eprop->warning, FALSE, TRUE, 0);
+
+ glade_editor_property_fix_label (eprop);
+ gtk_box_pack_start (GTK_BOX (eprop), eprop->input, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (eprop), eprop->info, FALSE, FALSE, 2);
return obj;
@@ -330,6 +405,7 @@
eprop->sensitive_id = 0;
eprop->changed_id = 0;
eprop->enabled_id = 0;
+ eprop->state_id = 0;
eprop->property = NULL;
glade_editor_property_load (eprop, NULL);
@@ -364,14 +440,15 @@
if (eprop->changed_id > 0)
g_signal_handler_disconnect (eprop->property,
eprop->changed_id);
- if (eprop->enabled_id > 0)
+ if (eprop->state_id > 0)
g_signal_handler_disconnect (eprop->property,
- eprop->enabled_id);
+ eprop->state_id);
eprop->tooltip_id = 0;
eprop->sensitive_id = 0;
eprop->changed_id = 0;
eprop->enabled_id = 0;
+ eprop->state_id = 0;
/* Unref it here */
g_object_weak_unref (G_OBJECT (eprop->property),
@@ -415,6 +492,12 @@
"notify::enabled",
G_CALLBACK (glade_editor_property_enabled_cb),
eprop);
+ eprop->state_id =
+ g_signal_connect (G_OBJECT (eprop->property),
+ "notify::state",
+ G_CALLBACK (glade_editor_property_state_cb),
+ eprop);
+
/* In query dialogs when the user hits cancel,
* these babies go away (so better stay protected).
@@ -426,7 +509,11 @@
/* Load initial tooltips
*/
glade_editor_property_tooltip_cb
- (property, glade_property_get_tooltip (property), eprop);
+ (property,
+ property->klass->tooltip,
+ property->insensitive_tooltip,
+ property->support_warning,
+ eprop);
/* Load initial enabled state
*/
@@ -435,6 +522,10 @@
/* Load initial sensitive state.
*/
glade_editor_property_sensitivity_cb (property, NULL, eprop);
+
+ /* Load intial label state
+ */
+ glade_editor_property_state_cb (property, NULL, eprop);
}
}
Modified: trunk/gladeui/glade-editor-property.h
==============================================================================
--- trunk/gladeui/glade-editor-property.h (original)
+++ trunk/gladeui/glade-editor-property.h Thu Apr 10 04:10:11 2008
@@ -85,8 +85,15 @@
GladeProperty *property; /* The currently loaded property
*/
- GtkWidget *item_label; /* Name of property (need a handle to set visual insensitive state)
+ GtkWidget *item_label; /* The property name portion of the eprop
*/
+
+ GtkWidget *label; /* The actual property name label
+ */
+
+ GtkWidget *warning; /* Icon to show warnings
+ */
+
GtkWidget *input; /* Input part of property (need to set sensitivity seperately)
*/
@@ -100,6 +107,7 @@
gulong sensitive_id; /* signal connection id for sensitivity changes */
gulong changed_id; /* signal connection id for value changes */
gulong enabled_id; /* signal connection id for enable/disable changes */
+ gulong state_id; /* signal connection id for state changes */
gboolean loading; /* True during glade_editor_property_load calls, this
* is used to avoid feedback from input widgets.
Modified: trunk/gladeui/glade-editor.c
==============================================================================
--- trunk/gladeui/glade-editor.c (original)
+++ trunk/gladeui/glade-editor.c Thu Apr 10 04:10:11 2008
@@ -488,21 +488,35 @@
static void
glade_editor_table_append_class_field (GladeEditorTable *table)
{
- GtkWidget *label;
- GtkWidget *class_entry;
+ GtkWidget *label, *class_label, *icon;
+ GtkWidget *hbox_class_value, *hbox_class_name;
- /* Class */
+
+ hbox_class_name = gtk_hbox_new (FALSE, 4);
label = gtk_label_new (_("Class:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
- gtk_widget_show (label);
+ gtk_box_pack_start (GTK_BOX (hbox_class_name), label, TRUE, TRUE, 0);
- class_entry = gtk_entry_new ();
- gtk_entry_set_text (GTK_ENTRY (class_entry), table->adaptor->name);
- gtk_editable_set_editable (GTK_EDITABLE (class_entry), FALSE);
- gtk_widget_show (class_entry);
-
- glade_editor_table_attach (table->table_widget, label, 0, table->rows);
- glade_editor_table_attach (table->table_widget, class_entry, 1, table->rows);
+ table->warning = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
+ GTK_ICON_SIZE_MENU);
+ gtk_widget_set_no_show_all (table->warning, TRUE);
+ gtk_box_pack_start (GTK_BOX (hbox_class_name), table->warning, FALSE, TRUE, 0);
+ gtk_widget_show_all (hbox_class_name);
+
+ hbox_class_value = gtk_hbox_new (FALSE, 2);
+ icon = gtk_image_new_from_icon_name
+ (table->adaptor->icon_name, GTK_ICON_SIZE_MENU);
+ gtk_box_pack_start (GTK_BOX (hbox_class_value), icon, FALSE, TRUE, 4);
+
+ class_label = gtk_label_new (table->adaptor->name);
+ gtk_misc_set_alignment (GTK_MISC (class_label), 0.0, 0.5);
+ gtk_box_pack_start (GTK_BOX (hbox_class_value), class_label, TRUE, TRUE, 0);
+ gtk_widget_show_all (hbox_class_value);
+
+ /* FIXME: find a better way to pack this. */
+ gtk_widget_set_size_request (hbox_class_value, -1, 25);
+ glade_editor_table_attach (table->table_widget, hbox_class_name, 0, table->rows);
+ glade_editor_table_attach (table->table_widget, hbox_class_value, 1, table->rows);
table->rows++;
}
@@ -878,6 +892,26 @@
}
static void
+glade_editor_update_class_warning_cb (GladeWidget *widget,
+ GParamSpec *pspec,
+ GladeEditor *editor)
+{
+ GladeEditorTable *table;
+
+ if (!(table = glade_editor_get_table_from_class
+ (editor, editor->loaded_adaptor, TABLE_TYPE_GENERAL)))
+ return;
+
+ if (widget->support_warning)
+ gtk_widget_show (table->warning);
+ else
+ gtk_widget_hide (table->warning);
+
+ gtk_widget_set_tooltip_text (table->warning, widget->support_warning);
+}
+
+
+static void
glade_editor_load_widget_real (GladeEditor *editor, GladeWidget *widget)
{
GladeWidgetAdaptor *adaptor;
@@ -890,7 +924,10 @@
project = glade_widget_get_project (editor->loaded_widget);
g_signal_handler_disconnect (G_OBJECT (project),
editor->project_closed_signal_id);
+ g_signal_handler_disconnect (G_OBJECT (editor->loaded_widget),
+ editor->widget_warning_id);
}
+
/* Load the GladeWidgetClass */
adaptor = widget ? widget->adaptor : NULL;
if (editor->loaded_adaptor != adaptor || adaptor == NULL)
@@ -924,11 +961,18 @@
editor->loaded_widget = widget;
editor->loading = FALSE;
+ /* Update warning once */
+ glade_editor_update_class_warning_cb (widget, NULL, editor);
+
/* Connect to new widget */
project = glade_widget_get_project (editor->loaded_widget);
editor->project_closed_signal_id =
g_signal_connect (G_OBJECT (project), "close",
G_CALLBACK (glade_editor_close_cb), editor);
+ editor->widget_warning_id =
+ g_signal_connect (G_OBJECT (widget), "notify::support-warning",
+ G_CALLBACK (glade_editor_update_class_warning_cb),
+ editor);
}
/**
@@ -1237,7 +1281,7 @@
text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (desc_view));
gtk_tree_model_get (model, &iter, COLUMN_PROPERTY, &property, -1);
gtk_text_buffer_set_text (text_buffer,
- property ? glade_property_get_tooltip (property) : message,
+ property ? property->klass->tooltip : message,
-1);
if (property)
g_object_unref (G_OBJECT (property));
Modified: trunk/gladeui/glade-editor.h
==============================================================================
--- trunk/gladeui/glade-editor.h (original)
+++ trunk/gladeui/glade-editor.h Thu Apr 10 04:10:11 2008
@@ -102,6 +102,8 @@
gulong project_closed_signal_id; /* Unload widget when widget's project closes.
*/
+ gulong widget_warning_id; /* Update when widget changes warning messages.
+ */
GtkWidget *reset_button; /* The reset button
*/
@@ -156,6 +158,11 @@
* we load into the inputs inside this table
* the information about the selected widget.
*/
+
+ GtkWidget *warning; /* A pointer to an icon we can show in the class
+ * property to publish tooltips for class related
+ * versioning errors.
+ */
GtkWidget *name_entry; /* A pointer to the gtk_entry that holds
* the name of the widget. This is the
Modified: trunk/gladeui/glade-project.c
==============================================================================
--- trunk/gladeui/glade-project.c (original)
+++ trunk/gladeui/glade-project.c Thu Apr 10 04:10:11 2008
@@ -465,19 +465,6 @@
/*******************************************************************
Initializers
*******************************************************************/
-static void
-glade_project_set_target_version (GladeProject *project,
- const gchar *catalog,
- gint major,
- gint minor)
-{
- g_hash_table_insert (project->priv->target_versions_major,
- g_strdup (catalog),
- GINT_TO_POINTER (major));
- g_hash_table_insert (project->priv->target_versions_minor,
- g_strdup (catalog),
- GINT_TO_POINTER (minor));
-}
static void
glade_project_get_target_version (GladeProject *project,
@@ -494,6 +481,160 @@
}
static void
+glade_project_target_version_for_adaptor (GladeProject *project,
+ GladeWidgetAdaptor *adaptor,
+ gint *major,
+ gint *minor)
+{
+ gchar *catalog = NULL;
+
+ g_object_get (adaptor, "catalog", &catalog, NULL);
+ glade_project_get_target_version (project, catalog, major, minor);
+ g_free (catalog);
+}
+
+static void
+glade_project_verify_adaptor (GladeProject *project,
+ GladeWidgetAdaptor *adaptor,
+ const gchar *path_name,
+ GString *string,
+ gboolean saving,
+ gboolean forwidget)
+{
+ GladeWidgetAdaptor *adaptor_iter;
+ gint target_major, target_minor;
+ gchar *catalog = NULL;
+
+ for (adaptor_iter = adaptor; adaptor_iter;
+ adaptor_iter = glade_widget_adaptor_get_parent_adaptor (adaptor_iter))
+ {
+
+ g_object_get (adaptor_iter, "catalog", &catalog, NULL);
+ glade_project_target_version_for_adaptor (project, adaptor_iter,
+ &target_major,
+ &target_minor);
+
+ if (target_major < GWA_VERSION_SINCE_MAJOR (adaptor_iter) ||
+ (target_major == GWA_VERSION_SINCE_MAJOR (adaptor_iter) &&
+ target_minor < GWA_VERSION_SINCE_MINOR (adaptor_iter)))
+ {
+ if (forwidget)
+ {
+ g_string_append_printf
+ (string,
+ _("This widget was introduced in %s %d.%d "
+ "project targets %s %d.%d"),
+ catalog,
+ GWA_VERSION_SINCE_MAJOR (adaptor_iter),
+ GWA_VERSION_SINCE_MINOR (adaptor_iter),
+ catalog, target_major, target_minor);
+ }
+ else
+ g_string_append_printf
+ (string,
+ _("[%s] Object class '%s' was introduced in %s %d.%d\n"),
+ path_name, adaptor_iter->title, catalog,
+ GWA_VERSION_SINCE_MAJOR (adaptor_iter),
+ GWA_VERSION_SINCE_MINOR (adaptor_iter));
+ }
+
+ if (project->priv->format == GLADE_PROJECT_FORMAT_GTKBUILDER &&
+ GWA_BUILDER_UNSUPPORTED (adaptor_iter))
+ {
+ if (forwidget)
+ {
+ if (string->len)
+ g_string_append (string, "\n");
+ g_string_append_printf
+ (string,
+ _("This widget is not supported by GtkBuilder"));
+ }
+ else
+ g_string_append_printf
+ (string,
+ _("[%s] Object class '%s' from %s %d.%d "
+ "is not supported by GtkBuilder\n"),
+ path_name, adaptor_iter->title, catalog,
+ target_major, target_minor);
+ }
+
+ if (!saving && GWA_DEPRECATED (adaptor_iter))
+ {
+ if (forwidget)
+ {
+ if (string->len)
+ g_string_append (string, "\n");
+ g_string_append_printf
+ (string, _("This widget is deprecated"));
+ }
+ else
+ g_string_append_printf
+ (string,
+ _("[%s] Object class '%s' from %s %d.%d "
+ "is deprecated\n"),
+ path_name, adaptor_iter->title, catalog,
+ target_major, target_minor);
+ }
+ g_free (catalog);
+ }
+}
+
+static void
+glade_project_verify_widget_for_ui (GladeWidget *widget)
+{
+ GString *string = g_string_new (NULL);
+
+ glade_project_verify_adaptor (widget->project,
+ widget->adaptor,
+ NULL,
+ string,
+ FALSE,
+ TRUE);
+
+ if (string->len > 0)
+ glade_widget_set_support_warning (widget, string->str);
+ else
+ glade_widget_set_support_warning (widget, NULL);
+
+ g_string_free (string, TRUE);
+}
+
+static void
+glade_project_verify_project_for_ui (GladeProject *project)
+{
+ GList *list;
+ GladeWidget *widget;
+
+ /* Sync displayable info here */
+ for (list = project->priv->objects; list; list = list->next)
+ {
+ widget = glade_widget_get_from_gobject (list->data);
+
+ glade_project_verify_widget_for_ui (widget);
+ glade_project_verify_properties (widget);
+
+ }
+}
+
+static void
+glade_project_set_target_version (GladeProject *project,
+ const gchar *catalog,
+ gint major,
+ gint minor)
+{
+
+ g_hash_table_insert (project->priv->target_versions_major,
+ g_strdup (catalog),
+ GINT_TO_POINTER (major));
+ g_hash_table_insert (project->priv->target_versions_minor,
+ g_strdup (catalog),
+ GINT_TO_POINTER (minor));
+
+ glade_project_verify_project_for_ui (project);
+
+}
+
+static void
glade_project_init (GladeProject *project)
{
GladeProjectPrivate *priv;
@@ -1030,8 +1171,250 @@
*/
glade_project_fix_object_props (project);
- return TRUE;
+ /* Update ui with versioning info
+ */
+ glade_project_verify_project_for_ui (project);
+
+ return TRUE;
+
+}
+
+
+
+static void
+glade_project_verify_property (GladeProperty *property,
+ const gchar *path_name,
+ GString *string,
+ gboolean forwidget)
+{
+ GladeWidgetAdaptor *adaptor;
+ gint target_major, target_minor;
+ gchar *catalog, *tooltip;
+
+ if (glade_property_original_default (property) && !forwidget)
+ return;
+
+ adaptor = GLADE_WIDGET_ADAPTOR (property->klass->origin_handle);
+
+ g_object_get (adaptor, "catalog", &catalog, NULL);
+ glade_project_target_version_for_adaptor (property->widget->project, adaptor,
+ &target_major,
+ &target_minor);
+
+ if (target_major < property->klass->version_since_major ||
+ (target_major == property->klass->version_since_major &&
+ target_minor < property->klass->version_since_minor))
+ {
+ if (forwidget)
+ {
+ tooltip = g_strdup_printf
+ (_("This property was introduced in %s %d.%d, "
+ "project targets %s %d.%d"),
+ catalog,
+ property->klass->version_since_major,
+ property->klass->version_since_minor,
+ catalog,
+ target_major, target_minor);
+
+ glade_property_set_support_warning (property, tooltip);
+ g_free (tooltip);
+ }
+ else
+ g_string_append_printf
+ (string,
+ property->klass->packing ?
+ _("[%s] Packing property '%s' of object class '%s' was "
+ "introduced in %s %d.%d\n") :
+ _("[%s] Property '%s' of object class '%s' was "
+ "introduced in %s %d.%d\n"),
+ path_name,
+ property->klass->name,
+ adaptor->title, catalog,
+ property->klass->version_since_major,
+ property->klass->version_since_minor);
+ }
+ else if (forwidget)
+ glade_property_set_support_warning (property, NULL);
+
+ g_free (catalog);
+
+}
+
+
+static void
+glade_project_verify_properties_internal (GladeWidget *widget,
+ const gchar *path_name,
+ GString *string,
+ gboolean forwidget)
+{
+ GList *list;
+ GladeProperty *property;
+
+ for (list = widget->properties; list; list = list->next)
+ {
+ property = list->data;
+ glade_project_verify_property (property, path_name, string, forwidget);
+ }
+
+ for (list = widget->packing_properties; list; list = list->next)
+ {
+ property = list->data;
+
+ g_assert (widget->parent);
+ property = list->data;
+ glade_project_verify_property (property, path_name, string, forwidget);
+ }
+}
+
+
+/**
+ * glade_project_verify_properties:
+ * @widget: A #GladeWidget
+ *
+ * Synchonizes @widget with user visible information
+ * about version compatability
+ */
+void
+glade_project_verify_properties (GladeWidget *widget)
+{
+ g_return_if_fail (GLADE_IS_WIDGET (widget));
+ glade_project_verify_properties_internal (widget, NULL, NULL, TRUE);
+}
+
+static void
+glade_project_verify_signal (GladeWidget *widget,
+ GladeSignal *signal,
+ const gchar *path_name,
+ GString *string)
+{
+ GladeSignalClass *signal_class;
+ gint target_major, target_minor;
+ gchar *catalog;
+
+ signal_class =
+ glade_widget_adaptor_get_signal_class (widget->adaptor,
+ signal->name);
+ g_assert (signal_class);
+ g_assert (signal_class->adaptor);
+
+ g_object_get (signal_class->adaptor, "catalog", &catalog, NULL);
+ glade_project_target_version_for_adaptor (widget->project,
+ signal_class->adaptor,
+ &target_major,
+ &target_minor);
+
+ if (target_major < signal_class->version_since_major ||
+ (target_major == signal_class->version_since_major &&
+ target_minor < signal_class->version_since_minor))
+ g_string_append_printf
+ (string,
+ _("[%s] Signal '%s' of object class '%s' was "
+ "introduced in %s %d.%d\n"),
+ path_name,
+ signal->name,
+ signal_class->adaptor->title,
+ catalog,
+ signal_class->version_since_major,
+ signal_class->version_since_minor);
+
+ g_free (catalog);
+}
+
+
+static void
+glade_project_verify_signals (GladeWidget *widget,
+ const gchar *path_name,
+ GString *string)
+{
+ GladeSignal *signal;
+ GList *signals, *list;
+
+ if ((signals = glade_widget_get_signal_list (widget)) != NULL)
+ {
+ for (list = signals; list; list = list->next)
+ {
+ signal = list->data;
+ glade_project_verify_signal (widget, signal, path_name, string);
+ }
+ g_list_free (signals);
+ }
+}
+
+static gboolean
+glade_project_verify_dialog (GladeProject *project,
+ GString *string,
+ gboolean saving)
+{
+ GtkWidget *swindow;
+ GtkWidget *textview;
+ GtkWidget *expander;
+ GtkTextBuffer *buffer;
+ gchar *name;
+ gboolean ret;
+
+ swindow = gtk_scrolled_window_new (NULL, NULL);
+ textview = gtk_text_view_new ();
+ buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview));
+ expander = gtk_expander_new (_("Details"));
+
+ gtk_text_buffer_set_text (buffer, string->str, -1);
+
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swindow),
+ textview);
+ gtk_container_add (GTK_CONTAINER (expander), swindow);
+ gtk_widget_show_all (expander);
+
+ gtk_widget_set_size_request (swindow, 800, -1);
+
+ name = glade_project_get_name (project);
+ ret = glade_util_ui_message (glade_app_get_window (),
+ saving ? GLADE_UI_YES_OR_NO : GLADE_UI_INFO,
+ expander,
+ saving ?
+ _("Project %s has errors, save anyway ?") :
+ _("Project %s has deprecated widgets "
+ "and/or version mismatches."), name);
+ g_free (name);
+
+ return ret;
+}
+
+
+static gboolean
+glade_project_verify (GladeProject *project,
+ gboolean saving)
+{
+ GString *string = g_string_new (NULL);
+ GladeWidget *widget;
+ GList *list;
+ gboolean ret = TRUE;
+ gchar *path_name;
+
+ for (list = project->priv->objects; list; list = list->next)
+ {
+ widget = glade_widget_get_from_gobject (list->data);
+
+ path_name = glade_widget_generate_path_name (widget);
+
+ glade_project_verify_adaptor (project, widget->adaptor,
+ path_name, string, saving, FALSE);
+ glade_project_verify_properties_internal (widget, path_name, string, FALSE);
+ glade_project_verify_signals (widget, path_name, string);
+
+ g_free (path_name);
+ }
+
+ if (string->len > 0)
+ {
+ ret = glade_project_verify_dialog (project, string, saving);
+
+ if (!saving)
+ ret = FALSE;
+ }
+
+ g_string_free (string, TRUE);
+ return ret;
}
@@ -1164,7 +1547,6 @@
{
GladeWidget *gwidget;
GList *list, *children;
- GtkWindow *transient_parent;
static gint reentrancy_count = 0;
g_return_if_fail (GLADE_IS_PROJECT (project));
@@ -1174,7 +1556,6 @@
if (GLADE_IS_PLACEHOLDER (object))
return;
-
/* Only widgets accounted for in the catalog or widgets declared
* in the plugin with glade_widget_new_for_internal_child () are
* usefull in the project.
@@ -1186,7 +1567,6 @@
if (glade_project_has_object (project, object))
return;
-
/* Police widget names here (just rename them on the way in the project)
*/
if (glade_project_get_widget_by_name (project, gwidget->name) != NULL)
@@ -1221,17 +1601,18 @@
glade_project_signals [ADD_WIDGET],
0, gwidget);
- if (GTK_IS_WINDOW (object) &&
- (transient_parent = glade_app_get_transient_parent ()) != NULL)
- gtk_window_set_transient_for (GTK_WINDOW (object), transient_parent);
+ /* Update user visible compatability info */
+ glade_project_verify_properties (gwidget);
/* Notify widget it was added to the project */
glade_widget_project_notify (gwidget, project);
- /* Call this once at the end for every recursive call */
+ /* Run this once at the end for every recursive call */
if (--reentrancy_count == 0)
+ {
glade_project_sync_resources_for_widget
(project, old_project, gwidget, FALSE);
+ }
}
/**
@@ -1904,269 +2285,6 @@
g_list_free (resources);
}
-static void
-glade_project_target_version_for_adaptor (GladeProject *project,
- GladeWidgetAdaptor *adaptor,
- gint *major,
- gint *minor)
-{
- gchar *catalog = NULL;
-
- g_object_get (adaptor, "catalog", &catalog, NULL);
- glade_project_get_target_version (project, catalog, major, minor);
- g_free (catalog);
-}
-
-static void
-glade_project_verify_property (GladeProperty *property,
- const gchar *path_name,
- GString *string,
- gboolean packing)
-{
- GladeWidgetAdaptor *adaptor;
- gint target_major, target_minor;
- gchar *catalog;
-
- adaptor = GLADE_WIDGET_ADAPTOR (property->klass->origin_handle);
-
- g_object_get (adaptor, "catalog", &catalog, NULL);
- glade_project_target_version_for_adaptor (property->widget->project, adaptor,
- &target_major,
- &target_minor);
-
- if (target_major < property->klass->version_since_major ||
- (target_major == property->klass->version_since_major &&
- target_minor < property->klass->version_since_minor))
- g_string_append_printf
- (string,
- packing ?
- _("[%s] Packing property '%s' of object class '%s' was "
- "introduced in %s %d.%d\n") :
- _("[%s] Property '%s' of object class '%s' was "
- "introduced in %s %d.%d\n"),
- path_name,
- property->klass->name,
- adaptor->title, catalog,
- property->klass->version_since_major,
- property->klass->version_since_minor);
-
- g_free (catalog);
-
-}
-
-
-static void
-glade_project_verify_properties (GladeWidget *widget,
- const gchar *path_name,
- GString *string)
-{
- GList *list;
- GladeProperty *property;
-
- for (list = widget->properties; list; list = list->next)
- {
- property = list->data;
- glade_project_verify_property (property, path_name, string, FALSE);
- }
-
- for (list = widget->packing_properties; list; list = list->next)
- {
- property = list->data;
-
- g_assert (widget->parent);
- property = list->data;
- glade_project_verify_property (property, path_name, string, FALSE);
- }
-}
-
-static void
-glade_project_verify_signal (GladeWidget *widget,
- GladeSignal *signal,
- const gchar *path_name,
- GString *string)
-{
- GladeSignalClass *signal_class;
- gint target_major, target_minor;
- gchar *catalog;
-
- signal_class =
- glade_widget_adaptor_get_signal_class (widget->adaptor,
- signal->name);
- g_assert (signal_class);
- g_assert (signal_class->adaptor);
-
- g_object_get (signal_class->adaptor, "catalog", &catalog, NULL);
- glade_project_target_version_for_adaptor (widget->project,
- signal_class->adaptor,
- &target_major,
- &target_minor);
-
- if (target_major < signal_class->version_since_major ||
- (target_major == signal_class->version_since_major &&
- target_minor < signal_class->version_since_minor))
- g_string_append_printf
- (string,
- _("[%s] Signal '%s' of object class '%s' was "
- "introduced in %s %d.%d\n"),
- path_name,
- signal->name,
- signal_class->adaptor->title,
- catalog,
- signal_class->version_since_major,
- signal_class->version_since_minor);
-
- g_free (catalog);
-}
-
-
-static void
-glade_project_verify_signals (GladeWidget *widget,
- const gchar *path_name,
- GString *string)
-{
- GladeSignal *signal;
- GList *signals, *list;
-
- if ((signals = glade_widget_get_signal_list (widget)) != NULL)
- {
- for (list = signals; list; list = list->next)
- {
- signal = list->data;
- glade_project_verify_signal (widget, signal, path_name, string);
- }
- g_list_free (signals);
- }
-}
-
-static gboolean
-glade_project_verify_dialog (GladeProject *project,
- GString *string,
- gboolean saving)
-{
- GtkWidget *swindow;
- GtkWidget *textview;
- GtkWidget *expander;
- GtkTextBuffer *buffer;
- gchar *name;
- gboolean ret;
-
- swindow = gtk_scrolled_window_new (NULL, NULL);
- textview = gtk_text_view_new ();
- buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview));
- expander = gtk_expander_new (_("Details"));
-
- gtk_text_buffer_set_text (buffer, string->str, -1);
-
- gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swindow),
- textview);
- gtk_container_add (GTK_CONTAINER (expander), swindow);
- gtk_widget_show_all (expander);
-
- gtk_widget_set_size_request (swindow, 800, -1);
-
- name = glade_project_get_name (project);
- ret = glade_util_ui_message (glade_app_get_window (),
- saving ? GLADE_UI_YES_OR_NO : GLADE_UI_INFO,
- expander,
- saving ?
- _("Project %s has errors, save anyway ?") :
- _("Project %s has deprecated widgets "
- "and/or version mismatches."), name);
- g_free (name);
-
- return ret;
-}
-
-static void
-glade_project_verify_adaptor (GladeProject *project,
- GladeWidgetAdaptor *adaptor,
- const gchar *path_name,
- GString *string,
- gboolean saving)
-{
- GladeWidgetAdaptor *adaptor_iter;
- gint target_major, target_minor;
- gchar *catalog = NULL;
-
- for (adaptor_iter = adaptor; adaptor_iter;
- adaptor_iter = glade_widget_adaptor_get_parent_adaptor (adaptor_iter))
- {
-
- g_object_get (adaptor_iter, "catalog", &catalog, NULL);
- glade_project_target_version_for_adaptor (project, adaptor_iter,
- &target_major,
- &target_minor);
-
- if (target_major < GWA_VERSION_SINCE_MAJOR (adaptor_iter) ||
- (target_major == GWA_VERSION_SINCE_MAJOR (adaptor_iter) &&
- target_minor < GWA_VERSION_SINCE_MINOR (adaptor_iter)))
- g_string_append_printf
- (string,
- _("[%s] Object class '%s' was introduced in %s %d.%d\n"),
- path_name, adaptor_iter->title, catalog,
- GWA_VERSION_SINCE_MAJOR (adaptor_iter),
- GWA_VERSION_SINCE_MINOR (adaptor_iter));
-
- if (project->priv->format == GLADE_PROJECT_FORMAT_GTKBUILDER &&
- GWA_BUILDER_UNSUPPORTED (adaptor_iter))
- g_string_append_printf
- (string,
- _("[%s] Object class '%s' from %s %d.%d is not supported "
- "by GtkBuilder\n"),
- path_name, adaptor_iter->title, catalog,
- target_major, target_minor);
-
- if (!saving && GWA_DEPRECATED (adaptor_iter))
- g_string_append_printf
- (string,
- _("[%s] Object class '%s' from %s %d.%d is deprecated\n"),
- path_name, adaptor_iter->title, catalog,
- target_major, target_minor);
-
- g_free (catalog);
- }
-
-}
-
-
-static gboolean
-glade_project_verify (GladeProject *project,
- gboolean saving)
-{
- GString *string = g_string_new (NULL);
- GladeWidget *widget;
- GList *list;
- gboolean ret = TRUE;
- gchar *path_name;
-
- for (list = project->priv->objects; list; list = list->next)
- {
- widget = glade_widget_get_from_gobject (list->data);
-
- path_name = glade_widget_generate_path_name (widget);
-
- glade_project_verify_adaptor (project, widget->adaptor,
- path_name, string, saving);
- glade_project_verify_properties (widget, path_name, string);
- glade_project_verify_signals (widget, path_name, string);
-
- g_free (path_name);
- }
-
- if (string->len > 0)
- {
- ret = glade_project_verify_dialog (project, string, saving);
-
- if (!saving)
- ret = FALSE;
- }
-
- g_string_free (string, TRUE);
-
- return ret;
-}
-
-
/**
* glade_project_save:
* @project: a #GladeProject
@@ -2743,6 +2861,8 @@
g_return_if_fail (GLADE_IS_PROJECT (project));
project->priv->format = format;
+
+ glade_project_verify_project_for_ui (project);
}
GladeProjectFormat
@@ -2988,7 +3108,7 @@
dialog = gtk_dialog_new_with_buttons (title,
GTK_WINDOW (glade_app_get_window ()),
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_OK,
GTK_RESPONSE_ACCEPT,
NULL);
Modified: trunk/gladeui/glade-project.h
==============================================================================
--- trunk/gladeui/glade-project.h (original)
+++ trunk/gladeui/glade-project.h Thu Apr 10 04:10:11 2008
@@ -172,6 +172,9 @@
void glade_project_preferences (GladeProject *project);
+void glade_project_verify_properties (GladeWidget *widget);
+
+
G_END_DECLS
#endif /* __GLADE_PROJECT_H__ */
Modified: trunk/gladeui/glade-property.c
==============================================================================
--- trunk/gladeui/glade-property.c (original)
+++ trunk/gladeui/glade-property.c Thu Apr 10 04:10:11 2008
@@ -71,7 +71,8 @@
PROP_SENSITIVE,
PROP_I18N_TRANSLATABLE,
PROP_I18N_HAS_CONTEXT,
- PROP_I18N_COMMENT
+ PROP_I18N_COMMENT,
+ PROP_STATE
};
static guint glade_property_signals[LAST_SIGNAL] = { 0 };
@@ -211,6 +212,32 @@
}
static void
+glade_property_fix_state (GladeProperty *property)
+{
+ property->state = GLADE_STATE_NORMAL;
+
+ if (!property->sensitive)
+ property->state = GLADE_STATE_NORMAL;
+ else if (property->support_warning)
+ {
+ if (glade_property_default (property))
+ property->state = GLADE_STATE_UNSUPPORTED;
+ else
+ property->state = GLADE_STATE_UNSUPPORTED_CHANGED;
+ }
+ else
+ {
+ if (glade_property_default (property))
+ property->state = GLADE_STATE_NORMAL;
+ else
+ property->state = GLADE_STATE_CHANGED;
+ }
+
+ g_object_notify (G_OBJECT (property), "state");
+}
+
+
+static void
glade_property_set_value_impl (GladeProperty *property, const GValue *value)
{
GladeProject *project = property->widget ?
@@ -270,11 +297,15 @@
GLADE_PROPERTY_GET_KLASS (property)->sync (property);
+ glade_property_fix_state (property);
+
if (changed && property->widget)
{
g_signal_emit (G_OBJECT (property),
glade_property_signals[VALUE_CHANGED],
0, &old_value, property->value);
+
+ glade_project_verify_properties (property->widget);
}
g_value_unset (&old_value);
@@ -355,17 +386,6 @@
g_object_get_property (object, property->klass->id, property->value);
}
-static G_CONST_RETURN gchar *
-glade_property_get_tooltip_impl (GladeProperty *property)
-{
- gchar *tooltip = NULL;
- if (property->sensitive == FALSE)
- tooltip = property->insensitive_tooltip;
- else
- tooltip = property->klass->tooltip;
- return tooltip;
-}
-
/*******************************************************************************
GObjectClass & Object Construction
*******************************************************************************/
@@ -425,6 +445,9 @@
case PROP_I18N_COMMENT:
g_value_set_string (value, glade_property_i18n_get_comment (property));
break;
+ case PROP_STATE:
+ g_value_set_int (value, property->state);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -479,7 +502,6 @@
prop_class->get_default = glade_property_get_default_impl;
prop_class->sync = glade_property_sync_impl;
prop_class->load = glade_property_load_impl;
- prop_class->get_tooltip = glade_property_get_tooltip_impl;
prop_class->value_changed = NULL;
prop_class->tooltip_changed = NULL;
@@ -519,6 +541,16 @@
_("Whether or not the translatable string has a context prefix"),
FALSE, G_PARAM_READWRITE));
+ g_object_class_install_property
+ (object_class, PROP_STATE,
+ g_param_spec_int
+ ("state", _("Visual State"),
+ _("Priority information for the property editor to act on"),
+ GLADE_STATE_NORMAL,
+ GLADE_N_STATES - 1,
+ GLADE_STATE_NORMAL,
+ G_PARAM_READABLE));
+
/* Signal */
glade_property_signals[VALUE_CHANGED] =
g_signal_new ("value-changed",
@@ -537,8 +569,8 @@
G_STRUCT_OFFSET (GladePropertyKlass,
tooltip_changed),
NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
+ glade_marshal_VOID__STRING_STRING_STRING,
+ G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
}
@@ -1201,20 +1233,6 @@
glade_property_set (property, list);
}
-
-/**
- * glade_property_get_tooltip:
- * @property: a #GladeProperty
- *
- * Returns: The appropriate tooltip for the editor
- */
-G_CONST_RETURN gchar *
-glade_property_get_tooltip (GladeProperty *property)
-{
- g_return_val_if_fail (GLADE_IS_PROPERTY (property), NULL);
- return GLADE_PROPERTY_GET_KLASS (property)->get_tooltip (property);
-}
-
/* Parameters for translatable properties. */
void
glade_property_i18n_set_comment (GladeProperty *property,
@@ -1285,15 +1303,19 @@
if (property->sensitive != sensitive)
{
- gchar *tooltip;
property->sensitive = sensitive;
- tooltip = (gchar *)GLADE_PROPERTY_GET_KLASS
- (property)->get_tooltip (property);
+ /* Clear it */
+ if (sensitive)
+ property->insensitive_tooltip =
+ (g_free (property->insensitive_tooltip), NULL);
g_signal_emit (G_OBJECT (property),
glade_property_signals[TOOLTIP_CHANGED],
- 0, tooltip);
+ 0,
+ property->klass->tooltip,
+ property->insensitive_tooltip,
+ property->support_warning);
}
g_object_notify (G_OBJECT (property), "sensitive");
@@ -1306,6 +1328,27 @@
return property->sensitive;
}
+void
+glade_property_set_support_warning (GladeProperty *property,
+ const gchar *reason)
+{
+ g_return_if_fail (GLADE_IS_PROPERTY (property));
+
+ if (property->support_warning)
+ g_free (property->support_warning);
+ property->support_warning = g_strdup (reason);
+
+ g_signal_emit (G_OBJECT (property),
+ glade_property_signals[TOOLTIP_CHANGED],
+ 0,
+ property->klass->tooltip,
+ property->insensitive_tooltip,
+ property->support_warning);
+
+ glade_property_fix_state (property);
+}
+
+
/**
* glade_property_set_save_always:
* @property: A #GladeProperty
Modified: trunk/gladeui/glade-property.h
==============================================================================
--- trunk/gladeui/glade-property.h (original)
+++ trunk/gladeui/glade-property.h Thu Apr 10 04:10:11 2008
@@ -15,6 +15,14 @@
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 @@
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 @@
* 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 @@
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 @@
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);
Modified: trunk/gladeui/glade-signal.c
==============================================================================
--- trunk/gladeui/glade-signal.c (original)
+++ trunk/gladeui/glade-signal.c Thu Apr 10 04:10:11 2008
@@ -158,7 +158,6 @@
GLADE_XML_TAG_SIGNAL_TRUE);
g_free (name);
- return TRUE;
}
Modified: trunk/gladeui/glade-widget.c
==============================================================================
--- trunk/gladeui/glade-widget.c (original)
+++ trunk/gladeui/glade-widget.c Thu Apr 10 04:10:11 2008
@@ -91,7 +91,8 @@
PROP_TEMPLATE,
PROP_REASON,
PROP_TOPLEVEL_WIDTH,
- PROP_TOPLEVEL_HEIGHT
+ PROP_TOPLEVEL_HEIGHT,
+ PROP_SUPPORT_WARNING
};
static guint glade_widget_signals[LAST_SIGNAL] = {0};
@@ -902,6 +903,9 @@
case PROP_TOPLEVEL_HEIGHT:
g_value_set_int (value, widget->height);
break;
+ case PROP_SUPPORT_WARNING:
+ g_value_set_string (value, widget->support_warning);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1084,6 +1088,12 @@
-1,
G_PARAM_READWRITE));
+ g_object_class_install_property
+ (object_class, PROP_SUPPORT_WARNING,
+ g_param_spec_string ("support warning", _("Support Warning"),
+ _("A warning string about version mismatches"),
+ NULL, G_PARAM_READABLE));
+
/**
* GladeWidget::add-signal-handler:
* @gladewidget: the #GladeWidget which received the signal.
@@ -4089,3 +4099,16 @@
return g_string_free (string, FALSE);
}
+void
+glade_widget_set_support_warning (GladeWidget *widget,
+ const gchar *warning)
+{
+ g_return_if_fail (GLADE_IS_WIDGET (widget));
+
+ if (widget->support_warning)
+ g_free (widget->support_warning);
+ widget->support_warning = g_strdup (warning);
+
+ g_object_notify (G_OBJECT (widget), "support-warning");
+}
+
Modified: trunk/gladeui/glade-widget.h
==============================================================================
--- trunk/gladeui/glade-widget.h (original)
+++ trunk/gladeui/glade-widget.h Thu Apr 10 04:10:11 2008
@@ -36,6 +36,10 @@
* button2. This is a unique name and is the one
* used when loading widget with libglade
*/
+
+ gchar *support_warning; /* A warning message for version incompatabilities
+ * in this widget
+ */
gchar *internal; /* If the widget is an internal child of
* another widget this is the name of the
@@ -395,6 +399,9 @@
void glade_widget_pop_superuser (void);
+void glade_widget_set_support_warning (GladeWidget *widget,
+ const gchar *warning);
+
G_END_DECLS
#endif /* __GLADE_WIDGET_H__ */
Modified: trunk/plugins/gtk+/gtk+.xml.in
==============================================================================
--- trunk/plugins/gtk+/gtk+.xml.in (original)
+++ trunk/plugins/gtk+/gtk+.xml.in Thu Apr 10 04:10:11 2008
@@ -266,7 +266,7 @@
<post-create-function>glade_gtk_window_post_create</post-create-function>
<properties>
- <property id="opacity" since="2.12"/>
+ <property id="opacity" since="2.12" ignore="True"/>
<property id="startup-id" since="2.12"/>
<property id="deletable" since="2.10"/>
<property id="transient-for" since="2.10"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]