summaryrefslogtreecommitdiff
path: root/src/caja-window-manage-views.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-03-18 18:16:45 +0100
committerStefano Karapetsas <[email protected]>2014-04-25 15:22:25 +0200
commita4fa88152a0bd89c5a0287752274aca4d491b03b (patch)
treeda1c4f3f403956d99b2e6dba3573fbaf2a0a2edc /src/caja-window-manage-views.c
parent7ac00cc1cf31136f8d2e639a779f5a47d93f1540 (diff)
downloadcaja-a4fa88152a0bd89c5a0287752274aca4d491b03b.tar.bz2
caja-a4fa88152a0bd89c5a0287752274aca4d491b03b.tar.xz
Possible solution for x-caja-desktop issue
Diffstat (limited to 'src/caja-window-manage-views.c')
-rw-r--r--src/caja-window-manage-views.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/caja-window-manage-views.c b/src/caja-window-manage-views.c
index c7918e6c..616e85be 100644
--- a/src/caja-window-manage-views.c
+++ b/src/caja-window-manage-views.c
@@ -49,6 +49,7 @@
#include <eel/eel-gtk-macros.h>
#include <eel/eel-stock-dialogs.h>
#include <eel/eel-string.h>
+#include <eel/eel-vfs-extensions.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <glib/gi18n.h>
@@ -527,8 +528,10 @@ caja_window_slot_open_location_full (CajaWindowSlot *slot,
char *old_uri, *new_uri;
int new_slot_position;
GList *l;
- gboolean target_navigation = FALSE, target_same = FALSE;
- gboolean is_desktop, is_navigation;
+ gboolean target_navigation = FALSE;
+ gboolean target_same = FALSE;
+ gboolean is_desktop = FALSE;
+ gboolean is_navigation = FALSE;
window = slot->pane->window;
@@ -567,7 +570,12 @@ caja_window_slot_open_location_full (CajaWindowSlot *slot,
* otherwise it's the same window.
*/
if (is_desktop) {
- target_navigation = TRUE;
+ new_uri = g_file_get_uri (location);
+ if (g_str_has_prefix (new_uri, EEL_DESKTOP_URI))
+ target_same = TRUE;
+ else
+ target_navigation = TRUE;
+ g_free (new_uri);
} else {
target_same = TRUE;
}
@@ -676,7 +684,7 @@ caja_window_slot_open_location_full (CajaWindowSlot *slot,
}
}
- if ((target_window == window && target_slot == slot &&
+ if (!(is_desktop && target_same) && (target_window == window && target_slot == slot &&
old_location && g_file_equal (old_location, location))) {
if (callback != NULL) {
@@ -688,7 +696,7 @@ caja_window_slot_open_location_full (CajaWindowSlot *slot,
}
begin_location_change (target_slot, location, old_location, new_selection,
- CAJA_LOCATION_CHANGE_STANDARD, 0, NULL, callback, user_data);
+ (is_desktop && target_same) ? CAJA_LOCATION_CHANGE_RELOAD : CAJA_LOCATION_CHANGE_STANDARD, 0, NULL, callback, user_data);
/* Additionally, load this in all slots that have no location, this means
we load both panes in e.g. a newly opened dual pane window. */