GNOME Bugzilla – Bug 79189
gnome-panel-screenshot needs a timeout option
Last modified: 2007-01-08 23:41:12 UTC
The screenshot facility needs a timeout option [but UI and CLI]. Well, needs is a strong word, but for creating GNOME 2 screenshots, it sure would be useful. We need to add 'Take a screenshot' or some variation to the Actions menu at some stage [Luis/Mark, let me know if I need to file a different bug for this].
Created attachment 7802 [details] [review] Add command line delay to screenshot facility
Okay, copied some GIMP code and added the command line option for a delay. I'm not entirely sure if it can be worked into the UI or not - I guess this depends on where it will be in the menus. Currently it seems to be under Applications->Graphics [which kinda sucks quite a lot]. I'm still voting for Actions here ;). Also would be good to split up between full screenshot and just a window screenshot - but this is minor I guess.
I dunno... I guess I'd suggest that technically a different bug should go in for 'add take screenshot to action menu' but if everyone is agreed that that is a good idea and there is a patch for it here I don't see any reason to whine about it.
I really don't want a second menu entry for this. I just don't think its important enough. I'm somewhat loathe to have an entry in the menus at all. Actions would be better. (FWIW, Glynn's patch adds the commandline option, not moves it into the Actions menu). If we do have a screenshot facility though, lets not rely on command line options for useful features. I think the tool should be able (from the interface) to take shots with delay, and of windows vs. whole screen. Its really not too complex for one dialogue.
Yeah, I really should stop provide 'half-patches' :/ FWIW, I kinda disagree with Seth's comments...Having the screenshot facility hidden away in Applications->Graphics doesn't seem very useful. I'd still like to see it in Actions....but whatever - at least I know it exists. I'd remove it out of Graphics and put it in Actions. And anyway, as I was suprised to find out one day, people take screenshots to report bugs! :) As for the second bit about adding stuff to the UI, yeah I think we kinda need some initial UI for this, but was unwilling to hack on it until people thought it would be useful.
Created attachment 8405 [details] [review] This patch implement delay option in GUI, and the type of shot (window or whole screen)
I think this patch needs a little work. If we're going to have a UI to set the delay, it should come up before the current dialog. Also, we may want to change it so that: gnome-panel-screenshot --delay brings up a dialog asking for how long to wait, and gnome-panel-screenshot --delay=5 will just take the image after that many seconds.
OK, I've made a patch that shows a dialog with delay and shot type (window or entire screen) gui options if --delay is specified. The dialog is a yes and no dialog, and after yes response sleep(delay) is called and after that the main window is created then the user can save his shot. I've only 1 problem: after yes is clicked, sleep is called then for these seconds (specified in delay variable) the yes button appear pressed.
you don't want to use sleep. You want to use g_timeout_add ()
um, that was my fault...it originally used sleep since gtk_timeout was overengineered [jrb's request, remember? ;) ].
Created attachment 8490 [details] [review] I explain it in a comment
Created attachment 8493 [details] [review] Take a look folks, try it and if it's right commit :)
thanks for the patch, but a few comments 1) we're in UI freeze now afaik, so it will have to wait 2) can you separate reformatting from the rest of the patch? That is make your patch JUST implement the change and not reformat any other code since that makes it hard to see what has changed exactly. Reformatting should eb a separate patch really. 3) can you use the unified diff format? (diff -u)
There's no problem George. When I'll have time, I'll make some changes to fit your comments ;)
Removing PATCH keyword until we get a *patch* :-) Putting on the 2.2.x milestone.
*** Bug 93668 has been marked as a duplicate of this bug. ***
Pier Luigi: any update on your patch ?
And please use diff -u when posting patches.
So what's happening with this bug? I was just about to file a new bug saying how desperately I would like a delay setting on the screenshot applet. I was trying to capture a bug which showed up when moving around menus and every time I moused over to the applet to say "take the screenshot" I lost the point in the menus where the bug was showing. As well as for bugs, I also want it for taking screenshots for docs and for other things. At the moment I have to resort to "sleep 10; gnome-panel-screenshot" and flipping over to another screen and trying to find the bug in time. We have passed UI freeze for 2.3/2.4 now, so I imagine there's no chance to get this in for 2.4. But can we please have this in 2.6? (Updated Version, was unsure for Target: someone could change that, too?) Telsa
I'm not really sure that the screenshot window needs a delay option. Is it unreasonable telsa, to ask users to run 'gnome-panel-screenshot --delay=N' from the run dialog.
Where do you propose to ask people to use the command-line option? right-clicking on the button and selecting help produces no help file in Gnome 2.2, and I see nothing in CVS to make me think it's been written for 2.4. Have checked gnome-applets and gnome-panel and am currently checking out gnome-user-docs in case it's hidden in there. (Wow, it's still checking out ten minutes later. Ugh.) So yeah, whilst I in principle have no problem with command-line arguments (a) It needs to be documented somewhere other than command --help (b) I thought I was the exception and the intention was that people should just be able to use the GUI to do stuff. I suggest we leave this bug open until someone finds me the documentation for this :)
We need something like the OSX screenshot utility. Unfortunately not having the mac style menus makes this a little harder.
What are those, Glynn?
Any progress here? I can get gnome-panel-screenshot --delay to work; but it still will not include menus in the result. Try it. The menu doesn't appear when you click the menu button. Then it starts to appear and goes away again an instant before the screenshot dialogue saying "this is the picture" shows up. With no menu. (I'm on Fedora Core 1 with Gnome 2.4 here.) Since this bug is about a delay option, do you want a new bug for the "how to include a menu in it" issue?
Huh? I can take screenshots of menus here. I'm a bit confused -- what is it you want telsa?
Waah! I want my Gnome to work like yours! Just for once... Seriously, distro details as above, and if I try to take screenshots with the delay option, there is a flicker as if it's going to appear and then it goes away, and the dialogue with the screenshot appears and there is no menu. Um. Mostly. I have just tried this with delays of 5 to 30 seconds. Somtimes with a delay of 20s it works. It's extremely intermittent. It's working at about one time in five with 20s and it just won't work with a delay of 10s or less. Only thing I can think of which I have changed which might remotely be relevant is that I switched the accessibility gconf key on. Which really slows a lot of stuff down. And the machine is stressed enough as it is. I'm well into swap. Relevant or not?
Beats me. I'll try with a11y on when I get home tonight.
What about adding a right-click action to the screen-shot applet that allows you to request a delay. Or how about an "Advanced..." right-click action that brings up a dialog where you can choose a delay, whether to take the whole screen or a selectable window, and the destination of the screenshot. Having a popped-up dialog with a "Take Screenshot" button on it will enable you to keep that dialog up on the screen for repeated screenshots to the same location with the same settings. Just a thought...however, the screenshot applet at a *minimum* needs to provide a gui way of picking a delay to allow you to get screenshots of popup-modal windows (like menus).
Can't we just set a 5 seconds delay to *all* screenshots ? I think it's more usual for a user to want to do something before the screenshot is taken (e.g. open a menu) than want to take a screenshot *right now* (this is not very precise anyway). If the user does not want to do anything, he just has to wait 5 seconds. Not the end of the world. If we want to be very nice, we could show a little countdown thing somewhere in the screen center...
Created attachment 38527 [details] [review] patch Here is a patch to do the following : * set a 5 seconds delay as the default. If you really want to take the screenshot now, you can pass --delay=0 as a parameter. * show a countdown in the middle of the screen, to let the user know something is happening... Jonathan, could you take a look and tell me what you think ?
In general I think this is a good idea. However, I think it should look more like the typing break style of countdown - just my opinion of course.
Can you explain a little bit more what you like in the typing break countdown ? Do you mean the characters font/size ?
Hum, just the overall style I guess. The countdown element seems to match that of the screenshot tool. Probably something for the usability guys to decide on though.
I hope the 5 second delay will not apply if I press PrintScreen. The screenshooter already takes 2 and a half seconds to show the save dialog after I press PrintScreen, and even longer if I take a screenshot of a window. Adding an arbitrary delay might make the screenshooter unbearable to use. (By the way, the screenshot itself is fast -- I enabled seconds in my clock applet and checked -- it is just the dialog that is slow to appear). I like the idea of adding a "Take a screenshot in 5 seconds" entry to the popup menu to the screenshooter applet.
If the shooter already takes more than 2.5 seconds to pop up, what is a few seconds more ;-) ? The question here is : how do you let the user choose between delay and no delay, in a discoverable way ? (ie add a right-click menu item is not very discoverable, and it won't work for the "Take Screenshot" item of the "Desktop" menu bar).
I don't like this at all!! The 2.5 second delay right now is due to the drop shadow code being very slow. The screenshot has already been taken at the start of the session. We need to speed that up, not slow things down even more.
Ok, no problem, you're the boss :) The question remains though : how to present the timeout option to the user in the GUI ?
I think the option is to be checkbox. If it is checked - then screenshot is taken after both keyboard and mouse are untouched for, say, 3 seconds. So while user is doing something, is preparing - Gnome will wait. When user is ready - make a screenshot. I needed to make screensht of open Gnome menus - and only Gimp saved me. While menu is open - PrtSc is not working anymore:(
*** This bug has been marked as a duplicate of 331644 ***