[nautilus/refactor: 15/26] window: cleanup nautilus_window_reload()
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/refactor: 15/26] window: cleanup nautilus_window_reload()
- Date: Wed, 29 Dec 2010 17:58:43 +0000 (UTC)
commit 62ee9f094205da4672648947efa677f9f42b04c5
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Dec 27 16:16:39 2010 +0100
window: cleanup nautilus_window_reload()
src/nautilus-window-manage-views.c | 9 ---------
src/nautilus-window-menus.c | 5 ++++-
src/nautilus-window.c | 9 +++++++++
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 5fa8583..9861f1b 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 a0b4884..2e8a9d1 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 0a9645e..9f3420b 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -1823,6 +1823,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 bb72f9b..c045181 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]