aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoin.cpp4
-rw-r--r--src/qt/bitcoingui.cpp3
-rw-r--r--src/qt/coincontroldialog.cpp14
-rw-r--r--src/qt/coincontroldialog.h28
-rw-r--r--src/qt/forms/addressbookpage.ui6
-rw-r--r--src/qt/forms/coincontroldialog.ui7
-rw-r--r--src/qt/forms/sendcoinsdialog.ui12
7 files changed, 60 insertions, 14 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 162009f5de..652d39a5ce 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -448,12 +448,12 @@ int main(int argc, char *argv[])
fSelParFromCLFailed = true;
}
#ifdef ENABLE_WALLET
- // Parse URIs on command line -- this can affect TestNet() / RegTest() mode
+ // Parse URIs on command line -- this can affect Params()
if (!PaymentServer::ipcParseCommandLine(argc, argv))
exit(0);
#endif
- bool isaTestNet = TestNet() || RegTest();
+ bool isaTestNet = Params().NetworkID() != CChainParams::MAIN;
// Do not refer to data directory yet, this can be overridden by Intro::pickDataDirectory
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index f66fab496c..0ca16edb8c 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -151,8 +151,7 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) :
// Status bar notification icons
QFrame *frameBlocks = new QFrame();
frameBlocks->setContentsMargins(0,0,0,0);
- frameBlocks->setMinimumWidth(56);
- frameBlocks->setMaximumWidth(56);
+ frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);
frameBlocksLayout->setContentsMargins(3,0,3,0);
frameBlocksLayout->setSpacing(3);
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index 2d8fcd7a52..1e5a2efc94 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -125,6 +125,7 @@ CoinControlDialog::CoinControlDialog(QWidget *parent) :
ui->treeWidget->setColumnHidden(COLUMN_VOUT_INDEX, true); // store vout index in this column, but dont show it
ui->treeWidget->setColumnHidden(COLUMN_AMOUNT_INT64, true); // store amount int64 in this column, but dont show it
ui->treeWidget->setColumnHidden(COLUMN_PRIORITY_INT64, true); // store priority int64 in this column, but dont show it
+ ui->treeWidget->setColumnHidden(COLUMN_DATE_INT64, true); // store date int64 in this column, but dont show it
// default view is sorted by amount desc
sortView(COLUMN_AMOUNT_INT64, Qt::DescendingOrder);
@@ -327,7 +328,7 @@ void CoinControlDialog::sortView(int column, Qt::SortOrder order)
sortColumn = column;
sortOrder = order;
ui->treeWidget->sortItems(column, order);
- ui->treeWidget->header()->setSortIndicator((sortColumn == COLUMN_AMOUNT_INT64 ? COLUMN_AMOUNT : (sortColumn == COLUMN_PRIORITY_INT64 ? COLUMN_PRIORITY : sortColumn)), sortOrder);
+ ui->treeWidget->header()->setSortIndicator(getMappedColumn(sortColumn), sortOrder);
}
// treeview: clicked on header
@@ -335,22 +336,18 @@ void CoinControlDialog::headerSectionClicked(int logicalIndex)
{
if (logicalIndex == COLUMN_CHECKBOX) // click on most left column -> do nothing
{
- ui->treeWidget->header()->setSortIndicator((sortColumn == COLUMN_AMOUNT_INT64 ? COLUMN_AMOUNT : (sortColumn == COLUMN_PRIORITY_INT64 ? COLUMN_PRIORITY : sortColumn)), sortOrder);
+ ui->treeWidget->header()->setSortIndicator(getMappedColumn(sortColumn), sortOrder);
}
else
{
- if (logicalIndex == COLUMN_AMOUNT) // sort by amount
- logicalIndex = COLUMN_AMOUNT_INT64;
-
- if (logicalIndex == COLUMN_PRIORITY) // sort by priority
- logicalIndex = COLUMN_PRIORITY_INT64;
+ logicalIndex = getMappedColumn(logicalIndex, false);
if (sortColumn == logicalIndex)
sortOrder = ((sortOrder == Qt::AscendingOrder) ? Qt::DescendingOrder : Qt::AscendingOrder);
else
{
sortColumn = logicalIndex;
- sortOrder = ((sortColumn == COLUMN_AMOUNT_INT64 || sortColumn == COLUMN_PRIORITY_INT64 || sortColumn == COLUMN_DATE || sortColumn == COLUMN_CONFIRMATIONS) ? Qt::DescendingOrder : Qt::AscendingOrder); // if amount,date,conf,priority then default => desc, else default => asc
+ sortOrder = ((sortColumn == COLUMN_LABEL || sortColumn == COLUMN_ADDRESS) ? Qt::AscendingOrder : Qt::DescendingOrder); // if label or address then default => asc, else default => desc
}
sortView(sortColumn, sortOrder);
@@ -731,6 +728,7 @@ void CoinControlDialog::updateView()
// date
itemOutput->setText(COLUMN_DATE, GUIUtil::dateTimeStr(out.tx->GetTxTime()));
+ itemOutput->setText(COLUMN_DATE_INT64, strPad(QString::number(out.tx->GetTxTime()), 20, " "));
// confirmations
itemOutput->setText(COLUMN_CONFIRMATIONS, strPad(QString::number(out.nDepth), 8, " "));
diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h
index b9318ca7b0..465e2a009d 100644
--- a/src/qt/coincontroldialog.h
+++ b/src/qt/coincontroldialog.h
@@ -65,9 +65,35 @@ private:
COLUMN_TXHASH,
COLUMN_VOUT_INDEX,
COLUMN_AMOUNT_INT64,
- COLUMN_PRIORITY_INT64
+ COLUMN_PRIORITY_INT64,
+ COLUMN_DATE_INT64
};
+ // some columns have a hidden column containing the value used for sorting
+ int getMappedColumn(int column, bool fVisibleColumn = true)
+ {
+ if (fVisibleColumn)
+ {
+ if (column == COLUMN_AMOUNT_INT64)
+ return COLUMN_AMOUNT;
+ else if (column == COLUMN_PRIORITY_INT64)
+ return COLUMN_PRIORITY;
+ else if (column == COLUMN_DATE_INT64)
+ return COLUMN_DATE;
+ }
+ else
+ {
+ if (column == COLUMN_AMOUNT)
+ return COLUMN_AMOUNT_INT64;
+ else if (column == COLUMN_PRIORITY)
+ return COLUMN_PRIORITY_INT64;
+ else if (column == COLUMN_DATE)
+ return COLUMN_DATE_INT64;
+ }
+
+ return column;
+ }
+
private slots:
void showMenu(const QPoint &);
void copyAmount();
diff --git a/src/qt/forms/addressbookpage.ui b/src/qt/forms/addressbookpage.ui
index 49221f41c1..f40c446050 100644
--- a/src/qt/forms/addressbookpage.ui
+++ b/src/qt/forms/addressbookpage.ui
@@ -122,6 +122,12 @@
</item>
<item>
<widget class="QPushButton" name="closeButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string>C&amp;lose</string>
</property>
diff --git a/src/qt/forms/coincontroldialog.ui b/src/qt/forms/coincontroldialog.ui
index a31c491e95..cd1c0ffa18 100644
--- a/src/qt/forms/coincontroldialog.ui
+++ b/src/qt/forms/coincontroldialog.ui
@@ -428,7 +428,7 @@
<bool>false</bool>
</property>
<property name="columnCount">
- <number>11</number>
+ <number>12</number>
</property>
<attribute name="headerShowSortIndicator" stdset="0">
<bool>true</bool>
@@ -494,6 +494,11 @@
<string/>
</property>
</column>
+ <column>
+ <property name="text">
+ <string/>
+ </property>
+ </column>
</widget>
</item>
<item>
diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui
index 95f3294adb..4cb1670c79 100644
--- a/src/qt/forms/sendcoinsdialog.ui
+++ b/src/qt/forms/sendcoinsdialog.ui
@@ -742,6 +742,12 @@
</property>
<item>
<widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string>Balance:</string>
</property>
@@ -749,6 +755,12 @@
</item>
<item>
<widget class="QLabel" name="labelBalance">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>