[gnome-bluetooth] bt device chooser dialog in python

Ondrej Ivanič ondrej at kmit.sk
Wed Aug 10 17:17:54 BST 2005


Hi
> 
> You'll want to check the widgets in gnome-bluetooth, in particular
> GnomeBTChooser. They're made just for that purpose.

Good point. Thanks.

Here is a sample:

#!/usr/bin/env python

import gtk
from gnomebt import chooser as GnomeBTChooser
from gnomebt import controller as GnomeBTController

btctl = GnomeBTController.Controller()
btdialog = GnomeBTChooser.Chooser(btctl)
if btdialog.run() == gtk.RESPONSE_OK:
   print "Device addres: %s\n" % btdialog.get_bdaddr()
else:
   print "Canceled"



-- 
Ondrej Ivanic
(ondrej at kmit.sk)


More information about the gnome-bluetooth mailing list