[evolution] Remove e_shell_adapt_window_size().



commit f8f89b0bfd8ef857dceed2a96df16a008290d53b
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Mar 31 09:16:10 2013 -0400

    Remove e_shell_adapt_window_size().
    
    Its preconditions are never TRUE, and is therefore a no-op function.

 calendar/gui/dialogs/comp-editor.c             |    1 -
 composer/e-msg-composer.c                      |    2 -
 doc/reference/libeshell/libeshell-sections.txt |    1 -
 shell/e-shell-window.c                         |   18 ------------
 shell/e-shell.c                                |   34 ------------------------
 shell/e-shell.h                                |    2 -
 6 files changed, 0 insertions(+), 58 deletions(-)
---
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index f36bebc..037371d 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -2261,7 +2261,6 @@ comp_editor_init (CompEditor *editor)
 
        gtk_application_add_window (
                GTK_APPLICATION (shell), GTK_WINDOW (editor));
-       e_shell_adapt_window_size (shell, GTK_WINDOW (editor));
 }
 
 static gboolean
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index eb6ed8a..f2208d7 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1970,8 +1970,6 @@ msg_composer_constructed (GObject *object)
                object, "delete-event",
                G_CALLBACK (msg_composer_delete_event_cb), NULL);
 
-       e_shell_adapt_window_size (shell, GTK_WINDOW (object));
-
        gtk_application_add_window (
                GTK_APPLICATION (shell), GTK_WINDOW (object));
 
diff --git a/doc/reference/libeshell/libeshell-sections.txt b/doc/reference/libeshell/libeshell-sections.txt
index 4c6a680..6ccaf09 100644
--- a/doc/reference/libeshell/libeshell-sections.txt
+++ b/doc/reference/libeshell/libeshell-sections.txt
@@ -27,7 +27,6 @@ e_shell_event
 EShellQuitReason
 e_shell_quit
 e_shell_cancel_quit
-e_shell_adapt_window_size
 e_shell_set_startup_view
 e_shell_get_startup_view
 e_shell_migrate_attempt
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index f2cfdc7..acf31a5 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -726,20 +726,6 @@ shell_window_create_shell_view (EShellWindow *shell_window,
 }
 
 static void
-shell_window_realize (GtkWidget *widget)
-{
-       EShellWindow *shell_window;
-
-       shell_window = E_SHELL_WINDOW (widget);
-       e_shell_adapt_window_size (
-               shell_window->priv->shell,
-               GTK_WINDOW (widget));
-
-       /* Chain up to parent's dispose() method. */
-       GTK_WIDGET_CLASS (e_shell_window_parent_class)->realize (widget);
-}
-
-static void
 shell_window_submit_alert (EAlertSink *alert_sink,
                            EAlert *alert)
 {
@@ -771,7 +757,6 @@ static void
 e_shell_window_class_init (EShellWindowClass *class)
 {
        GObjectClass *object_class;
-       GtkWidgetClass *widget_class;
 
        g_type_class_add_private (class, sizeof (EShellWindowPrivate));
 
@@ -782,9 +767,6 @@ e_shell_window_class_init (EShellWindowClass *class)
        object_class->finalize = shell_window_finalize;
        object_class->constructed = shell_window_constructed;
 
-       widget_class = GTK_WIDGET_CLASS (class);
-       widget_class->realize = shell_window_realize;
-
        class->construct_menubar = shell_window_construct_menubar;
        class->construct_toolbar = shell_window_construct_toolbar;
        class->construct_sidebar = shell_window_construct_sidebar;
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 2e32929..922fb4f 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -1836,40 +1836,6 @@ e_shell_cancel_quit (EShell *shell)
        g_signal_stop_emission (shell, signals[QUIT_REQUESTED], 0);
 }
 
-/**
- * e_shell_adapt_window_size:
- * @shell: an #EShell
- * @window: a #GtkWindow to adapt to full-screen
- *
- * This is used to adapt to window's size to be optimal for
- * the platform. The shell settings are used to determine if
- * a window should be set to full screen etc.
- *
- * This method is best called when the widget is realized on
- * a given screen.
- **/
-void
-e_shell_adapt_window_size (EShell *shell,
-                           GtkWindow *window)
-{
-       GdkScreen *screen;
-       GdkRectangle rect;
-       GdkWindow *gdk_window;
-       gint monitor;
-
-       if (!e_shell_get_meego_mode (shell) || TRUE)
-               return;
-
-       screen = gdk_screen_get_default ();
-       gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
-       monitor = gdk_screen_get_monitor_at_window (screen, gdk_window);
-       gdk_screen_get_monitor_geometry (screen, monitor, &rect);
-
-       gtk_window_set_default_size (window, rect.width, rect.height);
-       gtk_window_set_decorated (window, FALSE);
-       gtk_window_maximize (window);
-}
-
 void
 e_shell_set_startup_view (EShell *shell,
                           const gchar *view)
diff --git a/shell/e-shell.h b/shell/e-shell.h
index 7829b8c..214dd49 100644
--- a/shell/e-shell.h
+++ b/shell/e-shell.h
@@ -144,8 +144,6 @@ gboolean    e_shell_quit                    (EShell *shell,
                                                 EShellQuitReason reason);
 void           e_shell_cancel_quit             (EShell *shell);
 
-void           e_shell_adapt_window_size       (EShell *shell,
-                                                GtkWindow *window);
 void           e_shell_set_startup_view        (EShell *shell,
                                                 const gchar *view);
 const gchar *  e_shell_get_startup_view        (EShell *shell);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]