[gnome-bluetooth/wip/hadess/use-alias: 3/5] settings-widget: Sort by alias rather than by name
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/use-alias: 3/5] settings-widget: Sort by alias rather than by name
- Date: Wed, 9 Dec 2020 14:40:49 +0000 (UTC)
commit 3a09aefc44320b1c5ddf2cbdb65b5b4c8c705a94
Author: Bastien Nocera <hadess hadess net>
Date: Wed Dec 9 15:25:53 2020 +0100
settings-widget: Sort by alias rather than by name
lib/bluetooth-settings-widget.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/lib/bluetooth-settings-widget.c b/lib/bluetooth-settings-widget.c
index 74f82cc0..6d224114 100644
--- a/lib/bluetooth-settings-widget.c
+++ b/lib/bluetooth-settings-widget.c
@@ -1406,20 +1406,20 @@ device_sort_func (gconstpointer a, gconstpointer b, gpointer data)
gboolean paired_a, paired_b;
gboolean trusted_a, trusted_b;
gboolean connected_a, connected_b;
- g_autofree char *name_a = NULL;
- g_autofree char *name_b = NULL;
+ g_autofree char *alias_a = NULL;
+ g_autofree char *alias_b = NULL;
g_object_get (row_a,
"paired", &paired_a,
"trusted", &trusted_a,
"connected", &connected_a,
- "name", &name_a,
+ "alias", &alias_a,
NULL);
g_object_get (row_b,
"paired", &paired_b,
"trusted", &trusted_b,
"connected", &connected_b,
- "name", &name_b,
+ "alias", &alias_b,
NULL);
/* First, paired or trusted devices (setup devices) */
@@ -1440,13 +1440,13 @@ device_sort_func (gconstpointer a, gconstpointer b, gpointer data)
return 1;
}
- if (name_a == NULL)
+ if (alias_a == NULL)
return 1;
- if (name_b == NULL)
+ if (alias_b == NULL)
return -1;
/* And all being equal, alphabetically */
- return g_utf8_collate (name_a, name_b);
+ return g_utf8_collate (alias_a, alias_b);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]