public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Sort devices by type in the treeviews
@ 2008-10-26 12:39 Bastien Nocera
  2008-10-27 19:45 ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien Nocera @ 2008-10-26 12:39 UTC (permalink / raw)
  To: BlueZ development

[-- Attachment #1: Type: text/plain, Size: 96 bytes --]

Sorting by RSSI means that the devices just around in the treeview
which is painfully annoying.

[-- Attachment #2: 0001-Sort-devices-by-type-in-the-treeviews.patch --]
[-- Type: text/x-patch, Size: 937 bytes --]

>From dcc41434b39493d97cd3ec36d07c8a59ae4f0211 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Sun, 26 Oct 2008 12:36:33 +0000
Subject: [PATCH] Sort devices by type in the treeviews

Sorting by RSSI means that the devices just around in the treeview
which is painfully annoying.
---
 common/helper.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/helper.c b/common/helper.c
index e53d4bc..7335b7f 100644
--- a/common/helper.c
+++ b/common/helper.c
@@ -185,7 +185,7 @@ gchar *show_browse_dialog(void)
 	model = bluetooth_client_get_device_model(client, NULL);
 	sorted = gtk_tree_model_sort_new_with_model(model);
 	gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(sorted),
-				BLUETOOTH_COLUMN_RSSI, GTK_SORT_DESCENDING);
+				BLUETOOTH_COLUMN_TYPE, GTK_SORT_DESCENDING);
 	tree = create_tree(sorted, TRUE);
 	g_object_unref(sorted);
 	g_object_unref(model);
-- 
1.6.0.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Sort devices by type in the treeviews
  2008-10-26 12:39 [PATCH] Sort devices by type in the treeviews Bastien Nocera
@ 2008-10-27 19:45 ` Marcel Holtmann
  2008-10-27 19:56   ` Bastien Nocera
  0 siblings, 1 reply; 4+ messages in thread
From: Marcel Holtmann @ 2008-10-27 19:45 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: BlueZ development

Hi Bastien,

> Sorting by RSSI means that the devices just around in the treeview
> which is painfully annoying.

we want to sort by RSSI to list devices in range first. However we
should extend the sorting to always list already known or paired devices
first. This should stop them from moving around.

If it stil jumps too much for you, then we might just improve the
sorting mechanism to be a little bit more resistance for jumping around,
but sorting by type gives us no advantage.

Regards

Marcel



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Sort devices by type in the treeviews
  2008-10-27 19:45 ` Marcel Holtmann
@ 2008-10-27 19:56   ` Bastien Nocera
  2008-10-27 20:03     ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien Nocera @ 2008-10-27 19:56 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: BlueZ development

On Mon, 2008-10-27 at 20:45 +0100, Marcel Holtmann wrote:
> Hi Bastien,
> 
> > Sorting by RSSI means that the devices just around in the treeview
> > which is painfully annoying.
> 
> we want to sort by RSSI to list devices in range first. However we
> should extend the sorting to always list already known or paired devices
> first. This should stop them from moving around.
> 
> If it stil jumps too much for you, then we might just improve the
> sorting mechanism to be a little bit more resistance for jumping around,
> but sorting by type gives us no advantage.

It certainly jumps around far too much. It flickers tens of times a
second, switching between a phone and the Mac mini just next to it...

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Sort devices by type in the treeviews
  2008-10-27 19:56   ` Bastien Nocera
@ 2008-10-27 20:03     ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2008-10-27 20:03 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: BlueZ development

Hi Bastien,

> > > Sorting by RSSI means that the devices just around in the treeview
> > > which is painfully annoying.
> > 
> > we want to sort by RSSI to list devices in range first. However we
> > should extend the sorting to always list already known or paired devices
> > first. This should stop them from moving around.
> > 
> > If it stil jumps too much for you, then we might just improve the
> > sorting mechanism to be a little bit more resistance for jumping around,
> > but sorting by type gives us no advantage.
> 
> It certainly jumps around far too much. It flickers tens of times a
> second, switching between a phone and the Mac mini just next to it...

then we just need to be smart about it. Meaning we only switch positions
if the RSSI value is a big difference. So that close devices don't jump
that much.

Regards

Marcel



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-27 20:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-26 12:39 [PATCH] Sort devices by type in the treeviews Bastien Nocera
2008-10-27 19:45 ` Marcel Holtmann
2008-10-27 19:56   ` Bastien Nocera
2008-10-27 20:03     ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox