|
|
2009-02-22
, 09:59
|
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#2
|
/* exit the gtk main loop & osso_deinitalize*/
osso_context_t* context = NULL;
context = osso_initialize ("com.transmissionbt.Transmission", VERSION, FALSE, NULL);
osso_deinitialize(context);
| The Following User Says Thank You to qwerty12 For This Useful Post: | ||
|
|
2009-02-22
, 15:46
|
|
|
Posts: 903 |
Thanked: 632 times |
Joined on Apr 2008
|
#3
|
Osso context refers to registering the app from DBUS, I don't know how it works for python but for transmission, I did things like:
(I had previously initialized it with:
osso_initialize ("com.transmissionbt.Transmission", VERSION, FALSE, NULL);
)
In python, it's something like:
import osso
osso.Context('com.whatever.whatever','<version>', False)
(Last param is always false - true is depreciated)
osso_context = osso.Context('com.quickclip.Quickclip','.21', False)

Sorry if this has confused you even more, I'm only familiar with C and I can't even code in C.
I spent 6 months trying to learn C/C++, and nothing. My biggest achievement was a terminal program that computed Heat Index/Wind Chill/Dew Point from the necessary information. Then one day I came across a very informal Python tutorial (it was maybe 6-7 short chapters), spent 30 minutes reading that. The very next day, I wrote my Weather program in Python, the same one it took me 6 months to figure out how to do in C. I immediately began programming in Python. It just makes sense
| The Following User Says Thank You to BrentDC For This Useful Post: | ||
The problem is that I'm unsure what exactly needs to be done to initialize the help system because all the documentation is in C, and I'm not familiar with C at all (hate it).
This is the documentation I've found:
http://maemo.org/api_refs/4.1/libhil...og-help-enable
http://maemo.org/maemo_release_docum...00000000000000
This is my not-yet-working example:
def help_test_function(self, widget, data=None): dialog = gtk.Dialog("Help!",None,gtk.DIALOG_MODAL) dialog.set_size_request(500, 300) ok_button = dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) hildonhelp.help_dialog_help_enable(dialog, "osso_quickclip_help", <an "osso.Context" arguement here>) dialog.show_all() dialog.run() dialog.destroy()Problem is, I don't even know what a valid osso.Context arguement is. If I put None there, the dialog will open, but clicking the "?" does nothing.
Any help greatly appreciated.