~ubuntu-branches/ubuntu/trusty/krusader/trusty

« back to all changes in this revision

Viewing changes to krusader/Konfigurator/kgpanel.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-08-08 13:47:36 UTC
  • mfrom: (1.2.19 upstream)
  • Revision ID: james.westby@ubuntu.com-20110808134736-8e630ivgd2c3sgg5
Tags: 1:2.4.0~beta1-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
#define PAGE_VIEW         2
54
54
#define PAGE_PANELTOOLBAR  3
55
55
#define PAGE_MOUSE  4
 
56
#define PAGE_LAYOUT 5
56
57
 
57
58
 
58
59
KgPanel::KgPanel(bool first, QWidget* parent) :
87
88
 
88
89
// ---------------------------------------------------------------------------------------
89
90
    KONFIGURATOR_CHECKBOX_PARAM general_settings[] = { // cfg_class, cfg_name, default, text, restart, tooltip
90
 
        {"Look&Feel", "FlatOriginBar", false, i18n("Flat Origin Bar"),   true,  0 },
 
91
        {"Look&Feel", "FlatOriginBar", _FlatOriginBar, i18n("Flat Origin Bar"),   true,  0 },
91
92
    };
92
93
    miscLayout->addWidget(createCheckBoxGroup(2, 0, general_settings, 1 /*count*/, tab, PAGE_MISC), 0, Qt::AlignTop);
93
94
 
97
98
    QGroupBox *miscGrp = createFrame(i18n("Operation"), tab);
98
99
    QGridLayout *miscGrid = createGridLayout(miscGrp);
99
100
 
100
 
    KONFIGURATOR_CHECKBOX_PARAM operation_settings[] = { //   cfg_class  cfg_name                default             text                              restart tooltip
 
101
    KONFIGURATOR_CHECKBOX_PARAM operation_settings[] = { // cfg_class, cfg_name, default, text, restart, tooltip
101
102
        {"Look&Feel", "Mark Dirs",            _MarkDirs,          i18n("Autoselect directories"),   false,  i18n("When matching the select criteria, not only files will be selected, but also directories.") },
102
103
        {"Look&Feel", "Rename Selects Extension", true,          i18n("Rename selects extension"),   false,  i18n("When renaming a file, the whole text is selected. If you want Total-Commander like renaming of just the name, without extension, uncheck this option.") },
 
104
        {"Look&Feel", "UnselectBeforeOperation", _UnselectBeforeOperation, i18n("Unselect files before copy/move"), false, i18n("Unselect files, which are to be copied/moved, before the operation starts.") },
 
105
        {"Look&Feel", "FilterDialogRemembersSettings", _FilterDialogRemembersSettings, i18n("Filter dialog remembers settings"), false, i18n("The filter dialog is opened with the last filter settings that where applied to the panel.") },
103
106
    };
104
 
    cbs = createCheckBoxGroup(2, 0, operation_settings, 2 /*count*/, miscGrp, PAGE_MISC);
 
107
    cbs = createCheckBoxGroup(2, 0, operation_settings, 4 /*count*/, miscGrp, PAGE_MISC);
105
108
    miscGrid->addWidget(cbs, 0, 0);
106
109
 
107
110
    miscLayout->addWidget(miscGrp);
141
144
// ---------------------------------------------------------------------------------------
142
145
// -----------------------------  Quicksearch  -------------------------------------------
143
146
// ---------------------------------------------------------------------------------------
144
 
    miscGrp = createFrame(i18n("Quicksearch"), tab);
 
147
    miscGrp = createFrame(i18n("Quicksearch/Quickfilter"), tab);
145
148
    miscGrid = createGridLayout(miscGrp);
146
149
 
147
150
    KONFIGURATOR_CHECKBOX_PARAM quicksearch[] = { //   cfg_class  cfg_name                default             text                              restart tooltip
148
 
        {"Look&Feel", "New Style Quicksearch",  _NewStyleQuicksearch, i18n("New style quicksearch"), false,  i18n("Opens a quick search dialog box.") },
149
 
        {"Look&Feel", "Case Sensitive Quicksearch",  _CaseSensitiveQuicksearch, i18n("Case sensitive quicksearch"), false,  i18n("All files beginning with capital letters appear before files beginning with non-capital letters (UNIX default).") },
 
151
        {"Look&Feel", "New Style Quicksearch",  _NewStyleQuicksearch, i18n("New style Quicksearch"), false,  i18n("Opens a quick search dialog box.") },
 
152
        {"Look&Feel", "Case Sensitive Quicksearch",  _CaseSensitiveQuicksearch, i18n("Case sensitive Quicksearch/QuickFilter"), false,  i18n("All files beginning with capital letters appear before files beginning with non-capital letters (UNIX default).") },
150
153
        {"Look&Feel", "Up/Down Cancels Quicksearch",  false, i18n("Up/Down cancels Quicksearch"), false,  i18n("Pressing the Up/Down buttons cancels Quicksearch.") },
151
154
    };
152
155
 
159
162
 
160
163
    hbox = new QHBoxLayout();
161
164
 
162
 
    hbox->addWidget(new QLabel(i18n("Quicksearch position:"), miscGrp));
 
165
    hbox->addWidget(new QLabel(i18n("Position:"), miscGrp));
163
166
 
164
167
    cmb = createComboBox("Look&Feel", "Quicksearch Position",
165
168
                            "bottom", positions, 2, miscGrp, true, false, PAGE_MISC);
181
184
    KONFIGURATOR_CHECKBOX_PARAM barSettings[] =
182
185
    {
183
186
        {"Look&Feel", "Show Size In Bytes", true, i18n("Show size in bytes too"), true,  i18n("Show size in bytes too") },
184
 
        {"Look&Feel", "Show Free Space", false, i18n("Show free disk space in the Totalsbar"), true,  i18n("Show free disk space in the Totalsbar") },
 
187
        {"Look&Feel", "ShowSpaceInformation", true, i18n("Show space information"), true,  i18n("Show free/total space on the device") },
185
188
    };
186
189
    KonfiguratorCheckBoxGroup *barSett = createCheckBoxGroup(2, 0, barSettings,
187
190
                                          2 /*count*/, miscGrp, PAGE_MISC);
214
217
    grid->addWidget(l, 0, 0);
215
218
    KONFIGURATOR_NAME_VALUE_PAIR *layouts = new KONFIGURATOR_NAME_VALUE_PAIR[numLayouts];
216
219
    for (int i = 0; i != numLayouts; i++) {
217
 
        QString text = layoutNames[i];
218
 
        if(text == "default")
219
 
            text = i18n("default");
220
 
        layouts[ i ].text = text;
 
220
        layouts[ i ].text = KrLayoutFactory::layoutDescription(layoutNames[i]);
221
221
        layouts[ i ].value = layoutNames[i];
222
222
    }
223
223
    KonfiguratorComboBox *cmb = createComboBox("PanelLayout", "Layout", "default",
224
 
                         layouts, numLayouts, tab, true, false, PAGE_MISC);
 
224
                         layouts, numLayouts, tab, true, false, PAGE_LAYOUT);
