summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcaja-private/caja-window-info.h4
-rw-r--r--libcaja-private/caja-window-slot-info.c14
-rw-r--r--libcaja-private/caja-window-slot-info.h19
-rw-r--r--src/caja-window-manage-views.c8
-rw-r--r--src/caja-window-slot.h11
-rw-r--r--src/caja-window.c14
-rw-r--r--src/caja-window.h4
7 files changed, 57 insertions, 17 deletions
diff --git a/libcaja-private/caja-window-info.h b/libcaja-private/caja-window-info.h
index 4bb271b6..7cced147 100644
--- a/libcaja-private/caja-window-info.h
+++ b/libcaja-private/caja-window-info.h
@@ -88,6 +88,10 @@ extern "C" {
typedef struct _CajaWindowInfoIface CajaWindowInfoIface;
+ typedef void (* CajaWindowGoToCallback) (CajaWindow *window,
+ GError *error,
+ gpointer user_data);
+
struct _CajaWindowInfoIface
{
GTypeInterface g_iface;
diff --git a/libcaja-private/caja-window-slot-info.c b/libcaja-private/caja-window-slot-info.c
index f0193980..01a38a80 100644
--- a/libcaja-private/caja-window-slot-info.c
+++ b/libcaja-private/caja-window-slot-info.c
@@ -108,11 +108,13 @@ caja_window_slot_info_make_hosting_pane_active (CajaWindowSlotInfo *slot)
}
void
-caja_window_slot_info_open_location (CajaWindowSlotInfo *slot,
+caja_window_slot_info_open_location_full (CajaWindowSlotInfo *slot,
GFile *location,
- CajaWindowOpenMode mode,
- CajaWindowOpenFlags flags,
- GList *selection)
+ CajaWindowOpenMode mode,
+ CajaWindowOpenFlags flags,
+ GList *selection,
+ CajaWindowGoToCallback callback,
+ gpointer user_data)
{
g_assert (CAJA_IS_WINDOW_SLOT_INFO (slot));
@@ -120,7 +122,9 @@ caja_window_slot_info_open_location (CajaWindowSlotInfo *slot,
location,
mode,
flags,
- selection);
+ selection,
+ callback,
+ user_data);
}
char *
diff --git a/libcaja-private/caja-window-slot-info.h b/libcaja-private/caja-window-slot-info.h
index 2d8b21d2..49804820 100644
--- a/libcaja-private/caja-window-slot-info.h
+++ b/libcaja-private/caja-window-slot-info.h
@@ -72,18 +72,27 @@ struct _CajaWindowSlotInfoIface
GFile *location,
CajaWindowOpenMode mode,
CajaWindowOpenFlags flags,
- GList *selection);
+ GList *selection,
+ CajaWindowGoToCallback callback,
+ gpointer user_data);
void (* make_hosting_pane_active) (CajaWindowSlotInfo *slot);
};
GType caja_window_slot_info_get_type (void);
CajaWindowInfo * caja_window_slot_info_get_window (CajaWindowSlotInfo *slot);
-void caja_window_slot_info_open_location (CajaWindowSlotInfo *slot,
+#define caja_window_slot_info_open_location(slot, location, mode, flags, selection) \
+ caja_window_slot_info_open_location_full(slot, location, mode, \
+ flags, selection, NULL, NULL)
+
+void caja_window_slot_info_open_location_full
+ (CajaWindowSlotInfo *slot,
GFile *location,
- CajaWindowOpenMode mode,
- CajaWindowOpenFlags flags,
- GList *selection);
+ CajaWindowOpenMode mode,
+ CajaWindowOpenFlags flags,
+ GList *selection,
+ CajaWindowGoToCallback callback,
+ gpointer user_data);
void caja_window_slot_info_set_status (CajaWindowSlotInfo *slot,
const char *status);
void caja_window_slot_info_make_hosting_pane_active (CajaWindowSlotInfo *slot);
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);