Revision 1794 trunk/client/gui_qt/WidgetConfigAutoImport.cpp
| WidgetConfigAutoImport.cpp (revision 1794) | ||
|---|---|---|
| 76 | 76 |
|
| 77 | 77 |
if (glue->getIsStandalone()) {
|
| 78 | 78 |
/* Update the local configuration */ |
| 79 |
ui->chkEnableAutoImportLocal->setChecked(opts.enable_auto_import); |
|
| 80 |
if (opts.enable_auto_import) {
|
|
| 81 |
//QModelIndex idx = model->setRootPath(opts.auto_import_directory); |
|
| 82 |
QModelIndex idx = model->index(opts.auto_import_directory); |
|
| 83 |
ui->treeViewAutoImportLocal->scrollTo(idx); |
|
| 84 |
ui->treeViewAutoImportLocal->setCurrentIndex(idx); |
|
| 79 |
if (ui->chkEnableAutoImportLocal->isChecked() != opts.enable_auto_import) {
|
|
| 80 |
ui->chkEnableAutoImportLocal->setChecked(opts.enable_auto_import); |
|
| 81 |
if (opts.enable_auto_import) {
|
|
| 82 |
//QModelIndex idx = model->setRootPath(opts.auto_import_directory); |
|
| 83 |
QModelIndex idx = model->index(opts.auto_import_directory); |
|
| 84 |
ui->treeViewAutoImportLocal->scrollTo(idx); |
|
| 85 |
ui->treeViewAutoImportLocal->setCurrentIndex(idx); |
|
| 86 |
} |
|
| 87 |
|
|
| 88 |
#ifdef Q_OS_MAC |
|
| 89 |
/* Directory monitoring using GLib doesn't work on OSX |
|
| 90 |
* so we use Qt to perform directory monitoring */ |
|
| 91 |
if (opts.enable_auto_import) {
|
|
| 92 |
auto_import.enableWatch(opts.auto_import_directory); |
|
| 93 |
} else {
|
|
| 94 |
auto_import.disableWatch(); |
|
| 95 |
} |
|
| 96 |
#endif |
|
| 85 | 97 |
} |
| 86 | 98 |
} else {
|
| 87 | 99 |
/* Update the remote configuration */ |
| 88 |
ui->chkEnableAutoImportServer->setChecked(opts.enable_auto_import); |
|
| 89 |
if (opts.enable_auto_import) {
|
|
| 90 |
ui->editAutoImportServer->setText(opts.auto_import_directory); |
|
| 91 |
ui->btnAutoImportServerApply->setEnabled(false); |
|
| 100 |
if (ui->chkEnableAutoImportServer->isChecked() != opts.enable_auto_import) {
|
|
| 101 |
ui->chkEnableAutoImportServer->setChecked(opts.enable_auto_import); |
|
| 102 |
if (opts.enable_auto_import) {
|
|
| 103 |
ui->editAutoImportServer->setText(opts.auto_import_directory); |
|
| 104 |
ui->btnAutoImportServerApply->setEnabled(false); |
|
| 105 |
} |
|
| 92 | 106 |
} |
| 93 | 107 |
} |
| 94 | 108 |
} |
Also available in: Unified diff
NNTPGrab

