diff --git a/CMakeLists.txt b/CMakeLists.txt index 54bf069c0..3670204c0 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,7 @@ set(APP_VERSION "2.0.0-prealpha-4") set(FILE_VERSION "2,0,0,0") set(APP_AUTHOR "Martin Rotter") set(APP_URL "http://rssguard.sf.net") +set(APP_EMAIL "rotter.martinos@gmail.com") set(MINIMUM_QT_VERSION 4.7.3) set(SOURCE_PACKAGE_SUFFIX "Source") set(EXE_NAME ${APP_LOW_NAME}) diff --git a/localization/rssguard_cs.ts b/localization/rssguard_cs.ts index 7a3b34541..c0924911e 100644 --- a/localization/rssguard_cs.ts +++ b/localization/rssguard_cs.ts @@ -97,17 +97,20 @@ Toolbar for messages Panel zpráv + + + FeedsModel - Update selected/all feeds - Aktualizovat všechny/vybrané kanály + Title + Nadpis - Select which feeds you want to update. - Zvolte, zda chcete aktualizovat vybrané nebo všechny kanály. + Titles of feeds/categories. + Názvy kanálů/kategorií. - Feed update menu - Menu aktualizace kanálů + Counts of unread/all meesages. + Počty nepřečtených/všech zpráviček. @@ -173,8 +176,8 @@ Informace o autorech nebyly nalezeny. - <body>RSS Guard is a (very) tiny feed reader.<br><br>This software is distributed under the terms of GNU General Public License, version 3.<br><br>Contacts:<ul><li><a href="mailto://rotter.martinos@gmail.com">rotter.martinos@gmail</a> ~email</li><li><a href="http://www.rssguard.sf.net">www.rssguard.sf.net</a> ~website</li></ul>You can obtain source code for RSS Guard from its website.<br><br><br>Copyright © 2011-%1 Martin Rotter</body> - + <body>RSS Guard is a (very) tiny feed reader.<br><br>This software is distributed under the terms of GNU General Public License, version 3.<br><br>Contacts:<ul><li><a href="mailto://%1">%1</a> ~email</li><li><a href="%2">%2</a> ~website</li></ul>You can obtain source code for RSS Guard from its website.<br><br><br>Copyright © 2011-%3 %4</body> + <body>RSS Guard je (velmi) jednoduchá čtečka kanálů.<br><br>Tento software je šířen pod licencí GNU General Public License, verze 3.<br><br>Kontakty:<ul><li><a href="mailto://%1">%1</a> ~email</li><li><a href="%2">%2</a> ~webová stránka</li></ul>Zdrojové kódy aplikace lze získat z jejího web.u<br><br><br>Copyright © 2011-%3 %4</body> @@ -319,66 +322,34 @@ Import stuff. - - Ctrl+Shift+I - - Export stuff. - - Ctrl+Shift+E - - Quit the application. - - Ctrl+Shift+Q - - Display settings of the application. - - Ctrl+Shift+S - - About RSS Guard. - - Ctrl+Shift+A - - Switch fullscreen mode. - - Ctrl+Shift+F - - Add new web browser tab. - - Ctrl+Shift+T - - Close current web browser tab. - - Ctrl+Shift+C - - Update &all feeds @@ -427,14 +398,6 @@ Add new feed. - - Open selected messages in external browser - - - - Open selected messages in external browser. - - Open selected messages in internal browser @@ -448,7 +411,19 @@ - Open selected source messages in external browser. + Open selected source articles in external browser. + + + + Open selected source articles in internal browser + + + + Open selected source messages in internal browser. + + + + Add new &category @@ -466,10 +441,6 @@ Icon theme Téma ikon - - system icon theme (default) - systémové téma ikon (výchozí) - Settings Nastavení @@ -727,7 +698,7 @@ Feeds & messages - + • some keyboard shortcuts are not unique @@ -740,18 +711,90 @@ %1. - + • language changed - + • icon theme changed - + • skin changed + + Feeds + Kanály + + + Messages + + + + External web browser for message viewing + + + + Web browser executable + + + + ... + + + + Executable parameters + + + + use sample arguments for + + + + select browser + + + + Note that "%1" (without quotation marks) is placeholder for URL of selected message. + + + + Select web browser executable + + + + Executables (*.*) + + + + Opera 12 or older + + + + • some keyboard shortcuts are not unique + + + + • external browser is not set + + + + • external browser is not set + + + + • language changed + + + + • icon theme changed + + + + • skin changed + + FormWelcome @@ -821,6 +864,50 @@ Contents Obsah + + Id of the message. + + + + Is message read? + + + + Is message deleted? + + + + Is message important? + + + + Id of feed which this message belongs to. + + + + Title of the message. + + + + Url of the message. + + + + Author of the message. + + + + Creation date of the message. + + + + Date of the most recent update of the message. + + + + Contents of the message. + + MessagesView @@ -828,6 +915,14 @@ Context menu for messages Kontextové menu pro zprávy + + External browser not set + + + + External browser is not set, head to application settings and set it up to use this feature. + + QObject diff --git a/localization/rssguard_en.ts b/localization/rssguard_en.ts index 91212bc42..bd3d79ea0 100644 --- a/localization/rssguard_en.ts +++ b/localization/rssguard_en.ts @@ -97,16 +97,19 @@ Toolbar for messages + + + FeedsModel - Update selected/all feeds + Title - Select which feeds you want to update. + Titles of feeds/categories. - Feed update menu + Counts of unread/all meesages. @@ -173,7 +176,7 @@ - <body>RSS Guard is a (very) tiny feed reader.<br><br>This software is distributed under the terms of GNU General Public License, version 3.<br><br>Contacts:<ul><li><a href="mailto://rotter.martinos@gmail.com">rotter.martinos@gmail</a> ~email</li><li><a href="http://www.rssguard.sf.net">www.rssguard.sf.net</a> ~website</li></ul>You can obtain source code for RSS Guard from its website.<br><br><br>Copyright © 2011-%1 Martin Rotter</body> + <body>RSS Guard is a (very) tiny feed reader.<br><br>This software is distributed under the terms of GNU General Public License, version 3.<br><br>Contacts:<ul><li><a href="mailto://%1">%1</a> ~email</li><li><a href="%2">%2</a> ~website</li></ul>You can obtain source code for RSS Guard from its website.<br><br><br>Copyright © 2011-%3 %4</body> @@ -319,66 +322,34 @@ Import stuff. - - Ctrl+Shift+I - - Export stuff. - - Ctrl+Shift+E - - Quit the application. - - Ctrl+Shift+Q - - Display settings of the application. - - Ctrl+Shift+S - - About RSS Guard. - - Ctrl+Shift+A - - Switch fullscreen mode. - - Ctrl+Shift+F - - Add new web browser tab. - - Ctrl+Shift+T - - Close current web browser tab. - - Ctrl+Shift+C - - Update &all feeds @@ -427,14 +398,6 @@ Add new feed. - - Open selected messages in external browser - - - - Open selected messages in external browser. - - Open selected messages in internal browser @@ -448,7 +411,19 @@ - Open selected source messages in external browser. + Open selected source articles in external browser. + + + + Open selected source articles in internal browser + + + + Open selected source messages in internal browser. + + + + Add new &category @@ -466,10 +441,6 @@ Icon theme - - system icon theme (default) - - Settings @@ -721,7 +692,7 @@ Feeds & messages - + • some keyboard shortcuts are not unique @@ -734,18 +705,90 @@ %1. - + • language changed - + • icon theme changed - + • skin changed + + Feeds + + + + Messages + + + + External web browser for message viewing + + + + Web browser executable + + + + ... + + + + Executable parameters + + + + use sample arguments for + + + + select browser + + + + Note that "%1" (without quotation marks) is placeholder for URL of selected message. + + + + Select web browser executable + + + + Executables (*.*) + + + + Opera 12 or older + + + + • some keyboard shortcuts are not unique + + + + • external browser is not set + + + + • external browser is not set + + + + • language changed + + + + • icon theme changed + + + + • skin changed + + FormWelcome @@ -815,6 +858,50 @@ Contents + + Id of the message. + + + + Is message read? + + + + Is message deleted? + + + + Is message important? + + + + Id of feed which this message belongs to. + + + + Title of the message. + + + + Url of the message. + + + + Author of the message. + + + + Creation date of the message. + + + + Date of the most recent update of the message. + + + + Contents of the message. + + MessagesView @@ -822,6 +909,14 @@ Context menu for messages + + External browser not set + + + + External browser is not set, head to application settings and set it up to use this feature. + + QObject diff --git a/localization/rssguard_nl.ts b/localization/rssguard_nl.ts index 5dd05ef50..0ff9c9a0a 100644 --- a/localization/rssguard_nl.ts +++ b/localization/rssguard_nl.ts @@ -97,17 +97,20 @@ Toolbar for messages Werkbalk voor berichten + + + FeedsModel - Update selected/all feeds - + Title + Titel - Select which feeds you want to update. - + Titles of feeds/categories. + Naam van feeds/categorieën. - Feed update menu - + Counts of unread/all meesages. + Aantal van alle ongelezen berichten. @@ -173,7 +176,7 @@ Auteurs informatie niet gevonden. - <body>RSS Guard is a (very) tiny feed reader.<br><br>This software is distributed under the terms of GNU General Public License, version 3.<br><br>Contacts:<ul><li><a href="mailto://rotter.martinos@gmail.com">rotter.martinos@gmail</a> ~email</li><li><a href="http://www.rssguard.sf.net">www.rssguard.sf.net</a> ~website</li></ul>You can obtain source code for RSS Guard from its website.<br><br><br>Copyright © 2011-%1 Martin Rotter</body> + <body>RSS Guard is a (very) tiny feed reader.<br><br>This software is distributed under the terms of GNU General Public License, version 3.<br><br>Contacts:<ul><li><a href="mailto://%1">%1</a> ~email</li><li><a href="%2">%2</a> ~website</li></ul>You can obtain source code for RSS Guard from its website.<br><br><br>Copyright © 2011-%3 %4</body> @@ -285,171 +288,143 @@ &Web browser - + &Webbrowser Mark selected messages &read - + Markeer geselecteerde berichten als &gelezen Mark selected messages &unread - + Markeer geselecteerde berichten als &ongelezen Switch &importance of selected messages - + Wissel het &belang van geselecteerde berichten Mark &all messages read - + Markeer &alle berichten als gelezen Mark a&ll messages unread - + Markeer a&lle berichten als ongelezen &Delete selected messages - + &Verwijder geselecteerde berichten Dele&te all messages - + Verwijde&r alle berichten Import stuff. - - - - Ctrl+Shift+I - + Importeer bestanden. Export stuff. - - - - Ctrl+Shift+E - + Exporteer bestanden. Quit the application. - - - - Ctrl+Shift+Q - + Sluit het programma. Display settings of the application. - - - - Ctrl+Shift+S - + Toon instellingen van het programma. About RSS Guard. - - - - Ctrl+Shift+A - + Over RSS Guard. Switch fullscreen mode. - - - - Ctrl+Shift+F - + Schakel beeldvullende modus. Add new web browser tab. - - - - Ctrl+Shift+T - + Voeg nieuw webbrowser tabblad toe. Close current web browser tab. - - - - Ctrl+Shift+C - + Sluit huidige webbrowser tabblad. Update &all feeds - + Update a&lle feeds Update &selected feeds - + Update ge&selecteerde feeds &Edit selected feed(s)/category(ies) - + &Bewerk geselecteerde feed(s)/categorie(ën) &Delete selected feed(s)/category(ies) - + &Verwijder geselecteerde feed(s)/categorie(ën) Mark selected feed(s)/category(ies) as read - + Markeer geselecteerde feed(s)/categorie(ën) als gelezen Mark selected feed(s)/category(ies) as read. - + Markeer geselecteerde feed(s)/categorie(ën) als gelezen. Mark all messages read. - + Markeer alle berichten als gelezen. Mark all messages unread. - + Markeer alle berichten als ongelezen. Delete selected messages. - + Verwijder geselecteerde berichten. Delete all messages. - + Verwijder alle berichten. Add new &feed - + Voeg nieuwe &feed toe Add new feed. - - - - Open selected messages in external browser - - - - Open selected messages in external browser. - + Voeg nieuwe feed toe. Open selected messages in internal browser - + Open geselecteerde bericht in externe webbrowser Open selected messages in internal browser. - + Open geselecteerde bericht in externe webbrowser. Open selected source articles in external browser - + Open geselecteerde bron artikelen in externe webbrowser - Open selected source messages in external browser. - + Open selected source articles in external browser. + Open geselecteerde bron artikelen in externe webbrowser. + + + Open selected source articles in internal browser + Open geselecteerde bron artikelen in interne webbrowser + + + Open selected source messages in internal browser. + Open geselecteerde bron artikelen in interne webbrowser. + + + Add new &category + Voeg nieuwe &categorie toe @@ -466,10 +441,6 @@ Icon theme Pictogram thema - - system icon theme (default) - Systeem pictogram thema (standaard) - Settings Instellingen @@ -564,7 +535,7 @@ Password is stored in plain string in RSS Guard configuration file. - Paswoord is opgeslagen in gewone tekst in RSS Guard configuratie bestand. + Paswoord is opgeslagen in gewone tekst in het RSSGuard configuratie bestand. Code @@ -572,7 +543,7 @@ Version - versie + Versie Author @@ -704,53 +675,127 @@ Some critical settings were changed and will be applied after the application gets restarted. - + Sommige kritieke instellingen zijn veranderd en worden van kracht als het programma wordt herstart. Critical settings were changed - + Kritieke instellingen zijn veranderd List of changes: %1. - + Lijst van veranderingen/l +%1. Problem with application restart - + Probleem met programma herstart Application couldn't be restarted. Please, restart it manually for changes to take effect. - + Programma kan niet worden herstart. Herstart het handmatig zodat de veranderingen worden doorgevoerd. Feeds & messages - + Feeds & berichten - + • some keyboard shortcuts are not unique - + ...sommige sneltoetsen zijn niet uniek Some critical settings are not set. You must fix these settings in order confirm new settings. - + Sommige kritieke instellingen zijn niet instelbaar. Je moet deze nieuwe instellingen bevestigen om op te lossen. List of errors: %1. - + lijst van fouten: + %1. - + • language changed - + ...van taal veranderd - + • icon theme changed - + ...pictogram thema veranderd + + + • skin changed + ...skin veranderd - • skin changed - + Feeds + + + + Messages + Berichten + + + External web browser for message viewing + Externe webbrowser voor bekijken van berichten + + + Web browser executable + Webbrowser exe + + + ... + + + + Executable parameters + exe parameters + + + use sample arguments for + gebruik voorbeeld argumenten voor + + + select browser + Selecteer browser + + + Note that "%1" (without quotation marks) is placeholder for URL of selected message. + Noteer dat."%1" (zonder aanhalingstekens) is tijdelijke aanduiding voor URL of geselecteerde berichten. + + + Select web browser executable + Selecteer exe bestand voor browser + + + Executables (*.*) + Uitvoerbare bestanden (*.*) + + + Opera 12 or older + Opera 12 of ouder + + + • some keyboard shortcuts are not unique + ...sommige sneltoetsen zijn niet uniek + + + • external browser is not set + ...externe browser niet ingesteld + + + • external browser is not set + ...externe browser niet ingesteld + + + • language changed + ...van taal veranderd + + + • icon theme changed + ...pictogram thema veranderd + + + • skin changed + ... skin veranderd @@ -772,7 +817,7 @@ LocationLineEdit Website address goes here - Website adress gaat hier + Tik Website adres hier @@ -821,12 +866,64 @@ Contents Inhoud + + Id of the message. + + + + Is message read? + + + + Is message deleted? + + + + Is message important? + + + + Id of feed which this message belongs to. + + + + Title of the message. + + + + Url of the message. + + + + Author of the message. + + + + Creation date of the message. + + + + Date of the most recent update of the message. + + + + Contents of the message. + + MessagesView Context menu for messages - + Contextmenu voor berichten + + + External browser not set + Externe browser niet ingesteld + + + External browser is not set, head to application settings and set it up to use this feature. + Externe browser is niet ingesteld, ga naar hulpmiddelen instellingen en zet deze functie aan. diff --git a/src/core/defs.h.in b/src/core/defs.h.in index c4fc1d505..6622009e9 100755 --- a/src/core/defs.h.in +++ b/src/core/defs.h.in @@ -16,7 +16,8 @@ #define APP_LOW_NAME "@APP_LOW_NAME@" #define APP_LOW_H_NAME ".@APP_LOW_NAME@" #define APP_LONG_NAME "@APP_NAME@ @APP_VERSION@" -#define APP_AUTHORS "@APP_AUTHOR@" +#define APP_AUTHOR "@APP_AUTHOR@" +#define APP_EMAIL "@APP_EMAIL@" #define APP_URL "@APP_URL@" #define APP_VERSION "@APP_VERSION@" #define APP_USERAGENT QString("@APP_NAME@/@APP_VERSION@ (@APP_URL@) on @CMAKE_SYSTEM@; Webkit/") + qWebKitVersion() diff --git a/src/core/feedsmodel.h b/src/core/feedsmodel.h index cf92ac4b0..9e511e1d7 100644 --- a/src/core/feedsmodel.h +++ b/src/core/feedsmodel.h @@ -22,8 +22,6 @@ class FeedsModel : public QAbstractItemModel { int columnCount(const QModelIndex &parent) const; int rowCount(const QModelIndex &parent) const; - - private: FeedsModelRootItem *m_rootItem; QList m_headerData; diff --git a/src/core/feedsmodelfeed.cpp b/src/core/feedsmodelfeed.cpp index eccf16a24..e97f5627d 100644 --- a/src/core/feedsmodelfeed.cpp +++ b/src/core/feedsmodelfeed.cpp @@ -2,7 +2,7 @@ FeedsModelFeed::FeedsModelFeed(FeedsModelRootItem *parent_item) - : FeedsModelRootItem(parent_item), m_unreadCount(1), m_totalCount(0) { + : FeedsModelRootItem(parent_item), m_totalCount(0), m_unreadCount(1) { } FeedsModelFeed::~FeedsModelFeed() { diff --git a/src/core/feedsmodelrootitem.cpp b/src/core/feedsmodelrootitem.cpp index 0a3696b10..7c04c83d0 100644 --- a/src/core/feedsmodelrootitem.cpp +++ b/src/core/feedsmodelrootitem.cpp @@ -60,3 +60,7 @@ int FeedsModelRootItem::countOfAllMessages() const { int FeedsModelRootItem::countOfUnreadMessages() const { return 0; } + +void FeedsModelRootItem::setIcon(const QIcon &icon) { + m_icon = icon; +} diff --git a/src/core/feedsmodelrootitem.h b/src/core/feedsmodelrootitem.h index 3c779e6bd..850306de1 100644 --- a/src/core/feedsmodelrootitem.h +++ b/src/core/feedsmodelrootitem.h @@ -8,9 +8,6 @@ // NOTE: This class is derived to add functionality for // all other non-root items of FeedsModel. class FeedsModelRootItem { - friend class FeedsModelNonRootItem; - friend class FeedsModel; - public: // Constructors and destructors. explicit FeedsModelRootItem(FeedsModelRootItem *parent_item = NULL); @@ -28,6 +25,8 @@ class FeedsModelRootItem { virtual int countOfUnreadMessages() const; virtual int countOfAllMessages() const; + void setIcon(const QIcon &icon); + protected: QIcon m_icon; QList m_childItems; diff --git a/src/core/messagesmodel.cpp b/src/core/messagesmodel.cpp index 87abd5827..e6df3c1d7 100644 --- a/src/core/messagesmodel.cpp +++ b/src/core/messagesmodel.cpp @@ -96,6 +96,12 @@ void MessagesModel::setupHeaderData() { m_headerData << tr("Id") << tr("Read") << tr("Deleted") << tr("Important") << tr("Feed") << tr("Title") << tr("Url") << tr("Author") << tr("Created on") << tr("Updated on") << tr("Contents"); + m_tooltipData << tr("Id of the message.") << tr("Is message read?") << + tr("Is message deleted?") << tr("Is message important?") << + tr("Id of feed which this message belongs to.") << + tr("Title of the message.") << tr("Url of the message.") << + tr("Author of the message.") << tr("Creation date of the message.") << + tr("Date of the most recent update of the message.") << tr("Contents of the message."); } Qt::ItemFlags MessagesModel::flags(const QModelIndex &idx) const { @@ -408,8 +414,9 @@ QVariant MessagesModel::headerData(int section, return QVariant(); } - // Return RAW data for these roles. case Qt::ToolTipRole: + return m_tooltipData.at(section); + case Qt::EditRole: return m_headerData.at(section); diff --git a/src/core/messagesmodel.h b/src/core/messagesmodel.h index cd07a1522..420723669 100644 --- a/src/core/messagesmodel.h +++ b/src/core/messagesmodel.h @@ -95,6 +95,7 @@ class MessagesModel : public QSqlTableModel { QList m_currentFeeds; QList m_headerData; + QList m_tooltipData; #if QT_VERSION >= 0x050000 bool m_isInEditingMode; diff --git a/src/gui/feedmessageviewer.cpp b/src/gui/feedmessageviewer.cpp index d71dd60b6..2763cf2f1 100644 --- a/src/gui/feedmessageviewer.cpp +++ b/src/gui/feedmessageviewer.cpp @@ -70,6 +70,7 @@ void FeedMessageViewer::initialize() { m_toolBar->addAction(FormMain::getInstance()->m_ui->m_actionUpdateSelectedFeeds); m_toolBar->addAction(FormMain::getInstance()->m_ui->m_actionAddNewFeed); m_toolBar->addAction(FormMain::getInstance()->m_ui->m_actionEditSelectedFeed); + m_toolBar->addAction(FormMain::getInstance()->m_ui->m_actionDeleteSelectedFeeds); m_toolBar->addSeparator(); m_toolBar->addAction(FormMain::getInstance()->m_ui->m_actionMarkAllMessagesAsRead); m_toolBar->addAction(FormMain::getInstance()->m_ui->m_actionMarkAllMessagesAsUnread); diff --git a/src/gui/feedsview.cpp b/src/gui/feedsview.cpp index 7a3dafdf9..17c94b6cd 100644 --- a/src/gui/feedsview.cpp +++ b/src/gui/feedsview.cpp @@ -11,7 +11,14 @@ FeedsView::FeedsView(QWidget *parent) : QTreeView(parent) { m_sourceModel = m_proxyModel->sourceModel(); setModel(m_proxyModel); + setupAppearance(); +} +FeedsView::~FeedsView() { + qDebug("Destroying FeedsView instance."); +} + +void FeedsView::setupAppearance() { #if QT_VERSION >= 0x050000 // Setup column resize strategies. header()->setSectionResizeMode(FDS_TITLE_INDEX, QHeaderView::Stretch); @@ -28,9 +35,5 @@ FeedsView::FeedsView(QWidget *parent) : QTreeView(parent) { setDragEnabled(false); setDragDropMode(QAbstractItemView::NoDragDrop); setAllColumnsShowFocus(true); - setSelectionMode(QAbstractItemView::SingleSelection); -} - -FeedsView::~FeedsView() { - qDebug("Destroying FeedsView instance."); + setSelectionMode(QAbstractItemView::ExtendedSelection); } diff --git a/src/gui/feedsview.h b/src/gui/feedsview.h index a5eb8db02..c6c4cb1ce 100644 --- a/src/gui/feedsview.h +++ b/src/gui/feedsview.h @@ -15,9 +15,8 @@ class FeedsView : public QTreeView { explicit FeedsView(QWidget *parent = 0); virtual ~FeedsView(); - signals: - - public slots: + protected: + void setupAppearance(); private: FeedsModel *m_sourceModel; diff --git a/src/gui/formabout.cpp b/src/gui/formabout.cpp index dfaeae12e..7d8bd3950 100644 --- a/src/gui/formabout.cpp +++ b/src/gui/formabout.cpp @@ -73,10 +73,13 @@ FormAbout::FormAbout(QWidget *parent) : QDialog(parent), m_ui(new Ui::FormAbout) m_ui->m_txtInfo->setText(tr("RSS Guard is a (very) tiny feed reader." "

