Many changes...

This commit is contained in:
Martin Rotter 2013-11-30 19:24:09 +01:00
parent ff375981b2
commit 6d39aace90
17 changed files with 450 additions and 174 deletions

View File

@ -161,8 +161,8 @@
<translation>Informace o autorech nebyly nalezeny.</translation>
</message>
<message>
<source>&lt;body&gt;RSS Guard is a (very) tiny feed reader.&lt;br&gt;&lt;br&gt;This software is distributed under the terms of GNU General Public License, version 3.&lt;br&gt;&lt;br&gt;Contacts:&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;mailto://rotter.martinos@gmail.com&quot;&gt;rotter.martinos@gmail&lt;/a&gt; ~email&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.rssguard.sf.net&quot;&gt;www.rssguard.sf.net&lt;/a&gt; ~website&lt;/li&gt;&lt;/ul&gt;You can obtain source code for RSS Guard from its website.&lt;br&gt;&lt;br&gt;&lt;br&gt;Copyright © 2011-%1 Martin Rotter&lt;/body&gt;</source>
<translation>&lt;body&gt;RSS Guard je velmi jednoduchá čtečka kanálů&lt;br&gt;&lt;br&gt;Tento software je šířen pod podmínkami licence GNU General Public License, verze 3.&lt;br&gt;&lt;br&gt;Kontakty:&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;mailto://rotter.martinos@gmail.com&quot;&gt;rotter.martinos@gmail&lt;/a&gt; ~email&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.rssguard.sf.net&quot;&gt;www.rssguard.sf.net&lt;/a&gt; ~web&lt;/li&gt;&lt;/ul&gt;Zdrojové kódy této aplikace lze získat z jejího webu.&lt;br&gt;&lt;br&gt;&lt;br&gt;Copyright © 2011-%1 Martin Rotter&lt;/body&gt;</translation>
<source>&lt;body&gt;RSS Guard is a (very) tiny feed reader.&lt;br&gt;&lt;br&gt;This software is distributed under the terms of GNU General Public License, version 3.&lt;br&gt;&lt;br&gt;Contacts:&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;mailto://rotter.martinos@gmail.com&quot;&gt;rotter.martinos@gmail&lt;/a&gt; ~email&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.rssguard.sf.net&quot;&gt;www.rssguard.sf.net&lt;/a&gt; ~website&lt;/li&gt;&lt;/ul&gt;You can obtain source code for RSS Guard from its website.&lt;br&gt;&lt;br&gt;&lt;br&gt;Copyright © 2011-%1 Martin Rotter&lt;/body&gt;</source>
<translation>&lt;body&gt;RSS Guard je (velmi) štíhlá čtečka kanálů.&lt;br&gt;&lt;br&gt;Tento software je šířen pod licencí GNU General Public License, verze 3.&lt;br&gt;&lt;br&gt;Kontakty:&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;mailto://rotter.martinos@gmail.com&quot;&gt;rotter.martinos@gmail&lt;/a&gt; ~email&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.rssguard.sf.net&quot;&gt;www.rssguard.sf.net&lt;/a&gt; ~web programu&lt;/li&gt;&lt;/ul&gt;Zdrojový kód tohoto programu je možné získat z jeho domovské stránky.&lt;br&gt;&lt;br&gt;&lt;br&gt;Copyright © 2011-%1 Martin Rotter&lt;/body&gt;</translation>
</message>
</context>
<context>
@ -205,7 +205,7 @@
</message>
<message>
<source>&amp;Fullscreen mode</source>
<translation>&amp;Režime celé obrazovky</translation>
<translation>&amp;Režim celé obrazovky</translation>
</message>
<message>
<source>&amp;Current tab</source>
@ -215,10 +215,6 @@
<source>&amp;Add tab</source>
<translation>&amp;Přidat panel</translation>
</message>
<message>
<source>Add tab</source>
<translation>Přidat panel</translation>
</message>
<message>
<source>Close &amp;all tabs except current one</source>
<translation>Zavřít &amp;všechny panely kromě aktivního</translation>
@ -247,34 +243,18 @@
<source>&amp;Messages</source>
<translation>&amp;Zprávy</translation>
</message>
<message>
<source>Update &amp;all</source>
<translation>Aktualizovat &amp;vše</translation>
</message>
<message>
<source>Update all feeds.</source>
<translation>Aktualizovat všechny kanály.</translation>
</message>
<message>
<source>Update &amp;selected</source>
<translation>&amp;Aktualizovat vybrané</translation>
</message>
<message>
<source>Update selected feeds/categories.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Edit selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit selected feed/category.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Delete selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Delete selected feeds/categories.</source>
<translation type="unfinished"></translation>
@ -307,10 +287,6 @@
<source>Switch &amp;importance of selected messages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark selected as read</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark &amp;all messages read</source>
<translation type="unfinished"></translation>
@ -327,6 +303,110 @@
<source>Dele&amp;te all messages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Import stuff.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+I</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Export stuff.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+E</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Quit the application.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+Q</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display settings of the application.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+S</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>About RSS Guard.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+A</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Switch fullscreen mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+F</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add new web browser tab.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+T</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close current web browser tab.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+C</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update &amp;all feeds</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update &amp;selected feeds</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Edit selected feed(s)/category(ies)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Delete selected feed(s)/category(ies)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark selected feed(s)/category(ies) as read</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark selected feed(s)/category(ies) as read.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark all messages read.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark all messages unread.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Delete selected messages.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Delete all messages.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FormSettings</name>

