public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Don't show (null) in wizard
@ 2008-10-06  6:21 Mario_Limonciello
  2008-10-06  6:25 ` David Woodhouse
  0 siblings, 1 reply; 4+ messages in thread
From: Mario_Limonciello @ 2008-10-06  6:21 UTC (permalink / raw)
  To: linux-bluetooth

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

Hi:

I've noticed that the wizard will show (null) if the device name is not yet recognized when pairing.  This is a bit confusing to the user experience.  The attached patch makes the behavior a little bit better.

Regards

Mario Limonciello 
Dell | Linux Engineering 
Mario_Limonciello@Dell.com 



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 07_null_device_name.patch --]
[-- Type: text/x-patch; name="07_null_device_name.patch", Size: 407 bytes --]

diff -Nur -x '*.orig' -x '*~' bluez-gnome-1.8/wizard/main.c bluez-gnome-1.8.new/wizard/main.c
--- bluez-gnome-1.8/wizard/main.c	2008-10-04 14:32:56.000000000 -0500
+++ bluez-gnome-1.8.new/wizard/main.c	2008-10-06 01:18:54.000000000 -0500
@@ -362,6 +362,8 @@
 		g_free(target_address);
 		target_address = address;
 
+		if (name == NULL)
+			name = "device";
 		g_free(target_name);
 		target_name = name;
 

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

* Re: [PATCH] Don't show (null) in wizard
  2008-10-06  6:21 [PATCH] Don't show (null) in wizard Mario_Limonciello
@ 2008-10-06  6:25 ` David Woodhouse
  2008-10-06  6:43   ` Bastien Nocera
  0 siblings, 1 reply; 4+ messages in thread
From: David Woodhouse @ 2008-10-06  6:25 UTC (permalink / raw)
  To: Mario_Limonciello; +Cc: linux-bluetooth

On Mon, 2008-10-06 at 01:21 -0500, Mario_Limonciello@Dell.com wrote:
> I've noticed that the wizard will show (null) if the device name is
> not yet recognized when pairing.  This is a bit confusing to the user
> experience.  The attached patch makes the behavior a little bit
> better.

Thanks; I noticed that too a couple of days ago but hadn't got round to
the patch yet.

Perhaps showing the bdaddr would be better, though?

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation


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

* Re: [PATCH] Don't show (null) in wizard
  2008-10-06  6:25 ` David Woodhouse
@ 2008-10-06  6:43   ` Bastien Nocera
  2008-10-06  8:02     ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien Nocera @ 2008-10-06  6:43 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Mario_Limonciello, linux-bluetooth

On Mon, 2008-10-06 at 07:25 +0100, David Woodhouse wrote:
> On Mon, 2008-10-06 at 01:21 -0500, Mario_Limonciello@Dell.com wrote:
> > I've noticed that the wizard will show (null) if the device name is
> > not yet recognized when pairing.  This is a bit confusing to the user
> > experience.  The attached patch makes the behavior a little bit
> > better.
> 
> Thanks; I noticed that too a couple of days ago but hadn't got round to
> the patch yet.
> 
> Perhaps showing the bdaddr would be better, though?

That should fix both problems:

diff --git a/wizard/main.c b/wizard/main.c
index 3accd7f..3c9e017 100644
--- a/wizard/main.c
+++ b/wizard/main.c
@@ -351,7 +351,7 @@ static void select_callback(GtkTreeSelection *selection, gpointer user_data)
                gtk_tree_model_get(model, &iter,
                                BLUETOOTH_COLUMN_PAIRED, &paired,
                                BLUETOOTH_COLUMN_ADDRESS, &address,
-                               BLUETOOTH_COLUMN_NAME, &name,
+                               BLUETOOTH_COLUMN_ALIAS, &name,
                                BLUETOOTH_COLUMN_TYPE, &type, -1);
 
                if (paired == TRUE)



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

* Re: [PATCH] Don't show (null) in wizard
  2008-10-06  6:43   ` Bastien Nocera
@ 2008-10-06  8:02     ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2008-10-06  8:02 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: David Woodhouse, Mario_Limonciello, linux-bluetooth

Hi Bastien,

> > > I've noticed that the wizard will show (null) if the device name is
> > > not yet recognized when pairing.  This is a bit confusing to the user
> > > experience.  The attached patch makes the behavior a little bit
> > > better.
> > 
> > Thanks; I noticed that too a couple of days ago but hadn't got round to
> > the patch yet.
> > 
> > Perhaps showing the bdaddr would be better, though?
> 
> That should fix both problems:
> 
> diff --git a/wizard/main.c b/wizard/main.c
> index 3accd7f..3c9e017 100644
> --- a/wizard/main.c
> +++ b/wizard/main.c
> @@ -351,7 +351,7 @@ static void select_callback(GtkTreeSelection *selection, gpointer user_data)
>                 gtk_tree_model_get(model, &iter,
>                                 BLUETOOTH_COLUMN_PAIRED, &paired,
>                                 BLUETOOTH_COLUMN_ADDRESS, &address,
> -                               BLUETOOTH_COLUMN_NAME, &name,
> +                               BLUETOOTH_COLUMN_ALIAS, &name,
>                                 BLUETOOTH_COLUMN_TYPE, &type, -1);
>  

this is the right fix. Let bluetoothd do the hard work for you :)

Regards

Marcel



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

end of thread, other threads:[~2008-10-06  8:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-06  6:21 [PATCH] Don't show (null) in wizard Mario_Limonciello
2008-10-06  6:25 ` David Woodhouse
2008-10-06  6:43   ` Bastien Nocera
2008-10-06  8:02     ` Marcel Holtmann

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