diff options
author | John Sullivan <sullivan@src.gnome.org> | 2000-01-07 21:48:58 +0000 |
---|---|---|
committer | John Sullivan <sullivan@src.gnome.org> | 2000-01-07 21:48:58 +0000 |
commit | 9d0a6860f8550c4579e619f7e591803c037ffe16 (patch) | |
tree | 9c33f90e3e6292ea05463138ccff52fa3603f875 /src/nautilus-bookmarks-window.c | |
parent | 076e9575fa9173e7997e97a63ab8b6b229810d1c (diff) | |
download | nautilus-9d0a6860f8550c4579e619f7e591803c037ffe16.tar.gz |
Made there be just one About window, and added a utility function for
presenting a window to the user regardless of its current state.
Diffstat (limited to 'src/nautilus-bookmarks-window.c')
-rw-r--r-- | src/nautilus-bookmarks-window.c | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/src/nautilus-bookmarks-window.c b/src/nautilus-bookmarks-window.c index 157e20ea3..e879ce048 100644 --- a/src/nautilus-bookmarks-window.c +++ b/src/nautilus-bookmarks-window.c @@ -116,6 +116,7 @@ create_bookmarks_window(NautilusBookmarklist *list) gtk_widget_set_usize (window, BOOKMARKS_WINDOW_MIN_WIDTH, BOOKMARKS_WINDOW_MIN_HEIGHT); + nautilus_bookmarks_window_restore_geometry (window); gtk_window_set_policy (GTK_WINDOW (window), FALSE, TRUE, FALSE); content_area = gtk_hbox_new (TRUE, GNOME_PAD); @@ -260,33 +261,6 @@ get_selection_exists () return GTK_CLIST(bookmark_list_widget)->rows > 0; } -/** - * nautilus_bookmarks_window_present: - * - * Present the bookmarks window on screen in the saved position and size. - * Brings window to front and activates it. - * @window: The bookmarks window to present on screen. - **/ -void -nautilus_bookmarks_window_present (GtkWidget *window) -{ - g_return_if_fail (GTK_IS_WINDOW (window)); - - if (GTK_WIDGET_VISIBLE(window)) - { - /* Hide window first so it will reappear on top */ - nautilus_bookmarks_window_save_geometry (window); - gtk_widget_hide (window); - } - else - { - gtk_widget_realize (window); - } - - nautilus_bookmarks_window_restore_geometry (window); - gtk_widget_show (window); -} - static void nautilus_bookmarks_window_restore_geometry (GtkWidget *window) { @@ -506,6 +480,13 @@ on_window_delete_event (GtkWidget *widget, /* Hide but don't destroy */ gtk_widget_hide(widget); + /* Seems odd to restore the geometry just after saving it, + * and when the window is hidden, but this insures that + * the next time the window is shown it will have the + * right hints in it to appear in the correct place. + */ + nautilus_bookmarks_window_restore_geometry (widget); + return TRUE; } |