View File

@ -161,7 +161,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;body&gt;RSS Guard is a (very) tiny feed reader.&lt;br&gt;&lt;br&gt;This software is distributed under the terms of GNU General Public License, version 3.&lt;br&gt;&lt;br&gt;Contacts:&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;mailto://rotter.martinos@gmail.com&quot;&gt;rotter.martinos@gmail&lt;/a&gt; ~email&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.rssguard.sf.net&quot;&gt;www.rssguard.sf.net&lt;/a&gt; ~website&lt;/li&gt;&lt;/ul&gt;You can obtain source code for RSS Guard from its website.&lt;br&gt;&lt;br&gt;&lt;br&gt;Copyright © 2011-%1 Martin Rotter&lt;/body&gt;</source>
<source>&lt;body&gt;RSS Guard is a (very) tiny feed reader.&lt;br&gt;&lt;br&gt;This software is distributed under the terms of GNU General Public License, version 3.&lt;br&gt;&lt;br&gt;Contacts:&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;mailto://rotter.martinos@gmail.com&quot;&gt;rotter.martinos@gmail&lt;/a&gt; ~email&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.rssguard.sf.net&quot;&gt;www.rssguard.sf.net&lt;/a&gt; ~website&lt;/li&gt;&lt;/ul&gt;You can obtain source code for RSS Guard from its website.&lt;br&gt;&lt;br&gt;&lt;br&gt;Copyright © 2011-%1 Martin Rotter&lt;/body&gt;</source>
<translation type="unfinished"></translation>
</message>
</context>
@ -215,10 +215,6 @@
<source>&amp;Add tab</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add tab</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close &amp;all tabs except current one</source>
<translation type="unfinished"></translation>
@ -247,34 +243,18 @@
<source>&amp;Messages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update &amp;all</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update all feeds.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update &amp;selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update selected feeds/categories.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Edit selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit selected feed/category.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Delete selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Delete selected feeds/categories.</source>
<translation type="unfinished"></translation>
@ -307,10 +287,6 @@
<source>Switch &amp;importance of selected messages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark selected as read</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark &amp;all messages read</source>
<translation type="unfinished"></translation>
@ -327,6 +303,110 @@
<source>Dele&amp;te all messages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Import stuff.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+I</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Export stuff.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+E</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Quit the application.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+Q</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display settings of the application.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+S</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>About RSS Guard.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+A</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Switch fullscreen mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+F</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add new web browser tab.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+T</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close current web browser tab.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+C</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update &amp;all feeds</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update &amp;selected feeds</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Edit selected feed(s)/category(ies)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Delete selected feed(s)/category(ies)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark selected feed(s)/category(ies) as read</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark selected feed(s)/category(ies) as read.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark all messages read.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark all messages unread.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Delete selected messages.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Delete all messages.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FormSettings</name>

