[Xfce4-commits] [xfce/xfdesktop] 19/34: Trivial: Fix some compiler warnings

noreply at xfce.org noreply at xfce.org
Sun Apr 16 07:06:53 CEST 2017


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

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

commit 8eb53bcdf6da45a9ca5cd17634ce286c6cb9382c
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Fri Mar 3 09:01:14 2017 +0300

    Trivial: Fix some compiler warnings
---
 src/xfdesktop-icon-view.c | 29 +++--------------------------
 1 file changed, 3 insertions(+), 26 deletions(-)

diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index 59b7f11..0705cb7 100644
--- a/src/xfdesktop-icon-view.c
+++ b/src/xfdesktop-icon-view.c
@@ -1585,32 +1585,6 @@ xfdesktop_icon_view_drag_motion(GtkWidget *widget,
     return TRUE;
 }
 
-static gint
-xfdesktop_icon_view_compare_icon_positions(gconstpointer *a,
-                                           gconstpointer *b)
-{
-    XfdesktopIcon *a_icon, *b_icon;
-    gint16 a_row, a_col, b_row, b_col;
-
-    a_icon = XFDESKTOP_ICON(a);
-    b_icon = XFDESKTOP_ICON(b);
-
-    if(!xfdesktop_icon_get_position(a_icon, &a_row, &a_col))
-        return 0;
-    if(!xfdesktop_icon_get_position(b_icon, &b_row, &b_col))
-        return 0;
-
-    if(a_col == b_col) {
-        if(a_row < b_row)
-            return -1;
-        else
-            return 1;
-    } else if(a_col < b_col)
-        return -1;
-    else
-        return 1;
-}
-
 static gboolean
 xfdesktop_icon_view_drag_drop(GtkWidget *widget,
                               GdkDragContext *context,
@@ -1692,6 +1666,9 @@ xfdesktop_icon_view_drag_drop(GtkWidget *widget,
         if(xfdesktop_icon_get_position(icon, &old_row, &old_col)) {
             offset_col = old_col-col;
             offset_row = old_row-row;
+        } else {
+            offset_col = 0;
+            offset_row = 0;
         }
 
         for(l = icon_view->priv->selected_icons; l; l = l->next) {

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


More information about the Xfce4-commits mailing list