]> www.fi.muni.cz Git - evince.git/commitdiff
Setup window size and position before showing it. Fixes bug #401711.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Fri, 2 Feb 2007 14:12:53 +0000 (14:12 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Fri, 2 Feb 2007 14:12:53 +0000 (14:12 +0000)
2007-02-02  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-window.c: (ev_window_open_uri),
(window_configure_event_cb):
Setup window size and position before showing it. Fixes bug #401711.

svn path=/trunk/; revision=2285

ChangeLog
shell/ev-window.c

index 95d2b55f627a1edc67b346113122b845c2d2b80f..c1006046eb1407baa306da2b028d9c4294e3c1fe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-02-02  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-window.c: (ev_window_open_uri),
+       (window_configure_event_cb):
+
+       Setup window size and position before showing it. Fixes bug #401711.
+
 2007-02-02  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * backend/ps/Makefile.am:
index 2556b62fcb2efd92564e0c792aabc3a5ab0c6a8b..7cd803d35aa76374c10b8c8ed5b15c6e109ad1b6 100644 (file)
@@ -918,7 +918,6 @@ setup_size_from_metadata (EvWindow *window)
                g_value_unset (&width_ratio);
                g_value_unset (&height_ratio);
        }
-
 }
 
 static void
@@ -1348,6 +1347,8 @@ ev_window_open_uri (EvWindow       *ev_window,
        if (ev_window->priv->uri)
                g_free (ev_window->priv->uri);
        ev_window->priv->uri = g_strdup (uri);
+
+       setup_size_from_metadata (ev_window);
        
        ev_window->priv->load_job = ev_job_load_new (uri, dest, mode);
        g_signal_connect (ev_window->priv->load_job,
@@ -4351,12 +4352,15 @@ window_configure_event_cb (EvWindow *window, GdkEventConfigure *event, gpointer
                        ev_page_cache_get_max_height (window->priv->page_cache, 
                                                      0, 1.0,
                                                      &document_height);                        
-                       ev_metadata_manager_set_int (uri, "window_x", x);
-                       ev_metadata_manager_set_int (uri, "window_y", y);
                        ev_metadata_manager_set_double (uri, "window_width_ratio", 
-                                                       (double)width/document_width);
+                                                       (double)width / document_width);
                        ev_metadata_manager_set_double (uri, "window_height_ratio", 
-                                                       (double)height/document_height);
+                                                       (double)height / document_height);
+                       
+                       ev_metadata_manager_set_int (uri, "window_x", x);
+                       ev_metadata_manager_set_int (uri, "window_y", y);
+                       ev_metadata_manager_set_int (uri, "window_width", width);
+                       ev_metadata_manager_set_int (uri, "window_height", height);
                }
        }