mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-30 09:04:52 +01:00
Switched some defaults & added Web browser menu.
This commit is contained in:
parent
1b48758a25
commit
cb3c4885c9
@ -8,7 +8,8 @@ Added:
|
|||||||
|
|
||||||
Changed:
|
Changed:
|
||||||
▪ Minimal Qt version bumped to 5.7.0 - this will lead to some betere features in the future.
|
▪ Minimal Qt version bumped to 5.7.0 - this will lead to some betere features in the future.
|
||||||
▪ Updated miscellaneous libraries - MariadDB, openSSL.
|
▪ Updated miscellaneous libraries - MariadDB, openSSL (Windows only).
|
||||||
|
▪ Main menu is by default hidden, tab bar is now always visible. Main menu is now accessible via left/top corner iconified button. Users can of course tweak settings in Tools -> Options -> User interface.
|
||||||
|
|
||||||
Removed:
|
Removed:
|
||||||
▪ All skins except default are removed because it is difficult for me to maintain all of them. Any user can pickup removed skin from repository, tweak it (it is easy) and send it to me and I will include it with next version of RSS Guard.
|
▪ All skins except default are removed because it is difficult for me to maintain all of them. Any user can pickup removed skin from repository, tweak it (it is easy) and send it to me and I will include it with next version of RSS Guard.
|
||||||
|
@ -385,6 +385,11 @@ void FormMain::setupIcons() {
|
|||||||
m_ui->m_actionAddFeedIntoSelectedAccount->setIcon(icon_theme_factory->fromTheme(QSL("application-rss+xml")));
|
m_ui->m_actionAddFeedIntoSelectedAccount->setIcon(icon_theme_factory->fromTheme(QSL("application-rss+xml")));
|
||||||
m_ui->m_actionAddCategoryIntoSelectedAccount->setIcon(icon_theme_factory->fromTheme(QSL("folder")));
|
m_ui->m_actionAddCategoryIntoSelectedAccount->setIcon(icon_theme_factory->fromTheme(QSL("folder")));
|
||||||
|
|
||||||
|
// Tabs & web browser.
|
||||||
|
m_ui->m_actionTabNewWebBrowser->setIcon(icon_theme_factory->fromTheme(QSL("tab-new")));
|
||||||
|
m_ui->m_actionTabsCloseAll->setIcon(icon_theme_factory->fromTheme(QSL("window-close")));
|
||||||
|
m_ui->m_actionTabsCloseAllExceptCurrent->setIcon(icon_theme_factory->fromTheme(QSL("window-close")));
|
||||||
|
|
||||||
// Setup icons on TabWidget too.
|
// Setup icons on TabWidget too.
|
||||||
m_ui->m_tabWidget->setupIcons();
|
m_ui->m_tabWidget->setupIcons();
|
||||||
}
|
}
|
||||||
@ -475,6 +480,11 @@ void FormMain::createConnections() {
|
|||||||
connect(m_ui->m_actionReportBugBitBucket, SIGNAL(triggered()), this, SLOT(reportABugOnBitBucket()));
|
connect(m_ui->m_actionReportBugBitBucket, SIGNAL(triggered()), this, SLOT(reportABugOnBitBucket()));
|
||||||
connect(m_ui->m_actionDonate, SIGNAL(triggered()), this, SLOT(donate()));
|
connect(m_ui->m_actionDonate, SIGNAL(triggered()), this, SLOT(donate()));
|
||||||
connect(m_ui->m_actionDisplayWiki, SIGNAL(triggered()), this, SLOT(showWiki()));
|
connect(m_ui->m_actionDisplayWiki, SIGNAL(triggered()), this, SLOT(showWiki()));
|
||||||
|
|
||||||
|
// Tab widget connections.
|
||||||
|
connect(m_ui->m_actionTabsCloseAllExceptCurrent, &QAction::triggered, m_ui->m_tabWidget, &TabWidget::closeAllTabsExceptCurrent);
|
||||||
|
connect(m_ui->m_actionTabsCloseAll, &QAction::triggered, m_ui->m_tabWidget, &TabWidget::closeAllTabs);
|
||||||
|
connect(m_ui->m_actionTabNewWebBrowser, &QAction::triggered, m_ui->m_tabWidget, &TabWidget::addEmptyBrowser);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormMain::backupDatabaseSettings() {
|
void FormMain::backupDatabaseSettings() {
|
||||||
|
@ -160,12 +160,21 @@
|
|||||||
<addaction name="m_actionServiceEdit"/>
|
<addaction name="m_actionServiceEdit"/>
|
||||||
<addaction name="m_actionServiceDelete"/>
|
<addaction name="m_actionServiceDelete"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QMenu" name="m_menuWebBrowserTabs">
|
||||||
|
<property name="title">
|
||||||
|
<string>Web browser && tabs</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="m_actionTabNewWebBrowser"/>
|
||||||
|
<addaction name="m_actionTabsCloseAll"/>
|
||||||
|
<addaction name="m_actionTabsCloseAllExceptCurrent"/>
|
||||||
|
</widget>
|
||||||
<addaction name="m_menuFile"/>
|
<addaction name="m_menuFile"/>
|
||||||
<addaction name="m_menuView"/>
|
<addaction name="m_menuView"/>
|
||||||
<addaction name="m_menuAccounts"/>
|
<addaction name="m_menuAccounts"/>
|
||||||
<addaction name="m_menuFeeds"/>
|
<addaction name="m_menuFeeds"/>
|
||||||
<addaction name="m_menuMessages"/>
|
<addaction name="m_menuMessages"/>
|
||||||
<addaction name="m_menuRecycleBin"/>
|
<addaction name="m_menuRecycleBin"/>
|
||||||
|
<addaction name="m_menuWebBrowserTabs"/>
|
||||||
<addaction name="m_menuTools"/>
|
<addaction name="m_menuTools"/>
|
||||||
<addaction name="m_menuHelp"/>
|
<addaction name="m_menuHelp"/>
|
||||||
</widget>
|
</widget>
|
||||||
@ -697,6 +706,21 @@
|
|||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="m_actionTabNewWebBrowser">
|
||||||
|
<property name="text">
|
||||||
|
<string>New tab</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="m_actionTabsCloseAll">
|
||||||
|
<property name="text">
|
||||||
|
<string>Close all tabs</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="m_actionTabsCloseAllExceptCurrent">
|
||||||
|
<property name="text">
|
||||||
|
<string>Close all tabs except current</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
@ -58,9 +58,11 @@ void TabWidget::openMainMenu() {
|
|||||||
m_menuMain = new QMenu(tr("Main menu"), this);
|
m_menuMain = new QMenu(tr("Main menu"), this);
|
||||||
m_menuMain->addMenu(qApp->mainForm()->m_ui->m_menuFile);
|
m_menuMain->addMenu(qApp->mainForm()->m_ui->m_menuFile);
|
||||||
m_menuMain->addMenu(qApp->mainForm()->m_ui->m_menuView);
|
m_menuMain->addMenu(qApp->mainForm()->m_ui->m_menuView);
|
||||||
|
m_menuMain->addMenu(qApp->mainForm()->m_ui->m_menuAccounts);
|
||||||
m_menuMain->addMenu(qApp->mainForm()->m_ui->m_menuFeeds);
|
m_menuMain->addMenu(qApp->mainForm()->m_ui->m_menuFeeds);
|
||||||
m_menuMain->addMenu(qApp->mainForm()->m_ui->m_menuMessages);
|
m_menuMain->addMenu(qApp->mainForm()->m_ui->m_menuMessages);
|
||||||
m_menuMain->addMenu(qApp->mainForm()->m_ui->m_menuTools);
|
m_menuMain->addMenu(qApp->mainForm()->m_ui->m_menuTools);
|
||||||
|
m_menuMain->addMenu(qApp->mainForm()->m_ui->m_menuWebBrowserTabs);
|
||||||
m_menuMain->addMenu(qApp->mainForm()->m_ui->m_menuHelp);
|
m_menuMain->addMenu(qApp->mainForm()->m_ui->m_menuHelp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,35 +177,24 @@ bool TabWidget::closeCurrentTab() {
|
|||||||
void TabWidget::closeAllTabsExceptCurrent() {
|
void TabWidget::closeAllTabsExceptCurrent() {
|
||||||
// Close tabs after active tab.
|
// Close tabs after active tab.
|
||||||
int index_of_active = currentIndex();
|
int index_of_active = currentIndex();
|
||||||
int total_count = count();
|
|
||||||
int iterative_index = 0;
|
|
||||||
|
|
||||||
while (total_count-- > 0) {
|
for (int i = count() - 1; i >= 0; i--) {
|
||||||
if (iterative_index < index_of_active) {
|
if (i != index_of_active) {
|
||||||
// Deleting tab on the left from the active one.
|
if (i < index_of_active) {
|
||||||
if (closeTab(iterative_index)) {
|
|
||||||
// We successfully deleted that LEFT tab.
|
|
||||||
index_of_active--;
|
index_of_active--;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
// We reached "non-closable" tab, go forward.
|
closeTab(i);
|
||||||
iterative_index++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (iterative_index > index_of_active) {
|
|
||||||
// Deleting tab on the right from the active one.
|
|
||||||
if (!closeTab(iterative_index)) {
|
|
||||||
// We reached "non-closable" tab, go forward.
|
|
||||||
iterative_index++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// We iterate through active tab now, no deleting;
|
|
||||||
iterative_index++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TabWidget::closeAllTabs() {
|
||||||
|
for (int i = count() - 1; i >= 0; i--) {
|
||||||
|
closeTab(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int TabWidget::addNewspaperView(RootItem *root, const QList<Message> &messages) {
|
int TabWidget::addNewspaperView(RootItem *root, const QList<Message> &messages) {
|
||||||
WebBrowser *prev = new WebBrowser(this);
|
WebBrowser *prev = new WebBrowser(this);
|
||||||
int index = addTab(prev, qApp->icons()->fromTheme(QSL("text-x-script")), tr("Newspaper view"), TabBar::Closable);
|
int index = addTab(prev, qApp->icons()->fromTheme(QSL("text-x-script")), tr("Newspaper view"), TabBar::Closable);
|
||||||
|
@ -103,15 +103,17 @@ class TabWidget : public QTabWidget {
|
|||||||
bool closeTab(int index);
|
bool closeTab(int index);
|
||||||
bool closeCurrentTab();
|
bool closeCurrentTab();
|
||||||
|
|
||||||
|
// Closes all "closable" tabs except the active tab.
|
||||||
|
void closeAllTabsExceptCurrent();
|
||||||
|
|
||||||
|
void closeAllTabs();
|
||||||
|
|
||||||
// Opens main menu.
|
// Opens main menu.
|
||||||
void openMainMenu();
|
void openMainMenu();
|
||||||
|
|
||||||
// Displays download manager.
|
// Displays download manager.
|
||||||
void showDownloadManager();
|
void showDownloadManager();
|
||||||
|
|
||||||
// Closes all "closable" tabs except the active tab.
|
|
||||||
void closeAllTabsExceptCurrent();
|
|
||||||
|
|
||||||
int addNewspaperView(RootItem *root, const QList<Message> &messages);
|
int addNewspaperView(RootItem *root, const QList<Message> &messages);
|
||||||
|
|
||||||
// Adds new WebBrowser tab to global TabWidget.
|
// Adds new WebBrowser tab to global TabWidget.
|
||||||
|
@ -95,7 +95,7 @@ DKEY GUI::MainWindowStartsMaximized = "window_is_maximized";
|
|||||||
DVALUE(bool) GUI::MainWindowStartsMaximizedDef = false;
|
DVALUE(bool) GUI::MainWindowStartsMaximizedDef = false;
|
||||||
|
|
||||||
DKEY GUI::MainMenuVisible = "main_menu_visible";
|
DKEY GUI::MainMenuVisible = "main_menu_visible";
|
||||||
DVALUE(bool) GUI::MainMenuVisibleDef = true;
|
DVALUE(bool) GUI::MainMenuVisibleDef = false;
|
||||||
|
|
||||||
DKEY GUI::ToolbarsVisible = "enable_toolbars";
|
DKEY GUI::ToolbarsVisible = "enable_toolbars";
|
||||||
DVALUE(bool) GUI::ToolbarsVisibleDef = true;
|
DVALUE(bool) GUI::ToolbarsVisibleDef = true;
|
||||||
@ -125,7 +125,7 @@ DKEY GUI::TabNewDoubleClick = "tab_new_double_button";
|
|||||||
DVALUE(bool) GUI::TabNewDoubleClickDef = true;
|
DVALUE(bool) GUI::TabNewDoubleClickDef = true;
|
||||||
|
|
||||||
DKEY GUI::HideTabBarIfOnlyOneTab = "hide_tabbar_one_tab";
|
DKEY GUI::HideTabBarIfOnlyOneTab = "hide_tabbar_one_tab";
|
||||||
DVALUE(bool) GUI::HideTabBarIfOnlyOneTabDef = true;
|
DVALUE(bool) GUI::HideTabBarIfOnlyOneTabDef = false;
|
||||||
|
|
||||||
DKEY GUI::MessagesToolbarDefaultButtons = "messages_toolbar";
|
DKEY GUI::MessagesToolbarDefaultButtons = "messages_toolbar";
|
||||||
DVALUE(char*) GUI::MessagesToolbarDefaultButtonsDef = "m_actionMarkSelectedMessagesAsRead,m_actionMarkSelectedMessagesAsUnread,m_actionSwitchImportanceOfSelectedMessages,separator,highlighter,spacer,search";
|
DVALUE(char*) GUI::MessagesToolbarDefaultButtonsDef = "m_actionMarkSelectedMessagesAsRead,m_actionMarkSelectedMessagesAsUnread,m_actionSwitchImportanceOfSelectedMessages,separator,highlighter,spacer,search";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user