[maemo-developers] Making my app. appear on the Navigator menu
From: Eero Tamminen eero.tamminen at nokia.comDate: Mon Oct 1 17:55:07 EEST 2007
- Previous message: General bugs being assigned to ITOS2007HE in Garage, not Bugzilla
- Next message: WLAN connectivity using only wireless-tools
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, ext Thomas Waelti wrote: > Thank you very much for your valuable feedback! > >> 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 > > But shouldn't "most" applications provide a D-BUS service so that > they can receive system messages (low battery, shutdown, > screen blanking) and gracefully handle them? (kind of best practice??) Normal applications should be completely idle and not update screen when user is not interacting with them. If these are already true, there isn't really anything extra you need to do. And if your application is doing some activity (which is not user requested such as clock updates etc), you should stop those activities when you're not visible, not just when screen is blanked... If you have user data, you can save it periodically *if* the data has changed. On shutdown your application will be anyway killed, but saving ny non-autosaved data would be nice (assumes it's _fast_). :-) >>> 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 :-) > [...] >>> 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. > [...] >> 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 > > Whew - this clears it up. mClock currently is a pure Pygame thing, so that's why the WM_CLASS was needed. Now I understand. I was confused because: > - I read somewhere about the use of WM_CLASS not being necessary anymore > - Some apps I dissected had the WM_Class in their .desktop file, but nowhere in their app code, so it seemed unused (probably because they were GTK apps) > > So I now fixed this and the icon shows up in the TN. Cool :-) > However, the TN still doesn't know the NAME of my app! (Fortunately, I'm not alone with this problem - UKMP has the same issue as I saw by coincidence) > -When in normal mode, pressing the Home icon brings up TN with my mClock icon, but named as "unknown" > -When in Fullscreen mode, pressing the Home icon brings up TN with my mClock icon, but named as "<unnamed>" (just like with UKMP) > What is missing now? How can I tell TN the name of my App? Hm. I'm not sure where TN currently takes the window name. If it's not from the app .desktop file, you need to set the window title in your program (preferably before you map the window). - Eero
- Previous message: General bugs being assigned to ITOS2007HE in Garage, not Bugzilla
- Next message: WLAN connectivity using only wireless-tools
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]