aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-03-31 21:09:21 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-04-01 00:10:54 +0800
commit50b164637fb0cca89a20793341102b0ddbfc5b50 (patch)
treef8ae2ccf76d14b58c571d547f3f0d22ebf344996 /composer
parentff76ff2a2aecc2628e609700e28bcc47f329a2e8 (diff)
downloadgsoc2013-evolution-50b164637fb0cca89a20793341102b0ddbfc5b50.tar
gsoc2013-evolution-50b164637fb0cca89a20793341102b0ddbfc5b50.tar.gz
gsoc2013-evolution-50b164637fb0cca89a20793341102b0ddbfc5b50.tar.bz2
gsoc2013-evolution-50b164637fb0cca89a20793341102b0ddbfc5b50.tar.lz
gsoc2013-evolution-50b164637fb0cca89a20793341102b0ddbfc5b50.tar.xz
gsoc2013-evolution-50b164637fb0cca89a20793341102b0ddbfc5b50.tar.zst
gsoc2013-evolution-50b164637fb0cca89a20793341102b0ddbfc5b50.zip
EShell: Remove "small-screen-mode" property.
The property is always FALSE. Remove both the property itself and any logic predicated on it.
Diffstat (limited to 'composer')
-rw-r--r--composer/e-composer-header-table.c50
-rw-r--r--composer/e-composer-private.c89
2 files changed, 11 insertions, 128 deletions
diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c
index 5269ff46e9..43b9c9d787 100644
--- a/composer/e-composer-header-table.c
+++ b/composer/e-composer-header-table.c
@@ -160,17 +160,9 @@ static void
composer_header_table_notify_widget (GtkWidget *widget,
const gchar *property_name)
{
- EShell *shell;
GtkWidget *parent;
- /* FIXME Pass this in somehow. */
- shell = e_shell_get_default ();
-
- if (e_shell_get_small_screen_mode (shell)) {
- parent = gtk_widget_get_parent (widget);
- parent = g_object_get_data (G_OBJECT (parent), "pdata");
- } else
- parent = gtk_widget_get_parent (widget);
+ parent = gtk_widget_get_parent (widget);
g_return_if_fail (E_IS_COMPOSER_HEADER_TABLE (parent));
g_object_notify (G_OBJECT (parent), property_name);
}
@@ -818,7 +810,6 @@ composer_header_table_constructed (GObject *object)
EShell *shell;
guint ii;
gint row_padding;
- gboolean small_screen_mode;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (e_composer_header_table_parent_class)->
@@ -829,8 +820,6 @@ composer_header_table_constructed (GObject *object)
client_cache = e_shell_get_client_cache (shell);
registry = e_composer_header_table_get_registry (table);
- small_screen_mode = e_shell_get_small_screen_mode (shell);
-
name_selector = e_name_selector_new (client_cache);
table->priv->name_selector = name_selector;
@@ -883,8 +872,7 @@ composer_header_table_constructed (GObject *object)
/* Use "ypadding" instead of "row-spacing" because some rows may
* be invisible and we don't want spacing around them. */
- /* For small screens, pack the table's rows closely together. */
- row_padding = small_screen_mode ? 0 : 3;
+ row_padding = 3;
for (ii = 0; ii < G_N_ELEMENTS (table->priv->headers); ii++) {
gtk_table_attach (
@@ -916,32 +904,14 @@ composer_header_table_constructed (GObject *object)
G_BINDING_SYNC_CREATE);
/* Now add the signature stuff. */
- if (!small_screen_mode) {
- gtk_table_attach (
- GTK_TABLE (object),
- table->priv->signature_label,
- 2, 3, ii, ii + 1, 0, 0, 0, row_padding);
- gtk_table_attach (
- GTK_TABLE (object),
- table->priv->signature_combo_box,
- 3, 4, ii, ii + 1, 0, 0, 0, row_padding);
- } else {
- GtkWidget *box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-
- gtk_box_pack_start (
- GTK_BOX (box),
- table->priv->signature_label,
- FALSE, FALSE, 4);
- gtk_box_pack_end (
- GTK_BOX (box),
- table->priv->signature_combo_box,
- TRUE, TRUE, 0);
- g_object_set_data (G_OBJECT (box), "pdata", object);
- gtk_table_attach (
- GTK_TABLE (object), box,
- 3, 4, ii, ii + 1, GTK_FILL, 0, 0, row_padding);
- gtk_widget_hide (box);
- }
+ gtk_table_attach (
+ GTK_TABLE (object),
+ table->priv->signature_label,
+ 2, 3, ii, ii + 1, 0, 0, 0, row_padding);
+ gtk_table_attach (
+ GTK_TABLE (object),
+ table->priv->signature_combo_box,
+ 3, 4, ii, ii + 1, 0, 0, 0, row_padding);
/* Initialize the headers. */
composer_header_table_from_changed_cb (table);
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 0475996f23..2e44aa1aa9 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -151,7 +151,6 @@ e_composer_private_constructed (EMsgComposer *composer)
GtkWindow *window;
GSettings *settings;
const gchar *path;
- gboolean small_screen_mode;
gchar *filename, *gallery_path;
gint ii;
GError *error = NULL;
@@ -164,28 +163,6 @@ e_composer_private_constructed (EMsgComposer *composer)
shell = e_msg_composer_get_shell (composer);
registry = e_shell_get_registry (shell);
web_view = e_msg_composer_get_web_view (composer);
- small_screen_mode = e_shell_get_small_screen_mode (shell);
-
- if (small_screen_mode) {
-#if 0
- /* In the lite composer, for small screens, we are not
- * ready yet to hide the menubar. It still has useful
- * items like the ones to show/hide the various header
- * fields, plus the security options.
- *
- * When we move those options out of the menu and into
- * the composer's toplevel, we can probably get rid of
- * the menu.
- */
- widget = gtkhtml_editor_get_managed_widget (editor, "/main-menu");
- gtk_widget_hide (widget);
-#endif
- widget = gtkhtml_editor_get_managed_widget (editor, "/main-toolbar");
- gtk_toolbar_set_style (
- GTK_TOOLBAR (widget), GTK_TOOLBAR_BOTH_HORIZ);
- gtk_widget_hide (widget);
-
- }
/* Each composer window gets its own window group. */
window = GTK_WINDOW (composer);
@@ -271,10 +248,7 @@ e_composer_private_constructed (EMsgComposer *composer)
widget = e_composer_header_table_new (shell, registry);
gtk_container_set_border_width (GTK_CONTAINER (widget), 6);
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
- if (small_screen_mode)
- gtk_box_reorder_child (GTK_BOX (container), widget, 1);
- else
- gtk_box_reorder_child (GTK_BOX (container), widget, 2);
+ gtk_box_reorder_child (GTK_BOX (container), widget, 2);
priv->header_table = g_object_ref (widget);
gtk_widget_show (widget);
@@ -284,12 +258,6 @@ e_composer_private_constructed (EMsgComposer *composer)
/* Construct the attachment paned. */
- if (small_screen_mode) {
- /* Short attachment bar for Anjal. */
- e_attachment_paned_set_default_height (75);
- e_attachment_icon_view_set_default_icon_size (GTK_ICON_SIZE_BUTTON);
- }
-
widget = e_attachment_paned_new ();
gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0);
priv->attachment_paned = g_object_ref (widget);
@@ -300,61 +268,6 @@ e_composer_private_constructed (EMsgComposer *composer)
widget, "editable",
G_BINDING_SYNC_CREATE);
- if (small_screen_mode) {
- GtkWidget *tmp, *tmp1, *tmp_box, *container;
- GtkWidget *combo;
-
- combo = e_attachment_paned_get_view_combo (
- E_ATTACHMENT_PANED (widget));
- gtk_widget_hide (combo);
- container = e_attachment_paned_get_controls_container (
- E_ATTACHMENT_PANED (widget));
-
- tmp_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-
- tmp = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
- tmp1 = gtk_image_new_from_icon_name (
- "mail-send", GTK_ICON_SIZE_BUTTON);
- gtk_box_pack_start ((GtkBox *) tmp, tmp1, FALSE, FALSE, 0);
- tmp1 = gtk_label_new_with_mnemonic (_("S_end"));
- gtk_box_pack_start ((GtkBox *) tmp, tmp1, FALSE, FALSE, 6);
- gtk_widget_show_all (tmp);
- gtk_widget_reparent (send_widget, tmp_box);
- gtk_box_set_child_packing (
- GTK_BOX (tmp_box), send_widget,
- FALSE, FALSE, 6, GTK_PACK_END);
- gtk_tool_item_set_is_important (GTK_TOOL_ITEM (send_widget), TRUE);
- send_widget = gtk_bin_get_child ((GtkBin *) send_widget);
- gtk_container_remove (
- GTK_CONTAINER (send_widget),
- gtk_bin_get_child (GTK_BIN (send_widget)));
- gtk_container_add ((GtkContainer *) send_widget, tmp);
- gtk_button_set_relief ((GtkButton *) send_widget, GTK_RELIEF_NORMAL);
- path = "/main-toolbar/pre-main-toolbar/save-draft";
- send_widget = gtk_ui_manager_get_widget (ui_manager, path);
- tmp = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
- tmp1 = gtk_image_new_from_stock (
- GTK_STOCK_SAVE, GTK_ICON_SIZE_BUTTON);
- gtk_box_pack_start ((GtkBox *) tmp, tmp1, FALSE, FALSE, 0);
- tmp1 = gtk_label_new_with_mnemonic (_("Save draft"));
- gtk_box_pack_start ((GtkBox *) tmp, tmp1, FALSE, FALSE, 3);
- gtk_widget_show_all (tmp);
- gtk_widget_reparent (send_widget, tmp_box);
- gtk_box_set_child_packing (
- GTK_BOX (tmp_box), send_widget,
- FALSE, FALSE, 6, GTK_PACK_END);
- gtk_tool_item_set_is_important (GTK_TOOL_ITEM (send_widget), TRUE);
- send_widget = gtk_bin_get_child ((GtkBin *) send_widget);
- gtk_container_remove (
- GTK_CONTAINER (send_widget),
- gtk_bin_get_child (GTK_BIN (send_widget)));
- gtk_container_add ((GtkContainer *) send_widget, tmp);
- gtk_button_set_relief ((GtkButton *) send_widget, GTK_RELIEF_NORMAL);
-
- gtk_widget_show (tmp_box);
- gtk_box_pack_end (GTK_BOX (container), tmp_box, FALSE, FALSE, 3);
- }
-
container = e_attachment_paned_get_content_area (
E_ATTACHMENT_PANED (priv->attachment_paned));