comparison mainwindow.cpp @ 36:5986d0758069

Version 0.5.3. Fixed .hgignore editing in windows.
author Jari Korhonen <jtkorhonen@gmail.com>
date Sat, 19 Jun 2010 03:10:51 +0300
parents 43e3b271d293
children 46260ce88b71
comparison
equal deleted inserted replaced
35:7d8167182b73 36:5986d0758069
357 void MainWindow::hgIgnore() 357 void MainWindow::hgIgnore()
358 { 358 {
359 if (runningAction == ACT_NONE) 359 if (runningAction == ACT_NONE)
360 { 360 {
361 QString hgIgnorePath; 361 QString hgIgnorePath;
362 362 QStringList params;
363 hgIgnorePath = "file:///"; 363 QString editorName;
364 hgIgnorePath += workFolderPath; 364
365 hgIgnorePath = workFolderPath;
365 hgIgnorePath += ".hgignore"; 366 hgIgnorePath += ".hgignore";
366 367
367 QDesktopServices::openUrl(QUrl(hgIgnorePath, QUrl::TolerantMode)); 368 params << hgIgnorePath;
369
370 if ((getSystem() == "Linux"))
371 {
372 editorName = "gedit";
373 }
374 else
375 {
376 editorName = """C:\\Program Files\\Windows NT\\Accessories\\wordpad.exe""";
377 }
378
379 runner -> startProc(editorName, workFolderPath, params);
380 runningAction = ACT_HG_IGNORE;
368 } 381 }
369 } 382 }
370 383
371 384
372 385
940 case ACT_FOLDERDIFF: 953 case ACT_FOLDERDIFF:
941 case ACT_CHGSETDIFF: 954 case ACT_CHGSETDIFF:
942 case ACT_REVERT: 955 case ACT_REVERT:
943 case ACT_SERVE: 956 case ACT_SERVE:
944 case ACT_TAG: 957 case ACT_TAG:
958 case ACT_HG_IGNORE:
945 shouldHgStat = true; 959 shouldHgStat = true;
946 break; 960 break;
947 961
948 case ACT_UPDATE: 962 case ACT_UPDATE:
949 QMessageBox::information(this, "update", runner -> getStdOut()); 963 QMessageBox::information(this, "update", runner -> getStdOut());