Browse Source

show wallet.dat size on Settings tab

pull/163/head
DenioD 4 years ago
parent
commit
db378bd3c3
  1. 9
      src/mainwindow.cpp
  2. 39
      src/settings.ui

9
src/mainwindow.cpp

@ -353,6 +353,15 @@ void MainWindow::setupSettingsModal() {
//Use Consolidation
bool isUsingConsolidation = false;
int size = 0;
QDir zcashdir(rpc->getConnection()->config->zcashDir);
QFile WalletSize(zcashdir.filePath("wallet.dat"));
if (WalletSize.open(QIODevice::ReadOnly)){
size = WalletSize.size() / 1000000; //when file does open.
//QString size1 = QString::number(size) ;
settings.WalletSize->setText(QString::number(size));
WalletSize.close();
}
if (rpc->getConnection() != nullptr) {
isUsingConsolidation = !rpc->getConnection()->config->consolidation.isEmpty() == true;
}

39
src/settings.ui

@ -919,6 +919,45 @@
<string>Zindex </string>
</property>
</widget>
<widget class="QLabel" name="WalletSize">
<property name="geometry">
<rect>
<x>330</x>
<y>550</y>
<width>51</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>100</string>
</property>
</widget>
<widget class="QLabel" name="label_22">
<property name="geometry">
<rect>
<x>210</x>
<y>550</y>
<width>111</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Wallet.dat Size :</string>
</property>
</widget>
<widget class="QLabel" name="label_46">
<property name="geometry">
<rect>
<x>370</x>
<y>550</y>
<width>41</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>MB</string>
</property>
</widget>
</widget>
</widget>
</item>

Loading…
Cancel
Save