diff options
author | Jasmine Hassan <[email protected]> | 2012-10-19 00:01:23 +0200 |
---|---|---|
committer | Jasmine Hassan <[email protected]> | 2012-11-16 09:45:50 +0200 |
commit | 662d2326c5ce63c867b3d94fb2bb44d9a244399b (patch) | |
tree | 00b88f5d37a7b28dc84003dcaf5fa34f812963cd /src | |
parent | 2a1ef1efb5434f189e0463c834d5926bd931184e (diff) | |
download | caja-662d2326c5ce63c867b3d94fb2bb44d9a244399b.tar.bz2 caja-662d2326c5ce63c867b3d94fb2bb44d9a244399b.tar.xz |
[window] add _full() versions of _go_to and _open() methods
These also have a callback to get the result of the operation.
http://git.gnome.org/browse/nautilus/commit/?id=24515b87a91afd32885e07e32e2b4080584673a4
Diffstat (limited to 'src')
-rw-r--r-- | src/caja-window-manage-views.c | 8 | ||||
-rw-r--r-- | src/caja-window-slot.h | 11 | ||||
-rw-r--r-- | src/caja-window.c | 14 | ||||
-rw-r--r-- | src/caja-window.h | 4 |
4 files changed, 30 insertions, 7 deletions
diff --git a/src/caja-window-manage-views.c b/src/caja-window-manage-views.c index 35091bed..e34fc232 100644 --- a/src/caja-window-manage-views.c +++ b/src/caja-window-manage-views.c @@ -724,7 +724,7 @@ caja_window_slot_open_location (CajaWindowSlot *slot, caja_window_slot_open_location_full (slot, location, CAJA_WINDOW_OPEN_ACCORDING_TO_MODE, - flags, NULL); + flags, NULL, NULL, NULL); } void @@ -742,7 +742,7 @@ caja_window_slot_open_location_with_selection (CajaWindowSlot *slot, } caja_window_slot_open_location_full (slot, location, CAJA_WINDOW_OPEN_ACCORDING_TO_MODE, - flags, selection); + flags, selection, NULL, NULL); } @@ -766,7 +766,7 @@ caja_window_slot_go_home (CajaWindowSlot *slot, gboolean new_tab) home = g_file_new_for_path (g_get_home_dir ()); caja_window_slot_open_location_full (slot, home, CAJA_WINDOW_OPEN_ACCORDING_TO_MODE, - flags, NULL); + flags, NULL, NULL, NULL); g_object_unref (home); } @@ -2273,7 +2273,7 @@ caja_navigation_window_back_or_forward (CajaNavigationWindow *window, caja_window_slot_open_location_full (slot, location, CAJA_WINDOW_OPEN_ACCORDING_TO_MODE, CAJA_WINDOW_OPEN_FLAG_NEW_TAB, - NULL); + NULL, NULL, NULL); } else { diff --git a/src/caja-window-slot.h b/src/caja-window-slot.h index f25bdf41..e0e93db9 100644 --- a/src/caja-window-slot.h +++ b/src/caja-window-slot.h @@ -139,7 +139,9 @@ void caja_window_slot_open_location_full (CajaWindowSlot *slot, GFile *location, CajaWindowOpenMode mode, CajaWindowOpenFlags flags, - GList *new_selection); + GList *new_selection, + CajaWindowGoToCallback callback, + gpointer user_data); void caja_window_slot_stop_loading (CajaWindowSlot *slot); void caja_window_slot_set_content_view (CajaWindowSlot *slot, @@ -156,7 +158,12 @@ void caja_window_slot_disconnect_content_view (CajaWindowSlo #define caja_window_slot_go_to(slot,location, new_tab) \ caja_window_slot_open_location_full(slot, location, CAJA_WINDOW_OPEN_ACCORDING_TO_MODE, \ (new_tab ? CAJA_WINDOW_OPEN_FLAG_NEW_TAB : 0), \ - NULL) + NULL, NULL, NULL) + +#define caja_window_slot_go_to_full(slot, location, new_tab, callback, user_data) \ + caja_window_slot_open_location_full(slot, location, CAJA_WINDOW_OPEN_ACCORDING_TO_MODE, \ + (new_tab ? CAJA_WINDOW_OPEN_FLAG_NEW_TAB : 0), \ + NULL, callback, user_data) #define caja_window_slot_go_to_with_selection(slot,location,new_selection) \ caja_window_slot_open_location_with_selection(slot, location, new_selection, FALSE) diff --git a/src/caja-window.c b/src/caja-window.c index d7c4c2cc..13f45508 100644 --- a/src/caja-window.c +++ b/src/caja-window.c @@ -236,6 +236,17 @@ caja_window_go_to (CajaWindow *window, GFile *location) } void +caja_window_go_to_full (CajaWindow *window, + GFile *location, + CajaWindowGoToCallback callback, + gpointer user_data) +{ + g_return_if_fail (CAJA_IS_WINDOW (window)); + + caja_window_slot_go_to_full (window->details->active_pane->active_slot, location, FALSE, callback, user_data); +} + +void caja_window_go_to_with_selection (CajaWindow *window, GFile *location, GList *new_selection) { g_return_if_fail (CAJA_IS_WINDOW (window)); @@ -324,7 +335,8 @@ caja_window_go_up (CajaWindow *window, gboolean close_behind, gboolean new_tab) caja_window_slot_open_location_full (slot, parent, CAJA_WINDOW_OPEN_ACCORDING_TO_MODE, flags, - selection); + selection, + NULL, NULL); g_object_unref (parent); diff --git a/src/caja-window.h b/src/caja-window.h index 86b85b4f..b5ea219c 100644 --- a/src/caja-window.h +++ b/src/caja-window.h @@ -136,6 +136,10 @@ void caja_window_disconnect_content_view (CajaWindow *window, void caja_window_go_to (CajaWindow *window, GFile *location); +void caja_window_go_to_full (CajaWindow *window, + GFile *location, + CajaWindowGoToCallback callback, + gpointer user_data); void caja_window_go_to_with_selection (CajaWindow *window, GFile *location, GList *new_selection); |