diff options
author | Crispin Flowerday <gnome@flowerday.cx> | 2006-01-01 03:12:31 +0800 |
---|---|---|
committer | Crispin Flowerday <crispin@src.gnome.org> | 2006-01-01 03:12:31 +0800 |
commit | d2d8ffb20ab2567a922529521c2f20a7f9576562 (patch) | |
tree | 0fd07f2b410a07e50ed6d61403b724bfa8593139 /src/ephy-encoding-dialog.c | |
parent | cbcd4b6b377bf56d69a63f5672f349149aa83c9d (diff) | |
download | gsoc2013-epiphany-d2d8ffb20ab2567a922529521c2f20a7f9576562.tar gsoc2013-epiphany-d2d8ffb20ab2567a922529521c2f20a7f9576562.tar.gz gsoc2013-epiphany-d2d8ffb20ab2567a922529521c2f20a7f9576562.tar.bz2 gsoc2013-epiphany-d2d8ffb20ab2567a922529521c2f20a7f9576562.tar.lz gsoc2013-epiphany-d2d8ffb20ab2567a922529521c2f20a7f9576562.tar.xz gsoc2013-epiphany-d2d8ffb20ab2567a922529521c2f20a7f9576562.tar.zst gsoc2013-epiphany-d2d8ffb20ab2567a922529521c2f20a7f9576562.zip |
When in automatic mode, update the treeview to reflect the currently
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
Diffstat (limited to 'src/ephy-encoding-dialog.c')
-rw-r--r-- | src/ephy-encoding-dialog.c | 36 |
1 files changed, 35 insertions, 1 deletions
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); |