# HG changeset patch # User Colin Clark # Date 1530989431 -3600 # Node ID 2feed80bcd3412833f615bf16f10606e5338c160 # Parent dc7c069a2745290c02a9a9b8337185a2981be6f8 Collections changes Implement a file class for Collections Include an icon for collections (temporary icon until someone creates an appropriate one) Double-click on a .gqv icon in the files pane opens the collection window Option in Preferences/Behavior to open collection windows on top N.B. current users have to manually edit the Collections entry in Preferences/Files to change the collections class from metadata to collection diff -r dc7c069a2745 -r 2feed80bcd34 doc/docbook/GuideOptionsBehavior.xml --- a/doc/docbook/GuideOptionsBehavior.xml Fri Jul 06 19:46:54 2018 +0100 +++ b/doc/docbook/GuideOptionsBehavior.xml Sat Jul 07 19:50:31 2018 +0100 @@ -134,6 +134,22 @@ + Use "With Rename" as default for Copy/Move dialogs + + + Move the "With Rename" button to the default position. + + + + + Open Collections on top + + + Open collection windows with "Always on Top" set. + + + + Recent folder list maximum size diff -r dc7c069a2745 -r 2feed80bcd34 doc/docbook/GuideOptionsFiltering.xml --- a/doc/docbook/GuideOptionsFiltering.xml Fri Jul 06 19:46:54 2018 +0100 +++ b/doc/docbook/GuideOptionsFiltering.xml Sat Jul 07 19:50:31 2018 +0100 @@ -152,12 +152,14 @@ This may be used to define sets of file types, for use in the Grouping - function described above. The drop-down list has 4 entries: + function described above. The drop-down list has 6 entries: Unknown Image RAW Image Metadata + Video + Collection diff -r dc7c069a2745 -r 2feed80bcd34 src/collect.c --- a/src/collect.c Fri Jul 06 19:46:54 2018 +0100 +++ b/src/collect.c Sat Jul 07 19:50:31 2018 +0100 @@ -1288,6 +1288,10 @@ gtk_window_set_geometry_hints(GTK_WINDOW(cw->window), NULL, &geometry, GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE); + if (options->collections_on_top) + { + gtk_window_set_keep_above(GTK_WINDOW(cw->window), TRUE); + } if (options->save_window_positions && path && collection_load_only_geometry(cw->cd, path)) { diff -r dc7c069a2745 -r 2feed80bcd34 src/filefilter.c --- a/src/filefilter.c Fri Jul 06 19:46:54 2018 +0100 +++ b/src/filefilter.c Sat Jul 07 19:50:31 2018 +0100 @@ -254,7 +254,7 @@ /* non-image files that might be desirable to show */ filter_add_if_missing("xmp", "XMP sidecar", ".xmp", FORMAT_CLASS_META, TRUE, FALSE, TRUE); filter_add_if_missing("meta", "GQview legacy metadata", GQ_CACHE_EXT_METADATA, FORMAT_CLASS_META, TRUE, FALSE, TRUE); - filter_add_if_missing("gqv", GQ_APPNAME " image collection", GQ_COLLECTION_EXT, FORMAT_CLASS_META, FALSE, FALSE, TRUE); + filter_add_if_missing("gqv", GQ_APPNAME " image collection", GQ_COLLECTION_EXT, FORMAT_CLASS_COLLECTION, FALSE, FALSE, TRUE); filter_add_if_missing("ufraw", "UFRaw ID file", ".ufraw", FORMAT_CLASS_META, FALSE, FALSE, TRUE); filter_add_if_missing("pto", "Panorama script file", ".pto", FORMAT_CLASS_META, FALSE, FALSE, TRUE); @@ -469,6 +469,7 @@ if (filter_file_class(name, FORMAT_CLASS_RAWIMAGE)) return FORMAT_CLASS_RAWIMAGE; if (filter_file_class(name, FORMAT_CLASS_META)) return FORMAT_CLASS_META; if (filter_file_class(name, FORMAT_CLASS_VIDEO)) return FORMAT_CLASS_VIDEO; + if (filter_file_class(name, FORMAT_CLASS_COLLECTION)) return FORMAT_CLASS_COLLECTION; return FORMAT_CLASS_UNKNOWN; } diff -r dc7c069a2745 -r 2feed80bcd34 src/icons/Makefile.am --- a/src/icons/Makefile.am Fri Jul 06 19:46:54 2018 +0100 +++ b/src/icons/Makefile.am Sat Jul 07 19:50:31 2018 +0100 @@ -15,6 +15,7 @@ sheet_metadata.png \ sheet_unknown.png \ sheet_video.png \ + collection.png \ icon_float.png \ icon_thumb.png \ icon_book.png \ @@ -36,6 +37,7 @@ icon_metadata $(srcdir)/sheet_metadata.png \ icon_unknown $(srcdir)/sheet_unknown.png \ icon_video $(srcdir)/sheet_video.png \ + icon_collection $(srcdir)/collection.png \ icon_book $(srcdir)/icon_book.png \ icon_config $(srcdir)/icon_config.png \ icon_tools $(srcdir)/icon_tools.png \ diff -r dc7c069a2745 -r 2feed80bcd34 src/icons/collection.png Binary file src/icons/collection.png has changed diff -r dc7c069a2745 -r 2feed80bcd34 src/image.c --- a/src/image.c Fri Jul 06 19:46:54 2018 +0100 +++ b/src/image.c Sat Jul 07 19:50:31 2018 +0100 @@ -697,6 +697,8 @@ break; case FORMAT_CLASS_VIDEO: pixbuf = pixbuf_inline(PIXBUF_INLINE_VIDEO); + case FORMAT_CLASS_COLLECTION: + pixbuf = pixbuf_inline(PIXBUF_INLINE_COLLECTION); break; default: pixbuf = pixbuf_inline(PIXBUF_INLINE_BROKEN); diff -r dc7c069a2745 -r 2feed80bcd34 src/options.c --- a/src/options.c Fri Jul 06 19:46:54 2018 +0100 +++ b/src/options.c Sat Jul 07 19:50:31 2018 +0100 @@ -83,6 +83,7 @@ options->marks_save = TRUE; options->with_rename = FALSE; + options->collections_on_top = FALSE; memset(&options->image.border_color, 0, sizeof(options->image.border_color)); memset(&options->image.alpha_color_1, 0, sizeof(options->image.alpha_color_1)); diff -r dc7c069a2745 -r 2feed80bcd34 src/options.h --- a/src/options.h Fri Jul 06 19:46:54 2018 +0100 +++ b/src/options.h Sat Jul 07 19:50:31 2018 +0100 @@ -66,6 +66,7 @@ gchar *marks_tooltips[FILEDATA_MARKS_SIZE]; gboolean with_rename; + gboolean collections_on_top; gchar *help_search_engine; diff -r dc7c069a2745 -r 2feed80bcd34 src/pixbuf_util.c --- a/src/pixbuf_util.c Fri Jul 06 19:46:54 2018 +0100 +++ b/src/pixbuf_util.c Sat Jul 07 19:50:31 2018 +0100 @@ -111,6 +111,7 @@ { PIXBUF_INLINE_METADATA, icon_metadata }, { PIXBUF_INLINE_UNKNOWN, icon_unknown }, { PIXBUF_INLINE_VIDEO, icon_video }, + { PIXBUF_INLINE_COLLECTION, icon_collection }, { PIXBUF_INLINE_ICON, gqview_icon }, { PIXBUF_INLINE_LOGO, geeqie_logo }, { PIXBUF_INLINE_ICON_FLOAT, icon_float }, @@ -254,6 +255,9 @@ case FORMAT_CLASS_VIDEO: pixbuf = pixbuf_inline(PIXBUF_INLINE_VIDEO); break; + case FORMAT_CLASS_COLLECTION: + pixbuf = pixbuf_inline(PIXBUF_INLINE_COLLECTION); + break; default: pixbuf = pixbuf_inline(PIXBUF_INLINE_BROKEN); } diff -r dc7c069a2745 -r 2feed80bcd34 src/pixbuf_util.h --- a/src/pixbuf_util.h Fri Jul 06 19:46:54 2018 +0100 +++ b/src/pixbuf_util.h Sat Jul 07 19:50:31 2018 +0100 @@ -43,6 +43,7 @@ #define PIXBUF_INLINE_METADATA "metadata" #define PIXBUF_INLINE_UNKNOWN "unknown" #define PIXBUF_INLINE_VIDEO "video" +#define PIXBUF_INLINE_COLLECTION "collection" #define PIXBUF_INLINE_ICON "icon" #define PIXBUF_INLINE_LOGO "logo" diff -r dc7c069a2745 -r 2feed80bcd34 src/preferences.c --- a/src/preferences.c Fri Jul 06 19:46:54 2018 +0100 +++ b/src/preferences.c Sat Jul 07 19:50:31 2018 +0100 @@ -109,7 +109,8 @@ N_("Image"), N_("RAW Image"), N_("Metadata"), - N_("Video") + N_("Video"), + N_("Collection") }; /* config memory values */ @@ -410,6 +411,7 @@ options->marks_save = c_options->marks_save; options->with_rename = c_options->with_rename; + options->collections_on_top = c_options->collections_on_top; config_entry_to_option(help_search_engine_entry, &options->help_search_engine, NULL); options->read_metadata_in_idle = c_options->read_metadata_in_idle; @@ -2544,6 +2546,7 @@ GtkWidget *table; GtkWidget *marks; GtkWidget *with_rename; + GtkWidget *collections_on_top; vbox = scrolled_notebook_page(notebook, _("Behavior")); @@ -2605,6 +2608,10 @@ options->with_rename, &c_options->with_rename); gtk_widget_set_tooltip_text(with_rename,"Change the default button for Copy/Move dialogs"); + collections_on_top = pref_checkbox_new_int(group, _("Open collections on top"), + options->collections_on_top, &c_options->collections_on_top); + gtk_widget_set_tooltip_text(collections_on_top,"Open collections window on top"); + pref_spin_new_int(group, _("Recent folder list maximum size"), NULL, 1, 50, 1, options->open_recent_list_maxsize, &c_options->open_recent_list_maxsize); diff -r dc7c069a2745 -r 2feed80bcd34 src/rcfile.c --- a/src/rcfile.c Fri Jul 06 19:46:54 2018 +0100 +++ b/src/rcfile.c Sat Jul 07 19:50:31 2018 +0100 @@ -348,6 +348,7 @@ WRITE_NL(); WRITE_CHAR(*options, help_search_engine); WRITE_NL(); WRITE_BOOL(*options, with_rename); + WRITE_NL(); WRITE_BOOL(*options, collections_on_top); /* File operations Options */ WRITE_NL(); WRITE_BOOL(*options, file_ops.enable_in_place_rename); @@ -681,6 +682,8 @@ if (READ_BOOL(*options, marks_save)) continue; if (READ_CHAR(*options, help_search_engine)) continue; + if (READ_BOOL(*options, collections_on_top)) continue; + /* Properties dialog options */ if (READ_CHAR(*options, properties.tabs_order)) continue; diff -r dc7c069a2745 -r 2feed80bcd34 src/typedefs.h --- a/src/typedefs.h Fri Jul 06 19:46:54 2018 +0100 +++ b/src/typedefs.h Sat Jul 07 19:50:31 2018 +0100 @@ -143,6 +143,7 @@ FORMAT_CLASS_RAWIMAGE, FORMAT_CLASS_META, FORMAT_CLASS_VIDEO, + FORMAT_CLASS_COLLECTION, FILE_FORMAT_CLASSES } FileFormatClass; diff -r dc7c069a2745 -r 2feed80bcd34 src/view_file/view_file_icon.c --- a/src/view_file/view_file_icon.c Fri Jul 06 19:46:54 2018 +0100 +++ b/src/view_file/view_file_icon.c Sat Jul 07 19:50:31 2018 +0100 @@ -1367,8 +1367,15 @@ if (bevent->type == GDK_2BUTTON_PRESS && vf->layout) { - vficon_selection_remove(vf, VFICON(vf)->click_fd, SELECTION_PRELIGHT, &iter); - layout_image_full_screen_start(vf->layout); + if (VFICON(vf)->click_fd->format_class == FORMAT_CLASS_COLLECTION) + { + collection_window_new(VFICON(vf)->click_fd->path); + } + else + { + vficon_selection_remove(vf, VFICON(vf)->click_fd, SELECTION_PRELIGHT, &iter); + layout_image_full_screen_start(vf->layout); + } } break; case MOUSE_BUTTON_RIGHT: diff -r dc7c069a2745 -r 2feed80bcd34 src/view_file/view_file_list.c --- a/src/view_file/view_file_list.c Fri Jul 06 19:46:54 2018 +0100 +++ b/src/view_file/view_file_list.c Sat Jul 07 19:50:31 2018 +0100 @@ -24,6 +24,7 @@ #include "bar.h" #include "cache_maint.h" +#include "collect.h" #include "dnd.h" #include "editors.h" #include "img-view.h" @@ -39,6 +40,7 @@ #include "uri_utils.h" #include "view_file.h" + #include /* for keyboard values */ /* Index to tree store */ @@ -644,7 +646,14 @@ if (bevent->button == MOUSE_BUTTON_LEFT && bevent->type == GDK_2BUTTON_PRESS) { - if (vf->layout) layout_image_full_screen_start(vf->layout); + if (VFLIST(vf)->click_fd->format_class == FORMAT_CLASS_COLLECTION) + { + collection_window_new(VFLIST(vf)->click_fd->path); + } + else + { + if (vf->layout) layout_image_full_screen_start(vf->layout); + } } return FALSE; diff -r dc7c069a2745 -r 2feed80bcd34 web/help/GuideOptionsBehavior.html --- a/web/help/GuideOptionsBehavior.html Fri Jul 06 19:46:54 2018 +0100 +++ b/web/help/GuideOptionsBehavior.html Sat Jul 07 19:50:31 2018 +0100 @@ -580,6 +580,18 @@

Save all marks that have been set. Note that marks that are linked to a keyword will always be saved irrespective of this setting.

+ Use "With Rename" as default for Copy/Move dialogs +
+
+

Move the "With Rename" button to the default position.

+
+
+ Open Collections on top +
+
+

Open collection windows with "Always on Top" set.

+
+
Recent folder list maximum size
diff -r dc7c069a2745 -r 2feed80bcd34 web/help/GuideOptionsFiltering.html --- a/web/help/GuideOptionsFiltering.html Fri Jul 06 19:46:54 2018 +0100 +++ b/web/help/GuideOptionsFiltering.html Sat Jul 07 19:50:31 2018 +0100 @@ -593,12 +593,14 @@
This may be used to define sets of file types, for use in the Grouping - function described above. The drop-down list has 4 entries: + function described above. The drop-down list has 6 entries:
  • Unknown
  • Image
  • RAW Image
  • Metadata
  • +
  • Video
  • +
  • Collection