Debian Codegraph @

debian/patches/16_mytab.cpp.patch

raw symbols SCIP
1 Descriptionscip-debian debian qutemol 0.4.1~cvs20081111-15 qutemol/patches/`16_mytab.cpp.patch`#Description.: Modifications to src/MyTab.cpp
2 Fix spelling error: 'Strenght' instead of 'Strength'
3 Authorscip-debian debian qutemol 0.4.1~cvs20081111-15 qutemol/patches/`16_mytab.cpp.patch`#Author.: Morten Kjeldgaard <[email protected]scip-debian . . . identity/`[email protected]`.>
4 Authorscip-debian debian qutemol 0.4.1~cvs20081111-15 qutemol/patches/`16_mytab.cpp.patch`#Author.: Graham Inggs <[email protected]scip-debian . . . identity/`[email protected]`.>
5 Last-Updatescip-debian debian qutemol 0.4.1~cvs20081111-15 qutemol/patches/`16_mytab.cpp.patch`#Last-Update.: 2021-10-04
6
7 --- a/src/MyTab.cppscip-debian debian qutemol 0.4.1~cvs20081111-15 qutemol/upstream/`src/MyTab.cpp`:
8 +++ b/src/MyTab.cppscip-debian debian qutemol 0.4.1~cvs20081111-15 qutemol/upstream/`src/MyTab.cpp`:
9 @@ -28,7 +28,7 @@
10 // GEOM TAB
11 ////////////
12
13 -enum{ ID_SetBallnstick=500, ID_SetSpacefill, ID_SetLicorice,
14 +static enum { ID_SetBallnstick=500, ID_SetSpacefill, ID_SetLicorice,
15 ID_SetLicoriceRadius, ID_SetBallnstickRadius,
16
17 ID_SetBallnstickSmoothcolor,ID_SetBallnstickBicolor, ID_SetBallnstickConstantcolor,
18 @@ -93,7 +93,8 @@
19 static wxCheckBox *buttonSetHetatm;
20
21 static wxSlider *sliderLicorice, *sliderBallnstick,
22 - *sliderSetBaseColor , *sliderShineSize,
23 + //*sliderSetBaseColor ,
24 + *sliderShineSize,
25 *sliderAwaren ,
26 *sliderSetBgbrightness,
27 *sliderLightBase, *sliderLighting, *sliderAO,
28 @@ -114,49 +115,49 @@
29 const int NPreset=15;
30 static wxButton* preset[NPreset];
31
32 -static char* presetFile[NPreset] = {
33 - "presets//real.preset",
34 - "presets//real2.preset",
35 - "presets//direct.preset",
36 -
37 - "presets//illustr.preset",
38 - "presets//illustr_new.preset",
39 - "presets//illustr_motm.preset",
40 -
41 - "presets//qutemol1.preset",
42 - "presets//qutemol2.preset",
43 - "presets//qutemol3.preset",
44 -
45 - "presets//coolb.preset",
46 - "presets//coold.preset",
47 - "presets//borders_cool.preset",
48 -
49 - "presets//sem.preset",
50 - "presets//sem2.preset",
51 - "presets//shape.preset",
52 +static const char* presetFile[NPreset] = {
53 + "real.preset",
54 + "real2.preset",
55 + "direct.preset",
56 +
57 + "illustr.preset",
58 + "illustr_new.preset",
59 + "illustr_motm.preset",
60 +
61 + "qutemol1.preset",
62 + "qutemol2.preset",
63 + "qutemol3.preset",
64 +
65 + "coolb.preset",
66 + "coold.preset",
67 + "borders_cool.preset",
68 +
69 + "sem.preset",
70 + "sem2.preset",
71 + "shape.preset",
72 };
73
74
75 -static wxString presetName[NPreset]={
76 - _T("Realistic\n1"),
77 - _T("Realistic\n2"),
78 - _T("Direct\nLight Only"),
79 -
80 - _T("Illustr-\native 1"),
81 - _T("Illustr-\native 2"),
82 - _T("Molecule of\nthe Month"),
83 -
84 - _T("Mixed 1"),
85 - _T("Mixed 2"),
86 - _T("Mixed 3"),
87 -
88 - _T("Cool\n(bright)"),
89 - _T("Cool\n(dark)"),
90 - _T("Cool\nborders"),
91 -
92 - _T("Simulated\nS.E.M. 1"),
93 - _T("Simulated\nS.E.M. 2"),
94 - _T("Shape\nPerception"),
95 +static const char* presetName[NPreset]={
96 + "Realistic 1",
97 + "Realistic 2",
98 + "Direct\nLight Only",
99 +
100 + "Illustr-\native 1",
101 + "Illustr-\native 2",
102 + "Molecule of\nthe Month",
103 +
104 + "Mixed 1",
105 + "Mixed 2",
106 + "Mixed 3",
107 +
108 + "Cool\n(bright)",
109 + "Cool\n(dark)",
110 + "Cool\nborders",
111 +
112 + "Simulated\nS.E.M. 1",
113 + "Simulated\nS.E.M. 2",
114 + "Shape\nPerception"
115 };
116
117 static bool presetEndOfLine[NPreset] = {
118 @@ -490,9 +491,9 @@
119 default:
120 int pid=id-ID_FirstPreset;
121 if ( (pid>=0) && (pid<NPreset) ) {
122 -#ifdef __DARWIN__
123 - wxString presetPath = wxStandardPaths::Get().GetResourcesDir() + "/" + presetFile[pid];
124 - if (!cgSettings.Load( presetPath.c_str() )) {
125 +#ifndef _WIN32
126 + wxString presetPath = _T(PKGDATADIR"/presets/") + wxString::FromAscii(presetFile[pid]);
127 + if (!cgSettings.Load( (const char *)presetPath.ToAscii() )) {
128 #else
129 if (!cgSettings.Load( presetFile[pid] )) {
130 #endif
131 @@ -815,11 +816,16 @@
132 wxString noNewLine(wxString x){
133 static wxString res;
134 res.Clear();
135 - for (int i=0; i<x.Length(); i++){
136 - if ((x[i]=='-')&&(x[i+1]=='\n')) i++;
137 - else
138 - if (x[i]=='\n') res.sprintf("%s ",res.ToAscii());
139 - else res.sprintf("%s%c",res.ToAscii(),x[i]);
140 +
141 + for (int i=0; i< (int)x.Length(); i++){
142 + if ((x[i]=='-')&&(x[i+1]=='\n')) {
143 + i++; i++;
144 + }
145 + if (x[i] != '\n') {
146 + res.Append(x[i]);
147 + } else {
148 + res.Append(' ');
149 + }
150 }
151 return res;
152 }
153 @@ -828,10 +834,10 @@
154 /*wxNO_FULL_REPAINT_ON_RESIZE |*/ wxCLIP_CHILDREN | wxTAB_TRAVERSAL)
155 {
156
157 - int i;
158 + //int i;
159
160 bool thinButtons=false;
161 -#ifdef __DARWIN__
162 +#ifndef _WIN32
163 thinButtons=true; // unsupported newlines in wxButtons under MAC! :(
164 #endif
165
166 @@ -846,11 +852,20 @@
167 else butSize= wxSize(70,50);
168
169 for (int i=0; i<NPreset; i++) {
170 + printf ("presetname: %s\n", presetName[i]);
171 + /*
172 preset[i]=new wxButton(this, ID_FirstPreset + i,
173 - thinButtons?noNewLine(presetName[i]):presetName[i],
174 + thinButtons? noNewLine(wxString::FromAscii(presetName[i])):wxString::FromAscii(presetName[i]),
175 wxDefaultPosition); //, butSize );
176 + */
177 + preset[i] = new wxButton(this,
178 + ID_FirstPreset + i,
179 + noNewLine(wxString::FromAscii(presetName[i])),
180 + wxDefaultPosition);
181 +
182 preset[i]->SetMinSize(butSize);
183 - if (presetName[i]==wxEmptyString) preset[i]->Show(false);
184 + //if (presetName[i]==wxEmptyString) preset[i]->Show(false);
185 + if (!presetName[i]) preset[i]->Show(false);
186 if (thinButtons) {
187 if (!subSizer) subSizer=new wxBoxSizer(wxHORIZONTAL);
188 subSizer->Add( preset[i], 1, wxALIGN_CENTER|wxEXPAND|wxALL,4 );
189 @@ -1016,7 +1031,7 @@
190 sizer->Add(5,5,0); // spacer
191 sizer->Add(newAutoCheckBox(
192 this,ID_SetHetatm,
193 - _T("Show 'HET' atmos"),
194 + _T("Show 'HET' atoms"),
195 &(geoSettings.showHetatm),
196 buttonSetHetatm, textSetHetatm,
197 AUTO_TEXT_ON_RIGHT
198 @@ -1144,7 +1159,7 @@
199
200 sizerDB->Add(newAutoSlider(
201 this, ID_SetFog,
202 - _T("Strenght:"),
203 + _T("Strength:"),
204 &(cgSettings.P_fog)
205 ), 0 , wxALIGN_RIGHT );
206
207 @@ -1161,7 +1176,7 @@
208
209 sizerHA->Add(newAutoSlider(
210 this, ID_SetHaloStr,
211 - _T("Strenght:"),
212 + _T("Strength:"),
213 &(cgSettings.P_halo_str),
214 sliderHaloStr, textHaloStr
215 ), 0 , wxALIGN_RIGHT );