[gimp] app: set the device manager's sort_func via g_object_new()



commit c49a7113e5dba2c15853da3c0cc25facc11856cd
Author: Michael Natterer <mitch gimp org>
Date:   Mon Feb 28 15:48:13 2011 +0100

    app: set the device manager's sort_func via g_object_new()
    
    Setting it in init() had it overwritten by NULL because it's a
    construct property.

 app/widgets/gimpdevicemanager.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpdevicemanager.c b/app/widgets/gimpdevicemanager.c
index 6c7a91c..a7d2c46 100644
--- a/app/widgets/gimpdevicemanager.c
+++ b/app/widgets/gimpdevicemanager.c
@@ -119,8 +119,6 @@ gimp_device_manager_class_init (GimpDeviceManagerClass *klass)
 static void
 gimp_device_manager_init (GimpDeviceManager *manager)
 {
-  gimp_list_set_sort_func (GIMP_LIST (manager),
-                           (GCompareFunc) gimp_device_info_compare);
 }
 
 static void
@@ -235,6 +233,7 @@ gimp_device_manager_new (Gimp *gimp)
                        "children-type", GIMP_TYPE_DEVICE_INFO,
                        "policy",        GIMP_CONTAINER_POLICY_STRONG,
                        "unique-names",  FALSE,
+                       "sort-func",     gimp_device_info_compare,
                        NULL);
 }
 



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