aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2014-01-28 02:15:21 +0800
committerMilan Crha <mcrha@redhat.com>2014-01-28 02:15:21 +0800
commitfd692d0b1d16f6e083add4dd8fe8a3019948e4a2 (patch)
tree36c62fea6e2ed40a3148f02850d99680ca1e5a8a
parent1c53fdf558cf0ad51b54f9a0d1eb06f63931438d (diff)
downloadgsoc2013-evolution-fd692d0b1d16f6e083add4dd8fe8a3019948e4a2.tar
gsoc2013-evolution-fd692d0b1d16f6e083add4dd8fe8a3019948e4a2.tar.gz
gsoc2013-evolution-fd692d0b1d16f6e083add4dd8fe8a3019948e4a2.tar.bz2
gsoc2013-evolution-fd692d0b1d16f6e083add4dd8fe8a3019948e4a2.tar.lz
gsoc2013-evolution-fd692d0b1d16f6e083add4dd8fe8a3019948e4a2.tar.xz
gsoc2013-evolution-fd692d0b1d16f6e083add4dd8fe8a3019948e4a2.tar.zst
gsoc2013-evolution-fd692d0b1d16f6e083add4dd8fe8a3019948e4a2.zip
Bug #721213 - Character encoding combo opened empty
-rw-r--r--e-util/e-action-combo-box.c3
-rw-r--r--e-util/e-charset-combo-box.c38
2 files changed, 30 insertions, 11 deletions
diff --git a/e-util/e-action-combo-box.c b/e-util/e-action-combo-box.c
index e0a9357388..14731a7983 100644
--- a/e-util/e-action-combo-box.c
+++ b/e-util/e-action-combo-box.c
@@ -361,6 +361,9 @@ action_combo_box_constructed (GObject *object)
combo_box = GTK_COMBO_BOX (object);
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_action_combo_box_parent_class)->constructed (object);
+
/* This needs to happen after constructor properties are set
* so that GtkCellLayout.get_area() returns something valid. */
diff --git a/e-util/e-charset-combo-box.c b/e-util/e-charset-combo-box.c
index f2d635501d..c97cbe5b03 100644
--- a/e-util/e-charset-combo-box.c
+++ b/e-util/e-charset-combo-box.c
@@ -220,6 +220,32 @@ charset_combo_box_get_property (GObject *object,
}
static void
+charset_combo_box_constructed (GObject *object)
+{
+ ECharsetComboBoxPrivate *priv;
+ GtkRadioAction *radio_action;
+ GSList *group;
+
+ priv = E_CHARSET_COMBO_BOX_GET_PRIVATE (object);
+
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_charset_combo_box_parent_class)->constructed (object);
+
+ radio_action = priv->other_action;
+ group = gtk_radio_action_get_group (radio_action);
+
+ e_action_combo_box_set_action (
+ E_ACTION_COMBO_BOX (object), radio_action);
+
+ e_action_combo_box_add_separator_after (
+ E_ACTION_COMBO_BOX (object), g_slist_length (group));
+
+ g_signal_connect (
+ object, "notify::charset",
+ G_CALLBACK (charset_combo_box_notify_charset_cb), NULL);
+}
+
+static void
charset_combo_box_dispose (GObject *object)
{
ECharsetComboBoxPrivate *priv;
@@ -282,6 +308,7 @@ e_charset_combo_box_class_init (ECharsetComboBoxClass *class)
object_class = G_OBJECT_CLASS (class);
object_class->set_property = charset_combo_box_set_property;
object_class->get_property = charset_combo_box_get_property;
+ object_class->constructed = charset_combo_box_constructed;
object_class->dispose = charset_combo_box_dispose;
object_class->finalize = charset_combo_box_finalize;
@@ -343,17 +370,6 @@ e_charset_combo_box_init (ECharsetComboBox *combo_box)
g_object_set_data (G_OBJECT (radio_action), "charset", (gpointer) "");
gtk_radio_action_set_group (radio_action, group);
- group = gtk_radio_action_get_group (radio_action);
-
- e_action_combo_box_set_action (
- E_ACTION_COMBO_BOX (combo_box), radio_action);
-
- e_action_combo_box_add_separator_after (
- E_ACTION_COMBO_BOX (combo_box), g_slist_length (group));
-
- g_signal_connect (
- combo_box, "notify::charset",
- G_CALLBACK (charset_combo_box_notify_charset_cb), NULL);
combo_box->priv->other_action = radio_action;
}