! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Process command line parameters
Status:
CLOSED: FIXED
Severity:
enhancement

Comments

Description Benedikt Meurer editbugs 2006-01-26 16:50:35 CET
Let users specify 0..n folders or file they wish to open on the command line. If
no folder/file is specified, then Thunar will open a single window with the
current directory.

Files will be processed using thunar_file_launch().
Comment 1 Laurent Meunier 2006-01-26 21:35:57 CET
Created attachment 423 
patch for thunar/main.c

This patch will only open each folder specified on the command line in separate
windows. Files are not (yet) processed.
Comment 2 Benedikt Meurer editbugs 2006-01-26 22:29:21 CET
Your patch has several issues: realpath() cannot be used in this context, as it
cannot handle file:-URIs, getcwd() shouldn't be used, GLib offers a replacement
(g_get_current_directory() or something like that), modifying argv isn't a good
idea, either allocate a temporary nargv or use a different code path, etc.

What I forgot to mention in the initial description is that the code should also
re-use an existing Thunar instance if possible (-> D-BUS, see Terminal for an
example), so the whole thing requires adding and moving around some code.

I appreciate your work on this, but let me finish some basics first, before we
continue to solve this issue. ;-)
Comment 3 Benedikt Meurer editbugs 2006-02-08 22:59:29 CET
Mostly done with revision 19782.

2006-02-08	Benedikt Meurer <benny@xfce.org>

	* thunar/thunar-application.{c,h}: Add a "daemon" property, which
	  determines whether Thunar will exit once the last window is closed.
	  Remove the D-BUS service here. Add process_filenames() method, to
	  process the list of filenames given on the command line. Bug #1384.
	* thunar/main.c: Attach the D-BUS here.
	* Makefile.am, org.xfce.Thunar.service.in: Add Thunar specific service
	  file.
	* thunar/thunar-dbus-service-infos.xml, thunar/thunar-dbus-service.c:
	  Add the org.xfce.Thunar interface here, with currently only a
	  LaunchFiles() method, which can process Thunar command line parameters
	  in a remote instance. Bug #1384.
	* thunar/thunar-dbus-client.{c,h}, thunar/Makefile.am: Add convenience
	  wrapper for the D-BUS LaunchFiles() of the org.xfce.Thunar interface,
	  which is used on startup to first try to reuse an existing instance.
	  This way new folder windows will popup instantly if an instance of
	  Thunar is already running.
	* org.xfce.Thunar.service.in, org.xfce.FileManager.service.in,
	  thunar/main.c: Add --daemon option and use it when starting from the
	  message bus. Pass all additional parameters as file names to a run-
	  ning remote instance or to ThunarApplication as fallback. Bug #1384.
	* examples/xfce-file-manager.py, examples/Makefile.am: Add a simple
	  example how to communicate with the file manager using the D-BUS
	  Python bindings.

Bug #1384

Reported by:
Benedikt Meurer
Reported on: 2006-01-26
Last modified on: 2009-07-17

People

Assignee:
Jannis Pohlmann
CC List:
0 users

Version

Version:
0.2.1svn

Attachments

patch for thunar/main.c (2.71 KB, patch)
2006-01-26 21:35 CET , Laurent Meunier
no flags

Additional information