[evolution] Fix show CC/BCC text for Anjal depending on the visibility of the



commit 741307a9309d389d3246285c985c2a68c741d6d7
Author: Srinivasa Ragavan <sragavan novell com>
Date:   Wed Jun 24 21:15:29 2009 +0530

    Fix show CC/BCC text for Anjal depending on the visibility of the
    widget.

 composer/e-composer-header.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/composer/e-composer-header.c b/composer/e-composer-header.c
index e2942ca..980e11c 100644
--- a/composer/e-composer-header.c
+++ b/composer/e-composer-header.c
@@ -69,10 +69,6 @@ composer_header_addaction_clicked_cb (GtkButton *button,
 				      EComposerHeader *header)
 {
 	gboolean show = !e_composer_header_get_visible(header);
-	if (!show)
-		gtk_label_set_markup ((GtkLabel *)header->priv->action_label, g_object_get_data ((GObject *)header->priv->action_label, "show"));
-	else
-		gtk_label_set_markup ((GtkLabel *)header->priv->action_label, g_object_get_data ((GObject *)header->priv->action_label, "hide"));
 
 	e_composer_header_set_visible (header, show);
 }
@@ -105,6 +101,7 @@ composer_header_constructor (GType type,
 			GTK_LABEL (widget), header->input_widget);
 	}
 
+	header->priv->action_label = NULL;
 	if (header->priv->addaction) {
 		GtkWidget *box, *tmp;
 		gchar *str;
@@ -431,6 +428,12 @@ e_composer_header_set_visible (EComposerHeader *header,
 
 	header->priv->visible = visible;
 
+	if (header->priv->action_label) {
+		if (!visible)
+			gtk_label_set_markup ((GtkLabel *)header->priv->action_label, g_object_get_data ((GObject *)header->priv->action_label, "show"));
+		else
+			gtk_label_set_markup ((GtkLabel *)header->priv->action_label, g_object_get_data ((GObject *)header->priv->action_label, "hide"));	
+	}
 	g_object_notify (G_OBJECT (header), "visible");
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]