[easytag/wip/application-window: 26/47] 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: 26/47] Remove the cancel button from the preferences
- Date: Fri, 15 Aug 2014 19:14:16 +0000 (UTC)
commit c61f2d845dbc096b57b135ba0b3404ad70257502
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 ab89d24..a0ad353 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",
@@ -1726,12 +1725,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
*
@@ -1885,16 +1878,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
@@ -1926,15 +1910,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]