From 8c7020b8324f8c15100a7dff2225958ae3b8f83b Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 10 Mar 2010 12:17:53 -0600 Subject: [PATCH] Add a 'Make Default' button This button will use a PolicyKit helper to save the display configuration to a systemwide file. Signed-off-by: Federico Mena Quintero --- capplets/display/display-capplet.ui | 20 ++++++++++++++++++-- capplets/display/xrandr-capplet.c | 5 +++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/capplets/display/display-capplet.ui b/capplets/display/display-capplet.ui index 09672824d..82ed92bd4 100644 --- a/capplets/display/display-capplet.ui +++ b/capplets/display/display-capplet.ui @@ -351,6 +351,21 @@ False False 0 + True + + + + + Make Default + True + True + True + True + + + False + False + 1 @@ -365,7 +380,7 @@ False False - 1 + 2 @@ -380,7 +395,7 @@ False False - 2 + 3 @@ -394,6 +409,7 @@ helpbutton1 + make_default_button apply_button button2 diff --git a/capplets/display/xrandr-capplet.c b/capplets/display/xrandr-capplet.c index aa5917a4a..9fb95b7ba 100644 --- a/capplets/display/xrandr-capplet.c +++ b/capplets/display/xrandr-capplet.c @@ -77,6 +77,11 @@ struct App } apply_configuration_state; }; +/* Response codes for custom buttons in the main dialog */ +enum { + RESPONSE_MAKE_DEFAULT = 1 +}; + static void rebuild_gui (App *app); static void on_clone_changed (GtkWidget *box, gpointer data); static void on_rate_changed (GtkComboBox *box, gpointer data);