aboutsummaryrefslogtreecommitdiffstats
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
parentff76ff2a2aecc2628e609700e28bcc47f329a2e8 (diff)
downloadgsoc2013-evolution-50b164637fb0cca89a20793341102b0ddbfc5b50.tar.gz
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.
-rw-r--r--composer/e-composer-header-table.c50
-rw-r--r--composer/e-composer-private.c89
-rw-r--r--doc/reference/libeshell/libeshell-sections.txt1
-rw-r--r--shell/e-shell-view.c22
-rw-r--r--shell/e-shell-window.c25
-rw-r--r--shell/e-shell.c57
-rw-r--r--shell/e-shell.h1
7 files changed, 12 insertions, 233 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));
diff --git a/doc/reference/libeshell/libeshell-sections.txt b/doc/reference/libeshell/libeshell-sections.txt
index 3ec66938c8..4c6a6809b2 100644
--- a/doc/reference/libeshell/libeshell-sections.txt
+++ b/doc/reference/libeshell/libeshell-sections.txt
@@ -16,7 +16,6 @@ e_shell_submit_alert
e_shell_get_active_window
e_shell_get_meego_mode
e_shell_get_express_mode
-e_shell_get_small_screen_mode
e_shell_get_module_directory
e_shell_get_network_available
e_shell_set_network_available
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 9b3aa4a0f1..77597d0595 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -679,28 +679,6 @@ shell_view_construct_searchbar (EShellView *shell_view)
gtk_toolbar_insert (GTK_TOOLBAR (main_toolbar), item, -1);
- if (e_shell_get_small_screen_mode (shell)) {
- GtkWidget *image;
- GtkWidget *container;
- GtkAction *action;
- GtkToolItem *item;
-
- action = e_shell_window_get_action (
- shell_window, "close-window");
- image = gtk_image_new_from_icon_name (
- "window-close-hover", GTK_ICON_SIZE_DIALOG);
- item = gtk_tool_button_new (
- image, gtk_action_get_label (action));
- gtk_widget_set_name (GTK_WIDGET (item), "MeeGoCloseButton");
- gtk_activatable_set_related_action (
- GTK_ACTIVATABLE (item), action);
- container = e_shell_window_get_menu_bar_box (shell_window);
- gtk_box_pack_start (
- GTK_BOX (container),
- GTK_WIDGET (item), FALSE, FALSE, 0);
- gtk_widget_show_all (GTK_WIDGET (item));
- }
-
return widget;
}
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index e3f383ed11..f2cfdc7fc9 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -399,10 +399,6 @@ shell_window_constructed (GObject *object)
e_extensible_load_extensions (E_EXTENSIBLE (object));
- if (e_shell_get_meego_mode (shell_window->priv->shell) &&
- e_shell_get_small_screen_mode (shell_window->priv->shell))
- gtk_window_set_decorated (GTK_WINDOW (object), FALSE);
-
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (e_shell_window_parent_class)->constructed (object);
}
@@ -416,27 +412,6 @@ shell_window_construct_menubar (EShellWindow *shell_window)
shell_window, "/main-menu");
gtk_widget_show (main_menu);
- if (e_shell_get_small_screen_mode (shell_window->priv->shell)) {
- GtkWidget *parent, *child;
-
- parent = gtk_widget_get_parent (main_menu);
- g_object_ref (parent);
- gtk_container_remove ((GtkContainer *) parent, main_menu);
- child = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
- gtk_box_pack_start ((GtkBox *) child, main_menu, TRUE, TRUE, 0);
- gtk_widget_show (child);
- gtk_container_add ((GtkContainer *) parent, child);
- shell_window->priv->menubar_box = child;
-
- g_object_bind_property (
- main_menu, "visible",
- child, "visible",
- G_BINDING_BIDIRECTIONAL |
- G_BINDING_SYNC_CREATE);
-
- main_menu = child;
- }
-
g_signal_connect (
shell_window, "notify::active-view",
G_CALLBACK (shell_window_menubar_update_new_menu), NULL);
diff --git a/shell/e-shell.c b/shell/e-shell.c
index efb3348843..2e32929dcd 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -77,7 +77,6 @@ struct _EShellPrivate {
guint online : 1;
guint quit_cancelled : 1;
guint safe_mode : 1;
- guint small_screen_mode : 1;
};
enum {
@@ -85,7 +84,6 @@ enum {
PROP_CLIENT_CACHE,
PROP_EXPRESS_MODE,
PROP_MEEGO_MODE,
- PROP_SMALL_SCREEN_MODE,
PROP_GEOMETRY,
PROP_MODULE_DIRECTORY,
PROP_NETWORK_AVAILABLE,
@@ -531,13 +529,6 @@ shell_set_meego_mode (EShell *shell,
}
static void
-shell_set_small_screen_mode (EShell *shell,
- gboolean small_screen)
-{
- shell->priv->small_screen_mode = small_screen;
-}
-
-static void
shell_set_geometry (EShell *shell,
const gchar *geometry)
{
@@ -574,12 +565,6 @@ shell_set_property (GObject *object,
g_value_get_boolean (value));
return;
- case PROP_SMALL_SCREEN_MODE:
- shell_set_small_screen_mode (
- E_SHELL (object),
- g_value_get_boolean (value));
- return;
-
case PROP_GEOMETRY:
shell_set_geometry (
E_SHELL (object),
@@ -633,12 +618,6 @@ shell_get_property (GObject *object,
E_SHELL (object)));
return;
- case PROP_SMALL_SCREEN_MODE:
- g_value_set_boolean (
- value, e_shell_get_small_screen_mode (
- E_SHELL (object)));
- return;
-
case PROP_MODULE_DIRECTORY:
g_value_set_string (
value, e_shell_get_module_directory (
@@ -937,23 +916,6 @@ e_shell_class_init (EShellClass *class)
G_PARAM_CONSTRUCT_ONLY));
/**
- * EShell:small-screen
- *
- * Are we running with a small (1024x600) screen - if so, start
- * throwing the babies overboard to fit onto that screen size.
- **/
- g_object_class_install_property (
- object_class,
- PROP_SMALL_SCREEN_MODE,
- g_param_spec_boolean (
- "small-screen-mode",
- "Small Screen Mode",
- "Whether we run on a rather small screen",
- FALSE,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
-
- /**
* EShell:geometry
*
* User-specified initial window geometry string to apply
@@ -1635,22 +1597,6 @@ e_shell_get_meego_mode (EShell *shell)
}
/**
- * e_shell_get_small_screen_mode:
- * @shell: an #EShell
- *
- * Returns %TRUE if Evolution is in small (netbook) screen mode.
- *
- * Returns: %TRUE if Evolution is in small screen mode
- **/
-gboolean
-e_shell_get_small_screen_mode (EShell *shell)
-{
- g_return_val_if_fail (E_IS_SHELL (shell), FALSE);
-
- return shell->priv->small_screen_mode;
-}
-
-/**
* e_shell_get_module_directory:
* @shell: an #EShell
*
@@ -1911,8 +1857,7 @@ e_shell_adapt_window_size (EShell *shell,
GdkWindow *gdk_window;
gint monitor;
- if (!e_shell_get_meego_mode (shell) ||
- !e_shell_get_small_screen_mode (shell))
+ if (!e_shell_get_meego_mode (shell) || TRUE)
return;
screen = gdk_screen_get_default ();
diff --git a/shell/e-shell.h b/shell/e-shell.h
index 94ed735c69..7829b8cf69 100644
--- a/shell/e-shell.h
+++ b/shell/e-shell.h
@@ -128,7 +128,6 @@ void e_shell_submit_alert (EShell *shell,
GtkWindow * e_shell_get_active_window (EShell *shell);
gboolean e_shell_get_meego_mode (EShell *shell);
gboolean e_shell_get_express_mode (EShell *shell);
-gboolean e_shell_get_small_screen_mode (EShell *shell);
const gchar * e_shell_get_module_directory (EShell *shell);
gboolean e_shell_get_network_available (EShell *shell);
void e_shell_set_network_available (EShell *shell,