diff options
-rw-r--r-- | composer/e-msg-composer.c | 32 | ||||
-rw-r--r-- | composer/e-msg-composer.h | 2 | ||||
-rw-r--r-- | mail/em-composer-utils.c | 34 | ||||
-rw-r--r-- | mail/em-composer-utils.h | 1 |
4 files changed, 17 insertions, 52 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, diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index fc312c8ae4..fd0b56e7da 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -720,16 +720,14 @@ em_utils_composer_print_cb (EMsgComposer *composer, /* Composing messages... */ static EMsgComposer * -create_new_composer (const gchar *subject, const gchar *fromuri, gboolean lite) +create_new_composer (const gchar *subject, const gchar *fromuri) { EMsgComposer *composer; EComposerHeaderTable *table; EAccount *account = NULL; - if (lite) - composer = e_msg_composer_lite_new (); - else - composer = e_msg_composer_new (); + composer = e_msg_composer_new (); + table = e_msg_composer_get_header_table (composer); if (fromuri != NULL) { @@ -759,7 +757,7 @@ em_utils_compose_new_message (const gchar *fromuri) { GtkWidget *composer; - composer = (GtkWidget *) create_new_composer ("", fromuri, FALSE); + composer = (GtkWidget *) create_new_composer ("", fromuri); if (composer == NULL) return; @@ -769,26 +767,6 @@ em_utils_compose_new_message (const gchar *fromuri) } /** - * em_utils_compose_lite_new_message: - * - * Opens a new composer window as a child window of @parent's toplevel - * window. - **/ -EMsgComposer * -em_utils_compose_lite_new_message (const gchar *fromuri) -{ - GtkWidget *composer; - - composer = (GtkWidget *) create_new_composer ("", fromuri, TRUE); - if (composer == NULL) - return NULL; - - composer_set_no_change (E_MSG_COMPOSER (composer), TRUE, TRUE); - - return E_MSG_COMPOSER (composer); -} - -/** * em_utils_compose_new_message_with_mailto: * @url: mailto url * @@ -1146,7 +1124,7 @@ forward_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, Cam { EMsgComposer *composer; - composer = create_new_composer (subject, fromuri, FALSE); + composer = create_new_composer (subject, fromuri); if (composer == NULL) return NULL; @@ -1228,7 +1206,7 @@ forward_non_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, text = em_utils_message_to_html (message, _("-------- Forwarded Message --------"), flags, &len, NULL, NULL, &validity_found); if (text) { - composer = create_new_composer (subject, fromuri, FALSE); + composer = create_new_composer (subject, fromuri); if (composer) { if (CAMEL_IS_MULTIPART(camel_medium_get_content_object((CamelMedium *)message))) diff --git a/mail/em-composer-utils.h b/mail/em-composer-utils.h index be29a7ae71..92e7e182f4 100644 --- a/mail/em-composer-utils.h +++ b/mail/em-composer-utils.h @@ -33,7 +33,6 @@ G_BEGIN_DECLS void em_utils_compose_new_message (const gchar *fromuri); -EMsgComposer * em_utils_compose_lite_new_message (const gchar *fromuri); /* FIXME: mailto? url? should make up its mind what its called. imho use 'uri' */ EMsgComposer * em_utils_compose_new_message_with_mailto (const gchar *url, const gchar *fromuri); |