maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   How to forbid multi-running an application? (https://talk.maemo.org/showthread.php?t=54660)

YoDude 2010-05-31 12:44

Re: How to forbid multi-running an application?
 
Quote:

Originally Posted by qwerty12 (Post 691607)
If you've created an osso_context and have set the X-Osso-Service field in the desktop file correctly, Hildon Desktop will call the "top_application" mehod on an already running instance instead of starting a new one.

This is also a problem with the Sygic Maps program...
Instead of bringing an instance that is running in the background forward and back into full screen when the desktop shortcut is touched, it will open a new instance... Not a good thing.

This also explains why when it is closed from the minimized state, it doesn't save any changes that were made during the running of that instance.

I was hoping that at least the multiple instances problem could be solved by a user hack to the .desktop file.

Venemo 2010-05-31 17:28

Re: How to forbid multi-running an application?
 
Anyone has any ideas about how to do this with Qt?

qwerty12 2010-05-31 18:20

Re: How to forbid multi-running an application?
 
Quote:

Originally Posted by jarmniku (Post 691616)
Sounds reasonable, but I haven't. Maybe I can do that, any pointers to a simple example?

http://vcs.maemo.org/svn/maemoexampl...aemo-examples/ -- look at libosso_* and the Makefile to see where the service file should be installed. The example is a little lengthy for this purpose, but 'twas the best I could find. You need osso_initialize

@Venemo

Grab the FreOffice source. It has the QDBus equiv. to all this.

Venemo 2010-07-26 15:42

Re: How to forbid multi-running an application?
 
Okay, a late post for an old thread: the QtSingleApplication solution from the Qt devs does exactly this.


All times are GMT. The time now is 00:40.

vBulletin® Version 3.8.8