comparison src/settingsdialog.cpp @ 633:db62a0cb3037

* Added setting to specify that diff command should be run once for each selected file, rather than passing all file names to diff command (p4merge doesn't like being given many files)
author Sam Izzo <sam@humbug.net>
date Mon, 27 Aug 2012 01:26:57 +1000
parents 5dc24f89b791
children 58ac1b197666
comparison
equal deleted inserted replaced
632:f9fd48e55af1 633:db62a0cb3037
136 pathsLayout->addWidget(m_diffPathLabel, row, 2); 136 pathsLayout->addWidget(m_diffPathLabel, row, 2);
137 137
138 browse = new QPushButton(tr("Browse...")); 138 browse = new QPushButton(tr("Browse..."));
139 pathsLayout->addWidget(browse, row++, 1); 139 pathsLayout->addWidget(browse, row++, 1);
140 connect(browse, SIGNAL(clicked()), this, SLOT(diffPathBrowse())); 140 connect(browse, SIGNAL(clicked()), this, SLOT(diffPathBrowse()));
141 141
142 m_multipleDiffInstances = new QCheckBox(tr("Multiple instances when multiple files are selected"));
143 pathsLayout->addWidget(m_multipleDiffInstances, row++, 2);
144
142 pathsLayout->addWidget(new QLabel(tr("External file-merge program:")), row, 0); 145 pathsLayout->addWidget(new QLabel(tr("External file-merge program:")), row, 0);
143 146
144 m_mergePathLabel = new QLineEdit(); 147 m_mergePathLabel = new QLineEdit();
145 pathsLayout->addWidget(m_mergePathLabel, row, 2); 148 pathsLayout->addWidget(m_mergePathLabel, row, 2);
146 149
168 m_extensionBrowse = new QPushButton(tr("Browse...")); 171 m_extensionBrowse = new QPushButton(tr("Browse..."));
169 pathsLayout->addWidget(m_extensionBrowse, row++, 1); 172 pathsLayout->addWidget(m_extensionBrowse, row++, 1);
170 connect(m_extensionBrowse, SIGNAL(clicked()), this, SLOT(extensionPathBrowse())); 173 connect(m_extensionBrowse, SIGNAL(clicked()), this, SLOT(extensionPathBrowse()));
171 174
172 pathsLayout->setRowStretch(row, 20); 175 pathsLayout->setRowStretch(row, 20);
176 pathsLayout->setColumnStretch(2, 20);
173 177
174 178
175 reset(); // loads current defaults from settings 179 reset(); // loads current defaults from settings
176 180
177 181
422 settings.remove("sshbinary"); 426 settings.remove("sshbinary");
423 settings.remove("extensionpath"); 427 settings.remove("extensionpath");
424 settings.endGroup(); 428 settings.endGroup();
425 settings.beginGroup(""); 429 settings.beginGroup("");
426 settings.remove("useextension"); 430 settings.remove("useextension");
431 settings.remove("multipleDiffInstances");
427 settings.endGroup(); 432 settings.endGroup();
428 } 433 }
429 434
430 void 435 void
431 SettingsDialog::reset() 436 SettingsDialog::reset()
453 m_extensionPathLabel->setText(settings.value("extensionpath").toString()); 458 m_extensionPathLabel->setText(settings.value("extensionpath").toString());
454 settings.endGroup(); 459 settings.endGroup();
455 settings.beginGroup(""); 460 settings.beginGroup("");
456 m_useExtension->setChecked(settings.value("useextension", true).toBool()); 461 m_useExtension->setChecked(settings.value("useextension", true).toBool());
457 useExtension(m_useExtension->isChecked()); 462 useExtension(m_useExtension->isChecked());
463 m_multipleDiffInstances->setChecked(settings.value("multipleDiffInstances", false).toBool());
458 settings.endGroup(); 464 settings.endGroup();
459 } 465 }
460 466
461 void 467 void
462 SettingsDialog::accept() 468 SettingsDialog::accept()
505 settings.setValue("sshbinary", m_sshPathLabel->text()); 511 settings.setValue("sshbinary", m_sshPathLabel->text());
506 settings.setValue("extensionpath", m_extensionPathLabel->text()); 512 settings.setValue("extensionpath", m_extensionPathLabel->text());
507 settings.endGroup(); 513 settings.endGroup();
508 settings.beginGroup(""); 514 settings.beginGroup("");
509 settings.setValue("useextension", m_useExtension->isChecked()); 515 settings.setValue("useextension", m_useExtension->isChecked());
516 settings.setValue("multipleDiffInstances", m_multipleDiffInstances->isChecked());
510 settings.endGroup(); 517 settings.endGroup();
511 QDialog::accept(); 518 QDialog::accept();
512 } 519 }
513 520
514 521