Mercurial > hg > easyhg
changeset 620:7f1adcdc6cdc
Merge
author | Chris Cannam |
---|---|
date | Wed, 26 Sep 2012 21:29:48 +0100 |
parents | 4f7ca2d192df (current diff) 2d5b831c1a0a (diff) |
children | f635e227775c |
files | src/mainwindow.cpp |
diffstat | 4 files changed, 29 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/easyhg.pro Tue Jul 03 20:10:04 2012 +0100 +++ b/easyhg.pro Wed Sep 26 21:29:48 2012 +0100 @@ -19,6 +19,11 @@ QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.6.sdk CONFIG += x86_64 } +macx-llvm { + CONFIG += x86_64 + QMAKE_CFLAGS += -mmacosx-version-min=10.6 + QMAKE_CXXFLAGS += -mmacosx-version-min=10.6 +} unix { DESTDIR = . @@ -109,8 +114,9 @@ src/fswatcher.cpp \ src/findwidget.cpp + macx-* { - SOURCES += src/common_osx.mm + OBJECTIVE_SOURCES += src/common_osx.mm LIBS += -framework CoreServices -framework Foundation ICON = easyhg-icon.icns }
--- a/src/mainwindow.cpp Tue Jul 03 20:10:04 2012 +0100 +++ b/src/mainwindow.cpp Wed Sep 26 21:29:48 2012 +0100 @@ -357,8 +357,13 @@ void MainWindow::hgLog() { + QSettings settings; + settings.beginGroup("Presentation"); + QStringList params; params << "log"; + params << "--date"; + params << settings.value("datefrom", QDate(2000, 1, 1)).toDate().toString("yyyy-MM-dd") + " to " + QDate::currentDate().toString("yyyy-MM-dd"); params << "--template"; params << Changeset::getLogTemplate();
--- a/src/settingsdialog.cpp Tue Jul 03 20:10:04 2012 +0100 +++ b/src/settingsdialog.cpp Wed Sep 26 21:29:48 2012 +0100 @@ -27,6 +27,7 @@ #include <QFileDialog> #include <QMessageBox> #include <QTabWidget> +#include <QCalendarWidget> QString SettingsDialog::m_installPath; @@ -95,13 +96,18 @@ lookLayout->setColumnStretch(1, 20); #endif + lookLayout->addWidget(new QLabel(tr("History timeline from")), row, 0); + m_dateFrom = new QDateEdit(); + m_dateFrom->setCalendarPopup(true); + lookLayout->addWidget(m_dateFrom, row++, 1, Qt::AlignLeft); + lookLayout->addWidget(new QLabel(tr("Label the history timeline with")), row, 0); m_dateFormat = new QComboBox(); m_dateFormat->addItem(tr("Ages, for example \"5 weeks ago\"")); m_dateFormat->addItem(tr("Dates, for example \"2010-06-23\"")); lookLayout->addWidget(m_dateFormat, row++, 1, Qt::AlignLeft); - lookLayout->setColumnStretch(1, 20); + lookLayout->setColumnStretch(1, 10); lookLayout->setRowStretch(row, 20); @@ -431,6 +437,7 @@ m_workHistoryArrangement->setCurrentIndex(settings.value("workhistoryarrangement", 0).toInt()); #endif m_dateFormat->setCurrentIndex(settings.value("dateformat", 0).toInt()); + m_dateFrom->setDate(settings.value("datefrom", QDate(2000, 1, 1)).toDate()); settings.endGroup(); settings.beginGroup("Locations"); m_hgPathLabel->setText(settings.value("hgbinary").toString()); @@ -478,6 +485,11 @@ settings.setValue("dateformat", i); m_presentationChanged = true; } + if(settings.value("datefrom") != m_dateFrom->date()){ + settings.setValue("datefrom", m_dateFrom->date()); + m_presentationChanged = true; + } + settings.endGroup(); settings.beginGroup("Locations"); settings.setValue("hgbinary", m_hgPathLabel->text());
--- a/src/settingsdialog.h Tue Jul 03 20:10:04 2012 +0100 +++ b/src/settingsdialog.h Wed Sep 26 21:29:48 2012 +0100 @@ -25,6 +25,7 @@ #include <QCheckBox> #include <QComboBox> #include <QTabWidget> +#include <QDateEdit> class SettingsDialog : public QDialog { @@ -76,6 +77,9 @@ QCheckBox *m_showIconLabels; QCheckBox *m_showExtraText; QComboBox *m_dateFormat; + + QDateEdit *m_dateFrom; + #ifdef NOT_IMPLEMENTED_YET QComboBox *m_workHistoryArrangement; #endif