Commit dbe3a6bbc1ba56889cb52b47ec66d1e69103187f

Authored by Colomban Wendling
1 parent 8b67d966

ezoom: Restore compatibility with specific zoom level values

Restore only providing 3 specific zoom targets, as well as settings
compatibility with previous Compiz version in Jessie by reverting the
setting renames and value meaning.

This unfortunately also reverts the more user-friendly values, but this
is needed to preserve compatibility until we find a proper migration
path.
plugins/ezoom/ezoom.xml.in
... ... @@ -111,214 +111,45 @@
111 111 <_long>Check this to target the focused window when jumping to a specific zoom level. Uncheck this to target the mouse.</_long>
112 112 <default>false</default>
113 113 </option>
114   - <option type="float" name="zoom_specific_1">
  114 + <option type="float" name="zoom_spec1">
115 115 <_short>Specific Zoom 1</_short>
116 116 <_long>Zoom level to go to when triggering hotkey 1</_long>
117 117 <default>1.0</default>
118   - <min>1.0</min>
119   - <max>10.0</max>
120   - <precision>0.1</precision>
  118 + <min>0.1</min>
  119 + <max>1.0</max>
  120 + <precision>0.01</precision>
121 121 </option>
122 122 <option type="key" name="zoom_specific_1_key">
123 123 <_short>Zoom to Specific Zoom 1</_short>
124 124 <_long>Zoom to the specific zoom level 1</_long>
125 125 <default></default>
126 126 </option>
127   - <option type="float" name="zoom_specific_2">
  127 + <option type="float" name="zoom_spec2">
128 128 <_short>Specific Zoom 2</_short>
129 129 <_long>Zoom level to go to when triggering hotkey 2</_long>
130   - <default>1.0</default>
131   - <min>1.0</min>
132   - <max>10.0</max>
133   - <precision>0.1</precision>
  130 + <default>0.5</default>
  131 + <min>0.1</min>
  132 + <max>1.0</max>
  133 + <precision>0.01</precision>
134 134 </option>
135 135 <option type="key" name="zoom_specific_2_key">
136 136 <_short>Zoom to Specific Zoom 2</_short>
137 137 <_long>Zoom to the specific zoom level 2</_long>
138 138 <default></default>
139 139 </option>
140   - <option type="float" name="zoom_specific_3">
  140 + <option type="float" name="zoom_spec3">
141 141 <_short>Specific Zoom 3</_short>
142 142 <_long>Zoom level to go to when triggering hotkey 3</_long>
143   - <default>1.0</default>
144   - <min>1.0</min>
145   - <max>10.0</max>
146   - <precision>0.1</precision>
  143 + <default>0.2</default>
  144 + <min>0.1</min>
  145 + <max>1.0</max>
  146 + <precision>0.01</precision>
