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 594141 - gnome screenshot don't include pointer commandline
gnome screenshot don't include pointer commandline
Status: RESOLVED FIXED
Product: gnome-screenshot
Classification: Core
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-screenshot-maint
gnome-screenshot-maint
: 678885 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-09-04 14:17 UTC by Pedro Villavicencio
Modified: 2012-06-26 19:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
Patch: screenshot: Add command options --include-pointer and --remove-pointer (5.41 KB, patch)
2012-05-24 14:02 UTC, Kjell Ahlstedt
reviewed Details | Review
Patch: screenshot: Add command option --include-pointer (5.75 KB, patch)
2012-05-24 16:51 UTC, Kjell Ahlstedt
accepted-commit_now Details | Review

Description Pedro Villavicencio 2009-09-04 14:17:29 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,
Comment 1 Kjell Ahlstedt 2012-05-24 14:02:04 UTC
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.
Comment 2 Cosimo Cecchi 2012-05-24 14:28:17 UTC
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
Comment 3 Kjell Ahlstedt 2012-05-24 16:51:40 UTC
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;
Comment 4 Cosimo Cecchi 2012-05-24 17:13:34 UTC
Review of attachment 214878 [details] [review]:

Thanks, looks good!
Comment 5 Kjell Ahlstedt 2012-05-24 18:17:33 UTC
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.
Comment 6 Cosimo Cecchi 2012-06-26 19:40:59 UTC
*** Bug 678885 has been marked as a duplicate of this bug. ***