Add Collections to Shortcuts bar
authorColin Clark <colin.clark@cclark.uk>
Sun, 10 Sep 2017 09:57:20 +0000 (10:57 +0100)
committerColin Clark <colin.clark@cclark.uk>
Sun, 10 Sep 2017 09:57:20 +0000 (10:57 +0100)
doc/docbook/GuideMainWindowFolderPane.xml
src/shortcuts.c

index 10e6fbc..a2bd176 100644 (file)
     </section>\r
     <section id="Shortcutslist">\r
       <title>Shortcuts</title>\r
-      <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>\r
+      <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>\r
       <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>\r
+      <para>\r
+        Collections may be added by opening the\r
+        <menuchoice>\r
+          <shortcut>\r
+            <keycombo>\r
+              <keycap>O</keycap>\r
+            </keycombo>\r
+          </shortcut>\r
+          <guimenu>File</guimenu>\r
+          <guimenuitem>Open collection...</guimenuitem>\r
+        </menuchoice>\r
+        dialog and dragging a collection onto the list.\r
+      </para>\r
       <para>\r
         To edit an item select\r
         <emphasis role="bold">Properties</emphasis>\r
index 5b728fe..fba8831 100644 (file)
@@ -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 @@ static void shortcuts_bookmark_select(const gchar *path, gpointer data)
 {
        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)