~berthold-daum/zora/trunk

« back to all changes in this revision

Viewing changes to com.bdaum.zoom.ui/src/com/bdaum/zoom/ui/internal/preferences/AppearancePreferencePage.java

  • Committer: bdaum
  • Date: 2015-12-26 10:21:51 UTC
  • Revision ID: berthold.daum@bdaum.de-20151226102151-44f1j5113167thb9
VersionĀ 2.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
 
76
76
        private CTabItem tabItem0;
77
77
 
 
78
        private Button locationButton;
 
79
 
78
80
        public AppearancePreferencePage() {
79
81
                setDescription(Messages
80
82
                                .getString("AppearancePreferencePage.appearance_descr")); //$NON-NLS-1$
181
183
                                .getString("AppearancePreferencePage.max_face_regions")); //$NON-NLS-1$
182
184
                regionField = new Spinner(group, SWT.BORDER);
183
185
                regionField.setMaximum(99);
 
186
                locationButton = WidgetFactory.createCheckButton(group,
 
187
                                Messages.getString("AppearancePreferencePage.show_location"), //$NON-NLS-1$
 
188
                                new GridData(SWT.BEGINNING, SWT.CENTER, true, true, 2, 1));
184
189
                showratingViewer = createComboViewer(
185
190
                                group,
186
191
                                Messages.getString("AppearancePreferencePage.show_rating"), ratingOptions, ratingLabels, false); //$NON-NLS-1$
200
205
                IPreferenceStore preferenceStore = getPreferenceStore();
201
206
                colorViewer.setSelection(new StructuredSelection(preferenceStore
202
207
                                .getString(PreferenceConstants.BACKGROUNDCOLOR)));
 
208
                locationButton.setSelection(preferenceStore
 
209
                                .getBoolean(PreferenceConstants.SHOWLOCATION));
203
210
                doneButton.setSelection(preferenceStore
204
211
                                .getBoolean(PreferenceConstants.SHOWDONEMARK));
205
212
                regionField.setSelection(preferenceStore
220
227
                preferenceStore.setValue(PreferenceConstants.BACKGROUNDCOLOR,
221
228
                                preferenceStore
222
229
                                                .getDefaultString(PreferenceConstants.BACKGROUNDCOLOR));
 
230
                preferenceStore.setValue(PreferenceConstants.SHOWLOCATION,
 
231
                                preferenceStore
 
232
                                                .getDefaultBoolean(PreferenceConstants.SHOWLOCATION));
223
233
                preferenceStore.setValue(PreferenceConstants.SHOWDONEMARK,
224
234
                                preferenceStore
225
235
                                                .getDefaultBoolean(PreferenceConstants.SHOWDONEMARK));
251
261
                if (!selection.isEmpty())
252
262
                        preferenceStore.setValue(PreferenceConstants.BACKGROUNDCOLOR,
253
263
                                        (String) selection.getFirstElement());
 
264
                preferenceStore.setValue(PreferenceConstants.SHOWLOCATION,
 
265
                                locationButton.getSelection());
254
266
                preferenceStore.setValue(PreferenceConstants.MAXREGIONS,
255
267
                                regionField.getSelection());
256
268
                preferenceStore.setValue(PreferenceConstants.SHOWDONEMARK,