aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-composer-header.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-08-30 13:37:36 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-08-30 13:40:49 +0800
commitcfb9c32b6657165e4d5e11aa7b47804f679a61f8 (patch)
tree1f9c8954df7a357b5dc20a13ac82bf31c1112083 /composer/e-composer-header.c
parentfefeb30f58447f2fa7bcbee16dbe68a9333ce89d (diff)
parent0f7f4cfe38b3c4cd83efbe9922ae15c5aee00317 (diff)
downloadgsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.gz
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.bz2
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.lz
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.xz
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.zst
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.zip
Merge commit 'origin/kill-bonobo'
Diffstat (limited to 'composer/e-composer-header.c')
-rw-r--r--composer/e-composer-header.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/composer/e-composer-header.c b/composer/e-composer-header.c
index 334464eddd..36d0ffb3b6 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))
@@ -111,19 +111,9 @@ composer_header_constructor (GType type,
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);
- 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);
+ tmp = gtk_label_new (NULL);
+ str = g_strdup_printf ("<span foreground='blue' underline='single' underline_color='blue' >%s</span>", header->priv->addaction_text);
gtk_label_set_markup((GtkLabel *)tmp, str);
- 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;
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);
@@ -340,7 +330,8 @@ composer_header_class_init (EComposerHeaderClass *class)
"changed",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
- 0, NULL, NULL,
+ G_STRUCT_OFFSET (EComposerHeaderClass, changed),
+ NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
@@ -348,7 +339,8 @@ composer_header_class_init (EComposerHeaderClass *class)
"clicked",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
- 0, NULL, NULL,
+ G_STRUCT_OFFSET (EComposerHeaderClass, clicked),
+ NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
@@ -434,6 +426,7 @@ e_composer_header_set_visible (EComposerHeader *header,
header->priv->visible = visible;
+#if 0 /* FIXME This is horrible. Needs completely rethought. */
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"));
@@ -446,6 +439,8 @@ e_composer_header_set_visible (EComposerHeader *header,
gtk_widget_show (g_object_get_data((GObject *) header->priv->action_label, "remove"));
}
}
+#endif
+
g_object_notify (G_OBJECT (header), "visible");
}