changeset 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 7d8167182b73
children 46260ce88b71
files common.cpp common.h mainwindow.cpp mainwindow.h
diffstat 4 files changed, 19 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/common.cpp	Sat Jun 19 02:01:54 2010 +0300
+++ b/common.cpp	Sat Jun 19 03:10:51 2010 +0300
@@ -30,14 +30,6 @@
         return QString("hg");
 }
 
-QString getDiffMergeDefaultPath()
-{
-    if (getSystem() == "Windows")
-        return QString("c:\\program files\\sourcegear\\diffmerge\\diffmerge.exe");
-    else
-        return QString("/usr/bin/diffmerge");
-}
-
 
 QString getHgDirName()
 {
--- a/common.h	Sat Jun 19 02:01:54 2010 +0300
+++ b/common.h	Sat Jun 19 03:10:51 2010 +0300
@@ -8,7 +8,7 @@
 #include <QtCore>
 
 #define APPNAME                         "HgExplorer"
-#define APPVERSION                      "0.5.2"
+#define APPVERSION                      "0.5.3"
 #define MY_ICON_SIZE                    32
 #define REPOMENU_TITLE                  "Repository actions"
 #define WORKFOLDERMENU_TITLE            "Workfolder actions"
@@ -35,7 +35,6 @@
 
 extern QString getSystem();
 extern QString getHgBinaryName();
-extern QString getDiffMergeDefaultPath();
 extern QString getHgDirName();
 
 #endif 	//COMMON_H
--- 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;
 
--- a/mainwindow.h	Sat Jun 19 02:01:54 2010 +0300
+++ b/mainwindow.h	Sat Jun 19 03:10:51 2010 +0300
@@ -43,6 +43,7 @@
     ACT_RESOLVE_MARK,
     ACT_RETRY_MERGE,
     ACT_TAG,
+    ACT_HG_IGNORE,
 };