fail gracefully if we cannot get a screen
2008-08-11 Jens Granseuer <jensgr@gmx.net> * xrandr-capplet.c: (run_application): fail gracefully if we cannot get a screen 2008-08-11 Jens Granseuer <jensgr@gmx.net> * configure.in: require gnome-desktop 2.23.90 svn path=/trunk/; revision=8852
This commit is contained in:
parent
fb36ebb3a3
commit
fc63bace52
4 changed files with 21 additions and 3 deletions
|
@ -1690,9 +1690,16 @@ run_application (App *app)
|
|||
return;
|
||||
}
|
||||
|
||||
app->screen = gnome_rr_screen_new (gdk_screen_get_default (),
|
||||
on_screen_changed, app);
|
||||
if (!app->screen)
|
||||
{
|
||||
g_error ("Could not get screen info");
|
||||
g_object_unref (xml);
|
||||
return;
|
||||
}
|
||||
|
||||
app->client = gconf_client_get_default ();
|
||||
app->screen = gnome_rr_screen_new (gdk_screen_get_default(),
|
||||
on_screen_changed, app);
|
||||
|
||||
app->dialog = glade_xml_get_widget (xml, "dialog");
|
||||
|
||||
|
@ -1785,6 +1792,8 @@ restart:
|
|||
}
|
||||
|
||||
gtk_widget_destroy (app->dialog);
|
||||
gnome_rr_screen_destroy (app->screen);
|
||||
g_object_unref (app->client);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue