inst->launch_id = launch_id;
inst->launch_time = ecore_time_get();
inst->expire_timer = ecore_timer_add(10.0, _e_app_cb_expire_timer, inst);
-
- _e_apps_all->subapps = evas_list_remove(_e_apps_all->subapps, original);
- _e_apps_all->subapps = evas_list_prepend(_e_apps_all->subapps, original);
+
+ if (original->parent == _e_apps_all)
+ {
+ _e_apps_all->subapps = evas_list_remove(_e_apps_all->subapps, original);
+ _e_apps_all->subapps = evas_list_prepend(_e_apps_all->subapps, original);
+ }
original->instances = evas_list_append(original->instances, inst);
_e_apps_start_pending = evas_list_append(_e_apps_start_pending, original);
return E_FWIN_EXEC_SH;
}
}
+ else if ((e_util_glob_match(ici->file, "*.desktop")) ||
+ (e_util_glob_match(ici->file, "*.kdelink")))
+ {
+ return E_FWIN_EXEC_DESKTOP;
+ }
}
return E_FWIN_EXEC_NONE;
}
e_zone_exec(fwin->win->border->zone, buf);
break;
case E_FWIN_EXEC_DESKTOP:
- a = e_app_new(ici->file, 0);
+ if (ici->pseudo_link)
+ snprintf(buf, sizeof(buf), "%s/%s", ici->pseudo_dir, ici->file);
+ else
+ snprintf(buf, sizeof(buf), "%s/%s", e_fm2_real_path_get(fwin->fm_obj), ici->file);
+ a = e_app_new(buf, 0);
if (a)
{
e_zone_app_exec(fwin->win->border->zone, a);
* use it, if not fall back again - and so on - if all apps listed do
* not contain 1 that handles all the mime types - fall back to dialog
*/
- if (evas_list_count(mlist) == 1)
+ if (evas_list_count(mlist) <= 1)
{
- a = e_exehist_mime_app_get(mlist->data);
- if (a)
+ char pcwd[4096], buf[4096], *cmd;
+ Ecore_List *files_list = NULL, *cmds = NULL;
+
+ need_dia = 1;
+ a = NULL;
+ if (mlist) a = e_exehist_mime_app_get(mlist->data);
+ getcwd(pcwd, sizeof(pcwd));
+ chdir(e_fm2_real_path_get(fwin->fm_obj));
+
+ files_list = ecore_list_new();
+ ecore_list_set_free_cb(files_list, free);
+ for (l = files; l; l = l->next)
{
- char pcwd[4096], buf[4096], *cmd;
- Ecore_List *files_list = NULL, *cmds = NULL;
-
- getcwd(pcwd, sizeof(pcwd));
- chdir(e_fm2_real_path_get(fwin->fm_obj));
+ ici = l->data;
+ if (_e_fwin_file_is_exec(ici) == E_FWIN_EXEC_NONE)
+ ecore_list_append(files_list, strdup(ici->file));
+ }
+ for (l = files; l; l = l->next)
+ {
+ E_Fwin_Exec_Type ext;
- files_list = ecore_list_new();
- ecore_list_set_free_cb(files_list, free);
- for (l = files; l; l = l->next)
- {
- ici = l->data;
- if (_e_fwin_file_is_exec(ici) == E_FWIN_EXEC_NONE)
- ecore_list_append(files_list, strdup(ici->file));
- }
- for (l = files; l; l = l->next)
+ ici = l->data;
+ ext = _e_fwin_file_is_exec(ici);
+ if (ext != E_FWIN_EXEC_NONE)
{
- E_Fwin_Exec_Type ext;
-
- ici = l->data;
- ext = _e_fwin_file_is_exec(ici);
- if (ext != E_FWIN_EXEC_NONE)
- _e_fwin_file_exec(fwin, ici, ext);
+ _e_fwin_file_exec(fwin, ici, ext);
+ need_dia = 0;
}
+ }
+ if (a)
+ {
cmds = ecore_desktop_get_command(a->desktop, files_list, 1);
if (cmds)
{
{
e_zone_exec(fwin->win->border->zone, cmd);
e_exehist_add("fwin", cmd);
+ need_dia = 0;
}
ecore_list_destroy(cmds);
}
- ecore_list_destroy(files_list);
-
+ }
+ ecore_list_destroy(files_list);
+
+ chdir(pcwd);
+ if (!need_dia)
+ {
if (apps) evas_list_free(apps);
evas_list_free(mlist);
-
- chdir(pcwd);
return;
}
}