<guilabel>Size</guilabel>\r
</term>\r
<listitem>\r
- <para>Image are sorted by file size on disk.</para>\r
+ <para>Images are sorted by file size on disk.</para>\r
+ </listitem>\r
+ </varlistentry>\r
+ <varlistentry>\r
+ <term>\r
+ <guilabel>Rating</guilabel>\r
+ </term>\r
+ <listitem>\r
+ <para>Image are sorted by Xmp.xmp.Rating.</para>\r
+ </listitem>\r
+ </varlistentry>\r
+ <varlistentry>\r
+ <term>\r
+ <guilabel>Class</guilabel>\r
+ </term>\r
+ <listitem>\r
+ <para>Image are sorted by class. The class types, and sort order, is:</para>\r
+ <itemizedlist>\r
+ <listitem>Unknown</listitem>\r
+ <listitem>Image</listitem>\r
+ <listitem>Raw Image</listitem>\r
+ <listitem>Video</listitem>\r
+ <listitem>Metadata</listitem>\r
+ </itemizedlist>\r
</listitem>\r
</varlistentry>\r
<varlistentry>\r
</listitem>\r
</varlistentry>\r
</variablelist>\r
- <para />\r
+ <note>When images have equal rank, for example in rating or class sorts, within each section images will be sorted by filename.</note>\r
</section>\r
<section id="Filelist">\r
<title>File list</title>\r
case SORT_RATING:
return _("Sort by rating");
break;
+ case SORT_CLASS:
+ return _("Sort by class");
+ break;
case SORT_NAME:
default:
return _("Sort by name");
submenu_add_sort_item(submenu, func, SORT_EXIFTIME, show_current, type);
submenu_add_sort_item(submenu, func, SORT_SIZE, show_current, type);
submenu_add_sort_item(submenu, func, SORT_RATING, show_current, type);
+ submenu_add_sort_item(submenu, func, SORT_CLASS, show_current, type);
if (include_path) submenu_add_sort_item(submenu, func, SORT_PATH, show_current, type);
if (include_none) submenu_add_sort_item(submenu, func, SORT_NONE, show_current, type);
GtkWidget *spin_rating;
GtkWidget *spin_rating_end;
+ GtkWidget *check_class;
+ GtkWidget *menu_class;
+ GtkWidget *class_type;
+
FileData *search_dir_fd;
gboolean search_path_recurse;
gchar *search_name;
MatchType match_comment;
MatchType match_rating;
MatchType match_gps;
+ MatchType match_class;
gboolean match_name_enable;
gboolean match_size_enable;
gboolean match_keywords_enable;
gboolean match_comment_enable;
gboolean match_rating_enable;
+ gboolean match_class_enable;
GList *search_folder_list;
GList *search_done_list;
{ N_("greater than"), SEARCH_MATCH_OVER }
};
+static const MatchList text_search_menu_class[] = {
+ { N_("is"), SEARCH_MATCH_EQUAL },
+ { N_("is not"), SEARCH_MATCH_NONE }
+};
+
static GList *search_window_list = NULL;
}
}
+ if (match && sd->match_class_enable)
+ {
+ tested = TRUE;
+ match = FALSE;
+ gint class;
+ FileFormatClass search_class;
+
+ if (g_strcmp0(gtk_combo_box_text_get_active_text(
+ GTK_COMBO_BOX_TEXT(sd->class_type)), _("Image")) == 0)
+ {
+ search_class = FORMAT_CLASS_IMAGE;
+ }
+ else if (g_strcmp0(gtk_combo_box_text_get_active_text(
+ GTK_COMBO_BOX_TEXT(sd->class_type)), _("Raw Image")) == 0)
+ {
+ search_class = FORMAT_CLASS_RAWIMAGE;
+ }
+ else if (g_strcmp0(gtk_combo_box_text_get_active_text(
+ GTK_COMBO_BOX_TEXT(sd->class_type)), _("Video")) == 0)
+ {
+ search_class = FORMAT_CLASS_VIDEO;
+ }
+ else if (g_strcmp0(gtk_combo_box_text_get_active_text(
+ GTK_COMBO_BOX_TEXT(sd->class_type)), _("Metadata")) == 0)
+ {
+ search_class = FORMAT_CLASS_META;
+ }
+ else
+ {
+ search_class = FORMAT_CLASS_UNKNOWN;
+ }
+
+ class = fd->format_class;
+ if (sd->match_class == SEARCH_MATCH_EQUAL)
+ {
+ match = (class == search_class);
+ }
+ else if (sd->match_class == SEARCH_MATCH_NONE)
+ {
+ match = (class != search_class);
+ }
+ }
+
if (match && sd->match_gps_enable)
{
/* Calculate the distance the image is from the specified origin.
(sd->match_rating == SEARCH_MATCH_BETWEEN));
}
+static void menu_choice_class_cb(GtkWidget *combo, gpointer data)
+{
+ SearchData *sd = data;
+
+ if (!menu_choice_get_match_type(combo, &sd->match_class)) return;
+}
+
static void menu_choice_date_cb(GtkWidget *combo, gpointer data)
{
SearchData *sd = data;
sd->match_keywords = SEARCH_MATCH_ALL;
sd->match_comment = SEARCH_MATCH_CONTAINS;
sd->match_rating = SEARCH_MATCH_EQUAL;
+ sd->match_class = SEARCH_MATCH_EQUAL;
sd->match_name_enable = TRUE;
gtk_widget_show(sd->entry_gps_coord);
+ /* Search for image class */
+ hbox = menu_choice(sd->box_search, &sd->check_class, &sd->menu_class,
+ _("Image class"), &sd->match_class_enable,
+ text_search_menu_class, sizeof(text_search_menu_class) / sizeof(MatchList),
+ G_CALLBACK(menu_choice_class_cb), sd);
+
+ sd->class_type = gtk_combo_box_text_new();
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(sd->class_type), _("Image"));
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(sd->class_type), _("Raw Image"));
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(sd->class_type), _("Video"));
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(sd->class_type), _("Metadata"));
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(sd->class_type), _("Unknown"));
+ gtk_box_pack_start(GTK_BOX(hbox), sd->class_type, FALSE, FALSE, 0);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(sd->class_type), 0);
+ gtk_widget_show(sd->class_type);
+
/* Done the types of searches */
scrolled = gtk_scrolled_window_new(NULL, NULL);
<span class="guilabel">Size</span>
</dt>
<dd>
- <p class="para block block-first">Image are sorted by file size on disk.</p>
+ <p class="para block block-first">Images are sorted by file size on disk.</p>
+ </dd>
+<dt class="term">
+ <span class="guilabel">Rating</span>
+ </dt>
+<dd>
+ <p class="para block block-first">Image are sorted by Xmp.xmp.Rating.</p>
+ </dd>
+<dt class="term">
+ <span class="guilabel">Class</span>
+ </dt>
+<dd>
+ <p class="para block block-first">Image are sorted by class. The class types, and sort order, is:</p>
+ <div class="block list itemizedlist"><ul class="itemizedlist">
+<li class="li-first">Unknown</li>
+<li>Image</li>
+<li>Raw Image</li>
+<li>Video</li>
+<li>Metadata</li>
+</ul></div>
</dd>
<dt class="term">
<span class="guilabel">Ascending</span>
<p class="para block block-first">Toggles between increasing and decreasing sort order. A check will appear next to this entry to indicate ascending sort order.</p>
</dd>
</dl></div>
-<p class="para block"></p>
+<div class="admonition block note block-indent"><div class="note-inner">When images have equal rank, for example in rating or class sorts, within each section images will be sorted by filename.</div></div>
</div>
<div class="division section">
<a name="Filelist"></a><div class="header"><h2 class="section title"><span class="title"><span class="label">2.6.3. </span>File list</span></h2></div>