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 <federico@novell.com>
This commit is contained in:
Federico Mena Quintero 2010-03-10 12:17:53 -06:00
parent e7d0577a61
commit 8c7020b832
2 changed files with 23 additions and 2 deletions

View file

@ -351,6 +351,21 @@
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">False</property> <property name="fill">False</property>
<property name="position">0</property> <property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="make_default_button">
<property name="label" translatable="yes">Make Default</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -365,7 +380,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">False</property> <property name="fill">False</property>
<property name="position">1</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -380,7 +395,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">False</property> <property name="fill">False</property>
<property name="position">2</property> <property name="position">3</property>
</packing> </packing>
</child> </child>
</object> </object>
@ -394,6 +409,7 @@
</child> </child>
<action-widgets> <action-widgets>
<action-widget response="-11">helpbutton1</action-widget> <action-widget response="-11">helpbutton1</action-widget>
<action-widget response="1">make_default_button</action-widget>
<action-widget response="-10">apply_button</action-widget> <action-widget response="-10">apply_button</action-widget>
<action-widget response="-7">button2</action-widget> <action-widget response="-7">button2</action-widget>
</action-widgets> </action-widgets>

View file

@ -77,6 +77,11 @@ struct App
} apply_configuration_state; } 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 rebuild_gui (App *app);
static void on_clone_changed (GtkWidget *box, gpointer data); static void on_clone_changed (GtkWidget *box, gpointer data);
static void on_rate_changed (GtkComboBox *box, gpointer data); static void on_rate_changed (GtkComboBox *box, gpointer data);