[maemo-developers] Making my app. appear on the Navigator menu
From: Eero Tamminen eero.tamminen at nokia.comDate: Wed Sep 26 12:01:44 EEST 2007
- Previous message: Making my app. appear on the Navigator menu
- Next message: Making my app. appear on the Navigator menu
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, ext Thomas D. Waelti wrote: [...] >> "D-BUS service file is installed in “/usr/share/dbus-1/services/” >> and maemo GUI needs to be restarted with “af-sb-init.sh restart” >> before D-BUS daemon recognizes it." > > But isn't this only valid for Scratchbox? IIRC, I can't do this in > xterm on my N800. My app still doesn't properly connect to the D-Bus, > even altough I did exactly like the examples tell me (PyMaemo doc) > and how I could observe in various examples that I dissected. I believe > this has something to do with services keeping running even after > an uninstall of a service file or with services Packages providing services should in general make sure that the services are stopped when the service package is removed. If it's an UI application (which user might be using), that's of course another matter. :-/ [...] > In my example, I had the code for mClock done after a few hours, thanks to the ease of use of Python with Pygame (even if it was my first ever Python app). > OTOH, I literally wasted more than double that time in trying to get the D-Bus service to properly work with my app. You need to provide D-BUS service only if: - You handle D-BUS messages in general (e.g. because you don't want the caller of your application to care about whether your program is already running or not) - You want to prevent user from (accidentally) running several instances of your program at the same time Otherwise a .desktop file suffices just fine. If you request TN to start your app with D-BUS (by giving D-BUS service name in .desktop file), you need to register to D-BUS, otherwise D-BUS concludes that the process startup failed and forcibly terminates it. > And no, my Icon doesn't yet show up in the tasks - but at least I can see and launch it from the Extras menu :-) > [Currently, my app doesn't seem to connect to it anymore, as I can't seem to stop the screen blanking with display_blanking_pause; even altough I had it up and running one evening... However, I DO launch the app using the D-Bus service (at least I get the "mClock is loading..." info window when starting it from the desktop and the app comes up. And with that comes my other issue: the infowindow keeps being in the foreground for at least 20 seconds even if the app has finished loading long ago. Annoying. Both issues are because the WM_CLASS provided by your application window and the one specified in its .desktop file do not match. Therefore Maemo Task Navigator cannot match what was started from the menu and the window the application opened. Therefore the startup banner doesn't go away and your window doesn't show up in the tasks. For the latter you might actually report a bug, although TN doesn't know it's your app, it could show at least some icon (e.g. "??" for unknown window)... Gtk sets WM_CLASS automatically to the application (binary) name, so this is usually only a problem for non-Gtk apps, e.g. SDL games. See: https://bugs.maemo.org/show_bug.cgi?id=24 http://lists.maemo.org/pipermail//maemo-developers/2006-March/003513.html - Eero
- Previous message: Making my app. appear on the Navigator menu
- Next message: Making my app. appear on the Navigator menu
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]