View File

@ -161,7 +161,7 @@
<translation>Auteurs informatie niet gevonden.</translation>
</message>
<message>
<source>&lt;body&gt;RSS Guard is a (very) tiny feed reader.&lt;br&gt;&lt;br&gt;This software is distributed under the terms of GNU General Public License, version 3.&lt;br&gt;&lt;br&gt;Contacts:&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;mailto://rotter.martinos@gmail.com&quot;&gt;rotter.martinos@gmail&lt;/a&gt; ~email&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.rssguard.sf.net&quot;&gt;www.rssguard.sf.net&lt;/a&gt; ~website&lt;/li&gt;&lt;/ul&gt;You can obtain source code for RSS Guard from its website.&lt;br&gt;&lt;br&gt;&lt;br&gt;Copyright © 2011-%1 Martin Rotter&lt;/body&gt;</source>
<source>&lt;body&gt;RSS Guard is a (very) tiny feed reader.&lt;br&gt;&lt;br&gt;This software is distributed under the terms of GNU General Public License, version 3.&lt;br&gt;&lt;br&gt;Contacts:&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;mailto://rotter.martinos@gmail.com&quot;&gt;rotter.martinos@gmail&lt;/a&gt; ~email&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.rssguard.sf.net&quot;&gt;www.rssguard.sf.net&lt;/a&gt; ~website&lt;/li&gt;&lt;/ul&gt;You can obtain source code for RSS Guard from its website.&lt;br&gt;&lt;br&gt;&lt;br&gt;Copyright © 2011-%1 Martin Rotter&lt;/body&gt;</source>
<translation type="unfinished"></translation>
</message>
</context>
@ -215,10 +215,6 @@
<source>&amp;Add tab</source>
<translation>&amp;Tabblad toevoegen</translation>
</message>
<message>
<source>Add tab</source>
<translation>Tabblad toevoegen</translation>
</message>
<message>
<source>Close &amp;all tabs except current one</source>
<translation>Sluit &amp;alle tabbladen behalve deze</translation>
@ -247,34 +243,18 @@
<source>&amp;Messages</source>
<translation>&amp;Berichten</translation>
</message>
<message>
<source>Update &amp;all</source>
<translation>Update &amp;alles</translation>
</message>
<message>
<source>Update all feeds.</source>
<translation>Update alle feeds.</translation>
</message>
<message>
<source>Update &amp;selected</source>
<translation>Update ge&amp;selekteerde</translation>
</message>
<message>
<source>Update selected feeds/categories.</source>
<translation>Update geselekteerde feeds/categorieën.</translation>
</message>
<message>
<source>&amp;Edit selected</source>
<translation>Bew&amp;erk geselekteerde</translation>
</message>
<message>
<source>Edit selected feed/category.</source>
<translation>Bewerk geselekteerde feeds/categorieën.</translation>
</message>
<message>
<source>&amp;Delete selected</source>
<translation>Verwij&amp;der geselekteerde</translation>
</message>
<message>
<source>Delete selected feeds/categories.</source>
<translation>verwijder geselekteerde feeds/categorieën.</translation>
@ -307,10 +287,6 @@
<source>Switch &amp;importance of selected messages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark selected as read</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark &amp;all messages read</source>
<translation type="unfinished"></translation>
@ -327,6 +303,110 @@
<source>Dele&amp;te all messages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Import stuff.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+I</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Export stuff.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+E</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Quit the application.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+Q</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display settings of the application.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+S</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>About RSS Guard.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+A</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Switch fullscreen mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+F</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add new web browser tab.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+T</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close current web browser tab.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+Shift+C</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update &amp;all feeds</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update &amp;selected feeds</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Edit selected feed(s)/category(ies)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Delete selected feed(s)/category(ies)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark selected feed(s)/category(ies) as read</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark selected feed(s)/category(ies) as read.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark all messages read.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mark all messages unread.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Delete selected messages.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Delete all messages.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FormSettings</name>

