After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 574919 - %d parameter returns blank field
%d parameter returns blank field
Status: RESOLVED FIXED
Product: filemanager-actions
Classification: Other
Component: general
1.4
Other Linux
: Normal normal
: ---
Assigned To: Nautilus-actions Maintainer(s)
Nautilus-actions Maintainer(s)
: 577447 578008 583628 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-03-11 11:03 UTC by gourgi
Modified: 2009-05-25 16:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adds call to gnome_vfs_init (1.51 KB, patch)
2009-04-12 14:29 UTC, Bruce van der Kooij
none Details | Review

Description gourgi 2009-03-11 11:03:56 UTC
I use Ubuntu 9.04 Alpha 5
with Gnome 2.25.92 and nautilus-actions 1.4.1

The %d parameter when used should return the /path/to/selected/file-folder
but it simply doesn't work

Steps to reproduce : 
Case 1:
- create an action and put in 
  "Path" field : /usr/bin/gnome-terminal
  "Parameters" filed : --working-directory=%d
- make the action appear in folders and restart nautilus.
- Go to /etc/samba and run the action we created. gnome-terminal opens with working-dir /home/<username>/

Case 2: 
- create a bash script (test.sh) and put inside

#!/bin/bash
echo $1 > /tmp/test
echo "----" >> /tmp/test

- this should echo the %d parameter in /tmp/test 
- create an action and put in 
  "Path" field : /path/to/test.sh
  "Parameters" filed: %d
- make the action appear in files and folders and restart nautilus. 
- go to whatever file or folder you want and run the action we created. then check /tmp/test. Is is empty !
Comment 1 Luigi Maselli 2009-03-26 10:41:40 UTC
I confirm this bug
Comment 2 Guillaume Tissier 2009-04-10 17:43:41 UTC
In fact it is not only %d parameter who don't work anymore, but all types of arguments gived by nautilus to a script : %m, %f, %M

I don't know if nautilus developpers have changed something, or simply deleted this feature, but it is a big regression.

My mailpictures application (http://sourceforge.net/mailpictures), who bypass nautilus-actions but use the same way to work, simply doesn't work anymore as all actions from nautilus-actions utility

Please developpers, can you explain now what we can have the same feature and the way we can use it
Comment 3 Luigi Maselli 2009-04-11 10:08:13 UTC
XMP Manager is broken too
http://grigio.org/xmp_manager
Comment 4 florent 2009-04-12 08:50:57 UTC
hi !

this bug is a great problem !

mailpictures is the best way to send pictures by mail without problems

I don't understand why this script is not included  directly in ubuntu....
Comment 5 Bruce van der Kooij 2009-04-12 14:29:12 UTC
Created attachment 132551 [details] [review]
Adds call to gnome_vfs_init

The problem is that GnomeVFS needs to be initialized before gnome_vfs methods can be used. Nautilus used to call gnome_vfs_init itself (pre 2.26) and since extensions run inprocess of Nautilus this call would also apply to them. Nowadays Nautilus is GIO/GVFS and so this call has been removed, because nautilus-actions is unmaintained it hasn't moved with Nautilus to GIO/GVFS.

The relevant function which uses the gnome_vfs functions is nautilus_actions_utils_parse_parameter which parses all the %u, %d, %f, %m, %M and so on. See:

http://svn.gnome.org/viewvc/nautilus-actions/trunk/plugin/nautilus-actions-utils.c?view=markup#l32

Since GnomeVFS has been deprecated all the functions to gnome_vfs_* should be converted to their GIO/GVFS equivalents but in the meantime calling gnome_vfs_init will do as a quickfix. This patch adds the init call to nautilus_actions_instance_init.

Also, there was a problem with po/LINGUAS which contained a linebreak and was causing corrupt Makefiles to be generated due to the ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS"`" call in configure.in. This patch also fixes that by removing the linebreak so nautilus-actions can be build once again from trunk.

Since I don't have any commit rights somebody else will have to commit. Can somebody else also make sure that this gets in the Jaunty (9.04) release for Ubuntu? Opening a bug on Launchpad pointing to this one might be a good idea.
Comment 6 Luigi Maselli 2009-04-12 15:25:26 UTC
https://bugs.launchpad.net/ubuntu/+source/nautilus-actions/+bug/341035
is the bug on Launchpad.
Comment 7 Christian Persch 2009-04-15 13:28:13 UTC
*** Bug 578008 has been marked as a duplicate of this bug. ***
Comment 8 Pierre Wieser 2009-05-12 20:58:06 UTC
Hi,

The part of the patch proposed by Bruce relative to GnomeVFS initialization has been applied to the master branch.

The part relative to the line break in po/LINGUAS has not been applied as already fixed by Christian.

Thanks to all
Regards
Pierre
Comment 9 Pierre Wieser 2009-05-13 18:14:44 UTC
*** Bug 577447 has been marked as a duplicate of this bug. ***
Comment 10 Pierre Wieser 2009-05-25 16:35:19 UTC
*** Bug 583628 has been marked as a duplicate of this bug. ***