Fixed #333.
This commit is contained in:
parent
0a8b9afeb5
commit
1fcf08258e
10
resources/scripts/generate-public-headers.sh
Normal file
10
resources/scripts/generate-public-headers.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script will generate list of public headers to be included in packages.
|
||||
#
|
||||
# First argument is the root folder of library of RSS Guard.
|
||||
|
||||
root_folder="$1"
|
||||
headers_regex=".+(services/abstract).+\.h$"
|
||||
|
||||
find "$root_folder" -type f -regextype posix-egrep -regex "$headers_regex" | sed -e "s|^src|..|"
|
@ -14,6 +14,7 @@
|
||||
#include "gui/feedstoolbar.h"
|
||||
#include "gui/feedsview.h"
|
||||
#include "gui/messagebox.h"
|
||||
#include "gui/messagepreviewer.h"
|
||||
#include "gui/messagestoolbar.h"
|
||||
#include "gui/messagesview.h"
|
||||
#include "gui/plaintoolbutton.h"
|
||||
@ -146,6 +147,7 @@ QList<QAction*> FormMain::allActions() const {
|
||||
|
||||
actions << m_ui->m_actionSwitchToolBars;
|
||||
actions << m_ui->m_actionSwitchListHeaders;
|
||||
actions << m_ui->m_actionSwitchMessageViewerToolbars;
|
||||
actions << m_ui->m_actionSwitchStatusBar;
|
||||
actions << m_ui->m_actionSwitchMessageListOrientation;
|
||||
actions << m_ui->m_actionTabsNext;
|
||||
@ -497,6 +499,7 @@ void FormMain::setupIcons() {
|
||||
m_ui->m_actionSwitchMainMenu->setIcon(icon_theme_factory->fromTheme(QSL("view-restore")));
|
||||
m_ui->m_actionSwitchToolBars->setIcon(icon_theme_factory->fromTheme(QSL("view-restore")));
|
||||
m_ui->m_actionSwitchListHeaders->setIcon(icon_theme_factory->fromTheme(QSL("view-restore")));
|
||||
m_ui->m_actionSwitchMessageViewerToolbars->setIcon(icon_theme_factory->fromTheme(QSL("view-restore")));
|
||||
m_ui->m_actionSwitchStatusBar->setIcon(icon_theme_factory->fromTheme(QSL("dialog-information")));
|
||||
m_ui->m_actionSwitchMessageListOrientation->setIcon(icon_theme_factory->fromTheme(QSL("view-restore")));
|
||||
m_ui->m_menuShowHide->setIcon(icon_theme_factory->fromTheme(QSL("view-restore")));
|
||||
@ -594,6 +597,7 @@ void FormMain::loadSize() {
|
||||
m_ui->m_tabWidget->feedMessageViewer()->loadSize();
|
||||
m_ui->m_actionSwitchToolBars->setChecked(settings->value(GROUP(GUI), SETTING(GUI::ToolbarsVisible)).toBool());
|
||||
m_ui->m_actionSwitchListHeaders->setChecked(settings->value(GROUP(GUI), SETTING(GUI::ListHeadersVisible)).toBool());
|
||||
m_ui->m_actionSwitchMessageViewerToolbars->setChecked(settings->value(GROUP(GUI), SETTING(GUI::MessageViewerToolbarsVisible)).toBool());
|
||||
m_ui->m_actionSwitchStatusBar->setChecked(settings->value(GROUP(GUI), SETTING(GUI::StatusBarVisible)).toBool());
|
||||
|
||||
// Other startup GUI-related settings.
|
||||
@ -755,6 +759,8 @@ void FormMain::createConnections() {
|
||||
tabWidget()->feedMessageViewer(), &FeedMessageViewer::setToolBarsEnabled);
|
||||
connect(m_ui->m_actionSwitchListHeaders, &QAction::toggled,
|
||||
tabWidget()->feedMessageViewer(), &FeedMessageViewer::setListHeadersEnabled);
|
||||
connect(m_ui->m_actionSwitchMessageViewerToolbars, &QAction::toggled,
|
||||
tabWidget()->feedMessageViewer()->messagesBrowser(), &MessagePreviewer::setToolbarsVisible);
|
||||
connect(m_ui->m_actionSelectPreviousItem,
|
||||
&QAction::triggered, tabWidget()->feedMessageViewer()->feedsView(), &FeedsView::selectPreviousItem);
|
||||
connect(m_ui->m_actionSelectNextMessage,
|
||||
|
@ -81,6 +81,7 @@
|
||||
<addaction name="m_actionSwitchToolBars"/>
|
||||
<addaction name="m_actionSwitchListHeaders"/>
|
||||
<addaction name="m_actionSwitchStatusBar"/>
|
||||
<addaction name="m_actionSwitchMessageViewerToolbars"/>
|
||||
</widget>
|
||||
<addaction name="m_menuShowHide"/>
|
||||
<addaction name="m_actionFullscreen"/>
|
||||
@ -793,6 +794,17 @@
|
||||
<string>Automatically &expand items when selected</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="m_actionSwitchMessageViewerToolbars">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Message viewer toolbars</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
@ -233,6 +233,10 @@ void FeedMessageViewer::createConnections() {
|
||||
connect(m_feedsView->sourceModel(), &FeedsModel::reloadMessageListRequested, m_messagesView, &MessagesView::reloadSelections);
|
||||
}
|
||||
|
||||
MessagePreviewer* FeedMessageViewer::messagesBrowser() const {
|
||||
return m_messagesBrowser;
|
||||
}
|
||||
|
||||
void FeedMessageViewer::initialize() {
|
||||
// Initialize/populate toolbars.
|
||||
m_toolBarFeeds->setFloatable(false);
|
||||
|
@ -39,6 +39,7 @@ class RSSGUARD_DLLSPEC FeedMessageViewer : public TabContent {
|
||||
MessagesView* messagesView() const;
|
||||
MessagesToolBar* messagesToolBar() const;
|
||||
FeedsToolBar* feedsToolBar() const;
|
||||
MessagePreviewer* messagesBrowser() const;
|
||||
|
||||
bool areToolBarsEnabled() const;
|
||||
bool areListHeadersEnabled() const;
|
||||
|
@ -79,6 +79,16 @@ void MessagePreviewer::reloadFontSettings() {
|
||||
m_txtMessage->reloadFontSettings();
|
||||
}
|
||||
|
||||
void MessagePreviewer::setToolbarsVisible(bool visible) {
|
||||
m_toolBar->setVisible(visible);
|
||||
|
||||
#if defined (USE_WEBENGINE)
|
||||
m_txtMessage->setNavigationBarVisible(visible);
|
||||
#endif
|
||||
|
||||
qApp->settings()->setValue(GROUP(GUI), GUI::MessageViewerToolbarsVisible, visible);
|
||||
}
|
||||
|
||||
#if defined (USE_WEBENGINE)
|
||||
|
||||
WebBrowser* MessagePreviewer::webBrowser() const {
|
||||
|
@ -46,6 +46,7 @@ class MessagePreviewer : public QWidget {
|
||||
#endif
|
||||
|
||||
public slots:
|
||||
void setToolbarsVisible(bool visible);
|
||||
void clear();
|
||||
void hideToolbar();
|
||||
void loadMessage(const Message& message, RootItem* root);
|
||||
|
@ -29,7 +29,7 @@
|
||||
<enum>QTabWidget::North</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="m_tabIconSkin">
|
||||
<attribute name="title">
|
||||
|
@ -157,6 +157,9 @@ DVALUE(bool) GUI::ToolbarsVisibleDef = true;
|
||||
DKEY GUI::ListHeadersVisible = "enable_list_headers";
|
||||
DVALUE(bool) GUI::ListHeadersVisibleDef = true;
|
||||
|
||||
DKEY GUI::MessageViewerToolbarsVisible = "message_viewer_toolbars";
|
||||
DVALUE(bool) GUI::MessageViewerToolbarsVisibleDef = true;
|
||||
|
||||
DKEY GUI::StatusBarVisible = "enable_status_bar";
|
||||
DVALUE(bool) GUI::StatusBarVisibleDef = true;
|
||||
|
||||
|
@ -170,6 +170,9 @@ namespace GUI {
|
||||
KEY ListHeadersVisible;
|
||||
VALUE(bool) ListHeadersVisibleDef;
|
||||
|
||||
KEY MessageViewerToolbarsVisible;
|
||||
VALUE(bool) MessageViewerToolbarsVisibleDef;
|
||||
|
||||
KEY StatusBarVisible;
|
||||
VALUE(bool) StatusBarVisibleDef;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user