[evolution] Fix composer string for Anjal.
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution] Fix composer string for Anjal.
- Date: Tue, 21 Jul 2009 04:40:40 +0000 (UTC)
commit e730108e2078e24b878b4af53295a8058df5f3a4
Author: Srinivasa Ragavan <sragavan novell com>
Date: Mon Jul 20 18:15:16 2009 +0530
Fix composer string for Anjal.
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 c5b7108..334464e 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");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]