GNOME Bugzilla – Bug 594141
gnome screenshot don't include pointer commandline
Last modified: 2012-06-26 19:40:59 UTC
this report has been filed here: https://bugs.edge.launchpad.net/ubuntu/+source/gnome-utils/+bug/424295 "issuing gnome-screenshot --help-all doesn't mention the switch to use when I want to exclude the mouse pointer from the screenshot. It might be that the help text is incomplete, it might be that it isn't implemented as a switch (however this feature is available on the GUI)" Thanks,
Created attachment 214863 [details] [review] Patch: screenshot: Add command options --include-pointer and --remove-pointer What's the opposite of --include-pointer? I would say --exclude-pointer, but I've made it at least partly consistent with --include-border. The opposite of --include-border is --remove-border. The opposite of the variable name include_border_arg in screenshot-application.c is disable_border_arg. I find disable_pointer_arg too odd when the option is --remove-pointer. I've called it remove_pointer_arg. Shall I change any of these names? screenshot-config.c, screenshot_load_config(): config->include_pointer = !remove_pointer_arg; config->include_pointer = include_pointer_arg; /* default: remove pointer */ The first of these assignments is obviously meaningless, but once again I've made it consistent with include_border.
Review of attachment 214863 [details] [review]: I think command line/keybinding invocations should not follow the GSettings preferences at all for that value. We should assume the setting is either off by default (and provide an --include-pointer switch), or the opposite (and provide an --exclude-pointer switch). Right now, the default value of the GSettings preference is on, but I don't think it makes a lot of sense, since most of the times it's a distraction, unless you really want it. So I think I would: - assume the setting is off by default, and change the GSettings default value in the schemas - add an --include-pointer switch - only follow the GSettings value in interactive mode, like you did already
Created attachment 214878 [details] [review] Patch: screenshot: Add command option --include-pointer Next attempt! I'm not sure what to do with --include-pointer in interactive mode. I've ignored it. If you want me to, I can add if (include_pointer_arg) config->include_pointer = TRUE;
Review of attachment 214878 [details] [review]: Thanks, looks good!
I've pushed the patch in comment 3. http://git.gnome.org/browse/gnome-screenshot/commit/?id=2eceef9e14d3b578e6d8fceb7b9f29c3aa433555 This is perhaps not exactly what the bug reporter requested. There is no command line option to explicitly exclude the pointer, but it can be excluded. In interactive mode you can select whether to include or exclude it by checking or unchecking a check box in the dialog box. In non-interactive mode the default action is to exclude the pointer. If you want to include it, add the --include-pointer option.
*** Bug 678885 has been marked as a duplicate of this bug. ***