diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-05-27 01:09:33 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-05-27 01:09:33 +0800 |
commit | c9ec8c3f4dce2b02c91268529977770364ef87fe (patch) | |
tree | d574f2be1b5438407e59e2fead1321766c9bbc83 /composer/e-msg-composer.c | |
parent | 6fec6bf39467dd32625847be1b021a7e5bc94d76 (diff) | |
parent | 96538878911586a9e9ca26b81e1916c04e538980 (diff) | |
download | gsoc2013-evolution-c9ec8c3f4dce2b02c91268529977770364ef87fe.tar.gz gsoc2013-evolution-c9ec8c3f4dce2b02c91268529977770364ef87fe.tar.zst gsoc2013-evolution-c9ec8c3f4dce2b02c91268529977770364ef87fe.zip |
Merge branch 'express2'
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r-- | composer/e-msg-composer.c | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 36100621fe..67a9781395 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -85,8 +85,6 @@ enum { LAST_SIGNAL }; -gboolean composer_lite = FALSE; - static gpointer parent_class; static guint signals[LAST_SIGNAL]; @@ -1681,6 +1679,7 @@ msg_composer_constructed (GObject *object) g_signal_connect (object, "delete-event", G_CALLBACK (msg_composer_delete_event_cb), NULL); + e_shell_adapt_window_size (shell, GTK_WINDOW (composer)); e_shell_watch_window (shell, GTK_WINDOW (object)); /* Restore Persistent State */ @@ -2170,8 +2169,14 @@ msg_composer_class_init (EMsgComposerClass *class) static void msg_composer_init (EMsgComposer *composer) { - composer->lite = composer_lite; + EShell *shell = e_shell_get_default (); + composer->priv = E_MSG_COMPOSER_GET_PRIVATE (composer); + + if (e_shell_get_express_mode (shell)) { + GtkWindow *window = e_shell_get_active_window(shell); + gtk_window_set_transient_for (GTK_WINDOW(composer), window); + } } GType @@ -2217,29 +2222,21 @@ e_msg_composer_new (void) "html", e_web_view_new (), NULL); } -void -e_msg_composer_set_lite (void) -{ - composer_lite = TRUE; -} - +/** + * e_msg_composer_get_lite: + * + * Used within the composer to see if it should be made suitable for small + * screens. + * + * Return value: whether the surrounding #EShell is in small screen mode. + */ gboolean e_msg_composer_get_lite (void) { - return composer_lite; -} - -EMsgComposer * -e_msg_composer_lite_new (void) -{ - EMsgComposer *composer; - - /* Init lite-composer for ever for the session */ - composer_lite = TRUE; - - composer = e_msg_composer_new (); + EShell *shell; - return composer; + shell = e_shell_get_default (); + return e_shell_get_small_screen_mode (shell); } EFocusTracker * |