[Xfce4-commits] <ristretto:master> Update ChangeLog Add sort_on_exif_date skeleton-code Fix typo in accelerator for rotate-left
Stephan Arts
stephan at xfce.org
Thu Sep 3 23:50:03 CEST 2009
Updating branch refs/heads/master
to 173a23b410e0bb5737bb736c816a5d9d2b164d12 (commit)
from 99225225b34039abe5d69041ba1483d25ef5686e (commit)
commit 173a23b410e0bb5737bb736c816a5d9d2b164d12
Author: Stephan Arts <stephan at xfce.org>
Date: Thu Sep 3 20:00:15 2009 +0200
Update ChangeLog
Add sort_on_exif_date skeleton-code
Fix typo in accelerator for rotate-left
ChangeLog | 35 ++++++++++++++++++++++++++
src/image_list.c | 70 +++++++++++++++++++++++++++++++++++-----------------
src/main_window.c | 2 +-
3 files changed, 83 insertions(+), 24 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6c94d6b..fe70b4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,38 @@
+2009-09-03 Stephan Arts <stephan at xfce.org>
+
+ * src/main_window.c: Fix typo in default accelerator of Rotate-Left
+ * src/image_list.c: Add skeleton-code for sorting on exif-date
+
+2009-09-01 Stephan Arts <stephan at xfce.org>
+
+ * src/main_window.c: Store navigationbar position in xfconf
+
+2009-09-01 Stephan Arts <stephan at xfce.org>
+
+ * src/main_window.c: Improve fullscreen behaviour
+
+2009-08-30 Stephan Arts <stephan at xfce.org>
+
+ * src/main_window.c: Add popup to change the location of the navigationbar
+ and thumbnailbar
+
+2009-08-30 Stephan Arts <stephan at xfce.org>
+
+ * src/main_window.c: Place navigation-bar and thumbnailbar next to eachother.
+
+2009-08-30 Stephan Arts <stephan at xfce.org>
+
+ * src/main_window.c: Improve UI-sensitivity, do not make navigation-buttons and
+ slideshow buttons sensitive when only one image is opened.
+
+2009-08-30 Stephan Arts <stephan at xfce.org>
+
+ * src/main_window.c: Toggle visibility of Thumbnailbar.
+
+2009-08-30 Stephan Arts <stephan at xfce.org>
+
+ * src/main_window.c: Fix errors when the ristretto icon is not available
+
2009-08-12 Stephan Arts <stephan at xfce.org>
* ChangeLog: Merge with private branch
diff --git a/src/image_list.c b/src/image_list.c
index f1c1110..689733e 100644
--- a/src/image_list.c
+++ b/src/image_list.c
@@ -46,6 +46,8 @@ static RsttoImageListIter * rstto_image_list_iter_new ();
static gint
cb_rstto_image_list_image_name_compare_func (RsttoImage *a, RsttoImage *b);
+static gint
+cb_rstto_image_list_exif_date_compare_func (RsttoImage *a, RsttoImage *b);
static GObjectClass *parent_class = NULL;
static GObjectClass *iter_parent_class = NULL;
@@ -76,6 +78,7 @@ struct _RsttoImageListPriv
gint n_images;
GSList *iterators;
+ GCompareFunc cb_rstto_image_list_compare_func;
};
static gint rstto_image_list_signals[RSTTO_IMAGE_LIST_SIGNAL_COUNT];
@@ -111,6 +114,7 @@ static void
rstto_image_list_init(RsttoImageList *image_list)
{
image_list->priv = g_new0 (RsttoImageListPriv, 1);
+ image_list->priv->cb_rstto_image_list_compare_func = (GCompareFunc)cb_rstto_image_list_image_name_compare_func;
}
static void
@@ -180,7 +184,7 @@ rstto_image_list_add_file (RsttoImageList *image_list, GFile *file, GError **err
RsttoImage *image = rstto_image_new (file);
if (image)
{
- image_list->priv->images = g_list_insert_sorted (image_list->priv->images, image, (GCompareFunc)cb_rstto_image_list_image_name_compare_func);
+ image_list->priv->images = g_list_insert_sorted (image_list->priv->images, image, rstto_image_list_get_compare_func (image_list));
image_list->priv->n_images++;
g_signal_emit (G_OBJECT (image_list), rstto_image_list_signals[RSTTO_IMAGE_LIST_SIGNAL_NEW_IMAGE], 0, image, NULL);
@@ -270,27 +274,6 @@ rstto_image_list_remove_all (RsttoImageList *image_list)
}
-/**
- * cb_rstto_image_list_image_name_compare_func:
- * @a:
- * @b:
- *
- *
- * Return value: (see strcmp)
- */
-static gint
-cb_rstto_image_list_image_name_compare_func (RsttoImage *a, RsttoImage *b)
-{
- gchar *a_base = g_file_get_basename (rstto_image_get_file (a));
- gchar *b_base = g_file_get_basename (rstto_image_get_file (b));
- gint result = 0;
-
- result = g_strcasecmp (a_base, b_base);
-
- g_free (a_base);
- g_free (b_base);
- return result;
-}
GType
rstto_image_list_iter_get_type (void)
@@ -485,5 +468,46 @@ rstto_image_list_iter_clone (RsttoImageListIter *iter)
GCompareFunc
rstto_image_list_get_compare_func (RsttoImageList *image_list)
{
- return (GCompareFunc)cb_rstto_image_list_image_name_compare_func;
+ return (GCompareFunc)image_list->priv->cb_rstto_image_list_compare_func;
+}
+
+/***********************/
+/* Compare Functions */
+/***********************/
+
+/**
+ * cb_rstto_image_list_image_name_compare_func:
+ * @a:
+ * @b:
+ *
+ *
+ * Return value: (see strcmp)
+ */
+static gint
+cb_rstto_image_list_image_name_compare_func (RsttoImage *a, RsttoImage *b)
+{
+ gchar *a_base = g_file_get_basename (rstto_image_get_file (a));
+ gchar *b_base = g_file_get_basename (rstto_image_get_file (b));
+ gint result = 0;
+
+ result = g_strcasecmp (a_base, b_base);
+
+ g_free (a_base);
+ g_free (b_base);
+ return result;
+}
+
+/**
+ * cb_rstto_image_list_exif_date_compare_func:
+ * @a:
+ * @b:
+ *
+ *
+ * Return value: (see strcmp)
+ */
+static gint
+cb_rstto_image_list_exif_date_compare_func (RsttoImage *a, RsttoImage *b)
+{
+ gint result = 0;
+ return result;
}
diff --git a/src/main_window.c b/src/main_window.c
index 0a6f1d8..fd1b77d 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -285,7 +285,7 @@ static GtkActionEntry action_entries[] =
/* Rotation submenu */
{ "rotation-menu", NULL, N_ ("_Rotation"), NULL, },
{ "rotate-cw", "object-rotate-right", N_ ("Rotate _Right"), "<control>bracketright", NULL, G_CALLBACK (cb_rstto_main_window_rotate_cw), },
- { "rotate-ccw", "object-rotate-left", N_ ("Rotate _Left"), "<contron>bracketleft", NULL, G_CALLBACK (cb_rstto_main_window_rotate_ccw), },
+ { "rotate-ccw", "object-rotate-left", N_ ("Rotate _Left"), "<control>bracketleft", NULL, G_CALLBACK (cb_rstto_main_window_rotate_ccw), },
/* Go Menu */
{ "go-menu", NULL, N_ ("_Go"), NULL, },
{ "forward", GTK_STOCK_GO_FORWARD, N_ ("_Forward"), "space", NULL, G_CALLBACK (cb_rstto_main_window_next_image), },
More information about the Xfce4-commits
mailing list