[Goodies-commits] r7466 - in xfce4-notes-plugin/trunk: . panel-plugin
Mike Massonnet
mmassonnet at xfce.org
Sat Jun 6 12:26:16 CEST 2009
Author: mmassonnet
Date: 2009-06-06 10:26:16 +0000 (Sat, 06 Jun 2009)
New Revision: 7466
Modified:
xfce4-notes-plugin/trunk/ChangeLog
xfce4-notes-plugin/trunk/panel-plugin/hypertextview.vala
Log:
Fix broken "open link" code
Modified: xfce4-notes-plugin/trunk/ChangeLog
===================================================================
--- xfce4-notes-plugin/trunk/ChangeLog 2009-06-06 09:40:14 UTC (rev 7465)
+++ xfce4-notes-plugin/trunk/ChangeLog 2009-06-06 10:26:16 UTC (rev 7466)
@@ -1,5 +1,11 @@
2009-06-06 Mike Massonnet <mmassonnet at xfce.org>
+Fix broken "open link" code
+ * panel-plugin/hypertextview.vala:
+ - The code to launch a brower was missusing the try catches.
+
+2009-06-06 Mike Massonnet <mmassonnet at xfce.org>
+
Vala Xfconf settings
* panel-plugin/application.vala:
- Use Xfconf to bind and set settings.
Modified: xfce4-notes-plugin/trunk/panel-plugin/hypertextview.vala
===================================================================
--- xfce4-notes-plugin/trunk/panel-plugin/hypertextview.vala 2009-06-06 09:40:14 UTC (rev 7465)
+++ xfce4-notes-plugin/trunk/panel-plugin/hypertextview.vala 2009-06-06 10:26:16 UTC (rev 7466)
@@ -119,19 +119,24 @@
try {
GLib.AppInfo.launch_default_for_uri (link, null);
- } catch (Error ex) {
- warning ("Unable to open link `%s': %s", link, ex.message);
+ return false;
+ } catch (Error e) {
+ critical ("Unable to open link with default handler: %s", e.message);
+ }
+ try {
+ Gdk.spawn_command_line_on_screen (Gdk.Screen.get_default (), "xdg-open "+link);
+ return false;
+ }
+ catch (Error e) {
+ }
+ try {
+ Gdk.spawn_command_line_on_screen (Gdk.Screen.get_default (), "firefox "+link);
+ return false;
+ }
+ catch (Error e) {
+ }
- if (Gdk.spawn_command_line_on_screen (Gdk.Screen.get_default (), "xdg-open "+link)) {
- return false;
- }
-
- if (Gdk.spawn_command_line_on_screen (Gdk.Screen.get_default (), "firefox "+link)) {
- return false;
- }
-
- critical ("Impossible to find an appropriate fallback to open the link");
- }
+ critical ("Unable to find an appropriate fallback to open the link");
}
return false;
More information about the Goodies-commits
mailing list