diff options
author | Srinivasa Ragavan <sragavan@gnome.org> | 2010-03-01 20:16:33 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-03-14 09:49:49 +0800 |
commit | a952896b27334756b349c1f6f25db6b2021aab4f (patch) | |
tree | d0f1ca424720df35b9e98c5769f23701b40df548 | |
parent | d5da1afafcbd29f9479043b4f418e02c033af53d (diff) | |
download | gsoc2013-evolution-a952896b27334756b349c1f6f25db6b2021aab4f.tar.gz gsoc2013-evolution-a952896b27334756b349c1f6f25db6b2021aab4f.tar.zst gsoc2013-evolution-a952896b27334756b349c1f6f25db6b2021aab4f.zip |
Integrate into new account button.
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | capplet/anjal-settings-main.c | 2 | ||||
-rw-r--r-- | capplet/mail-capplet-shell.c | 19 | ||||
-rw-r--r-- | capplet/mail-capplet-shell.h | 2 | ||||
-rw-r--r-- | modules/mail/Makefile.am | 1 | ||||
-rw-r--r-- | modules/mail/em-account-prefs.c | 5 | ||||
-rw-r--r-- | plugins/startup-wizard/startup-wizard.c | 2 |
7 files changed, 22 insertions, 11 deletions
diff --git a/Makefile.am b/Makefile.am index 72d0690bf1..bf1adb0a25 100644 --- a/Makefile.am +++ b/Makefile.am @@ -57,6 +57,7 @@ SUBDIRS = \ composer \ mail \ calendar \ + capplet \ art \ plugins \ modules \ @@ -65,7 +66,6 @@ SUBDIRS = \ views \ po \ sounds \ - capplet \ $(HELP_SUBDIR) DISTCLEANFILES = \ diff --git a/capplet/anjal-settings-main.c b/capplet/anjal-settings-main.c index 1b7fe0d5bc..7a90b879f2 100644 --- a/capplet/anjal-settings-main.c +++ b/capplet/anjal-settings-main.c @@ -158,7 +158,7 @@ idle_cb (MailCappletShell *mshell G_GNUC_UNUSED) static void create_default_shell (void) { - main_window = mail_capplet_shell_new(socket_id, FALSE); + main_window = mail_capplet_shell_new(socket_id, FALSE, TRUE); if (!socket_id) gtk_widget_show (main_window); g_idle_add ((GSourceFunc) idle_cb, remaining_args); diff --git a/capplet/mail-capplet-shell.c b/capplet/mail-capplet-shell.c index ae30f2f6d6..d1ccdf80ac 100644 --- a/capplet/mail-capplet-shell.c +++ b/capplet/mail-capplet-shell.c @@ -71,6 +71,8 @@ struct _MailCappletShellPrivate { GtkWidget *action_bar; GtkWidget *quit; + gboolean main_loop; + MailViewChild *settings_view; }; @@ -196,8 +198,13 @@ ms_init_style (GtkStyle *style) static void mail_capplet_shell_quit (MailCappletShell *shell) { - gtk_main_quit(); -} + MailCappletShellPrivate *priv = shell->priv; + + if (priv->main_loop) + gtk_main_quit(); + else + gtk_widget_hide ((GtkWidget *)shell); +} static void mail_capplet_shell_quit_cb (GtkWidget *w G_GNUC_UNUSED, @@ -261,7 +268,7 @@ handle_cmdline (MailView *mv, MailCappletShell *shell) #endif void -mail_capplet_shell_construct (MailCappletShell *shell, int socket_id, gboolean just_druid) +mail_capplet_shell_construct (MailCappletShell *shell, int socket_id, gboolean just_druid, gboolean main_loop) { MailCappletShellPrivate *priv = shell->priv; GtkWidget *tmp, *img, *box, *ar1, *ar2, *lbl; @@ -284,7 +291,7 @@ mail_capplet_shell_construct (MailCappletShell *shell, int socket_id, gboolean j gtk_window_set_default_size ((GtkWindow *)shell, 1024, 500); } - + priv->main_loop = main_loop; priv->box = (GtkWidget *) gtk_vbox_new (FALSE, 0); gtk_widget_show ((GtkWidget *)priv->box); @@ -375,10 +382,10 @@ mail_capplet_shell_toolbar_height (MailCappletShell *shell) } MailCappletShell * -mail_capplet_shell_new (int socket_id, gboolean just_druid) +mail_capplet_shell_new (int socket_id, gboolean just_druid, gboolean main_loop) { MailCappletShell *shell = g_object_new (MAIL_CAPPLET_SHELL_TYPE, NULL); - mail_capplet_shell_construct (shell, socket_id, just_druid); + mail_capplet_shell_construct (shell, socket_id, just_druid, main_loop); return shell; } diff --git a/capplet/mail-capplet-shell.h b/capplet/mail-capplet-shell.h index ab33850257..9cc4255760 100644 --- a/capplet/mail-capplet-shell.h +++ b/capplet/mail-capplet-shell.h @@ -50,7 +50,7 @@ typedef struct _MailCappletShellClass { void (* ctrl_q_pressed) (MailCappletShell *class); } MailCappletShellClass; -MailCappletShell * mail_capplet_shell_new (int socket_id, gboolean just_druid); +MailCappletShell * mail_capplet_shell_new (int socket_id, gboolean just_druid, gboolean main_loop); int mail_capplet_shell_toolbar_height (MailCappletShell *shell); #endif diff --git a/modules/mail/Makefile.am b/modules/mail/Makefile.am index bf0b9f1cce..de9eac5ada 100644 --- a/modules/mail/Makefile.am +++ b/modules/mail/Makefile.am @@ -61,6 +61,7 @@ libevolution_module_mail_la_LIBADD = \ $(top_builddir)/em-format/libemformat.la \ $(top_builddir)/widgets/menus/libmenus.la \ $(top_builddir)/filter/libfilter.la \ + $(top_builddir)/capplet/libevolution-mail-settings.la \ $(EVOLUTION_MAIL_LIBS) \ $(CAMEL_LIBS) \ $(GTKHTML_LIBS) \ diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c index ac58ea421d..13ede1f867 100644 --- a/modules/mail/em-account-prefs.c +++ b/modules/mail/em-account-prefs.c @@ -39,6 +39,7 @@ #include "e-mail-store.h" #include "em-config.h" #include "em-account-editor.h" +#include "capplet/mail-capplet-shell.h" #define EM_ACCOUNT_PREFS_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ @@ -111,7 +112,7 @@ account_prefs_add_account (EAccountManager *manager) parent = gtk_widget_get_toplevel (GTK_WIDGET (manager)); parent = gtk_widget_is_toplevel (parent) ? parent : NULL; - +#if 0 /** @HookPoint-EMConfig: New Mail Account Assistant * @Id: org.gnome.evolution.mail.config.accountAssistant * @Type: E_CONFIG_ASSISTANT @@ -124,6 +125,8 @@ account_prefs_add_account (EAccountManager *manager) NULL, EMAE_ASSISTANT, "org.gnome.evolution.mail.config.accountAssistant"); priv->assistant = emae->editor; +#endif + priv->assistant = mail_capplet_shell_new (0, TRUE, FALSE); g_object_add_weak_pointer (G_OBJECT (priv->assistant), &priv->assistant); gtk_window_set_transient_for (GTK_WINDOW (priv->assistant), parent); diff --git a/plugins/startup-wizard/startup-wizard.c b/plugins/startup-wizard/startup-wizard.c index c8513f071f..ede00154f0 100644 --- a/plugins/startup-wizard/startup-wizard.c +++ b/plugins/startup-wizard/startup-wizard.c @@ -79,7 +79,7 @@ startup_wizard (EPlugin *ep, ESEventTargetUpgrade *target) return; } - start_page = (GtkWidget *)mail_capplet_shell_new(0, TRUE); + start_page = (GtkWidget *)mail_capplet_shell_new(0, TRUE, TRUE); gtk_widget_show (start_page); g_signal_connect ( start_page, "delete-event", |