Changed icon create/edit dialog, so working path can be set, including startup options like running in terminal or starting with startup nofication hints.

Changed how icons are started. Previously, ede-desktop would extract content from .desktop Exec key and explicitly run it. This would not correctly handle other .desktop details, like startup notification or running in terminal. Now, full .desktop path is sent directly to ede-launch which will take care about named startup details.

These changes also fixes bug #235: "Working directory and startup notification for desktop icons".
This commit is contained in:
Sanel Zukan
2014-02-25 18:16:10 +00:00
parent 30d0261cd3
commit f1a37cefd2
5 changed files with 156 additions and 98 deletions

View File

@@ -81,7 +81,8 @@ static MenuItem icon_trash_menu[] = {
static void open_cb(Fl_Widget*, void* d) {
DesktopIcon *o = (DesktopIcon*)d;
run_async("ede-launch %s", o->get_cmd());
/* run .desktop file directly, since it can contain startup details */
run_async("ede-launch %s", o->get_path());
}
static void edit_cb(Fl_Widget*, void* d) {
@@ -391,8 +392,8 @@ int DesktopIcon::handle(int event) {
return 1;
case FL_RELEASE:
if(Fl::event_clicks() > 0 && !cmd.empty())
run_async("ede-launch %s", cmd.c_str());
if(Fl::event_clicks() > 0 && !path.empty())
run_async("ede-launch %s", path.c_str());
return 1;
case FL_DND_ENTER: