diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2009-07-20 20:26:18 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@novell.com> | 2009-07-20 20:26:18 +0800 |
commit | 1550eff338a1194a90f3ad2948e4f381098c8a20 (patch) | |
tree | 9a1630010ebacdd3a365110c6ac61355d5d45ba4 /composer | |
parent | 1482abed5ec48a2b47d2f2bc17db4ad28d61d248 (diff) | |
download | gsoc2013-evolution-1550eff338a1194a90f3ad2948e4f381098c8a20.tar.gz gsoc2013-evolution-1550eff338a1194a90f3ad2948e4f381098c8a20.tar.zst gsoc2013-evolution-1550eff338a1194a90f3ad2948e4f381098c8a20.zip |
Add option to hide 'From' for Anjal.
Diffstat (limited to 'composer')
-rw-r--r-- | composer/e-composer-from-header.c | 8 | ||||
-rw-r--r-- | composer/e-composer-from-header.h | 1 | ||||
-rw-r--r-- | composer/e-composer-header-table.c | 31 |
3 files changed, 32 insertions, 8 deletions
diff --git a/composer/e-composer-from-header.c b/composer/e-composer-from-header.c index 4dadfa7ac7..e7963666f3 100644 --- a/composer/e-composer-from-header.c +++ b/composer/e-composer-from-header.c @@ -110,6 +110,14 @@ e_composer_from_header_new (const gchar *label) "button", FALSE, NULL); } +EComposerHeader * +e_composer_from_header_new_with_action (const gchar *label, const char *action) +{ + return g_object_new ( + E_TYPE_COMPOSER_FROM_HEADER, "label", label, + "button", FALSE, "addaction_text", action, "addaction", action!= NULL, NULL); +} + EAccountList * e_composer_from_header_get_account_list (EComposerFromHeader *header) { diff --git a/composer/e-composer-from-header.h b/composer/e-composer-from-header.h index d2603bd664..cf360693aa 100644 --- a/composer/e-composer-from-header.h +++ b/composer/e-composer-from-header.h @@ -63,6 +63,7 @@ struct _EComposerFromHeaderClass { GType e_composer_from_header_get_type (void); EComposerHeader * e_composer_from_header_new (const gchar *label); +EComposerHeader * e_composer_from_header_new_with_action (const gchar *label, const char *action); EAccountList * e_composer_from_header_get_account_list (EComposerFromHeader *header); void e_composer_from_header_set_account_list diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c index b47a15b115..cbb0185c16 100644 --- a/composer/e-composer-header-table.c +++ b/composer/e-composer-header-table.c @@ -171,7 +171,11 @@ composer_header_table_notify_widget (GtkWidget *widget, { GtkWidget *parent; - parent = gtk_widget_get_parent (widget); + if (composer_lite) { + parent = gtk_widget_get_parent (widget); + parent = g_object_get_data ((GObject *)parent, "pdata"); + } else + parent = gtk_widget_get_parent (widget); g_return_if_fail (E_IS_COMPOSER_HEADER_TABLE (parent)); g_object_notify (G_OBJECT (parent), property_name); } @@ -532,12 +536,23 @@ composer_header_table_constructor (GType type, G_OBJECT (priv->signature_combo_box), "visible"); /* Now add the signature stuff. */ - gtk_table_attach ( - GTK_TABLE (object), priv->signature_label, - 2, 3, ii, ii + 1, 0, 0, 0, 3); - gtk_table_attach ( - GTK_TABLE (object), priv->signature_combo_box, - 3, 4, ii, ii + 1, 0, 0, 0, 3); + if (!composer_lite) { + gtk_table_attach ( + GTK_TABLE (object), priv->signature_label, + 2, 3, ii, ii + 1, 0, 0, 0, 3); + gtk_table_attach ( + GTK_TABLE (object), priv->signature_combo_box, + 3, 4, ii, ii + 1, composer_lite ? GTK_FILL: 0, 0, 0, 3); + } else { + GtkWidget *box = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start ((GtkBox *)box, priv->signature_label, FALSE, FALSE, 4); + gtk_box_pack_end ((GtkBox *)box, priv->signature_combo_box, TRUE, TRUE, 0); + g_object_set_data ((GObject *)box, "pdata", object); + gtk_table_attach ( + GTK_TABLE (object), box, + 3, 4, ii, ii + 1, GTK_FILL, 0, 0, 3); + gtk_widget_show (box); + } if (composer_lite) { ii = E_COMPOSER_HEADER_TO; @@ -924,7 +939,7 @@ composer_header_table_init (EComposerHeaderTable *table) table->priv->actions_container = (GtkHBox *)gtk_hbox_new (FALSE, 6); - header = e_composer_from_header_new (_("Fr_om:")); + header = e_composer_from_header_new_with_action (_("Fr_om:"), _("From")); composer_header_table_bind_header ("account", "changed", header); composer_header_table_bind_header ("account-list", "refreshed", header); composer_header_table_bind_header ("account-name", "changed", header); |