[anjal] Updated Evolution patch, supporting Account wizard.
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: svn-commits-list gnome org
- Subject: [anjal] Updated Evolution patch, supporting Account wizard.
- Date: Thu, 30 Apr 2009 13:44:09 -0400 (EDT)
commit 705890836df504cd8092727aad586e8bfbd32693
Author: Srinivasa Ragavan <sragavan novell com>
Date: Thu Apr 30 23:13:14 2009 +0530
Updated Evolution patch, supporting Account wizard.
---
evo-anjal.patch | 211 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 201 insertions(+), 10 deletions(-)
diff --git a/evo-anjal.patch b/evo-anjal.patch
index 23e25db..233a086 100755
--- a/evo-anjal.patch
+++ b/evo-anjal.patch
@@ -406,6 +406,45 @@ index c0c4708..79e972d 100644
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/e-util/e-config.c b/e-util/e-config.c
+index 4530d7a..4c7116b 100644
+--- a/e-util/e-config.c
++++ b/e-util/e-config.c
+@@ -532,11 +532,13 @@ ec_rebuild(EConfig *emp)
+ gnome_druid_page_edge_set_title((GnomeDruidPageEdge *)page, translated_label);
+ gnome_druid_insert_page((GnomeDruid *)druid, pagenode?(GnomeDruidPage *)pagenode->frame:NULL, (GnomeDruidPage *)page);
+ }
+- if (item->type == E_CONFIG_PAGE_FINISH) {
+- g_signal_connect(page, "back", G_CALLBACK(ec_druid_prev), wn);
+- g_signal_connect(page, "finish", G_CALLBACK(ec_druid_finish), wn);
+- } else
+- g_signal_connect(page, "next", G_CALLBACK(ec_druid_next), wn);
++ if (page) {
++ if (item->type == E_CONFIG_PAGE_FINISH) {
++ g_signal_connect(page, "back", G_CALLBACK(ec_druid_prev), wn);
++ g_signal_connect(page, "finish", G_CALLBACK(ec_druid_finish), wn);
++ } else
++ g_signal_connect(page, "next", G_CALLBACK(ec_druid_next), wn);
++ }
+ wn->frame = page;
+ wn->widget = page;
+ }
+@@ -567,10 +569,11 @@ ec_rebuild(EConfig *emp)
+ page = item->factory(emp, item, root, wn->frame, wn->context->data);
+ if (emp->type == E_CONFIG_DRUID) {
+ if (page) {
+- g_return_if_fail (GNOME_IS_DRUID_PAGE_STANDARD(page));
+- connect = wn->frame != page;
+- wn->frame = page;
+- page = ((GnomeDruidPageStandard *)page)->vbox;
++ if (GNOME_IS_DRUID_PAGE_STANDARD(page)) {
++ connect = wn->frame != page;
++ wn->frame = page;
++ page = ((GnomeDruidPageStandard *)page)->vbox;
++ }
+ } else
+ wn->frame = page;
+ } else {
diff --git a/filter/Makefile.am b/filter/Makefile.am
index 7d4e72d..1c477f4 100644
--- a/filter/Makefile.am
@@ -463,7 +502,7 @@ index 7d4e72d..1c477f4 100644
libfilter_la_LDFLAGS = $(NO_UNDEFINED)
diff --git a/mail/Makefile.am b/mail/Makefile.am
-index e286a47..1b78525 100644
+index e286a47..301ea05 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -31,7 +31,9 @@ INCLUDES = \
@@ -477,12 +516,13 @@ index e286a47..1b78525 100644
# Mail.idl
MAIL_IDL = Evolution-Mail.idl
-@@ -54,9 +56,16 @@ idl_DATA = $(MAIL_IDL)
+@@ -54,9 +56,17 @@ idl_DATA = $(MAIL_IDL)
# plugin mail api
mailinclude_HEADERS = \
$(MAIL_IDL_GENERATED_H) \
+ e-searching-tokenizer.c \
+ e-searching-tokenizer.h \
++ em-account-editor.h \
em-composer-utils.h \
em-config.h \
em-event.h \
@@ -494,7 +534,7 @@ index e286a47..1b78525 100644
em-folder-browser.h \
em-folder-tree-model.h \
em-folder-tree.h \
-@@ -72,17 +81,21 @@ mailinclude_HEADERS = \
+@@ -72,17 +82,21 @@ mailinclude_HEADERS = \
em-icon-stream.h \
em-inline-filter.h \
em-junk-hook.h \
@@ -516,7 +556,7 @@ index e286a47..1b78525 100644
mail-session.h \
mail-tools.h \
message-list.h \
-@@ -92,19 +105,80 @@ mailinclude_HEADERS = \
+@@ -92,19 +106,80 @@ mailinclude_HEADERS = \
libevolution_mail_la_SOURCES = \
$(MAIL_IDL_GENERATED) \
@@ -604,7 +644,7 @@ index e286a47..1b78525 100644
em-filter-context.c \
em-filter-context.h \
em-filter-editor.c \
-@@ -115,7 +189,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 \
@@ -614,7 +654,7 @@ index e286a47..1b78525 100644
em-folder-properties.c \
em-folder-properties.h \
em-folder-selection-button.c \
-@@ -124,34 +199,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 \
@@ -649,7 +689,7 @@ index e286a47..1b78525 100644
em-sync-stream.c \
em-utils.c \
em-vfolder-context.c \
-@@ -161,63 +217,41 @@ libevolution_mail_la_SOURCES = \
+@@ -161,63 +218,41 @@ libevolution_mail_la_SOURCES = \
em-vfolder-rule.c \
em-vfolder-rule.h \
mail-autofilter.c \
@@ -721,6 +761,157 @@ index e286a47..1b78525 100644
server_in_files = GNOME_Evolution_Mail.server.in.in
server_DATA = $(server_in_files:.server.in.in=.server)
+diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
+index b9850bd..a780929 100644
+--- a/mail/em-account-editor.c
++++ b/mail/em-account-editor.c
+@@ -276,6 +276,26 @@ EMAccountEditor *em_account_editor_new(EAccount *account, em_account_editor_t ty
+ return emae;
+ }
+
++/**
++ * em_account_editor_new_for_pages:
++ * @account:
++ * @type:
++ *
++ * Create a new account editor. If @account is NULL then this is to
++ * create a new account, else @account is copied to a working
++ * structure and is for editing an existing account.
++ *
++ * Return value:
++ **/
++EMAccountEditor *em_account_editor_new_for_pages(EAccount *account, em_account_editor_t type, char *id, GtkWidget **pages)
++{
++ EMAccountEditor *emae = g_object_new(em_account_editor_get_type(), NULL);
++ emae->pages = pages;
++ em_account_editor_construct(emae, account, type, id);
++
++ return emae;
++}
++
+ /* ********************************************************************** */
+
+ static struct {
+@@ -401,7 +421,7 @@ emae_display_license(EMAccountEditor *emae, CamelProvider *prov)
+ gtk_text_view_set_editable((GtkTextView *)w, FALSE);
+ response = gtk_dialog_run((GtkDialog *)dialog);
+ } else {
+- e_error_run((GtkWindow *)gtk_widget_get_toplevel(emae->editor),
++ e_error_run(emae->editor ? (GtkWindow *)gtk_widget_get_toplevel(emae->editor) : NULL,
+ "mail:no-load-license", prov->license_file, NULL);
+ }
+
+@@ -1603,11 +1623,12 @@ static void emae_check_authtype(GtkWidget *w, EMAccountEditorService *service)
+ uri = e_account_get_string(emae->account, emae_service_info[service->type].account_uri_key);
+ g_object_ref(emae);
+
+- service->check_dialog = e_error_new((GtkWindow *)gtk_widget_get_toplevel(emae->editor),
++ service->check_dialog = e_error_new(emae->editor ? (GtkWindow *)gtk_widget_get_toplevel(emae->editor) : NULL,
+ "mail:checking-service", NULL);
+ g_signal_connect(service->check_dialog, "response", G_CALLBACK(emae_check_authtype_response), service);
+ gtk_widget_show(service->check_dialog);
+- gtk_widget_set_sensitive(emae->editor, FALSE);
++ if (emae->editor)
++ gtk_widget_set_sensitive(emae->editor, FALSE);
+ service->check_id = mail_check_service(uri, service->type, emae_check_authtype_done, service);
+ }
+
+@@ -1789,7 +1810,9 @@ emae_identity_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
+ }
+
+ w = glade_xml_get_widget(xml, item->label);
+- if (((EConfig *)gui->config)->type == E_CONFIG_DRUID) {
++ if (emae->type == EMAE_PAGES) {
++ gtk_box_pack_start (emae->pages[0], w, TRUE, TRUE, 0);
++ } else if (((EConfig *)gui->config)->type == E_CONFIG_DRUID) {
+ GladeXML *druidxml;
+ GtkWidget *page;
+
+@@ -1838,7 +1861,9 @@ emae_receive_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str
+ emae_setup_service(emae, &gui->source, xml);
+
+ w = glade_xml_get_widget(xml, item->label);
+- if (((EConfig *)gui->config)->type == E_CONFIG_DRUID) {
++ if (emae->type == EMAE_PAGES) {
++ gtk_box_pack_start (emae->pages[1], w, TRUE, TRUE, 0);
++ } else if (((EConfig *)gui->config)->type == E_CONFIG_DRUID) {
+ GladeXML *druidxml;
+ GtkWidget *page;
+
+@@ -2306,7 +2331,9 @@ emae_send_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct
+ emae_setup_service(emae, &gui->transport, xml);
+
+ w = glade_xml_get_widget(xml, item->label);
+- if (((EConfig *)gui->config)->type == E_CONFIG_DRUID) {
++ if (emae->type == EMAE_PAGES) {
++ gtk_box_pack_start (emae->pages[2], w, TRUE, TRUE, 0);
++ } else if (((EConfig *)gui->config)->type == E_CONFIG_DRUID) {
+ GladeXML *druidxml;
+ GtkWidget *page;
+
+@@ -2321,7 +2348,7 @@ emae_send_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct
+ gtk_box_pack_start((GtkBox*)((GnomeDruidPageStandard *)page)->vbox, w, TRUE, TRUE, 0);
+ w = page;
+ g_object_unref(druidxml);
+- gnome_druid_append_page((GnomeDruid *)parent, (GnomeDruidPage *)page);
++ gnome_druid_append_page((GnomeDruid *)parent, (GnomeDruidPage *)page);
+ } else {
+ gtk_notebook_append_page((GtkNotebook *)parent, w, gtk_label_new(_("Sending Email")));
+ }
+@@ -2542,6 +2569,10 @@ emae_widget_druid_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *paren
+ GladeXML *druidxml;
+ GtkWidget *w;
+ char *gladefile;
++ EMAccountEditor *emae = (EMAccountEditor *)data;
++
++ if (emae->type == EMAE_PAGES)
++ return NULL;
+
+ gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+ "mail-config.glade",
+@@ -2928,7 +2959,11 @@ em_account_editor_construct(EMAccountEditor *emae, EAccount *account, em_account
+
+ target = em_config_target_new_account(ec, emae->account);
+ e_config_set_target((EConfig *)ec, (EConfigTarget *)target);
+- emae->editor = e_config_create_window((EConfig *)ec, NULL, type==EMAE_NOTEBOOK?_("Account Editor"):_("Evolution Account Assistant"));
+
+- g_signal_connect(emae->editor, "destroy", G_CALLBACK(emae_editor_destroyed), emae);
++ if (type != EMAE_PAGES) {
++ emae->editor = e_config_create_window((EConfig *)ec, NULL, type==EMAE_NOTEBOOK?_("Account Editor"):_("Evolution Account Assistant"));
++ g_signal_connect(emae->editor, "destroy", G_CALLBACK(emae_editor_destroyed), emae);
++ } else {
++ e_config_create_widget((EConfig *)ec);
++ }
+ }
+diff --git a/mail/em-account-editor.h b/mail/em-account-editor.h
+index 9a5b09a..7219e26 100644
+--- a/mail/em-account-editor.h
++++ b/mail/em-account-editor.h
+@@ -39,6 +39,7 @@ typedef struct _EMAccountEditorClass EMAccountEditorClass;
+ typedef enum {
+ EMAE_NOTEBOOK,
+ EMAE_DRUID,
++ EMAE_PAGES,
+ } em_account_editor_t;
+
+ struct _EMAccountEditor {
+@@ -54,6 +55,8 @@ struct _EMAccountEditor {
+ struct _EAccount *account; /* working account, must instant apply to this */
+ struct _EAccount *original; /* original account, not changed unless commit is invoked */
+
++ GtkWidget **pages; /* Pages for Anjal's page type editor */
++
+ guint do_signature:1; /* allow editing signature */
+ };
+
+@@ -64,6 +67,7 @@ struct _EMAccountEditorClass {
+ GType em_account_editor_get_type(void);
+
+ EMAccountEditor *em_account_editor_new(struct _EAccount *account, em_account_editor_t type, char *id);
++EMAccountEditor *em_account_editor_new_for_pages(struct _EAccount *account, em_account_editor_t type, char *id, struct _GtkWidget **pages);
+
+ gboolean em_account_editor_save (EMAccountEditor *gui);
+ void em_account_editor_destroy (EMAccountEditor *gui);
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 8822566..12b4c48 100644
--- a/mail/em-composer-utils.c
@@ -817,7 +1008,7 @@ index d17a98c..8b5d279 100644
#ifdef __cplusplus
}
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
-index 54173a5..c871578 100644
+index 54173a5..3cfb590 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -110,6 +110,7 @@ struct _EMFolderTreePrivate {
@@ -836,7 +1027,7 @@ index 54173a5..c871578 100644
emft->priv = priv;
}
-@@ -2292,6 +2294,9 @@ emft_tree_button_press (GtkTreeView *treeview, GdkEventButton *event, EMFolderTr
+@@ -2292,6 +2314,9 @@ emft_tree_button_press (GtkTreeView *treeview, GdkEventButton *event, EMFolderTr
gtk_tree_view_set_cursor (treeview, tree_path, NULL, FALSE);
if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) {
@@ -846,7 +1037,7 @@ index 54173a5..c871578 100644
emft_tree_row_activated (treeview, tree_path, NULL, emft);
gtk_tree_path_free (tree_path);
return TRUE;
-@@ -2643,3 +2648,15 @@ emft_queue_save_state (EMFolderTree *emft)
+@@ -2643,3 +2668,15 @@ emft_queue_save_state (EMFolderTree *emft)
priv->save_state_id = g_timeout_add (1000, (GSourceFunc) emft_save_state, emft);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]