diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2010-12-27 16:16:39 +0100 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2011-01-11 11:43:19 +0100 |
commit | 977fc6383dc74a320ce951d4d0b2f81f31e9cdcf (patch) | |
tree | b756c79be2489b1b052e66751478c5d0cac74d38 | |
parent | ab75e5447ca5a5a5d7054c907d008816ad911c20 (diff) | |
download | nautilus-977fc6383dc74a320ce951d4d0b2f81f31e9cdcf.tar.gz |
window: cleanup nautilus_window_reload()
-rw-r--r-- | src/nautilus-window-manage-views.c | 9 | ||||
-rw-r--r-- | src/nautilus-window-menus.c | 5 | ||||
-rw-r--r-- | src/nautilus-window.c | 9 | ||||
-rw-r--r-- | src/nautilus-window.h | 6 |
4 files changed, 16 insertions, 13 deletions
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c index 5fa858383..9861f1b5f 100644 --- a/src/nautilus-window-manage-views.c +++ b/src/nautilus-window-manage-views.c @@ -2111,12 +2111,3 @@ nautilus_window_slot_reload (NautilusWindowSlot *slot) g_object_unref (location); g_list_free_full (selection, g_object_unref); } - -void -nautilus_window_reload (NautilusWindow *window) -{ - g_assert (NAUTILUS_IS_WINDOW (window)); - - nautilus_window_slot_reload (window->details->active_pane->active_slot); -} - diff --git a/src/nautilus-window-menus.c b/src/nautilus-window-menus.c index cc997defa..0574a2e98 100644 --- a/src/nautilus-window-menus.c +++ b/src/nautilus-window-menus.c @@ -363,7 +363,10 @@ static void action_reload_callback (GtkAction *action, gpointer user_data) { - nautilus_window_reload (NAUTILUS_WINDOW (user_data)); + NautilusWindowSlot *slot; + + slot = nautilus_window_get_active_slot (NAUTILUS_WINDOW (user_data)); + nautilus_window_slot_reload (slot); } static void diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 1831b3fd8..e965dab91 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -1793,6 +1793,15 @@ nautilus_window_get_slots (NautilusWindow *window) } static void +nautilus_window_reload (NautilusWindow *window) +{ + NautilusWindowSlot *active_slot; + + active_slot = nautilus_window_get_active_slot (window); + nautilus_window_slot_reload (active_slot); +} + +static void nautilus_window_class_init (NautilusWindowClass *class) { GtkBindingSet *binding_set; diff --git a/src/nautilus-window.h b/src/nautilus-window.h index bb72f9ba3..c04518167 100644 --- a/src/nautilus-window.h +++ b/src/nautilus-window.h @@ -118,7 +118,6 @@ typedef struct { void (* sync_allow_stop) (NautilusWindow *window, NautilusWindowSlot *slot); void (* set_allow_up) (NautilusWindow *window, gboolean allow); - void (* reload) (NautilusWindow *window); void (* prompt_for_location) (NautilusWindow *window, const char *initial); void (* get_min_size) (NautilusWindow *window, guint *default_width, guint *default_height); void (* get_default_size) (NautilusWindow *window, guint *default_width, guint *default_height); @@ -132,7 +131,9 @@ typedef struct { NautilusWindowSlot *slot); /* Signals used only for keybindings */ - gboolean (* go_up) (NautilusWindow *window, gboolean close); + gboolean (* go_up) (NautilusWindow *window, + gboolean close); + void (* reload) (NautilusWindow *window); } NautilusWindowClass; struct NautilusWindow { @@ -164,7 +165,6 @@ void nautilus_window_prompt_for_location (NautilusWindow *window const char *initial); void nautilus_window_display_error (NautilusWindow *window, const char *error_msg); -void nautilus_window_reload (NautilusWindow *window); void nautilus_window_allow_up (NautilusWindow *window, gboolean allow); |