[gnome-commander] Yet another fix to avoid calling IMAGE_get_pixmap_and_mask() twice when displaying file icons



commit 2274ea1b6b31ee8d6b36f676c1175d006721c2a3
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sat Sep 12 18:54:09 2009 +0200

    Yet another fix to avoid calling IMAGE_get_pixmap_and_mask() twice when displaying file icons

 src/gnome-cmd-file-list.cc |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index 194dbcd..c32377c 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -1482,9 +1482,11 @@ inline void add_file_to_clist (GnomeCmdFileList *fl, GnomeCmdFile *f, gint in_ro
     // If the use wants icons to show file types set it now
     if (gnome_cmd_data.layout != GNOME_CMD_LAYOUT_TEXT)
     {
-        gtk_clist_set_pixmap (clist, row, 0,
-                              gnome_cmd_file_get_type_pixmap (f),
-                              gnome_cmd_file_get_type_mask (f));
+        GdkPixmap *pixmap;
+        GdkBitmap *mask;
+
+        if (gnome_cmd_file_get_type_pixmap_and_mask (f, &pixmap, &mask))
+            gtk_clist_set_pixmap (clist, row, 0, pixmap, mask);
     }
 
     // If we have been waiting for this file to show up, focus it



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]