225
225
    grid->addWidget(cmb, 0, 1);
226
226
    delete [] layouts;
227
227
 
234
234
        { i18n("Statusbar"), "Statusbar" }
235
235
    };
236
236
    cmb = createComboBox("PanelLayout", "FrameColor",
237
 
                            "default", frameColor, 3, tab, true, false, PAGE_MISC);
 
237
                            "default", frameColor, 3, tab, true, false, PAGE_LAYOUT);
238
238
    grid->addWidget(cmb, 1, 1);
239
239
 
240
240
 
248
248
        { i18n("Panel"), "Panel" },
249
249
    };
250
250
    cmb = createComboBox("PanelLayout", "FrameShape",
251
 
                            "default", frameShape, 4, tab, true, false, PAGE_MISC);
 
251
                            "default", frameShape, 4, tab, true, false, PAGE_LAYOUT);
252
252
    grid->addWidget(cmb, 2, 1);
253
253
 
254
254
 
262
262
        { i18n("Sunken"), "Sunken" },
263
263
    };
264
264
    cmb = createComboBox("PanelLayout", "FrameShadow",
265
 
                            "default", frameShadow, 4, tab, true, false, PAGE_MISC);
 
265
                            "default", frameShadow, 4, tab, true, false, PAGE_LAYOUT);
266
266
    grid->addWidget(cmb, 3, 1);
267
267
}
268
268
 
273
273
// -------------------- Filelist icon size ----------------------------------
274
274
    QHBoxLayout *hbox = new QHBoxLayout();
275
275
 
276
 
    hbox->addWidget(new QLabel(i18n("Filelist icon size:"), parent));
 
276
    hbox->addWidget(new QLabel(i18n("Default icon size:"), parent));
277
277
 
278
278
    KONFIGURATOR_NAME_VALUE_PAIR *iconSizes = new KONFIGURATOR_NAME_VALUE_PAIR[KrView::iconSizes.count()];
279
279
    for(int i = 0; i < KrView::iconSizes.count(); i++)
280
280
        iconSizes[i].text =  iconSizes[i].value = QString::number(KrView::iconSizes[i]);
281
 
    KonfiguratorComboBox *cmb = createComboBox(instance->name(), "Filelist Icon Size", _FilelistIconSize, iconSizes, KrView::iconSizes.count(), parent, true, true, PAGE_VIEW);
 
281
    KonfiguratorComboBox *cmb = createComboBox(instance->name(), "IconSize", _FilelistIconSize, iconSizes, KrView::iconSizes.count(), parent, true, true, PAGE_VIEW);
282
282
    delete [] iconSizes;
283
283
    cmb->lineEdit()->setValidator(new QRegExpValidator(QRegExp("[1-9]\\d{0,1}"), cmb));
284
284
    hbox->addWidget(cmb);
292
292
        //   cfg_class             cfg_name        default       text            restart        tooltip
293
293
    {
294
294
        {instance->name(), "With Icons",      _WithIcons,   i18n("Use icons in the filenames"), true,  i18n("Show the icons for filenames and directories.") },
295
 
        {instance->name(), "Show Previews",   false,        i18n("Show previews"),              false, i18n("Show previews of files and directories.") },
 
295
        {instance->name(), "ShowPreviews", false, i18n("Show previews by default"), false, i18n("Show previews of files and directories.") },
296
296
    };
297
297
 
298
298
    KonfiguratorCheckBoxGroup *iconSett = createCheckBoxGroup(2, 0, iconSettings, 2 /*count*/, parent, PAGE_VIEW);