changeset 2593:223438494692

Add Collections to Shortcuts bar
author Colin Clark <colin.clark@cclark.uk>
date Sun, 10 Sep 2017 10:57:20 +0100
parents 4fc92ae7b164
children 6af5b8db48bb
files doc/docbook/GuideMainWindowFolderPane.xml src/shortcuts.c
diffstat 2 files changed, 24 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/doc/docbook/GuideMainWindowFolderPane.xml	Sun Sep 10 10:10:47 2017 +0100
+++ b/doc/docbook/GuideMainWindowFolderPane.xml	Sun Sep 10 10:57:20 2017 +0100
@@ -195,9 +195,22 @@
     </section>
     <section id="Shortcutslist">
       <title>Shortcuts</title>
-      <para>This is a list of shortcuts (bookmarks) to commonly used folders or images. A context menu will appear by right clicking on an item, or pressing the menu key when the item has the focus.</para>
+      <para>This is a list of shortcuts (bookmarks) to commonly used folders, images and collections. A context menu will appear by right clicking on an item, or pressing the menu key when the item has the focus.</para>
       <para>Folders or images can be added to the list by activating the Add button at the bottom of the pane, or dragging a folder or image onto the list.</para>
       <para>
+        Collections may be added by opening the
+        <menuchoice>
+          <shortcut>
+            <keycombo>
+              <keycap>O</keycap>
+            </keycombo>
+          </shortcut>
+          <guimenu>File</guimenu>
+          <guimenuitem>Open collection...</guimenuitem>
+        </menuchoice>
+        dialog and dragging a collection onto the list.
+      </para>
+      <para>
         To edit an item select
         <emphasis role="bold">Properties</emphasis>
         from its context menu. A dialog will appear allowing the Name, Path, and Icon for the item to be changed. Select OK to close the dialog and apply the changes, or Cancel to close the dialog and discard the changes.
--- a/src/shortcuts.c	Sun Sep 10 10:10:47 2017 +0100
+++ b/src/shortcuts.c	Sun Sep 10 10:57:20 2017 +0100
@@ -22,6 +22,7 @@
 #include "main.h"
 #include "shortcuts.h"
 
+#include "collect.h"
 #include "layout.h"
 #include "utilops.h"
 #include "ui_bookmark.h"
@@ -47,7 +48,15 @@
 {
 	ShortcutsData *scd = data;
 
-	layout_set_path(scd->lw, path);
+	if (file_extension_match(path, GQ_COLLECTION_EXT))
+		{
+		collection_window_new(path);
+		}
+	else
+		{
+		layout_set_path(scd->lw, path);
+		}
+
 }
 
 static void shortcuts_add_close(ShortcutsData *scd)