summaryrefslogtreecommitdiff
path: root/gladeui/glade-editor-property.c
diff options
context:
space:
mode:
authorTristan Van Berkom <tvb@src.gnome.org>2008-10-26 08:12:09 +0000
committerTristan Van Berkom <tvb@src.gnome.org>2008-10-26 08:12:09 +0000
commit70d528b5ed5ceb4b5fcfc2601ff5b3e28acc0cf5 (patch)
tree9c3f5f91f499a1191040d2454672f49260704b2f /gladeui/glade-editor-property.c
parentb327ccf0f55ca0ca2a7912d868c7f3b135446174 (diff)
downloadglade-70d528b5ed5ceb4b5fcfc2601ff5b3e28acc0cf5.tar.gz
Added GtkToolButtonEditor editable implementation.
* plugins/gtk+/Makefile.am, plugins/gtk+/glade-tool-button-editor.[ch]: Added GtkToolButtonEditor editable implementation. * plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: Reimplemented toolbuttons from ground up. * gladeui/glade-editor-property.c: object dialog now doesnt do "new" for unmentioned abstract or uninstantiatable types, also enhanced dialog title. * gladeui/glade-project.c: Moved "parse-finished" emission to /after/ resolving object properties (doh !). svn path=/trunk/; revision=2003
Diffstat (limited to 'gladeui/glade-editor-property.c')
-rw-r--r--gladeui/glade-editor-property.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gladeui/glade-editor-property.c b/gladeui/glade-editor-property.c
index 0071040c..060292cd 100644
--- a/gladeui/glade-editor-property.c
+++ b/gladeui/glade-editor-property.c
@@ -2537,9 +2537,14 @@ static gchar *
glade_eprop_object_dialog_title (GladeEditorProperty *eprop)
{
GladeWidgetAdaptor *adaptor;
- const gchar *format =
- GLADE_IS_PARAM_SPEC_OBJECTS (eprop->klass->pspec) ?
- _("Choose %s(s) in this project") : _("Choose a %s in this project");
+ const gchar *format;
+
+ if (eprop->klass->parentless_widget)
+ format = GLADE_IS_PARAM_SPEC_OBJECTS (eprop->klass->pspec) ?
+ _("Choose parentless %s(s) in this project") : _("Choose a parentless %s in this project");
+ else
+ format = GLADE_IS_PARAM_SPEC_OBJECTS (eprop->klass->pspec) ?
+ _("Choose %s(s) in this project") : _("Choose a %s in this project");
if (GLADE_IS_PARAM_SPEC_OBJECTS (eprop->klass->pspec))
return g_strdup_printf (format, g_type_name
@@ -2576,7 +2581,9 @@ glade_eprop_object_show_dialog (GtkWidget *dialog_button,
{
if (eprop->property->klass->create_type)
create_adaptor = glade_widget_adaptor_get_by_name (eprop->property->klass->create_type);
- if (!create_adaptor)
+ if (!create_adaptor &&
+ G_TYPE_IS_INSTANTIATABLE (eprop->klass->pspec->value_type) &&
+ !G_TYPE_IS_ABSTRACT (eprop->klass->pspec->value_type))
create_adaptor = glade_widget_adaptor_get_by_type (eprop->klass->pspec->value_type);
}