Add more supported HAL classes
PATCH 1/1 Add more supported HAL classes
Heya,
Server and handheld are both supported minor classes for HAL and hcid, so we should handle them appropriately.
Simple patch attached.
Cheers
Index: applet/main.c
===================================================================
RCS file: /cvsroot/bluez/gnome/applet/main.c,v
retrieving revision 1.95
main.c +4 -1
@@ -1271,7 +1271,10 @@ static char *get_form_factor(void)libhal_ctx_shutdown (ctx,NULL );libhal_ctx_free (ctx); -if (strcmp (formfactor,"laptop" ) &&strcmp (formfactor,"desktop" )) { +if (strcmp (formfactor,"laptop" ) + &&strcmp (formfactor,"desktop" ) + &&strcmp (formfactor,"server" ) + &&strcmp (formfactor,"handheld" )) {/* We don't know anything else */ g_free (formfactor); formfactor =g_strdup ("uncategorized" );
Index: properties/adapter.c
===================================================================
RCS file: /cvsroot/bluez/gnome/properties/adapter.c,v retrieving revision 1.17
adapter.c +14 -0
@@ -227,6 +227,12 @@ static void class_callback(GtkWidget *cocase 2 : minor ="laptop" ;break ; +case 3 : + minor ="server" ; +break ; +case 4 : + minor ="handheld" ; +break ;default :return ; }
@@ -705,6 +711,10 @@ static void create_adapter(struct adapte _("Desktop workstation"));gtk_combo_box_append_text (GTK_COMBO_BOX (combobox),_ ("Laptop computer" )); +gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), +_ ("Server" )); +gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), +_ ("Handheld" ));gtk_box_pack_start (GTK_BOX (vbox), combobox, FALSE, FALSE,0 );if (major && minor &&g_ascii_strcasecmp (major,"computer" ) ==0 ) {
@@ -714,6 +724,10 @@ static void create_adapter(struct adapte index =1 ; else if (g_ascii_strcasecmp(minor, "laptop") == 0) index =2 ; + else if (g_ascii_strcasecmp(minor, "server") == 0) + index =3 ; + else if (g_ascii_strcasecmp(minor, "handheld") == 0) + index =4 ; else index =-1 ;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Marcel Holtmann
maintainerHi Bastien,
Quoted 2 lines
Server and handheld are both supported minor classes for HAL and hcid, so we should handle them appropriately.
patch has been applied. Thanks.
Regards
Marcel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel