diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-06-20 07:05:26 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-06-20 07:05:26 +0800 |
commit | c6aabcca4fa3e1af7cbb3b3295ef2c7d61b77d06 (patch) | |
tree | 0511fb4033ea74c0bc0c26aad4594868d78277a8 /composer | |
parent | f4d748a85c534cb8a693b6a1f1b3353adfd73b5b (diff) | |
parent | ed2d22755ff21516e3284f38eefd080102dd3715 (diff) | |
download | gsoc2013-evolution-c6aabcca4fa3e1af7cbb3b3295ef2c7d61b77d06.tar gsoc2013-evolution-c6aabcca4fa3e1af7cbb3b3295ef2c7d61b77d06.tar.gz gsoc2013-evolution-c6aabcca4fa3e1af7cbb3b3295ef2c7d61b77d06.tar.bz2 gsoc2013-evolution-c6aabcca4fa3e1af7cbb3b3295ef2c7d61b77d06.tar.lz gsoc2013-evolution-c6aabcca4fa3e1af7cbb3b3295ef2c7d61b77d06.tar.xz gsoc2013-evolution-c6aabcca4fa3e1af7cbb3b3295ef2c7d61b77d06.tar.zst gsoc2013-evolution-c6aabcca4fa3e1af7cbb3b3295ef2c7d61b77d06.zip |
Merge commit 'EVOLUTION_2_27_3' into kill-bonobo
Conflicts:
composer/e-composer-header-table.h
composer/e-composer-header.c
composer/e-composer-private.c
configure.ac
mail/em-account-editor.c
po/POTFILES.in
po/or.po
widgets/misc/e-search-bar.c
Diffstat (limited to 'composer')
-rw-r--r-- | composer/e-composer-header.c | 10 | ||||
-rw-r--r-- | composer/e-composer-private.c | 92 |
2 files changed, 47 insertions, 55 deletions
diff --git a/composer/e-composer-header.c b/composer/e-composer-header.c index 453317870f..f1524a62e6 100644 --- a/composer/e-composer-header.c +++ b/composer/e-composer-header.c @@ -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 * diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c index d4ec9ddc69..5613670b13 100644 --- a/composer/e-composer-private.c +++ b/composer/e-composer-private.c @@ -90,7 +90,6 @@ e_composer_private_init (EMsgComposer *composer) GtkWidget *container; GtkWidget *widget; GtkWidget *send_widget; - GtkWidget *exp_box; const gchar *path; gchar *filename; gint ii; @@ -140,10 +139,45 @@ 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); + composer_setup_charset_menu (composer); + + if (error != NULL) { + /* Henceforth, bad things start happening. */ + g_critical ("%s", error->message); + g_clear_error (&error); + } + + /* 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 (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); + + /* Construct the attachment paned. */ + + widget = e_attachment_paned_new (); + gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); + priv->attachment_paned = g_object_ref (widget); + gtk_widget_show (widget); + if (composer->lite) { - GtkWidget *tmp, *tmp1, *tmp_box; + GtkWidget *tmp, *tmp1, *tmp_box, *container; + GtkWidget *combo; + + combo = e_attachment_paned_get_view_combo ( + E_ATTACHMENT_PANED (widget)); + gtk_widget_hide (combo); + container = e_attachment_paned_get_controls_container ( + E_ATTACHMENT_PANED (widget)); tmp_box = gtk_hbox_new (FALSE, 0); @@ -178,57 +212,9 @@ e_composer_private_init (EMsgComposer *composer) 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_stock ( - GTK_STOCK_ADD, GTK_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); - + gtk_box_pack_end (GTK_BOX (container), tmp_box, FALSE, FALSE, 3); } - composer_setup_charset_menu (composer); - - if (error != NULL) { - /* Henceforth, bad things start happening. */ - g_critical ("%s", error->message); - g_clear_error (&error); - } - - /* 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 (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); - - /* Construct the attachment paned. */ - - widget = e_attachment_paned_new (); - gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); - priv->attachment_paned = g_object_ref (widget); - gtk_widget_show (widget); g_object_set_data ((GObject *)composer, "vbox", editor->vbox); |