Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15
scrot
08_fix-beeping.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 08_fix-beeping.patch of Package scrot
Author: Ibragimov Rinat <ibragimovrinat@mail.ru> Description: Fix missing option for beep prevention. --- a/scrot.1 +++ b/scrot.1 @@ -49,6 +49,9 @@ .B -t, --thumb NUM generate thumbnail too. NUM is the percentage of the original size for the thumbnail to be. +.TP 5 +.B -z, --silent +prevent beeping. .SH SPECIAL STRINGS Both the .B --exec --- a/src/main.c +++ b/src/main.c @@ -154,7 +154,7 @@ { Imlib_Image im; - XBell(disp, 0); + if (! opt.silent) XBell(disp, 0); im = gib_imlib_create_image_from_drawable(root, 0, 0, 0, scr->width, scr->height, 1); @@ -336,7 +336,7 @@ } scrot_nice_clip(&rx, &ry, &rw, &rh); - XBell(disp, 0); + if (! opt.silent) XBell(disp, 0); im = gib_imlib_create_image_from_drawable(root, 0, rx, ry, rw, rh, 1); } return im; --- a/src/options.c +++ b/src/options.c @@ -44,7 +44,7 @@ static void scrot_parse_option_array(int argc, char **argv) { - static char stropts[] = "bcd:e:hmq:st:uv+:"; + static char stropts[] = "bcd:e:hmq:st:uv+:z"; static struct option lopts[] = { /* actions */ {"help", 0, 0, 'h'}, /* okay */ @@ -55,6 +55,7 @@ {"focussed", 0, 0, 'u'}, /* macquarie dictionary has both spellings */ {"border", 0, 0, 'b'}, {"multidisp", 0, 0, 'm'}, + {"silent", 0, 0, 'z'}, /* toggles */ {"thumb", 1, 0, 't'}, {"delay", 1, 0, 'd'}, @@ -109,6 +110,9 @@ case 't': options_parse_thumbnail(optarg); break; + case 'z': + opt.silent = 1; + break; default: break; } @@ -246,6 +250,7 @@ " -t, --thumb NUM generate thumbnail too. NUM is the percentage\n" " of the original size for the thumbnail to be,\n" " or the geometry in percent, e.g. 50x60 or 80x20.\n" + " -z, --silent Prevent beeping\n" "\n" " SPECIAL STRINGS\n" " Both the --exec and filename parameters can take format specifiers\n" " that are expanded by " PACKAGE " when encountered.\n" --- a/src/options.h +++ b/src/options.h @@ -35,6 +35,7 @@ int focused; int quality; int border; + int silent; int multidisp; int thumb; int thumb_width;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor