Renamed some actions, added missing actions to enable changing shortcuts on them.

This commit is contained in:
Martin Rotter 2015-11-11 08:28:59 +01:00
parent 17ee15b87f
commit 0eefcae22e
7 changed files with 69 additions and 67 deletions

View File

@ -114,10 +114,12 @@ QList<QAction*> FormMain::allActions() {
actions << m_ui->m_actionOpenSelectedSourceArticlesExternally;
actions << m_ui->m_actionOpenSelectedSourceArticlesInternally;
actions << m_ui->m_actionOpenSelectedMessagesInternally;
actions << m_ui->m_actionMarkAllFeedsRead;
actions << m_ui->m_actionMarkSelectedFeedsAsRead;
actions << m_ui->m_actionMarkSelectedFeedsAsUnread;
actions << m_ui->m_actionClearSelectedFeeds;
actions << m_ui->m_actionMarkAllItemsRead;
actions << m_ui->m_actionMarkSelectedItemsAsRead;
actions << m_ui->m_actionMarkSelectedItemsAsUnread;
actions << m_ui->m_actionClearSelectedItems;
actions << m_ui->m_actionClearAllItems;
actions << m_ui->m_actionShowOnlyUnreadItems;
actions << m_ui->m_actionMarkSelectedMessagesAsRead;
actions << m_ui->m_actionMarkSelectedMessagesAsUnread;
actions << m_ui->m_actionSwitchImportanceOfSelectedMessages;
@ -127,11 +129,11 @@ QList<QAction*> FormMain::allActions() {
actions << m_ui->m_actionEditSelectedItem;
actions << m_ui->m_actionDeleteSelectedItem;
actions << m_ui->m_actionViewSelectedItemsNewspaperMode;
actions << m_ui->m_actionSelectNextFeedCategory;
actions << m_ui->m_actionSelectPreviousFeedCategory;
actions << m_ui->m_actionSelectNextItem;
actions << m_ui->m_actionSelectPreviousItem;
actions << m_ui->m_actionSelectNextMessage;
actions << m_ui->m_actionSelectPreviousMessage;
actions << m_ui->m_actionExpandCollapseFeedCategory;
actions << m_ui->m_actionExpandCollapseItem;
return actions;
}
@ -149,7 +151,7 @@ void FormMain::prepareMenus() {
m_trayMenu->addAction(m_ui->m_actionSwitchMainWindow);
m_trayMenu->addSeparator();
m_trayMenu->addAction(m_ui->m_actionUpdateAllItems);
m_trayMenu->addAction(m_ui->m_actionMarkAllFeedsRead);
m_trayMenu->addAction(m_ui->m_actionMarkAllItemsRead);
m_trayMenu->addSeparator();
m_trayMenu->addAction(m_ui->m_actionSettings);
m_trayMenu->addAction(m_ui->m_actionQuit);
@ -299,14 +301,14 @@ void FormMain::setupIcons() {
m_ui->m_menuAddItem->setIcon(icon_theme_factory->fromTheme(QSL("item-new")));
m_ui->m_actionUpdateAllItems->setIcon(icon_theme_factory->fromTheme(QSL("item-update-all")));
m_ui->m_actionUpdateSelectedItems->setIcon(icon_theme_factory->fromTheme(QSL("item-update-selected")));
m_ui->m_actionClearSelectedFeeds->setIcon(icon_theme_factory->fromTheme(QSL("mail-remove")));
m_ui->m_actionClearAllFeeds->setIcon(icon_theme_factory->fromTheme(QSL("mail-remove")));
m_ui->m_actionClearSelectedItems->setIcon(icon_theme_factory->fromTheme(QSL("mail-remove")));
m_ui->m_actionClearAllItems->setIcon(icon_theme_factory->fromTheme(QSL("mail-remove")));
m_ui->m_actionDeleteSelectedItem->setIcon(icon_theme_factory->fromTheme(QSL("item-remove")));
m_ui->m_actionDeleteSelectedMessages->setIcon(icon_theme_factory->fromTheme(QSL("mail-remove")));
m_ui->m_actionEditSelectedItem->setIcon(icon_theme_factory->fromTheme(QSL("item-edit")));
m_ui->m_actionMarkAllFeedsRead->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-read")));
m_ui->m_actionMarkSelectedFeedsAsRead->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-read")));
m_ui->m_actionMarkSelectedFeedsAsUnread->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-unread")));
m_ui->m_actionMarkAllItemsRead->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-read")));
m_ui->m_actionMarkSelectedItemsAsRead->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-read")));
m_ui->m_actionMarkSelectedItemsAsUnread->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-unread")));
m_ui->m_actionMarkSelectedMessagesAsRead->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-read")));
m_ui->m_actionMarkSelectedMessagesAsUnread->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-unread")));
m_ui->m_actionSwitchImportanceOfSelectedMessages->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-favorite")));
@ -315,12 +317,12 @@ void FormMain::setupIcons() {
m_ui->m_actionOpenSelectedMessagesInternally->setIcon(icon_theme_factory->fromTheme(QSL("item-open-internal")));
m_ui->m_actionSendMessageViaEmail->setIcon(icon_theme_factory->fromTheme(QSL("item-send-email")));
m_ui->m_actionViewSelectedItemsNewspaperMode->setIcon(icon_theme_factory->fromTheme(QSL("item-newspaper")));
m_ui->m_actionSelectNextFeedCategory->setIcon(icon_theme_factory->fromTheme(QSL("go-down")));
m_ui->m_actionSelectPreviousFeedCategory->setIcon(icon_theme_factory->fromTheme(QSL("go-up")));
m_ui->m_actionSelectNextItem->setIcon(icon_theme_factory->fromTheme(QSL("go-down")));
m_ui->m_actionSelectPreviousItem->setIcon(icon_theme_factory->fromTheme(QSL("go-up")));
m_ui->m_actionSelectNextMessage->setIcon(icon_theme_factory->fromTheme(QSL("go-down")));
m_ui->m_actionSelectPreviousMessage->setIcon(icon_theme_factory->fromTheme(QSL("go-up")));
m_ui->m_actionShowOnlyUnreadFeeds->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-unread")));
m_ui->m_actionExpandCollapseFeedCategory->setIcon(icon_theme_factory->fromTheme(QSL("expand-collapse")));
m_ui->m_actionShowOnlyUnreadItems->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-unread")));
m_ui->m_actionExpandCollapseItem->setIcon(icon_theme_factory->fromTheme(QSL("expand-collapse")));
// Setup icons for underlying components: opened web browsers...
foreach (WebBrowser *browser, WebBrowser::runningWebBrowsers()) {
@ -361,7 +363,7 @@ void FormMain::loadSize() {
m_ui->m_actionSwitchListHeaders->setChecked(settings->value(GROUP(GUI), SETTING(GUI::ListHeadersVisible)).toBool());
// Make sure that only unread feeds are shown if user has that feature set on.
m_ui->m_actionShowOnlyUnreadFeeds->setChecked(settings->value(GROUP(Feeds), SETTING(Feeds::ShowOnlyUnreadFeeds)).toBool());
m_ui->m_actionShowOnlyUnreadItems->setChecked(settings->value(GROUP(Feeds), SETTING(Feeds::ShowOnlyUnreadFeeds)).toBool());
}
void FormMain::saveSize() {

View File

@ -21,7 +21,6 @@
#include "ui_formmain.h"
#include <QMainWindow>
#include <QUrl>
class StatusBar;

View File

@ -139,19 +139,19 @@
<addaction name="m_actionEditSelectedItem"/>
<addaction name="m_actionDeleteSelectedItem"/>
<addaction name="separator"/>
<addaction name="m_actionShowOnlyUnreadFeeds"/>
<addaction name="m_actionExpandCollapseFeedCategory"/>
<addaction name="m_actionShowOnlyUnreadItems"/>
<addaction name="m_actionExpandCollapseItem"/>
<addaction name="separator"/>
<addaction name="m_actionSelectNextFeedCategory"/>
<addaction name="m_actionSelectPreviousFeedCategory"/>
<addaction name="m_actionSelectNextItem"/>
<addaction name="m_actionSelectPreviousItem"/>
<addaction name="separator"/>
<addaction name="m_actionMarkAllFeedsRead"/>
<addaction name="m_actionClearAllFeeds"/>
<addaction name="m_actionMarkAllItemsRead"/>
<addaction name="m_actionClearAllItems"/>
<addaction name="separator"/>
<addaction name="m_actionViewSelectedItemsNewspaperMode"/>
<addaction name="m_actionMarkSelectedFeedsAsRead"/>
<addaction name="m_actionMarkSelectedFeedsAsUnread"/>
<addaction name="m_actionClearSelectedFeeds"/>
<addaction name="m_actionMarkSelectedItemsAsRead"/>
<addaction name="m_actionMarkSelectedItemsAsUnread"/>
<addaction name="m_actionClearSelectedItems"/>
</widget>
<widget class="QMenu" name="m_menuMessages">
<property name="title">
@ -180,8 +180,8 @@
</widget>
<addaction name="m_menuFile"/>
<addaction name="m_menuView"/>
<addaction name="m_menuFeeds"/>
<addaction name="m_menuServices"/>
<addaction name="m_menuFeeds"/>
<addaction name="m_menuMessages"/>
<addaction name="m_menuWebBrowser"/>
<addaction name="m_menuTools"/>
@ -305,20 +305,20 @@
<string>Switch &amp;importance of selected messages</string>
</property>
</action>
<action name="m_actionMarkSelectedFeedsAsRead">
<action name="m_actionMarkSelectedItemsAsRead">
<property name="text">
<string>&amp;Mark selected items as read</string>
</property>
<property name="toolTip">
<string>Mark all messages (without message filters) from selected feeds as read.</string>
<string>Mark all messages (without message filters) from selected items as read.</string>
</property>
</action>
<action name="m_actionMarkSelectedFeedsAsUnread">
<action name="m_actionMarkSelectedItemsAsUnread">
<property name="text">
<string>&amp;Mark selected items as unread</string>
</property>
<property name="toolTip">
<string>Mark all messages (without message filters) from selected feeds as unread.</string>
<string>Mark all messages (without message filters) from selected items as unread.</string>
</property>
</action>
<action name="m_actionDeleteSelectedMessages">
@ -326,12 +326,12 @@
<string>&amp;Delete selected messages</string>
</property>
</action>
<action name="m_actionClearSelectedFeeds">
<action name="m_actionClearSelectedItems">
<property name="text">
<string>&amp;Clean selected items</string>
</property>
<property name="toolTip">
<string>Deletes all messages from selected feeds.</string>
<string>Deletes all messages from selected items.</string>
</property>
</action>
<action name="m_actionOpenSelectedSourceArticlesExternally">
@ -360,12 +360,12 @@
<string notr="true"/>
</property>
</action>
<action name="m_actionMarkAllFeedsRead">
<action name="m_actionMarkAllItemsRead">
<property name="text">
<string>&amp;Mark all items as &amp;read</string>
</property>
<property name="toolTip">
<string>Marks all messages in all feeds read. This does not take message filters into account.</string>
<string>Marks all messages in all items read. This does not take message filters into account.</string>
</property>
</action>
<action name="m_actionViewSelectedItemsNewspaperMode">
@ -373,7 +373,7 @@
<string>View selected items in &amp;newspaper mode</string>
</property>
<property name="toolTip">
<string>Displays all messages from selected feeds/categories in a new &quot;newspaper mode&quot; tab. Note that messages are not set as read automatically.</string>
<string>Displays all messages from selected item in a new &quot;newspaper mode&quot; tab. Note that messages are not set as read automatically.</string>
</property>
</action>
<action name="m_actionSwitchMainWindow">
@ -401,31 +401,31 @@
<string notr="true">L</string>
</property>
</action>
<action name="m_actionClearAllFeeds">
<action name="m_actionClearAllItems">
<property name="text">
<string>&amp;Clean all items</string>
</property>
<property name="toolTip">
<string>Deletes all messages from all feeds.</string>
<string>Deletes all messages from all items.</string>
</property>
<property name="shortcut">
<string notr="true">Ctrl+Shift+C</string>
<string>Ctrl+Shift+C</string>
</property>
</action>
<action name="m_actionSelectNextFeedCategory">
<action name="m_actionSelectNextItem">
<property name="text">
<string>Select &amp;next item</string>
</property>
<property name="shortcut">
<string notr="true">S</string>
<string>S</string>
</property>
</action>
<action name="m_actionSelectPreviousFeedCategory">
<action name="m_actionSelectPreviousItem">
<property name="text">
<string>Select &amp;previous item</string>
</property>
<property name="shortcut">
<string notr="true">A</string>
<string>A</string>
</property>
</action>
<action name="m_actionSelectNextMessage">
@ -600,7 +600,7 @@
<string notr="true">Ctrl+Shift+Del</string>
</property>
</action>
<action name="m_actionShowOnlyUnreadFeeds">
<action name="m_actionShowOnlyUnreadItems">
<property name="checkable">
<bool>true</bool>
</property>
@ -608,15 +608,15 @@
<string>Show only unread items</string>
</property>
<property name="shortcut">
<string notr="true">Ctrl+Shift+U</string>
<string>Ctrl+Shift+U</string>
</property>
</action>
<action name="m_actionExpandCollapseFeedCategory">
<action name="m_actionExpandCollapseItem">
<property name="text">
<string>&amp;Expand/collapse selected item</string>
</property>
<property name="shortcut">
<string notr="true">E</string>
<string>E</string>
</property>
</action>
<action name="m_actionServiceAdd">

View File

@ -296,15 +296,15 @@ void FeedMessageViewer::updateFeedButtonsAvailability() {
form_main->m_ui->m_actionServiceDelete->setEnabled(!critical_action_running && service_selected);
form_main->m_ui->m_actionBackupDatabaseSettings->setEnabled(!critical_action_running);
form_main->m_ui->m_actionCleanupDatabase->setEnabled(!critical_action_running);
form_main->m_ui->m_actionClearSelectedFeeds->setEnabled(feed_selected || category_selected || service_selected);
form_main->m_ui->m_actionClearSelectedItems->setEnabled(feed_selected || category_selected || service_selected);
form_main->m_ui->m_actionDeleteSelectedItem->setEnabled(!critical_action_running && anything_selected);
form_main->m_ui->m_actionEditSelectedItem->setEnabled(!critical_action_running && anything_selected);
form_main->m_ui->m_actionMarkSelectedFeedsAsRead->setEnabled(feed_selected || category_selected || service_selected);
form_main->m_ui->m_actionMarkSelectedFeedsAsUnread->setEnabled(feed_selected || category_selected || service_selected);
form_main->m_ui->m_actionMarkSelectedItemsAsRead->setEnabled(feed_selected || category_selected || service_selected);
form_main->m_ui->m_actionMarkSelectedItemsAsUnread->setEnabled(feed_selected || category_selected || service_selected);
form_main->m_ui->m_actionUpdateAllItems->setEnabled(!critical_action_running);
form_main->m_ui->m_actionUpdateSelectedItems->setEnabled(!critical_action_running && (feed_selected || category_selected || service_selected));
form_main->m_ui->m_actionViewSelectedItemsNewspaperMode->setEnabled(feed_selected || category_selected || service_selected);
form_main->m_ui->m_actionExpandCollapseFeedCategory->setEnabled(feed_selected || category_selected || service_selected);
form_main->m_ui->m_actionExpandCollapseItem->setEnabled(feed_selected || category_selected || service_selected);
form_main->m_ui->m_menuAddItem->setEnabled(!critical_action_running);
}
@ -370,17 +370,17 @@ void FeedMessageViewer::createConnections() {
SIGNAL(triggered()), m_messagesView, SLOT(openSelectedMessagesInternally()));
connect(form_main->m_ui->m_actionSendMessageViaEmail,
SIGNAL(triggered()), m_messagesView, SLOT(sendSelectedMessageViaEmail()));
connect(form_main->m_ui->m_actionMarkAllFeedsRead,
connect(form_main->m_ui->m_actionMarkAllItemsRead,
SIGNAL(triggered()), m_feedsView, SLOT(markAllFeedsRead()));
connect(form_main->m_ui->m_actionMarkSelectedFeedsAsRead,
connect(form_main->m_ui->m_actionMarkSelectedItemsAsRead,
SIGNAL(triggered()), m_feedsView, SLOT(markSelectedFeedsRead()));
connect(form_main->m_ui->m_actionExpandCollapseFeedCategory,
connect(form_main->m_ui->m_actionExpandCollapseItem,
SIGNAL(triggered()), m_feedsView, SLOT(expandCollapseCurrentItem()));
connect(form_main->m_ui->m_actionMarkSelectedFeedsAsUnread,
connect(form_main->m_ui->m_actionMarkSelectedItemsAsUnread,
SIGNAL(triggered()), m_feedsView, SLOT(markSelectedFeedsUnread()));
connect(form_main->m_ui->m_actionClearSelectedFeeds,
connect(form_main->m_ui->m_actionClearSelectedItems,
SIGNAL(triggered()), m_feedsView, SLOT(clearSelectedFeeds()));
connect(form_main->m_ui->m_actionClearAllFeeds,
connect(form_main->m_ui->m_actionClearAllItems,
SIGNAL(triggered()), m_feedsView, SLOT(clearAllFeeds()));
connect(form_main->m_ui->m_actionUpdateSelectedItems,
SIGNAL(triggered()), m_feedsView, SLOT(updateSelectedFeeds()));
@ -394,13 +394,13 @@ void FeedMessageViewer::createConnections() {
SIGNAL(triggered()), m_feedsView, SLOT(deleteSelectedItem()));
connect(form_main->m_ui->m_actionSwitchFeedsList,
SIGNAL(triggered()), this, SLOT(switchFeedComponentVisibility()));
connect(form_main->m_ui->m_actionSelectNextFeedCategory,
connect(form_main->m_ui->m_actionSelectNextItem,
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_actionSwitchListHeaders,
SIGNAL(toggled(bool)), this, SLOT(setListHeadersEnabled(bool)));
connect(form_main->m_ui->m_actionSelectPreviousFeedCategory,
connect(form_main->m_ui->m_actionSelectPreviousItem,
SIGNAL(triggered()), m_feedsView, SLOT(selectPreviousItem()));
connect(form_main->m_ui->m_actionSelectNextMessage,
SIGNAL(triggered()), m_messagesView, SLOT(selectNextItem()));
@ -408,7 +408,7 @@ void FeedMessageViewer::createConnections() {
SIGNAL(triggered()), m_messagesView, SLOT(selectPreviousItem()));
connect(form_main->m_ui->m_actionSwitchMessageListOrientation, SIGNAL(triggered()),
this, SLOT(switchMessageSplitterOrientation()));
connect(form_main->m_ui->m_actionShowOnlyUnreadFeeds, SIGNAL(toggled(bool)),
connect(form_main->m_ui->m_actionShowOnlyUnreadItems, SIGNAL(toggled(bool)),
this, SLOT(toggleShowOnlyUnreadFeeds()));
}

View File

@ -497,8 +497,8 @@ void FeedsView::initializeContextMenuCategories(RootItem *clicked_item) {
qApp->mainForm()->m_ui->m_actionUpdateSelectedItems <<
qApp->mainForm()->m_ui->m_actionEditSelectedItem <<
qApp->mainForm()->m_ui->m_actionViewSelectedItemsNewspaperMode <<
qApp->mainForm()->m_ui->m_actionMarkSelectedFeedsAsRead <<
qApp->mainForm()->m_ui->m_actionMarkSelectedFeedsAsUnread <<
qApp->mainForm()->m_ui->m_actionMarkSelectedItemsAsRead <<
qApp->mainForm()->m_ui->m_actionMarkSelectedItemsAsUnread <<
qApp->mainForm()->m_ui->m_actionDeleteSelectedItem);
if (!specific_actions.isEmpty()) {
@ -521,8 +521,8 @@ void FeedsView::initializeContextMenuFeeds(RootItem *clicked_item) {
qApp->mainForm()->m_ui->m_actionUpdateSelectedItems <<
qApp->mainForm()->m_ui->m_actionEditSelectedItem <<
qApp->mainForm()->m_ui->m_actionViewSelectedItemsNewspaperMode <<
qApp->mainForm()->m_ui->m_actionMarkSelectedFeedsAsRead <<
qApp->mainForm()->m_ui->m_actionMarkSelectedFeedsAsUnread <<
qApp->mainForm()->m_ui->m_actionMarkSelectedItemsAsRead <<
qApp->mainForm()->m_ui->m_actionMarkSelectedItemsAsUnread <<
qApp->mainForm()->m_ui->m_actionDeleteSelectedItem);
if (!specific_actions.isEmpty()) {

View File

@ -69,6 +69,7 @@ void TabWidget::openMainMenu() {
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_menuView);
m_menuMain->addMenu(qApp->mainForm()->m_ui->m_menuServices);
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_menuWebBrowser);

View File

@ -82,7 +82,7 @@ DKEY GUI::ToolbarStyle = "toolbar_style";
DVALUE(Qt::ToolButtonStyle) GUI::ToolbarStyleDef = Qt::ToolButtonIconOnly;
DKEY GUI::FeedsToolbarActions = "feeds_toolbar";
DVALUE(char*) GUI::FeedsToolbarActionsDef = "m_actionUpdateAllItems,m_actionMarkAllFeedsRead";
DVALUE(char*) GUI::FeedsToolbarActionsDef = "m_actionUpdateAllItems,m_actionMarkAllItemsRead";
DKEY GUI::MainWindowInitialSize = "window_size";
DKEY GUI::MainWindowInitialPosition = "window_position";