[Sugar-devel] Object Chooser (selecting user-created audio objects from the Journal)
Art Hunkins
abhunkin at uncg.edu
Mon Dec 27 15:16:03 EST 2010
Walter,
Once again, thanks for creating this page.
As is clear from my last message to this list (and Aleksey's helpful reply),
a couple of small changes need to be made to the page. (I tried to do this
myself, but now realize these pages can only be edited by administrators.)
The two needed changes, as previously discussed are:
1) replace the final code segment with:
def choose(self, widget):
chooser = ObjectChooser(parent=self, what_filter=mime.GENERIC_TYPE_AUDIO)
result = chooser.run()
if result == gtk.RESPONSE_ACCEPT:
self.jobject = chooser.get_selected_object()
self.path = str(self.jobject.get_file_path())
else:
self.jobject = None
self.path1 = "0"
2) change the reference to "self.name1" in the last paragraph to
"self.path".
Thanks so much -
Art Hunkins
P.S. My latest FileMix (FileMix-4.xo) incorporates these changes - in the
file filemix.py. Actually, there are *4* object chooser methods included,
triggered by a set of 4 callback buttons. (For those interested, I've made
the source code visible online for this version.)
----- Original Message -----
From: "Walter Bender" <walter.bender at gmail.com>
To: "Art Hunkins" <abhunkin at uncg.edu>
Cc: <Sugar-devel at lists.sugarlabs.org>
Sent: Wednesday, December 22, 2010 8:58 AM
Subject: Re: [Sugar-devel] Object Chooser (selecting user-created audio
objects from the Journal)
>I created http://wiki.sugarlabs.org/go/Activity_Team/Object_Chooser
> with both your and Aleksey's code and comments.
>
> -walter
>
> --
> Walter Bender
> Sugar Labs
> http://www.sugarlabs.org
More information about the Sugar-devel
mailing list