[Goodies-commits] r6154 - in xfce4-places-plugin/trunk: . panel-plugin
Diego Ongaro
ongardie at xfce.org
Fri Nov 21 20:52:08 CET 2008
Author: ongardie
Date: 2008-11-21 19:52:08 +0000 (Fri, 21 Nov 2008)
New Revision: 6154
Modified:
xfce4-places-plugin/trunk/ChangeLog
xfce4-places-plugin/trunk/panel-plugin/model_volumes.c
xfce4-places-plugin/trunk/panel-plugin/support.c
xfce4-places-plugin/trunk/panel-plugin/support.h
xfce4-places-plugin/trunk/panel-plugin/view.c
Log:
Try exo_url_show before directly calling Thunar.
See bug #4463.
Modified: xfce4-places-plugin/trunk/ChangeLog
===================================================================
--- xfce4-places-plugin/trunk/ChangeLog 2008-11-21 19:26:21 UTC (rev 6153)
+++ xfce4-places-plugin/trunk/ChangeLog 2008-11-21 19:52:08 UTC (rev 6154)
@@ -1,5 +1,7 @@
2008-11-21 Diego Ongaro <ongardie at gmail.com>
+ * support.{c,h}, model_volumes.c, view.c: Try exo_url_show
+ before directly calling Thunar. See bug #4463.
* model_system.c: Add xdg user dirs support, thanks to Andea
Santilli. See bug #4461.
* view.c: disconnect from button signals on finalize
Modified: xfce4-places-plugin/trunk/panel-plugin/model_volumes.c
===================================================================
--- xfce4-places-plugin/trunk/panel-plugin/model_volumes.c 2008-11-21 19:26:21 UTC (rev 6153)
+++ xfce4-places-plugin/trunk/panel-plugin/model_volumes.c 2008-11-21 19:52:08 UTC (rev 6154)
@@ -127,7 +127,7 @@
if(thunar_vfs_volume_is_mounted(volume)){
uri = thunar_vfs_path_dup_uri(thunar_vfs_volume_get_mount_point(volume));
- places_load_thunar(uri);
+ places_load_file_browser(uri);
g_free(uri);
}
}
Modified: xfce4-places-plugin/trunk/panel-plugin/support.c
===================================================================
--- xfce4-places-plugin/trunk/panel-plugin/support.c 2008-11-21 19:26:21 UTC (rev 6153)
+++ xfce4-places-plugin/trunk/panel-plugin/support.c 2008-11-21 19:52:08 UTC (rev 6154)
@@ -40,23 +40,38 @@
#include "model.h"
/**
- * Opens Thunar at the location given by path.
- * If path is NULL or empty, it will open Thunar at the default location (home).
+ * Opens file browser at the location given by path.
+ * If path is NULL or empty, it will open the file browser at the default
+ * location (home).
* The caller is in charge of freeing path.
*/
void
-places_load_thunar(const gchar *path)
+places_load_file_browser(const gchar *path)
{
+ gboolean exo_success;
+
if(path != NULL && *path != '\0'){
- gchar *cmd = g_strconcat("thunar \"", path, "\"", NULL);
- DBG("exec: %s", cmd);
- places_gui_exec(cmd);
- g_free(cmd);
+ DBG("exo_url_show(%s)", path);
+ exo_success = exo_url_show(path, NULL, NULL);
+ if(!exo_success){
+ gchar *cmd = g_strconcat("thunar \"", path, "\"", NULL);
+ DBG("exec: %s", cmd);
+ places_gui_exec(cmd);
+ g_free(cmd);
+ }
+
}else{
- DBG("exec: thunar");
- places_gui_exec("thunar");
+
+ DBG("exo_url_show(file://");
+ exo_success = exo_url_show("file://", NULL, NULL);
+
+ if(!exo_success){
+ DBG("exec: thunar");
+ places_gui_exec("thunar");
+ }
+
}
}
@@ -119,12 +134,12 @@
}
static void
-psupport_load_thunar_wrapper(PlacesBookmarkAction *act)
+psupport_load_file_browser_wrapper(PlacesBookmarkAction *act)
{
g_assert(act != NULL);
/* we stored the path in priv */
- places_load_thunar((gchar*) act->priv);
+ places_load_file_browser((gchar*) act->priv);
}
static void
@@ -147,7 +162,7 @@
action = places_bookmark_action_create(_("Open"));
action->priv = bookmark->uri;
- action->action = psupport_load_thunar_wrapper;
+ action->action = psupport_load_file_browser_wrapper;
return action;
}
Modified: xfce4-places-plugin/trunk/panel-plugin/support.h
===================================================================
--- xfce4-places-plugin/trunk/panel-plugin/support.h 2008-11-21 19:26:21 UTC (rev 6153)
+++ xfce4-places-plugin/trunk/panel-plugin/support.h 2008-11-21 19:52:08 UTC (rev 6154)
@@ -29,7 +29,7 @@
#include "model.h"
void
-places_load_thunar(const gchar *path);
+places_load_file_browser(const gchar *path);
void
places_load_terminal(const gchar *path);
Modified: xfce4-places-plugin/trunk/panel-plugin/view.c
===================================================================
--- xfce4-places-plugin/trunk/panel-plugin/view.c 2008-11-21 19:26:21 UTC (rev 6153)
+++ xfce4-places-plugin/trunk/panel-plugin/view.c 2008-11-21 19:52:08 UTC (rev 6154)
@@ -368,7 +368,7 @@
if(evt->button == 1)
pview_open_menu(pd);
else if(evt->button == 2)
- places_load_thunar(NULL);
+ places_load_file_browser(NULL);
return FALSE;
}
More information about the Goodies-commits
mailing list