diff options
author | Federico Mena Quintero <federico@novell.com> | 2010-03-19 16:44:01 -0600 |
---|---|---|
committer | Federico Mena Quintero <federico@novell.com> | 2010-03-19 16:44:01 -0600 |
commit | c30ff27d1f0d8ea5ad17a3699ef57c027dcad9d8 (patch) | |
tree | e4abe17121009db2db642f03a6ec923e761b2018 | |
parent | 54391e5713b1cc20f082ba1be8940c920bb6c880 (diff) | |
download | gnome-control-center-randr-set-as-default.tar.gz |
Show a success dialog when the configuration is savedrandr-set-as-default
Signed-off-by: Federico Mena Quintero <federico@novell.com>
-rw-r--r-- | capplets/display/xrandr-capplet.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/capplets/display/xrandr-capplet.c b/capplets/display/xrandr-capplet.c index b3c0f2165..190481342 100644 --- a/capplets/display/xrandr-capplet.c +++ b/capplets/display/xrandr-capplet.c @@ -2297,6 +2297,23 @@ apply_button_clicked_cb (GtkButton *button, gpointer data) } static void +success_dialog_for_make_default (App *app) +{ + GtkWidget *dialog; + + dialog = gtk_message_dialog_new (GTK_WINDOW (app->dialog), + GTK_DIALOG_MODAL, + GTK_MESSAGE_INFO, + GTK_BUTTONS_OK, + _("The monitor configuration has been saved")); + gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), + _("This configuration will be used the next time someone logs in.")); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); +} + +static void make_default (App *app) { char *command_line; @@ -2322,8 +2339,11 @@ make_default (App *app) dest_basename); error = NULL; + /* FIXME: pick up stderr and present it nicely in case of error */ if (!g_spawn_command_line_sync (command_line, NULL, NULL, NULL, &error)) error_message (app, _("Could not set the default configuration for monitors"), error ? error->message : NULL); + else + success_dialog_for_make_default (app); g_free (dest_filename); g_free (dest_basename); |