Added option to hide toolbars.
This commit is contained in:
parent
2399c39d1f
commit
2629136a77
@ -10,6 +10,7 @@ Fixed:
|
|||||||
|
|
||||||
Added:
|
Added:
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>Added option to hide main toolbars.</li>
|
||||||
<li>"Defragment database" button shortcut is now changeable.</li>
|
<li>"Defragment database" button shortcut is now changeable.</li>
|
||||||
<li>Added option to clear keyboard shortcuts.</li>
|
<li>Added option to clear keyboard shortcuts.</li>
|
||||||
<li>Added "progress bar" to web browser.</li>
|
<li>Added "progress bar" to web browser.</li>
|
||||||
|
@ -97,6 +97,9 @@ void FeedMessageViewer::saveSize() {
|
|||||||
KEY_MESSAGES_VIEW + QString::number(MSG_DB_DCREATED_INDEX),
|
KEY_MESSAGES_VIEW + QString::number(MSG_DB_DCREATED_INDEX),
|
||||||
width_column_date);
|
width_column_date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Store "visibility" of toolbars.
|
||||||
|
settings->setValue(APP_CFG_GUI, "enable_toolbars", m_toolBarsEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FeedMessageViewer::loadSize() {
|
void FeedMessageViewer::loadSize() {
|
||||||
@ -132,6 +135,12 @@ void FeedMessageViewer::quit() {
|
|||||||
m_feedDownloader->deleteLater();
|
m_feedDownloader->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FeedMessageViewer::setToolBarsEnabled(bool enable) {
|
||||||
|
m_toolBarsEnabled = enable;
|
||||||
|
m_toolBarFeeds->setVisible(enable);
|
||||||
|
m_toolBarMessages->setVisible(enable);
|
||||||
|
}
|
||||||
|
|
||||||
void FeedMessageViewer::updateTrayIconStatus(int unread_messages,
|
void FeedMessageViewer::updateTrayIconStatus(int unread_messages,
|
||||||
int total_messages) {
|
int total_messages) {
|
||||||
Q_UNUSED(total_messages)
|
Q_UNUSED(total_messages)
|
||||||
@ -263,6 +272,8 @@ void FeedMessageViewer::createConnections() {
|
|||||||
SIGNAL(triggered()), this, SLOT(switchFeedComponentVisibility()));
|
SIGNAL(triggered()), this, SLOT(switchFeedComponentVisibility()));
|
||||||
connect(form_main->m_ui->m_actionSelectNextFeedCategory,
|
connect(form_main->m_ui->m_actionSelectNextFeedCategory,
|
||||||
SIGNAL(triggered()), m_feedsView, SLOT(selectNextItem()));
|
SIGNAL(triggered()), m_feedsView, SLOT(selectNextItem()));
|
||||||
|
connect(form_main->m_ui->m_actionSwitchToolBars,
|
||||||
|
SIGNAL(toggled(bool)), this, SLOT(setToolBarsEnabled(bool)));
|
||||||
connect(form_main->m_ui->m_actionSelectPreviousFeedCategory,
|
connect(form_main->m_ui->m_actionSelectPreviousFeedCategory,
|
||||||
SIGNAL(triggered()), m_feedsView, SLOT(selectPreviousItem()));
|
SIGNAL(triggered()), m_feedsView, SLOT(selectPreviousItem()));
|
||||||
connect(form_main->m_ui->m_actionSelectNextMessage,
|
connect(form_main->m_ui->m_actionSelectNextMessage,
|
||||||
|
@ -60,7 +60,14 @@ class FeedMessageViewer : public TabContent {
|
|||||||
// stops any child widgets/workers.
|
// stops any child widgets/workers.
|
||||||
void quit();
|
void quit();
|
||||||
|
|
||||||
|
inline bool areToolBarsEnabled() const {
|
||||||
|
return m_toolBarsEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
// Enables/disables main toolbars.
|
||||||
|
void setToolBarsEnabled(bool enable);
|
||||||
|
|
||||||
// Runs "cleanup" of the database.
|
// Runs "cleanup" of the database.
|
||||||
void vacuumDatabase();
|
void vacuumDatabase();
|
||||||
|
|
||||||
@ -91,6 +98,7 @@ class FeedMessageViewer : public TabContent {
|
|||||||
void createConnections();
|
void createConnections();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool m_toolBarsEnabled;
|
||||||
QToolBar *m_toolBarFeeds;
|
QToolBar *m_toolBarFeeds;
|
||||||
QToolBar *m_toolBarMessages;
|
QToolBar *m_toolBarMessages;
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ QList<QAction*> FormMain::allActions() {
|
|||||||
actions << m_ui->m_actionSettings << m_ui->m_actionQuit <<
|
actions << m_ui->m_actionSettings << m_ui->m_actionQuit <<
|
||||||
m_ui->m_actionFullscreen << m_ui->m_actionAboutGuard <<
|
m_ui->m_actionFullscreen << m_ui->m_actionAboutGuard <<
|
||||||
m_ui->m_actionSwitchFeedsList << m_ui->m_actionSwitchMainWindow <<
|
m_ui->m_actionSwitchFeedsList << m_ui->m_actionSwitchMainWindow <<
|
||||||
m_ui->m_actionSwitchMainMenu;
|
m_ui->m_actionSwitchMainMenu << m_ui->m_actionSwitchToolBars;
|
||||||
|
|
||||||
// Add web browser actions
|
// Add web browser actions
|
||||||
actions << m_ui->m_actionAddBrowser << m_ui->m_actionCloseCurrentTab <<
|
actions << m_ui->m_actionAddBrowser << m_ui->m_actionCloseCurrentTab <<
|
||||||
@ -271,6 +271,7 @@ void FormMain::setupIcons() {
|
|||||||
m_ui->m_actionFullscreen->setIcon(icon_theme_factory->fromTheme("view-fullscreen"));
|
m_ui->m_actionFullscreen->setIcon(icon_theme_factory->fromTheme("view-fullscreen"));
|
||||||
m_ui->m_actionSwitchFeedsList->setIcon(icon_theme_factory->fromTheme("view-switch-list"));
|
m_ui->m_actionSwitchFeedsList->setIcon(icon_theme_factory->fromTheme("view-switch-list"));
|
||||||
m_ui->m_actionSwitchMainMenu->setIcon(icon_theme_factory->fromTheme("view-switch-menu"));
|
m_ui->m_actionSwitchMainMenu->setIcon(icon_theme_factory->fromTheme("view-switch-menu"));
|
||||||
|
m_ui->m_actionSwitchToolBars->setIcon(icon_theme_factory->fromTheme("view-switch-list"));
|
||||||
m_ui->m_menuShowHide->setIcon(icon_theme_factory->fromTheme("view-switch"));
|
m_ui->m_menuShowHide->setIcon(icon_theme_factory->fromTheme("view-switch"));
|
||||||
|
|
||||||
// Web browser.
|
// Web browser.
|
||||||
@ -339,6 +340,7 @@ void FormMain::loadSize() {
|
|||||||
|
|
||||||
// Adjust dimensions of "feeds & messages" widget.
|
// Adjust dimensions of "feeds & messages" widget.
|
||||||
m_ui->m_tabWidget->feedMessageViewer()->loadSize();
|
m_ui->m_tabWidget->feedMessageViewer()->loadSize();
|
||||||
|
m_ui->m_actionSwitchToolBars->setChecked(settings->value(APP_CFG_GUI, "enable_toolbars", true).toBool());
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormMain::saveSize() {
|
void FormMain::saveSize() {
|
||||||
|
@ -76,6 +76,7 @@
|
|||||||
<addaction name="m_actionFullscreen"/>
|
<addaction name="m_actionFullscreen"/>
|
||||||
<addaction name="m_actionSwitchFeedsList"/>
|
<addaction name="m_actionSwitchFeedsList"/>
|
||||||
<addaction name="m_actionSwitchMainMenu"/>
|
<addaction name="m_actionSwitchMainMenu"/>
|
||||||
|
<addaction name="m_actionSwitchToolBars"/>
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="m_menuShowHide"/>
|
<addaction name="m_menuShowHide"/>
|
||||||
<addaction name="m_actionSwitchMainWindow"/>
|
<addaction name="m_actionSwitchMainWindow"/>
|
||||||
@ -497,6 +498,23 @@
|
|||||||
<string>Report a &bug...</string>
|
<string>Report a &bug...</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="m_actionSwitchToolBars">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&Toolbars</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Switch visibility of main toolbars.</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string notr="true">T</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user