Use bonobo_object_unref rather than gtk_object_destroy
2001-07-09 Bradford Hovinen <hovinen@ximian.com> * bonobo-config-archiver.c (bonobo_config_archiver_new): Use bonobo_object_unref rather than gtk_object_destroy * bonobo-moniker-archiver.c (archiver_resolve): Allow PropertyBag interface as well (parse_name): Set *location to NULL when there is no location * sound-properties.xml: Use 0 and 1 rather than true and false * capplet-dir.c (capplet_control_launch): Don't convert underscores to dashes in moniker
This commit is contained in:
parent
c09362e12a
commit
2c2fafbaad
8 changed files with 27 additions and 14 deletions
|
@ -1,7 +1,15 @@
|
|||
2001-07-09 Bradford Hovinen <hovinen@ximian.com>
|
||||
|
||||
* bonobo-config-archiver.c (bonobo_config_archiver_new): Use
|
||||
bonobo_object_unref rather than gtk_object_destroy
|
||||
|
||||
* bonobo-moniker-archiver.c (archiver_resolve): Allow PropertyBag
|
||||
interface as well
|
||||
(parse_name): Set *location to NULL when there is no location
|
||||
|
||||
* archive.c (archive_load): Use .gnome/capplet-archive rather than
|
||||
.gnome/control-center
|
||||
(archive_set_current_location): Removed unused variables
|
||||
|
||||
* bonobo-config-archiver.c (bonobo_config_archiver_new): Try to
|
||||
load the defaults file if no rollback data can be found
|
||||
|
|
|
@ -437,7 +437,7 @@ archive_get_current_location (Archive *archive)
|
|||
void
|
||||
archive_set_current_location (Archive *archive, Location *location)
|
||||
{
|
||||
GList *backends1, *backends2, *backends, *tmp;
|
||||
GList *backends;
|
||||
Location *old_location = archive_get_current_location (archive);
|
||||
|
||||
g_return_if_fail (archive != NULL);
|
||||
|
|
|
@ -646,7 +646,7 @@ bonobo_config_archiver_new (const char *backend_id, const char *location_id)
|
|||
archiver_db->location = archive_get_location (archive, location_id);
|
||||
|
||||
if (archiver_db->location == NULL) {
|
||||
gtk_object_destroy (GTK_OBJECT (archiver_db));
|
||||
bonobo_object_unref (BONOBO_OBJECT (archiver_db));
|
||||
return CORBA_OBJECT_NIL;
|
||||
}
|
||||
|
||||
|
@ -664,7 +664,7 @@ bonobo_config_archiver_new (const char *backend_id, const char *location_id)
|
|||
g_free (filename);
|
||||
|
||||
if (archiver_db->doc == NULL) {
|
||||
gtk_object_destroy (GTK_OBJECT (archiver_db));
|
||||
bonobo_object_unref (BONOBO_OBJECT (archiver_db));
|
||||
return CORBA_OBJECT_NIL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ parse_name (const gchar *name, gchar **backend_id, gchar **location)
|
|||
*backend_id = g_strdup (e + 1);
|
||||
} else {
|
||||
*backend_id = g_strdup (name);
|
||||
*location = NULL;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -62,7 +63,9 @@ archiver_resolve (BonoboMoniker *moniker,
|
|||
const gchar *name;
|
||||
gchar *backend_id, *location;
|
||||
|
||||
if (strcmp (requested_interface, "IDL:Bonobo/ConfigDatabase:1.0")) {
|
||||
if (strcmp (requested_interface, "IDL:Bonobo/ConfigDatabase:1.0") &&
|
||||
strcmp (requested_interface, "IDL:Bonobo/PropertyBag:1.0"))
|
||||
{
|
||||
EX_SET_NOT_FOUND (ev);
|
||||
return CORBA_OBJECT_NIL;
|
||||
}
|
||||
|
@ -75,10 +78,8 @@ archiver_resolve (BonoboMoniker *moniker,
|
|||
|
||||
|
||||
if (parent != CORBA_OBJECT_NIL) {
|
||||
|
||||
pdb = Bonobo_Moniker_resolve (parent, options,
|
||||
"IDL:Bonobo/ConfigDatabase:1.0",
|
||||
ev);
|
||||
requested_interface, ev);
|
||||
|
||||
bonobo_object_release_unref (parent, NULL);
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
2001-07-09 Bradford Hovinen <hovinen@ximian.com>
|
||||
|
||||
* sound-properties.xml: Use 0 and 1 rather than true and false
|
||||
|
||||
* sound-properties-capplet.c (create_control_cb): Implement
|
||||
(main): Use create_control_cb
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<bonobo-config>
|
||||
<section path="bonobo-conf-test">
|
||||
<entry name="start_esd" type="boolean" value="false"/>
|
||||
<entry name="event_sounds" type="boolean" value="true"/>
|
||||
<entry name="start_esd" type="boolean" value="0"/>
|
||||
<entry name="event_sounds" type="boolean" value="1"/>
|
||||
</section>
|
||||
</bonobo-config>
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
(capplet_ok_cb): Ditto.
|
||||
(capplet_control_launch): Don't use a BonoboArg when setting the
|
||||
property
|
||||
(capplet_control_launch): Don't convert underscores to dashes in
|
||||
moniker
|
||||
|
||||
* Makefile.am (INCLUDES): Update directory locations
|
||||
|
||||
|
|
|
@ -417,16 +417,17 @@ capplet_control_launch (const gchar *capplet_name)
|
|||
|
||||
tmp = g_strdup (capplet_name);
|
||||
if ((tmp1 = strstr (tmp, "-capplet")) != NULL) *tmp1 = '\0';
|
||||
moniker = g_strconcat ("archiver:", tmp, NULL);
|
||||
while ((tmp1 = strchr (tmp, '-'))) *tmp1 = '_';
|
||||
|
||||
oaf_iid = g_strconcat ("OAFIID:Bonobo_Control_Capplet_", tmp, NULL);
|
||||
g_free (tmp);
|
||||
|
||||
property_control = bonobo_get_object (oaf_iid, "IDL:Bonobo/PropertyControl:1.0", &ev);
|
||||
g_free (oaf_iid);
|
||||
|
||||
if (BONOBO_EX (&ev) || property_control == CORBA_OBJECT_NIL) {
|
||||
g_critical ("Could not resolve PropertyControl");
|
||||
g_free (tmp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -435,7 +436,7 @@ capplet_control_launch (const gchar *capplet_name)
|
|||
if (BONOBO_EX (&ev) || property_control == CORBA_OBJECT_NIL) {
|
||||
g_critical ("Could not extract control from PropertyControl");
|
||||
bonobo_object_release_unref (property_control, &ev);
|
||||
g_free (tmp);
|
||||
g_free (moniker);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -447,13 +448,12 @@ capplet_control_launch (const gchar *capplet_name)
|
|||
if (control == NULL) {
|
||||
g_critical ("Could not create widget from control");
|
||||
gtk_widget_destroy (app);
|
||||
g_free (moniker);
|
||||
app = NULL;
|
||||
} else {
|
||||
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (app)->vbox), control, TRUE, TRUE, 0);
|
||||
|
||||
moniker = g_strconcat ("archiver:", tmp, NULL);
|
||||
bonobo_widget_set_property (BONOBO_WIDGET (control), "moniker", moniker, NULL);
|
||||
g_free (moniker);
|
||||
|
||||
gtk_widget_show_all (app);
|
||||
}
|
||||
|
@ -462,7 +462,7 @@ capplet_control_launch (const gchar *capplet_name)
|
|||
gnome_dialog_button_connect (GNOME_DIALOG (app), 1, GTK_SIGNAL_FUNC (capplet_cancel_cb), app);
|
||||
|
||||
CORBA_exception_free (&ev);
|
||||
g_free (tmp);
|
||||
g_free (moniker);
|
||||
|
||||
return app;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue