From a883be4d62187a66be74b3befeb3371c69f073be Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Fri, 14 Feb 2014 16:51:10 +0100 Subject: [PATCH] Initially fixed #19 and added some other things. --- CMakeLists.txt | 4 +- .../graphics/icons/mini-kfaenza/go-down.png | Bin 0 -> 1706 bytes .../graphics/icons/mini-kfaenza/go-up.png | Bin 0 -> 1706 bytes resources/text/CHANGELOG | 8 ++++ src/gui/feedmessageviewer.cpp | 8 ++++ src/gui/feedsview.cpp | 18 +++++++++ src/gui/feedsview.h | 3 ++ src/gui/formmain.cpp | 12 +++++- src/gui/formmain.ui | 35 ++++++++++++++++++ src/gui/messagesview.cpp | 18 +++++++++ src/gui/messagesview.h | 3 ++ 11 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 resources/graphics/icons/mini-kfaenza/go-down.png create mode 100644 resources/graphics/icons/mini-kfaenza/go-up.png diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f43d4390..b5aafbf2a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,8 +41,8 @@ project(rssguard) set(APP_NAME "RSS Guard") set(APP_LOW_NAME "rssguard") -set(APP_VERSION "1.9.9.4") -set(FILE_VERSION "1,9,9,4") +set(APP_VERSION "1.9.9.5") +set(FILE_VERSION "1,9,9,5") set(APP_AUTHOR "Martin Rotter") set(APP_URL "http://www.rssguard.comehere.cz") set(APP_URL_ISSUES "http://github.com/martinrotter/rssguard/issues") diff --git a/resources/graphics/icons/mini-kfaenza/go-down.png b/resources/graphics/icons/mini-kfaenza/go-down.png new file mode 100644 index 0000000000000000000000000000000000000000..245e43d78ebf2fdcd87ba1a6501d0536b169f216 GIT binary patch literal 1706 zcmV;b237fqP)O1G$IiaX|fBMM3c#+m2{xn-ECu6?ZI|pH{DG- zZ5tBul}c^9T<-clzgP9@y)x|M%ZBJuC;j?v_v{8}zo>SV?Z_Pfa(*#7+_RgY0T;0R z;)E+($z_21IL@LYPXaUzJjifF+;?*g?G!x;FzH0R{}i_z!Sg zYn@58w+X=K@E0lNk6PG4nUz@N3&2iiYk_ro`bLu?K3n*tF2 zgr2W6@)s{&{NdE8Q%8DfG(SII8y+5h2{dEwPlRV0Ztqv; z&!7MMxpU`^_0s6^=|3*QM5eT;3}xn2cu`t<1|Gcz+khp%a^ zxqtuu^5Ed$FFxT~?R$SL5&QdHEE5%~*4PI_9wlN^?plAcAUA}yIZgq9liR ztOM^`V}fzO2F&sC@zT?$PpkdD{U=YJRPWxsTf(#Z-qzHe@j*;b5U(d#*IL&`Mn*~- z8yjk;cE7Q)p+-kXOIqtHP>-o^5w3v=WZ5!-?_&594X8?`;%2kiLnlw3JPf^=g6q26 zzI}W7(W6K6c&Z=Q!1p`w8*NMg;&p{Bz#JPJds!-#8ojFi+}vDaY-}tT_^cTFm1<_l zbR4I8?b@~ZMx&v(OTN))=&M(+&O441r|P#w(#cU5s6K!Gd}(rWvg|m{NA2Em9400v z%CobxOL*>X+^eFl$L{|3#MtV)1SNB4H2$srN+W_#WV&w^0K$uCrjeB}Ez4RDj#K!*fE%Qp7w7;NsQAZeZcgqx z3y2g3!7vmllJ~jo?-LATf2U~ZqPIAZa?c7O#BGajs6Lnm_ukhMTTpa}2WY(2m!p)j zGMUVt(}GMUBa~9XS7RT1Gvwe!Up8FV&E)fWoylaR>$)hVbl5C{sWd!W1oLb7TF@q( zC~em!fDY}52f5ymZ>$LVZWsoDYBrl0ys39{xg7|=@&)i(DfMl$+5BfV zn{DLtc`1Z2q?8CDgp?A)FhuxV2q6r^KuRfu5aC}8!w^0Qw~vkht;4M%BUI6oWq46d}J;5fhiZ>oqf&T*Eu={-lg_i?Z#Y>5m3B?-Q4R$%;FmRBR zHc_R3_jpU~ceE_Jx{dY+NH$QK7J_ew+lJTw4>V=~d+*j%q5uE@07*qoM6N<$f?l{k A1ONa4 literal 0 HcmV?d00001 diff --git a/resources/graphics/icons/mini-kfaenza/go-up.png b/resources/graphics/icons/mini-kfaenza/go-up.png new file mode 100644 index 0000000000000000000000000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g#`BP#7KnSsF zPl|BEaw%7>5JJ4wJtZco^L5oKfu>FvGVFroc#c)1$f)>>D!*Xk4AMhA1ZEDJyv3I!XlBJ|GZc|id4z5ssJT5l~B3j31D zlDJ7O=iSV@$LRglClu`&G!hf+WOZXt%M@qTSH() zt(GsyO28~$rD;Cgu$Z?`5MiP;Mg-gOnp^V!0FSm5R+sU2zW@LL07*qoM6N<$f{61s AXaE2J literal 0 HcmV?d00001 diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG index 19ca67d2f..6cb76f6b7 100644 --- a/resources/text/CHANGELOG +++ b/resources/text/CHANGELOG @@ -1,4 +1,12 @@ +[1.9.9.5] +
    +
  • [#] Mac OS X support missing.
  • +
  • [#] Virtual desktop change hides main window.
  • +
  • [#] Misleding external browser settings.
  • +
  • [#] Non-functional external browser shortcuts.
  • +
  • [+] Some missing shortcuts.
  • +
[1.9.9.4]
  • [+] Experimental MySQL backend support.
  • diff --git a/src/gui/feedmessageviewer.cpp b/src/gui/feedmessageviewer.cpp index a7a7689d5..d45fd150c 100644 --- a/src/gui/feedmessageviewer.cpp +++ b/src/gui/feedmessageviewer.cpp @@ -230,6 +230,14 @@ void FeedMessageViewer::createConnections() { SIGNAL(triggered()), m_feedsView, SLOT(deleteSelectedItem())); connect(form_main->m_ui->m_actionSwitchFeedsListVisibility, SIGNAL(triggered()), m_feedsView, SLOT(switchVisibility())); + connect(form_main->m_ui->m_actionSelectNextFeedCategory, + SIGNAL(triggered()), m_feedsView, SLOT(selectNextItem())); + connect(form_main->m_ui->m_actionSelectPreviousFeedCategory, + SIGNAL(triggered()), m_feedsView, SLOT(selectPreviousItem())); + connect(form_main->m_ui->m_actionSelectNextMessage, + SIGNAL(triggered()), m_messagesView, SLOT(selectNextItem())); + connect(form_main->m_ui->m_actionSelectPreviousMessage, + SIGNAL(triggered()), m_messagesView, SLOT(selectPreviousItem())); connect(form_main->m_ui->m_actionDefragmentDatabase, SIGNAL(triggered()), this, SLOT(vacuumDatabase())); } diff --git a/src/gui/feedsview.cpp b/src/gui/feedsview.cpp index f6b873cff..15ae7a82a 100644 --- a/src/gui/feedsview.cpp +++ b/src/gui/feedsview.cpp @@ -470,6 +470,24 @@ void FeedsView::updateCountsOfParticularFeed(FeedsModelFeed *feed, notifyWithCounts(); } +void FeedsView::selectNextItem() { + QModelIndex index_next = index_next = moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier); + + if (index_next.isValid()) { + setCurrentIndex(index_next); + selectionModel()->select(index_next, QItemSelectionModel::Select | QItemSelectionModel::Rows); + } +} + +void FeedsView::selectPreviousItem() { + QModelIndex index_previous = index_previous = moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier); + + if (index_previous.isValid()) { + setCurrentIndex(index_previous); + selectionModel()->select(index_previous, QItemSelectionModel::Select | QItemSelectionModel::Rows); + } +} + void FeedsView::initializeContextMenuCategoriesFeeds() { m_contextMenuCategoriesFeeds = new QMenu(tr("Context menu for feeds"), this); m_contextMenuCategoriesFeeds->addActions(QList() << diff --git a/src/gui/feedsview.h b/src/gui/feedsview.h index 02275d9e5..327465f49 100644 --- a/src/gui/feedsview.h +++ b/src/gui/feedsview.h @@ -104,6 +104,9 @@ class FeedsView : public QTreeView { m_sourceModel->countOfAllMessages()); } + void selectNextItem(); + void selectPreviousItem(); + // Switches visibility of the widget. void switchVisibility() { setVisible(!isVisible()); diff --git a/src/gui/formmain.cpp b/src/gui/formmain.cpp index 4447935fe..8a621c9cc 100755 --- a/src/gui/formmain.cpp +++ b/src/gui/formmain.cpp @@ -87,7 +87,11 @@ QList FormMain::allActions() { m_ui->m_actionDeleteSelectedFeedCategory << m_ui->m_actionViewSelectedItemsNewspaperMode << m_ui->m_actionAddStandardCategory << - m_ui->m_actionAddStandardFeed; + m_ui->m_actionAddStandardFeed << + m_ui->m_actionSelectNextFeedCategory << + m_ui->m_actionSelectPreviousFeedCategory << + m_ui->m_actionSelectNextMessage << + m_ui->m_actionSelectPreviousMessage; return actions; } @@ -254,6 +258,12 @@ void FormMain::setupIcons() { m_ui->m_actionOpenSelectedMessagesInternally->setIcon(icon_theme_factory->fromTheme("item-open")); m_ui->m_actionViewSelectedItemsNewspaperMode->setIcon(icon_theme_factory->fromTheme("item-newspaper")); + m_ui->m_actionSelectNextFeedCategory->setIcon(icon_theme_factory->fromTheme("go-down")); + m_ui->m_actionSelectPreviousFeedCategory->setIcon(icon_theme_factory->fromTheme("go-up")); + m_ui->m_actionSelectNextMessage->setIcon(icon_theme_factory->fromTheme("go-down")); + m_ui->m_actionSelectPreviousMessage->setIcon(icon_theme_factory->fromTheme("go-up")); + + // Setup icons for underlying components: opened web browsers... foreach (WebBrowser *browser, WebBrowser::runningWebBrowsers()) { browser->setupIcons(); diff --git a/src/gui/formmain.ui b/src/gui/formmain.ui index c4d0920ac..9e91095fc 100644 --- a/src/gui/formmain.ui +++ b/src/gui/formmain.ui @@ -112,6 +112,9 @@ + + + @@ -127,6 +130,9 @@ + + + @@ -483,6 +489,35 @@ + + + Select next feed/category + + + Select next feed/category. + + + + + Select previous feed/category + + + Select previous feed/category. + + + + + Select next message + + + Select next message. + + + + + Select previous message + + diff --git a/src/gui/messagesview.cpp b/src/gui/messagesview.cpp index b96c4da65..18200077f 100644 --- a/src/gui/messagesview.cpp +++ b/src/gui/messagesview.cpp @@ -368,6 +368,24 @@ void MessagesView::reselectIndexes(const QModelIndexList &indexes) { } } +void MessagesView::selectNextItem() { + QModelIndex index_next = index_next = moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier); + + if (index_next.isValid()) { + setCurrentIndex(index_next); + selectionModel()->select(index_next, QItemSelectionModel::Select | QItemSelectionModel::Rows); + } +} + +void MessagesView::selectPreviousItem() { + QModelIndex index_previous = index_previous = moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier); + + if (index_previous.isValid()) { + setCurrentIndex(index_previous); + selectionModel()->select(index_previous, QItemSelectionModel::Select | QItemSelectionModel::Rows); + } +} + void MessagesView::adjustColumns() { if (header()->count() > 0 && !m_columnsAdjusted) { m_columnsAdjusted = true; diff --git a/src/gui/messagesview.h b/src/gui/messagesview.h index e52b0c94d..f878ee436 100755 --- a/src/gui/messagesview.h +++ b/src/gui/messagesview.h @@ -56,6 +56,9 @@ class MessagesView : public QTreeView { void deleteSelectedMessages(); void switchSelectedMessagesImportance(); + void selectNextItem(); + void selectPreviousItem(); + protected slots: // Marks given indexes as selected. void reselectIndexes(const QModelIndexList &indexes);