aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--src/ephy-encoding-dialog.c36
2 files changed, 44 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ae8ca7d8d..a74491863 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-12-31 Crispin Flowerday <gnome@flowerday.cx>
+
+ * src/ephy-encoding-dialog.c: (sync_encoding_against_embed),
+ (embed_net_stop_cb), (sync_embed_cb),
+ (ephy_encoding_dialog_finalize):
+
+ When in automatic mode, update the treeview to reflect
+ the currently selected encoding. Fixes bug #127757
+
2005-12-30 Christian Persch <chpe@cvs.gnome.org>
* plugins/desktop-file/Makefile.am:
diff --git a/src/ephy-encoding-dialog.c b/src/ephy-encoding-dialog.c
index 261b8f4b5..79d1a7621 100644
--- a/src/ephy-encoding-dialog.c
+++ b/src/ephy-encoding-dialog.c
@@ -107,7 +107,7 @@ ephy_encoding_dialog_get_type (void)
}
static void
-sync_embed_cb (EphyEncodingDialog *dialog, GParamSpec *pspec, gpointer dummy)
+sync_encoding_against_embed (EphyEncodingDialog *dialog)
{
EphyEmbed *embed;
EphyNode *node;
@@ -160,6 +160,33 @@ sync_embed_cb (EphyEncodingDialog *dialog, GParamSpec *pspec, gpointer dummy)
dialog->priv->update_tag = FALSE;
}
+
+static void
+embed_net_stop_cb (EphyEmbed *embed, EphyEncodingDialog *dialog)
+{
+ sync_encoding_against_embed (dialog);
+}
+
+static void
+sync_embed_cb (EphyEncodingDialog *dialog, GParamSpec *pspec, gpointer dummy)
+{
+ EphyEmbed *embed;
+ embed = ephy_embed_dialog_get_embed (EPHY_EMBED_DIALOG (dialog));
+
+ if (dialog->priv->embed != NULL)
+ {
+ g_signal_handlers_disconnect_by_func (dialog->priv->embed,
+ G_CALLBACK (embed_net_stop_cb),
+ dialog);
+ }
+
+ g_signal_connect (G_OBJECT (embed), "net_stop",
+ G_CALLBACK (embed_net_stop_cb), dialog);
+ dialog->priv->embed = embed;
+
+ sync_encoding_against_embed (dialog);
+}
+
static void
sync_active_tab (EphyWindow *window, GParamSpec *pspec, EphyEncodingDialog *dialog)
{
@@ -367,6 +394,13 @@ ephy_encoding_dialog_finalize (GObject *object)
dialog);
}
+ if (dialog->priv->embed)
+ {
+ g_signal_handlers_disconnect_by_func (dialog->priv->embed,
+ G_CALLBACK (embed_net_stop_cb),
+ dialog);
+ }
+
g_object_unref (dialog->priv->filter);
G_OBJECT_CLASS (parent_class)->finalize (object);