[Xfce4-commits] <ristretto:master> Reorder thumbnails when the image-sorting changes

Stephan Arts stephan at xfce.org
Fri Sep 4 15:08:03 CEST 2009


Updating branch refs/heads/master
         to 8ede839faf55ce9f538630bdc11bf521e2e52ddf (commit)
       from b318158146c7beeadb5337b2e4d1e8400b5b7473 (commit)

commit 8ede839faf55ce9f538630bdc11bf521e2e52ddf
Author: Stephan Arts <stephan at xfce.org>
Date:   Fri Sep 4 19:55:44 2009 +0200

    Reorder thumbnails when the image-sorting changes

 ChangeLog           |    4 ++++
 src/thumbnail_bar.c |    5 +++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 81f6c09..40f3e97 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-09-04  Stephan Arts <stephan at xfce.org>
 
+	* src/thumbnailbar.c: Reorder thumbnails when the image-sorting changes
+
+2009-09-04  Stephan Arts <stephan at xfce.org>
+
 	* src/main_window.c,
 	  src/main_window_ui.xml: Add popup-menu for the image-viewer
 
diff --git a/src/thumbnail_bar.c b/src/thumbnail_bar.c
index 4901919..fe1d22b 100644
--- a/src/thumbnail_bar.c
+++ b/src/thumbnail_bar.c
@@ -584,6 +584,7 @@ rstto_thumbnail_bar_child_type(GtkContainer *container)
     return GTK_TYPE_WIDGET;
 }
 
+
 static gint
 cb_rstto_thumbnail_bar_compare (GtkWidget *a, GtkWidget *b, gpointer user_data)
 {
@@ -763,6 +764,10 @@ void
 cb_rstto_thumbnail_bar_image_list_iter_changed (RsttoImageListIter *iter, gpointer user_data)
 {
     RsttoThumbnailBar *bar = RSTTO_THUMBNAIL_BAR (user_data);
+
+    bar->priv->thumbs = g_list_sort_with_data (bar->priv->thumbs, (GCompareDataFunc)cb_rstto_thumbnail_bar_compare, bar);
+
+    gtk_widget_queue_resize(GTK_WIDGET(bar));
     /* useless, but keepsthe compiler silent */
     bar->priv->begin=0;
 }



More information about the Xfce4-commits mailing list