GNOME Bugzilla – Bug 135201
Make it harder to accidently start multiple Yelp instances
Last modified: 2014-12-08 04:04:03 UTC
A friend suggested "Don't spawn gnome-helps indefinately if f1 is pressed; having a bookfall onto your keyboard renders your machine useless for a _long_ time." This is not an unreasonable idea, since Yelp is a rare application that can be started with a single keystroke (and hence accidently). So maybe we should only spawn a single instance of Yelp and just bring it to the foreground if <F1> is pressed whilst Yelp is running. I had a couple of other crazy ideas about how to handle this based on dialog boxes popping up requesting confirmation (and behaving differently if the dialog box was already showing), but they seem to have usability problems. A big problem here is how to implement this in such a way that we never end up in a deadlocked state.
Yelp already does only use a single process, using bonobo activation. If Yelp is called when there's already a running process, that process is just told to open a new window. I certainly do not want to change the behavior to bringing an existing window to the foreground to load the contents. I think this is an issue best solved at the GTK+/libgnomeui level, by somehow suppressing insanely rapid refires of that shortcut.
*** Bug 169160 has been marked as a duplicate of this bug. ***
Shaun is right here. I tried to implement some logic to refuse to create a new window if yelp is spawned multiple times in a short period of time. The problem is that every time you press F1, it starts a new yelp process and generates load on the machine. If you hold down F1, it continuously spawns yelp processes and it takes successively longer and longer to start each yelp process. The result is that by the time the Bonobo component in the original process receives the request to create the new window, the time duration has elapsed and it ends up spawning a new window.
Since most every program uses the gnome_help_display* family of API calls to open the help system, it makes sense that this be implemented at the libgnome level.
Isn't this best handled at the keyboard shortcut level? For example not trigger until key release or something like that?
This is still an issue even though everyone is moving away from gnome_help* and use gtk_show_uri instead. Where do we move this bug? gtk+?
Yes.
this problem has been solved by making yelp single-instance.