Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Ufimtsev2018-01-19 17:41:48 +0000
committerLeo Ufimtsev2018-01-22 17:50:07 +0000
commitddedf897614a02d30597f85d9cf8131b465864fc (patch)
treeb02dd29caa3a2f4e721e025fe8dfd9a67eacf639 /bundles/org.eclipse.swt/Eclipse SWT PI/gtk
parentd30928e83d65746aa877315fed67bbae58a6e788 (diff)
downloadeclipse.platform.swt-ddedf897614a02d30597f85d9cf8131b465864fc.tar.gz
eclipse.platform.swt-ddedf897614a02d30597f85d9cf8131b465864fc.tar.xz
eclipse.platform.swt-ddedf897614a02d30597f85d9cf8131b465864fc.zip
Bug 525305 – [API]Provide SWT.OpenUrl event (Linux implementation)
(For review/merge) Linux implementation for OpenUrl event, with use of GDBus. (As per original patch *1). URL vs file detection done via "new URI(file).getScheme()". I tested, this distinguishes URI's from files quite well. I.e: /myfile/ ./file file .. -> (OpenFile) http://www.eclipse.org mailto:my@mail.com .. -> (OpenUrl) I've tested with latest launcher: 1) Via launcher: eclipse http://www.eclipse.org /tmp/myFile 2) Via gdbus calls: gdbus call --session --dest org.eclipse.swt --object-path /org/eclipse/swt --method org.eclipse.swt.FileOpen "['http://www.google.com', '/tmp/myFile']" Patchset 2: - Updated URL detection logic so that files/urls are properly distinguished. Links: [1] Original patch: https://git.eclipse.org/r/#/c/30107/14/bundles/org.eclipse.swt/Eclipse+SWT/gtk/org/eclipse/swt/widgets/Display.java Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=525305 Change-Id: I6531989e3eb766fdf0715a0a9cb86c9ed2b973f3 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index 126bad80b3..11043ae4d4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -115,6 +115,7 @@ public class OS extends C {
System.out.print("SWT_LIB_Gtk:"+gtk_major_version()+"."+gtk_minor_version()+"."+gtk_micro_version());
if (System.getProperty(GDBUS_SYSTEM_PROPERTY) != null) {
System.out.print(" (DBus enabled)");
+ System.out.print(" (OpenUrl/OpenDocument supported)");
} else {
System.out.print(" (DBus dissabled)");
}

Back to the top