Patch by: Matt Keenan <matt.keenan@sun.com>
2008-09-26 Jens Granseuer <jensgr@gmx.net> Patch by: Matt Keenan <matt.keenan@sun.com> * xrandr-capplet.c: (show_error), (run_application): show an error dialog instead of crashing when initialization fails due to XRandR not being available (bug #553762) svn path=/trunk/; revision=9003
This commit is contained in:
parent
1aee7c2ad6
commit
a5f3fc3c41
2 changed files with 12 additions and 8 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2008-09-26 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
|
Patch by: Matt Keenan <matt.keenan@sun.com>
|
||||||
|
|
||||||
|
* xrandr-capplet.c: (show_error), (run_application): show an error
|
||||||
|
dialog instead of crashing when initialization fails due to XRandR
|
||||||
|
not being available (bug #553762)
|
||||||
|
|
||||||
==================== 2.24.0.1 ====================
|
==================== 2.24.0.1 ====================
|
||||||
|
|
||||||
2008-09-06 Jens Granseuer <jensgr@gmx.net>
|
2008-09-06 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
|
@ -62,25 +62,20 @@ struct App
|
||||||
static void rebuild_gui (App *app);
|
static void rebuild_gui (App *app);
|
||||||
static void on_rate_changed (GtkComboBox *box, gpointer data);
|
static void on_rate_changed (GtkComboBox *box, gpointer data);
|
||||||
|
|
||||||
#if 0
|
|
||||||
static void
|
static void
|
||||||
show_error (const GError *err)
|
show_error (const char *err)
|
||||||
{
|
{
|
||||||
if (!err)
|
|
||||||
return;
|
|
||||||
|
|
||||||
GtkWidget *dialog = gtk_message_dialog_new (
|
GtkWidget *dialog = gtk_message_dialog_new (
|
||||||
NULL,
|
NULL,
|
||||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
GTK_MESSAGE_WARNING,
|
GTK_MESSAGE_WARNING,
|
||||||
GTK_BUTTONS_OK, err->message);
|
GTK_BUTTONS_OK, err);
|
||||||
|
|
||||||
gtk_window_set_title (GTK_WINDOW (dialog), "");
|
gtk_window_set_title (GTK_WINDOW (dialog), "");
|
||||||
|
|
||||||
gtk_dialog_run (GTK_DIALOG (dialog));
|
gtk_dialog_run (GTK_DIALOG (dialog));
|
||||||
gtk_widget_destroy (dialog);
|
gtk_widget_destroy (dialog);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
do_free (gpointer data)
|
do_free (gpointer data)
|
||||||
|
@ -1726,7 +1721,8 @@ run_application (App *app)
|
||||||
on_screen_changed, app);
|
on_screen_changed, app);
|
||||||
if (!app->screen)
|
if (!app->screen)
|
||||||
{
|
{
|
||||||
g_error ("Could not get screen info");
|
g_warning (_("The X server does not support the XRANDR extension. Runtime resolution changes to the display size are not available."));
|
||||||
|
show_error (_("The X server does not support the XRANDR extension. Runtime resolution changes to the display size are not available."));
|
||||||
g_object_unref (xml);
|
g_object_unref (xml);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue