aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-encoding-dialog.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-10-25 01:05:21 +0800
committerChristian Persch <chpe@src.gnome.org>2003-10-25 01:05:21 +0800
commit0408961cb808d25737540c65ce3503e12d1d2205 (patch)
treea1a884abbc08a9a0cd2cccefff18efaf5d94a32f /src/ephy-encoding-dialog.c
parent3f06c2cd8f49d72dfde45c08c24b398e56ea6d87 (diff)
downloadgsoc2013-epiphany-0408961cb808d25737540c65ce3503e12d1d2205.tar
gsoc2013-epiphany-0408961cb808d25737540c65ce3503e12d1d2205.tar.gz
gsoc2013-epiphany-0408961cb808d25737540c65ce3503e12d1d2205.tar.bz2
gsoc2013-epiphany-0408961cb808d25737540c65ce3503e12d1d2205.tar.lz
gsoc2013-epiphany-0408961cb808d25737540c65ce3503e12d1d2205.tar.xz
gsoc2013-epiphany-0408961cb808d25737540c65ce3503e12d1d2205.tar.zst
gsoc2013-epiphany-0408961cb808d25737540c65ce3503e12d1d2205.zip
Made encoding dialog auto-apply.
2003-10-24 Christian Persch <chpe@cvs.gnome.org> * src/ephy-encoding-dialog.c: (ephy_encoding_dialog_response_cb), (view_node_selected_cb), (automatic_toggled_cb), (ephy_encoding_dialog_init): * data/glade/epiphany.glade: Made encoding dialog auto-apply.
Diffstat (limited to 'src/ephy-encoding-dialog.c')
-rw-r--r--src/ephy-encoding-dialog.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/ephy-encoding-dialog.c b/src/ephy-encoding-dialog.c
index b87799d44..8f259744e 100644
--- a/src/ephy-encoding-dialog.c
+++ b/src/ephy-encoding-dialog.c
@@ -207,8 +207,6 @@ activate_choice (EphyEncodingDialog *dialog)
gboolean is_automatic;
gresult result;
- LOG ("going manual")
-
embed = ephy_embed_dialog_get_embed (EPHY_EMBED_DIALOG (dialog));
g_return_if_fail (EPHY_IS_EMBED (embed));
@@ -251,15 +249,6 @@ ephy_encoding_dialog_response_cb (GtkWidget *widget,
gint response,
EphyEncodingDialog *dialog)
{
- switch (response)
- {
- case GTK_RESPONSE_OK:
- activate_choice (dialog);
- break;
- default:
- break;
- }
-
g_object_unref (dialog);
}
@@ -276,6 +265,8 @@ view_node_selected_cb (EphyNodeView *view,
button = ephy_dialog_get_control (EPHY_DIALOG (dialog), MANUAL_PROP);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
+
+ activate_choice (dialog);
}
static void
@@ -298,6 +289,16 @@ view_node_activated_cb (GtkWidget *view,
}
static void
+automatic_toggled_cb (GtkToggleButton *button, EphyEncodingDialog *dialog)
+{
+ if (gtk_toggle_button_get_active (button)
+ && dialog->priv->update_tag == FALSE)
+ {
+ activate_choice (dialog);
+ }
+}
+
+static void
ephy_encoding_dialog_init (EphyEncodingDialog *dialog)
{
GtkWidget *treeview, *scroller, *button;
@@ -352,6 +353,9 @@ ephy_encoding_dialog_init (EphyEncodingDialog *dialog)
button = ephy_dialog_get_control (EPHY_DIALOG (dialog), AUTOMATIC_PROP);
gtk_label_set_use_markup (GTK_LABEL (GTK_BIN (button)->child), TRUE);
+ g_signal_connect (button, "toggled",
+ G_CALLBACK (automatic_toggled_cb), dialog);
+
button = ephy_dialog_get_control (EPHY_DIALOG (dialog), MANUAL_PROP);
gtk_label_set_use_markup (GTK_LABEL (GTK_BIN (button)->child), TRUE);