[epiphany] ClearDataDialog: Default dialog to only clear cache.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ClearDataDialog: Default dialog to only clear cache.
- Date: Sun, 1 Nov 2015 15:30:19 +0000 (UTC)
commit 16521dc3eb4701259e923b9dbeb99de23482f0b8
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Oct 31 17:50:41 2015 +0100
ClearDataDialog: Default dialog to only clear cache.
The dialog was for now loaded with no checkbutton toggled, and was
hoping its creator to toggle the default state. As the dialog is
only used one time from the prefs-dialog, this function is unuseful.
https://bugzilla.gnome.org/show_bug.cgi?id=757414
src/clear-data-dialog.c | 30 ++----------------------------
src/clear-data-dialog.h | 12 ------------
src/prefs-dialog.c | 1 -
3 files changed, 2 insertions(+), 41 deletions(-)
---
diff --git a/src/clear-data-dialog.c b/src/clear-data-dialog.c
index 8046929..b1d4b35 100644
--- a/src/clear-data-dialog.c
+++ b/src/clear-data-dialog.c
@@ -42,7 +42,6 @@ struct ClearDataDialogPrivate
GtkWidget *cookies_checkbutton;
GtkWidget *clear_button;
- ClearDataDialogFlags flags;
guint num_checked;
};
@@ -157,36 +156,11 @@ clear_data_dialog_class_init (ClearDataDialogClass *klass)
}
static void
-update_flags (ClearDataDialog *dialog)
-{
- ClearDataDialogPrivate *priv = dialog->priv;
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->cookies_checkbutton),
- (priv->flags & CLEAR_DATA_COOKIES));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->passwords_checkbutton),
- (priv->flags & CLEAR_DATA_PASSWORDS));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->history_checkbutton),
- (priv->flags & CLEAR_DATA_HISTORY));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->cache_checkbutton),
- (priv->flags & CLEAR_DATA_CACHE));
-}
-
-static void
clear_data_dialog_init (ClearDataDialog *dialog)
{
dialog->priv = clear_data_dialog_get_instance_private (dialog);
gtk_widget_init_template (GTK_WIDGET (dialog));
- update_flags (dialog); // FIXME flags is unset at this moment...
-}
-
-void
-clear_data_dialog_set_flags (ClearDataDialog *dialog,
- ClearDataDialogFlags flags)
-{
- if (dialog->priv->flags != flags)
- {
- dialog->priv->flags = flags;
- update_flags (dialog);
- }
+ dialog->priv->num_checked = 0;
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->cache_checkbutton), TRUE);
}
diff --git a/src/clear-data-dialog.h b/src/clear-data-dialog.h
index 5106a61..b177c33 100644
--- a/src/clear-data-dialog.h
+++ b/src/clear-data-dialog.h
@@ -36,15 +36,6 @@ typedef struct ClearDataDialog ClearDataDialog;
typedef struct ClearDataDialogClass ClearDataDialogClass;
typedef struct ClearDataDialogPrivate ClearDataDialogPrivate;
-typedef enum
-{
- CLEAR_DATA_NONE = 0,
- CLEAR_DATA_CACHE = 1 << 0,
- CLEAR_DATA_PASSWORDS = 1 << 1,
- CLEAR_DATA_HISTORY = 1 << 2,
- CLEAR_DATA_COOKIES = 1 << 4
-} ClearDataDialogFlags;
-
struct ClearDataDialog
{
GtkDialog parent;
@@ -60,9 +51,6 @@ struct ClearDataDialogClass
GType clear_data_dialog_get_type (void);
-void clear_data_dialog_set_flags (ClearDataDialog *dialog,
- ClearDataDialogFlags flags);
-
G_END_DECLS
#endif
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 578b158..136936c 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -962,7 +962,6 @@ clear_personal_data_button_clicked_cb (GtkWidget *button,
clear_dialog = g_object_new (EPHY_TYPE_CLEAR_DATA_DIALOG,
"use-header-bar", TRUE,
NULL);
- clear_data_dialog_set_flags (clear_dialog, CLEAR_DATA_CACHE);
gtk_window_set_transient_for (GTK_WINDOW (clear_dialog), GTK_WINDOW (dialog));
gtk_window_set_modal (GTK_WINDOW (clear_dialog), TRUE);
gtk_window_present (GTK_WINDOW (clear_dialog));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]