View File

@ -5,5 +5,6 @@ Authors and contributors:
<li>snakebite & tiheum (authors of KFaenza/Faenza icon theme)</li>
<li>Digia Plc (author of QtSingleApplication component)</li>
<li>Artem Galichkin &lt;<a href=\"mailto://doomer3d@gmail.com\">doomer3d@gmail.com</a>&gt; (author of original QKeySequenceWidget component)</li>
<li>Elbert Pol (OS/2 packages maintainer).</li>
</ul>
</body>

View File

@ -30,11 +30,14 @@ DatabaseFactory *DatabaseFactory::getInstance() {
void DatabaseFactory::assemblyDatabaseFilePath() {
if (Settings::getInstance()->type() == Settings::Portable) {
m_databasePath = qApp->applicationDirPath() + QDir::separator() + QString(APP_DB_PATH);
m_databasePath = qApp->applicationDirPath() +
QDir::separator() +
QString(APP_DB_PATH);
}
else {
m_databasePath = QDir::homePath() + QDir::separator() + QString(APP_LOW_H_NAME) +
QDir::separator() + QString(APP_DB_PATH);
m_databasePath = QDir::homePath() + QDir::separator() +
QString(APP_LOW_H_NAME) + QDir::separator() +
QString(APP_DB_PATH);
}
}

View File

@ -22,8 +22,6 @@
#if QT_VERSION >= 0x040600
#define APP_USERAGENT QString("@APP_NAME@/@APP_VERSION@ (@APP_URL@) on @CMAKE_SYSTEM@; Webkit/") + qWebKitVersion()
#else
#define APP_USERAGENT QString("@APP_NAME@/@APP_VERSION@ (@APP_URL@) on @CMAKE_SYSTEM@;")
#endif
#define TEXT_TITLE_LIMIT 30

View File

@ -63,12 +63,19 @@ void MessagesModel::loadMessages(const QList<int> feed_ids) {
stringy_ids.append(QString::number(feed_id));
}
// TODO: časem povolit.
// TODO: Enable when time is right.
//setFilter(QString("feed IN (%1) AND deleted = 0").arg(stringy_ids.join(',')));
select();
fetchAll();
}
void MessagesModel::endInsertColumns() {
qDebug("end insert cols");
QSqlTableModel::endInsertColumns();
}
int MessagesModel::messageId(int row_index) const {
return record(row_index).value(MSG_DB_ID_INDEX).toInt();
}

View File

