[anjal] PATCH : update to evo-anjal.patch. Moved composer-header changes to evolution and using it from mail
- From: Johnny Jacob <jjohnny src gnome org>
- To: svn-commits-list gnome org
- Subject: [anjal] PATCH : update to evo-anjal.patch. Moved composer-header changes to evolution and using it from mail
- Date: Mon, 23 Mar 2009 05:11:16 -0400 (EDT)
commit 44b6f04091e551e996267ff8c2be2d6a73d288bf
Author: Johnny Jacob <jjohnny novell com>
Date: Fri Mar 20 15:35:52 2009 +0530
PATCH : update to evo-anjal.patch. Moved composer-header changes to evolution and using it from mail-shared.so
---
evo-anjal.patch | 412 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 397 insertions(+), 15 deletions(-)
diff --git a/evo-anjal.patch b/evo-anjal.patch
index 1eccf5f..4160894 100755
--- a/evo-anjal.patch
+++ b/evo-anjal.patch
@@ -1,3 +1,386 @@
+diff --git a/composer/Makefile.am b/composer/Makefile.am
+index 5b777f5..62858c8 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) \
+@@ -27,27 +40,18 @@ INCLUDES = \
+ libcomposer_la_SOURCES = \
+ $(IDL_GENERATED) \
+ $(HTML_EDITOR_GENERATED) \
++ $(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
++
+
+ uidir = $(evolutionuidir)
+ ui_DATA = evolution-composer.ui
+diff --git a/composer/e-composer-from-header.h b/composer/e-composer-from-header.h
+index 74fda9a..f8c6dc6 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 461c11e..618adbf 100644
+--- a/composer/e-composer-header-table.c
++++ b/composer/e-composer-header-table.c
+@@ -649,7 +649,7 @@ 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:"), NULL);
+ composer_header_table_bind_header ("reply-to", "changed", header);
+ table->priv->headers[E_COMPOSER_HEADER_REPLY_TO] = header;
+
+@@ -672,7 +672,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 8cbcf64..f85d455 100644
+--- a/composer/e-composer-header.c
++++ b/composer/e-composer-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
+@@ -28,6 +32,8 @@ enum {
+ PROP_0,
+ PROP_BUTTON,
+ PROP_LABEL,
++ PROP_ADDACTION,
++ PROP_ADDACTION_TEXT,
+ PROP_SENSITIVE,
+ PROP_VISIBLE
+ };
+@@ -40,7 +46,9 @@ enum {
+
+ struct _EComposerHeaderPrivate {
+ gchar *label;
++ gchar *addaction_text;
+ gboolean button;
++ gboolean addaction; /*For Add button.*/
+ };
+
+ static gpointer parent_class;
+@@ -54,6 +62,14 @@ 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 (button);
++ e_composer_header_set_visible (header, TRUE);
++}
++
+ static GObject *
+ composer_header_constructor (GType type,
+ guint n_construct_properties,
+@@ -81,6 +97,20 @@ composer_header_constructor (GType type,
+ gtk_label_set_mnemonic_widget (
+ GTK_LABEL (widget), header->input_widget);
+ }
++
++ if (header->priv->addaction) {
++ header->action_widget = gtk_link_button_new_with_label (header->priv->label,
++ header->priv->addaction_text);
++ g_signal_connect (
++ header->action_widget, "clicked",
++ G_CALLBACK (composer_header_addaction_clicked_cb),
++ header);
++
++ /*TODO : Add + icon*/
++ /* widget = gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_MENU); */
++ /* gtk_button_set_image (header->action_widget, widget); */
++ }
++
+ header->title_widget = g_object_ref_sink (widget);
+
+ g_free (header->priv->label);
+@@ -104,6 +134,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;
+@@ -139,6 +177,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 (
+@@ -207,6 +254,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 d1edd11..3a2e45e 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;
+ };
+
+diff --git a/composer/e-composer-name-header.c b/composer/e-composer-name-header.c
+index 70a126b..ed96312 100644
+--- a/composer/e-composer-name-header.c
++++ b/composer/e-composer-name-header.c
+@@ -23,8 +23,8 @@
+ #include <glib/gi18n.h>
+
+ /* XXX Temporary kludge */
+-#include "addressbook/gui/contact-editor/e-contact-editor.h"
+-#include "addressbook/gui/contact-list-editor/e-contact-list-editor.h"
++/* #include "addressbook/gui/contact-editor/e-contact-editor.h" */
++/* #include "addressbook/gui/contact-list-editor/e-contact-list-editor.h" */
+
+ #define E_COMPOSER_NAME_HEADER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+@@ -117,10 +117,7 @@ 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);
+@@ -261,6 +258,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 04f7100..92a379b 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-text-header.c b/composer/e-composer-text-header.c
+index 2945720..bfb3237 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 != NULL,
++ "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 c0c4708..79e972d 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/filter/Makefile.am b/filter/Makefile.am
index 7d4e72d..1c477f4 100644
--- a/filter/Makefile.am
@@ -55,7 +438,7 @@ index 7d4e72d..1c477f4 100644
libfilter_la_LDFLAGS = $(NO_UNDEFINED)
diff --git a/mail/Makefile.am b/mail/Makefile.am
-index e286a47..70bbc19 100644
+index e286a47..b2745ee 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -31,7 +31,9 @@ INCLUDES = \
@@ -108,7 +491,7 @@ index e286a47..70bbc19 100644
mail-session.h \
mail-tools.h \
message-list.h \
-@@ -92,19 +105,83 @@ mailinclude_HEADERS = \
+@@ -92,19 +105,81 @@ mailinclude_HEADERS = \
libevolution_mail_la_SOURCES = \
$(MAIL_IDL_GENERATED) \
@@ -162,19 +545,15 @@ index e286a47..70bbc19 100644
+
+
+libevolution_mail_la_LIBADD = \
-+ $(top_builddir)/mail/libevolution-mail-shared.la \
++ $(top_builddir)/mail/libevolution-mail-shared.la \
+ $(top_builddir)/e-util/libeutil.la \
+ $(top_builddir)/shell/libeshell.la \
-+ $(top_builddir)/composer/libcomposer.la \
+ $(top_builddir)/widgets/table/libetable.la \
+ $(top_builddir)/widgets/text/libetext.la \
+ $(top_builddir)/widgets/misc/libemiscwidgets.la \
+ $(top_builddir)/widgets/misc/libefilterbar.la \
+ $(top_builddir)/filter/libfilter.la \
+ $(top_builddir)/widgets/menus/libmenus.la \
-+ $(top_builddir)/addressbook/util/libeabutil.la \
-+ $(top_builddir)/addressbook/gui/contact-editor/libecontacteditor.la \
-+ $(top_builddir)/addressbook/gui/contact-list-editor/libecontactlisteditor.la \
+ $(top_builddir)/mail/importers/libevolution-mail-importers.la \
+ $(SMIME_LIBS) \
+ $(EVOLUTION_MAIL_LIBS) \
@@ -195,10 +574,12 @@ index e286a47..70bbc19 100644
+ em-account-editor.h \
em-event.c \
+ em-config.c \
++ em-composer-utils.c \
++ em-composer-utils.h \
em-filter-context.c \
em-filter-context.h \
em-filter-editor.c \
-@@ -115,7 +192,8 @@ libevolution_mail_la_SOURCES = \
+@@ -115,7 +190,8 @@ libevolution_mail_la_SOURCES = \
em-filter-rule.h \
em-filter-source-element.c \
em-filter-source-element.h \
@@ -208,7 +589,7 @@ index e286a47..70bbc19 100644
em-folder-properties.c \
em-folder-properties.h \
em-folder-selection-button.c \
-@@ -124,34 +202,15 @@ libevolution_mail_la_SOURCES = \
+@@ -124,34 +200,15 @@ libevolution_mail_la_SOURCES = \
em-folder-selection.h \
em-folder-selector.c \
em-folder-selector.h \
@@ -243,7 +624,7 @@ index e286a47..70bbc19 100644
em-sync-stream.c \
em-utils.c \
em-vfolder-context.c \
-@@ -161,63 +220,38 @@ libevolution_mail_la_SOURCES = \
+@@ -161,63 +218,43 @@ libevolution_mail_la_SOURCES = \
em-vfolder-rule.c \
em-vfolder-rule.h \
mail-autofilter.c \
@@ -294,12 +675,13 @@ index e286a47..70bbc19 100644
- $(top_builddir)/widgets/misc/libefilterbar.la \
$(top_builddir)/filter/libfilter.la \
$(top_builddir)/widgets/menus/libmenus.la \
-- $(top_builddir)/addressbook/util/libeabutil.la \
-- $(top_builddir)/addressbook/gui/contact-editor/libecontacteditor.la \
-- $(top_builddir)/addressbook/gui/contact-list-editor/libecontactlisteditor.la \
++ $(top_builddir)/composer/libcomposer.la \
+ $(top_builddir)/addressbook/util/libeabutil.la \
+ $(top_builddir)/addressbook/gui/contact-editor/libecontacteditor.la \
+ $(top_builddir)/addressbook/gui/contact-list-editor/libecontactlisteditor.la \
- $(top_builddir)/mail/importers/libevolution-mail-importers.la \
$(SMIME_LIBS) \
-- $(EVOLUTION_MAIL_LIBS) \
+ $(EVOLUTION_MAIL_LIBS) \
- $(GTKHTML_LIBS) \
- $(REGEX_LIBS) \
$(THREADS_LIBS)
@@ -315,7 +697,7 @@ index e286a47..70bbc19 100644
server_in_files = GNOME_Evolution_Mail.server.in.in
server_DATA = $(server_in_files:.server.in.in=.server)
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
-index 54173a5..c871578 100644
+index 6b3e792..e96c016 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -110,6 +110,7 @@ struct _EMFolderTreePrivate {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]