discomfitor pushed a commit to branch master.
commit ca798e4d05a7ca0f1411ab9fd878a346560b46b2
Author: Mike Blumenkrantz <[email protected]>
Date: Wed May 29 15:04:46 2013 +0100
fix e_exec to successfully open .desktop files which are URLs by using
e_open
---
ChangeLog | 1 +
NEWS | 1 +
src/bin/Makefile.am | 1 +
src/bin/e_exec.c | 23 ++++++++++++++++++++---
4 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bdc3516..615e314 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
2013-05-29 Mike Blumenkrantz
* added dnd support for text/x-moz-url
+ * fixed e_exec to open .desktop url links
2013-05-24 Christopher Michael
diff --git a/NEWS b/NEWS
index 304c699..039af86 100644
--- a/NEWS
+++ b/NEWS
@@ -215,3 +215,4 @@ Fixes:
* toolbar gadgets no longer crash when trying to display a popup
* fixed theme bug which prevented windows from unshading correctly when
animations were disabled
* filemanager windows no longer resize to 0x0 when double clicked with no
icons present
+ * fixed e_exec to open .desktop url links
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 098f439..7717312 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -16,6 +16,7 @@ AM_CPPFLAGS = \
@EMOTION_CFLAGS@ \
@WAYLAND_CFLAGS@ \
@WAYLAND_EGL_CFLAGS@ \
+-DE_BINDIR=\"$(bindir)\" \
-DPACKAGE_BIN_DIR=\"@PACKAGE_BIN_DIR@\" \
-DPACKAGE_LIB_DIR=\"@PACKAGE_LIB_DIR@\" \
-DPACKAGE_DATA_DIR=\"@PACKAGE_DATA_DIR@\" \
diff --git a/src/bin/e_exec.c b/src/bin/e_exec.c
index 75fec64..67eb92c 100644
--- a/src/bin/e_exec.c
+++ b/src/bin/e_exec.c
@@ -186,8 +186,13 @@ e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char
*exec,
if (exec)
inst = _e_exec_cb_exec(launch, NULL, strdup(exec), 0);
else
- inst = efreet_desktop_command_get
- (desktop, files, (Efreet_Desktop_Command_Cb)_e_exec_cb_exec,
launch);
+ {
+ if (desktop->exec)
+ inst = efreet_desktop_command_get(desktop, files,
+ (Efreet_Desktop_Command_Cb)_e_exec_cb_exec, launch);
+ else
+ inst = _e_exec_cb_exec(launch, desktop, NULL, 0);
+ }
}
else
inst = _e_exec_cb_exec(launch, NULL, strdup(exec), 0);
@@ -515,6 +520,18 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char
*exec, int remaining)
else
exe = ecore_exe_run(exec, inst);
}
+ else if (desktop && desktop->url)
+ {
+ Eina_Strbuf *sb;
+
+ sb = eina_strbuf_new();
+ eina_strbuf_append(sb, E_BINDIR "/enlightenment_open '");
+ eina_strbuf_append(sb, desktop->url);
+ eina_strbuf_append_char(sb, '\'');
+ exe = ecore_exe_run(eina_strbuf_string_get(sb),
+ inst);
+ eina_strbuf_free(sb);
+ }
else
exe = ecore_exe_run(exec, inst);
}
@@ -557,7 +574,7 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char
*exec, int remaining)
lnew = eina_list_append(l, inst);
if (l) eina_hash_modify(e_exec_instances, inst->key, lnew);
else eina_hash_add(e_exec_instances, inst->key, lnew);
- if (inst->desktop)
+ if (inst->desktop && inst->desktop->exec)
{
e_exec_start_pending = eina_list_append(e_exec_start_pending,
inst->desktop);
--
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1