[Xfce4-commits] <thunar:master> Check if the returned app info is not a file manager launched by exo.
Nick Schermer
noreply at xfce.org
Sun Oct 11 13:18:01 CEST 2009
Updating branch refs/heads/master
to 751d0450427b9372126e26c7ebbfdd35a7a7a2a4 (commit)
from 5517dc5dda869f79a668f73a5761534702e176f6 (commit)
commit 751d0450427b9372126e26c7ebbfdd35a7a7a2a4
Author: Nick Schermer <nick at xfce.org>
Date: Sun Oct 11 13:14:03 2009 +0200
Check if the returned app info is not a file manager launched by exo.
This is a quick hack to work around the issues for now. Because exo
suggests to launch a file manager for file:// uris, we end up in
a loop.
thunar/thunar-file.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 1e4297f..4b91ac7 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -1139,6 +1139,7 @@ thunar_file_launch (ThunarFile *file,
GAppInfo *app_info;
gboolean succeed;
GList path_list;
+ const gchar *command_line;
_thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE);
_thunar_return_val_if_fail (error == NULL || *error == NULL, FALSE);
@@ -1177,6 +1178,17 @@ thunar_file_launch (ThunarFile *file,
return TRUE;
}
+ /* HACK: check if we're not trying to launch another file manager again, possibly
+ * ourselfs which will end in a loop */
+ command_line = g_app_info_get_commandline (app_info);
+ if (command_line != NULL
+ && strstr (command_line, "exo-helper-1 --launch FileManager") != NULL)
+ {
+ g_object_unref (G_OBJECT (app_info));
+ thunar_show_chooser_dialog (parent, file, TRUE);
+ return TRUE;
+ }
+
/* fake a path list */
path_list.data = file->gfile;
path_list.next = path_list.prev = NULL;
More information about the Xfce4-commits
mailing list