[gimp] app: sort present devices to the beginning of the device list
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: sort present devices to the beginning of the device list
- Date: Thu, 9 Dec 2010 21:02:57 +0000 (UTC)
commit 9c98b0b8046bbe4e1bf43e072dcd918f31d7e37b
Author: Michael Natterer <mitch gimp org>
Date: Thu Dec 9 22:02:24 2010 +0100
app: sort present devices to the beginning of the device list
and make sure the core pointer is always first in the list.
app/widgets/gimpdeviceinfo.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpdeviceinfo.c b/app/widgets/gimpdeviceinfo.c
index ee6e8c2..4abbb34 100644
--- a/app/widgets/gimpdeviceinfo.c
+++ b/app/widgets/gimpdeviceinfo.c
@@ -836,14 +836,24 @@ gint
gimp_device_info_compare (GimpDeviceInfo *a,
GimpDeviceInfo *b)
{
- if (a->device && ! b->device)
+ if (a->device && a->display &&
+ a->device == gdk_display_get_core_pointer (a->display))
+ {
+ return -1;
+ }
+ else if (b->device && b->display &&
+ b->device == gdk_display_get_core_pointer (b->display))
{
return 1;
}
- else if (! a->device && b->device)
+ else if (a->device && ! b->device)
{
return -1;
}
+ else if (! a->device && b->device)
+ {
+ return 1;
+ }
else
{
return gimp_object_name_collate ((GimpObject *) a,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]