summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-10-19 00:01:23 +0200
committerJasmine Hassan <[email protected]>2012-11-16 09:45:50 +0200
commit662d2326c5ce63c867b3d94fb2bb44d9a244399b (patch)
tree00b88f5d37a7b28dc84003dcaf5fa34f812963cd /libcaja-private
parent2a1ef1efb5434f189e0463c834d5926bd931184e (diff)
downloadcaja-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 'libcaja-private')
-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
3 files changed, 27 insertions, 10 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);