summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <m.blumenkran@samsung.com>2013-05-29 15:04:46 +0100
committerMike Blumenkrantz <m.blumenkran@samsung.com>2013-05-29 15:04:46 +0100
commitca798e4d05a7ca0f1411ab9fd878a346560b46b2 (patch)
treeb1754fb7ebf297a7d77306ccfdf67ac91651af47
parent65e4442f1c6fb4ce2dc5546eb5d83742f9fe72b6 (diff)
fix e_exec to successfully open .desktop files which are URLs by using e_open
Diffstat (limited to '')
-rw-r--r--ChangeLog1
-rw-r--r--NEWS1
-rw-r--r--src/bin/Makefile.am1
-rw-r--r--src/bin/e_exec.c23
4 files changed, 23 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index bdc3516be..615e31424 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
12013-05-29 Mike Blumenkrantz 12013-05-29 Mike Blumenkrantz
2 2
3 * added dnd support for text/x-moz-url 3 * added dnd support for text/x-moz-url
4 * fixed e_exec to open .desktop url links
4 5
52013-05-24 Christopher Michael 62013-05-24 Christopher Michael
6 7
diff --git a/NEWS b/NEWS
index 304c69983..039af8648 100644
--- a/NEWS
+++ b/NEWS
@@ -215,3 +215,4 @@ Fixes:
215 * toolbar gadgets no longer crash when trying to display a popup 215 * toolbar gadgets no longer crash when trying to display a popup
216 * fixed theme bug which prevented windows from unshading correctly when animations were disabled 216 * fixed theme bug which prevented windows from unshading correctly when animations were disabled
217 * filemanager windows no longer resize to 0x0 when double clicked with no icons present 217 * filemanager windows no longer resize to 0x0 when double clicked with no icons present
218 * fixed e_exec to open .desktop url links
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 098f4393f..77173126e 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -16,6 +16,7 @@ AM_CPPFLAGS = \
16@EMOTION_CFLAGS@ \ 16@EMOTION_CFLAGS@ \
17@WAYLAND_CFLAGS@ \ 17@WAYLAND_CFLAGS@ \
18@WAYLAND_EGL_CFLAGS@ \ 18@WAYLAND_EGL_CFLAGS@ \
19-DE_BINDIR=\"$(bindir)\" \
19-DPACKAGE_BIN_DIR=\"@PACKAGE_BIN_DIR@\" \ 20-DPACKAGE_BIN_DIR=\"@PACKAGE_BIN_DIR@\" \
20-DPACKAGE_LIB_DIR=\"@PACKAGE_LIB_DIR@\" \ 21-DPACKAGE_LIB_DIR=\"@PACKAGE_LIB_DIR@\" \
21-DPACKAGE_DATA_DIR=\"@PACKAGE_DATA_DIR@\" \ 22-DPACKAGE_DATA_DIR=\"@PACKAGE_DATA_DIR@\" \
diff --git a/src/bin/e_exec.c b/src/bin/e_exec.c
index 75fec649d..67eb92cc6 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,
186 if (exec) 186 if (exec)
187 inst = _e_exec_cb_exec(launch, NULL, strdup(exec), 0); 187 inst = _e_exec_cb_exec(launch, NULL, strdup(exec), 0);
188 else 188 else
189 inst = efreet_desktop_command_get 189 {
190 (desktop, files, (Efreet_Desktop_Command_Cb)_e_exec_cb_exec, launch); 190 if (desktop->exec)
191 inst = efreet_desktop_command_get(desktop, files,
192 (Efreet_Desktop_Command_Cb)_e_exec_cb_exec, launch);
193 else
194 inst = _e_exec_cb_exec(launch, desktop, NULL, 0);
195 }
191 } 196 }
192 else 197 else
193 inst = _e_exec_cb_exec(launch, NULL, strdup(exec), 0); 198 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)
515 else 520 else
516 exe = ecore_exe_run(exec, inst); 521 exe = ecore_exe_run(exec, inst);
517 } 522 }
523 else if (desktop && desktop->url)
524 {
525 Eina_Strbuf *sb;
526
527 sb = eina_strbuf_new();
528 eina_strbuf_append(sb, E_BINDIR "/enlightenment_open '");
529 eina_strbuf_append(sb, desktop->url);
530 eina_strbuf_append_char(sb, '\'');
531 exe = ecore_exe_run(eina_strbuf_string_get(sb),
532 inst);
533 eina_strbuf_free(sb);
534 }
518 else 535 else
519 exe = ecore_exe_run(exec, inst); 536 exe = ecore_exe_run(exec, inst);
520 } 537 }
@@ -557,7 +574,7 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
557 lnew = eina_list_append(l, inst); 574 lnew = eina_list_append(l, inst);
558 if (l) eina_hash_modify(e_exec_instances, inst->key, lnew); 575 if (l) eina_hash_modify(e_exec_instances, inst->key, lnew);
559 else eina_hash_add(e_exec_instances, inst->key, lnew); 576 else eina_hash_add(e_exec_instances, inst->key, lnew);
560 if (inst->desktop) 577 if (inst->desktop && inst->desktop->exec)
561 { 578 {
562 e_exec_start_pending = eina_list_append(e_exec_start_pending, 579 e_exec_start_pending = eina_list_append(e_exec_start_pending,
563 inst->desktop); 580 inst->desktop);