changeset 647:a03264984ef8

Merge
author Chris Cannam
date Mon, 21 Jan 2013 10:22:44 +0000
parents 6653fc50a546 (diff) ae67ea0af696 (current diff)
children b55466f7b8bf
files src/fswatcher.cpp src/mainwindow.cpp src/version.h
diffstat 4 files changed, 40 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/easyhg.pro	Mon Jan 07 10:57:08 2013 +0000
+++ b/easyhg.pro	Mon Jan 21 10:22:44 2013 +0000
@@ -4,6 +4,9 @@
 TEMPLATE = app
 TARGET = EasyMercurial
 
+#QT += widgets
+#QMAKE_CXXFLAGS += -DQT_DISABLE_DEPRECATED_BEFORE=0x000000
+
 # We use the 10.5 SDK and Carbon for all 32-bit OS/X,
 # and 10.6 with Cocoa for all 64-bit. (Since EasyHg 1.2,
 # we can sadly no longer build for 10.4 because we need
--- a/src/fswatcher.cpp	Mon Jan 07 10:57:08 2013 +0000
+++ b/src/fswatcher.cpp	Mon Jan 21 10:22:44 2013 +0000
@@ -154,7 +154,9 @@
     FsWatcher *watcher = reinterpret_cast<FsWatcher *>(clientCallBackInfo);
     const char *const *cpaths = reinterpret_cast<const char *const *>(paths);
     for (size_t i = 0; i < numEvents; ++i) {
+#ifdef DEBUG_FSWATCHER
         std::cerr << "path " << i << " = " << cpaths[i] << std::endl;
+#endif
         watcher->fsDirectoryChanged(QString::fromLocal8Bit(cpaths[i]));
     }
 }
@@ -371,7 +373,9 @@
 bool
 FsWatcher::manuallyCheckTrackedFiles()
 {
+#ifdef DEBUG_FSWATCHER
     std::cerr << "FsWatcher::manuallyCheckTrackedFiles" << std::endl;
+#endif
     bool foundChanges = false;
 
     for (PathTimeMap::iterator i = m_trackedFileUpdates.begin();
--- a/src/mainwindow.cpp	Mon Jan 07 10:57:08 2013 +0000
+++ b/src/mainwindow.cpp	Mon Jan 21 10:22:44 2013 +0000
@@ -121,7 +121,6 @@
     connect(m_hgTabs, SIGNAL(showAllChanged()),
             this, SLOT(showAllChanged()));
 
-    setUnifiedTitleAndToolBarOnMac(true);
     connectActions();
     clearState();
     enableDisableActions();
@@ -3085,24 +3084,44 @@
 {
     int sz = 32;
 
+    QString spacerBefore, spacerAfter;
+
+    spacerBefore = spacerAfter = " ";
+
+#ifdef Q_OS_MAC
+    spacerAfter = "";
+#endif
+
+#ifdef Q_OS_WIN32
+    spacerBefore = spacerAfter = "  "
+#endif
+
     bool spacingReqd = false;
     QString spacer = "";
-#ifndef Q_OS_MAC
-    spacingReqd = true;
-    spacer = " ";
-#ifdef Q_OS_WIN32
-    spacer = "  ";
-#endif
-#endif
+
+    m_repoToolBar = addToolBar(tr("Remote"));
+    m_repoToolBar->setIconSize(QSize(sz, sz));
+    if (spacerBefore != "") {
+        m_repoToolBar->addWidget(new QLabel(spacerBefore));
+    }
+    m_repoToolBar->addAction(m_openAct);
+    if (spacerAfter != "") {
+        m_repoToolBar->addWidget(new QLabel(spacerAfter));
+    }
+    m_repoToolBar->addSeparator();
+    m_repoToolBar->addAction(m_hgIncomingAct);
+    m_repoToolBar->addAction(m_hgPullAct);
+    m_repoToolBar->addAction(m_hgPushAct);
+    m_repoToolBar->setMovable(false);
 
     m_workFolderToolBar = new QToolBar(tr("Work"));
     addToolBar(Qt::LeftToolBarArea, m_workFolderToolBar);
     m_workFolderToolBar->setIconSize(QSize(sz, sz));
-    if (spacingReqd) {
-        QWidget *w = new QWidget;
-        w->setFixedHeight(6);
-        m_workFolderToolBar->addWidget(w);
-    }
+
+    QWidget *w = new QWidget;
+    w->setFixedHeight(6);
+    m_workFolderToolBar->addWidget(w);
+
     m_workFolderToolBar->addAction(m_hgFolderDiffAct);
     m_workFolderToolBar->addSeparator();
     m_workFolderToolBar->addAction(m_hgRevertAct);
@@ -3114,21 +3133,6 @@
     m_workFolderToolBar->addAction(m_hgRemoveAct);
     m_workFolderToolBar->setMovable(false);
 
-    m_repoToolBar = addToolBar(tr("Remote"));
-    m_repoToolBar->setIconSize(QSize(sz, sz));
-    if (spacingReqd) {
-        m_repoToolBar->addWidget(new QLabel(spacer));
-    }
-    m_repoToolBar->addAction(m_openAct);
-    if (spacingReqd) {
-        m_repoToolBar->addWidget(new QLabel(spacer));
-    }
-    m_repoToolBar->addSeparator();
-    m_repoToolBar->addAction(m_hgIncomingAct);
-    m_repoToolBar->addAction(m_hgPullAct);
-    m_repoToolBar->addAction(m_hgPushAct);
-    m_repoToolBar->setMovable(false);
-
     updateToolBarStyle();
 }
 
--- a/src/version.h	Mon Jan 07 10:57:08 2013 +0000
+++ b/src/version.h	Mon Jan 21 10:22:44 2013 +0000
@@ -1,1 +1,1 @@
-#define EASYHG_VERSION "1.2.2"
+#define EASYHG_VERSION "1.3"