This commit is contained in:
Celil 2011-07-22 15:44:53 -07:00
commit 64c991da2a
13 changed files with 635 additions and 452 deletions

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -3,8 +3,8 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: m0Ray <m0ray@nm.ru>\n"
"POT-Creation-Date: 2011-05-15 18:24+0100\n"
"PO-Revision-Date: 2011-05-23 07:06+0500\n"
"Last-Translator: m0Ray <m0ray@nm.ru>\n"
"PO-Revision-Date: 2011-07-17 04:18+0100\n"
"Last-Translator: Michael Bemmerl <mail@mx-server.de>\n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
@ -448,7 +448,7 @@ msgstr "&Открыть Bitcoin"
#: ../../../src/ui.cpp:2682
msgid "&Send Bitcoins"
msgstr "&Открыть Bitcoin"
msgstr "&Отправить Bitcoins"
#: ../../../src/ui.cpp:2683
msgid "O&ptions..."

View file

@ -2574,6 +2574,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
vGetData.clear();
}
}
mapAlreadyAskedFor[inv] = nNow;
pto->mapAskFor.erase(pto->mapAskFor.begin());
}
if (!vGetData.empty())

View file

@ -41,12 +41,12 @@ DEFS=$(DEFS) /DUSE_UPNP=$(USE_UPNP)
!ENDIF
LIBS=$(LIBS) \
kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib ws2_32.lib shlwapi.lib
kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib ws2_32.lib shlwapi.lib iphlpapi.lib
DEBUGFLAGS=/Os
CFLAGS=/MD /c /nologo /EHsc /GR /Zm300 $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h noui.h init.h wallet.h keystore.h
script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h noui.h init.h wallet.h keystore.h crypter.h
OBJS= \
obj\util.obj \
@ -58,7 +58,8 @@ OBJS= \
obj\main.obj \
obj\wallet.obj \
obj\rpc.obj \
obj\init.obj
obj\init.obj \
obj\crypter.obj
CRYPTOPP_OBJS= \
cryptopp\obj\sha.obj \
@ -93,6 +94,8 @@ obj\rpc.obj: $(HEADERS)
obj\init.obj: $(HEADERS)
obj\crypter.obj: $(HEADERS)
obj\ui.obj: $(HEADERS)
obj\uibase.obj: $(HEADERS)

View file

@ -55,6 +55,12 @@ void BitcoinAmountField::setText(const QString &text)
}
}
void BitcoinAmountField::clear()
{
amount->clear();
decimals->clear();
}
bool BitcoinAmountField::validate()
{
bool valid = true;

View file

@ -18,6 +18,8 @@ public:
void setText(const QString &text);
QString text() const;
void clear();
bool validate();
// Qt messes up the tab chain by default in some cases (issue http://bugreports.qt.nokia.com/browse/QTBUG-10907)
// Hence we have to set it up manually

View file

@ -35,3 +35,9 @@ void QValidatedLineEdit::markValid()
{
setValid(true);
}
void QValidatedLineEdit::clear()
{
setValid(true);
QLineEdit::clear();
}

View file

@ -10,6 +10,7 @@ class QValidatedLineEdit : public QLineEdit
Q_OBJECT
public:
explicit QValidatedLineEdit(QWidget *parent = 0);
void clear();
protected:
void focusInEvent(QFocusEvent *evt);

View file

@ -68,7 +68,7 @@ void SendCoinsEntry::clear()
{
ui->payTo->clear();
ui->addAsLabel->clear();
ui->payAmount->setText(QString());
ui->payAmount->clear();
ui->payTo->setFocus();
}

View file

@ -25,6 +25,8 @@
#include <QMenu>
#include <QApplication>
#include <QClipboard>
#include <QLabel>
#include <QDateTimeEdit>
#include <QDebug>
@ -90,6 +92,7 @@ TransactionView::TransactionView(QWidget *parent) :
QTableView *view = new QTableView(this);
vlayout->addLayout(hlayout);
vlayout->addWidget(createDateRangeWidget());
vlayout->addWidget(view);
vlayout->setSpacing(0);
int width = view->verticalScrollBar()->sizeHint().width();
@ -167,6 +170,7 @@ void TransactionView::setModel(WalletModel *model)
void TransactionView::chooseDate(int idx)
{
QDate current = QDate::currentDate();
dateRangeWidget->setVisible(false);
switch(dateWidget->itemData(idx).toInt())
{
case All:
@ -203,10 +207,10 @@ void TransactionView::chooseDate(int idx)
TransactionFilterProxy::MAX_DATE);
break;
case Range:
// TODO ask specific range
dateRangeWidget->setVisible(true);
dateRangeChanged();
break;
}
}
void TransactionView::chooseType(int idx)
@ -337,3 +341,46 @@ void TransactionView::showDetails()
dlg.exec();
}
}
QWidget *TransactionView::createDateRangeWidget()
{
dateRangeWidget = new QFrame();
dateRangeWidget->setFrameStyle(QFrame::Panel | QFrame::Raised);
dateRangeWidget->setContentsMargins(1,1,1,1);
QHBoxLayout *layout = new QHBoxLayout(dateRangeWidget);
layout->setContentsMargins(0,0,0,0);
layout->addSpacing(23);
layout->addWidget(new QLabel("Range:"));
dateFrom = new QDateTimeEdit(this);
dateFrom->setDisplayFormat("dd/MM/yy");
dateFrom->setCalendarPopup(true);
dateFrom->setMinimumWidth(100);
dateFrom->setDate(QDate::currentDate().addDays(-7));
layout->addWidget(dateFrom);
layout->addWidget(new QLabel("to"));
dateTo = new QDateTimeEdit(this);
dateTo->setDisplayFormat("dd/MM/yy");
dateTo->setCalendarPopup(true);
dateTo->setMinimumWidth(100);
dateTo->setDate(QDate::currentDate());
layout->addWidget(dateTo);
layout->addStretch();
// Hide by default
dateRangeWidget->setVisible(false);
// Notify on change
connect(dateFrom, SIGNAL(dateChanged(QDate)), this, SLOT(dateRangeChanged()));
connect(dateTo, SIGNAL(dateChanged(QDate)), this, SLOT(dateRangeChanged()));
return dateRangeWidget;
}
void TransactionView::dateRangeChanged()
{
transactionProxyModel->setDateRange(
QDateTime(dateFrom->date()),
QDateTime(dateTo->date()).addDays(1));
}

View file

@ -12,6 +12,8 @@ class QComboBox;
class QLineEdit;
class QModelIndex;
class QMenu;
class QFrame;
class QDateTimeEdit;
QT_END_NAMESPACE
class TransactionView : public QWidget
@ -45,8 +47,15 @@ private:
QMenu *contextMenu;
QFrame *dateRangeWidget;
QDateTimeEdit *dateFrom;
QDateTimeEdit *dateTo;
QWidget *createDateRangeWidget();
private slots:
void contextualMenu(const QPoint &);
void dateRangeChanged();
signals:
void doubleClicked(const QModelIndex&);