This software is distributed under the terms of GNU General Public License, version 3." "

Contacts:" - "" + "
  • %1 ~email
  • " + "
  • %2 ~website
" "You can obtain source code for RSS Guard from its website." - "


Copyright © 2011-%1 Martin Rotter").arg(QDateTime::currentDateTime().date().year())); + "


Copyright © 2011-%3 %4").arg(APP_EMAIL, + APP_URL, + QString::number(QDateTime::currentDateTime().date().year()), + APP_AUTHOR)); } FormAbout::~FormAbout() { diff --git a/src/gui/messagesview.cpp b/src/gui/messagesview.cpp index 0e0dc8537..09052fc8a 100644 --- a/src/gui/messagesview.cpp +++ b/src/gui/messagesview.cpp @@ -19,6 +19,29 @@ MessagesView::MessagesView(QWidget *parent) setModel(m_proxyModel); + // NOTE: It is recommended to call this after the model is set + // due to sorting performance. + setupAppearance(); +} + +MessagesView::~MessagesView() { + qDebug("Destroying MessagesView instance."); +} + +MessagesModel *MessagesView::sourceModel() { + return m_sourceModel; +} + +MessagesProxyModel *MessagesView::model() { + return m_proxyModel; +} + +void MessagesView::setSortingEnabled(bool enable) { + QTreeView::setSortingEnabled(enable); + header()->setSortIndicatorShown(false); +} + +void MessagesView::setupAppearance() { // FIXME: Sometimes ASSERT occurs if model provides less columns // than we set resize mode for. qDebug("Loading MessagesView with %d columns.", @@ -59,29 +82,6 @@ MessagesView::MessagesView(QWidget *parent) hideColumn(MSG_DB_URL_INDEX); hideColumn(MSG_DB_CONTENTS_INDEX); - // NOTE: It is recommended to call this after the model is set - // due to sorting performance. - setupAppearance(); -} - -MessagesView::~MessagesView() { - qDebug("Destroying MessagesView instance."); -} - -MessagesModel *MessagesView::sourceModel() { - return m_sourceModel; -} - -MessagesProxyModel *MessagesView::model() { - return m_proxyModel; -} - -void MessagesView::setSortingEnabled(bool enable) { - QTreeView::setSortingEnabled(enable); - header()->setSortIndicatorShown(false); -} - -void MessagesView::setupAppearance() { header()->setStretchLastSection(false); setUniformRowHeights(true); setAcceptDrops(false); diff --git a/src/main.cpp b/src/main.cpp index 9f3b3af2f..5a8bb2ed1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -80,7 +80,7 @@ int main(int argc, char *argv[]) { // These settings needs to be set before any QSettings object. QtSingleApplication::setApplicationName(APP_NAME); QtSingleApplication::setApplicationVersion(APP_VERSION); - QtSingleApplication::setOrganizationName(APP_AUTHORS); + QtSingleApplication::setOrganizationName(APP_AUTHOR); QtSingleApplication::setOrganizationDomain(APP_URL); QtSingleApplication::setWindowIcon(QIcon(APP_ICON_PATH));