~ubuntu-branches/ubuntu/trusty/rasmol/trusty

« back to all changes in this revision

Viewing changes to debian/patches/02_x11shortcuts.patch

  • Committer: Package Import Robot
  • Author(s): Teemu Ikonen
  • Date: 2011-10-20 11:25:48 UTC
  • mfrom: (3.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20111020112548-w5nk71pqz53m6kqu
Tags: 2.7.5.2-1
* New upstream version.
* control: Upgrade to standards-version 3.9.2.
* Upgrade debhelper compat and build-dep to 8.
* copyright:
  - Update DEP5 format and contents to latest release.
  - Add copyright info for PDB files.
* rules: Use override targets instead of --before and --after.
* Patches:
  - gtk-tiff-lzw: New patch, Write TIFFs with LZW compression in
    GTK version.
  - gtkabout: New patch, fixes broken icon in GTK About dialog.
  - manfix: Fix typos, escape minuses (fixes lintian warning
    hyphen-used-as-minus-sign).
  - writemsg, x11shortcuts, gtk_redraw, uncompress_quote: Included in
    new upstream version, removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From: Teemu Ikonen <tpikonen@gmail.com>
2
 
Subject: Fix null pointer ref on File menu keyboard shortcuts in x11win.c.
3
 
X-git-branch: p/x11shortcuts
4
 
 
5
 
 src/x11win.c |   55 ++++++++++++++++++++++++++++---------------------------
6
 
 1 files changed, 28 insertions(+), 27 deletions(-)
7
 
 
8
 
diff --git a/src/x11win.c b/src/x11win.c
9
 
index 7284260..1e4368e 100644
10
 
--- a/src/x11win.c
11
 
+++ b/src/x11win.c
12
 
@@ -287,6 +287,7 @@ typedef struct _MenuItem {
13
 
             int value;
14
 
         } MenuItem;
15
 
 
16
 
+static int zero = 0;
17
 
 
18
 
 static MenuItem FilMenu[21] = {
19
 
     { &MsgStrs[StrMOpen]   /* "Open..."   */,   0x11,  &MsgAuxl[StrMOpen],
20
 
@@ -301,35 +302,35 @@ static MenuItem FilMenu[21] = {
21
 
         &MsgLens[StrMExit],     NULL, 0    },
22
 
     { &MsgStrs[StrMEmpty]  /*  ""         */,   0x08,  &MsgAuxl[StrMEmpty],
23
 
         &MsgLens[StrMEmpty],    NULL, 0    },
24
 
-    { &(MolNStr[0]),                            0x01,  0, 
25
 
-        &MolNLen[0],            &MoleculeIndex, 0 },  
26
 
-    { &(MolNStr[1]),                            0x01,  0, 
27
 
-        &MolNLen[1],            &MoleculeIndex, 1 },  
28
 
-    { &(MolNStr[2]),                            0x01,  0, 
29
 
-        &MolNLen[2],            &MoleculeIndex, 2 },  
30
 
-    { &(MolNStr[3]),                            0x01,  0, 
31
 
-        &MolNLen[3],            &MoleculeIndex, 3 },  
32
 
-    { &(MolNStr[4]),                            0x01,  0, 
33
 
+    { &(MolNStr[0]),                            0x01,  &zero,
34
 
+        &MolNLen[0],            &MoleculeIndex, 0 },
35
 
+    { &(MolNStr[1]),                            0x01,  &zero,
36
 
+        &MolNLen[1],            &MoleculeIndex, 1 },
37
 
+    { &(MolNStr[2]),                            0x01,  &zero,
38
 
+        &MolNLen[2],            &MoleculeIndex, 2 },
39
 
+    { &(MolNStr[3]),                            0x01,  &zero,
40
 
+        &MolNLen[3],            &MoleculeIndex, 3 },
41
 
+    { &(MolNStr[4]),                            0x01,  &zero,
42
 
         &MolNLen[4],            &MoleculeIndex, 4 },
43
 
-    { &(MolNStr[5]),                            0x01,  0, 
44
 
-        &MolNLen[5],            &MoleculeIndex, 5 },  
45
 
-    { &(MolNStr[6]),                            0x01,  0, 
46
 
-        &MolNLen[6],            &MoleculeIndex, 6 },  
47
 
-    { &(MolNStr[7]),                            0x01,  0, 
48
 
-        &MolNLen[7],            &MoleculeIndex, 7 },  
49
 
-    { &(MolNStr[8]),                            0x01,  0, 
50
 
-        &MolNLen[8],            &MoleculeIndex, 8 },  
51
 
-    { &(MolNStr[9]),                            0x01,  0, 
52
 
+    { &(MolNStr[5]),                            0x01,  &zero,
53
 
+        &MolNLen[5],            &MoleculeIndex, 5 },
54
 
+    { &(MolNStr[6]),                            0x01,  &zero,
55
 
+        &MolNLen[6],            &MoleculeIndex, 6 },
56
 
+    { &(MolNStr[7]),                            0x01,  &zero,
57
 
+        &MolNLen[7],            &MoleculeIndex, 7 },
58
 
+    { &(MolNStr[8]),                            0x01,  &zero,
59
 
+        &MolNLen[8],            &MoleculeIndex, 8 },
60
 
+    { &(MolNStr[9]),                            0x01,  &zero,
61
 
         &MolNLen[9],            &MoleculeIndex, 9 },
62
 
-    { &(MolNStr[10]),                            0x01,  0, 
63
 
-        &MolNLen[10],            &MoleculeIndex, 10 },  
64
 
-    { &(MolNStr[11]),                            0x01,  0, 
65
 
-        &MolNLen[11],            &MoleculeIndex, 11 },  
66
 
-    { &(MolNStr[12]),                            0x01,  0, 
67
 
-        &MolNLen[12],            &MoleculeIndex, 12 },  
68
 
-    { &(MolNStr[13]),                            0x01,  0, 
69
 
-        &MolNLen[13],            &MoleculeIndex, 13 },  
70
 
-    { &(MolNStr[14]),                            0x01,  0, 
71
 
+    { &(MolNStr[10]),                            0x01,  &zero,
72
 
+        &MolNLen[10],            &MoleculeIndex, 10 },
73
 
+    { &(MolNStr[11]),                            0x01,  &zero,
74
 
+        &MolNLen[11],            &MoleculeIndex, 11 },
75
 
+    { &(MolNStr[12]),                            0x01,  &zero,
76
 
+        &MolNLen[12],            &MoleculeIndex, 12 },
77
 
+    { &(MolNStr[13]),                            0x01,  &zero,
78
 
+        &MolNLen[13],            &MoleculeIndex, 13 },
79
 
+    { &(MolNStr[14]),                            0x01,  &zero,
80
 
         &MolNLen[14],            &MoleculeIndex, 14 }};
81
 
 
82
 
 static MenuItem DisMenu[9] = {