OpenPrinting / system-config-printer

Graphical user interface for CUPS administration
GNU General Public License v2.0
163 stars 89 forks source link

Register system-config-printer on gapplication to avoid launch of multiple instances #103

Closed tillkamppeter closed 4 years ago

tillkamppeter commented 6 years ago

If you start system-config-printer while it is already running a second instance of system-config-printer is started, whereas it would be much more convenient if we simply pull the window of the running instance to the front. Other desktop applications use gapplication and so avoid duplicate instances. The second and further calls of the app then simply focus the window of the first instance.

zdohnal commented 6 years ago

Hi Till, is it a convention (set by a document or a norm) for application to behave proposed way? Because I'm not fond of proposed behavior, so when it isn't required by a official document or a norm, I would like to stay with current behavior.

zdohnal commented 6 years ago

But I'll see if I can come with a configure option, which could set such behavior if requested.

ghost commented 6 years ago

The argument "is it a convention...?" is bad. Do you want e.g. Spotify to open a new instance as soon as you click on it to check which song is playing currently? What is the use of the current behaviour? Please change it or does this look good to you:

print

zdohnal commented 6 years ago

@saitam1 Other way - why do you click again on the icon, when you have already a window opened? When I want to open other window, then I'll click on the icon. If there isn't any norm or policy for it, then it is a matter of preference. I'll prefer the way mentioned above, but if there is a way to make it configurable during compiling, then I can look into it. Feel free to submit a patch.

zdohnal commented 4 years ago

I'm closing the issue because the app behaves in intended way.