aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2009-06-03 22:13:06 +0800
committerSrinivasa Ragavan <sragavan@novell.com>2009-06-03 22:16:53 +0800
commit5b1e05dbf5448251ea0dffc727233e52a2c2e518 (patch)
treec72419e981a21c0bdf5a1e0f74ada3f16f0c2ae7 /composer
parent7703ffcdd4e2f5343a80f5f0e082fe5d050b7328 (diff)
downloadgsoc2013-evolution-5b1e05dbf5448251ea0dffc727233e52a2c2e518.tar
gsoc2013-evolution-5b1e05dbf5448251ea0dffc727233e52a2c2e518.tar.gz
gsoc2013-evolution-5b1e05dbf5448251ea0dffc727233e52a2c2e518.tar.bz2
gsoc2013-evolution-5b1e05dbf5448251ea0dffc727233e52a2c2e518.tar.lz
gsoc2013-evolution-5b1e05dbf5448251ea0dffc727233e52a2c2e518.tar.xz
gsoc2013-evolution-5b1e05dbf5448251ea0dffc727233e52a2c2e518.tar.zst
gsoc2013-evolution-5b1e05dbf5448251ea0dffc727233e52a2c2e518.zip
Anjal stuff's for Evo.
Diffstat (limited to 'composer')
-rw-r--r--composer/e-composer-header-table.c4
-rw-r--r--composer/e-composer-header.c19
2 files changed, 17 insertions, 6 deletions
diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c
index 542a836dc8..b47a15b115 100644
--- a/composer/e-composer-header-table.c
+++ b/composer/e-composer-header-table.c
@@ -944,13 +944,13 @@ composer_header_table_init (EComposerHeaderTable *table)
table->priv->headers[E_COMPOSER_HEADER_TO] = header;
header = e_composer_name_header_new_with_action (
- _("_Cc:"), _("Show CC"), name_selector);
+ _("_Cc:"), _("CC"), name_selector);
e_composer_header_set_input_tooltip (header, HEADER_TOOLTIP_CC);
composer_header_table_bind_header ("destinations-cc", "changed", header);
table->priv->headers[E_COMPOSER_HEADER_CC] = header;
header = e_composer_name_header_new_with_action (
- _("_Bcc:"), _("Show BCC"), name_selector);
+ _("_Bcc:"), _("BCC"), name_selector);
e_composer_header_set_input_tooltip (header, HEADER_TOOLTIP_BCC);
composer_header_table_bind_header ("destinations-bcc", "changed", header);
table->priv->headers[E_COMPOSER_HEADER_BCC] = header;
diff --git a/composer/e-composer-header.c b/composer/e-composer-header.c
index d679bdd263..f57d569ead 100644
--- a/composer/e-composer-header.c
+++ b/composer/e-composer-header.c
@@ -21,7 +21,7 @@
*/
#include "e-composer-header.h"
-
+#include <glib/gi18n.h>
#define E_COMPOSER_HEADER_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_COMPOSER_HEADER, EComposerHeaderPrivate))
@@ -47,6 +47,7 @@ struct _EComposerHeaderPrivate {
gboolean button;
gchar *addaction_text;
gboolean addaction; /*For Add button.*/
+ GtkWidget *action_label;
guint sensitive : 1;
guint visible : 1;
@@ -67,8 +68,13 @@ static void
composer_header_addaction_clicked_cb (GtkButton *button,
EComposerHeader *header)
{
- gtk_widget_hide ((GtkWidget *)button);
- e_composer_header_set_visible (header, TRUE);
+ 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);
}
static GObject *
@@ -108,8 +114,13 @@ composer_header_constructor (GType type,
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</span>", header->priv->addaction_text);
+ 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 *)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);
+ g_object_set_data ((GObject *)tmp, "hide", str);
+
+ header->priv->action_label = tmp;
gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 3);
gtk_container_add((GtkContainer *)header->action_widget, box);
gtk_widget_show_all(header->action_widget);