From e64b20d1d3753a2c78ac9f1d55ed7060f1788dcf Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Sun, 1 May 2016 12:05:59 +0100 Subject: [PATCH] Fix #211 Corrupt help file https://github.com/BestImageViewer/geeqie/issues/211 Section 4.4 External Editors now displayed. Requires much more re-work. --- doc/docbook/GuideEditorsConfig.xml | 168 ++++++++++++++++++ .../GuideImageManagementExternalEditing.xml | 16 +- 2 files changed, 180 insertions(+), 4 deletions(-) create mode 100644 doc/docbook/GuideEditorsConfig.xml diff --git a/doc/docbook/GuideEditorsConfig.xml b/doc/docbook/GuideEditorsConfig.xml new file mode 100644 index 00000000..0b351c9e --- /dev/null +++ b/doc/docbook/GuideEditorsConfig.xml @@ -0,0 +1,168 @@ + +
+ + External Editors + +
Editors Configuration Dialog + + This dialog allows user to add new editors or modify the system ones. It is available in the menu under Edit / Preferences / Configure Editors. + + + The Editors dialog shows list of all considerable editors, that is all installed desktop files that have Categories=Graphics or Categories=X-Geeqie. + + Name + Editor name as specified in desktop file. + + Hidden + An editor can be "Hidden" for one of these reasons: + + the desktop file contains Hidden=TRUE or NoDisplay=TRUE entry + TryExec binary was not found + MimeType list does not contain images + MimeType list is empty and Categories does not contain X-Geeqie + + Desktop file + + Name of the desktop file, it is used as an identifier in hotkey configuration and in config file. + + Path + + Full path to the desktop file. Desktop files in user directories override the system ones with the same name. +
+
Adding new editor + + This button opens a text editor with a desktop file template. + + [Desktop Entry] +Version=1.0 +Type=Application +Name=Template +#Name[cs]= +#Name[fr]= + +# %f A single file name, even if multiple files are selected. The +# system reading the desktop entry should recognize that the program in +# question cannot handle multiple file arguments, and it should should +# probably spawn and execute multiple copies of a program for each +# selected file if the program is not able to handle additional file +# arguments. If files are not on the local file system (i.e. are on HTTP +# or FTP locations), the files will be copied to the local file system and +# %f will be expanded to point at the temporary file. Used for programs +# that do not understand the URL syntax. +# +# %F A list of files. Use for apps that can open several local files +# at once. Each file is passed as a separate argument to the executable +# program. +# +# %u A single URL. Local files may either be passed as file: URLs or +# as file path. +# +# %U A list of URLs. Each URL is passed as a separate argument to +# the executable program. Local files may either be passed as file: URLs +# or as file path. +# +# "$GEEQIE_DESTINATION" destination set by Geeqie +Exec=ln -s %f "$GEEQIE_DESTINATION" + +# Desktop files that are usable only in Geeqie should be marked like this: +Categories=X-Geeqie; +OnlyShowIn=X-Geeqie; + +# Show in menu "File" +X-Geeqie-Menu-Path=FileMenu/FileOpsSection + +# This is a filter - $GEEQIE_DESTINATION is required +X-Geeqie-Filter=true + +# It can be made verbose +# X-Geeqie-Verbose=true +
+
Modifying an existing editor + + Edit button opens a text editor with existing desktop file. For desktop files that are not writable by user, it allows saving to Geeqie specific directory, where it overrides the system file (but only for Geeqie). +
+
Deleting an editor + + Delete buttons can delete user writable desktop files. System desktop files can't be deleted directly, but it is possible to edit them and set Hidden=TRUE, see above. +
+
Special editors + + Desktop file with one of the following name has a special function. It replaces the corresponding internal command. + + geeqie-copy-command.desktop +geeqie-move-command.desktop +geeqie-rename-command.desktop +geeqie-delete-command.desktop +geeqie-folder-command.desktop + + This can be used for example for custom trash command or for manipulation with files under version control. +
+
Geeqie extensions + X-Geeqie + + This can be specified in Categories, OnlyShowIn and NotShowIn fields + + X-Geeqie-Menu-Path + + This can specify the menu path where the editor appears, instead of the default Edit / External editors. Possible values are: + + FileMenu +FileMenu/OpenSection +FileMenu/SearchSection +FileMenu/PrintSection +FileMenu/FileOpsSection +FileMenu/QuitSection +GoMenu +SelectMenu +SelectMenu/SelectSection +SelectMenu/ClipboardSection +SelectMenu/MarksSection +SelectMenu/EditMenu +SelectMenu/ExternalMenu +SelectMenu/EditSection +SelectMenu/OrientationMenu +SelectMenu/PropertiesSection +SelectMenu/PreferencesMenu +SelectMenu/PreferencesSection +ViewMenu +ViewMenu/WindowSection +ViewMenu/FileDirMenu +ViewMenu/FileDirMenu/FolderSection +ViewMenu/FileDirMenu/ListSection +ViewMenu/DirSection +ViewMenu/ZoomMenu +ViewMenu/ZoomMenu/ConnectZoomMenu +ViewMenu/SplitMenu +ViewMenu/ColorMenu +ViewMenu/OverlayMenu +ViewMenu/ViewSection +ViewMenu/ToolsSection +ViewMenu/SlideShowSection +HelpMenu +HelpMenu/HelpSection + X-Geeqie-Filter + + Specifies that the editor is a filter - it requires source and destination path. The destination path is in shell variable $GEEQIE_DESTINATION or, more correctly, it can be + queried be geeqie -r, like in the geeqie-symlink command: + + #!/bin/sh + +# This is a helper script that symlinks grouped files +# it uses geeqie remote connection to get details about grouped files + + +# iterate over files on commandline +for file in "$@" ; do + # we got only one file for each group, typically the main one + # get the sidecars: + geeqie -r --get-sidecars:"$file" |while read sidecar ; do + # the main file is included in the sidecar file list, no special handling is required + # get destination path for each sidecar file: + geeqie -r --get-destination:"$sidecar" | if read destination ; then + ln -s "$sidecar" "$destination" + fi + done +done +
+
+ diff --git a/doc/docbook/GuideImageManagementExternalEditing.xml b/doc/docbook/GuideImageManagementExternalEditing.xml index 46ec598e..f1b324f8 100644 --- a/doc/docbook/GuideImageManagementExternalEditing.xml +++ b/doc/docbook/GuideImageManagementExternalEditing.xml @@ -1,5 +1,11 @@ -
+<section id="GuideImageManagementExternalEditing"> + <title> + External Editors + + + This section describes the external editor facility. +
External Editing @@ -22,12 +28,12 @@ http://standards.freedesktop.org/menu-spec/ - It is also possible to add Geeqie-specific editors with the Editor configuration dialog? + It is also possible to add Geeqie-specific editors with the Editor Configuration Dialog. Editors appear in menu Edit / External Editors, unless specified otherwise in the desktop file. -
+ <para/></section><section id="Resultdialog"><title> Result dialog @@ -39,4 +45,6 @@ Once all commands have completed, or if the Stop button was pressed and the pending command has completed, you can use the Close button, or press Escape, to close the Result dialog. The Result dialog can not be closed while a command is still running. -
+
Editor Configuration +
+ -- 2.20.1