After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 135201 - Make it harder to accidently start multiple Yelp instances
Make it harder to accidently start multiple Yelp instances
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.20.x
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-02-23 12:11 UTC by Malcolm Tredinnick
Modified: 2014-12-08 04:04 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Malcolm Tredinnick 2004-02-23 12:11:55 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.
Comment 1 Shaun McCance 2004-02-23 12:48:09 UTC
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.
Comment 2 Shaun McCance 2005-03-04 06:24:16 UTC
*** Bug 169160 has been marked as a duplicate of this bug. ***
Comment 3 Brent Smith (smitten) 2006-05-06 20:58:17 UTC
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. 
Comment 4 Brent Smith (smitten) 2006-05-06 21:10:00 UTC
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.
Comment 5 Kjartan Maraas 2007-04-09 12:23:16 UTC
Isn't this best handled at the keyboard shortcut level? For example not trigger until key release or something like that?
Comment 6 Kjartan Maraas 2009-05-04 07:44:45 UTC
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+?
Comment 7 André Klapper 2010-05-20 20:01:34 UTC
Yes.
Comment 8 Matthias Clasen 2014-12-08 04:04:03 UTC
this problem has been solved by making yelp single-instance.