Skip to contentSkip to conversation

Set "filter" property correctly

PATCH In review Bastien Nocera 2 participants 2 messages Mar 5, 2008 – Mar 6, 2008 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Set "filter" property correctly

Heya,

- Set the default property to "phones" in the test application
- Fix setting filter properties in the device selection widget

Cheers

Index: bluetooth-device-selection.c
===================================================================
RCS file: /cvsroot/bluez/gnome/common/bluetooth-device-selection.c,v retrieving revision 1.17

bluetooth-device-selection.c +1 -1
diff -u -p -u -p -r1.17 bluetooth-device-selection.c
@@ -656,7 +656,7 @@ bluetooth_device_selection_set_property 
 		break;
 	case PROP_DEVICE_TYPE_FILTER:
 		priv->device_type_filter = g_value_get_int (value);
-		gtk_combo_box_set_active (GTK_COMBO_BOX(priv->device_type), priv->device_type_filter);
+		gtk_combo_box_set_active (GTK_COMBO_BOX(priv->device_type), priv->device_type_filter >> 1);
 		break;
 	case PROP_DEVICE_CATEGORY_FILTER:
 		priv->device_category_filter = g_value_get_int (value);

Index: test-deviceselection.c
===================================================================
RCS file: /cvsroot/bluez/gnome/common/test-deviceselection.c,v retrieving revision 1.6

test-deviceselection.c +5 -1
diff -u -p -u -p -r1.6 test-deviceselection.c
@@ -29,6 +29,7 @@
 #include <gtk/gtk.h>
 
 #include "bluetooth-device-selection.h"
+#include "client.h"
 
 static void device_selected_cb(GObject *object,
 			       GParamSpec *spec, gpointer user_data)
@@ -78,7 +79,10 @@ int main(int argc, char **argv)
 	selector = bluetooth_device_selection_new("Select a Device to Setup");
 	gtk_container_set_border_width(GTK_CONTAINER(selector), 5);
 	gtk_widget_show(selector);
-	g_object_set(selector, "show-search", TRUE, NULL);
+	g_object_set(selector,
+		     "show-search", TRUE,
+		     "device-type-filter", BLUETOOTH_TYPE_PHONE,
+		     NULL);
 	g_signal_connect(selector, "selected-device-changed",
 			 G_CALLBACK(select_device_changed), dialog);
 	g_signal_connect(selector, "notify::device-selected",

-------------------------------------------------------------------------
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

maintainer
#1 lore raw

Hi Bastien,

Quoted 2 lines

- Set the default property to "phones" in the test application
- Fix setting filter properties in the device selection widget

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