[Xfce4-commits] <xfce4-notes-plugin:master> Try to open a link with exo-open first
Mike Massonnet
noreply at xfce.org
Sun Mar 28 18:04:01 CEST 2010
Updating branch refs/heads/master
to fd8f044a7ddad5d65207a87829442544fada3def (commit)
from bda6e3c881703124e28912a25db17d650b93df71 (commit)
commit fd8f044a7ddad5d65207a87829442544fada3def
Author: Mike Massonnet <mmassonnet at xfce.org>
Date: Sun Mar 28 14:33:49 2010 +0200
Try to open a link with exo-open first
ChangeLog | 4 ++++
lib/hypertextview.vala | 9 +++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 071865b..e592d04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2010-03-28 Mike Massonnet <mmassonnet at xfce.org>
+Try to open a link with exo-open first
+
+2010-03-28 Mike Massonnet <mmassonnet at xfce.org>
+
Set notebook tab reorderable via drag and drop
2010-03-28 Mike Massonnet <mmassonnet at xfce.org>
diff --git a/lib/hypertextview.vala b/lib/hypertextview.vala
index d126049..2435b1c 100644
--- a/lib/hypertextview.vala
+++ b/lib/hypertextview.vala
@@ -115,10 +115,15 @@ namespace Xnp {
link = start.get_text (end);
try {
+ Gdk.spawn_command_line_on_screen (Gdk.Screen.get_default (), "exo-open "+link);
+ return false;
+ } catch (Error e) {
+ }
+ try {
GLib.AppInfo.launch_default_for_uri (link, null);
return false;
} catch (Error e) {
- critical ("Unable to open link with default handler: %s", e.message);
+ message ("Unable to open link with default handler: %s", e.message);
}
try {
Gdk.spawn_command_line_on_screen (Gdk.Screen.get_default (), "xdg-open "+link);
@@ -133,7 +138,7 @@ namespace Xnp {
catch (Error e) {
}
- critical ("Unable to find an appropriate fallback to open the link");
+ message ("Unable to find an appropriate fallback to open the link");
}
return false;
More information about the Xfce4-commits
mailing list