147 147 </option>
148 148 <option type="key" name="zoom_specific_3_key">
149 149 <_short>Zoom to Specific Zoom 3</_short>
150 150 <_long>Zoom to the specific zoom level 3</_long>
151 151 <default></default>
152 152 </option>
153   - <option type="float" name="zoom_specific_4">
154   - <_short>Specific Zoom 4</_short>
155   - <_long>Zoom level to go to when triggering hotkey 4</_long>
156   - <default>1.0</default>
157   - <min>1.0</min>
158   - <max>10.0</max>
159   - <precision>0.1</precision>
160   - </option>
161   - <option type="key" name="zoom_specific_4_key">
162   - <_short>Zoom to Specific Zoom 4</_short>
163   - <_long>Zoom to the specific zoom level 4</_long>
164   - <default></default>
165   - </option>
166   - <option type="float" name="zoom_specific_5">
167   - <_short>Specific Zoom 5</_short>
168   - <_long>Zoom level to go to when triggering hotkey 5</_long>
169   - <default>1.0</default>
170   - <min>1.0</min>
171   - <max>10.0</max>
172   - <precision>0.1</precision>
173   - </option>
174   - <option type="key" name="zoom_specific_5_key">
175   - <_short>Zoom to Specific Zoom 5</_short>
176   - <_long>Zoom to the specific zoom level 5</_long>
177   - <default></default>
178   - </option>
179   - <option type="float" name="zoom_specific_6">
180   - <_short>Specific Zoom 6</_short>
181   - <_long>Zoom level to go to when triggering hotkey 6</_long>
182   - <default>1.0</default>
183   - <min>1.0</min>
184   - <max>10.0</max>
185   - <precision>0.1</precision>
186   - </option>
187   - <option type="key" name="zoom_specific_6_key">
188   - <_short>Zoom to Specific Zoom 6</_short>
189   - <_long>Zoom to the specific zoom level 6</_long>
190   - <default></default>
191   - </option>
192   - <option type="float" name="zoom_specific_7">
193   - <_short>Specific Zoom 7</_short>
194   - <_long>Zoom level to go to when triggering hotkey 7</_long>
195   - <default>1.0</default>
196   - <min>1.0</min>
197   - <max>10.0</max>
198   - <precision>0.1</precision>
199   - </option>
200   - <option type="key" name="zoom_specific_7_key">
201   - <_short>Zoom to Specific Zoom 7</_short>
202   - <_long>Zoom to the specific zoom level 7</_long>
203   - <default></default>
204   - </option>
205   - <option type="float" name="zoom_specific_8">
206   - <_short>Specific Zoom 8</_short>
207   - <_long>Zoom level to go to when triggering hotkey 8</_long>
208   - <default>1.0</default>
209   - <min>1.0</min>
210   - <max>10.0</max>
211   - <precision>0.1</precision>
212   - </option>
213   - <option type="key" name="zoom_specific_8_key">
214   - <_short>Zoom to Specific Zoom 8</_short>
215   - <_long>Zoom to the specific zoom level 8</_long>
216   - <default></default>
217   - </option>
218   - <option type="float" name="zoom_specific_9">
219   - <_short>Specific Zoom 9</_short>
220   - <_long>Zoom level to go to when triggering hotkey 9</_long>
221   - <default>1.0</default>
222   - <min>1.0</min>
223   - <max>10.0</max>
224   - <precision>0.1</precision>
225   - </option>
226   - <option type="key" name="zoom_specific_9_key">
227   - <_short>Zoom to Specific Zoom 9</_short>
228   - <_long>Zoom to the specific zoom level 9</_long>
229   - <default></default>
230   - </option>
231   - <option type="float" name="zoom_specific_10">
232   - <_short>Specific Zoom 10</_short>
233   - <_long>Zoom level to go to when triggering hotkey 10</_long>
234   - <default>1.0</default>
235   - <min>1.0</min>
236   - <max>10.0</max>
237   - <precision>0.1</precision>
238   - </option>
239   - <option type="key" name="zoom_specific_10_key">
240   - <_short>Zoom to Specific Zoom 10</_short>
241   - <_long>Zoom to the specific zoom level 10</_long>
242   - <default></default>
243   - </option>
244   - <option type="float" name="zoom_specific_11">
245   - <_short>Specific Zoom 11</_short>
246   - <_long>Zoom level to go to when triggering hotkey 11</_long>
247   - <default>1.0</default>
248   - <min>1.0</min>
249   - <max>10.0</max>
250   - <precision>0.1</precision>
251   - </option>
252   - <option type="key" name="zoom_specific_11_key">
253   - <_short>Zoom to Specific Zoom 11</_short>
254   - <_long>Zoom to the specific zoom level 11</_long>
255   - <default></default>
256   - </option>
257   - <option type="float" name="zoom_specific_12">
258   - <_short>Specific Zoom 12</_short>
259   - <_long>Zoom level to go to when triggering hotkey 12</_long>
260   - <default>1.0</default>
261   - <min>1.0</min>
262   - <max>10.0</max>
263   - <precision>0.1</precision>
264   - </option>
265   - <option type="key" name="zoom_specific_12_key">
266   - <_short>Zoom to Specific Zoom 12</_short>
267   - <_long>Zoom to the specific zoom level 12</_long>
268   - <default></default>
269   - </option>
270   - <option type="float" name="zoom_specific_13">
271   - <_short>Specific Zoom 13</_short>
272   - <_long>Zoom level to go to when triggering hotkey 13</_long>
273   - <default>1.0</default>
274   - <min>1.0</min>
275   - <max>10.0</max>
276   - <precision>0.1</precision>
277   - </option>
278   - <option type="key" name="zoom_specific_13_key">
279   - <_short>Zoom to Specific Zoom 13</_short>
280   - <_long>Zoom to the specific zoom level 13</_long>
281   - <default></default>
282   - </option>
283   - <option type="float" name="zoom_specific_14">
284   - <_short>Specific Zoom 14</_short>
285   - <_long>Zoom level to go to when triggering hotkey 14</_long>
286   - <default>1.0</default>
287   - <min>1.0</min>
288   - <max>10.0</max>
289   - <precision>0.1</precision>
290   - </option>
291   - <option type="key" name="zoom_specific_14_key">
292   - <_short>Zoom to Specific Zoom 14</_short>
293   - <_long>Zoom to the specific zoom level 14</_long>
294   - <default></default>
295   - </option>
296   - <option type="float" name="zoom_specific_15">
297   - <_short>Specific Zoom 15</_short>
298   - <_long>Zoom level to go to when triggering hotkey 15</_long>
299   - <default>1.0</default>
300   - <min>1.0</min>
301   - <max>10.0</max>
302   - <precision>0.1</precision>
303   - </option>
304   - <option type="key" name="zoom_specific_15_key">
305   - <_short>Zoom to Specific Zoom 15</_short>
306   - <_long>Zoom to the specific zoom level 15</_long>
307   - <default></default>
308   - </option>
309   - <option type="float" name="zoom_specific_16">
310   - <_short>Specific Zoom 16</_short>
311   - <_long>Zoom level to go to when triggering hotkey 16</_long>
312   - <default>1.0</default>
313   - <min>1.0</min>
314   - <max>10.0</max>
315   - <precision>0.1</precision>
316   - </option>
317   - <option type="key" name="zoom_specific_16_key">
318   - <_short>Zoom to Specific Zoom 16</_short>
319   - <_long>Zoom to the specific zoom level 16</_long>
320   - <default></default>
321   - </option>
322 153 </group>
323 154 <group>
324 155 <_short>Zoom Area Movement</_short>
... ...
plugins/ezoom/src/ezoom.cpp
... ... @@ -1775,67 +1775,15 @@ EZoomScreen::zoomSpecific (CompAction *action,
1775 1775 switch (target)
1776 1776 {
1777 1777 case ZoomTarget1:
1778   - zoom_level = 1.0f / optionGetZoomSpecific1 ();
  1778 + zoom_level = optionGetZoomSpec1 ();
1779 1779 break;
1780 1780  
1781 1781 case ZoomTarget2:
1782   - zoom_level = 1.0f / optionGetZoomSpecific2 ();
  1782 + zoom_level = optionGetZoomSpec2 ();
1783 1783 break;
1784 1784  
1785 1785 case ZoomTarget3:
1786   - zoom_level = 1.0f / optionGetZoomSpecific3 ();
1787   - break;
1788   -
1789   - case ZoomTarget4:
1790   - zoom_level = 1.0f / optionGetZoomSpecific4 ();
1791   - break;
1792   -
1793   - case ZoomTarget5:
1794   - zoom_level = 1.0f / optionGetZoomSpecific5 ();
1795   - break;
1796   -
1797   - case ZoomTarget6:
1798   - zoom_level = 1.0f / optionGetZoomSpecific6 ();
1799   - break;
1800   -
1801   - case ZoomTarget7:
1802   - zoom_level = 1.0f / optionGetZoomSpecific7 ();
1803   - break;
1804   -
1805   - case ZoomTarget8:
1806   - zoom_level = 1.0f / optionGetZoomSpecific8 ();
1807   - break;
1808   -
1809   - case ZoomTarget9:
1810   - zoom_level = 1.0f / optionGetZoomSpecific9 ();
1811   - break;
1812   -
1813   - case ZoomTarget10:
1814   - zoom_level = 1.0f / optionGetZoomSpecific10 ();
1815   - break;
1816   -
1817   - case ZoomTarget11:
1818   - zoom_level = 1.0f / optionGetZoomSpecific11 ();
1819   - break;
1820   -
1821   - case ZoomTarget12:
1822   - zoom_level = 1.0f / optionGetZoomSpecific12 ();
1823   - break;
1824   -
1825   - case ZoomTarget13:
1826   - zoom_level = 1.0f / optionGetZoomSpecific13 ();
1827   - break;
1828   -
1829   - case ZoomTarget14:
1830   - zoom_level = 1.0f / optionGetZoomSpecific14 ();
1831   - break;
1832   -
1833   - case ZoomTarget15:
1834   - zoom_level = 1.0f / optionGetZoomSpecific15 ();
1835   - break;
1836   -
1837   - case ZoomTarget16:
1838   - zoom_level = 1.0f / optionGetZoomSpecific16 ();
  1786 + zoom_level = optionGetZoomSpec3 ();
1839 1787 break;
1840 1788  
1841 1789 default:
... ... @@ -2214,45 +2162,6 @@ EZoomScreen::EZoomScreen (CompScreen *screen) :
2214 2162 optionSetZoomSpecific3KeyInitiate (boost::bind (&EZoomScreen::zoomSpecific,
2215 2163 this, _1, _2, _3,
2216 2164 ZoomTarget3));
2217   - optionSetZoomSpecific4KeyInitiate (boost::bind (&EZoomScreen::zoomSpecific,
2218   - this, _1, _2, _3,
2219   - ZoomTarget4));
2220   - optionSetZoomSpecific5KeyInitiate (boost::bind (&EZoomScreen::zoomSpecific,
2221   - this, _1, _2, _3,
2222   - ZoomTarget5));
2223   - optionSetZoomSpecific6KeyInitiate (boost::bind (&EZoomScreen::zoomSpecific,
2224   - this, _1, _2, _3,
2225   - ZoomTarget6));
2226   - optionSetZoomSpecific7KeyInitiate (boost::bind (&EZoomScreen::zoomSpecific,
2227   - this, _1, _2, _3,
2228   - ZoomTarget7));
2229   - optionSetZoomSpecific8KeyInitiate (boost::bind (&EZoomScreen::zoomSpecific,
2230   - this, _1, _2, _3,
2231   - ZoomTarget8));
2232   - optionSetZoomSpecific9KeyInitiate (boost::bind (&EZoomScreen::zoomSpecific,
2233   - this, _1, _2, _3,
2234   - ZoomTarget9));
2235   - optionSetZoomSpecific10KeyInitiate (boost::bind (&EZoomScreen::zoomSpecific,
2236   - this, _1, _2, _3,
2237   - ZoomTarget10));
2238   - optionSetZoomSpecific11KeyInitiate (boost::bind (&EZoomScreen::zoomSpecific,
2239   - this, _1, _2, _3,
2240   - ZoomTarget11));
2241   - optionSetZoomSpecific12KeyInitiate (boost::bind (&EZoomScreen::zoomSpecific,
2242   - this, _1, _2, _3,
2243   - ZoomTarget12));
2244   - optionSetZoomSpecific13KeyInitiate (boost::bind (&EZoomScreen::zoomSpecific,
2245   - this, _1, _2, _3,
2246   - ZoomTarget13));
2247   - optionSetZoomSpecific14KeyInitiate (boost::bind (&EZoomScreen::zoomSpecific,
2248   - this, _1, _2, _3,
2249   - ZoomTarget14));
2250   - optionSetZoomSpecific15KeyInitiate (boost::bind (&EZoomScreen::zoomSpecific,
2251   - this, _1, _2, _3,
2252   - ZoomTarget15));
2253   - optionSetZoomSpecific16KeyInitiate (boost::bind (&EZoomScreen::zoomSpecific,
2254   - this, _1, _2, _3,
2255   - ZoomTarget16));
2256 2165 optionSetPanLeftKeyInitiate (boost::bind (&EZoomScreen::zoomPan, this, _1,
2257 2166 _2, _3, -1, 0));
2258 2167 optionSetPanRightKeyInitiate (boost::bind (&EZoomScreen::zoomPan, this, _1,
... ...
plugins/ezoom/src/ezoom.h
... ... @@ -60,20 +60,7 @@ enum SpecificZoomTarget
60 60 {
61 61 ZoomTarget1 = 0,
62 62 ZoomTarget2,
63   - ZoomTarget3,
64   - ZoomTarget4,
65   - ZoomTarget5,
66   - ZoomTarget6,
67   - ZoomTarget7,
68   - ZoomTarget8,
69   - ZoomTarget9,
70   - ZoomTarget10,
71   - ZoomTarget11,
72   - ZoomTarget12,
73   - ZoomTarget13,
74   - ZoomTarget14,
75   - ZoomTarget15,
76   - ZoomTarget16
  63 + ZoomTarget3
77 64 };
78 65  
79 66 class EZoomScreen :
... ...