don't crash if glade file is not available
2007-05-06 Jens Granseuer <jensgr@gmx.net> * sound-properties-capplet.c: (create_dialog), (main): don't crash if glade file is not available svn path=/trunk/; revision=7561
This commit is contained in:
parent
c40974353b
commit
b21871170d
2 changed files with 23 additions and 12 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-05-06 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
|
* sound-properties-capplet.c: (create_dialog), (main): don't crash if
|
||||||
|
glade file is not available
|
||||||
|
|
||||||
2007-05-06 Jens Granseuer <jensgr@gmx.net>
|
2007-05-06 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
* sound-properties-capplet.c: (create_dialog):
|
* sound-properties-capplet.c: (create_dialog):
|
||||||
|
|
|
@ -163,6 +163,9 @@ create_dialog (void)
|
||||||
GtkWidget *widget, *box, *view, *image;
|
GtkWidget *widget, *box, *view, *image;
|
||||||
|
|
||||||
dialog = glade_xml_new (GNOMECC_GLADE_DIR "/sound-properties.glade", "sound_prefs_dialog", NULL);
|
dialog = glade_xml_new (GNOMECC_GLADE_DIR "/sound-properties.glade", "sound_prefs_dialog", NULL);
|
||||||
|
if (dialog == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
widget = glade_xml_get_widget (dialog, "sound_prefs_dialog");
|
widget = glade_xml_get_widget (dialog, "sound_prefs_dialog");
|
||||||
|
|
||||||
props = sound_properties_new ();
|
props = sound_properties_new ();
|
||||||
|
@ -1013,7 +1016,7 @@ int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
GConfChangeSet *changeset;
|
GConfChangeSet *changeset;
|
||||||
GladeXML *dialog = NULL;
|
GladeXML *dialog;
|
||||||
GnomeProgram *program;
|
GnomeProgram *program;
|
||||||
GOptionContext *context;
|
GOptionContext *context;
|
||||||
gboolean apply_only = FALSE;
|
gboolean apply_only = FALSE;
|
||||||
|
@ -1058,8 +1061,10 @@ main (int argc, char **argv)
|
||||||
if (get_legacy) {
|
if (get_legacy) {
|
||||||
get_legacy_settings ();
|
get_legacy_settings ();
|
||||||
} else {
|
} else {
|
||||||
changeset = gconf_change_set_new ();
|
|
||||||
dialog = create_dialog ();
|
dialog = create_dialog ();
|
||||||
|
|
||||||
|
if (dialog) {
|
||||||
|
changeset = gconf_change_set_new ();
|
||||||
setup_dialog (dialog, changeset);
|
setup_dialog (dialog, changeset);
|
||||||
setup_devices ();
|
setup_devices ();
|
||||||
|
|
||||||
|
@ -1073,6 +1078,7 @@ main (int argc, char **argv)
|
||||||
gconf_change_set_unref (changeset);
|
gconf_change_set_unref (changeset);
|
||||||
g_object_unref (dialog);
|
g_object_unref (dialog);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
g_object_unref (gconf_client);
|
g_object_unref (gconf_client);
|
||||||
g_object_unref (program);
|
g_object_unref (program);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue