Hi,
The attached patch adds the ability to see all prioritized images in a
single window.
This makes it easier to batch export all prioritized images with a
single click.
Hope you like it.
Best regards,
Teodor
Index: src/rs-photo.h
===================================================================
--- src/rs-photo.h (revision 4313)
+++ src/rs-photo.h (working copy)
@@ -45,6 +45,7 @@
PRIO_1 = 1,
PRIO_2 = 2,
PRIO_3 = 3,
+ PRIO_S = 41,
PRIO_ALL = 255
};
Index: src/rs-store.c
===================================================================
--- src/rs-store.c (revision 4313)
+++ src/rs-store.c (working copy)
@@ -44,7 +44,7 @@
#endif
/* How many different icon views do we have (tabs) */
-#define NUM_VIEWS 6
+#define NUM_VIEWS 7
#define GROUP_XML_FILE "groups.xml"
@@ -134,8 +134,8 @@
static GList *all_stores = NULL;
/* Priorities to show */
-const static guint priorities[NUM_VIEWS] = {PRIO_ALL, PRIO_1, PRIO_2, PRIO_3, PRIO_U, PRIO_D};
-#if NUM_VIEWS != 6
+const static guint priorities[NUM_VIEWS] = {PRIO_ALL, PRIO_S, PRIO_1, PRIO_2, PRIO_3, PRIO_U, PRIO_D};
+#if NUM_VIEWS != 7
#error This must be updated
#endif
@@ -297,27 +297,31 @@
g_sprintf(label_text[n], _("* <small>(%d)</small>"), 0);
label_tt[n] = gui_tooltip_no_window(store->label[n], _("All photos (excluding deleted)"), NULL);
break;
- case 1: /* 1 */
+ case 1: /* Sorted */
+ g_sprintf(label_text[n], _("S <small>(%d)</small>"), 0);
+ label_tt[n] = gui_tooltip_no_window(store->label[n], _("Prioritized photos"), NULL);
+ break;
+ case 2: /* 1 */
g_sprintf(label_text[n], _("1 <small>(%d)</small>"), 0);
label_tt[n] = gui_tooltip_no_window(store->label[n], _("Priority 1 photos"), NULL);
break;
- case 2: /* 2 */
+ case 3: /* 2 */
g_sprintf(label_text[n], _("2 <small>(%d)</small>"), 0);
label_tt[n] = gui_tooltip_no_window(store->label[n], _("Priority 2 photos"), NULL);
break;
- case 3: /* 3 */
+ case 4: /* 3 */
g_sprintf(label_text[n], _("3 <small>(%d)</small>"), 0);
label_tt[n] = gui_tooltip_no_window(store->label[n], _("Priority 3 photos"), NULL);
break;
- case 4: /* Unsorted */
+ case 5: /* Unsorted */
g_sprintf(label_text[n], _("U <small>(%d)</small>"), 0);
label_tt[n] = gui_tooltip_no_window(store->label[n], _("Unprioritized photos"), NULL);
break;
- case 5: /* Deleted */
+ case 6: /* Deleted */
g_sprintf(label_text[n], _("D <small>(%d)</small>"), 0);
label_tt[n] = gui_tooltip_no_window(store->label[n], _("Deleted photos"), NULL);
break;
-#if NUM_VIEWS != 6
+#if NUM_VIEWS != 7
#error You need to update this switch statement
#endif
}
@@ -812,6 +816,18 @@
return(TRUE);
break;
}
+ case PRIO_S:
+ switch (p)
+ {
+ case PRIO_1:
+ case PRIO_2:
+ case PRIO_3:
+ return(TRUE);
+ break;
+ default:
+ return(FALSE);
+ break;
+ }
default:
if (prio==p) return(TRUE);
break;
@@ -970,6 +986,7 @@
gint count_3 = 0;
gint count_u = 0;
gint count_d = 0;
+ gint count_s = 0;
gint count_all;
gchar label_text[NUM_VIEWS][63];
gint i;
@@ -1005,14 +1022,17 @@
}
gtk_tree_path_free(path);
- count_all = count_1+count_2+count_3+count_u;
- g_sprintf(label_text[0], _("* <small>(%d)</small>"), count_all);
- g_sprintf(label_text[1], _("1 <small>(%d)</small>"), count_1);
- g_sprintf(label_text[2], _("2 <small>(%d)</small>"), count_2);
- g_sprintf(label_text[3], _("3 <small>(%d)</small>"), count_3);
- g_sprintf(label_text[4], _("U <small>(%d)</small>"), count_u);
- g_sprintf(label_text[5], _("D <small>(%d)</small>"), count_d);
-#if NUM_VIEWS != 6
+ count_s = count_1+count_2+count_3;
+ count_all = count_s+count_u;
+ i=0;
+ g_sprintf(label_text[i++], _("* <small>(%d)</small>"), count_all);
+ g_sprintf(label_text[i++], _("S <small>(%d)</small>"), count_s);
+ g_sprintf(label_text[i++], _("1 <small>(%d)</small>"), count_1);
+ g_sprintf(label_text[i++], _("2 <small>(%d)</small>"), count_2);
+ g_sprintf(label_text[i++], _("3 <small>(%d)</small>"), count_3);
+ g_sprintf(label_text[i++], _("U <small>(%d)</small>"), count_u);
+ g_sprintf(label_text[i++], _("D <small>(%d)</small>"), count_d);
+#if NUM_VIEWS != 7
#error Update this accordingly
#endif
@@ -1389,6 +1409,7 @@
gboolean load_8bit = FALSE;
gboolean load_recursive = DEFAULT_CONF_LOAD_RECURSIVE;
gint items=0, n;
+ gint i;
g_return_val_if_fail(RS_IS_STORE(store), -1);
if (!path)
@@ -1422,12 +1443,13 @@
gtk_tree_sortable_set_sort_column_id(sortable, GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID, GTK_SORT_ASCENDING);
g_atomic_int_set(&store->jobs_to_do, 0);
- gtk_label_set_markup(GTK_LABEL(store->label[0]), _("* <small>(-)</small>"));
- gtk_label_set_markup(GTK_LABEL(store->label[1]), _("1 <small>(-)</small>"));
- gtk_label_set_markup(GTK_LABEL(store->label[2]), _("2 <small>(-)</small>"));
- gtk_label_set_markup(GTK_LABEL(store->label[3]), _("3 <small>(-)</small>"));
- gtk_label_set_markup(GTK_LABEL(store->label[4]), _("U <small>(-)</small>"));
- gtk_label_set_markup(GTK_LABEL(store->label[5]), _("D <small>(-)</small>"));
+ gtk_label_set_markup(GTK_LABEL(store->label[i++]), _("* <small>(-)</small>"));
+ gtk_label_set_markup(GTK_LABEL(store->label[i++]), _("S <small>(-)</small>"));
+ gtk_label_set_markup(GTK_LABEL(store->label[i++]), _("1 <small>(-)</small>"));
+ gtk_label_set_markup(GTK_LABEL(store->label[i++]), _("2 <small>(-)</small>"));
+ gtk_label_set_markup(GTK_LABEL(store->label[i++]), _("3 <small>(-)</small>"));
+ gtk_label_set_markup(GTK_LABEL(store->label[i++]), _("U <small>(-)</small>"));
+ gtk_label_set_markup(GTK_LABEL(store->label[i++]), _("D <small>(-)</small>"));
g_signal_handler_block(store->store, store->counthandler);
store->counter_blocked = TRUE;
@@ -1443,7 +1465,7 @@
/* Sort the store */
rs_store_set_sort_method(store, store->sort_method);
- /* set model for all 6 iconviews */
+ /* set model for all 7 iconviews */
for(n=0;n<NUM_VIEWS;n++)
{
GtkTreeModel *tree;
_______________________________________________
Rawstudio-dev mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev