[easytag/wip/application-window: 9/12] Remove the cancel button from the preferences
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/application-window: 9/12] Remove the cancel button from the preferences
- Date: Tue, 22 Jul 2014 22:43:26 +0000 (UTC)
commit a5c3444cc0aab45eb5cc418b62212eb607212baa
Author: David King <amigadave amigadave com>
Date: Sat Jul 19 23:12:45 2014 +0100
Remove the cancel button from the preferences
As settings changes are applied instantly with GSettings, a cancel
button is not useful.
src/preferences_dialog.c | 31 +++++--------------------------
1 files changed, 5 insertions(+), 26 deletions(-)
---
diff --git a/src/preferences_dialog.c b/src/preferences_dialog.c
index cd3142d..f845045 100644
--- a/src/preferences_dialog.c
+++ b/src/preferences_dialog.c
@@ -304,10 +304,9 @@ create_preferences_dialog (EtPreferencesDialog *self)
gtk_window_set_title (GTK_WINDOW (self), _("Preferences"));
gtk_window_set_transient_for (GTK_WINDOW (self), GTK_WINDOW (MainWindow));
gtk_window_set_destroy_with_parent (GTK_WINDOW (self), TRUE);
- gtk_dialog_add_buttons (GTK_DIALOG (self), GTK_STOCK_CANCEL,
- GTK_RESPONSE_REJECT, GTK_STOCK_OK,
- GTK_RESPONSE_ACCEPT, NULL);
- gtk_dialog_set_default_response (GTK_DIALOG (self), GTK_RESPONSE_ACCEPT);
+ gtk_dialog_add_buttons (GTK_DIALOG (self), GTK_STOCK_CLOSE,
+ GTK_RESPONSE_CLOSE, NULL);
+ gtk_dialog_set_default_response (GTK_DIALOG (self), GTK_RESPONSE_CLOSE);
g_signal_connect (self, "response",
G_CALLBACK (et_preferences_on_response), NULL);
g_signal_connect (self, "delete-event",
@@ -1723,12 +1722,6 @@ Change_Id3_Settings_Toggled (GtkWidget *blah, EtPreferencesDialog *self)
gtk_widget_set_sensitive (priv->FileWritingId3v1IconvOptionsIgnore, active);
}
-/* Callback from et_preferences_dialog_on_response. */
-static void
-OptionsWindow_Quit (EtPreferencesDialog *self)
-{
-}
-
/*
* Check_Config: Check if config information are correct
* dsd: Check this... going from utf8 to raw is dodgy stuff
@@ -1877,16 +1870,7 @@ OptionsWindow_Save_Button (EtPreferencesDialog *self)
{
if (!Check_Config (self)) return;
- OptionsWindow_Quit (self);
- Statusbar_Message(_("Configuration saved"),TRUE);
-}
-
-/* Callback from et_preferences_dialog_on_response. */
-static void
-OptionsWindow_Cancel_Button (EtPreferencesDialog *self)
-{
- OptionsWindow_Quit (self);
- Statusbar_Message(_("Configuration unchanged"),TRUE);
+ gtk_widget_hide (GTK_WIDGET (self));
}
void
@@ -1918,15 +1902,10 @@ et_preferences_on_response (GtkDialog *dialog, gint response_id,
{
switch (response_id)
{
- case GTK_RESPONSE_ACCEPT:
+ case GTK_RESPONSE_CLOSE:
OptionsWindow_Save_Button (ET_PREFERENCES_DIALOG (dialog));
break;
case GTK_RESPONSE_DELETE_EVENT:
- OptionsWindow_Quit (ET_PREFERENCES_DIALOG (dialog));
- break;
- case GTK_RESPONSE_REJECT:
- OptionsWindow_Cancel_Button (ET_PREFERENCES_DIALOG (dialog));
- gtk_widget_hide (GTK_WIDGET (dialog));
break;
default:
g_assert_not_reached ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]