@ -48,6 +48,9 @@ class MessagesModel : public QSqlTableModel {
Message messageAt(int row_index) const;
int messageId(int row_index) const;
protected:
void endInsertColumns();
public slots:
// CORE messages manipulators.
// NOTE: These are used to change properties of one message.
@ -87,7 +90,6 @@ class MessagesModel : public QSqlTableModel {
// Creates "normal" and "bold" fonts.
void setupFonts();
private:
QList<int> m_currentFeeds;
QList<QString> m_headerData;
bool m_isInEditingMode;

View File

@ -10,6 +10,7 @@
#include "gui/feedmessageviewer.h"
#include "gui/webbrowser.h"
#include "gui/formmain.h"
#include "gui/messagesview.h"
#include "gui/feedsview.h"
#include "core/messagesproxymodel.h"
@ -24,10 +25,11 @@ FeedMessageViewer::FeedMessageViewer(QWidget *parent)
initialize();
initializeViews();
// TODO: oddělit do createConnections();
// TODO: Separate into createConnections.
connect(m_messagesView, SIGNAL(currentMessageRemoved()),
m_messagesBrowser, SLOT(clear()));
connect(m_messagesView, SIGNAL(currentMessageChanged(Message)),
m_messagesBrowser, SLOT(navigateToMessage(Message)));
}
void FeedMessageViewer::initialize() {
@ -35,27 +37,14 @@ void FeedMessageViewer::initialize() {
m_toolBar->setFloatable(false);
m_toolBar->setMovable(false);
m_toolBar->setAllowedAreas(Qt::TopToolBarArea);
m_toolBar->setToolButtonStyle(Qt::ToolButtonIconOnly);
// TODO: testovaci
QMenu *update_menu = new QMenu(m_toolBar);
QAction *testAction = new QAction("test menu item", this);
update_menu->addAction(testAction);
// TODO: For testing.
QToolButton* toolButton = new QToolButton();
toolButton->setMenu(update_menu);
toolButton->setIcon(QIcon::fromTheme("application-exit"));
toolButton->setText("aaa");
toolButton->setPopupMode(QToolButton::MenuButtonPopup);
QWidgetAction* toolButtonAction = new QWidgetAction(this);
toolButtonAction->setDefaultWidget(toolButton);
m_toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
m_toolBar->addAction(toolButtonAction);
m_toolBar->addAction(QIcon::fromTheme("application-exit"), "aaa");
QAction *ac = m_toolBar->actions().at(0);
connect(testAction, SIGNAL(triggered()),
m_messagesView, SLOT(setAllMessagesRead()));
// Add everything to toolbar.
m_toolBar->addAction(FormMain::getInstance()->m_ui->m_actionUpdateAllFeeds);
m_toolBar->addAction(FormMain::getInstance()->m_ui->m_actionUpdateSelectedFeeds);
m_toolBar->addSeparator();
// Finish web/message browser setup.
m_messagesBrowser->setNavigationBarVisible(false);

View File

@ -135,8 +135,8 @@
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="acceptRichText">
<bool>false</bool>
@ -162,15 +162,15 @@ p, li { white-space: pre-wrap; }
<item>
<widget class="QToolBox" name="toolBox">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="page_GNU_GPL">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>98</width>
<height>69</height>
<width>687</width>
<height>180</height>
</rect>
</property>
<property name="autoFillBackground">
@ -227,8 +227,8 @@ p, li { white-space: pre-wrap; }
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans Mono'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans Mono'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
@ -245,8 +245,8 @@ p, li { white-space: pre-wrap; }
<rect>
<x>0</x>
<y>0</y>
<width>685</width>
<height>184</height>
<width>687</width>
<height>180</height>
</rect>
</property>
<attribute name="label">
@ -297,8 +297,8 @@ p, li { white-space: pre-wrap; }
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans Mono'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans Mono'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
@ -338,8 +338,8 @@ p, li { white-space: pre-wrap; }
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="tabStopWidth">
<number>30</number>
@ -381,8 +381,8 @@ p, li { white-space: pre-wrap; }
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="acceptRichText">
<bool>false</bool>

View File

@ -148,19 +148,27 @@ void FormMain::setupIcons() {
m_ui->m_actionImport->setIcon(IconThemeFactory::getInstance()->fromTheme("document-import"));
m_ui->m_actionExport->setIcon(IconThemeFactory::getInstance()->fromTheme("document-export"));
m_ui->m_actionFullscreen->setIcon(IconThemeFactory::getInstance()->fromTheme("view-fullscreen"));
// Web browser.
m_ui->m_actionAddBrowser->setIcon(IconThemeFactory::getInstance()->fromTheme("list-add"));
m_ui->m_actionCloseCurrentTab->setIcon(IconThemeFactory::getInstance()->fromTheme("list-remove"));
m_ui->m_actionCloseAllTabs->setIcon(IconThemeFactory::getInstance()->fromTheme("list-remove"));
m_ui->m_menuCurrentTab->setIcon(IconThemeFactory::getInstance()->fromTheme("go-home"));
// Feeds/messages.
m_ui->m_actionUpdateAllFeeds->setIcon(IconThemeFactory::getInstance()->fromTheme("view-refresh"));
m_ui->m_actionUpdateSelectedFeeds->setIcon(IconThemeFactory::getInstance()->fromTheme("view-refresh"));
m_ui->m_actionDeleteAllMessages->setIcon(IconThemeFactory::getInstance()->fromTheme("view-refresh"));
m_ui->m_actionDeleteSelectedFeeds->setIcon(IconThemeFactory::getInstance()->fromTheme("view-refresh"));
m_ui->m_actionDeleteSelectedMessages->setIcon(IconThemeFactory::getInstance()->fromTheme("view-refresh"));
m_ui->m_actionEditSelectedFeed->setIcon(IconThemeFactory::getInstance()->fromTheme("view-refresh"));
m_ui->m_actionMarkAllMessagesAsRead->setIcon(IconThemeFactory::getInstance()->fromTheme("view-refresh"));
m_ui->m_actionMarkAllMessagesAsUnread->setIcon(IconThemeFactory::getInstance()->fromTheme("view-refresh"));
m_ui->m_actionMarkFeedsAsRead->setIcon(IconThemeFactory::getInstance()->fromTheme("view-refresh"));
m_ui->m_actionMarkSelectedMessagesAsRead->setIcon(IconThemeFactory::getInstance()->fromTheme("view-refresh"));
m_ui->m_actionMarkSelectedMessagesAsUnread->setIcon(IconThemeFactory::getInstance()->fromTheme("view-refresh"));
m_ui->m_actionSwitchImportanceOfSelectedMessages->setIcon(IconThemeFactory::getInstance()->fromTheme("view-refresh"));
m_ui->m_actionDeleteAllMessages->setIcon(IconThemeFactory::getInstance()->fromTheme("edit-delete"));
m_ui->m_actionDeleteSelectedFeeds->setIcon(IconThemeFactory::getInstance()->fromTheme("edit-delete"));
m_ui->m_actionDeleteSelectedMessages->setIcon(IconThemeFactory::getInstance()->fromTheme("edit-delete"));
m_ui->m_actionAddNewFeed->setIcon(IconThemeFactory::getInstance()->fromTheme("document-new"));
m_ui->m_actionEditSelectedFeed->setIcon(IconThemeFactory::getInstance()->fromTheme("document-properties"));
m_ui->m_actionMarkAllMessagesAsRead->setIcon(IconThemeFactory::getInstance()->fromTheme("mail-mark-read"));
m_ui->m_actionMarkAllMessagesAsUnread->setIcon(IconThemeFactory::getInstance()->fromTheme("mail-mark-unread"));
m_ui->m_actionMarkFeedsAsRead->setIcon(IconThemeFactory::getInstance()->fromTheme("mail-mark-read"));
m_ui->m_actionMarkSelectedMessagesAsRead->setIcon(IconThemeFactory::getInstance()->fromTheme("mail-mark-read"));
m_ui->m_actionMarkSelectedMessagesAsUnread->setIcon(IconThemeFactory::getInstance()->fromTheme("mail-mark-unread"));
m_ui->m_actionSwitchImportanceOfSelectedMessages->setIcon(IconThemeFactory::getInstance()->fromTheme("mail-mark-important"));
// Setup icons for underlying components: opened web browsers...

View File

@ -9,7 +9,10 @@
class FormMain : public QMainWindow {
Q_OBJECT
friend class TabWidget;
friend class FeedMessageViewer;
public:
// Constructors and destructors.
explicit FormMain(QWidget *parent = 0);

View File

@ -48,7 +48,7 @@
<x>0</x>
<y>0</y>
<width>800</width>
<height>21</height>
<height>19</height>
</rect>
</property>
<widget class="QMenu" name="m_menuFile">
@ -100,6 +100,7 @@
<addaction name="m_actionUpdateAllFeeds"/>
<addaction name="m_actionUpdateSelectedFeeds"/>
<addaction name="separator"/>
<addaction name="m_actionAddNewFeed"/>
<addaction name="m_actionEditSelectedFeed"/>
<addaction name="m_actionDeleteSelectedFeeds"/>
<addaction name="separator"/>
@ -131,40 +132,55 @@
<property name="text">
<string>&amp;Import</string>
</property>
<property name="toolTip">
<string>Import stuff.</string>
</property>
<property name="shortcut">
<string notr="true">Ctrl+Shift+I</string>
<string>Ctrl+Shift+I</string>
</property>
</action>
<action name="m_actionExport">
<property name="text">
<string>E&amp;xport</string>
</property>
<property name="toolTip">
<string>Export stuff.</string>
</property>
<property name="shortcut">
<string notr="true">Ctrl+Shift+E</string>
<string>Ctrl+Shift+E</string>
</property>
</action>
<action name="m_actionQuit">
<property name="text">
<string>&amp;Quit</string>
</property>
<property name="toolTip">
<string>Quit the application.</string>
</property>
<property name="shortcut">
<string notr="true">Ctrl+Shift+Q</string>
<string>Ctrl+Shift+Q</string>
</property>
</action>
<action name="m_actionSettings">
<property name="text">
<string>&amp;Settings</string>
</property>
<property name="toolTip">
<string>Display settings of the application.</string>
</property>
<property name="shortcut">
<string notr="true">Ctrl+Shift+S</string>
<string>Ctrl+Shift+S</string>
</property>
</action>
<action name="m_actionAboutGuard">
<property name="text">
<string>&amp;About RSS Guard</string>
</property>
<property name="toolTip">
<string>About RSS Guard.</string>
</property>
<property name="shortcut">
<string notr="true">Ctrl+Shift+A</string>
<string>Ctrl+Shift+A</string>
</property>
</action>
<action name="m_actionFullscreen">
@ -174,8 +190,11 @@
<property name="text">
<string>&amp;Fullscreen mode</string>
</property>
<property name="toolTip">
<string>Switch fullscreen mode.</string>
</property>
<property name="shortcut">
<string notr="true">Ctrl+Shift+F</string>
<string>Ctrl+Shift+F</string>
</property>
</action>
<action name="m_actionAddBrowser">
@ -183,10 +202,10 @@
<string>&amp;Add tab</string>
</property>
<property name="toolTip">
<string>Add tab</string>
<string>Add new web browser tab.</string>
</property>
<property name="shortcut">
<string notr="true">Ctrl+Shift+T</string>
<string>Ctrl+Shift+T</string>
</property>
</action>
<action name="m_actionCloseAllTabs">
@ -204,8 +223,11 @@
<property name="text">
<string>Close current &amp;tab</string>
</property>
<property name="toolTip">
<string>Close current web browser tab.</string>
</property>
<property name="shortcut">
<string notr="true">Ctrl+Shift+C</string>
<string>Ctrl+Shift+C</string>
</property>
</action>
<action name="m_actionNoActions">
@ -224,47 +246,35 @@
</action>
<action name="m_actionUpdateAllFeeds">
<property name="text">
<string>Update &amp;all</string>
<string>Update &amp;all feeds</string>
</property>
<property name="toolTip">
<string>Update all feeds.</string>
</property>
<property name="shortcut">
<string notr="true"/>
</property>
</action>
<action name="m_actionUpdateSelectedFeeds">
<property name="text">
<string>Update &amp;selected</string>
<string>Update &amp;selected feeds</string>
</property>
<property name="toolTip">
<string>Update selected feeds/categories.</string>
</property>
<property name="shortcut">
<string notr="true"/>
</property>
</action>
<action name="m_actionEditSelectedFeed">
<property name="text">
<string>&amp;Edit selected</string>
<string>&amp;Edit selected feed(s)/category(ies)</string>
</property>
<property name="toolTip">
<string>Edit selected feed/category.</string>
</property>
<property name="shortcut">
<string notr="true"/>
</property>
</action>
<action name="m_actionDeleteSelectedFeeds">
<property name="text">
<string>&amp;Delete selected</string>
<string>&amp;Delete selected feed(s)/category(ies)</string>
</property>
<property name="toolTip">
<string>Delete selected feeds/categories.</string>
</property>
<property name="shortcut">
<string notr="true"/>
</property>
</action>
<action name="m_actionMarkSelectedMessagesAsRead">
<property name="text">
@ -301,42 +311,50 @@
</action>
<action name="m_actionMarkFeedsAsRead">
<property name="text">
<string>Mark selected as read</string>
<string>Mark selected feed(s)/category(ies) as read</string>
</property>
<property name="shortcut">
<string notr="true"/>
<property name="toolTip">
<string>Mark selected feed(s)/category(ies) as read.</string>
</property>
</action>
<action name="m_actionMarkAllMessagesAsRead">
<property name="text">
<string>Mark &amp;all messages read</string>
</property>
<property name="shortcut">
<string notr="true"/>
<property name="toolTip">
<string>Mark all messages read.</string>
</property>
</action>
<action name="m_actionMarkAllMessagesAsUnread">
<property name="text">
<string>Mark a&amp;ll messages unread</string>
</property>
<property name="shortcut">
<string notr="true"/>
<property name="toolTip">
<string>Mark all messages unread.</string>
</property>
</action>
<action name="m_actionDeleteSelectedMessages">
<property name="text">
<string>&amp;Delete selected messages</string>
</property>
<property name="shortcut">
<string notr="true"/>
<property name="toolTip">
<string>Delete selected messages.</string>
</property>
</action>
<action name="m_actionDeleteAllMessages">
<property name="text">
<string>Dele&amp;te all messages</string>
</property>
<property name="shortcut">
<string notr="true"/>
<property name="toolTip">
<string>Delete all messages.</string>
</property>
</action>
<action name="m_actionAddNewFeed">
<property name="text">
<string>Add new &amp;feed</string>
</property>
<property name="toolTip">
<string>Add new feed.</string>
</property>
</action>
</widget>

View File

@ -54,6 +54,8 @@ class IconThemeFactory : public QObject {
static QPointer<IconThemeFactory> s_instance;
};
// NOTE: Think about removing dynamic icon theme change,
// because skins are not dynamic nor tranlations.
class IconThemeFactoryEvent : public QEvent {
public:
enum Type {

View File

@ -40,7 +40,7 @@ void SkinFactory::loadCurrentSkin() {
qDebug("Skin '%s' loaded.", qPrintable(skin_name_from_settings));
}
else {
// TODO: změnit toto na qFatal v produkčním kodu.
// TODO: Change this to qFatal once code is stable.
qWarning("Skin '%s' not loaded because its data are corrupted. No skin is loaded now!",
qPrintable(skin_name_from_settings));
}
@ -152,7 +152,8 @@ Skin SkinFactory::getSkinInfo(const QString &skin_name, bool *ok) {
skin.m_layoutMarkup = QByteArray::fromBase64(skin.m_layoutMarkup.toLocal8Bit());
// Obtain other information.
skin.m_baseName = skin_name;
// NOTE: Probably fixed bug with "active skin" on Windows.
skin.m_baseName = QString(skin_name).replace(QDir::separator(), '/');
// Free resources.
skin_file.close();
@ -182,8 +183,6 @@ QList<Skin> SkinFactory::getInstalledSkins() {
foreach (QString skin_file, skin_files) {
// Check if skin file is valid and add it if it is valid.
// TODO: tady problem se separatorem, na windows v nastaveni
// pak spatne nacte skin
Skin skin_info = getSkinInfo(base_directory + QDir::separator() + skin_file,
&skin_load_ok);

View File

@ -167,8 +167,11 @@ void WebBrowser::navigateToUrl(const QUrl &url) {
}
}
void WebBrowser::clear() {
m_webView->load(QUrl());
}
void WebBrowser::navigateToMessage(const Message &message) {
// TODO: dodělat.
m_webView->setHtml(SkinFactory::getInstance()->getCurrentMarkup().arg(message.m_title,
tr("Written by ") + message.m_author,
message.m_url,

View File

@ -63,6 +63,9 @@ class WebBrowser : public TabContent {
// Navigates to message.
void navigateToMessage(const Message &message);
// Clears contents.
void clear();
// Zoom manipulators.
void increaseZoom();
void decreaseZoom();