diff 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
line wrap: on
line diff
--- a/mainwindow.cpp	Sat Jun 19 02:01:54 2010 +0300
+++ b/mainwindow.cpp	Sat Jun 19 03:10:51 2010 +0300
@@ -359,12 +359,25 @@
     if (runningAction == ACT_NONE)
     {
         QString hgIgnorePath;
+        QStringList params;
+        QString editorName;
 
-        hgIgnorePath = "file:///";
-        hgIgnorePath += workFolderPath;
+        hgIgnorePath = workFolderPath;
         hgIgnorePath += ".hgignore";
 
-        QDesktopServices::openUrl(QUrl(hgIgnorePath, QUrl::TolerantMode));
+        params << hgIgnorePath;
+
+        if ((getSystem() == "Linux"))
+        {
+            editorName = "gedit";
+        }
+        else
+        {
+            editorName = """C:\\Program Files\\Windows NT\\Accessories\\wordpad.exe""";
+        }
+
+        runner -> startProc(editorName, workFolderPath, params);
+        runningAction = ACT_HG_IGNORE;
     }
 }
 
@@ -942,6 +955,7 @@
                     case ACT_REVERT:
                     case ACT_SERVE:
                     case ACT_TAG:
+                    case ACT_HG_IGNORE:
                         shouldHgStat = true;
                         break;