aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--composer/e-composer-header-table.c4
-rw-r--r--composer/e-composer-header.c19
-rw-r--r--mail/em-composer-utils.c10
-rw-r--r--mail/em-composer-utils.h2
-rw-r--r--widgets/misc/e-search-bar.c7
5 files changed, 31 insertions, 11 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);
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 4a681c99bc..7bb87222cd 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -732,7 +732,7 @@ em_utils_compose_lite_new_message (const gchar *fromuri)
* window. If @url is non-NULL, the composer fields will be filled in
* according to the values in the mailto url.
**/
-void
+struct _EMsgComposer *
em_utils_compose_new_message_with_mailto (const gchar *url, const gchar *fromuri)
{
EMsgComposer *composer;
@@ -753,8 +753,12 @@ em_utils_compose_new_message_with_mailto (const gchar *url, const gchar *fromuri
composer_set_no_change (composer, TRUE, url == NULL);
- gtk_widget_show ((GtkWidget *) composer);
- gdk_window_raise (((GtkWidget *) composer)->window);
+ if (!e_msg_composer_get_lite()) {
+ gtk_widget_show ((GtkWidget *) composer);
+ gdk_window_raise (((GtkWidget *) composer)->window);
+ }
+
+ return composer;
}
/* Editing messages... */
diff --git a/mail/em-composer-utils.h b/mail/em-composer-utils.h
index 2f78f2769f..ab4a86368e 100644
--- a/mail/em-composer-utils.h
+++ b/mail/em-composer-utils.h
@@ -53,7 +53,7 @@ void em_utils_compose_new_message (const gchar *fromuri);
struct _EMsgComposer * em_utils_compose_lite_new_message (const gchar *fromuri);
/* FIXME: mailto? url? should make up its mind what its called. imho use 'uri' */
-void em_utils_compose_new_message_with_mailto (const gchar *url, const gchar *fromuri);
+struct _EMsgComposer * em_utils_compose_new_message_with_mailto (const gchar *url, const gchar *fromuri);
void em_utils_edit_message (struct _CamelMimeMessage *message, struct _CamelFolder *folder);
void em_utils_edit_messages (struct _CamelFolder *folder, GPtrArray *uids, gboolean replace);
diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c
index 041e46a1f3..acd52ece6f 100644
--- a/widgets/misc/e-search-bar.c
+++ b/widgets/misc/e-search-bar.c
@@ -1451,7 +1451,9 @@ e_search_bar_set_search_scope (ESearchBar *search_bar, gint id)
gint row;
g_return_if_fail (E_IS_SEARCH_BAR (search_bar));
-
+
+ if (!search_bar->scopeoption_menu)
+ return;
row = find_id (search_bar->scopeoption_menu, id, "EsbItemId", NULL);
if (row == -1)
return;
@@ -1505,6 +1507,9 @@ e_search_bar_get_search_scope (ESearchBar *search_bar)
g_return_val_if_fail (search_bar != NULL, -1);
g_return_val_if_fail (E_IS_SEARCH_BAR (search_bar), -1);
+ if (!search_bar->scopeoption_menu)
+ return -7 /*Current folder hack */;
+
menu_item = gtk_menu_get_active (GTK_MENU (search_bar->scopeoption_menu));
scopeitem_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menu_item), "EsbItemId"));