diff options
Diffstat (limited to 'plugins/dfinput')
| -rw-r--r-- | plugins/dfinput/cfg-gtk2.c | 15 | ||||
| -rw-r--r-- | plugins/dfinput/dfinput.glade2 | 18 |
2 files changed, 29 insertions, 4 deletions
diff --git a/plugins/dfinput/cfg-gtk2.c b/plugins/dfinput/cfg-gtk2.c index a0e34647..c2013833 100644 --- a/plugins/dfinput/cfg-gtk2.c +++ b/plugins/dfinput/cfg-gtk2.c @@ -213,6 +213,13 @@ static void UpdateKey() { } static void OnConfigExit(GtkWidget *widget, gpointer user_data) { + gtk_widget_destroy(widget); + SDL_Quit(); + + gtk_exit(0); +} + +static void OnConfigOk(GtkWidget *widget, gpointer user_data) { SaveConfig(); gtk_widget_destroy(widget); @@ -560,9 +567,13 @@ long PADconfigure() { g_signal_connect_data(GTK_OBJECT(widget), "delete_event", GTK_SIGNAL_FUNC(OnConfigExit), NULL, NULL, G_CONNECT_AFTER); - widget = glade_xml_get_widget(xml, "btnclose"); + widget = glade_xml_get_widget(xml, "btncancel"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnConfigExit), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btnok"); g_signal_connect_data(GTK_OBJECT(widget), "clicked", - GTK_SIGNAL_FUNC(OnConfigExit), xml, NULL, G_CONNECT_AFTER); + GTK_SIGNAL_FUNC(OnConfigOk), xml, NULL, G_CONNECT_AFTER); PopulateDevList(); UpdateKeyList(); diff --git a/plugins/dfinput/dfinput.glade2 b/plugins/dfinput/dfinput.glade2 index c7bdd114..e7958be0 100644 --- a/plugins/dfinput/dfinput.glade2 +++ b/plugins/dfinput/dfinput.glade2 @@ -463,8 +463,8 @@ Analog Pad</property> <property name="visible">True</property> <property name="layout_style">end</property> <child> - <widget class="GtkButton" id="btnclose"> - <property name="label">gtk-close</property> + <widget class="GtkButton" id="btncancel"> + <property name="label">gtk-cancel</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -476,6 +476,20 @@ Analog Pad</property> <property name="position">0</property> </packing> </child> + <child> + <widget class="GtkButton" id="btnok"> + <property name="label">gtk-ok</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> </widget> <packing> <property name="expand">False</property> |
