mirror of
				https://git.wownero.com/wowlet/wowlet.git
				synced 2024-08-15 01:03:14 +00:00 
			
		
		
		
	Merge pull request 'Allow hiding Home tab' (#274) from tobtoht/feather:hide_home into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/274
This commit is contained in:
		
						commit
						cd0c110df8
					
				
					 6 changed files with 24 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -84,6 +84,11 @@ void HistoryWidget::setModel(TransactionHistoryProxyModel *model, Wallet *wallet
 | 
			
		|||
    ui->history->hideColumn(TransactionHistoryModel::TxID);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void HistoryWidget::resetModel()
 | 
			
		||||
{
 | 
			
		||||
    ui->history->setModel(nullptr);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void HistoryWidget::showTxDetails() {
 | 
			
		||||
    QModelIndex index = ui->history->currentIndex();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,6 +27,7 @@ public:
 | 
			
		|||
 | 
			
		||||
public slots:
 | 
			
		||||
    void setSearchText(const QString &text);
 | 
			
		||||
    void resetModel();
 | 
			
		||||
 | 
			
		||||
signals:
 | 
			
		||||
    void viewOnBlockExplorer(QString txid);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -327,7 +327,12 @@ MainWindow::MainWindow(AppContext *ctx, QWidget *parent) :
 | 
			
		|||
    connect(ui->coinsWidget, &CoinsWidget::sweepOutput, m_ctx, &AppContext::onSweepOutput);
 | 
			
		||||
 | 
			
		||||
    connect(m_ctx, &AppContext::walletClosing, [=]{
 | 
			
		||||
        ui->tabWidget->setCurrentIndex(Tabs::HOME);
 | 
			
		||||
        if (!config()->get(Config::showTabHome).toBool())
 | 
			
		||||
            ui->tabWidget->setCurrentIndex(Tabs::HISTORY);
 | 
			
		||||
        else
 | 
			
		||||
            ui->tabWidget->setCurrentIndex(Tabs::HOME);
 | 
			
		||||
 | 
			
		||||
        ui->historyWidget->resetModel();
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    // window title
 | 
			
		||||
| 
						 | 
				
			
			@ -389,6 +394,10 @@ void MainWindow::initMenu() {
 | 
			
		|||
    // hide/show tabs
 | 
			
		||||
    m_tabShowHideSignalMapper = new QSignalMapper(this);
 | 
			
		||||
 | 
			
		||||
    connect(ui->actionShow_Home, &QAction::triggered, m_tabShowHideSignalMapper, QOverload<>::of(&QSignalMapper::map));
 | 
			
		||||
    m_tabShowHideMapper["Home"] = new ToggleTab(ui->tabHome, "Home", "Home", ui->actionShow_Home, Config::showTabHome);
 | 
			
		||||
    m_tabShowHideSignalMapper->setMapping(ui->actionShow_Home, "Home");
 | 
			
		||||
 | 
			
		||||
    connect(ui->actionShow_Coins, &QAction::triggered, m_tabShowHideSignalMapper, QOverload<>::of(&QSignalMapper::map));
 | 
			
		||||
    m_tabShowHideMapper["Coins"] = new ToggleTab(ui->tabCoins, "Coins", "Coins", ui->actionShow_Coins, Config::showTabCoins);
 | 
			
		||||
    m_tabShowHideSignalMapper->setMapping(ui->actionShow_Coins, "Coins");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -463,6 +463,7 @@
 | 
			
		|||
    <property name="title">
 | 
			
		||||
     <string>View</string>
 | 
			
		||||
    </property>
 | 
			
		||||
    <addaction name="actionShow_Home"/>
 | 
			
		||||
    <addaction name="actionShow_Coins"/>
 | 
			
		||||
    <addaction name="actionShow_calc"/>
 | 
			
		||||
    <addaction name="actionShow_Exchange"/>
 | 
			
		||||
| 
						 | 
				
			
			@ -714,6 +715,11 @@
 | 
			
		|||
    <string>Rescan spent</string>
 | 
			
		||||
   </property>
 | 
			
		||||
  </action>
 | 
			
		||||
  <action name="actionShow_Home">
 | 
			
		||||
   <property name="text">
 | 
			
		||||
    <string>Show Home</string>
 | 
			
		||||
   </property>
 | 
			
		||||
  </action>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <layoutdefault spacing="6" margin="11"/>
 | 
			
		||||
 <customwidgets>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,6 +36,7 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
 | 
			
		|||
        {Config::websocketEnabled,{QS("websocketEnabled"), true}},
 | 
			
		||||
        {Config::nodeSource,{QS("nodeSource"), 0}},
 | 
			
		||||
        {Config::useOnionNodes,{QS("useOnionNodes"), false}},
 | 
			
		||||
        {Config::showTabHome,{QS("showTabHome"), true}},
 | 
			
		||||
        {Config::showTabCoins,{QS("showTabCoins"), false}},
 | 
			
		||||
        {Config::showTabExchange, {QS("showTabExchange"), true}},
 | 
			
		||||
        {Config::showTabXMRig,{QS("showTabXMRig"), false}},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,6 +38,7 @@ public:
 | 
			
		|||
        websocketEnabled,
 | 
			
		||||
        nodeSource,
 | 
			
		||||
        useOnionNodes,
 | 
			
		||||
        showTabHome,
 | 
			
		||||
        showTabCoins,
 | 
			
		||||
        showTabExchange,
 | 
			
		||||
        showTabCalc,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue