aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2009-07-20 20:45:16 +0800
committerSrinivasa Ragavan <sragavan@novell.com>2009-07-20 20:45:16 +0800
commite730108e2078e24b878b4af53295a8058df5f3a4 (patch)
tree7c117f31472c0e350a34a5092b15fb97b0988a49 /composer
parent1550eff338a1194a90f3ad2948e4f381098c8a20 (diff)
downloadgsoc2013-evolution-e730108e2078e24b878b4af53295a8058df5f3a4.tar
gsoc2013-evolution-e730108e2078e24b878b4af53295a8058df5f3a4.tar.gz
gsoc2013-evolution-e730108e2078e24b878b4af53295a8058df5f3a4.tar.bz2
gsoc2013-evolution-e730108e2078e24b878b4af53295a8058df5f3a4.tar.lz
gsoc2013-evolution-e730108e2078e24b878b4af53295a8058df5f3a4.tar.xz
gsoc2013-evolution-e730108e2078e24b878b4af53295a8058df5f3a4.tar.zst
gsoc2013-evolution-e730108e2078e24b878b4af53295a8058df5f3a4.zip
Fix composer string for Anjal.
Diffstat (limited to 'composer')
-rw-r--r--composer/e-composer-header.c22
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");
}