diff options
author | Søren Sandmann Pedersen <ssp@dhcp-100-2-40.bos.redhat.com> | 2009-04-13 22:12:18 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@dhcp-100-2-40.bos.redhat.com> | 2009-04-13 22:12:18 -0400 |
commit | 678cd765bf9bcefe06bb685c242635f5083914d8 (patch) | |
tree | 843588cdda656fb7c514560f6d2c194231b0c595 | |
parent | ffbb948692ea37a6bec09ce4e9c39d737574dc1e (diff) |
Add window_present() since we don't want to reset the scrollbars when an existing window is presented
-rw-r--r-- | siv.c | 2 | ||||
-rw-r--r-- | siv.h | 3 | ||||
-rw-r--r-- | window.c | 8 |
3 files changed, 10 insertions, 3 deletions
@@ -379,7 +379,7 @@ open_file (App *app, const char *filename, GPtrArray *err_files) if (window_matches_file (w, filename)) { - window_show (w, GDK_CURRENT_TIME); + window_present (w, GDK_CURRENT_TIME); return TRUE; } } @@ -69,9 +69,10 @@ SivWindow * window_new (App *app); gboolean window_load_file (SivWindow *window, const char *file, GError **err); +void window_present (SivWindow *window, + guint32 time); void window_show (SivWindow *window, guint32 time); -void window_present (SivWindow *window); gboolean window_matches_file (SivWindow *window, const char *filename); gboolean window_is_blank (SivWindow *window); @@ -1204,6 +1204,12 @@ window_free (SivWindow *window) } void +window_present (SivWindow *window, guint32 time) +{ + gtk_window_present_with_time (get_widget (window, "main_window"), time); +} + +void window_show (SivWindow *window, guint32 time) { GtkAdjustment *vadj, *hadj; @@ -1222,7 +1228,7 @@ window_show (SivWindow *window, guint32 time) gtk_adjustment_set_value (vadj, window->vadj); gtk_adjustment_set_value (hadj, window->hadj); - gtk_window_present_with_time (get_widget (window, "main_window"), time); + window_present (window, time); } gboolean |