[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Single instance only applications
From:       "Carlo Robazza" <carlor () corel ! com>
Date:       1999-07-29 16:21:32
[Download RAW message or body]

Hi there,

I have been given the task of ensuring that kcontrol and its associated
modules can not be run in multiple instances. I am planning on using
lock files but there are a few problems with that method and would like
to get your opinions.

Using a lock file for kcontrol works wonderfully. However, I run into
problems with modules like kcmdisplay. It is called with an argument to
start up different components like screen saver, etc. The problem I run
into is sort of a catch-22 situation. I can lock out kcmdisplay but the
user doesn't know that when they click on screen saver they are actually
starting kcmdisplay with a parameter. So, what message do I give them? I
can't say that screen saver is already running because it isn't. I can't
tell them that kcmdisplay is already running because they won't know
what it is.

I could lock out the different components of the modules but there might
be more than one component/module modifying the same configuration file.
I guess I could lock out the configuration file that is being written to
and let the user know that the file is locked so the changes couldn't be
saved.

Another question is, if we decide to lock out the applications, do we
build the lock file feature into the KApplication constructor as an
option?

And finally, are there any methods for communicating between different
applications?


Thanks,

Carlo.
Corel.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic