Oops... Use this one instead.
On Sat, Mar 29, 2008 at 2:38 AM, Гусев Фёдор <[EMAIL PROTECTED]> wrote:
> Hello.
>
> Ok, I had to resend this, since first time
> a) sent it to the wrong list
> b) attachment didn't get through (because of a?)
>
>
>
> For now, if you enter custom command in Open with... dialog (in E
> integrated filemanager), e.g. you type smth like 'mplayer' or even
> 'mplayer %f' and click Open, nothing will happen. The command will be
> executed just as you type it -- mplayer will complain about missing
> files.
>
> Attached patch fixes that. Actually, a fake .desktop entry is created
> with Exec field set to the command you typed in. So, the command
> running is now taken by efreet and you can use various special fields
> described in FDO Desktop Entry Spec, e.g. %f, %F.
>
> So, selecting a movie, opening the Open with... dialog, typing
> 'mplayer %f' and clicking Open works now.
>
> --
> Sincerely yours, Fedor Gusev.
>
--
Sincerely yours, Fedor Gusev.
? fileman_open_with_custom_command_fix.patch
Index: e_fwin.c
===================================================================
RCS file: /var/cvs/e/e17/apps/e/src/modules/fileman/e_fwin.c,v
retrieving revision 1.25
diff -u -r1.25 e_fwin.c
--- e_fwin.c 7 Mar 2008 19:13:54 -0000 1.25
+++ e_fwin.c 31 Mar 2008 09:49:24 -0000
@@ -831,21 +831,33 @@
}
}
evas_list_free(selected);
+
+ // Create a fake .desktop for custom command.
+ if (!desktop)
+ {
+ desktop = efreet_desktop_empty_new("");
+ desktop->exec = strdup(fad->exec_cmd);
+ }
+
if (fad->fwin->win)
{
if (desktop)
- e_exec(fad->fwin->win->border->zone, desktop, NULL, files, "fwin");
- else
- e_exec(fad->fwin->win->border->zone, NULL, fad->exec_cmd, files, "fwin");
+ e_exec(fad->fwin->win->border->zone, desktop, NULL, files,
+ "fwin");
}
else if (fad->fwin->zone)
{
if (desktop)
- e_exec(fad->fwin->zone, desktop, NULL, files, "fwin");
- else
- e_exec(fad->fwin->zone, NULL, fad->exec_cmd, files, "fwin");
+ e_exec(fad->fwin->zone, desktop, NULL, files, "fwin");
}
- ecore_list_destroy(files);
+
+ // Free fake .desktop
+ if (!strcmp(fad->exec_cmd, ""))
+ {
+ efreet_desktop_free(desktop);
+ }
+
+ ecore_list_destroy(files);
}
chdir(pcwd);
}
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel