diff settingsdialog.cpp @ 178:1a3af8617ea4

* basic external editor selection (for hgignore)
author Chris Cannam
date Thu, 16 Dec 2010 22:11:38 +0000
parents bb89bcd8986b
children 731aef59d5f4
line wrap: on
line diff
--- a/settingsdialog.cpp	Thu Dec 16 20:23:43 2010 +0000
+++ b/settingsdialog.cpp	Thu Dec 16 22:11:38 2010 +0000
@@ -94,7 +94,7 @@
     browse = new QPushButton(tr("Browse..."));
     pathsLayout->addWidget(browse, row++, 2);
     connect(browse, SIGNAL(clicked()), this, SLOT(diffPathBrowse()));
-
+    
     pathsLayout->addWidget(new QLabel(tr("External file-merge program:")), row, 0);
 
     m_mergePathEdit = new QLineEdit();
@@ -107,6 +107,18 @@
     pathsLayout->addWidget(browse, row++, 2);
     connect(browse, SIGNAL(clicked()), this, SLOT(mergePathBrowse()));
 
+    pathsLayout->addWidget(new QLabel(tr("External text editor:")), row, 0);
+
+    m_editPathEdit = new QLineEdit();
+    m_editPathEdit->setText(settings.value("editorbinary").toString());
+    connect(m_editPathEdit, SIGNAL(textChanged(const QString &)),
+	    this, SLOT(editPathChanged(const QString &)));
+    pathsLayout->addWidget(m_editPathEdit, row, 1);
+
+    browse = new QPushButton(tr("Browse..."));
+    pathsLayout->addWidget(browse, row++, 2);
+    connect(browse, SIGNAL(clicked()), this, SLOT(editPathBrowse()));
+
     settings.endGroup();
     
     settings.beginGroup("Locations");
@@ -186,12 +198,12 @@
 }
 
 void
-SettingsDialog::editorPathChanged(const QString &s)
+SettingsDialog::editPathChanged(const QString &s)
 {
 }
 
 void
-SettingsDialog::editorPathBrowse()
+SettingsDialog::editPathBrowse()
 {
 }