[glade/glade-3-16] Fixed bug #721098 "Anjuta hangs when opening project" The problem was that glade registered GtkOffsc
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade/glade-3-16] Fixed bug #721098 "Anjuta hangs when opening project" The problem was that glade registered GtkOffsc
- Date: Fri, 14 Mar 2014 22:25:22 +0000 (UTC)
commit 4efcd120779bf2af683a8f3bdd4fa87802881bf3
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Fri Mar 14 16:32:05 2014 -0300
Fixed bug #721098 "Anjuta hangs when opening project" The problem was that glade registered
GtkOffscreenWindow as a new type derived from GtkWindow to use in the run time which prevents Anjuta or any
of its pluggins to use the real GtkOffscreenWindow widget.
gladeui/glade-widget-adaptor.c: use glade_util_get_type_from_name() in generate_type()
to avoid stepping over types that are simply not instantiated yet like GtkOffscreenWindow
gladeui/glade-project.c: Use Adaptor name instead of runtime instance name to avoid
showing GladeFake* types used by the backend for virtual types.
gladeui/glade-project.c | 7 +++++--
gladeui/glade-widget-adaptor.c | 7 ++++---
plugins/gtk+/gtk+.xml.in | 37 +++++++++++++++++++++++--------------
3 files changed, 32 insertions(+), 19 deletions(-)
---
diff --git a/gladeui/glade-project.c b/gladeui/glade-project.c
index 4febc3c..7c54cf6 100644
--- a/gladeui/glade-project.c
+++ b/gladeui/glade-project.c
@@ -1044,8 +1044,11 @@ glade_project_model_get_value (GtkTreeModel *model,
g_value_set_string (value, glade_widget_get_name (widget));
break;
case GLADE_PROJECT_MODEL_COLUMN_TYPE_NAME:
- g_value_set_static_string (value, G_OBJECT_TYPE_NAME (glade_widget_get_object (widget)));
- break;
+ {
+ GladeWidgetAdaptor *adaptor = glade_widget_get_adaptor (widget);
+ g_value_set_static_string (value, glade_widget_adaptor_get_name (adaptor));
+ break;
+ }
case GLADE_PROJECT_MODEL_COLUMN_OBJECT:
g_value_set_object (value, glade_widget_get_object (widget));
break;
diff --git a/gladeui/glade-widget-adaptor.c b/gladeui/glade-widget-adaptor.c
index 032dffa..1411037 100644
--- a/gladeui/glade-widget-adaptor.c
+++ b/gladeui/glade-widget-adaptor.c
@@ -2187,7 +2187,8 @@ gwa_update_properties_from_type (GladeWidgetAdaptor *adaptor,
break;
}
- if (list == NULL && (spec = pspec_dup (specs[i])))
+ if (list == NULL && (specs[i]->flags & G_PARAM_WRITABLE) &&
+ (spec = pspec_dup (specs[i])))
{
property_class = glade_property_class_new (adaptor, spec->name);
@@ -2500,8 +2501,8 @@ generate_type (const char *name, const char *parent_name)
* This is currently used to instantiate GtkWindow as a GtkEventBox
* at runtime.
*/
- if (g_type_from_name (name))
- new_name = g_strdup_printf ("GladeFake%s", name);
+ if (glade_util_get_type_from_name (name, FALSE))
+ new_name = g_strconcat ("GladeFake", name, NULL);
else
new_name = NULL;
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index ad28d66..57c1195 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -800,30 +800,39 @@
-->
<property id="accel-groups" disabled="True"/>
<property id="opacity" disabled="True"/>
- <property id="startup-id" disabled="True"/>
- <property id="transient-for" disabled="True"/>
- <property id="icon" disabled="True"/>
- <property id="icon-name" disabled="True"/>
- <property id="gravity" disabled="True"/>
+ <property id="type" disabled="True"/>
+ <property id="title" disabled="True"/>
+ <property id="role" disabled="True"/>
+ <property id="resizable" disabled="True"/>
<property id="modal" disabled="True"/>
+ <property id="win-pos" disabled="True"/>
<property id="default-width" disabled="True"/>
<property id="default-height" disabled="True"/>
+ <property id="destroy-with-parent" disabled="True"/>
+ <property id="hide-titlebar-when-maximized" disabled="True"/>
+ <property id="icon" disabled="True"/>
+ <property id="icon-name" disabled="True"/>
+ <property id="screen" disabled="True"/>
<property id="type-hint" disabled="True"/>
- <property id="type" disabled="True"/>
- <property id="resizable" disabled="True" />
- <property id="decorated" disabled="True" />
- <property id="deletable" disabled="True"/>
- <property id="title" disabled="True"/>
- <property id="window-position" disabled="True"/>
<property id="skip-taskbar-hint" disabled="True"/>
<property id="skip-pager-hint" disabled="True"/>
<property id="urgency-hint" disabled="True"/>
- <property id="has-resize-grip" disabled="True"/>
- <property id="role" disabled="True"/>
<property id="accept-focus" disabled="True"/>
<property id="focus-on-map" disabled="True"/>
+ <property id="decorated" disabled="True"/>
+ <property id="deletable" disabled="True"/>
+ <property id="gravity" disabled="True"/>
+ <property id="transient-for" disabled="True"/>
+ <property id="attached-to" disabled="True"/>
+ <property id="has-resize-grip" disabled="True"/>
+ <property id="resize-grip-visible" disabled="True"/>
+ <property id="application" disabled="True"/>
+ <property id="is-active" disabled="True"/>
+ <property id="has-toplevel-focus" disabled="True"/>
+ <property id="startup-id" disabled="True"/>
<property id="mnemonics-visible" disabled="True"/>
- <property id="destroy-with-parent" disabled="True"/>
+ <property id="focus-visible" disabled="True"/>
+ <property id="is-maximized" disabled="True"/>
</properties>
</glade-widget-class>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]