[monkey-bubble: 378/753] New property. (ensure_properties_handler): Don't call



commit 3a3f24ed0287377d136320778a181164af4818dc
Author: Martin Baulig <baulig suse de>
Date:   Mon Jun 4 16:19:58 2001 +0000

    New property. (ensure_properties_handler): Don't call
    
    2001-06-04  Martin Baulig  <baulig suse de>
    
    	* gnome-entry-component.c (PROP_IS_FILE_ENTRY): New property.
    	(ensure_properties_handler): Don't call gnome_selector_get_ambient_properties().
    
    	* gnome-image-entry-component.c
    	(PROP_IS_PIXMAP_ENTRY, PROP_PREVIEW_X, PROP_PREVIEW_Y): New properties.
    	(ensure_properties_handler): Don't call gnome_selector_get_ambient_properties().
    
    	* libgnomeui-components.c: Make this work with the new GnomeSelectorWidget.

 components/ChangeLog                  |   11 +++++++++
 components/GNOME_UI_Components.oaf.in |   39 +++++++++++++++++++++++++++++++-
 components/libgnomeui-components.c    |   28 ++++++++++++++++++++---
 3 files changed, 72 insertions(+), 6 deletions(-)
---
diff --git a/components/ChangeLog b/components/ChangeLog
index 91400fb..7061347 100644
--- a/components/ChangeLog
+++ b/components/ChangeLog
@@ -1,3 +1,14 @@
+2001-06-04  Martin Baulig  <baulig suse de>
+
+	* gnome-entry-component.c (PROP_IS_FILE_ENTRY): New property.
+	(ensure_properties_handler): Don't call gnome_selector_get_ambient_properties().
+
+	* gnome-image-entry-component.c
+	(PROP_IS_PIXMAP_ENTRY, PROP_PREVIEW_X, PROP_PREVIEW_Y): New properties.
+	(ensure_properties_handler): Don't call gnome_selector_get_ambient_properties().
+
+	* libgnomeui-components.c: Make this work with the new GnomeSelectorWidget.
+
 2001-06-03  Martin Baulig  <baulig suse de>
 
 	* gnome-entry-component.[ch]: New files.
diff --git a/components/GNOME_UI_Components.oaf.in b/components/GNOME_UI_Components.oaf.in
index 99670cc..2f0326d 100644
--- a/components/GNOME_UI_Components.oaf.in
+++ b/components/GNOME_UI_Components.oaf.in
@@ -8,21 +8,48 @@
 	<oaf_attribute name="name" type="string" value="GNOME UI Components Factory"/>
 </oaf_server>
 
-<oaf_server iid="OAFIID:GNOME_UI_Component_Entry" type="factory" location="OAFIID:GNOME_UI_Components_Factory">
+<oaf_server iid="OAFIID:GNOME_UI_Component_EntryFactory" type="factory" location="OAFIID:GNOME_UI_Components_Factory">
 	<oaf_attribute name="repo_ids" type="stringv">
 		<item value="IDL:GNOME/SelectorFactory:1.0"/>
 		<item value="IDL:Bonobo/ItemContainer:1.0"/>
 		<item value="IDL:Bonobo/Unknown:1.0"/>
 	</oaf_attribute>
+	<oaf_attribute name="name" type="string" value="GNOME Entry Factory"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:GNOME_UI_Component_Entry" type="factory" location="OAFIID:GNOME_UI_Components_Factory">
+	<oaf_attribute name="repo_ids" type="stringv">
+		<item value="IDL:GNOME/Selector:1.0"/>
+		<item value="IDL:Bonobo/Control:1.0"/>
+		<item value="IDL:Bonobo/Unknown:1.0"/>
+	</oaf_attribute>
 	<oaf_attribute name="name" type="string" value="GNOME Entry"/>
 </oaf_server>
 
-<oaf_server iid="OAFIID:GNOME_UI_Component_IconSelector" type="factory" location="OAFIID:GNOME_UI_Components_Factory">
+<oaf_server iid="OAFIID:GNOME_UI_Component_FileEntry" type="factory" location="OAFIID:GNOME_UI_Components_Factory">
+	<oaf_attribute name="repo_ids" type="stringv">
+		<item value="IDL:GNOME/Selector:1.0"/>
+		<item value="IDL:Bonobo/Control:1.0"/>
+		<item value="IDL:Bonobo/Unknown:1.0"/>
+	</oaf_attribute>
+	<oaf_attribute name="name" type="string" value="GNOME File Entry"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:GNOME_UI_Component_IconSelectorFactory" type="factory" location="OAFIID:GNOME_UI_Components_Factory">
 	<oaf_attribute name="repo_ids" type="stringv">
 		<item value="IDL:GNOME/SelectorFactory:1.0"/>
 		<item value="IDL:Bonobo/ItemContainer:1.0"/>
 		<item value="IDL:Bonobo/Unknown:1.0"/>
 	</oaf_attribute>
