diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ephy-file-helpers.c | 21 | ||||
-rw-r--r-- | lib/ephy-file-helpers.h | 3 |
2 files changed, 24 insertions, 0 deletions
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c index eacde296c..9bc6c04dc 100644 --- a/lib/ephy-file-helpers.c +++ b/lib/ephy-file-helpers.c @@ -1017,6 +1017,27 @@ ephy_file_launch_handler (const char *mime_type, return ret; } +gboolean +ephy_file_browse_to (const char *parameter, + guint32 user_time) +{ + GnomeVFSURI *uri, *parent_uri; + gboolean ret; + + uri = gnome_vfs_uri_new (parameter); + parent_uri = gnome_vfs_uri_get_parent (uri); + + /* TODO find a way to make nautilus scroll to the actual file */ + ret = ephy_file_launch_handler ("x-directory/normal", + gnome_vfs_uri_get_path (parent_uri), + user_time); + + gnome_vfs_uri_unref (uri); + gnome_vfs_uri_unref (parent_uri); + + return ret; +} + struct _EphyFileMonitor { GnomeVFSMonitorHandle *handle; diff --git a/lib/ephy-file-helpers.h b/lib/ephy-file-helpers.h index 48f655b38..3ded0d36d 100644 --- a/lib/ephy-file-helpers.h +++ b/lib/ephy-file-helpers.h @@ -91,6 +91,9 @@ gboolean ephy_file_launch_handler (const char *mime_type, const char *address, guint32 user_time); +gboolean ephy_file_browse_to (const char *parameter, + guint32 user_time); + EphyFileMonitor *ephy_file_monitor_add (const char *uri, GnomeVFSMonitorType monitor_type, guint delay, |