diff --git a/CMakeLists.txt b/CMakeLists.txt index 017388ddb..1a7fb0e98 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -406,6 +406,7 @@ set(APP_SOURCES src/network-web/webview.cpp src/network-web/downloader.cpp src/network-web/downloadmanager.cpp + src/network-web/discoverfeedsbutton.cpp # MAIN sources. src/main.cpp @@ -487,6 +488,7 @@ set(APP_HEADERS src/network-web/webview.h src/network-web/downloader.h src/network-web/downloadmanager.h + src/network-web/discoverfeedsbutton.h ) # APP form files. diff --git a/localization/rssguard-cs_CZ.ts b/localization/rssguard-cs_CZ.ts index c3c84a89c..7de29a2b2 100644 --- a/localization/rssguard-cs_CZ.ts +++ b/localization/rssguard-cs_CZ.ts @@ -1,12 +1,32 @@ - + Application Application is already running. Aplikace již běží. + + Output folder is not writable. + + + + Settings file not copied to output folder successfully. + + + + Database file not copied to output folder successfully. + + + + Database restoration was not initiated. Make sure that output folder is writable. + + + + Settings restoration was not initiated. Make sure that output folder is writable. + + DatabaseFactory @@ -29,6 +49,25 @@ Neznámá chyba. + + DiscoverFeedsButton + + This website does not contain any feeds. + Tato stránka bohužel neobsahuje žádné kanály. + + + Click me to add feeds from this website. +This website contains %n feed(s). + + Pro přidání kanálů z této stránky na mě klikni. +Tato stránka obsahuje %n kanál. + Pro přidání kanálů z této stránky na mě klikni. +Tato stránka obsahuje %n kanály. + Pro přidání kanálů z této stránky na mě klikni. +Tato stránka obsahuje %n kanálů. + + + DownloadItem @@ -341,50 +380,26 @@ Automatický update: %5 Cannot add standard category Nelze přidat standardní kategorii - - You cannot add new standard category now because feed update is ongoing. - Nyní nelze přidat standardní kategorii, protože právě probíhá aktualizace kanálů. - Cannot add standard feed Nelze přidat standardní kanál - - You cannot add new standard feed now because feed update is ongoing. - Nyní nelze přidat standardní kanál, protože právě probíhá aktualizace kanálů. - Cannot edit item Nelze upravit položku - - Selected item cannot be edited because feed update is ongoing. - Vybraná položka nemůže být nyní upravena, protože právě probíhá aktualizace kanálů. - Cannot delete item Nelze smazat položku - - Selected item cannot be deleted because feed update is ongoing. - Vybraná položka nemůže být nyní smazána, protože právě probíhá aktualizace kanálů. - Cannot update all items Nelze aktualizovat všechny položky - - You cannot update all items because another feed update is ongoing. - Právě nyní nemůžete aktualizovat všechny položky, protože nejspíše probíhá jiná aktualizace. - Cannot update selected items Nelze aktualizovat vybrané položky - - You cannot update selected items because another feed update is ongoing. - Právě nyní nemůžete aktualizovat vybrané položky, protože nejspíše probíhá jiná aktualizace. - You are about to delete selected feed or category. Právě se chystáte smazat vybraný kanál či kategorii. @@ -425,6 +440,30 @@ Automatický update: %5 Context menu for recycle bin Kontextové menu pro koš + + You cannot update all items because another another critical operation is ongoing. + + + + You cannot update selected items because another critical operation is ongoing. + + + + You cannot add new standard category now because another critical operation is ongoing. + + + + You cannot add new standard feed now because another critical operation is ongoing. + + + + Selected item cannot be edited because another critical operation is ongoing. + + + + Selected item cannot be deleted because another critical operation is ongoing. + + FormAbout @@ -556,15 +595,6 @@ Automatický update: %5 Backup was created successfully. Záloha byla vytvořena. - - Backup failed, database and/or settings is probably not backed. - Zálohování selhalo, databáze a/nebo nastavení asi nebylo zálohováno. - - - Backup failed. Check the output folder if your database -and/or settings were backed or not. Also make sure that target foder is writable. - Záloha selhala, zkontrolujte obsah výstupní složky. - Select destionation folder Zvolte cílovoý adresář @@ -581,6 +611,14 @@ and/or settings were backed or not. Also make sure that target foder is writable Backup name looks okay. Název zálohy je v pořádku. + + Output folder + + + + Backup failed. + + FormCategoryDetails @@ -1494,10 +1532,6 @@ and/or settings were backed or not. Also make sure that target foder is writable You need to restart application for restoration process to finish. Pro dokončení procesu obnovení je třeba restartovat aplikaci. - - Restoration was not initiated successfully. - Obnovení nebylo spuštěno úspěšně. - Database and/or settings were not copied to restoration folder successully. Databáze a/nebo nastavení byly zkopírovány do obnovovací složky. @@ -1510,6 +1544,10 @@ and/or settings were backed or not. Also make sure that target foder is writable Good source folder is specified. Je specifikována dobrá zdrojová složka. + + Source folder + + FormSettings @@ -1837,10 +1875,6 @@ Autoři této aplikace nenesou žádnou odpovědnost za ztrátu Vašich dat.Test setup Otestovat - - Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. - Berte na vědomí, že latence a celková rychlost zvoleného MySQL serveru může mít rozhodující vliv na rychlost této aplikace. Použití pomalého serveru může vést k tomu, že práce se zprávami či kanály bude neúměrně pomalá. - Right mouse button double-click Dvojklik pravého tlačítka myši @@ -2118,6 +2152,16 @@ Musíte restartovat manuálně. Select downloads target directory Zvolit cílový adresář pro uložení stahovaných souborů + + Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. + +MySQL backend will automatically use database with name "rssguard". Do not create this database manually, let this application to handle it by itself. Therefore, given user must have rights to created and deleted databases. + + + + &Show password + + FormUpdate @@ -2345,6 +2389,14 @@ Přejít na web aplikace a stáhnout jej ručně. Is message permanently deleted from recycle bin? Je zpráva permanentně vysypána z koše? + + Attachments + + + + List of attachments. + + MessagesToolBar diff --git a/localization/rssguard-de_DE.ts b/localization/rssguard-de_DE.ts index 9ed5cb42c..f3fef986a 100644 --- a/localization/rssguard-de_DE.ts +++ b/localization/rssguard-de_DE.ts @@ -7,6 +7,26 @@ Application is already running. Die Applikation läuft bereits. + + Output folder is not writable. + + + + Settings file not copied to output folder successfully. + + + + Database file not copied to output folder successfully. + + + + Database restoration was not initiated. Make sure that output folder is writable. + + + + Settings restoration was not initiated. Make sure that output folder is writable. + + DatabaseFactory @@ -29,6 +49,21 @@ Unbekannter Fehler. + + DiscoverFeedsButton + + This website does not contain any feeds. + + + + Click me to add feeds from this website. +This website contains %n feed(s). + + + + + + DownloadItem @@ -328,50 +363,26 @@ Auto-update status: %5 Cannot add standard category Kann die Standardkategorie nicht hinzufügen - - You cannot add new standard category now because feed update is ongoing. - Sie können jetzt keine Standardkategorie hinzufügen weil der Feed-Update läuft. - Cannot add standard feed Kann den Standard-Feed nicht hinzufügen - - You cannot add new standard feed now because feed update is ongoing. - Sie können jetzt keinen Standard-Feed hinzufügen weil der Feed-Update läuft. - Cannot edit item Kann das Item nicht editieren - - Selected item cannot be edited because feed update is ongoing. - Selektiertes Item kann nicht editiert werden weil der Feed-Update läuft. - Cannot delete item Item kann nicht gelöscht werden - - Selected item cannot be deleted because feed update is ongoing. - Selektiertes Item kann nicht gelöscht werden weil der Feed-Update läuft. - Cannot update all items Kann nicht alle Items updaten - - You cannot update all items because another feed update is ongoing. - Sie können nicht alle Items updaten weil ein anderer Feed-Update läuft. - Cannot update selected items Kann die selektierten Items nicht updaten - - You cannot update selected items because another feed update is ongoing. - Sie können die selektierten Items nicht updaten weil ein anderer Feed-Update läuft. - You are about to delete selected feed or category. @@ -412,6 +423,30 @@ Auto-update status: %5 Context menu for recycle bin + + You cannot update all items because another another critical operation is ongoing. + + + + You cannot update selected items because another critical operation is ongoing. + + + + You cannot add new standard category now because another critical operation is ongoing. + + + + You cannot add new standard feed now because another critical operation is ongoing. + + + + Selected item cannot be edited because another critical operation is ongoing. + + + + Selected item cannot be deleted because another critical operation is ongoing. + + FormAbout @@ -543,15 +578,6 @@ Auto-update status: %5 Backup was created successfully. - - Backup failed, database and/or settings is probably not backed. - - - - Backup failed. Check the output folder if your database -and/or settings were backed or not. Also make sure that target foder is writable. - - Select destionation folder @@ -568,6 +594,14 @@ and/or settings were backed or not. Also make sure that target foder is writable Backup name looks okay. + + Output folder + + + + Backup failed. + + FormCategoryDetails @@ -1481,10 +1515,6 @@ and/or settings were backed or not. Also make sure that target foder is writable You need to restart application for restoration process to finish. - - Restoration was not initiated successfully. - - Database and/or settings were not copied to restoration folder successully. @@ -1497,6 +1527,10 @@ and/or settings were backed or not. Also make sure that target foder is writable Good source folder is specified. + + Source folder + + FormSettings @@ -1814,10 +1848,6 @@ Authors of this application are NOT responsible for lost data. Test setup Testkonfiguration - - Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. - Beachten Sie, dass die Geschwindigkeit und Latenz des verwendeten MySQL-Servers SEHR vom verwendeten Verbindungsmedium abhängt und die Applikation somit beeinflusst. Langsame Verbindungen führen zu einer schlechten Performanz der Feeds oder Nachrichten. - Right mouse button double-click Doppelklick der rechten Maustaste @@ -2087,6 +2117,16 @@ You have to restart manually. Select downloads target directory + + Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. + +MySQL backend will automatically use database with name "rssguard". Do not create this database manually, let this application to handle it by itself. Therefore, given user must have rights to created and deleted databases. + + + + &Show password + + FormUpdate @@ -2316,6 +2356,14 @@ Go to application website to obtain it manually. Is message permanently deleted from recycle bin? + + Attachments + + + + List of attachments. + + MessagesToolBar diff --git a/localization/rssguard-en_GB.ts b/localization/rssguard-en_GB.ts index 5b7902fea..f38ccb48a 100644 --- a/localization/rssguard-en_GB.ts +++ b/localization/rssguard-en_GB.ts @@ -7,6 +7,26 @@ Application is already running. + + Output folder is not writable. + + + + Settings file not copied to output folder successfully. + + + + Database file not copied to output folder successfully. + + + + Database restoration was not initiated. Make sure that output folder is writable. + + + + Settings restoration was not initiated. Make sure that output folder is writable. + + DatabaseFactory @@ -29,6 +49,21 @@ + + DiscoverFeedsButton + + This website does not contain any feeds. + + + + Click me to add feeds from this website. +This website contains %n feed(s). + + + + + + DownloadItem @@ -328,50 +363,26 @@ Auto-update status: %5 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. - - 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. - - You are about to delete selected feed or category. @@ -412,6 +423,30 @@ Auto-update status: %5 Context menu for recycle bin + + You cannot update all items because another another critical operation is ongoing. + + + + You cannot update selected items because another critical operation is ongoing. + + + + You cannot add new standard category now because another critical operation is ongoing. + + + + You cannot add new standard feed now because another critical operation is ongoing. + + + + Selected item cannot be edited because another critical operation is ongoing. + + + + Selected item cannot be deleted because another critical operation is ongoing. + + FormAbout @@ -543,15 +578,6 @@ Auto-update status: %5 Backup was created successfully. - - Backup failed, database and/or settings is probably not backed. - - - - Backup failed. Check the output folder if your database -and/or settings were backed or not. Also make sure that target foder is writable. - - Select destionation folder @@ -568,6 +594,14 @@ and/or settings were backed or not. Also make sure that target foder is writable Backup name looks okay. + + Output folder + + + + Backup failed. + + FormCategoryDetails @@ -1481,10 +1515,6 @@ and/or settings were backed or not. Also make sure that target foder is writable You need to restart application for restoration process to finish. - - Restoration was not initiated successfully. - - Database and/or settings were not copied to restoration folder successully. @@ -1497,6 +1527,10 @@ and/or settings were backed or not. Also make sure that target foder is writable Good source folder is specified. + + Source folder + + FormSettings @@ -1812,10 +1846,6 @@ Authors of this application are NOT responsible for lost data. Test setup - - Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. - - Right mouse button double-click @@ -2085,6 +2115,16 @@ You have to restart manually. Select downloads target directory + + Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. + +MySQL backend will automatically use database with name "rssguard". Do not create this database manually, let this application to handle it by itself. Therefore, given user must have rights to created and deleted databases. + + + + &Show password + + FormUpdate @@ -2311,6 +2351,14 @@ Go to application website to obtain it manually. Is message permanently deleted from recycle bin? + + Attachments + + + + List of attachments. + + MessagesToolBar diff --git a/localization/rssguard-en_US.ts b/localization/rssguard-en_US.ts index a5b670860..b06bb6709 100644 --- a/localization/rssguard-en_US.ts +++ b/localization/rssguard-en_US.ts @@ -3,6 +3,31 @@ Application + + + Output folder is not writable. + + + + + Settings file not copied to output folder successfully. + + + + + Database file not copied to output folder successfully. + + + + + Database restoration was not initiated. Make sure that output folder is writable. + + + + + Settings restoration was not initiated. Make sure that output folder is writable. + + Application is already running. @@ -12,28 +37,45 @@ DatabaseFactory - + MySQL server works as expected. - + No MySQL server is running in the target destination. - + Access denied. Invalid username or password used. Access to MySQL server was denied. - + Unknown error. Unknown MySQL error arised. + + DiscoverFeedsButton + + + This website does not contain any feeds. + + + + + Click me to add feeds from this website. +This website contains %n feed(s). + + + + + + DownloadItem @@ -264,17 +306,17 @@ - + Invalid tree data. - + Import successfull, but some feeds/categories were not imported due to error. - + Import was completely successfull. @@ -388,113 +430,113 @@ Auto-update status: %5 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. + + You cannot update all items because another another critical operation is ongoing. - + + You cannot update selected items because another critical operation is ongoing. + + + + + You cannot add new standard category now because another critical operation is ongoing. + + + + + You cannot add new standard feed now because another critical operation is ongoing. + + + + + Selected item cannot be edited because another critical operation is ongoing. + + + + + Selected item cannot be deleted because another critical operation 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 @@ -562,39 +604,39 @@ Auto-update status: %5 - + About %1 About RSS Guard dialog title. - - + + License not found. - + Changelog not found. - + <b>%8</b><br><b>Version:</b> %1 (build on %2 with CMake %3)<br><b>Revision:</b> %4<br><b>Build date:</b> %5<br><b>Qt:</b> %6 (compiled against %7)<br> - + <body>%5 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 %5 from its website.<br><br><br>Copyright (C) 2011-%3 %4</body> - + FULLY portable - + PARTIALLY portable @@ -606,6 +648,11 @@ Auto-update status: %5 Backup database/settings + + + Output folder + + &Select folder @@ -652,43 +699,37 @@ Auto-update status: %5 - + Backup was created successfully and stored in target folder. - + Backup was created successfully. - - Backup failed, database and/or settings is probably not backed. + + Backup failed. - - Backup failed. Check the output folder if your database -and/or settings were backed or not. Also make sure that target foder is writable. - - - - + Select destionation folder - + Good destination folder is specified. - + Backup name cannot be empty. - + Backup name looks okay. @@ -1809,6 +1850,11 @@ and/or settings were backed or not. Also make sure that target foder is writable Operation results + + + Source folder + + &Select folder @@ -1835,32 +1881,27 @@ and/or settings were backed or not. Also make sure that target foder is writable - + Restoration was initiated. Restart to proceed. - + You need to restart application for restoration process to finish. - - Restoration was not initiated successfully. - - - - + Database and/or settings were not copied to restoration folder successully. - + Select source folder - + Good source folder is specified. @@ -1967,19 +2008,19 @@ Authors of this application are NOT responsible for lost data. - + Port - + Username - + Password @@ -1989,157 +2030,152 @@ Authors of this application are NOT responsible for lost data. - - Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. - - - - + Icons && skins - + Icons - + Icon theme - + Skins - + Active skin: - + Selected skin: - + Tray area && notifications - + Tray icon - + Disable - + Hide main window when it is minimized - + Start application hidden - + Enable - + Tabs - + Open new tabs with left mouse button double-click on tab bar - + Hide tab bar if just one tab is visible - + Close tabs with - + Right mouse button double-click - + Middle mouse button single-click - + Toolbars - + Toolbar for feeds list - + Toolbar for messages list - + Toolbar button style - + Select toolbar to edit - + Internal web browser - + Queue new tabs (with hyperlinks) after the active tab - + Enable JavaScript - + Enable external plugins based on NPAPI - + Auto-load images - + Enable mouse gestures - + Mouse gestures work with middle mouse button. Possible gestures are: <ul> <li>previous web page (drag mouse left),</li> @@ -2150,198 +2186,210 @@ Authors of this application are NOT responsible for lost data. - + External web browser - + <html><head/><body><p>If unchecked, then default system-wide web browser is used.</p></body></html> - + Custom external web browser - + Web browser executable - + Executable file of web browser - + ... - + Executable parameters - + Parameters to executable - + Use sample arguments for - + Select browser - + Note that "%1" (without quotation marks) is placeholder for URL of selected message. - + Proxy - + Type Proxy server type. - + Host - + Hostname or IP of your proxy server - + Your username for proxy server authentication - + Your password for proxy server authentication - + Display password - + Note that these settings are applied only on newly established connections. - + Feeds && categories - + Update all feed on application startup - + Auto-update all feeds every - + minutes - + Feed connection timeout - + Connection timeout is time interval which is reserved for downloading new messages for the feed. If this time interval elapses, then download process is aborted. - + ms - + Message count format in feed list - + Enter format for count of messages displayed next to each feed/category in feed list. Use "%all" and "%unread" strings which are placeholders for the actual count of all (or unread) messages. - + Messages - + Remove all read messages from all feeds on application exit - + When new message arrives from feed and duplicate exists, then its content is updated and new message is dropped. - + Remove duplicate messages - + Target directory for downloaded files - + Ask for each individual downloaded file - + Save all downloaded files into - + Target directory where all downloaded files are saved - + &Browse - + Keep message selection in the middle of the message list viewport - + + Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. + +MySQL backend will automatically use database with name "rssguard". Do not create this database manually, let this application to handle it by itself. Therefore, given user must have rights to created and deleted databases. + + + + + &Show password + + + + Use custom date/time format (overrides format loaded from active localization) @@ -2374,228 +2422,228 @@ Authors of this application are NOT responsible for lost data. - + Select downloads target directory - + Select web browser executable - + Executables (*) File filter for external browser selection dialog. - + Executables (*.*) - + 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 @@ -2772,115 +2820,125 @@ currently installed one. MessagesModel - + Id - + Read - + Deleted - + Important - + Feed - + Title - + Url - + Author - + Created on - + Contents - + Permanently deleted - + + Attachments + + + + 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? + + + List of attachments. + + MessagesToolBar @@ -2933,27 +2991,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. @@ -2961,85 +3019,85 @@ currently installed one. NetworkFactory - + protocol error Network status. - + host not found Network status. - + connection refused Network status. - + connection timed out Network status. - + SSL handshake failed Network status. - + proxy server connection refused Network status. - + temporary failure Network status. - + authentication failed Network status. - + proxy authentication required Network status. - + proxy server not found Network status. - + no errors Network status. - + uknown content Network status. - + content not found Network status. - + unknown error Network status. @@ -3049,35 +3107,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 @@ -3117,12 +3175,12 @@ currently installed one. SystemFactory - + New version available - + Click the bubble for more information. @@ -3238,88 +3296,88 @@ Unread news: %2 WebBrowser - + Navigation panel - + Zoom - + Decrease zoom. - + Reset zoom to default. - + Increase zoom. - + Back - + Go back. - + Forward - + Go forward. - + Reload - + Reload current web page. - + Stop - + Stop web page loading. - + No title Webbrowser tab title when no title is available. - + Written by - + uknown author - + Newspaper view diff --git a/localization/rssguard-fr_FR.ts b/localization/rssguard-fr_FR.ts index 0ccb75e38..fceea6dfb 100644 --- a/localization/rssguard-fr_FR.ts +++ b/localization/rssguard-fr_FR.ts @@ -7,6 +7,26 @@ Application is already running. L'application est déjà en cours d'exécution. + + Output folder is not writable. + + + + Settings file not copied to output folder successfully. + + + + Database file not copied to output folder successfully. + + + + Database restoration was not initiated. Make sure that output folder is writable. + + + + Settings restoration was not initiated. Make sure that output folder is writable. + + DatabaseFactory @@ -29,6 +49,21 @@ Erreur inconnue. + + DiscoverFeedsButton + + This website does not contain any feeds. + + + + Click me to add feeds from this website. +This website contains %n feed(s). + + + + + + DownloadItem @@ -329,50 +364,26 @@ Auto-update status: %5 Cannot add standard category Impossible d'ajouter une catégorie standard - - You cannot add new standard category now because feed update is ongoing. - Impossible d'ajouter une nouvelle catégorie standard car une mise à jour est en cours. - Cannot add standard feed Impossible d'ajouter un flux standard - - You cannot add new standard feed now because feed update is ongoing. - Impossible d'ajouter un nouveau flux standard car une mise à jour est en cours. - Cannot edit item Impossible d'éditer l'article - - Selected item cannot be edited because feed update is ongoing. - L'article sélectionné ne peut pas être éditer car une mise à jour est en cours sur les flux. - Cannot delete item Impossible de supprimer l'article - - Selected item cannot be deleted because feed update is ongoing. - L'article sélectionné ne peut pas être supprimer car une mise à jour est en cours sur les flux. - Cannot update all items Impossible de mettre tout les articles à jour - - You cannot update all items because another feed update is ongoing. - Vous ne pouvez pas mettre à jour tout les articles car une autre mise à jour est en cours sur les flux. - Cannot update selected items Impossible de mettre les articles sélectionnés à jour - - You cannot update selected items because another feed update is ongoing. - Vous ne pouvez pas mettre à jour les articles sélectionnés car une autre mise à jour est en cours sur les flux. - You are about to delete selected feed or category. @@ -413,6 +424,30 @@ Auto-update status: %5 Context menu for recycle bin + + You cannot update all items because another another critical operation is ongoing. + + + + You cannot update selected items because another critical operation is ongoing. + + + + You cannot add new standard category now because another critical operation is ongoing. + + + + You cannot add new standard feed now because another critical operation is ongoing. + + + + Selected item cannot be edited because another critical operation is ongoing. + + + + Selected item cannot be deleted because another critical operation is ongoing. + + FormAbout @@ -544,15 +579,6 @@ Auto-update status: %5 Backup was created successfully. - - Backup failed, database and/or settings is probably not backed. - - - - Backup failed. Check the output folder if your database -and/or settings were backed or not. Also make sure that target foder is writable. - - Select destionation folder @@ -569,6 +595,14 @@ and/or settings were backed or not. Also make sure that target foder is writable Backup name looks okay. + + Output folder + + + + Backup failed. + + FormCategoryDetails @@ -1482,10 +1516,6 @@ and/or settings were backed or not. Also make sure that target foder is writable You need to restart application for restoration process to finish. - - Restoration was not initiated successfully. - - Database and/or settings were not copied to restoration folder successully. @@ -1498,6 +1528,10 @@ and/or settings were backed or not. Also make sure that target foder is writable Good source folder is specified. + + Source folder + + FormSettings @@ -1825,10 +1859,6 @@ Les auteurs de cette application NE sont PAS responsable de la perte de données Test setup Configuration de test - - Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. - Noter que la vitesse du serveur MySQL utilisé et la latence de la connexion utilisée influent FORTEMENT la performance finale de cette application. L'utilisation de connexions lentes pour la base de données conduit à une mauvaise performance lors de la navigation dans les flux ou messages. - Right mouse button double-click Double-clic du bouton droit de la souris @@ -2104,6 +2134,16 @@ You have to restart manually. Select downloads target directory + + Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. + +MySQL backend will automatically use database with name "rssguard". Do not create this database manually, let this application to handle it by itself. Therefore, given user must have rights to created and deleted databases. + + + + &Show password + + FormUpdate @@ -2334,6 +2374,14 @@ Aller sur le site de l'application pour les obtenir manuellement.Is message permanently deleted from recycle bin? + + Attachments + + + + List of attachments. + + MessagesToolBar diff --git a/localization/rssguard-it_IT.ts b/localization/rssguard-it_IT.ts index 4834aee07..57155891b 100644 --- a/localization/rssguard-it_IT.ts +++ b/localization/rssguard-it_IT.ts @@ -7,6 +7,26 @@ Application is already running. Applicazione già avviata. + + Output folder is not writable. + + + + Settings file not copied to output folder successfully. + + + + Database file not copied to output folder successfully. + + + + Database restoration was not initiated. Make sure that output folder is writable. + + + + Settings restoration was not initiated. Make sure that output folder is writable. + + DatabaseFactory @@ -29,6 +49,21 @@ Errore sconosciuto. + + DiscoverFeedsButton + + This website does not contain any feeds. + + + + Click me to add feeds from this website. +This website contains %n feed(s). + + + + + + DownloadItem @@ -328,50 +363,26 @@ Auto-update status: %5 Cannot add standard category Impossibile aggiungere categoria standard - - You cannot add new standard category now because feed update is ongoing. - - Cannot add standard feed Impossibile aggiungere feed standard - - You cannot add new standard feed now because feed update is ongoing. - - Cannot edit item Impossibile modificare elemento - - Selected item cannot be edited because feed update is ongoing. - - Cannot delete item Impossibile eliminare l'elemento - - Selected item cannot be deleted because feed update is ongoing. - - Cannot update all items Impossibile aggiornare tutti gli elementi - - You cannot update all items because another feed update is ongoing. - - Cannot update selected items Impossibile aggiornare gli elementi selezionati - - You cannot update selected items because another feed update is ongoing. - - You are about to delete selected feed or category. @@ -412,6 +423,30 @@ Auto-update status: %5 Context menu for recycle bin + + You cannot update all items because another another critical operation is ongoing. + + + + You cannot update selected items because another critical operation is ongoing. + + + + You cannot add new standard category now because another critical operation is ongoing. + + + + You cannot add new standard feed now because another critical operation is ongoing. + + + + Selected item cannot be edited because another critical operation is ongoing. + + + + Selected item cannot be deleted because another critical operation is ongoing. + + FormAbout @@ -543,15 +578,6 @@ Auto-update status: %5 Backup was created successfully. - - Backup failed, database and/or settings is probably not backed. - - - - Backup failed. Check the output folder if your database -and/or settings were backed or not. Also make sure that target foder is writable. - - Select destionation folder @@ -568,6 +594,14 @@ and/or settings were backed or not. Also make sure that target foder is writable Backup name looks okay. + + Output folder + + + + Backup failed. + + FormCategoryDetails @@ -1481,10 +1515,6 @@ and/or settings were backed or not. Also make sure that target foder is writable You need to restart application for restoration process to finish. - - Restoration was not initiated successfully. - - Database and/or settings were not copied to restoration folder successully. @@ -1497,6 +1527,10 @@ and/or settings were backed or not. Also make sure that target foder is writable Good source folder is specified. + + Source folder + + FormSettings @@ -1814,10 +1848,6 @@ Authors of this application are NOT responsible for lost data. Test setup - - Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. - - Right mouse button double-click @@ -2087,6 +2117,16 @@ You have to restart manually. Select downloads target directory + + Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. + +MySQL backend will automatically use database with name "rssguard". Do not create this database manually, let this application to handle it by itself. Therefore, given user must have rights to created and deleted databases. + + + + &Show password + + FormUpdate @@ -2316,6 +2356,14 @@ Go to application website to obtain it manually. Is message permanently deleted from recycle bin? + + Attachments + + + + List of attachments. + + MessagesToolBar diff --git a/localization/rssguard-nl_NL.ts b/localization/rssguard-nl_NL.ts index 49d9b79ad..e3eef6054 100644 --- a/localization/rssguard-nl_NL.ts +++ b/localization/rssguard-nl_NL.ts @@ -1,10 +1,32 @@ - + + + Application Application is already running. RSSguard is al gestart. + + Output folder is not writable. + + + + Settings file not copied to output folder successfully. + + + + Database file not copied to output folder successfully. + + + + Database restoration was not initiated. Make sure that output folder is writable. + + + + Settings restoration was not initiated. Make sure that output folder is writable. + + DatabaseFactory @@ -27,6 +49,21 @@ Onbekende fout. + + DiscoverFeedsButton + + This website does not contain any feeds. + + + + Click me to add feeds from this website. +This website contains %n feed(s). + + + + + + DownloadItem @@ -102,11 +139,17 @@ %n minutes remaining - %n resterende minuut%n resterende minuten + + %n resterende minuut + %n resterende minuten + %n seconds remaining - %n resterende seconde%n resterende seconden + + %n resterende seconde + %n resterende seconden + bytes @@ -126,7 +169,10 @@ Downloading %n file(s)... - Dowloading %1 bestand...Downloading %n bestanden... + + Dowloading %1 bestand... + Downloading %n bestanden... + @@ -223,7 +269,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 @@ -253,12 +302,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 @@ -292,7 +347,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). + @@ -312,50 +370,26 @@ Auto-update status: %5 Cannot add standard category Kan geen standaard categorie toevoegen - - You cannot add new standard category now because feed update is ongoing. - Je kan niet een nieuwe standaard categorie toevoegen omdat feeds aan het updaten zijn. - Cannot add standard feed Kan geen standaard feed toevoegen - - You cannot add new standard feed now because feed update is ongoing. - Je kan niet een nieuwe standaard feed toevoegen omdat feeds aan het updaten zijn. - Cannot edit item Kan item niet bewerken - - Selected item cannot be edited because feed update is ongoing. - Gekozen item kan niet worden bewerkt omdat feeds aan het updaten zijn. - Cannot delete item Kan item niet verwijderen - - Selected item cannot be deleted because feed update is ongoing. - Geselecteerde item kan niet worden verwijderd omdat feeds aan het updaten zijn. - Cannot update all items Kan alle items niet bijwerken - - You cannot update all items because another feed update is ongoing. - Je kan niet alle items updaten omdat feeds aan het updaten zijn. - Cannot update selected items Kan geselecteerde items niet bijwerken - - You cannot update selected items because another feed update is ongoing. - Je kan gekozen items niet bijwerken omdat feeds aan het updaten zijn. - You are about to delete selected feed or category. Je gaat geselecteerde feed of categorie verwijderen. @@ -396,6 +430,30 @@ Auto-update status: %5 Context menu for recycle bin Contextmenu voor prullenbak + + You cannot update all items because another another critical operation is ongoing. + + + + You cannot update selected items because another critical operation is ongoing. + + + + You cannot add new standard category now because another critical operation is ongoing. + + + + You cannot add new standard feed now because another critical operation is ongoing. + + + + Selected item cannot be edited because another critical operation is ongoing. + + + + Selected item cannot be deleted because another critical operation is ongoing. + + FormAbout @@ -527,16 +585,6 @@ Auto-update status: %5 Backup was created successfully. Back-up is gemaakt. - - Backup failed, database and/or settings is probably not backed. - Back-up mislukt, database en / of instellingen worden waarschijnlijk niet ondersteund. - - - Backup failed. Check the output folder if your database -and/or settings were backed or not. Also make sure that target foder is writable. - Back-up mislukt. Controleer de uitvoer map als uw database -en / of instellingen die niet werden gesteund. Zorg er ook voor dat de doelmap beschrijfbaar is. - Select destionation folder Selecteer bestemmingsmap @@ -553,6 +601,14 @@ en / of instellingen die niet werden gesteund. Zorg er ook voor dat de doelmap b Backup name looks okay. Backup naam is in orde. + + Output folder + + + + Backup failed. + + FormCategoryDetails @@ -1467,10 +1523,6 @@ Exporteer feeds die je wilt van het geselecteerde bestand. You need to restart application for restoration process to finish. Je moet RssGuard herstarten om de herstel procedure te voltooien. - - Restoration was not initiated successfully. - Het herstellen werd niet met succes gestart. - Database and/or settings were not copied to restoration folder successully. Database en / of instellingen werden niet gekopieerd naar de herstel map. @@ -1483,6 +1535,10 @@ Exporteer feeds die je wilt van het geselecteerde bestand. Good source folder is specified. Juiste source map is opgegeven. + + Source folder + + FormSettings @@ -1811,10 +1867,6 @@ Auteurs van Rssguard zijn NIET verantwoordelijk voor verlies van gegevens.Test setup Test instelling - - Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. - Merk op dat de snelheid van de gebruikte MySQL server en wachttijd van de gebruikte verbinding ZWAAR invloed heeft op de uiteindelijke prestaties van deze toepassing. Met langzame database connecties leidt dit tot slechte prestaties tijdens het browsen feeds of berichten. - Right mouse button double-click Rechter muisknop dubbele-klik @@ -2093,6 +2145,16 @@ Wanneer een nieuw feed bericht binnenkomt en dubbel bestaat, dan wordt de inhoud Select downloads target directory Selecteer gedownloade doelmap + + Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. + +MySQL backend will automatically use database with name "rssguard". Do not create this database manually, let this application to handle it by itself. Therefore, given user must have rights to created and deleted databases. + + + + &Show password + + FormUpdate @@ -2323,6 +2385,14 @@ Ga naar RRSguard website en download het handmatig. Is message permanently deleted from recycle bin? Is het bericht definitief verwijderd uit de prullenbak? + + Attachments + + + + List of attachments. + + MessagesToolBar @@ -2814,4 +2884,4 @@ Ongelezen nieuws: %2 Afbeelding opslaan als... - \ No newline at end of file + diff --git a/localization/rssguard-sv_SE.ts b/localization/rssguard-sv_SE.ts index e3c37ccc9..87a5f8e78 100644 --- a/localization/rssguard-sv_SE.ts +++ b/localization/rssguard-sv_SE.ts @@ -7,6 +7,26 @@ Application is already running. Programmet är redan startat. + + Output folder is not writable. + + + + Settings file not copied to output folder successfully. + + + + Database file not copied to output folder successfully. + + + + Database restoration was not initiated. Make sure that output folder is writable. + + + + Settings restoration was not initiated. Make sure that output folder is writable. + + DatabaseFactory @@ -29,6 +49,21 @@ Okänt fel. + + DiscoverFeedsButton + + This website does not contain any feeds. + + + + Click me to add feeds from this website. +This website contains %n feed(s). + + + + + + DownloadItem @@ -334,50 +369,26 @@ Uppdateringsstatus: %5 Cannot add standard category Kan inte lägga till kategori - - You cannot add new standard category now because feed update is ongoing. - Du kan inte lägga till ny kategori nu, eftersom flödesuppdatering pågår. - Cannot add standard feed Kan inte lägga till flöde - - You cannot add new standard feed now because feed update is ongoing. - Du kan inte lägga till nytt flöde nu, eftersom flödesuppdatering pågår. - Cannot edit item Kan inte redigera objektet - - Selected item cannot be edited because feed update is ongoing. - Det markerade objektet kan inte redigeras eftersom flödesuppdatering pågår. - Cannot delete item Kan inte bort objektet - - Selected item cannot be deleted because feed update is ongoing. - Markerat objekt kan inte tas bort eftersom flödesuppdatering pågår. - Cannot update all items Kan inte uppdatera alla objekt - - You cannot update all items because another feed update is ongoing. - Du kan inte uppdatera alla objekt eftersom flödesuppdatering redan pågår. - Cannot update selected items Kan inte uppdatera markerat objekt - - You cannot update selected items because another feed update is ongoing. - Du kan inte uppdatera markerat objekt eftersom flödesuppdatering redan pågår. - You are about to delete selected feed or category. Du är på väg att ta bort markerat flöde eller kategori. @@ -418,6 +429,30 @@ Uppdateringsstatus: %5 Context menu for recycle bin Kontextmeny för papperskorgen + + You cannot update all items because another another critical operation is ongoing. + + + + You cannot update selected items because another critical operation is ongoing. + + + + You cannot add new standard category now because another critical operation is ongoing. + + + + You cannot add new standard feed now because another critical operation is ongoing. + + + + Selected item cannot be edited because another critical operation is ongoing. + + + + Selected item cannot be deleted because another critical operation is ongoing. + + FormAbout @@ -549,16 +584,6 @@ Uppdateringsstatus: %5 Backup was created successfully. Säkerhetskopiering slutförd. - - Backup failed, database and/or settings is probably not backed. - Säkerhetshopiering misslyckades. Databas och/eller inställningar ej kopierade. - - - Backup failed. Check the output folder if your database -and/or settings were backed or not. Also make sure that target foder is writable. - Säkerhetshopiering misslyckades. Kontrollera i målmappen om databas -och/eller inställningar sparades. Tillse också att målmappen inte är skrivskyddad. - Select destionation folder Välj målmapp @@ -575,6 +600,14 @@ och/eller inställningar sparades. Tillse också att målmappen inte är skrivsk Backup name looks okay. Säkerhetskopians namn är godkänt. + + Output folder + + + + Backup failed. + + FormCategoryDetails @@ -1488,10 +1521,6 @@ och/eller inställningar sparades. Tillse också att målmappen inte är skrivsk You need to restart application for restoration process to finish. Du måste starta om programmet för att slutföra återställningen. - - Restoration was not initiated successfully. - Återställning kunde inte utföras. - Database and/or settings were not copied to restoration folder successully. Databas och/eller inställningar kopierades inte till återställningsmappen. @@ -1504,6 +1533,10 @@ och/eller inställningar sparades. Tillse också att målmappen inte är skrivsk Good source folder is specified. Källmappen är godkänd. + + Source folder + + FormSettings @@ -1832,10 +1865,6 @@ Utvecklaren av detta program, är INTE ansvarig för förlorad data.Test setup Testa - - Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. - Notera att hastigheten på den använda MySQL-servern och latensen för aktuellt anslutningsmedium, KRAFTIGT påverkar detta programs prestanda. Användning av långsamma databasanslutningar leder till dålig prestanda vid navigering bland flöden och meddelanden. - Right mouse button double-click Dubbelklick på höger musknapp @@ -2113,6 +2142,16 @@ Du måste starta om manuellt. Select downloads target directory Välj nedladdningsmapp + + Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages. + +MySQL backend will automatically use database with name "rssguard". Do not create this database manually, let this application to handle it by itself. Therefore, given user must have rights to created and deleted databases. + + + + &Show password + + FormUpdate @@ -2342,6 +2381,14 @@ Gå till programmets hemsida för att hämta den manuellt. Is message permanently deleted from recycle bin? Är meddelandet permanent borttaget från papperskorgen? + + Attachments + + + + List of attachments. + + MessagesToolBar diff --git a/src/definitions/definitions.h.in b/src/definitions/definitions.h.in index 9839d42a7..bb2bc3919 100755 --- a/src/definitions/definitions.h.in +++ b/src/definitions/definitions.h.in @@ -82,6 +82,9 @@ #define MIME_TYPE_ITEM_POINTER "rssguard/itempointer" #define DOWNLOADER_ICON_SIZE 48 +#define FEED_REGEX_MATCHER "]+type=\\\"application/(atom|rss)\\+xml\\\"[^>]*>" +#define FEED_HREF_REGEX_MATCHER "href\\=\\\"[^\\\"]+\\\"" + #define PLACEHOLDER_UNREAD_COUNTS "%unread" #define PLACEHOLDER_ALL_COUNTS "%all" diff --git a/src/gui/formfeeddetails.cpp b/src/gui/formfeeddetails.cpp index 86edcd08a..2a1f58758 100755 --- a/src/gui/formfeeddetails.cpp +++ b/src/gui/formfeeddetails.cpp @@ -35,6 +35,8 @@ #include #include #include +#include +#include FormFeedDetails::FormFeedDetails(FeedsModel *model, QWidget *parent) @@ -86,6 +88,10 @@ int FormFeedDetails::exec(FeedsModelFeed *input_feed, FeedsModelRootItem *parent } } } + + if (qApp->clipboard()->mimeData()->hasText()) { + m_ui->m_txtUrl->lineEdit()->setText(qApp->clipboard()->text()); + } } else { // User is editing existing category. diff --git a/src/network-web/discoverfeedsbutton.cpp b/src/network-web/discoverfeedsbutton.cpp new file mode 100644 index 000000000..bd42e70e8 --- /dev/null +++ b/src/network-web/discoverfeedsbutton.cpp @@ -0,0 +1,42 @@ +#include "network-web/discoverfeedsbutton.h" + +#include "miscellaneous/application.h" +#include "miscellaneous/iconfactory.h" + + +DiscoverFeedsButton::DiscoverFeedsButton(QWidget *parent) : QToolButton(parent) { + setEnabled(false); + setIcon(qApp->icons()->fromTheme("folder-feed")); +} + +DiscoverFeedsButton::~DiscoverFeedsButton() { +} + +void DiscoverFeedsButton::clearFeedAddresses() { + setFeedAddresses(QStringList()); +} + +void DiscoverFeedsButton::setFeedAddresses(const QStringList &addresses) { + setEnabled(!addresses.isEmpty()); + setToolTip(addresses.isEmpty() ? + tr("This website does not contain any feeds.") : + tr("Click me to add feeds from this website.\nThis website contains %n feed(s).", 0, addresses.size())); + + if (menu() == NULL) { + setMenu(new QMenu(this)); + + // TODO: pokračovat asi zde, po kliku na menu vyslat signal, ten odchytne webbrowser a provede akce. + } + + menu()->hide(); + + if (!addresses.isEmpty()) { + menu()->clear(); + + foreach (const QString &feed, addresses) { + menu()->addAction(feed); + } + + connect(this, SIGNAL(clicked(bool)), this, SLOT(showMenu())); + } +} diff --git a/src/network-web/discoverfeedsbutton.h b/src/network-web/discoverfeedsbutton.h new file mode 100644 index 000000000..c4d79dffb --- /dev/null +++ b/src/network-web/discoverfeedsbutton.h @@ -0,0 +1,18 @@ +#ifndef DISCOVERFEEDSBUTTON_H +#define DISCOVERFEEDSBUTTON_H + +#include + + +class DiscoverFeedsButton : public QToolButton { + Q_OBJECT + + public: + explicit DiscoverFeedsButton(QWidget *parent = 0); + virtual ~DiscoverFeedsButton(); + + void clearFeedAddresses(); + void setFeedAddresses(const QStringList &addresses); +}; + +#endif // DISCOVERFEEDSBUTTON_H diff --git a/src/network-web/networkfactory.cpp b/src/network-web/networkfactory.cpp index e6d1bfe98..43bed7b90 100755 --- a/src/network-web/networkfactory.cpp +++ b/src/network-web/networkfactory.cpp @@ -32,10 +32,25 @@ NetworkFactory::NetworkFactory() { } -QStringList NetworkFactory::extractFeedLinksFromHtmlPage(const QString &html) { +QStringList NetworkFactory::extractFeedLinksFromHtmlPage(const QUrl &url, const QString &html) { QStringList feeds; + QRegExp rx(FEED_REGEX_MATCHER, Qt::CaseInsensitive); + QRegExp rx_href(FEED_HREF_REGEX_MATCHER, Qt::CaseInsensitive); + for (int pos = 0; (pos = rx.indexIn(html, pos)) != -1; pos += rx.matchedLength()) { + QString link_element = html.mid(pos, rx.matchedLength()); + if (rx_href.indexIn(link_element) != -1) { + QString href_attribute = rx_href.capturedTexts().at(0); + QString feed_link = href_attribute.mid(6, href_attribute.size() - 7); + + if (feed_link.startsWith('/')) { + feed_link = url.toString(QUrl::RemovePath | QUrl::RemoveQuery | QUrl::StripTrailingSlash) + feed_link; + } + + feeds.append(feed_link); + } + } return feeds; } diff --git a/src/network-web/networkfactory.h b/src/network-web/networkfactory.h index 8b0ef8055..6cf8bd1fd 100644 --- a/src/network-web/networkfactory.h +++ b/src/network-web/networkfactory.h @@ -34,7 +34,7 @@ class NetworkFactory { explicit NetworkFactory(); public: - static QStringList extractFeedLinksFromHtmlPage(const QString &html); + static QStringList extractFeedLinksFromHtmlPage(const QUrl &url, const QString &html); // Returns human readable text for given network error. static QString networkErrorText(QNetworkReply::NetworkError error_code); diff --git a/src/network-web/webbrowser.cpp b/src/network-web/webbrowser.cpp index 1f68763f9..0a4d7247e 100755 --- a/src/network-web/webbrowser.cpp +++ b/src/network-web/webbrowser.cpp @@ -114,11 +114,18 @@ void WebBrowser::initializeLayout() { m_actionStop->setText(tr("Stop")); m_actionStop->setToolTip(tr("Stop web page loading.")); + m_btnDiscoverFeeds = new DiscoverFeedsButton(this); + + QWidgetAction *act_discover = new QWidgetAction(this); + + act_discover->setDefaultWidget(m_btnDiscoverFeeds); + // Add needed actions into toolbar. m_toolBar->addAction(m_actionBack); m_toolBar->addAction(m_actionForward); m_toolBar->addAction(m_actionReload); m_toolBar->addAction(m_actionStop); + m_toolBar->addAction(act_discover); m_toolBar->addWidget(m_txtLocation); // Initialize dynamic progress bar which will be displayed @@ -157,15 +164,13 @@ void WebBrowser::onLoadingProgress(int progress) { } void WebBrowser::onLoadingFinished(bool success) { - Q_UNUSED(success) - if (success) { // Let's check if there are any feeds defined on the web and eventually // display "Add feeds" button. - QString loaded_html = m_webView->page()->toHtml(); - QStringList feeds_on_page = NetworkFactory::extractFeedLinksFromHtmlPage(loaded_html); - - // TODO: mame načteno html, nyni z něj funkcí vytáhneme seznam adres kanálů. dodelat tu fci. + m_btnDiscoverFeeds->setFeedAddresses(NetworkFactory::extractFeedLinksFromHtmlPage(m_webView->url(), m_webView->page()->toHtml())); + } + else { + m_btnDiscoverFeeds->clearFeedAddresses(); } m_loadingProgress->hide(); diff --git a/src/network-web/webbrowser.h b/src/network-web/webbrowser.h index b9ab657c9..399496c1c 100755 --- a/src/network-web/webbrowser.h +++ b/src/network-web/webbrowser.h @@ -23,6 +23,7 @@ #include "core/messagesmodel.h" #include "network-web/webview.h" #include "gui/locationlineedit.h" +#include "network-web/discoverfeedsbutton.h" #include #include @@ -151,6 +152,7 @@ class WebBrowser : public TabContent { QHBoxLayout *m_loadingLayout; QProgressBar *m_loadingProgress; QLabel *m_lblProgress; + DiscoverFeedsButton *m_btnDiscoverFeeds; QWidgetAction *m_actionZoom; QAction *m_actionBack;