+	<oaf_attribute name="name" type="string" value="GNOME Icon Selector Factory"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:GNOME_UI_Component_IconSelector" type="factory" location="OAFIID:GNOME_UI_Components_Factory">
+	<oaf_attribute name="repo_ids" type="stringv">
+		<item value="IDL:GNOME/Selector:1.0"/>
+		<item value="IDL:Bonobo/Control:1.0"/>
+		<item value="IDL:Bonobo/Unknown:1.0"/>
+	</oaf_attribute>
 	<oaf_attribute name="name" type="string" value="GNOME Icon Selector"/>
 </oaf_server>
 
@@ -35,4 +62,12 @@
 	<oaf_attribute name="name" type="string" value="GNOME Image Entry"/>
 </oaf_server>
 
+<oaf_server iid="OAFIID:GNOME_UI_Component_ImageEntry_Item" type="factory" location="OAFIID:GNOME_UI_Components_Factory">
+	<oaf_attribute name="repo_ids" type="stringv">
+		<item value="IDL:Bonobo/ItemContainer:1.0"/>
+		<item value="IDL:Bonobo/Unknown:1.0"/>
+	</oaf_attribute>
+	<oaf_attribute name="name" type="string" value="GNOME Image Entry"/>
+</oaf_server>
+
 </oaf_info>
diff --git a/components/libgnomeui-components.c b/components/libgnomeui-components.c
index fc58864..8e45a06 100644
--- a/components/libgnomeui-components.c
+++ b/components/libgnomeui-components.c
@@ -54,9 +54,9 @@ image_entry_get_object_fn (BonoboItemHandler *h, const char *item_name,
 
 	if (!strcmp (option->key, "type")) {
 	    is_pixmap_entry = !strcmp (option->value, "pixmap");
-	} else if (!strcmp (option->key, "preview_x")) {
+	} else if (!strcmp (option->key, "preview-x")) {
 	    preview_x = atoi (option->value);
-	} else if (!strcmp (option->key, "preview_y")) {
+	} else if (!strcmp (option->key, "preview-y")) {
 	    preview_y = atoi (option->value);
 	} else {
 	    g_warning (G_STRLOC ": unknown option `%s'", option->key);
@@ -82,6 +82,8 @@ image_entry_get_object_fn (BonoboItemHandler *h, const char *item_name,
 
     bonobo_item_options_free (options);
 
+    bonobo_object_dump_interfaces (BONOBO_OBJECT (selector));
+
     return BONOBO_OBJREF (selector);
 }
 
@@ -96,12 +98,18 @@ libgnomeui_components_factory (BonoboGenericFactory *this,
 	initialized = TRUE;             
     }
 
-    if (!strcmp (object_id, "OAFIID:GNOME_UI_Component_IconSelector")) {
+    if (!strcmp (object_id, "OAFIID:GNOME_UI_Component_IconSelectorFactory")) {
 	GnomeSelectorFactory *factory;
 
 	factory = gnome_selector_factory_new (gnome_icon_selector_component_get_type ());
 
 	return BONOBO_OBJECT (factory);
+    } else if (!strcmp (object_id, "OAFIID:GNOME_UI_Component_IconSelector")) {
+	GnomeSelector *selector;
+
+	selector = g_object_new (gnome_icon_selector_component_get_type (), NULL);
+
+	return BONOBO_OBJECT (selector);
     } else if (!strcmp (object_id, "OAFIID:GNOME_UI_Component_ImageEntry")) {
 	GnomeSelectorFactory *factory;
 
@@ -114,12 +122,24 @@ libgnomeui_components_factory (BonoboGenericFactory *this,
 	item_handler = bonobo_item_handler_new (NULL, image_entry_get_object_fn, NULL);
 
 	return BONOBO_OBJECT (item_handler);
-    } else if (!strcmp (object_id, "OAFIID:GNOME_UI_Component_Entry")) {
+    } else if (!strcmp (object_id, "OAFIID:GNOME_UI_Component_EntryFactory")) {
 	GnomeSelectorFactory *factory;
 
 	factory = gnome_selector_factory_new (gnome_entry_component_get_type ());
 
 	return BONOBO_OBJECT (factory);
+    } else if (!strcmp (object_id, "OAFIID:GNOME_UI_Component_Entry")) {
+	GnomeSelector *selector;
+
+	selector = g_object_new (gnome_entry_component_get_type (), "is-file-entry", FALSE, NULL);
+
+	return BONOBO_OBJECT (selector);
+    } else if (!strcmp (object_id, "OAFIID:GNOME_UI_Component_FileEntry")) {
+	GnomeSelector *selector;
+
+	selector = g_object_new (gnome_entry_component_get_type (), "is-file-entry", TRUE, NULL);
+
+	return BONOBO_OBJECT (selector);
     } else
 	g_warning ("Failing to manufacture a '%s'", object_id);
         



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]