This commit is contained in:
Martin Rotter 2013-12-06 15:12:30 +01:00
parent e119d96896
commit 8bff38b66c
3 changed files with 30 additions and 7 deletions

View File

@ -11,6 +11,7 @@
#include "gui/feedmessageviewer.h"
#include "gui/webbrowser.h"
#include "gui/formmain.h"
#include "gui/iconthemefactory.h"
#include "gui/messagesview.h"
#include "gui/feedsview.h"
#include "core/messagesproxymodel.h"
@ -47,9 +48,23 @@ void FeedMessageViewer::initialize() {
m_toolBar->setAllowedAreas(Qt::TopToolBarArea);
m_toolBar->setToolButtonStyle(Qt::ToolButtonIconOnly);
QToolButton *update_button = new QToolButton(m_toolBar);
update_button->setPopupMode(QToolButton::InstantPopup);
update_button->setIcon(IconThemeFactory::getInstance()->fromTheme("view-refresh"));
update_button->setText(FormMain::getInstance()->m_ui->m_actionUpdateAllFeeds->text());
update_button->setToolTip(FormMain::getInstance()->m_ui->m_actionUpdateAllFeeds->toolTip());
QMenu *update_menu = new QMenu(tr("Feed update menu"), update_button);
update_menu->addAction(FormMain::getInstance()->m_ui->m_actionUpdateAllFeeds);
update_menu->addAction(FormMain::getInstance()->m_ui->m_actionUpdateSelectedFeeds);
update_button->setMenu(update_menu);
QWidgetAction *update_action = new QWidgetAction(m_toolBar);
update_action->setDefaultWidget(update_button);
// Add everything to toolbar.
m_toolBar->addAction(FormMain::getInstance()->m_ui->m_actionUpdateAllFeeds);
m_toolBar->addAction(FormMain::getInstance()->m_ui->m_actionUpdateSelectedFeeds);
m_toolBar->addAction(update_action);
m_toolBar->addSeparator();
m_toolBar->addAction(FormMain::getInstance()->m_ui->m_actionMarkAllMessagesAsRead);
m_toolBar->addAction(FormMain::getInstance()->m_ui->m_actionMarkAllMessagesAsUnread);

View File

@ -314,6 +314,7 @@ void FormSettings::saveLanguage() {
"en").toString();
QString new_lang = m_ui->m_treeLanguages->currentItem()->text(1);
// Save prompt for restart if language has changed.
if (new_lang != actual_lang) {
#if QT_VERSION >= 0x050000
m_changedDataTexts.append(tr(" • language changed"));
@ -490,8 +491,17 @@ void FormSettings::saveInterface() {
// Save selected icon theme.
QString selected_icon_theme = m_ui->m_cmbIconTheme->itemData(m_ui->m_cmbIconTheme->currentIndex()).toString();
QString original_icon_theme = IconThemeFactory::getInstance()->getCurrentIconTheme();
IconThemeFactory::getInstance()->setCurrentIconTheme(selected_icon_theme);
if (selected_icon_theme != original_icon_theme) {
#if QT_VERSION >= 0x050000
m_changedDataTexts.append(tr(" • icon theme changed"));
#else
m_changedDataTexts.append(trUtf8(" • icon theme changed"));
#endif
}
// Save and activate new skin.
if (m_ui->m_treeSkins->selectedItems().size() > 0) {
Skin active_skin = m_ui->m_treeSkins->currentItem()->data(0, Qt::UserRole).value<Skin>();

View File

@ -148,16 +148,14 @@ void MessagesView::switchSelectedMessagesImportance() {
m_sourceModel->switchBatchMessageImportance(mapped_idxs);
//selected_idxs.clear();
selected_idxs = m_proxyModel->mapListFromSource(mapped_idxs);
selected_idxs.clear();
sortByColumn(header()->sortIndicatorSection(), header()->sortIndicatorOrder());
/*
foreach (const QModelIndex &index, mapped_idxs) {
selected_idxs << m_proxyModel->mapFromSource(m_sourceModel->index(index.row(),
index.column()));
}
*/
current_idx = m_proxyModel->mapFromSource(m_sourceModel->index(mapped_current_idx.row(),
mapped_current_idx.column()));