comparison 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
comparison
equal deleted inserted replaced
177:bb89bcd8986b 178:1a3af8617ea4
92 pathsLayout->addWidget(m_diffPathEdit, row, 1); 92 pathsLayout->addWidget(m_diffPathEdit, row, 1);
93 93
94 browse = new QPushButton(tr("Browse...")); 94 browse = new QPushButton(tr("Browse..."));
95 pathsLayout->addWidget(browse, row++, 2); 95 pathsLayout->addWidget(browse, row++, 2);
96 connect(browse, SIGNAL(clicked()), this, SLOT(diffPathBrowse())); 96 connect(browse, SIGNAL(clicked()), this, SLOT(diffPathBrowse()));
97 97
98 pathsLayout->addWidget(new QLabel(tr("External file-merge program:")), row, 0); 98 pathsLayout->addWidget(new QLabel(tr("External file-merge program:")), row, 0);
99 99
100 m_mergePathEdit = new QLineEdit(); 100 m_mergePathEdit = new QLineEdit();
101 m_mergePathEdit->setText(settings.value("mergebinary").toString()); 101 m_mergePathEdit->setText(settings.value("mergebinary").toString());
102 connect(m_mergePathEdit, SIGNAL(textChanged(const QString &)), 102 connect(m_mergePathEdit, SIGNAL(textChanged(const QString &)),
105 105
106 browse = new QPushButton(tr("Browse...")); 106 browse = new QPushButton(tr("Browse..."));
107 pathsLayout->addWidget(browse, row++, 2); 107 pathsLayout->addWidget(browse, row++, 2);
108 connect(browse, SIGNAL(clicked()), this, SLOT(mergePathBrowse())); 108 connect(browse, SIGNAL(clicked()), this, SLOT(mergePathBrowse()));
109 109
110 pathsLayout->addWidget(new QLabel(tr("External text editor:")), row, 0);
111
112 m_editPathEdit = new QLineEdit();
113 m_editPathEdit->setText(settings.value("editorbinary").toString());
114 connect(m_editPathEdit, SIGNAL(textChanged(const QString &)),
115 this, SLOT(editPathChanged(const QString &)));
116 pathsLayout->addWidget(m_editPathEdit, row, 1);
117
118 browse = new QPushButton(tr("Browse..."));
119 pathsLayout->addWidget(browse, row++, 2);
120 connect(browse, SIGNAL(clicked()), this, SLOT(editPathBrowse()));
121
110 settings.endGroup(); 122 settings.endGroup();
111 123
112 settings.beginGroup("Locations"); 124 settings.beginGroup("Locations");
113 125
114 pathsLayout->addWidget(new QLabel(tr("EasyHg Mercurial extension:")), row, 0); 126 pathsLayout->addWidget(new QLabel(tr("EasyHg Mercurial extension:")), row, 0);
184 SettingsDialog::mergePathBrowse() 196 SettingsDialog::mergePathBrowse()
185 { 197 {
186 } 198 }
187 199
188 void 200 void
189 SettingsDialog::editorPathChanged(const QString &s) 201 SettingsDialog::editPathChanged(const QString &s)
190 { 202 {
191 } 203 }
192 204
193 void 205 void
194 SettingsDialog::editorPathBrowse() 206 SettingsDialog::editPathBrowse()
195 { 207 {
196 } 208 }
197 209
198 void 210 void
199 SettingsDialog::extensionPathChanged(const QString &s) 211 SettingsDialog::extensionPathChanged(const QString &s)