aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@novell.com>2010-05-08 04:03:03 +0800
committerFederico Mena Quintero <federico@novell.com>2010-05-08 04:23:25 +0800
commitf9352579b48ee7a697979e3f7043399097652cd9 (patch)
tree130428bc7a1c6ef84719c6ade1266fe848763bb5 /composer
parent2aa44ca3df3a60357397a47316465ffbeda1e82c (diff)
downloadgsoc2013-evolution-f9352579b48ee7a697979e3f7043399097652cd9.tar.gz
gsoc2013-evolution-f9352579b48ee7a697979e3f7043399097652cd9.tar.zst
gsoc2013-evolution-f9352579b48ee7a697979e3f7043399097652cd9.zip
Use the lite-composer when the shell is in small-screen mode
Remove various utility functions that conditionally create a lite composer, and just use the normal functions to create a composer. The composer will know by itself whether it needs to adjust for small screens. Signed-off-by: Federico Mena Quintero <federico@novell.com>
Diffstat (limited to 'composer')
-rw-r--r--composer/e-msg-composer.c32
-rw-r--r--composer/e-msg-composer.h2
2 files changed, 11 insertions, 23 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 888705d0d1..e5d21862f0 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];
@@ -2198,29 +2196,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 *
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
index 19f21b7df2..884b077862 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -71,9 +71,7 @@ struct _EMsgComposerClass {
GType e_msg_composer_get_type (void);
EMsgComposer * e_msg_composer_new (void);
-void e_msg_composer_set_lite (void);
gboolean e_msg_composer_get_lite (void);
-EMsgComposer * e_msg_composer_lite_new (void);
EMsgComposer * e_msg_composer_new_with_message (CamelMimeMessage *msg);
EMsgComposer * e_msg_composer_new_from_url (const gchar *url);
EMsgComposer * e_msg_composer_new_redirect (CamelMimeMessage *message,