diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2009-07-20 20:45:16 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@novell.com> | 2009-07-20 20:45:16 +0800 |
commit | e730108e2078e24b878b4af53295a8058df5f3a4 (patch) | |
tree | 7c117f31472c0e350a34a5092b15fb97b0988a49 | |
parent | 1550eff338a1194a90f3ad2948e4f381098c8a20 (diff) | |
download | gsoc2013-evolution-e730108e2078e24b878b4af53295a8058df5f3a4.tar.gz gsoc2013-evolution-e730108e2078e24b878b4af53295a8058df5f3a4.tar.zst gsoc2013-evolution-e730108e2078e24b878b4af53295a8058df5f3a4.zip |
Fix composer string for Anjal.
-rw-r--r-- | composer/e-composer-header.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/composer/e-composer-header.c b/composer/e-composer-header.c index c5b710830a..334464eddd 100644 --- a/composer/e-composer-header.c +++ b/composer/e-composer-header.c @@ -106,15 +106,21 @@ composer_header_constructor (GType type, GtkWidget *box, *tmp; gchar *str; + header->priv->action_label = gtk_label_new (NULL); header->action_widget = gtk_button_new (); box = gtk_hbox_new (FALSE, 0); tmp = gtk_image_new_from_stock("gtk-add", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 3); - tmp = gtk_label_new (NULL); - str = g_strdup_printf ("<span foreground='blue' underline='single' underline_color='blue' >%s %s</span>", _("Show"), header->priv->addaction_text); + g_object_set_data ((GObject *)header->priv->action_label, "add", tmp); + tmp = gtk_image_new_from_stock("gtk-remove", GTK_ICON_SIZE_BUTTON); + gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 3); + g_object_set_data ((GObject *)header->priv->action_label, "remove", tmp); + gtk_widget_hide (tmp); + tmp = header->priv->action_label; + str = g_strdup_printf ("<span>%s %s</span>", _("Show"), header->priv->addaction_text); g_object_set_data ((GObject *)tmp, "show", str); gtk_label_set_markup((GtkLabel *)tmp, str); - str = g_strdup_printf ("<span foreground='blue' underline='single' underline_color='blue' >%s %s</span>", _("Hide"), header->priv->addaction_text); + str = g_strdup_printf ("<span>%s %s</span>", _("Hide"), header->priv->addaction_text); g_object_set_data ((GObject *)tmp, "hide", str); header->priv->action_label = tmp; @@ -429,10 +435,16 @@ e_composer_header_set_visible (EComposerHeader *header, header->priv->visible = visible; if (header->priv->action_label) { - if (!visible) + if (!visible) { gtk_label_set_markup ((GtkLabel *)header->priv->action_label, g_object_get_data ((GObject *)header->priv->action_label, "show")); - else + gtk_widget_show (g_object_get_data((GObject *) header->priv->action_label, "add")); + gtk_widget_hide (g_object_get_data((GObject *) header->priv->action_label, "remove")); + + }else { gtk_label_set_markup ((GtkLabel *)header->priv->action_label, g_object_get_data ((GObject *)header->priv->action_label, "hide")); + gtk_widget_hide (g_object_get_data((GObject *) header->priv->action_label, "add")); + gtk_widget_show (g_object_get_data((GObject *) header->priv->action_label, "remove")); + } } g_object_notify (G_OBJECT (header), "visible"); } |