aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2009-05-22 19:30:53 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-24 22:12:26 +0800
commitc0b6183c73fc170913bba39e65794af3f596e30e (patch)
tree324e54cabe50fcbff2fd76ad51b6fbcc7f6f7598 /composer
parent2ea8d8f1930bdc7f30e8556d6abeca33eb263af6 (diff)
downloadgsoc2013-evolution-c0b6183c73fc170913bba39e65794af3f596e30e.tar
gsoc2013-evolution-c0b6183c73fc170913bba39e65794af3f596e30e.tar.gz
gsoc2013-evolution-c0b6183c73fc170913bba39e65794af3f596e30e.tar.bz2
gsoc2013-evolution-c0b6183c73fc170913bba39e65794af3f596e30e.tar.lz
gsoc2013-evolution-c0b6183c73fc170913bba39e65794af3f596e30e.tar.xz
gsoc2013-evolution-c0b6183c73fc170913bba39e65794af3f596e30e.tar.zst
gsoc2013-evolution-c0b6183c73fc170913bba39e65794af3f596e30e.zip
Johnny's composer changes for Anjal.
Diffstat (limited to 'composer')
-rw-r--r--composer/Makefile.am28
-rw-r--r--composer/e-composer-from-header.h2
-rw-r--r--composer/e-composer-header-table.c36
-rw-r--r--composer/e-composer-header.c89
-rw-r--r--composer/e-composer-header.h3
-rw-r--r--composer/e-composer-name-header.c28
-rw-r--r--composer/e-composer-name-header.h9
-rw-r--r--composer/e-composer-private.c81
-rw-r--r--composer/e-composer-text-header.c21
-rw-r--r--composer/e-composer-text-header.h11
-rw-r--r--composer/e-msg-composer.c1
-rw-r--r--composer/e-msg-composer.h1
12 files changed, 281 insertions, 29 deletions
diff --git a/composer/Makefile.am b/composer/Makefile.am
index 861311749b..3ba27e871e 100644
--- a/composer/Makefile.am
+++ b/composer/Makefile.am
@@ -5,6 +5,19 @@ errordir = $(privdatadir)/errors
@EVO_PLUGIN_RULE@
noinst_LTLIBRARIES = libcomposer.la
+libcomposerincludedir = $(privincludedir)/composer
+libcomposerinclude_HEADERS = \
+ e-composer-header.h \
+ e-composer-header-table.h \
+ e-composer-from-header.h \
+ e-composer-name-header.h \
+ e-composer-post-header.h \
+ e-composer-private.h \
+ e-composer-text-header.h \
+ e-composer-common.h \
+ e-composer-actions.h \
+ e-composer-autosave.h \
+ e-msg-composer.h
INCLUDES = \
-I$(top_srcdir) \
@@ -25,27 +38,18 @@ INCLUDES = \
$(EVOLUTION_MAIL_CFLAGS)
libcomposer_la_SOURCES = \
+ $(libcomposerinclude_HEADERS) \
e-composer-actions.c \
- e-composer-actions.h \
e-composer-autosave.c \
- e-composer-autosave.h \
- e-composer-common.h \
e-composer-header.c \
- e-composer-header.h \
e-composer-header-table.c \
- e-composer-header-table.h \
e-composer-from-header.c \
- e-composer-from-header.h \
e-composer-name-header.c \
- e-composer-name-header.h \
e-composer-post-header.c \
- e-composer-post-header.h \
e-composer-private.c \
- e-composer-private.h \
e-composer-text-header.c \
- e-composer-text-header.h \
- e-msg-composer.c \
- e-msg-composer.h
+ e-msg-composer.c
+
libcomposer_la_LIBADD = \
$(top_builddir)/widgets/misc/libemiscwidgets.la \
diff --git a/composer/e-composer-from-header.h b/composer/e-composer-from-header.h
index 74fda9ae03..f8c6dc6f18 100644
--- a/composer/e-composer-from-header.h
+++ b/composer/e-composer-from-header.h
@@ -26,7 +26,7 @@
#include <libedataserver/e-account.h>
#include <libedataserver/e-account-list.h>
-#include "e-account-combo-box.h"
+#include <misc/e-account-combo-box.h>
#include "e-composer-header.h"
/* Standard GObject macros */
diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c
index 267bfbf1e7..df96d763ba 100644
--- a/composer/e-composer-header-table.c
+++ b/composer/e-composer-header-table.c
@@ -31,6 +31,8 @@
#include "e-composer-post-header.h"
#include "e-composer-text-header.h"
+extern gboolean composer_lite;
+
#define E_COMPOSER_HEADER_TABLE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_COMPOSER_HEADER_TABLE, EComposerHeaderTablePrivate))
@@ -68,6 +70,7 @@ struct _EComposerHeaderTablePrivate {
GtkWidget *signature_label;
GtkWidget *signature_combo_box;
ENameSelector *name_selector;
+ GtkHBox *actions_container;
};
static gpointer parent_class;
@@ -502,8 +505,16 @@ composer_header_table_constructor (GType type,
gtk_table_attach (
GTK_TABLE (object), priv->headers[ii]->input_widget,
1, 4, ii, ii + 1, GTK_FILL | GTK_EXPAND, 0, 0, 3);
+ if (composer_lite && priv->headers[ii]->action_widget) {
+ /* Pack the widgets to the end. Helps formatting when hiding the From field */
+ gtk_box_pack_end ((GtkBox *)priv->actions_container, priv->headers[ii]->action_widget,
+ FALSE, FALSE, 6);
+ }
}
+ if (composer_lite)
+ gtk_widget_show_all ((GtkWidget *)priv->actions_container);
+
ii = E_COMPOSER_HEADER_FROM;
/* Leave room in the "From" row for signature stuff. */
@@ -528,6 +539,19 @@ composer_header_table_constructor (GType type,
GTK_TABLE (object), priv->signature_combo_box,
3, 4, ii, ii + 1, 0, 0, 0, 3);
+ if (composer_lite) {
+ ii = E_COMPOSER_HEADER_TO;
+
+ /* Leave room for the action buttons. */
+ gtk_container_child_set (
+ GTK_CONTAINER (object),
+ priv->headers[ii]->input_widget,
+ "right-attach", 2, NULL);
+
+ gtk_table_attach (GTK_TABLE (object), (GtkWidget *)priv->actions_container, 2, 4, E_COMPOSER_HEADER_TO,
+ E_COMPOSER_HEADER_TO + 1, GTK_FILL, 0, 0, 3);
+ }
+
return object;
}
@@ -898,6 +922,8 @@ composer_header_table_init (EComposerHeaderTable *table)
name_selector = e_name_selector_new ();
table->priv->name_selector = name_selector;
+ table->priv->actions_container = (GtkHBox *)gtk_hbox_new (FALSE, 6);
+
header = e_composer_from_header_new (_("Fr_om:"));
composer_header_table_bind_header ("account", "changed", header);
composer_header_table_bind_header ("account-list", "refreshed", header);
@@ -907,21 +933,21 @@ composer_header_table_init (EComposerHeaderTable *table)
composer_header_table_from_changed_cb), table);
table->priv->headers[E_COMPOSER_HEADER_FROM] = header;
- header = e_composer_text_header_new_label (_("_Reply-To:"));
+ header = e_composer_text_header_new_label (_("_Reply-To:"), "");
composer_header_table_bind_header ("reply-to", "changed", header);
table->priv->headers[E_COMPOSER_HEADER_REPLY_TO] = header;
- header = e_composer_name_header_new (_("_To:"), name_selector);
+ header = e_composer_name_header_new_with_label (_("_To:"), name_selector);
e_composer_header_set_input_tooltip (header, HEADER_TOOLTIP_TO);
composer_header_table_bind_header ("destinations-to", "changed", header);
table->priv->headers[E_COMPOSER_HEADER_TO] = header;
- header = e_composer_name_header_new (_("_Cc:"), name_selector);
+ header = e_composer_name_header_new_with_action (_("_Cc:"), _("Show 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 (_("_Bcc:"), name_selector);
+ header = e_composer_name_header_new_with_action (_("_Bcc:"), _("Show 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;
@@ -930,7 +956,7 @@ composer_header_table_init (EComposerHeaderTable *table)
composer_header_table_bind_header ("post-to", "changed", header);
table->priv->headers[E_COMPOSER_HEADER_POST_TO] = header;
- header = e_composer_text_header_new_label (_("S_ubject:"));
+ header = e_composer_text_header_new_label (_("S_ubject:"), NULL);
composer_header_table_bind_header ("subject", "changed", header);
table->priv->headers[E_COMPOSER_HEADER_SUBJECT] = header;
diff --git a/composer/e-composer-header.c b/composer/e-composer-header.c
index 4719d6db7e..8bd75f8a3c 100644
--- a/composer/e-composer-header.c
+++ b/composer/e-composer-header.c
@@ -1,3 +1,5 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
/*
*
* This program is free software; you can redistribute it and/or
@@ -28,6 +30,8 @@ enum {
PROP_0,
PROP_BUTTON,
PROP_LABEL,
+ PROP_ADDACTION,
+ PROP_ADDACTION_TEXT,
PROP_SENSITIVE,
PROP_VISIBLE
};
@@ -41,6 +45,8 @@ enum {
struct _EComposerHeaderPrivate {
gchar *label;
gboolean button;
+ gchar *addaction_text;
+ gboolean addaction; /*For Add button.*/
guint sensitive : 1;
guint visible : 1;
@@ -57,6 +63,20 @@ composer_header_button_clicked_cb (GtkButton *button,
g_signal_emit (header, signal_ids[CLICKED], 0);
}
+static void
+composer_header_addaction_clicked_cb (GtkButton *button,
+ EComposerHeader *header)
+{
+ gtk_widget_hide ((GtkWidget *)button);
+ e_composer_header_set_visible (header, TRUE);
+}
+
+static void
+link_clicked_cb (GtkLinkButton *button, const gchar *link_, gpointer user_data)
+{
+ return;
+}
+
static GObject *
composer_header_constructor (GType type,
guint n_construct_properties,
@@ -84,6 +104,27 @@ composer_header_constructor (GType type,
gtk_label_set_mnemonic_widget (
GTK_LABEL (widget), header->input_widget);
}
+
+ if (header->priv->addaction) {
+ GtkWidget *box, *tmp;
+ char *str;
+
+ 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</span>", header->priv->addaction_text);
+ gtk_label_set_markup((GtkLabel *)tmp, str);
+ 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);
+ g_signal_connect (
+ header->action_widget, "clicked",
+ G_CALLBACK (composer_header_addaction_clicked_cb),
+ header);
+ }
+
header->title_widget = g_object_ref_sink (widget);
g_free (header->priv->label);
@@ -107,6 +148,14 @@ composer_header_set_property (GObject *object,
priv->button = g_value_get_boolean (value);
return;
+ case PROP_ADDACTION: /* construct only */
+ priv->addaction = g_value_get_boolean (value);
+ return;
+
+ case PROP_ADDACTION_TEXT:/* construct only */
+ priv->addaction_text = g_value_dup_string (value);
+ return;
+
case PROP_LABEL: /* construct only */
priv->label = g_value_dup_string (value);
return;
@@ -127,6 +176,15 @@ composer_header_set_property (GObject *object,
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
+void
+e_composer_header_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ composer_header_set_property (object, property_id, value, pspec);
+}
+
static void
composer_header_get_property (GObject *object,
guint property_id,
@@ -142,6 +200,15 @@ composer_header_get_property (GObject *object,
g_value_set_boolean (value, priv->button);
return;
+ case PROP_ADDACTION: /* construct only */
+ g_value_set_boolean (value, priv->button);
+ return;
+
+ case PROP_ADDACTION_TEXT: /* construct only */
+ g_value_take_string (
+ value, priv->addaction_text);
+ return;
+
case PROP_LABEL: /* construct only */
g_value_take_string (
value, e_composer_header_get_label (
@@ -210,6 +277,28 @@ composer_header_class_init (EComposerHeaderClass *class)
g_object_class_install_property (
object_class,
+ PROP_ADDACTION,
+ g_param_spec_boolean (
+ "addaction",
+ NULL,
+ NULL,
+ FALSE,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_ADDACTION_TEXT,
+ g_param_spec_string (
+ "addaction_text",
+ NULL,
+ NULL,
+ NULL,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property (
+ object_class,
PROP_LABEL,
g_param_spec_string (
"label",
diff --git a/composer/e-composer-header.h b/composer/e-composer-header.h
index e17c2a9f3a..439b6c097f 100644
--- a/composer/e-composer-header.h
+++ b/composer/e-composer-header.h
@@ -49,6 +49,7 @@ struct _EComposerHeader {
GObject parent;
GtkWidget *title_widget;
GtkWidget *input_widget;
+ GtkWidget *action_widget;
EComposerHeaderPrivate *priv;
};
@@ -68,6 +69,8 @@ void e_composer_header_set_sensitive (EComposerHeader *header,
gboolean e_composer_header_get_visible (EComposerHeader *header);
void e_composer_header_set_visible (EComposerHeader *header,
gboolean visible);
+void e_composer_header_set_property (GObject *object, guint property_id,
+ const GValue *value, GParamSpec *pspec);
void e_composer_header_set_title_tooltip
(EComposerHeader *header,
const gchar *tooltip);
diff --git a/composer/e-composer-name-header.c b/composer/e-composer-name-header.c
index a6618fdb4a..1f9fc9fe8d 100644
--- a/composer/e-composer-name-header.c
+++ b/composer/e-composer-name-header.c
@@ -105,10 +105,12 @@ composer_name_header_constructor (GType type,
entry = E_NAME_SELECTOR_ENTRY (
e_name_selector_peek_section_list (
priv->name_selector, label));
+
e_name_selector_entry_set_contact_editor_func (
entry, e_contact_editor_new);
e_name_selector_entry_set_contact_list_editor_func (
entry, e_contact_list_editor_new);
+
g_signal_connect (
entry, "changed",
G_CALLBACK (composer_name_header_entry_changed_cb), object);
@@ -264,6 +266,32 @@ e_composer_name_header_new (const gchar *label,
"button", TRUE, "name-selector", name_selector, NULL);
}
+EComposerHeader *
+e_composer_name_header_new_with_label (const gchar *label,
+ ENameSelector *name_selector)
+{
+ return g_object_new (
+ E_TYPE_COMPOSER_NAME_HEADER, "label", label,
+ "button", FALSE, "name-selector", name_selector,
+ "addaction", FALSE, "visible", TRUE,
+ NULL);
+}
+
+EComposerHeader *
+e_composer_name_header_new_with_action (const gchar *label,
+ const gchar *action_label,
+ ENameSelector *name_selector)
+{
+ g_return_val_if_fail (E_IS_NAME_SELECTOR (name_selector), NULL);
+
+ return g_object_new (
+ E_TYPE_COMPOSER_NAME_HEADER, "label", label,
+ "button", FALSE, "name-selector", name_selector,
+ "addaction_text", action_label,
+ "addaction", action_label != NULL,
+ NULL);
+}
+
ENameSelector *
e_composer_name_header_get_name_selector (EComposerNameHeader *header)
{
diff --git a/composer/e-composer-name-header.h b/composer/e-composer-name-header.h
index f95c33fce3..af38666d59 100644
--- a/composer/e-composer-name-header.h
+++ b/composer/e-composer-name-header.h
@@ -62,6 +62,15 @@ struct _EComposerNameHeaderClass {
GType e_composer_name_header_get_type (void);
EComposerHeader * e_composer_name_header_new (const gchar *label,
ENameSelector *name_selector);
+/*No button. Just a label.*/
+EComposerHeader * e_composer_name_header_new_with_label (const gchar *label,
+ ENameSelector *name_selector);
+
+/*No button. Label with a Link button for show/hide.*/
+EComposerHeader * e_composer_name_header_new_with_action (const gchar *label,
+ const gchar *action,
+ ENameSelector *name_selector);
+
ENameSelector * e_composer_name_header_get_name_selector
(EComposerNameHeader *header);
EDestination ** e_composer_name_header_get_destinations
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index d7e44bf484..bc273cd495 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -17,6 +17,7 @@
#include "e-composer-private.h"
#include "e-util/e-util-private.h"
+#include "e-util/e-icon-factory.h"
static void
composer_setup_charset_menu (EMsgComposer *composer)
@@ -90,6 +91,7 @@ e_composer_private_init (EMsgComposer *composer)
GtkWidget *container;
GtkWidget *widget;
GtkWidget *send_widget;
+ GtkWidget *exp_box;
const gchar *path;
gchar *filename;
gint ii;
@@ -98,6 +100,15 @@ e_composer_private_init (EMsgComposer *composer)
editor = GTKHTML_EDITOR (composer);
ui_manager = gtkhtml_editor_get_ui_manager (editor);
+ if (composer->lite) {
+ widget = gtkhtml_editor_get_managed_widget (editor, "/main-menu");
+ gtk_widget_hide (widget);
+ widget = gtkhtml_editor_get_managed_widget (editor, "/main-toolbar");
+ gtk_toolbar_set_style ((GtkToolbar *)widget, GTK_TOOLBAR_BOTH_HORIZ);
+ gtk_widget_hide (widget);
+
+ }
+
priv->charset_actions = gtk_action_group_new ("charset");
priv->composer_actions = gtk_action_group_new ("composer");
@@ -130,6 +141,64 @@ e_composer_private_init (EMsgComposer *composer)
send_widget = gtk_ui_manager_get_widget (ui_manager, path);
gtk_tool_item_set_is_important (GTK_TOOL_ITEM (send_widget), TRUE);
+ exp_box = gtk_hbox_new (FALSE, 0);
+ gtk_widget_show(exp_box);
+ if (composer->lite) {
+ GtkWidget *tmp, *tmp1, *tmp_box;
+
+ tmp_box = gtk_hbox_new (FALSE, 0);
+
+ tmp = gtk_hbox_new (FALSE, 0);
+ tmp1 = gtk_image_new_from_pixbuf (e_icon_factory_get_icon("mail-send", E_ICON_SIZE_BUTTON));
+ gtk_box_pack_start ((GtkBox *)tmp, tmp1, FALSE, FALSE, 0);
+ tmp1 = gtk_label_new_with_mnemonic (_("S_end"));
+ gtk_box_pack_start ((GtkBox *)tmp, tmp1, FALSE, FALSE, 6);
+ gtk_widget_show_all(tmp);
+ gtk_widget_reparent (send_widget, tmp_box);
+ gtk_box_set_child_packing ((GtkBox *)tmp_box, send_widget, FALSE, FALSE, 6, GTK_PACK_END);
+ gtk_tool_item_set_is_important (GTK_TOOL_ITEM (send_widget), TRUE);
+ send_widget = gtk_bin_get_child ((GtkBin *)send_widget);
+ gtk_container_remove((GtkContainer *)send_widget, gtk_bin_get_child ((GtkBin *)send_widget));
+ gtk_container_add((GtkContainer *)send_widget, tmp);
+ gtk_button_set_relief ((GtkButton *)send_widget, GTK_RELIEF_NORMAL);
+
+ path = "/main-toolbar/pre-main-toolbar/save-draft";
+ send_widget = gtk_ui_manager_get_widget (ui_manager, path);
+ tmp = gtk_hbox_new (FALSE, 0);
+ tmp1 = gtk_image_new_from_pixbuf (e_icon_factory_get_icon(GTK_STOCK_SAVE, E_ICON_SIZE_BUTTON));
+ gtk_box_pack_start ((GtkBox *)tmp, tmp1, FALSE, FALSE, 0);
+ tmp1 = gtk_label_new_with_mnemonic (_("Save draft"));
+ gtk_box_pack_start ((GtkBox *)tmp, tmp1, FALSE, FALSE, 3);
+ gtk_widget_show_all(tmp);
+ gtk_widget_reparent (send_widget, tmp_box);
+ gtk_box_set_child_packing ((GtkBox *)tmp_box, send_widget, FALSE, FALSE, 6, GTK_PACK_END);
+ gtk_tool_item_set_is_important (GTK_TOOL_ITEM (send_widget), TRUE);
+ send_widget = gtk_bin_get_child ((GtkBin *)send_widget);
+ gtk_container_remove((GtkContainer *)send_widget, gtk_bin_get_child ((GtkBin *)send_widget));
+ gtk_container_add((GtkContainer *)send_widget, tmp);
+ gtk_button_set_relief ((GtkButton *)send_widget, GTK_RELIEF_NORMAL);
+
+ path = "/main-toolbar/pre-main-toolbar/attach";
+ send_widget = gtk_ui_manager_get_widget (ui_manager, path);
+ tmp = gtk_hbox_new (FALSE, 0);
+ tmp1 = gtk_image_new_from_pixbuf (e_icon_factory_get_icon("gtk-add", E_ICON_SIZE_BUTTON));
+ gtk_box_pack_start ((GtkBox *)tmp, tmp1, FALSE, FALSE, 0);
+ tmp1 = gtk_label_new_with_mnemonic (_("Add attachment"));
+ gtk_box_pack_start ((GtkBox *)tmp, tmp1, FALSE, FALSE, 3);
+ gtk_widget_show_all(tmp);
+ gtk_widget_reparent (send_widget, tmp_box);
+ gtk_box_set_child_packing ((GtkBox *)tmp_box, send_widget, FALSE, FALSE, 6, GTK_PACK_START);
+ gtk_tool_item_set_is_important (GTK_TOOL_ITEM (send_widget), TRUE);
+ send_widget = gtk_bin_get_child ((GtkBin *)send_widget);
+ gtk_container_remove((GtkContainer *)send_widget, gtk_bin_get_child ((GtkBin *)send_widget));
+ gtk_container_add((GtkContainer *)send_widget, tmp);
+ gtk_button_set_relief ((GtkButton *)send_widget, GTK_RELIEF_NORMAL);
+
+ gtk_widget_show(tmp_box);
+ gtk_box_pack_end ((GtkBox *)exp_box, tmp_box, TRUE, TRUE, 0);
+ gtk_box_pack_end ((GtkBox *)editor->vbox, exp_box, FALSE, FALSE, 3);
+
+ }
composer_setup_charset_menu (composer);
if (error != NULL) {
@@ -141,11 +210,15 @@ e_composer_private_init (EMsgComposer *composer)
/* Construct the header table. */
container = editor->vbox;
-
+
widget = e_composer_header_table_new ();
gtk_container_set_border_width (GTK_CONTAINER (widget), 6);
- gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
- gtk_box_reorder_child (GTK_BOX (container), widget, 2);
+ gtk_box_pack_start (GTK_BOX (editor->vbox), widget, FALSE, FALSE, 0);
+ if (composer->lite)
+ gtk_box_reorder_child (GTK_BOX (editor->vbox), widget, 0);
+ else
+ gtk_box_reorder_child (GTK_BOX (editor->vbox), widget, 2);
+
priv->header_table = g_object_ref (widget);
gtk_widget_show (widget);
@@ -156,6 +229,8 @@ e_composer_private_init (EMsgComposer *composer)
priv->attachment_paned = g_object_ref (widget);
gtk_widget_show (widget);
+ g_object_set_data ((GObject *)composer, "vbox", editor->vbox);
+
/* Reparent the scrolled window containing the GtkHTML widget
* into the content area of the top attachment pane. */
diff --git a/composer/e-composer-text-header.c b/composer/e-composer-text-header.c
index 2945720c90..e676ef941c 100644
--- a/composer/e-composer-text-header.c
+++ b/composer/e-composer-text-header.c
@@ -1,3 +1,7 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
+/*Modified for Anjal - Johnny Jacob <jjohnny@novell.com>*/
+
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -21,6 +25,11 @@
#define E_COMPOSER_TEXT_HEADER_GET_ENTRY(header) \
(GTK_ENTRY (E_COMPOSER_HEADER (header)->input_widget))
+struct _EComposerTextHeaderPrivate {
+ GtkLinkButton *linkbtn;
+ guint destination_index;
+};
+
static gpointer parent_class;
static void
@@ -99,19 +108,23 @@ e_composer_text_header_get_type (void)
}
EComposerHeader *
-e_composer_text_header_new_label (const gchar *label)
+e_composer_text_header_new_label (const gchar *label, const gchar *action_label)
{
return g_object_new (
E_TYPE_COMPOSER_TEXT_HEADER, "label", label,
- "button", FALSE, NULL);
+ "button", FALSE, "addaction", action_label && *action_label,
+ "addaction_text", action_label,
+ "visible", action_label == NULL, NULL);
}
EComposerHeader *
-e_composer_text_header_new_button (const gchar *label)
+e_composer_text_header_new_button (const gchar *label, const gchar *action_label)
{
return g_object_new (
E_TYPE_COMPOSER_TEXT_HEADER, "label", label,
- "button", TRUE, NULL);
+ "button", TRUE, "addaction", action_label != NULL,
+ "addaction_text", action_label,
+ "visible", action_label == NULL, NULL);
}
const gchar *
diff --git a/composer/e-composer-text-header.h b/composer/e-composer-text-header.h
index c0c4708595..79e972d3c6 100644
--- a/composer/e-composer-text-header.h
+++ b/composer/e-composer-text-header.h
@@ -57,10 +57,13 @@ struct _EComposerTextHeaderClass {
};
GType e_composer_text_header_get_type (void);
-EComposerHeader * e_composer_text_header_new_label
- (const gchar *label);
-EComposerHeader * e_composer_text_header_new_button
- (const gchar *label);
+
+EComposerHeader *
+e_composer_text_header_new_label (const gchar *label, const gchar *action_label);
+
+EComposerHeader *
+e_composer_text_header_new_button (const gchar *label, const gchar *action_label);
+
const gchar * e_composer_text_header_get_text (EComposerTextHeader *header);
void e_composer_text_header_set_text (EComposerTextHeader *header,
const gchar *text);
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 80ee19d9f4..2589786f48 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -2079,6 +2079,7 @@ msg_composer_init (EMsgComposer *composer)
const gchar *id;
gint n_targets;
+ composer->lite = composer_lite;
composer->priv = E_MSG_COMPOSER_GET_PRIVATE (composer);
e_composer_private_init (composer);
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
index 334a7cf35d..7e5e8f6cf4 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -61,6 +61,7 @@ typedef struct _EMsgComposerPrivate EMsgComposerPrivate;
struct _EMsgComposer {
GtkhtmlEditor parent;
EMsgComposerPrivate *priv;
+ gboolean lite;
};
struct _EMsgComposerClass {