[Xfce4-commits] [xfce/xfdesktop] 02/04: Add icon emblems in clockwise order

noreply at xfce.org noreply at xfce.org
Mon Mar 2 14:29:30 CET 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfdesktop.

commit 7cb63ca27a5792a41229758dfa59c36285a769d0
Author: Thaddaeus Tintenfisch <thad.fisch at gmail.com>
Date:   Tue Feb 24 18:57:50 2015 +0100

    Add icon emblems in clockwise order
    
    Signed-off-by: Eric Koegel <eric.koegel at gmail.com>
---
 src/xfdesktop-file-utils.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/xfdesktop-file-utils.c b/src/xfdesktop-file-utils.c
index 8fbd4a7..8494387 100644
--- a/src/xfdesktop-file-utils.c
+++ b/src/xfdesktop-file-utils.c
@@ -467,7 +467,8 @@ xfdesktop_file_utils_add_emblems(GdkPixbuf *pix, GList *emblems)
     /* render up to four emblems for sizes from 48 onwards, else up to 2 emblems */
     max_emblems = (pix_height < 48 && pix_width < 48) ? 2 : 4;
 
-    for(iter = emblems, position = 0; iter != NULL && position < max_emblems; iter = iter->next) {
+    for(iter = g_list_last(emblems), position = 0;
+        iter != NULL && position < max_emblems; iter = iter->prev) {
         /* extract the icon from the emblem and load it */
         GIcon *emblem = g_emblem_get_icon(iter->data);
         GtkIconInfo *icon_info = gtk_icon_theme_lookup_by_gicon(itheme,
@@ -503,13 +504,13 @@ xfdesktop_file_utils_add_emblems(GdkPixbuf *pix, GList *emblems)
                     dest_x = 0;
                     dest_y = dest_height;
                     break;
-                case 2: /* upper right */
+                case 2: /* upper left */
+                    dest_x = dest_y = 0;
+                    break;
+                case 3: /* upper right */
                     dest_x = dest_width;
                     dest_y = 0;
                     break;
-                case 3: /* upper left */
-                    dest_x = dest_y = 0;
-                    break;
                 default:
                     g_warning("Invalid emblem position in xfdesktop_file_utils_add_emblems");
             }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list