<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
- <object class="GtkButton" id="button2">
- <property name="label" translatable="yes">gtk-apply</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button1">
- <property name="label" translatable="yes">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
<object class="GtkButton" id="button3">
- <property name="label" translatable="yes">gtk-ok</property>
+ <property name="label" translatable="yes">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="has_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">0</property>
</packing>
</child>
</object>
</object>
</child>
<action-widgets>
- <action-widget response="-10">button2</action-widget>
- <action-widget response="-6">button1</action-widget>
<action-widget response="-5">button3</action-widget>
</action-widgets>
</object>
"DVB"));
this.sections.add (new FolderPrefSection (this.builder,
config));
-
- this.dialog.response += this.on_response;
- this.dialog.delete_event += (dialog, event) => {
- Gtk.main_quit ();
- return false;
- };
-
- this.dialog.show_all ();
-
}
- private void on_response (Dialog dialog, int response_id) {
- switch (response_id) {
- case ResponseType.CANCEL:
- Gtk.main_quit ();
- break;
- case ResponseType.OK:
- apply_settings ();
- Gtk.main_quit ();
- break;
- case ResponseType.APPLY:
- apply_settings ();
- break;
- }
- }
+ public void run () {
+ this.dialog.run ();
- private void apply_settings () {
foreach (var section in this.sections) {
section.save ();
}
}
- public new void run () {
- Gtk.main ();
- }
-
public static int main (string[] args) {
Gtk.init (ref args);