qi: added 'plzip' to the blacklist for update pkg in the safe way
[dragora.git] / patches / scrot / 08_fix-beeping.patch
bloba5386fd634b8c676c526bc14714043a300b2e6f7
1 Description: Fix missing option for beep prevention.
2 Author: Ibragimov Rinat <ibragimovrinat@mail.ru>
3 Last-Update: 2010-06-30
4 Index: scrot-0.8/scrot.1
5 ===================================================================
6 --- scrot-0.8.orig/scrot.1
7 +++ scrot-0.8/scrot.1
8 @@ -49,6 +49,9 @@ Use the currently focused window.
9 .B -t, --thumb NUM
10 generate thumbnail too. NUM is the percentage of the original size for the
11 thumbnail to be.
12 +.TP 5
13 +.B -z, --silent
14 +prevent beeping.
15 .SH SPECIAL STRINGS
16 Both the
17 .B --exec
18 Index: scrot-0.8/src/main.c
19 ===================================================================
20 --- scrot-0.8.orig/src/main.c
21 +++ scrot-0.8/src/main.c
22 @@ -154,7 +154,7 @@ scrot_grab_shot(void)
24 Imlib_Image im;
26 - XBell(disp, 0);
27 + if (! opt.silent) XBell(disp, 0);
28 im =
29 gib_imlib_create_image_from_drawable(root, 0, 0, 0, scr->width,
30 scr->height, 1);
31 @@ -336,7 +336,7 @@ scrot_sel_and_grab_image(void)
33 scrot_nice_clip(&rx, &ry, &rw, &rh);
35 - XBell(disp, 0);
36 + if (! opt.silent) XBell(disp, 0);
37 im = gib_imlib_create_image_from_drawable(root, 0, rx, ry, rw, rh, 1);
39 return im;
40 Index: scrot-0.8/src/options.c
41 ===================================================================
42 --- scrot-0.8.orig/src/options.c
43 +++ scrot-0.8/src/options.c
44 @@ -44,7 +44,7 @@ init_parse_options(int argc, char **argv
45 static void
46 scrot_parse_option_array(int argc, char **argv)
48 - static char stropts[] = "bcd:e:hmq:st:uv+:";
49 + static char stropts[] = "bcd:e:hmq:st:uv+:z";
50 static struct option lopts[] = {
51 /* actions */
52 {"help", 0, 0, 'h'}, /* okay */
53 @@ -55,6 +55,7 @@ scrot_parse_option_array(int argc, char
54 {"focussed", 0, 0, 'u'}, /* macquarie dictionary has both spellings */
55 {"border", 0, 0, 'b'},
56 {"multidisp", 0, 0, 'm'},
57 + {"silent", 0, 0, 'z'},
58 /* toggles */
59 {"thumb", 1, 0, 't'},
60 {"delay", 1, 0, 'd'},
61 @@ -109,6 +110,9 @@ scrot_parse_option_array(int argc, char
62 case 't':
63 options_parse_thumbnail(optarg);
64 break;
65 + case 'z':
66 + opt.silent = 1;
67 + break;
68 default:
69 break;
71 @@ -246,6 +250,7 @@ show_usage(void)
72 " -t, --thumb NUM generate thumbnail too. NUM is the percentage\n"
73 " of the original size for the thumbnail to be,\n"
74 " or the geometry in percent, e.g. 50x60 or 80x20.\n"
75 + " -z, --silent Prevent beeping\n"
76 "\n" " SPECIAL STRINGS\n"
77 " Both the --exec and filename parameters can take format specifiers\n"
78 " that are expanded by " PACKAGE " when encountered.\n"
79 Index: scrot-0.8/src/options.h
80 ===================================================================
81 --- scrot-0.8.orig/src/options.h
82 +++ scrot-0.8/src/options.h
83 @@ -35,6 +35,7 @@ struct __scrotoptions
84 int focused;
85 int quality;
86 int border;
87 + int silent;
88 int multidisp;
89 int thumb;
90 int thumb_width;