diff --git a/CMakeLists.txt b/CMakeLists.txt index 98b030f83..cf6f6b6b2 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -208,7 +208,7 @@ else(CMAKE_BUILD_TYPE STREQUAL "release" OR CMAKE_BUILD_TYPE STREQUAL "Release" # See http://stackoverflow.com/questions/2368811/how-to-set-warning-level-in-cmake message(STATUS "[${APP_LOW_NAME}] Enabling verbose makefile and full warning reports.") if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) - add_definitions(-pedantic -Wall -Wextra) + add_definitions(-pedantic -Wall) # -Wextra -Wno-unused-variable endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) # Verbose compiling outputs. diff --git a/localization/rssguard-cs_CZ.ts b/localization/rssguard-cs_CZ.ts index ba3ad73fb..a06ccd5d4 100644 --- a/localization/rssguard-cs_CZ.ts +++ b/localization/rssguard-cs_CZ.ts @@ -1,6 +1,6 @@ - + Application @@ -94,12 +94,10 @@ Titles of feeds/categories. - Feed list header "titles" column tooltip. Názvy kanálů/kategorií. Counts of unread/all meesages. - Feed list header "counts" column tooltip. Počty nepřečtených/všech zpráviček. @@ -1335,6 +1333,10 @@ and/or settings were backed or not. Also make sure that target foder is writable &Backup database/settings &Zálohovat databázi/nastavení + + Switch message list layout orientation + + FormRestoreDatabaseSettings @@ -1416,9 +1418,7 @@ and/or settings were backed or not. Also make sure that target foder is writable Language - Language settings section. ----------- -Language column of language list. + Language settings section. Lokalizace @@ -1476,12 +1476,10 @@ Language column of language list. Code - Lang. code column of language list. Kód Version - Version column of skin list. Verze @@ -1559,7 +1557,6 @@ Language column of language list. Name - Skin list name column. Název @@ -2104,52 +2101,42 @@ Přejít na web aplikace a stáhnout jej ručně. MessagesModel Id - Tooltip for ID of message. Read - Tooltip for "read" column in msg list. Přečteno Deleted - Tooltip for "deleted" column in msg list. Smazáno Important - Tooltip for "important" column in msg list. Důležité Feed - Tooltip for name of feed for message. Kanál Title - Tooltip for title of message. Nadpis Url - Tooltip for url of message. Author - Tooltip for author of message. Autor Created on - Tooltip for creation date of message. Vytvořeno Contents - Tooltip for contents of message. Obsah @@ -2192,6 +2179,14 @@ Přejít na web aplikace a stáhnout jej ručně. Contents of the message. Obsah zprávy. + + Permanently deleted + + + + Is message permanently deleted from recycle bin? + + MessagesToolBar diff --git a/localization/rssguard-de_DE.ts b/localization/rssguard-de_DE.ts index 4b4b2d0c4..9ed3e4d2d 100644 --- a/localization/rssguard-de_DE.ts +++ b/localization/rssguard-de_DE.ts @@ -1,6 +1,6 @@ - + Application @@ -94,12 +94,10 @@ Titles of feeds/categories. - Feed list header "titles" column tooltip. Titel der Feeds/Kategorien. Counts of unread/all meesages. - Feed list header "counts" column tooltip. Anzahl ungelesener/aller Nachrichten. @@ -1325,6 +1323,10 @@ and/or settings were backed or not. Also make sure that target foder is writable &Backup database/settings + + Switch message list layout orientation + + FormRestoreDatabaseSettings @@ -1406,9 +1408,7 @@ and/or settings were backed or not. Also make sure that target foder is writable Language - Language settings section. ----------- -Language column of language list. + Language settings section. Sprache @@ -1466,12 +1466,10 @@ Language column of language list. Code - Lang. code column of language list. Code Version - Version column of skin list. Version @@ -1549,7 +1547,6 @@ Language column of language list. Name - Skin list name column. Name @@ -2078,52 +2075,42 @@ Go to application website to obtain it manually. MessagesModel Id - Tooltip for ID of message. ID Read - Tooltip for "read" column in msg list. Lesen Deleted - Tooltip for "deleted" column in msg list. Gelöscht Important - Tooltip for "important" column in msg list. Wichtig Feed - Tooltip for name of feed for message. Feed Title - Tooltip for title of message. Titel Url - Tooltip for url of message. Url Author - Tooltip for author of message. Author Created on - Tooltip for creation date of message. Erstellt am Contents - Tooltip for contents of message. Inhalt @@ -2166,6 +2153,14 @@ Go to application website to obtain it manually. Contents of the message. Inhalt der Nachricht. + + Permanently deleted + + + + Is message permanently deleted from recycle bin? + + MessagesToolBar diff --git a/localization/rssguard-en_GB.ts b/localization/rssguard-en_GB.ts index ab49081cf..bb5141662 100644 --- a/localization/rssguard-en_GB.ts +++ b/localization/rssguard-en_GB.ts @@ -1,6 +1,6 @@ - + Application @@ -94,12 +94,10 @@ Titles of feeds/categories. - Feed list header "titles" column tooltip. Counts of unread/all meesages. - Feed list header "counts" column tooltip. @@ -1325,6 +1323,10 @@ and/or settings were backed or not. Also make sure that target foder is writable &Backup database/settings + + Switch message list layout orientation + + FormRestoreDatabaseSettings @@ -1406,9 +1408,7 @@ and/or settings were backed or not. Also make sure that target foder is writable Language - Language settings section. ----------- -Language column of language list. + Language settings section. @@ -1466,12 +1466,10 @@ Language column of language list. Code - Lang. code column of language list. Version - Version column of skin list. @@ -1549,7 +1547,6 @@ Language column of language list. Name - Skin list name column. @@ -2073,52 +2070,42 @@ Go to application website to obtain it manually. MessagesModel Id - Tooltip for ID of message. Read - Tooltip for "read" column in msg list. Deleted - Tooltip for "deleted" column in msg list. Important - Tooltip for "important" column in msg list. Feed - Tooltip for name of feed for message. Title - Tooltip for title of message. Url - Tooltip for url of message. Author - Tooltip for author of message. Created on - Tooltip for creation date of message. Contents - Tooltip for contents of message. @@ -2161,6 +2148,14 @@ Go to application website to obtain it manually. Contents of the message. + + Permanently deleted + + + + Is message permanently deleted from recycle bin? + + MessagesToolBar diff --git a/localization/rssguard-en_US.ts b/localization/rssguard-en_US.ts index 2df320061..c83556617 100644 --- a/localization/rssguard-en_US.ts +++ b/localization/rssguard-en_US.ts @@ -1,6 +1,6 @@ - + Application @@ -47,44 +47,44 @@ - + Feed update started Text display in status bar when feed update is started. - + Updated feed '%1' Text display in status bar when particular feed is updated. - + Cannot defragment database - + Database cannot be defragmented because feed update is ongoing. - + Database defragmented - + Database was successfully defragmented. - + Database was not defragmented - + Database was not defragmented. This database backend does not support it or it cannot be defragmented now. @@ -105,41 +105,39 @@ FeedsModel - + Root Name of root item of feed list which can be seen in feed add/edit dialog. - + Title Title text in the feed list header. - + Titles of feeds/categories. - Feed list header "titles" column tooltip. - + Counts of unread/all meesages. - Feed list header "counts" column tooltip. - + Invalid tree data. - + Import successfull, but some feeds/categories were not imported due to error. - + Import was completely successfull. @@ -171,19 +169,19 @@ This category does not contain any nested items. FeedsModelFeed - + does not use auto-update Describes feed auto-update status. - + uses global settings Describes feed auto-update status. - + uses specific settings (%n minute(s) to next auto-update) Describes feed auto-update status. @@ -192,7 +190,7 @@ This category does not contain any nested items. - + %1 (%2)%3 Network status: %6 @@ -202,7 +200,7 @@ Auto-update status: %5 - + %n unread message(s). Tooltip for "unread" column of feed list. @@ -241,7 +239,7 @@ Auto-update status: %5 FeedsToolBar - + Toolbar spacer @@ -249,117 +247,117 @@ Auto-update status: %5 FeedsView - + Cannot update all items - + You cannot update all items because another feed update is ongoing. - + Cannot update selected items - + You cannot update selected items because another feed update is ongoing. - + Cannot add standard category - + You cannot add new standard category now because feed update is ongoing. - + Cannot add standard feed - + You cannot add new standard feed now because feed update is ongoing. - + Cannot edit item - + Selected item cannot be edited because feed update is ongoing. - + Cannot delete item - + Selected item cannot be deleted because feed update is ongoing. - + Deleting feed or category - + You are about to delete selected feed or category. - + Do you really want to delete selected item? - + Deletion of item failed. - + Selected item was not deleted due to error. - + Permanently delete messages - + You are about to permanenty delete all messages from your recycle bin. - + Do you really want to empty your recycle bin? - + Context menu for feeds - + Context menu for empty space - + Context menu for recycle bin @@ -591,128 +589,128 @@ and/or settings were backed or not. Also make sure that target foder is writable - + Add new category - + Edit existing category - + Cannot add category - + Category was not added due to error. - + Cannot edit category - + Category was not edited due to error. - + Category name is ok. - + Category name is too short. - + Description is empty. - + The description is ok. - + Select icon file for the category - + Images (*.bmp *.jpg *.jpeg *.png *.svg *.tga) - + Select icon - + Cancel - + Look in: Label to describe the folder for icon file selection dialog. - + Icon name: - + Icon type: - + Category title - + Set title for your category. - + Category description - + Set description for your category. - + Icon selection - + Load icon from file... - + Do not use icon - + Use default icon @@ -1199,430 +1197,435 @@ and/or settings were backed or not. Also make sure that target foder is writable - + &Tools - + &Web browser - + &Current tab - + Settings - + Fee&ds && categories - + Add &new feed/category - + &Messages - + &Recycle bin - + &Quit - + Quit the application. - + &Settings - + Display settings of the application. - + &About application - + Displays extra info about this application. - + &Fullscreen - + Switch fullscreen mode. - + &Add tab - + Add new web browser tab. - + &Close all tabs except current one - + Close all tabs except current one. - + &Close current tab - + Close current web browser tab. - + Update &all feeds - + Update &selected feeds - + &Edit selected feed/category - + &Delete selected feed/category - + Mark &selected messages as &read - + Mark &selected messages as &unread - + Switch &importance of selected messages - + &Mark selected feeds as read - + Mark all messages (without message filters) from selected feeds as read. - + &Mark selected feeds as unread - + Mark all messages (without message filters) from selected feeds as unread. - + &Delete selected messages - + &Clean selected feeds - + Deletes all messages from selected feeds. - + New &feed - + Add new feed. - + Open selected source articles in &external browser - + Open selected messages in &internal browser - + Open selected source articles in &internal browser - + New &category - + Add new category. - + No actions available - + No actions are available right now. - + &Mark all feeds as &read - + Marks all messages in all feeds read. This does not take message filters into account. - + View selected feeds in &newspaper mode - + Displays all messages from selected feeds/categories in a new "newspaper mode" tab. Note that messages are not set as read automatically. - + Switch visibility of main &window - + Hides main window if it is visible and shows it if it is hidden. - + &Defragment database - + Defragment database file so that its size decreases. - + &Feed list - + Hides or shows the list of feeds/categories. - + &Clean all feeds - + Deletes all messages from all feeds. - + Select &next feed/category - + Select &previous feed/category - + Select &next message - + Select &previous message - + Check for &updates - + Check if new update for the application is available for download. - + &Main menu - + Hides or displays the main menu. - + Enable &JavaScript - + Enable external &plugins - + Auto-load &images - + Report a &bug (GitHub)... - + &Toolbars - + Switch visibility of main toolbars. - + &Feed/message list headers - + &Import feeds - + Imports feeds you want from selected file. - + &Export feeds - + Exports feeds you want to selected file. - + Report a bug (BitBucket)... - + &Donate via PayPal - + Display &wiki - + &Empty recycle bin - + &Restore all messages - + Restore &selected messages - + &Restart - + &Restore database/settings - + &Backup database/settings + + + Switch message list layout orientation + + @@ -1752,9 +1755,7 @@ and/or settings were backed or not. Also make sure that target foder is writable Language - Language settings section. ----------- -Language column of language list. + Language settings section. @@ -2165,14 +2166,12 @@ Authors of this application are NOT responsible for lost data. Code - Lang. code column of language list. Version - Version column of skin list. @@ -2190,7 +2189,6 @@ Authors of this application are NOT responsible for lost data. Name - Skin list name column. @@ -2205,207 +2203,207 @@ Authors of this application are NOT responsible for lost data. - + some keyboard shortcuts are not unique - + custom external browser is not set correctly - + Cannot save settings - + Some critical settings are not set. You must fix these settings in order confirm new settings. - + List of errors: %1. - + Critical settings were changed - + Some critical settings were changed and will be applied after the application gets restarted. You have to restart manually. - + Do you want to restart now? - + List of changes: %1. - + Opera 12 or older - + No proxy - + System proxy - + Socks5 - + Http - + language changed - + No connection test triggered so far. - + You did not executed any connection test yet. - + SQLite (embedded database) - + MySQL/MariaDB (dedicated database) - + Hostname of your MySQL server - + Username to login with - + Password for your username - + in-memory database switched - + data storage backend changed - + Hostname is empty. - + Hostname looks ok. - + Username is empty. - + Username looks ok. - + Password is empty. - + Password looks ok. - + (not supported on this platform) - + Disable (Tray icon is not available.) - + no icon theme Label for disabling icon theme. - + Icon only - + Text only - + Text beside icon - + Text under icon - + Follow OS style - + icon theme changed - + skin changed @@ -2584,113 +2582,113 @@ currently installed one. Id - Tooltip for ID of message. Read - Tooltip for "read" column in msg list. Deleted - Tooltip for "deleted" column in msg list. Important - Tooltip for "important" column in msg list. Feed - Tooltip for name of feed for message. Title - Tooltip for title of message. Url - Tooltip for url of message. Author - Tooltip for author of message. Created on - Tooltip for creation date of message. Contents - Tooltip for contents of message. - + + Permanently deleted + + + + 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. - + Contents of the message. + + + Is message permanently deleted from recycle bin? + + MessagesToolBar @@ -2743,27 +2741,27 @@ currently installed one. MessagesView - + Context menu for messages - + Problem with starting external web browser - + External web browser could not be started. - + Meesage without URL - + Message '%s' does not contain URL. @@ -2859,35 +2857,35 @@ currently installed one. QObject - + LANG_NAME Name of language, e.g. English. English (USA) - + LANG_ABBREV Abbreviation of language, e.g. en. Use ISO 639-1 code here combined with ISO 3166-1 (alpha-2) code. Examples: "cs_CZ", "en_GB", "en_US". en_US - + LANG_VERSION Version of your translation, e.g. 1.0. 1.33.7 - + LANG_AUTHOR Name of translator - optional. Martin Rotter - + LANG_EMAIL Email of translator - optional. rotter.martinos@gmail.com @@ -2927,12 +2925,12 @@ currently installed one. SystemFactory - + New version available - + Click the bubble for more information. @@ -2940,7 +2938,7 @@ currently installed one. SystemTrayIcon - + %1 Unread news: %2 diff --git a/localization/rssguard-fr_FR.ts b/localization/rssguard-fr_FR.ts index 31239a82b..461ac45f6 100644 --- a/localization/rssguard-fr_FR.ts +++ b/localization/rssguard-fr_FR.ts @@ -1,6 +1,6 @@ - + Application @@ -94,12 +94,10 @@ Titles of feeds/categories. - Feed list header "titles" column tooltip. Titres des flux/catégories. Counts of unread/all meesages. - Feed list header "counts" column tooltip. Nombre des messages lus/non-lus. @@ -1326,6 +1324,10 @@ and/or settings were backed or not. Also make sure that target foder is writable &Backup database/settings + + Switch message list layout orientation + + FormRestoreDatabaseSettings @@ -1407,9 +1409,7 @@ and/or settings were backed or not. Also make sure that target foder is writable Language - Language settings section. ----------- -Language column of language list. + Language settings section. Langage @@ -1467,12 +1467,10 @@ Language column of language list. Code - Lang. code column of language list. Code Version - Version column of skin list. Version @@ -1550,7 +1548,6 @@ Language column of language list. Name - Skin list name column. Nom @@ -2096,52 +2093,42 @@ Aller sur le site de l'application pour les obtenir manuellement.MessagesModel Id - Tooltip for ID of message. Id Read - Tooltip for "read" column in msg list. Lire Deleted - Tooltip for "deleted" column in msg list. Supprimé Important - Tooltip for "important" column in msg list. Important Feed - Tooltip for name of feed for message. Flux Title - Tooltip for title of message. Titre Url - Tooltip for url of message. Url Author - Tooltip for author of message. Auteur Created on - Tooltip for creation date of message. Crée sur Contents - Tooltip for contents of message. Contenus @@ -2184,6 +2171,14 @@ Aller sur le site de l'application pour les obtenir manuellement.Contents of the message. Contenu du message. + + Permanently deleted + + + + Is message permanently deleted from recycle bin? + + MessagesToolBar diff --git a/localization/rssguard-it_IT.ts b/localization/rssguard-it_IT.ts index c6c1a86bb..1654962f3 100644 --- a/localization/rssguard-it_IT.ts +++ b/localization/rssguard-it_IT.ts @@ -1,6 +1,6 @@ - + Application @@ -94,12 +94,10 @@ Titles of feeds/categories. - Feed list header "titles" column tooltip. Titoli dei feed/categorie. Counts of unread/all meesages. - Feed list header "counts" column tooltip. Conteggio dei messaggi non letti/tutti. @@ -1325,6 +1323,10 @@ and/or settings were backed or not. Also make sure that target foder is writable &Backup database/settings + + Switch message list layout orientation + + FormRestoreDatabaseSettings @@ -1406,9 +1408,7 @@ and/or settings were backed or not. Also make sure that target foder is writable Language - Language settings section. ----------- -Language column of language list. + Language settings section. Lingua @@ -1466,12 +1466,10 @@ Language column of language list. Code - Lang. code column of language list. Codice Version - Version column of skin list. Versione @@ -1549,7 +1547,6 @@ Language column of language list. Name - Skin list name column. Nome @@ -2078,52 +2075,42 @@ Go to application website to obtain it manually. MessagesModel Id - Tooltip for ID of message. Id Read - Tooltip for "read" column in msg list. Leggi Deleted - Tooltip for "deleted" column in msg list. Eliminato Important - Tooltip for "important" column in msg list. Importante Feed - Tooltip for name of feed for message. Feed Title - Tooltip for title of message. Titolo Url - Tooltip for url of message. Url Author - Tooltip for author of message. Autore Created on - Tooltip for creation date of message. Creato il Contents - Tooltip for contents of message. Contenuti @@ -2166,6 +2153,14 @@ Go to application website to obtain it manually. Contents of the message. Contenuti del messaggio. + + Permanently deleted + + + + Is message permanently deleted from recycle bin? + + MessagesToolBar diff --git a/localization/rssguard-nl_NL.ts b/localization/rssguard-nl_NL.ts index df6ef140c..09473018f 100644 --- a/localization/rssguard-nl_NL.ts +++ b/localization/rssguard-nl_NL.ts @@ -1,4 +1,6 @@ - + + + Application @@ -92,12 +94,10 @@ Titles of feeds/categories. - Feed list header "titles" column tooltip. Naam van feeds/categorieën. Counts of unread/all meesages. - Feed list header "counts" column tooltip. Aantal van alle ongelezen berichten. @@ -123,7 +123,10 @@ %n unread message(s). Tooltip for "unread" column of feed list. - %n ongelezen bericht.%n ongelezen berichten. + + %n ongelezen bericht. + %n ongelezen berichten. + %1 (category)%2%3 @@ -153,12 +156,18 @@ Deze categorie bevat geen nested items. uses specific settings (%n minute(s) to next auto-update) Describes feed auto-update status. - gebruik specifieke instellingen (%n minuut voor volgende automatische update)gebruik specifieke instellingen (%n minuten voor volgende automatische update) + + gebruik specifieke instellingen (%n minuut voor volgende automatische update) + gebruik specifieke instellingen (%n minuten voor volgende automatische update) + %n unread message(s). Tooltip for "unread" column of feed list. - %n ongelezen bericht.%n ongelezen berichten. + + %n ongelezen bericht. + %n ongelezen berichten. + %1 (%2)%3 @@ -192,7 +201,10 @@ Auto-update status: %5 %n deleted message(s). - %n verwijderde bericht(en).%n verwijderde bericht(en). + + %n verwijderde bericht(en). + %n verwijderde bericht(en). + @@ -1320,6 +1332,10 @@ Exporteer feeds die je wilt van het geselecteerde bestand. &Backup database/settings Backup database/instellingen + + Switch message list layout orientation + + FormRestoreDatabaseSettings @@ -1401,9 +1417,7 @@ Exporteer feeds die je wilt van het geselecteerde bestand. Language - Language settings section. ----------- -Language column of language list. + Language settings section. Taal @@ -1461,12 +1475,10 @@ Language column of language list. Code - Lang. code column of language list. Code Version - Version column of skin list. Versie @@ -1544,7 +1556,6 @@ Language column of language list. Name - Skin list name column. Naam @@ -2093,52 +2104,42 @@ Ga naar RRSguard website en download het handmatig. MessagesModel Id - Tooltip for ID of message. ld Read - Tooltip for "read" column in msg list. Lees Deleted - Tooltip for "deleted" column in msg list. verwijder Important - Tooltip for "important" column in msg list. Belangrijk Feed - Tooltip for name of feed for message. Feed Title - Tooltip for title of message. Titel Url - Tooltip for url of message. Url Author - Tooltip for author of message. Auteur Created on - Tooltip for creation date of message. Gemaakt op Contents - Tooltip for contents of message. Inhoud @@ -2181,6 +2182,14 @@ Ga naar RRSguard website en download het handmatig. Contents of the message. Inhoud van het bericht. + + Permanently deleted + + + + Is message permanently deleted from recycle bin? + + MessagesToolBar @@ -2640,4 +2649,4 @@ Ongelezen nieuws: %2 Open de hyperlink in externe browser - \ No newline at end of file + diff --git a/localization/rssguard-sv_SE.ts b/localization/rssguard-sv_SE.ts index de6109f26..837627b52 100644 --- a/localization/rssguard-sv_SE.ts +++ b/localization/rssguard-sv_SE.ts @@ -1,6 +1,6 @@ - + Application @@ -94,12 +94,10 @@ Titles of feeds/categories. - Feed list header "titles" column tooltip. Namn på kategorier/flöden. Counts of unread/all meesages. - Feed list header "counts" column tooltip. Antal meddelanden. @@ -1332,6 +1330,10 @@ och/eller inställningar sparades. Tillse också att målmappen inte är skrivsk &Backup database/settings &Säkerhetskopiera databas/inställningar + + Switch message list layout orientation + + FormRestoreDatabaseSettings @@ -1413,9 +1415,7 @@ och/eller inställningar sparades. Tillse också att målmappen inte är skrivsk Language - Language settings section. ----------- -Language column of language list. + Language settings section. Språk @@ -1473,12 +1473,10 @@ Language column of language list. Code - Lang. code column of language list. Språkkod Version - Version column of skin list. Version @@ -1556,7 +1554,6 @@ Language column of language list. Name - Skin list name column. Namn @@ -2104,52 +2101,42 @@ Gå till programmets hemsida för att hämta den manuellt. MessagesModel Id - Tooltip for ID of message. ID Read - Tooltip for "read" column in msg list. Läst Deleted - Tooltip for "deleted" column in msg list. Borttaget Important - Tooltip for "important" column in msg list. Viktigt Feed - Tooltip for name of feed for message. Flöde Title - Tooltip for title of message. Titel Url - Tooltip for url of message. URL Author - Tooltip for author of message. Författare Created on - Tooltip for creation date of message. Skapad Contents - Tooltip for contents of message. Innehåll @@ -2192,6 +2179,14 @@ Gå till programmets hemsida för att hämta den manuellt. Contents of the message. Innehåll i meddelandet. + + Permanently deleted + + + + Is message permanently deleted from recycle bin? + + MessagesToolBar diff --git a/src/gui/formabout.cpp b/src/gui/formabout.cpp index 94cd3bcda..b7af8d30d 100755 --- a/src/gui/formabout.cpp +++ b/src/gui/formabout.cpp @@ -38,7 +38,7 @@ FormAbout::FormAbout(QWidget *parent) : QDialog(parent), m_ui(new Ui::FormAbout) //: About RSS Guard dialog title. setWindowTitle(tr("About %1").arg(APP_NAME)); -#if !defined(Q_OS_WIN) +#if defined(Q_OS_OS2) MessageBox::iconify(m_ui->m_buttonBox); #endif diff --git a/src/gui/formcategorydetails.cpp b/src/gui/formcategorydetails.cpp index 1ab648fc2..54e47257e 100755 --- a/src/gui/formcategorydetails.cpp +++ b/src/gui/formcategorydetails.cpp @@ -212,7 +212,7 @@ void FormCategoryDetails::initialize() { // Setup button box. m_ui->m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); -#if !defined(Q_OS_WIN) +#if defined(Q_OS_OS2) MessageBox::iconify(m_ui->m_buttonBox); #endif diff --git a/src/gui/formfeeddetails.cpp b/src/gui/formfeeddetails.cpp index ea0a7af12..3c189fa3b 100755 --- a/src/gui/formfeeddetails.cpp +++ b/src/gui/formfeeddetails.cpp @@ -371,7 +371,7 @@ void FormFeedDetails::initialize() { m_ui->m_txtPassword->lineEdit()->setPlaceholderText(tr("Password")); m_ui->m_txtPassword->lineEdit()->setToolTip(tr("Set password to access the feed.")); -#if !defined(Q_OS_WIN) +#if defined(Q_OS_OS2) MessageBox::iconify(m_ui->m_buttonBox); #endif diff --git a/src/gui/formsettings.cpp b/src/gui/formsettings.cpp index ab35977d2..46f2a2199 100755 --- a/src/gui/formsettings.cpp +++ b/src/gui/formsettings.cpp @@ -62,7 +62,7 @@ FormSettings::FormSettings(QWidget *parent) : QDialog(parent), m_ui(new Ui::Form m_ui->m_editorMessagesToolbar->availableItemsWidget()->viewport()->installEventFilter(this); m_ui->m_editorFeedsToolbar->availableItemsWidget()->viewport()->installEventFilter(this); -#if !defined(Q_OS_WIN) +#if defined(Q_OS_OS2) MessageBox::iconify(m_ui->m_buttonBox); #endif @@ -168,7 +168,12 @@ void FormSettings::selectBrowserExecutable() { tr("Select web browser executable"), qApp->homeFolderPath(), //: File filter for external browser selection dialog. - tr("Executables (*.*)")); + #if defined(Q_OS_LINUX) + tr("Executables (*)") + #else + tr("Executables (*.*)") + #endif + ); if (!executable_file.isEmpty()) { m_ui->m_txtExternalBrowserExecutable->setText(executable_file); diff --git a/src/gui/formupdate.cpp b/src/gui/formupdate.cpp index 32e8c483a..d884a80ba 100755 --- a/src/gui/formupdate.cpp +++ b/src/gui/formupdate.cpp @@ -48,7 +48,7 @@ FormUpdate::FormUpdate(QWidget *parent) connect(m_btnUpdate, SIGNAL(clicked()), this, SLOT(startUpdate())); -#if !defined(Q_OS_WIN) +#if defined(Q_OS_OS2) MessageBox::iconify(m_ui->m_buttonBox); #endif diff --git a/src/gui/messagebox.cpp b/src/gui/messagebox.cpp index efabf1e10..429696099 100755 --- a/src/gui/messagebox.cpp +++ b/src/gui/messagebox.cpp @@ -39,8 +39,7 @@ void MessageBox::setIcon(QMessageBox::Icon icon) { 0, this); // Setup status icon. - setIconPixmap(iconForStatus(icon).pixmap(icon_size, - icon_size)); + setIconPixmap(iconForStatus(icon).pixmap(icon_size, icon_size)); } void MessageBox::iconify(QDialogButtonBox *button_box) { diff --git a/src/miscellaneous/settings.cpp b/src/miscellaneous/settings.cpp index 87a6914cd..539cbce10 100755 --- a/src/miscellaneous/settings.cpp +++ b/src/miscellaneous/settings.cpp @@ -26,6 +26,90 @@ #include +// Feeds. +DKEY Feeds::ID = "feeds"; + +DKEY Feeds::UpdateTimeout = "feed_update_timeout"; +DVALUE(int) Feeds::UpdateTimeoutDef = DOWNLOAD_TIMEOUT; + +DKEY Feeds::CountFormat = "count_format"; +DVALUE(char*) Feeds::CountFormatDef = "(%unread)"; + +DKEY Feeds::AutoUpdateInterval = "auto_update_interval"; +DVALUE(int) Feeds::AutoUpdateIntervalDef = DEFAULT_AUTO_UPDATE_INTERVAL; + +DKEY Feeds::AutoUpdateEnabled = "auto_update_enabled"; +DVALUE(bool) Feeds::AutoUpdateEnabledDef = false; + +DKEY Feeds::FeedsUpdateOnStartup = "feeds_update_on_startup"; +DVALUE(bool) Feeds::FeedsUpdateOnStartupDef = false; + +// Messages. +DKEY Messages::ID = "messages"; + +DKEY Messages::UseCustomDate = "use_custom_date"; +DVALUE(bool) Messages::UseCustomDateDef = false; + +DKEY Messages::CustomDateFormat = "custom_date_format"; +DVALUE(char*) Messages::CustomDateFormatDef = ""; + +DKEY Messages::ClearReadOnExit = "clear_read_on_exit"; +DVALUE(bool) Messages::ClearReadOnExitDef = false; + +// GUI. +DKEY GUI::ID = "gui"; + +DKEY GUI::SplitterFeeds = "splitter_feeds"; +DVALUE(char*) GUI::SplitterFeedsDef = ""; + +DKEY GUI::SplitterMessages = "splitter_messages"; +DVALUE(char*) GUI::SplitterMessagesDef = ""; + +DKEY GUI::ToolbarStyle = "toolbar_style"; +DVALUE(Qt::ToolButtonStyle) GUI::ToolbarStyleDef = Qt::ToolButtonIconOnly; + +DKEY GUI::FeedsToolbarActions = "feeds_toolbar"; +DVALUE(char*) GUI::FeedsToolbarActionsDef = "m_actionUpdateAllFeeds,m_actionMarkAllFeedsRead"; + +// General. +DKEY General::ID = "main"; + +// Proxy. +DKEY Proxy::ID = "proxy"; + +// Database. +DKEY Database::ID = "database"; + +// Keyboard. +DKEY Keyboard::ID = "keyboard"; + +// Web browser. +DKEY Browser::ID = "browser"; + +DKEY Browser::GesturesEnabled = "gestures_enabled"; +DVALUE(bool) Browser::GesturesEnabledDef = true; + +DKEY Browser::JavascriptEnabled = "enable_javascript"; +DVALUE(bool) Browser::JavascriptEnabledDef = true; + +DKEY Browser::ImagesEnabled = "enable_images"; +DVALUE(bool) Browser::ImagesEnabledDef = true; + +DKEY Browser::PluginsEnabled = "enable_plugins"; +DVALUE(bool) Browser::PluginsEnabledDef = false; + +DKEY Browser::CustomExternalBrowserEnabled = "custom_external_browser"; +DVALUE(bool) Browser::CustomExternalBrowserEnabledDef = false; + +DKEY Browser::CustomExternalBrowserExecutable = "external_browser_executable"; +DVALUE(char*) Browser::CustomExternalBrowserExecutableDef = ""; + +DKEY Browser::CustomExternalBrowserArguments = "external_browser_arguments"; +DVALUE(char*) Browser::CustomExternalBrowserArgumentsDef = "%1"; + +// Categories. +DKEY Categories::ID = "categories_expand_states"; + Settings::Settings(const QString &file_name, Format format, const Type &status, QObject *parent) : QSettings(file_name, format, parent), m_initializationStatus(status) { diff --git a/src/miscellaneous/settings.h b/src/miscellaneous/settings.h index 3dc5c2413..c9c1dc5e4 100755 --- a/src/miscellaneous/settings.h +++ b/src/miscellaneous/settings.h @@ -24,93 +24,116 @@ #include -#define KEY static const char* -#define VALUE(x) static const x +#define KEY extern const char* +#define DKEY const char* +#define VALUE(x) extern const x +#define DVALUE(x) const x #define SETTING(x) x, x##Def #define GROUP(x) x::ID + // Feeds. namespace Feeds { - KEY ID = "feeds"; + KEY ID; - KEY UpdateTimeout = "feed_update_timeout"; - VALUE(int) UpdateTimeoutDef = DOWNLOAD_TIMEOUT; + KEY UpdateTimeout; + VALUE(int) UpdateTimeoutDef; - KEY CountFormat = "count_format"; - VALUE(char*) CountFormatDef = "(%unread)"; + KEY CountFormat; + VALUE(char*) CountFormatDef; - KEY AutoUpdateInterval = "auto_update_interval"; - VALUE(int) AutoUpdateIntervalDef = DEFAULT_AUTO_UPDATE_INTERVAL; + KEY AutoUpdateInterval; + VALUE(int) AutoUpdateIntervalDef; - KEY AutoUpdateEnabled = "auto_update_enabled"; - VALUE(bool) AutoUpdateEnabledDef = false; + KEY AutoUpdateEnabled; + VALUE(bool) AutoUpdateEnabledDef; - KEY FeedsUpdateOnStartup = "feeds_update_on_startup"; - VALUE(bool) FeedsUpdateOnStartupDef = false; + KEY FeedsUpdateOnStartup; + VALUE(bool) FeedsUpdateOnStartupDef; } // Messages. namespace Messages { - KEY ID = "messages"; + KEY ID; - KEY UseCustomDate = "use_custom_date"; - VALUE(bool) UseCustomDateDef = false; + KEY UseCustomDate; + VALUE(bool) UseCustomDateDef; - KEY CustomDateFormat = "custom_date_format"; - VALUE(char*) CustomDateFormatDef = ""; + KEY CustomDateFormat; + VALUE(char*) CustomDateFormatDef; - KEY ClearReadOnExit = "clear_read_on_exit"; - VALUE(bool) ClearReadOnExitDef = false; + KEY ClearReadOnExit; + VALUE(bool) ClearReadOnExitDef; } // GUI. namespace GUI { - KEY ID = "gui"; + KEY ID; - KEY SplitterFeeds = "splitter_feeds"; - VALUE(char*) SplitterFeedsDef = ""; + KEY SplitterFeeds; + VALUE(char*) SplitterFeedsDef; - KEY SplitterMessages = "splitter_messages"; - VALUE(char*) SplitterMessagesDef = ""; + KEY SplitterMessages; + VALUE(char*) SplitterMessagesDef; - KEY ToolbarStyle = "toolbar_style"; - VALUE(Qt::ToolButtonStyle) ToolbarStyleDef = Qt::ToolButtonIconOnly; + KEY ToolbarStyle; + VALUE(Qt::ToolButtonStyle) ToolbarStyleDef; - KEY FeedsToolbarActions = "feeds_toolbar"; - VALUE(char*) FeedsToolbarActionsDef = "m_actionUpdateAllFeeds,m_actionMarkAllFeedsRead"; + KEY FeedsToolbarActions; + VALUE(char*) FeedsToolbarActionsDef; } // General. namespace General { - KEY ID = "main"; + KEY ID; } // Proxy. namespace Proxy { - KEY ID = "proxy"; + KEY ID; } // Database. namespace Database { - KEY ID = "database"; + KEY ID; } // Keyboard. namespace Keyboard { - KEY ID = "keyboard"; + KEY ID; } // Web browser. namespace Browser { - KEY ID = "browser"; + KEY ID; + + KEY GesturesEnabled; + VALUE(bool) GesturesEnabledDef; + + KEY JavascriptEnabled; + VALUE(bool) JavascriptEnabledDef; + + KEY ImagesEnabled; + VALUE(bool) ImagesEnabledDef; + + KEY PluginsEnabled; + VALUE(bool) PluginsEnabledDef; + + KEY CustomExternalBrowserEnabled; + VALUE(bool) CustomExternalBrowserEnabledDef; + + KEY CustomExternalBrowserExecutable; + VALUE(char*) CustomExternalBrowserExecutableDef; + + KEY CustomExternalBrowserArguments; + VALUE(char*) CustomExternalBrowserArgumentsDef; } // Categories. namespace Categories { - KEY ID = "categories_expand_states"; + KEY ID; } - class Settings : public QSettings { Q_OBJECT diff --git a/src/network-web/webfactory.cpp b/src/network-web/webfactory.cpp index c5eb30dd4..53298f6ca 100755 --- a/src/network-web/webfactory.cpp +++ b/src/network-web/webfactory.cpp @@ -24,15 +24,15 @@ WebFactory::~WebFactory() { void WebFactory::loadState() { Settings *settings = qApp->settings(); - switchJavascript(settings->value(GROUP(Browser), "enable_javascript", true).toBool(), false); - switchImages(settings->value(GROUP(Browser), "enable_images", true).toBool(), false); - switchPlugins(settings->value(GROUP(Browser), "enable_plugins", false).toBool(), false); + switchJavascript(settings->value(GROUP(Browser), SETTING(Browser::JavascriptEnabled)).toBool(), false); + switchImages(settings->value(GROUP(Browser), SETTING(Browser::ImagesEnabled)).toBool(), false); + switchPlugins(settings->value(GROUP(Browser), SETTING(Browser::PluginsEnabled)).toBool(), false); } bool WebFactory::openUrlInExternalBrowser(const QString &url) { - if (qApp->settings()->value(GROUP(Browser), "custom_external_browser", false).toBool()) { - QString browser = qApp->settings()->value(GROUP(Browser), "external_browser_executable").toString(); - QString arguments = qApp->settings()->value(GROUP(Browser), "external_browser_arguments", "%1").toString(); + if (qApp->settings()->value(GROUP(Browser), SETTING(Browser::CustomExternalBrowserEnabled)).toBool()) { + QString browser = qApp->settings()->value(GROUP(Browser), SETTING(Browser::CustomExternalBrowserExecutable)).toString(); + QString arguments = qApp->settings()->value(GROUP(Browser), SETTING(Browser::CustomExternalBrowserArguments)).toString(); return QProcess::startDetached(browser, QStringList() << arguments.arg(url)); } @@ -43,7 +43,7 @@ bool WebFactory::openUrlInExternalBrowser(const QString &url) { void WebFactory::switchJavascript(bool enable, bool save_settings) { if (save_settings) { - qApp->settings()->setValue(GROUP(Browser), "enable_javascript", enable); + qApp->settings()->setValue(GROUP(Browser), Browser::JavascriptEnabled, enable); } m_globalSettings->setAttribute(QWebSettings::JavascriptEnabled, enable); @@ -52,9 +52,7 @@ void WebFactory::switchJavascript(bool enable, bool save_settings) { void WebFactory::switchPlugins(bool enable, bool save_settings) { if (save_settings) { - qApp->settings()->setValue(GROUP(Browser), - "enable_plugins", - enable); + qApp->settings()->setValue(GROUP(Browser), Browser::PluginsEnabled, enable); } m_globalSettings->setAttribute(QWebSettings::PluginsEnabled, enable); @@ -63,9 +61,7 @@ void WebFactory::switchPlugins(bool enable, bool save_settings) { void WebFactory::switchImages(bool enable, bool save_settings) { if (save_settings) { - qApp->settings()->setValue(GROUP(Browser), - "enable_images", - enable); + qApp->settings()->setValue(GROUP(Browser), Browser::ImagesEnabled, enable); } m_globalSettings->setAttribute(QWebSettings::AutoLoadImages, enable); diff --git a/src/network-web/webview.cpp b/src/network-web/webview.cpp index 054f79598..00fa9214c 100755 --- a/src/network-web/webview.cpp +++ b/src/network-web/webview.cpp @@ -238,18 +238,14 @@ void WebView::mousePressEvent(QMouseEvent *event) { void WebView::mouseReleaseEvent(QMouseEvent *event) { if (event->button() & Qt::MiddleButton) { - bool are_gestures_enabled = qApp->settings()->value(GROUP(Browser), - "gestures_enabled", - true).toBool(); + bool are_gestures_enabled = qApp->settings()->value(GROUP(Browser), SETTING(Browser::GesturesEnabled)).toBool(); if (are_gestures_enabled) { QPoint release_point = event->pos(); int left_move = m_gestureOrigin.x() - release_point.x(); int right_move = -left_move; int top_move = m_gestureOrigin.y() - release_point.y(); int bottom_move = -top_move; - int total_max = qMax(qMax(qMax(left_move, right_move), - qMax(top_move, bottom_move)), - 40); + int total_max = qMax(qMax(qMax(left_move, right_move), qMax(top_move, bottom_move)), 40); if (total_max == left_move) { back();