Translations and Cover page
This commit is contained in:
parent
60fd03a20b
commit
8c6b923f0b
33 changed files with 1328 additions and 931 deletions
459
i18n/kaktus_en.ts
Normal file
459
i18n/kaktus_en.ts
Normal file
|
|
@ -0,0 +1,459 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="en_US">
|
||||
<context>
|
||||
<name>AboutPage</name>
|
||||
<message>
|
||||
<location filename="../qml/AboutPage.qml" line="35"/>
|
||||
<source>About</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/AboutPage.qml" line="56"/>
|
||||
<source>Version: %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/AboutPage.qml" line="64"/>
|
||||
<source>Kaktus is an unofficial Netvibes client for Sailfish OS with offline reading capabilities.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ControlBar</name>
|
||||
<message>
|
||||
<location filename="../qml/ControlBar.qml" line="88"/>
|
||||
<source>Offline mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/ControlBar.qml" line="88"/>
|
||||
<source>Online mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CoverPage</name>
|
||||
<message>
|
||||
<location filename="../qml/CoverPage.qml" line="87"/>
|
||||
<location filename="../qml/CoverPage.qml" line="100"/>
|
||||
<source>Syncing...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/CoverPage.qml" line="114"/>
|
||||
<location filename="../qml/CoverPage.qml" line="120"/>
|
||||
<source>Caching...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DashboardDialog</name>
|
||||
<message>
|
||||
<location filename="../qml/DashboardDialog.qml" line="37"/>
|
||||
<source>Dashboards</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/DashboardDialog.qml" line="38"/>
|
||||
<source>Change</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/DashboardDialog.qml" line="70"/>
|
||||
<source>No dashboards</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/DashboardDialog.qml" line="82"/>
|
||||
<source>Dashboard changed!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DashboardPage</name>
|
||||
<message>
|
||||
<location filename="../qml/DashboardPage.qml" line="33"/>
|
||||
<source>Dashboards</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/DashboardPage.qml" line="64"/>
|
||||
<source>No dashboards</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EntryDelegate</name>
|
||||
<message>
|
||||
<location filename="../qml/EntryDelegate.qml" line="190"/>
|
||||
<source>Unstar</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/EntryDelegate.qml" line="190"/>
|
||||
<source>Star</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/EntryDelegate.qml" line="202"/>
|
||||
<source>Mark as unread</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/EntryDelegate.qml" line="202"/>
|
||||
<source>Mark as read</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EntryPage</name>
|
||||
<message>
|
||||
<location filename="../qml/EntryPage.qml" line="66"/>
|
||||
<source>No entries</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ErrorPage</name>
|
||||
<message>
|
||||
<location filename="../qml/ErrorPage.qml" line="33"/>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/ErrorPage.qml" line="39"/>
|
||||
<source>Sorry, something's gone wrong :-(</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FeedPage</name>
|
||||
<message>
|
||||
<location filename="../qml/FeedPage.qml" line="65"/>
|
||||
<source>all read</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/FeedPage.qml" line="67"/>
|
||||
<source>1 unread</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/FeedPage.qml" line="69"/>
|
||||
<source>%1 unread</source>
|
||||
<comment>less than 5 articles are unread</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/FeedPage.qml" line="70"/>
|
||||
<source>%1 unread</source>
|
||||
<comment>more or equal 5 articles are unread</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/FeedPage.qml" line="85"/>
|
||||
<source>No feeds</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainMenu</name>
|
||||
<message>
|
||||
<location filename="../qml/MainMenu.qml" line="28"/>
|
||||
<source>About</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/MainMenu.qml" line="36"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/MainMenu.qml" line="44"/>
|
||||
<source>Sync</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/MainMenu.qml" line="57"/>
|
||||
<source>Last sync: %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/MainMenu.qml" line="59"/>
|
||||
<source>Not yet synced</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsPage</name>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="31"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="52"/>
|
||||
<source>Not signed in to Netvibes</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="56"/>
|
||||
<source>Signed in to Netvibes as:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="68"/>
|
||||
<source>Sign Out</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="68"/>
|
||||
<source>Sign In</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="108"/>
|
||||
<source>Dashboard in use: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="120"/>
|
||||
<source>Change</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="131"/>
|
||||
<source>Offline mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="132"/>
|
||||
<source>Content of articles will be displayed from local cache, without a network usage.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="154"/>
|
||||
<source>Cache articles</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="155"/>
|
||||
<source>After sync the content for all articles will be downloaded and cached for access in Offline mode.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="168"/>
|
||||
<source>Show Tabs icons</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SignInDialog</name>
|
||||
<message>
|
||||
<location filename="../qml/SignInDialog.qml" line="39"/>
|
||||
<source>Netvibes account</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SignInDialog.qml" line="40"/>
|
||||
<source>Sign In</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SignInDialog.qml" line="48"/>
|
||||
<source>Enter username here!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SignInDialog.qml" line="49"/>
|
||||
<source>Netvibes's username</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SignInDialog.qml" line="66"/>
|
||||
<source>Enter password here!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SignInDialog.qml" line="67"/>
|
||||
<source>Password</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TabPage</name>
|
||||
<message>
|
||||
<location filename="../qml/TabPage.qml" line="35"/>
|
||||
<source>Tabs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/TabPage.qml" line="94"/>
|
||||
<source>No tabs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/TabPage.qml" line="102"/>
|
||||
<source>Try to Sync!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>WebPreviewPage</name>
|
||||
<message>
|
||||
<location filename="../qml/WebPreviewPage.qml" line="74"/>
|
||||
<source>Failed to load page content :-(</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/WebPreviewPage.qml" line="113"/>
|
||||
<source>Launching an external browser...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>main</name>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="33"/>
|
||||
<source>just now</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="36"/>
|
||||
<source>1 second ago</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="45"/>
|
||||
<source>1 minute ago</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="54"/>
|
||||
<source>1 hour ago</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="63"/>
|
||||
<source>yesterday</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="39"/>
|
||||
<source>%1 seconds ago</source>
|
||||
<comment>less than 5 seconds</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="42"/>
|
||||
<source>%1 seconds ago</source>
|
||||
<comment>more or equal 5 seconds</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="48"/>
|
||||
<source>%1 minutes ago</source>
|
||||
<comment>less than 5 minutes</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="51"/>
|
||||
<source>%1 minutes ago</source>
|
||||
<comment>more or equal 5 minutes</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="57"/>
|
||||
<source>%1 hours ago</source>
|
||||
<comment>less than 5 hours</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="60"/>
|
||||
<source>%1 hours ago</source>
|
||||
<comment>more or equal 5 hours</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="66"/>
|
||||
<source>%1 days ago</source>
|
||||
<comment>less than 5 days</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="69"/>
|
||||
<source>%1 days ago</source>
|
||||
<comment>more or equal 5 days</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="72"/>
|
||||
<source>1 week ago</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="75"/>
|
||||
<source>%1 weeks ago</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="103"/>
|
||||
<location filename="../qml/main.qml" line="218"/>
|
||||
<source>An unknown error occurred! :-(</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="135"/>
|
||||
<source>%1 more items left...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="137"/>
|
||||
<source>All done!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="148"/>
|
||||
<source>Caching...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="157"/>
|
||||
<location filename="../qml/main.qml" line="199"/>
|
||||
<source>Network connection is unavailable!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="213"/>
|
||||
<location filename="../qml/main.qml" line="225"/>
|
||||
<source>User & Password do not match!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="231"/>
|
||||
<source>Successfully Signed In!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="238"/>
|
||||
<source>Receiving data... </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="244"/>
|
||||
<source>Initiating...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="249"/>
|
||||
<source>Updating...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="254"/>
|
||||
<source>Sending data to Netvibes...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
BIN
i18n/kaktus_pl.qm
Normal file
BIN
i18n/kaktus_pl.qm
Normal file
Binary file not shown.
459
i18n/kaktus_pl.ts
Normal file
459
i18n/kaktus_pl.ts
Normal file
|
|
@ -0,0 +1,459 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="pl_PL">
|
||||
<context>
|
||||
<name>AboutPage</name>
|
||||
<message>
|
||||
<location filename="../qml/AboutPage.qml" line="35"/>
|
||||
<source>About</source>
|
||||
<translation>O Programie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/AboutPage.qml" line="56"/>
|
||||
<source>Version: %1</source>
|
||||
<translation>Wersja: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/AboutPage.qml" line="64"/>
|
||||
<source>Kaktus is an unofficial Netvibes client for Sailfish OS with offline reading capabilities.</source>
|
||||
<translation>Nieoficjalny czytnik dla serwisu netvibes.com z możliwością pracy w trybie offline, przeznaczony dla Sailfish OS. </translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ControlBar</name>
|
||||
<message>
|
||||
<location filename="../qml/ControlBar.qml" line="88"/>
|
||||
<source>Offline mode</source>
|
||||
<translation>Tryb Offline</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/ControlBar.qml" line="88"/>
|
||||
<source>Online mode</source>
|
||||
<translation>Tryb Online</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CoverPage</name>
|
||||
<message>
|
||||
<location filename="../qml/CoverPage.qml" line="87"/>
|
||||
<location filename="../qml/CoverPage.qml" line="100"/>
|
||||
<source>Syncing...</source>
|
||||
<translation>Aktualizowanie...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/CoverPage.qml" line="114"/>
|
||||
<location filename="../qml/CoverPage.qml" line="120"/>
|
||||
<source>Caching...</source>
|
||||
<translation>Pobieranie...</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DashboardDialog</name>
|
||||
<message>
|
||||
<location filename="../qml/DashboardDialog.qml" line="37"/>
|
||||
<source>Dashboards</source>
|
||||
<translation>Tablice</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/DashboardDialog.qml" line="38"/>
|
||||
<source>Change</source>
|
||||
<translation>Zmień</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/DashboardDialog.qml" line="70"/>
|
||||
<source>No dashboards</source>
|
||||
<translation>Brak tablic</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/DashboardDialog.qml" line="82"/>
|
||||
<source>Dashboard changed!</source>
|
||||
<translation>Zmieniono aktualną tablicę!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DashboardPage</name>
|
||||
<message>
|
||||
<location filename="../qml/DashboardPage.qml" line="33"/>
|
||||
<source>Dashboards</source>
|
||||
<translation>Tablice</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/DashboardPage.qml" line="64"/>
|
||||
<source>No dashboards</source>
|
||||
<translation>Brak tablic</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EntryDelegate</name>
|
||||
<message>
|
||||
<location filename="../qml/EntryDelegate.qml" line="190"/>
|
||||
<source>Unstar</source>
|
||||
<translation>Wyczyść gwiazdkę</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/EntryDelegate.qml" line="190"/>
|
||||
<source>Star</source>
|
||||
<translation>Zaznacz gwiazdką</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/EntryDelegate.qml" line="202"/>
|
||||
<source>Mark as unread</source>
|
||||
<translation>Zaznacz jako nieprzeczytane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/EntryDelegate.qml" line="202"/>
|
||||
<source>Mark as read</source>
|
||||
<translation>Zaznacz jako przeczytane</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EntryPage</name>
|
||||
<message>
|
||||
<location filename="../qml/EntryPage.qml" line="66"/>
|
||||
<source>No entries</source>
|
||||
<translation>Brak artykułów</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ErrorPage</name>
|
||||
<message>
|
||||
<location filename="../qml/ErrorPage.qml" line="33"/>
|
||||
<source>Error</source>
|
||||
<translation>Błąd</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/ErrorPage.qml" line="39"/>
|
||||
<source>Sorry, something's gone wrong :-(</source>
|
||||
<translation>Przepraszamy, coś poszło nie tak :-(</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FeedPage</name>
|
||||
<message>
|
||||
<location filename="../qml/FeedPage.qml" line="65"/>
|
||||
<source>all read</source>
|
||||
<translation>wszytkie przeczytane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/FeedPage.qml" line="67"/>
|
||||
<source>1 unread</source>
|
||||
<translation>1 nieprzeczytany</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/FeedPage.qml" line="69"/>
|
||||
<source>%1 unread</source>
|
||||
<comment>less than 5 articles are unread</comment>
|
||||
<translation>%1 nieprzeczytane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/FeedPage.qml" line="70"/>
|
||||
<source>%1 unread</source>
|
||||
<comment>more or equal 5 articles are unread</comment>
|
||||
<translation>%1 nieprzeczytane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/FeedPage.qml" line="85"/>
|
||||
<source>No feeds</source>
|
||||
<translation>Brak kanałów</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainMenu</name>
|
||||
<message>
|
||||
<location filename="../qml/MainMenu.qml" line="28"/>
|
||||
<source>About</source>
|
||||
<translation>O Programie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/MainMenu.qml" line="36"/>
|
||||
<source>Settings</source>
|
||||
<translation>Ustawienia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/MainMenu.qml" line="44"/>
|
||||
<source>Sync</source>
|
||||
<translation>Aktualizuj</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/MainMenu.qml" line="57"/>
|
||||
<source>Last sync: %1</source>
|
||||
<translation>Ostatnia aktualizacja: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/MainMenu.qml" line="59"/>
|
||||
<source>Not yet synced</source>
|
||||
<translation>Jeszcze nie aktualizowano</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsPage</name>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="31"/>
|
||||
<source>Settings</source>
|
||||
<translation>Ustawienia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="52"/>
|
||||
<source>Not signed in to Netvibes</source>
|
||||
<translation>Niezalogowany do Netvibes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="56"/>
|
||||
<source>Signed in to Netvibes as:</source>
|
||||
<translation>Zalogowany do Netvibes jako:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="68"/>
|
||||
<source>Sign Out</source>
|
||||
<translation>Wyloguj</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="68"/>
|
||||
<source>Sign In</source>
|
||||
<translation>Zaloguj</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="108"/>
|
||||
<source>Dashboard in use: </source>
|
||||
<translation>Ustawiona Tablica:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="120"/>
|
||||
<source>Change</source>
|
||||
<translation>Zmień</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="131"/>
|
||||
<source>Offline mode</source>
|
||||
<translation>Tryb Offline</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="132"/>
|
||||
<source>Content of articles will be displayed from local cache, without a network usage.</source>
|
||||
<translation>Treść aktykułów będzie pobierana z lokalnej kopi, czyli bez użycia połączenia internetowego.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="154"/>
|
||||
<source>Cache articles</source>
|
||||
<translation>Twórz lokalną kopię</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="155"/>
|
||||
<source>After sync the content for all articles will be downloaded and cached for access in Offline mode.</source>
|
||||
<translation>Każdorazowo po aktualizacji, treść wszystkich artykułów będzie pobierana do lokalnej kopi tak aby była dostępna w trybie Offline.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SettingsPage.qml" line="168"/>
|
||||
<source>Show Tabs icons</source>
|
||||
<translation>Pokaż ikony w zakładkach</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SignInDialog</name>
|
||||
<message>
|
||||
<location filename="../qml/SignInDialog.qml" line="39"/>
|
||||
<source>Netvibes account</source>
|
||||
<translation>Konto Netvibes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SignInDialog.qml" line="40"/>
|
||||
<source>Sign In</source>
|
||||
<translation>Zaloguj</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SignInDialog.qml" line="48"/>
|
||||
<source>Enter username here!</source>
|
||||
<translation>Wprowadź nazwę użytkownika!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SignInDialog.qml" line="49"/>
|
||||
<source>Netvibes's username</source>
|
||||
<translation>Nazwa użytkownika Netvibes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SignInDialog.qml" line="66"/>
|
||||
<source>Enter password here!</source>
|
||||
<translation>Wprowadź hasło!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/SignInDialog.qml" line="67"/>
|
||||
<source>Password</source>
|
||||
<translation>Hasło</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TabPage</name>
|
||||
<message>
|
||||
<location filename="../qml/TabPage.qml" line="35"/>
|
||||
<source>Tabs</source>
|
||||
<translation>Zakładki</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/TabPage.qml" line="94"/>
|
||||
<source>No tabs</source>
|
||||
<translation>Brak zakładek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/TabPage.qml" line="102"/>
|
||||
<source>Try to Sync!</source>
|
||||
<translation>Spróbuj wykonać aktualizacje kanałów!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>WebPreviewPage</name>
|
||||
<message>
|
||||
<location filename="../qml/WebPreviewPage.qml" line="74"/>
|
||||
<source>Failed to load page content :-(</source>
|
||||
<translation>Nie udało się pobrać treści :-(</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/WebPreviewPage.qml" line="113"/>
|
||||
<source>Launching an external browser...</source>
|
||||
<translation>Uruchamianie zewnętrznej przeglądarki...</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>main</name>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="33"/>
|
||||
<source>just now</source>
|
||||
<translation>przed chwilą</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="36"/>
|
||||
<source>1 second ago</source>
|
||||
<translation>sekundę temu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="45"/>
|
||||
<source>1 minute ago</source>
|
||||
<translation>minutę temu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="54"/>
|
||||
<source>1 hour ago</source>
|
||||
<translation>godzinę temu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="63"/>
|
||||
<source>yesterday</source>
|
||||
<translation>wczoraj</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="39"/>
|
||||
<source>%1 seconds ago</source>
|
||||
<comment>less than 5 seconds</comment>
|
||||
<translation>%1 sekundy temu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="42"/>
|
||||
<source>%1 seconds ago</source>
|
||||
<comment>more or equal 5 seconds</comment>
|
||||
<translation>%1 sekund temu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="48"/>
|
||||
<source>%1 minutes ago</source>
|
||||
<comment>less than 5 minutes</comment>
|
||||
<translation>%1 minuty temu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="51"/>
|
||||
<source>%1 minutes ago</source>
|
||||
<comment>more or equal 5 minutes</comment>
|
||||
<translation>%1 minut temu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="57"/>
|
||||
<source>%1 hours ago</source>
|
||||
<comment>less than 5 hours</comment>
|
||||
<translation>%1 godziny temu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="60"/>
|
||||
<source>%1 hours ago</source>
|
||||
<comment>more or equal 5 hours</comment>
|
||||
<translation>%1 godzin temu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="66"/>
|
||||
<source>%1 days ago</source>
|
||||
<comment>less than 5 days</comment>
|
||||
<translation>%1 dni temu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="69"/>
|
||||
<source>%1 days ago</source>
|
||||
<comment>more or equal 5 days</comment>
|
||||
<translation>%1 dni temu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="72"/>
|
||||
<source>1 week ago</source>
|
||||
<translation>tydzień temu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="75"/>
|
||||
<source>%1 weeks ago</source>
|
||||
<translation>%1 tygodnie temu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="103"/>
|
||||
<location filename="../qml/main.qml" line="218"/>
|
||||
<source>An unknown error occurred! :-(</source>
|
||||
<translation>Wystąpił nieznany błąd! :-(</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="135"/>
|
||||
<source>%1 more items left...</source>
|
||||
<translation>Pozostało po pobrania: %1... </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="137"/>
|
||||
<source>All done!</source>
|
||||
<translation>Gotowe!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="148"/>
|
||||
<source>Caching...</source>
|
||||
<translation>Pobieranie do lokalnej kopii...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="157"/>
|
||||
<location filename="../qml/main.qml" line="199"/>
|
||||
<source>Network connection is unavailable!</source>
|
||||
<translation>Brak połączenia sieciowego!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="213"/>
|
||||
<location filename="../qml/main.qml" line="225"/>
|
||||
<source>User & Password do not match!</source>
|
||||
<translation>Nazwa użytkownika nie pasuje do hasła!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="231"/>
|
||||
<source>Successfully Signed In!</source>
|
||||
<translation>Zalogowano!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="238"/>
|
||||
<source>Receiving data... </source>
|
||||
<translation>Pobieranie danych...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="244"/>
|
||||
<source>Initiating...</source>
|
||||
<translation>Pierwsza aktualizacja...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="249"/>
|
||||
<source>Updating...</source>
|
||||
<translation>Aktualizacja...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/main.qml" line="254"/>
|
||||
<source>Sending data to Netvibes...</source>
|
||||
<translation>Wysyałanie danych do Netvibes...</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
2
i18n_paths.lst
Normal file
2
i18n_paths.lst
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
qml
|
||||
src
|
||||
2
i18n_ts.lst
Normal file
2
i18n_ts.lst
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
i18n/kaktus_en.ts
|
||||
i18n/kaktus_pl.ts
|
||||
2
lupdate.sh
Executable file
2
lupdate.sh
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
lupdate @i18n_paths.lst -ts @i18n_ts.lst
|
||||
|
|
@ -53,7 +53,7 @@ Page {
|
|||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.highlightColor
|
||||
wrapMode: Text.WordWrap
|
||||
text: qsTr("Version") + ": " + VERSION;
|
||||
text: qsTr("Version: %1").arg(VERSION);
|
||||
}
|
||||
|
||||
Label {
|
||||
|
|
@ -61,7 +61,7 @@ Page {
|
|||
horizontalAlignment: Text.AlignHCenter
|
||||
anchors.left: parent.left; anchors.right: parent.right
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
text: qsTr("Kaktus is an unofficial Netvibes client for Sailfish OS.");
|
||||
text: qsTr("Kaktus is an unofficial Netvibes client for Sailfish OS with offline reading capabilities.");
|
||||
}
|
||||
|
||||
Label {
|
||||
|
|
@ -80,30 +80,8 @@ Page {
|
|||
anchors.left: parent.left; anchors.right: parent.right
|
||||
font.pixelSize: Theme.fontSizeExtraSmall
|
||||
textFormat: Text.RichText
|
||||
text: qsTr("Copyright © 2014 Michał Kościesza");
|
||||
text: "Copyright © 2014 Michał Kościesza"
|
||||
}
|
||||
|
||||
/*Label {
|
||||
wrapMode: Text.WordWrap
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
anchors.left: parent.left; anchors.right: parent.right
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
text: qsTr("It is free software. You can redistribute it and/or modify"
|
||||
+" it under the terms of the GNU General Public License as published by"
|
||||
+" the Free Software Foundation, either version 3 of the License, or"
|
||||
+" (at your option) any later version.");
|
||||
}
|
||||
|
||||
Label {
|
||||
wrapMode: Text.WordWrap
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
anchors.left: parent.left; anchors.right: parent.right
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
text: qsTr("nReader is distributed in the hope that it will be useful,"
|
||||
+" but WITHOUT ANY WARRANTY; without even the implied warranty of"
|
||||
+" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"
|
||||
+" GNU General Public License for more details.");
|
||||
}*/
|
||||
}
|
||||
|
||||
VerticalScrollDecorator {}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ Rectangle {
|
|||
|
||||
signal closeClicked
|
||||
|
||||
height: visible ? Theme.itemSizeMedium * 0.8 : 0
|
||||
height: visible ? Theme.itemSizeMedium * 1 : 0
|
||||
width: parent.width
|
||||
|
||||
anchors.bottom: parent.bottom
|
||||
|
|
|
|||
|
|
@ -1,107 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2014 Michal Kosciesza <michal@mkiol.net>
|
||||
|
||||
This file is part of Kaktus.
|
||||
|
||||
Kaktus is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Kaktus is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Kaktus. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property string text
|
||||
property bool cancelable: false
|
||||
property bool open: false
|
||||
property real progress: 0.0
|
||||
|
||||
signal closeClicked
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
/*gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: "transparent" }
|
||||
GradientStop { position: 0.95; color: Theme.highlightBackgroundColor}
|
||||
}*/
|
||||
|
||||
color: Theme.rgba(Theme.backgroundColor, 1.0)
|
||||
enabled: opacity > 0.0
|
||||
|
||||
opacity: root.open ? 1.0 : 0.0
|
||||
visible: opacity > 0.0
|
||||
Behavior on opacity { FadeAnimation {duration: 300} }
|
||||
|
||||
function show(text, cancelable) {
|
||||
root.text = text;
|
||||
root.cancelable = cancelable;
|
||||
root.open = true;
|
||||
}
|
||||
|
||||
function hide() {
|
||||
root.open = false;
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
id: busy
|
||||
anchors.centerIn: parent
|
||||
running: open
|
||||
size: BusyIndicatorSize.Large
|
||||
}
|
||||
|
||||
onVisibleChanged: {
|
||||
if (!visible) {
|
||||
progress = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
height: Theme.itemSizeMedium * 1
|
||||
width: parent.width
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
|
||||
Label {
|
||||
id: titleBar
|
||||
|
||||
height: parent.height
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left; anchors.right: closeButton.right
|
||||
anchors.leftMargin: Theme.paddingMedium
|
||||
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: Theme.fontFamily
|
||||
text: root.text
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: Theme.primaryColor
|
||||
}
|
||||
|
||||
IconButton {
|
||||
id: closeButton
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Theme.paddingMedium
|
||||
|
||||
icon.source: "image://theme/icon-m-close"
|
||||
onClicked: root.closeClicked()
|
||||
visible: root.cancelable
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -22,35 +22,20 @@ import Sailfish.Silica 1.0
|
|||
|
||||
|
||||
|
||||
Column {
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property bool canBack: false
|
||||
property bool canOffline: true
|
||||
|
||||
property bool canStar: false
|
||||
property bool canSync: false
|
||||
property bool canOpenBrowser: false
|
||||
|
||||
property bool stared: false
|
||||
property bool open: false
|
||||
property int showTime: 6000
|
||||
|
||||
property bool open: true
|
||||
property int showTime: 8000
|
||||
property real barShowMoveWidth: 20
|
||||
property Flickable flick: null
|
||||
|
||||
signal backClicked()
|
||||
signal starClicked()
|
||||
signal browserClicked()
|
||||
signal syncClicked()
|
||||
|
||||
width: parent.width
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
height: Theme.itemSizeMedium * 1
|
||||
|
||||
opacity: root.open ? 1.0 : 0.0
|
||||
//enabled: opacity > 0.0
|
||||
//visible: opacity > 0.0
|
||||
Behavior on opacity { FadeAnimation {duration: 300} }
|
||||
|
||||
function show() {
|
||||
|
|
@ -67,109 +52,81 @@ Column {
|
|||
}
|
||||
|
||||
Rectangle {
|
||||
color: Theme.highlightBackgroundColor
|
||||
height: Theme.itemSizeMedium * 0.8
|
||||
width: parent.width
|
||||
id: background
|
||||
color: Theme.rgba(Theme.backgroundColor, 0.7)
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
OpacityRampEffect {
|
||||
id: effect
|
||||
slope: 2
|
||||
offset: 0.5
|
||||
direction: OpacityRamp.RightToLeft
|
||||
sourceItem: background
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
enabled: root.opacity > 0.0
|
||||
anchors.fill: parent
|
||||
onClicked: root.hide()
|
||||
}
|
||||
//color: Theme.rgba(Theme.highlightBackgroundColor, 0.3)
|
||||
//color: Theme.rgba(Theme.backgroundColor, 0.7)
|
||||
//height: Theme.itemSizeMedium * 1
|
||||
//width: parent.width
|
||||
//anchors.fill: parent
|
||||
|
||||
IconButton {
|
||||
id: back
|
||||
visible: root.canBack
|
||||
anchors.left: parent.left; anchors.leftMargin: Theme.paddingMedium
|
||||
MouseArea {
|
||||
enabled: root.opacity > 0.0
|
||||
anchors.fill: parent
|
||||
onClicked: root.hide()
|
||||
}
|
||||
|
||||
Row {
|
||||
id: row
|
||||
anchors.right: parent.right; anchors.rightMargin: Theme.paddingMedium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Label {
|
||||
id: label
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
icon.source: "image://theme/icon-m-back?"+Theme.highlightDimmerColor
|
||||
onClicked: root.backClicked()
|
||||
}
|
||||
text: offLineMode ? qsTr("Offline mode") : qsTr("Online mode")
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: Theme.fontFamily
|
||||
color: Theme.highlightColor
|
||||
opacity: 0.0
|
||||
visible: opacity > 0.0
|
||||
Behavior on opacity { FadeAnimation {duration: 200} }
|
||||
|
||||
IconButton {
|
||||
visible: root.canSync
|
||||
anchors.left: parent.left; anchors.leftMargin: Theme.paddingMedium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
icon.source: "image://theme/icon-m-sync?"+Theme.highlightDimmerColor
|
||||
onClicked: root.syncClicked()
|
||||
}
|
||||
|
||||
Row {
|
||||
id: toolbarRow
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
spacing: (parent.width - (back.width * 4)) / 3;
|
||||
|
||||
/*spacing: {
|
||||
var i = 0;
|
||||
if (canStar)
|
||||
++i;
|
||||
if (canOpenBrowser)
|
||||
++i;
|
||||
if (canSync)
|
||||
++i;
|
||||
console.log((parent.width - (back.width * 2+i)) / 1+i);
|
||||
return (parent.width - (back.width * 2+i)) / 1+i;
|
||||
}*/
|
||||
|
||||
IconButton {
|
||||
visible: root.canStar
|
||||
icon.source: root.stared ? "image://theme/icon-m-favorite-selected?"+Theme.highlightDimmerColor : "image://theme/icon-m-favorite?"+Theme.highlightDimmerColor
|
||||
onClicked: root.starClicked()
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: offLineMode = !offLineMode
|
||||
}
|
||||
|
||||
IconButton {
|
||||
width: back.width; height: back.height
|
||||
visible: root.canOpenBrowser
|
||||
icon.source: "image://theme/icon-m-region?"+Theme.highlightDimmerColor
|
||||
onClicked: root.browserClicked()
|
||||
function show() {
|
||||
label.opacity = 1.0;
|
||||
ltimer.restart();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*IconButton {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: root.canStar
|
||||
icon.source: root.stared ? "image://theme/icon-m-favorite-selected?"+Theme.highlightDimmerColor : "image://theme/icon-m-favorite?"+Theme.highlightDimmerColor
|
||||
onClicked: root.starClicked()
|
||||
}*/
|
||||
|
||||
Row {
|
||||
visible: root.canOffline
|
||||
anchors.right: parent.right; anchors.rightMargin: Theme.paddingMedium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Label {
|
||||
visible: !root.canOpenBrowser
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: offLineMode ? "Offline mode" : "Online mode"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: Theme.fontFamily
|
||||
color: Theme.highlightDimmerColor
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: offLineMode = !offLineMode
|
||||
Timer {
|
||||
id: ltimer
|
||||
interval: 3000
|
||||
onTriggered: {
|
||||
label.opacity = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IconButton {
|
||||
id: offline
|
||||
//visible: root.canOffline
|
||||
//anchors.right: parent.right; anchors.rightMargin: Theme.paddingMedium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
icon.source: offLineMode ? "image://theme/icon-m-wlan-no-signal?"+Theme.highlightDimmerColor : "image://theme/icon-m-wlan-4?"+Theme.highlightDimmerColor
|
||||
onClicked: offLineMode = !offLineMode;
|
||||
IconButton {
|
||||
id: offline
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
icon.source: offLineMode ? "image://theme/icon-m-wlan-no-signal?"+Theme.highlightColor : "image://theme/icon-m-wlan-4?"+Theme.highlightColor
|
||||
onClicked: {
|
||||
offLineMode = !offLineMode;
|
||||
label.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
enabled: root.opacity == 0.0
|
||||
anchors.fill: parent
|
||||
onClicked: root.show();
|
||||
}
|
||||
MouseArea {
|
||||
enabled: root.opacity == 0.0
|
||||
anchors.fill: parent
|
||||
onClicked: root.show();
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
|
|
|||
|
|
@ -27,11 +27,8 @@ Column {
|
|||
|
||||
property bool canBack: false
|
||||
property bool canOffline: true
|
||||
|
||||
property bool canStar: false
|
||||
property bool canSync: false
|
||||
property bool canOpenBrowser: false
|
||||
|
||||
property bool stared: false
|
||||
property bool open: false
|
||||
property int showTime: 6000
|
||||
|
|
@ -42,7 +39,6 @@ Column {
|
|||
signal backClicked()
|
||||
signal starClicked()
|
||||
signal browserClicked()
|
||||
signal syncClicked()
|
||||
|
||||
width: parent.width
|
||||
anchors.bottom: parent.bottom
|
||||
|
|
@ -65,8 +61,8 @@ Column {
|
|||
}
|
||||
|
||||
Rectangle {
|
||||
color: Theme.rgba(Theme.highlightBackgroundColor, 0.1)
|
||||
height: Theme.itemSizeMedium * 0.8
|
||||
color: Theme.highlightBackgroundColor
|
||||
height: Theme.itemSizeMedium * 1
|
||||
width: parent.width
|
||||
|
||||
|
||||
|
|
@ -81,18 +77,10 @@ Column {
|
|||
visible: root.canBack
|
||||
anchors.left: parent.left; anchors.leftMargin: Theme.paddingMedium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
icon.source: "image://theme/icon-m-back"
|
||||
icon.source: "image://theme/icon-m-back?"+Theme.highlightDimmerColor
|
||||
onClicked: root.backClicked()
|
||||
}
|
||||
|
||||
IconButton {
|
||||
visible: root.canSync
|
||||
anchors.left: parent.left; anchors.leftMargin: Theme.paddingMedium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
icon.source: "image://theme/icon-m-sync"
|
||||
onClicked: root.syncClicked()
|
||||
}
|
||||
|
||||
Row {
|
||||
id: toolbarRow
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
@ -100,67 +88,28 @@ Column {
|
|||
|
||||
spacing: (parent.width - (back.width * 4)) / 3;
|
||||
|
||||
/*spacing: {
|
||||
var i = 0;
|
||||
if (canStar)
|
||||
++i;
|
||||
if (canOpenBrowser)
|
||||
++i;
|
||||
if (canSync)
|
||||
++i;
|
||||
console.log((parent.width - (back.width * 2+i)) / 1+i);
|
||||
return (parent.width - (back.width * 2+i)) / 1+i;
|
||||
}*/
|
||||
|
||||
IconButton {
|
||||
visible: root.canStar
|
||||
icon.source: root.stared ? "image://theme/icon-m-favorite-selected": "image://theme/icon-m-favorite"
|
||||
icon.source: root.stared ? "image://theme/icon-m-favorite-selected?"+Theme.highlightDimmerColor : "image://theme/icon-m-favorite?"+Theme.highlightDimmerColor
|
||||
onClicked: root.starClicked()
|
||||
}
|
||||
|
||||
IconButton {
|
||||
width: back.width; height: back.height
|
||||
visible: root.canOpenBrowser
|
||||
icon.source: "image://theme/icon-m-region?"
|
||||
icon.source: "image://theme/icon-m-region?"+Theme.highlightDimmerColor
|
||||
onClicked: root.browserClicked()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*IconButton {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: root.canStar
|
||||
icon.source: root.stared ? "image://theme/icon-m-favorite-selected?"+Theme.highlightDimmerColor : "image://theme/icon-m-favorite?"+Theme.highlightDimmerColor
|
||||
onClicked: root.starClicked()
|
||||
}*/
|
||||
|
||||
Row {
|
||||
IconButton {
|
||||
id: offline
|
||||
visible: root.canOffline
|
||||
anchors.right: parent.right; anchors.rightMargin: Theme.paddingMedium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Label {
|
||||
visible: !root.canOpenBrowser
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: offLineMode ? "Offline mode" : "Online mode"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: Theme.fontFamily
|
||||
color: Theme.highlightColor
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: offLineMode = !offLineMode
|
||||
}
|
||||
}
|
||||
|
||||
IconButton {
|
||||
id: offline
|
||||
//visible: root.canOffline
|
||||
//anchors.right: parent.right; anchors.rightMargin: Theme.paddingMedium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
icon.source: offLineMode ? "image://theme/icon-m-wlan-no-signal?"+Theme.highlightColor : "image://theme/icon-m-wlan-4?"+Theme.highlightColor
|
||||
onClicked: offLineMode = !offLineMode;
|
||||
}
|
||||
icon.source: offLineMode ? "image://theme/icon-m-wlan-no-signal?"+Theme.highlightDimmerColor : "image://theme/icon-m-wlan-4?"+Theme.highlightDimmerColor
|
||||
onClicked: offLineMode = !offLineMode;
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
@ -1,52 +1,125 @@
|
|||
/*
|
||||
Copyright (C) 2013 Jolla Ltd.
|
||||
Contact: Thomas Perl <thomas.perl@jollamobile.com>
|
||||
All rights reserved.
|
||||
Copyright (C) 2014 Michal Kosciesza <michal@mkiol.net>
|
||||
|
||||
You may use this file under the terms of BSD license as follows:
|
||||
This file is part of Kaktus.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the Jolla Ltd nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
Kaktus is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
Kaktus is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Kaktus. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
|
||||
|
||||
CoverBackground {
|
||||
Label {
|
||||
id: label
|
||||
id: root
|
||||
|
||||
property bool busy: false
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
text: "My Cover"
|
||||
source: "icon.png"
|
||||
visible: !root.busy
|
||||
}
|
||||
|
||||
Column {
|
||||
visible: root.busy
|
||||
anchors.left: parent.left; anchors.right: parent.right
|
||||
anchors.margins: Theme.paddingSmall
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Theme.paddingMedium
|
||||
|
||||
Label {
|
||||
id: label
|
||||
anchors.left: parent.left; anchors.right: parent.right
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
font.family: Theme.fontFamilyHeading
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
/*BusyIndicator {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
size: BusyIndicatorSize.Medium
|
||||
running: root.busy
|
||||
}*/
|
||||
|
||||
Label {
|
||||
id: progressLabel
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
font.family: Theme.fontFamilyHeading
|
||||
}
|
||||
}
|
||||
|
||||
CoverActionList {
|
||||
id: coverAction
|
||||
|
||||
CoverAction {
|
||||
iconSource: "image://theme/icon-cover-next"
|
||||
id: action
|
||||
iconSource: root.busy ? "image://theme/icon-cover-cancel" : "image://theme/icon-cover-sync"
|
||||
onTriggered: {
|
||||
if (root.busy) {
|
||||
dm.cancel();
|
||||
fetcher.cancel();
|
||||
} else {
|
||||
dm.cancel();
|
||||
fetcher.cancel();
|
||||
fetcher.update();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CoverAction {
|
||||
iconSource: "image://theme/icon-cover-pause"
|
||||
Connections {
|
||||
target: fetcher
|
||||
onBusy: {
|
||||
label.text = qsTr("Syncing...");
|
||||
progressLabel.text = "0%";
|
||||
root.busy = true
|
||||
}
|
||||
onError: {
|
||||
root.busy = false;
|
||||
//label.text = qsTr("Error!");
|
||||
}
|
||||
onReady: {
|
||||
if (!dm.isBusy())
|
||||
root.busy = false;
|
||||
}
|
||||
onProgress: {
|
||||
label.text = qsTr("Syncing...");
|
||||
progressLabel.text = Math.floor((current/total)*100)+"%";
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: dm
|
||||
onCanceled: {
|
||||
if (!fetcher.isBusy())
|
||||
root.busy = false;
|
||||
}
|
||||
onBusy: root.busy = true
|
||||
onReady: {
|
||||
if (!fetcher.isBusy()) {
|
||||
label.text = qsTr("Caching...");
|
||||
root.busy = false;
|
||||
}
|
||||
}
|
||||
onProgress: {
|
||||
if (!fetcher.isBusy()) {
|
||||
label.text = qsTr("Caching...");
|
||||
progressLabel.text = remaining;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ Page {
|
|||
model: dashboardModel
|
||||
|
||||
header: PageHeader {
|
||||
title: "Dashboards"
|
||||
title: qsTr("Dashboards")
|
||||
}
|
||||
|
||||
delegate: ListItem {
|
||||
|
|
@ -70,13 +70,7 @@ Page {
|
|||
|
||||
}
|
||||
|
||||
ControlBarDark {
|
||||
/*ControlBar {
|
||||
id: controlbar
|
||||
canSync: false
|
||||
canOffline: true
|
||||
|
||||
onSyncClicked: {
|
||||
fetcher.update();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2014 Michal Kosciesza <michal@mkiol.net>
|
||||
|
||||
This file is part of Kaktus.
|
||||
|
||||
Kaktus is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Kaktus is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Kaktus. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
|
||||
Dialog {
|
||||
id: root
|
||||
|
||||
Column {
|
||||
anchors {
|
||||
left: parent.left; leftMargin: Theme.paddingMedium
|
||||
right: parent.right; rightMargin: Theme.paddingMedium
|
||||
}
|
||||
spacing: Theme.paddingSmall
|
||||
|
||||
DialogHeader {
|
||||
title: qsTr("Offline caching")
|
||||
acceptText : qsTr("Start")
|
||||
}
|
||||
|
||||
Label {
|
||||
anchors {
|
||||
left: parent.left; leftMargin: Theme.paddingMedium
|
||||
right: parent.right; rightMargin: Theme.paddingMedium
|
||||
}
|
||||
wrapMode: Text.WordWrap
|
||||
text: "There are "+dm.itemsToDownloadCount()+" articles to download.\nDo you want to start?"
|
||||
}
|
||||
}
|
||||
|
||||
onAccepted: {
|
||||
if (!dm.isBusy())
|
||||
dm.startFeedDownload();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
import QtQuick 2.0
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
import "scripts.js" as Scripts
|
||||
|
||||
|
||||
ListItem {
|
||||
id: root
|
||||
|
|
@ -177,8 +177,8 @@ ListItem {
|
|||
color: Theme.secondaryColor
|
||||
truncationMode: TruncationMode.Fade
|
||||
text: root.author!=""
|
||||
? Scripts.getHumanFriendlyTimeString(date)+" | "+root.author
|
||||
: Scripts.getHumanFriendlyTimeString(date)
|
||||
? app.getHumanFriendlyTimeString(date)+" | "+root.author
|
||||
: app.getHumanFriendlyTimeString(date)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -187,7 +187,7 @@ ListItem {
|
|||
id: contextMenu
|
||||
ContextMenu {
|
||||
MenuItem {
|
||||
text: readlater ? "Unstar" : "Star"
|
||||
text: readlater ? qsTr("Unstar") : qsTr("Star")
|
||||
onClicked: {
|
||||
if (readlater) {
|
||||
readlater=0;
|
||||
|
|
@ -199,7 +199,7 @@ ListItem {
|
|||
}
|
||||
}
|
||||
MenuItem {
|
||||
text: read ? "Mark as unread" : "Mark as read"
|
||||
text: read ? qsTr("Mark as unread") : qsTr("Mark as read")
|
||||
onClicked: {
|
||||
if (read) {
|
||||
read=0;
|
||||
|
|
|
|||
|
|
@ -72,13 +72,7 @@ Page {
|
|||
|
||||
}
|
||||
|
||||
ControlBarDark {
|
||||
/*ControlBar {
|
||||
id: controlbar
|
||||
canSync: false
|
||||
canOffline: true
|
||||
|
||||
onSyncClicked: {
|
||||
fetcher.update();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,8 +60,15 @@ Page {
|
|||
anchors.leftMargin: Theme.paddingLarge; anchors.rightMargin: Theme.paddingLarge
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.secondaryColor
|
||||
//text: unread + " unread" + " | " + readlater + " stared"
|
||||
text: unread + " unread"
|
||||
text: {
|
||||
if (unread==0)
|
||||
return qsTr("all read");
|
||||
if (unread==1)
|
||||
return qsTr("1 unread");
|
||||
if (unread<5)
|
||||
return qsTr("%1 unread","less than 5 articles are unread").arg(unread);
|
||||
return qsTr("%1 unread","more or equal 5 articles are unread").arg(unread);
|
||||
}
|
||||
visible: unread!=0
|
||||
}
|
||||
}
|
||||
|
|
@ -84,14 +91,8 @@ Page {
|
|||
|
||||
}
|
||||
|
||||
ControlBarDark {
|
||||
/*ControlBar {
|
||||
id: controlbar
|
||||
canSync: false
|
||||
canOffline: true
|
||||
|
||||
onSyncClicked: {
|
||||
fetcher.update();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,68 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2014 Michal Kosciesza <michal@mkiol.net>
|
||||
|
||||
This file is part of Kaktus.
|
||||
|
||||
Kaktus is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Kaktus is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Kaktus. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
|
||||
|
||||
SilicaListView {
|
||||
property real barShowMoveWidth: 30
|
||||
|
||||
signal barShowRequest();
|
||||
signal barHideRequest();
|
||||
|
||||
QtObject {
|
||||
id: m
|
||||
property real initialContentY
|
||||
}
|
||||
|
||||
onMovementStarted: {
|
||||
m.initialContentY=contentY;
|
||||
//barHideRequest();
|
||||
}
|
||||
|
||||
onContentYChanged: {
|
||||
if (moving) {
|
||||
//console.log("contentY:"+contentY);
|
||||
var delta = contentY-m.initialContentY
|
||||
//console.log("delta:"+delta);
|
||||
if (delta<-barShowMoveWidth)
|
||||
barShowRequest();
|
||||
if (delta>barShowMoveWidth)
|
||||
barHideRequest();
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: pageStack
|
||||
onDepthChanged: barHideRequest()
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: fetcher
|
||||
onBusy: barHideRequest()
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: dm
|
||||
onBusy: barHideRequest()
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -20,7 +20,6 @@
|
|||
import QtQuick 2.0
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
import "scripts.js" as Scripts
|
||||
|
||||
|
||||
PullDownMenu {
|
||||
|
|
@ -41,23 +40,6 @@ PullDownMenu {
|
|||
}
|
||||
}
|
||||
|
||||
/*MenuItem {
|
||||
text: qsTr("Dashboards")
|
||||
|
||||
onClicked: {
|
||||
utils.setDashboardModel();
|
||||
pageStack.push(Qt.resolvedUrl("DashboardPage.qml"));
|
||||
}
|
||||
}*/
|
||||
|
||||
/*MenuItem {
|
||||
text: qsTr("Download")
|
||||
|
||||
onClicked: {
|
||||
pageStack.push(Qt.resolvedUrl("DownloadDialog.qml"));
|
||||
}
|
||||
}*/
|
||||
|
||||
MenuItem {
|
||||
text: qsTr("Sync")
|
||||
|
||||
|
|
@ -72,18 +54,30 @@ PullDownMenu {
|
|||
function update() {
|
||||
var lastSync = settings.getNetvibesLastUpdateDate();
|
||||
if (lastSync>0)
|
||||
text = qsTr("Last sync") + ": " + Scripts.getHumanFriendlyTimeString(lastSync);
|
||||
text = qsTr("Last sync: %1").arg(app.getHumanFriendlyTimeString(lastSync));
|
||||
else
|
||||
text = qsTr("Not yet synced");
|
||||
}
|
||||
|
||||
Component.onCompleted: update();
|
||||
Component.onCompleted: {
|
||||
update();
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: fetcher
|
||||
onReady: update()
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: timer
|
||||
running: true
|
||||
interval: 20000
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
parent.update();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,10 +126,33 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
TextSwitch {
|
||||
id: offlinemode
|
||||
text: qsTr("Offline mode")
|
||||
description: qsTr("Content of articles will be displayed from local cache, without a network usage.")
|
||||
|
||||
checked: settings.getOfflineMode()
|
||||
|
||||
onCheckedChanged: {
|
||||
settings.setOfflineMode(checked);
|
||||
/*if (checked)
|
||||
notification.show(qsTr("Offline mode enabled"));
|
||||
else
|
||||
notification.show(qsTr("Online mode enabled"));
|
||||
*/
|
||||
}
|
||||
|
||||
/*Image {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
source: offLineMode ? "image://theme/icon-m-wlan-no-signal?"+Theme.highlightColor : "image://theme/icon-m-wlan-4?"+Theme.highlightColor
|
||||
anchors.right: parent.right
|
||||
}*/
|
||||
}
|
||||
|
||||
TextSwitch {
|
||||
id: autodownload
|
||||
text: qsTr("Cache articles")
|
||||
description: qsTr("If enabled, all articles will be downloaded and cached for access in Offline mode.")
|
||||
description: qsTr("After sync the content for all articles will be downloaded and cached for access in Offline mode.")
|
||||
|
||||
Component.onCompleted: {
|
||||
checked = settings.getAutoDownloadOnUpdate();
|
||||
|
|
@ -141,22 +164,12 @@ Page {
|
|||
}
|
||||
|
||||
TextSwitch {
|
||||
id: offlinemode
|
||||
text: qsTr("Offline mode")
|
||||
description: qsTr("If enabled, content of articles will be displayed from local cache, without a network usage.")
|
||||
|
||||
Component.onCompleted: {
|
||||
checked = settings.getOfflineMode();
|
||||
}
|
||||
id: tabicons
|
||||
text: qsTr("Show Tabs icons")
|
||||
checked: settings.getShowTabIcons();
|
||||
|
||||
onCheckedChanged: {
|
||||
settings.setOfflineMode(checked);
|
||||
|
||||
/*if (checked)
|
||||
notification.show(qsTr("Offline mode enabled"));
|
||||
else
|
||||
notification.show(qsTr("Online mode enabled"));
|
||||
*/
|
||||
settings.setShowTabIcons(checked);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ Page {
|
|||
MainMenu{}
|
||||
|
||||
header: PageHeader {
|
||||
title: "Tabs"
|
||||
title: qsTr("Tabs")
|
||||
}
|
||||
|
||||
delegate: ListItem {
|
||||
|
|
@ -61,14 +61,30 @@ Page {
|
|||
height: Theme.iconSizeSmall
|
||||
anchors.right: parent.right; anchors.rightMargin: Theme.paddingLarge
|
||||
anchors.verticalCenter: item.verticalCenter
|
||||
visible: settings.getShowTabIcons()
|
||||
}
|
||||
|
||||
Component.onCompleted: image.source = cache.getUrlbyUrl(iconUrl)
|
||||
Component.onCompleted: {
|
||||
if (image.visible)
|
||||
image.source = cache.getUrlbyUrl(iconUrl);
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: settings
|
||||
onSettingsChanged: {
|
||||
if (settings.getShowTabIcons()) {
|
||||
image.source = cache.getUrlbyUrl(iconUrl);
|
||||
image.visible = true;
|
||||
} else {
|
||||
image.source = "";
|
||||
image.visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
utils.setFeedModel(uid);
|
||||
pageStack.push(Qt.resolvedUrl("FeedPage.qml"),{"title": title});
|
||||
console.log(cache.getUrlbyUrl(iconUrl));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -87,35 +103,14 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
/*Image {
|
||||
visible: listView.count == 0
|
||||
anchors.centerIn: parent
|
||||
source: "image://theme/graphic-tutorial-close?"+Theme.secondaryHighlightColor
|
||||
}*/
|
||||
|
||||
/*Button {
|
||||
visible: !signedIn
|
||||
enabled: !signedIn
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: Theme.itemSizeLarge
|
||||
text: qsTr("Sign In")
|
||||
}*/
|
||||
|
||||
VerticalScrollDecorator {
|
||||
flickable: listView
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ControlBarDark {
|
||||
/*ControlBar {
|
||||
id: controlbar
|
||||
canSync: false
|
||||
canOffline: true
|
||||
|
||||
onSyncClicked: {
|
||||
fetcher.update();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2014 Michal Kosciesza <michal@mkiol.net>
|
||||
|
||||
This file is part of Kaktus.
|
||||
|
||||
Kaktus is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Kaktus is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Kaktus. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
height: visible ? Theme.itemSizeMedium * 0.7 : 0
|
||||
width: parent.width
|
||||
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
|
||||
//color: Theme.highlightBackgroundColor
|
||||
color: Theme.rgba(Theme.highlightBackgroundColor, 0.0)
|
||||
enabled: opacity > 0.0
|
||||
|
||||
opacity: 1.0
|
||||
visible: opacity > 0.0
|
||||
Behavior on opacity { FadeAnimation {} }
|
||||
|
||||
IconButton {
|
||||
id: offlineButton
|
||||
|
||||
//height: 48
|
||||
//width: 48
|
||||
//smooth: true
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
//anchors.rightMargin: Theme.paddingSmall
|
||||
|
||||
icon.source: offLineMode ? "image://theme/icon-status-wlan-no-signal" : "image://theme/icon-status-wlan-4"
|
||||
onClicked: offLineMode = !offLineMode;
|
||||
}
|
||||
}
|
||||
|
|
@ -36,10 +36,10 @@ Page {
|
|||
if (forwardNavigation)
|
||||
forwardNavigation = false;
|
||||
}
|
||||
onBackNavigationChanged: {
|
||||
/*onBackNavigationChanged: {
|
||||
if (backNavigation)
|
||||
backNavigation = false;
|
||||
}
|
||||
}*/
|
||||
showNavigationIndicator: false
|
||||
//allowedOrientations: Orientation.Landscape | Orientation.Portrait
|
||||
allowedOrientations: Orientation.Portrait
|
||||
|
|
@ -67,14 +67,14 @@ Page {
|
|||
|
||||
onLoadingChanged: {
|
||||
if (loadRequest.status == WebView.LoadStartedStatus) {
|
||||
console.log("onLoadingChanged, LoadStartedStatus");
|
||||
//console.log("onLoadingChanged, LoadStartedStatus");
|
||||
busy.show("Loading page content...", false);
|
||||
} else if (loadRequest.status == WebView.LoadFailedStatus) {
|
||||
console.log("onLoadingChanged, LoadFailedStatus");
|
||||
//console.log("onLoadingChanged, LoadFailedStatus");
|
||||
notification.show(qsTr("Failed to load page content :-("));
|
||||
busy.hide();
|
||||
} else {
|
||||
console.log("onLoadingChanged, Ok");
|
||||
//console.log("onLoadingChanged, Ok");
|
||||
busy.hide();
|
||||
}
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
ControlBar {
|
||||
ControlBarWebPreview {
|
||||
id: controlbar
|
||||
flick: view
|
||||
canBack: true
|
||||
|
|
@ -120,9 +120,6 @@ Page {
|
|||
|
||||
BusyBar {
|
||||
id: busy
|
||||
onCloseClicked: {
|
||||
console.log("cancel!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,191 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2014 Michal Kosciesza <michal@mkiol.net>
|
||||
|
||||
This file is part of Kaktus.
|
||||
|
||||
Kaktus is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Kaktus is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Kaktus. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import Sailfish.Silica 1.0
|
||||
import QtWebKit 3.0
|
||||
import QtWebKit.experimental 1.0
|
||||
|
||||
Page {
|
||||
id: root
|
||||
|
||||
property string title
|
||||
property string entryId
|
||||
property string offlineUrl
|
||||
property string onlineUrl
|
||||
property bool stared
|
||||
property int index
|
||||
|
||||
// work around Silica bug: don't let webview enable forward navigation
|
||||
onForwardNavigationChanged: {
|
||||
if (forwardNavigation)
|
||||
forwardNavigation = false;
|
||||
}
|
||||
|
||||
allowedOrientations: Orientation.Landscape | Orientation.Portrait
|
||||
|
||||
SilicaWebView {
|
||||
id: view
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
}
|
||||
|
||||
onBarShowRequest: {
|
||||
controlbar.show();
|
||||
}
|
||||
|
||||
onBarHideRequest: {
|
||||
controlbar.hide();
|
||||
}
|
||||
|
||||
// Bar engine
|
||||
property real barShowMoveWidth: 30
|
||||
signal barShowRequest();
|
||||
signal barHideRequest();
|
||||
|
||||
QtObject {
|
||||
id: m
|
||||
property real initialContentY
|
||||
}
|
||||
|
||||
onMovementStarted: {
|
||||
m.initialContentY=contentY;
|
||||
//barHideRequest();
|
||||
}
|
||||
|
||||
onContentYChanged: {
|
||||
if (moving) {
|
||||
//console.log("contentY:"+contentY);
|
||||
var delta = contentY-m.initialContentY
|
||||
//console.log("delta:"+delta);
|
||||
if (delta<-barShowMoveWidth)
|
||||
barShowRequest();
|
||||
if (delta>barShowMoveWidth)
|
||||
barHideRequest();
|
||||
}
|
||||
}
|
||||
// ---
|
||||
|
||||
|
||||
url: offLineMode ? offlineUrl : onlineUrl
|
||||
experimental.userAgent: settings.getDmUserAgent()
|
||||
|
||||
onUrlChanged: {
|
||||
console.log("onUrlChanged");
|
||||
}
|
||||
|
||||
header: PageHeader {
|
||||
title: root.title
|
||||
}
|
||||
|
||||
onLoadingChanged: {
|
||||
if (loadRequest.status == WebView.LoadStartedStatus) {
|
||||
console.log("onLoadingChanged, LoadStartedStatus");
|
||||
busy.show("Loading page content...", false);
|
||||
} else if (loadRequest.status == WebView.LoadFailedStatus) {
|
||||
console.log("onLoadingChanged, LoadFailedStatus");
|
||||
notification.show(qsTr("Failed to load page content :-("));
|
||||
busy.hide();
|
||||
} else {
|
||||
console.log("onLoadingChanged, Ok");
|
||||
busy.hide();
|
||||
}
|
||||
}
|
||||
|
||||
onNavigationRequested: {
|
||||
// In Off-Line mode navigation is disabled
|
||||
if (offLineMode) {
|
||||
if (request.url != offlineUrl) {
|
||||
request.action = WebView.IgnoreRequest;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PullDownMenu {
|
||||
MenuItem {
|
||||
text: qsTr("Copy URL")
|
||||
|
||||
onClicked: {
|
||||
if (offLineMode)
|
||||
utils.copyToClipboard(offlineUrl);
|
||||
else
|
||||
utils.copyToClipboard(onlineUrl);
|
||||
notification.show(qsTr("URL copied!"));
|
||||
}
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
text: qsTr("Open in browser")
|
||||
|
||||
onClicked: {
|
||||
if (offLineMode)
|
||||
Qt.openUrlExternally(offlineUrl);
|
||||
else
|
||||
Qt.openUrlExternally(onlineUrl);
|
||||
}
|
||||
}
|
||||
|
||||
/*MenuItem {
|
||||
text: qsTr("Back")
|
||||
|
||||
onClicked: {
|
||||
pageStack.pop()
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/*PushUpMenu {
|
||||
MenuItem {
|
||||
text: qsTr("Top")
|
||||
onClicked: view.scrollToTop()
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
ControlBar {
|
||||
id: controlbar
|
||||
canBack: true
|
||||
canStar: true
|
||||
canOffline: true
|
||||
flick: parent
|
||||
stared: root.stared
|
||||
onBackClicked: pageStack.pop()
|
||||
onStarClicked: {
|
||||
if (stared) {
|
||||
stared=false;
|
||||
entryModel.setData(root.index, "readlater", 0);
|
||||
} else {
|
||||
stared=true;
|
||||
entryModel.setData(root.index, "readlater", 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BusyBar {
|
||||
id: busy
|
||||
onCloseClicked: {
|
||||
console.log("cancel!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
104
qml/main.qml
104
qml/main.qml
|
|
@ -27,6 +27,58 @@ ApplicationWindow {
|
|||
property bool offLineMode
|
||||
property bool signedIn
|
||||
|
||||
function getHumanFriendlyTimeString(date) {
|
||||
var delta = Math.floor(Date.now()/1000-date);
|
||||
if (delta===0) {
|
||||
return qsTr("just now");
|
||||
}
|
||||
if (delta===1) {
|
||||
return qsTr("1 second ago");
|
||||
}
|
||||
if (delta<5) {
|
||||
return qsTr("%1 seconds ago","less than 5 seconds").arg(delta);
|
||||
}
|
||||
if (delta<60) {
|
||||
return qsTr("%1 seconds ago","more or equal 5 seconds").arg(delta);
|
||||
}
|
||||
if (delta>=60&&delta<120) {
|
||||
return qsTr("1 minute ago");
|
||||
}
|
||||
if (delta<300) {
|
||||
qsTr("%1 minutes ago","less than 5 minutes").arg(Math.floor(delta/60));
|
||||
}
|
||||
if (delta<3600) {
|
||||
qsTr("%1 minutes ago","more or equal 5 minutes").arg(Math.floor(delta/60));
|
||||
}
|
||||
if (delta>=3600&&delta<7200) {
|
||||
return qsTr("1 hour ago");
|
||||
}
|
||||
if (delta<18000) {
|
||||
return qsTr("%1 hours ago","less than 5 hours").arg(Math.floor(delta/3600));
|
||||
}
|
||||
if (delta<86400) {
|
||||
return qsTr("%1 hours ago","more or equal 5 hours").arg(Math.floor(delta/3600));
|
||||
}
|
||||
if (delta>=86400&&delta<172800) {
|
||||
return qsTr("yesterday");
|
||||
}
|
||||
if (delta<432000) {
|
||||
return qsTr("%1 days ago","less than 5 days").arg(Math.floor(delta/86400));
|
||||
}
|
||||
if (delta<604800) {
|
||||
return qsTr("%1 days ago","more or equal 5 days").arg(Math.floor(delta/86400));
|
||||
}
|
||||
if (delta>=604800&&delta<1209600) {
|
||||
return qsTr("1 week ago");
|
||||
}
|
||||
if (delta<2419200) {
|
||||
return qsTr("%1 weeks ago").arg(Math.floor(delta/604800));
|
||||
}
|
||||
return Qt.formatDateTime(new Date(date*1000),"dddd, d MMMM yy");
|
||||
}
|
||||
|
||||
cover: CoverPage {}
|
||||
|
||||
onOffLineModeChanged: {
|
||||
settings.setOfflineMode(offLineMode);
|
||||
}
|
||||
|
|
@ -62,16 +114,14 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
onEmpty: {
|
||||
console.log("DB is empty!");
|
||||
|
||||
//console.log("DB is empty!");
|
||||
utils.updateModels();
|
||||
utils.setTabModel(settings.getNetvibesDefaultDashboard());
|
||||
pageStack.replaceAbove(null,Qt.resolvedUrl("TabPage.qml"));
|
||||
}
|
||||
|
||||
onNotEmpty: {
|
||||
console.log("DB is not empty!");
|
||||
|
||||
//console.log("DB is not empty!");
|
||||
utils.setTabModel(settings.getNetvibesDefaultDashboard());
|
||||
pageStack.replaceAbove(null,Qt.resolvedUrl("TabPage.qml"));
|
||||
}
|
||||
|
|
@ -81,25 +131,25 @@ ApplicationWindow {
|
|||
target: dm
|
||||
|
||||
onProgress: {
|
||||
console.log("DM progress: " + remaining);
|
||||
busyDM.text = "" + remaining + " more items left..."
|
||||
//console.log("DM progress: " + remaining);
|
||||
busyDM.text = qsTr("%1 more items left...").arg(remaining);
|
||||
if (remaining === 0) {
|
||||
busyDM.text = "All done!";
|
||||
busyDM.text = qsTr("All done!");
|
||||
}
|
||||
}
|
||||
|
||||
onCanceled: {
|
||||
console.log("DM canceled!");
|
||||
//console.log("DM canceled!");
|
||||
busyDM.hide();
|
||||
}
|
||||
|
||||
onBusy: {
|
||||
console.log("DM busy!");
|
||||
busyDM.show("Caching...",true);
|
||||
//console.log("DM busy!");
|
||||
busyDM.show(qsTr("Caching..."),true);
|
||||
}
|
||||
|
||||
onReady: {
|
||||
console.log("DM ready!");
|
||||
//console.log("DM ready!");
|
||||
busyDM.hide();
|
||||
}
|
||||
|
||||
|
|
@ -130,12 +180,12 @@ ApplicationWindow {
|
|||
target: fetcher
|
||||
|
||||
onCanceled: {
|
||||
console.log("Fetcher canceled!");
|
||||
//console.log("Fetcher canceled!");
|
||||
busy.hide();
|
||||
}
|
||||
|
||||
onReady: {
|
||||
console.log("Fetcher ready!");
|
||||
//console.log("Fetcher ready!");
|
||||
//notification.show(qsTr("Sync done!"));
|
||||
utils.setTabModel(settings.getNetvibesDefaultDashboard());
|
||||
pageStack.replaceAbove(null,Qt.resolvedUrl("TabPage.qml"));
|
||||
|
|
@ -170,47 +220,47 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
onErrorCheckingCredentials: {
|
||||
console.log("Fetcher checking error");
|
||||
console.log("code=" + code);
|
||||
//console.log("Fetcher checking error");
|
||||
//console.log("code=" + code);
|
||||
notification.show(qsTr("User & Password do not match!"));
|
||||
busy.hide();
|
||||
}
|
||||
|
||||
onCredentialsValid: {
|
||||
console.log("Fetcher credentials valid");
|
||||
//console.log("Fetcher credentials valid");
|
||||
notification.show(qsTr("Successfully Signed In!"));
|
||||
busy.hide();
|
||||
}
|
||||
|
||||
onProgress: {
|
||||
console.log("Fetcher progress: " + current + "/" + total);
|
||||
//console.log("Fetcher progress: " + current + "/" + total);
|
||||
//busy.text = "Fetching data... " + Math.floor((current / total) * 100) + "%";
|
||||
busy.text = "Receiving data... ";
|
||||
busy.text = qsTr("Receiving data... ");
|
||||
busy.progress = current / total;
|
||||
}
|
||||
|
||||
onInitiating: {
|
||||
console.log("Fetcher init started!");
|
||||
busy.text = "Initiating...";
|
||||
//console.log("Fetcher init started!");
|
||||
busy.text = qsTr("Initiating...");
|
||||
}
|
||||
|
||||
onUpdating: {
|
||||
console.log("Fetcher update started!");
|
||||
busy.text = "Updating...";
|
||||
//console.log("Fetcher update started!");
|
||||
busy.text = qsTr("Updating...");
|
||||
}
|
||||
|
||||
onUploading: {
|
||||
console.log("Fetcher uploading!");
|
||||
busy.text = "Sending data to Netvibes...";
|
||||
//console.log("Fetcher uploading!");
|
||||
busy.text = qsTr("Sending data to Netvibes...");
|
||||
}
|
||||
|
||||
onCheckingCredentials: {
|
||||
console.log("Fetcher checking credentials!");
|
||||
busy.text = "Signing in...";
|
||||
//console.log("Fetcher checking credentials!");
|
||||
qsTr(busy.text = "Signing in...");
|
||||
}
|
||||
|
||||
onBusy: {
|
||||
console.log("Fetcher busy!");
|
||||
//console.log("Fetcher busy!");
|
||||
busy.show("", false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2014 Michal Kosciesza <michal@mkiol.net>
|
||||
|
||||
This file is part of Kaktus.
|
||||
|
||||
Kaktus is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Kaktus is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Kaktus. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
function getHumanFriendlyTimeString(date) {
|
||||
var delta = Math.floor(Date.now()/1000-date);
|
||||
if (delta===0) {
|
||||
return "just now";
|
||||
}
|
||||
if (delta===1) {
|
||||
return "1 second ago";
|
||||
}
|
||||
if (delta<60) {
|
||||
return "" + delta + " seconds ago";
|
||||
}
|
||||
if (delta>=60&&delta<120) {
|
||||
return "1 minute ago";
|
||||
}
|
||||
if (delta<3600) {
|
||||
return "" + Math.floor(delta/60) + " minutes ago";
|
||||
}
|
||||
if (delta>=3600&&delta<7200) {
|
||||
return "1 hour ago";
|
||||
}
|
||||
if (delta<86400) {
|
||||
return "" + Math.floor(delta/3600) + " hours ago";
|
||||
}
|
||||
if (delta>=86400&&delta<172800) {
|
||||
return "yesterday";
|
||||
}
|
||||
if (delta<604800) {
|
||||
return "" + Math.floor(delta/86400) + " days ago";
|
||||
}
|
||||
if (delta>=604800&&delta<1209600) {
|
||||
return "1 week ago";
|
||||
}
|
||||
if (delta<2419200) {
|
||||
return "" + Math.floor(delta/604800) + " weeks ago";
|
||||
}
|
||||
return Qt.formatDateTime(new Date(date*1000),"dddd, d MMMM yy");
|
||||
}
|
||||
|
|
@ -121,7 +121,7 @@ bool DatabaseManager::checkParameters()
|
|||
qWarning() << "DB version mismatch!";
|
||||
createDB = true;
|
||||
} else {
|
||||
qDebug() << "DB version ok!";
|
||||
//qDebug() << "DB version ok!";
|
||||
// Check is Dashboard exists
|
||||
if (!isDashborardExists()) {
|
||||
emit empty();
|
||||
|
|
@ -141,24 +141,6 @@ bool DatabaseManager::checkParameters()
|
|||
}
|
||||
|
||||
if (createDB) {
|
||||
/*if (!deleteDB()) {
|
||||
qWarning() << "DB can not be deleted!";
|
||||
return false;
|
||||
}
|
||||
if (!openDB()) {
|
||||
qWarning() << "DB can not be opened!";
|
||||
return false;
|
||||
}
|
||||
if (!createStructure()) {
|
||||
qWarning() << "Create DB structure faild!";
|
||||
return false;
|
||||
}
|
||||
if (!createActionsStructure()) {
|
||||
qWarning() << "Create Actions structure faild!";
|
||||
return false;
|
||||
}
|
||||
// New empty DB created
|
||||
qDebug() << "New empty DB created!";*/
|
||||
if (!this->createDB())
|
||||
return false;
|
||||
emit empty();
|
||||
|
|
@ -193,7 +175,7 @@ bool DatabaseManager::createDB()
|
|||
return false;
|
||||
}
|
||||
// New empty DB created
|
||||
qDebug() << "New empty DB created!";
|
||||
//qDebug() << "New empty DB created!";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -599,9 +581,6 @@ bool DatabaseManager::updateEntryCache(const QString &entryId, int cacheDate, in
|
|||
return ret;
|
||||
}
|
||||
|
||||
//bool updateEntryReadFlag(const QString &entryId, int read);
|
||||
//bool updateEntryReadlaterFlag(const QString &entryId, int readlater);
|
||||
|
||||
bool DatabaseManager::updateEntryReadFlag(const QString &entryId, int read)
|
||||
{
|
||||
bool ret = false;
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ void Checker::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
|
|||
|
||||
void Checker::timeout()
|
||||
{
|
||||
qDebug() << "timeout";
|
||||
//qDebug() << "timeout";
|
||||
reply->close();
|
||||
}
|
||||
|
||||
|
|
@ -365,7 +365,7 @@ void Checker::metaDataChanged()
|
|||
if (reply->header(QNetworkRequest::ContentLengthHeader).isValid()) {
|
||||
int length = reply->header(QNetworkRequest::ContentLengthHeader).toInt();
|
||||
if (length > maxSize) {
|
||||
qDebug() << "metaDataChanged, length=" << length;
|
||||
//qDebug() << "metaDataChanged, length=" << length;
|
||||
reply->close();
|
||||
return;
|
||||
}
|
||||
|
|
@ -378,7 +378,7 @@ void Checker::metaDataChanged()
|
|||
if (reply->header(QNetworkRequest::ContentTypeHeader).isValid()) {
|
||||
QString type = reply->header(QNetworkRequest::ContentTypeHeader).toString().section('/', 0, 0);
|
||||
if (type != "text" && type != "image") {
|
||||
qDebug() << "metaDataChanged, type=" << type;
|
||||
//qDebug() << "metaDataChanged, type=" << type;
|
||||
reply->close();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#include <QGuiApplication>
|
||||
#include <QScopedPointer>
|
||||
#include <QQmlEngine>
|
||||
#include <QTranslator>
|
||||
#include <sailfishapp.h>
|
||||
|
||||
#include "databasemanager.h"
|
||||
|
|
@ -36,7 +37,7 @@
|
|||
#include "settings.h"
|
||||
|
||||
static const char *APP_NAME = "Kaktus";
|
||||
static const char *VERSION = "0.0.2";
|
||||
static const char *VERSION = "0.9.0";
|
||||
static const char *AUTHOR = "Michał Kościesza <michal@mkiol.net>";
|
||||
static const char *PAGE = "https://github/mkiol/kaktus";
|
||||
|
||||
|
|
@ -54,6 +55,11 @@ int main(int argc, char *argv[])
|
|||
app->setApplicationDisplayName(APP_NAME);
|
||||
app->setApplicationVersion(VERSION);
|
||||
|
||||
QTranslator *appTranslator = new QTranslator;
|
||||
appTranslator->load(":/i18n/kaktus_" + QLocale::system().name() + ".qm");
|
||||
//appTranslator->load(":/i18n/kaktus_pl.qm");
|
||||
app->installTranslator(appTranslator);
|
||||
|
||||
Settings* settings = Settings::instance();
|
||||
DatabaseManager db; settings->db = &db;
|
||||
DownloadManager dm(&db); settings->dm = &dm;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,11 @@ void NetvibesFetcher::init()
|
|||
signIn();
|
||||
}
|
||||
|
||||
bool NetvibesFetcher::isBusy()
|
||||
{
|
||||
return _busy;
|
||||
}
|
||||
|
||||
void NetvibesFetcher::networkAccessibleChanged(QNetworkAccessManager::NetworkAccessibility accessible)
|
||||
{
|
||||
switch (accessible) {
|
||||
|
|
@ -226,7 +231,7 @@ void NetvibesFetcher::set(const QString &entryId, DatabaseManager::ActionsTypes
|
|||
QString feedId = _db->readFeedId(entryId);
|
||||
QString content = "feeds="+feedId+"&items="+entryId+"&format=json";
|
||||
|
||||
qDebug() << "content: " << content;
|
||||
//qDebug() << "content: " << content;
|
||||
|
||||
_currentReply = _manager.post(request, content.toUtf8());
|
||||
connect(_currentReply, SIGNAL(finished()), this, SLOT(finishedSet()));
|
||||
|
|
@ -360,7 +365,7 @@ void NetvibesFetcher::fetchFeedsUpdate()
|
|||
|
||||
QString feeds; int ii = 0;
|
||||
QMap<QString,int>::iterator i = _feedUpdateList.begin();
|
||||
qDebug() << "feedUpdateList.count=" << _feedUpdateList.count();
|
||||
//qDebug() << "feedUpdateList.count=" << _feedUpdateList.count();
|
||||
while (i != _feedUpdateList.end()) {
|
||||
if (ii >= feedsUpdateAtOnce) {
|
||||
break;
|
||||
|
|
@ -608,11 +613,11 @@ void NetvibesFetcher::finishedSignIn()
|
|||
// upload actions
|
||||
actionsList =_db->readActions();
|
||||
if (actionsList.isEmpty()) {
|
||||
qDebug() << "No actions to upload!";
|
||||
//qDebug() << "No actions to upload!";
|
||||
_db->cleanDashboards();
|
||||
fetchDashboards();
|
||||
} else {
|
||||
qDebug() << actionsList.count() << " actions to upload!";
|
||||
//qDebug() << actionsList.count() << " actions to upload!";
|
||||
uploadActions();
|
||||
}
|
||||
|
||||
|
|
@ -703,7 +708,7 @@ void NetvibesFetcher::finishedTabs()
|
|||
_feedUpdateList = _db->readFeedsFirstUpdate();
|
||||
|
||||
if (_feedList.isEmpty()) {
|
||||
qDebug() << "No new Feeds!";
|
||||
//qDebug() << "No new Feeds!";
|
||||
fetchFeedsUpdate();
|
||||
|
||||
_total = (_feedUpdateList.count()/feedsUpdateAtOnce)+3;
|
||||
|
|
@ -737,7 +742,7 @@ void NetvibesFetcher::cleanNewFeeds()
|
|||
QStringList::iterator i = _feedList.begin();
|
||||
while (i != _feedList.end()) {
|
||||
if (storedFeedList.find(*i) == storedFeedList.end()) {
|
||||
qDebug() << "New feed " << *i;
|
||||
//qDebug() << "New feed " << *i;
|
||||
++i;
|
||||
} else {
|
||||
i = _feedList.erase(i);
|
||||
|
|
@ -816,7 +821,7 @@ void NetvibesFetcher::finishedSet()
|
|||
}
|
||||
|
||||
// deleting action
|
||||
qDebug() << "Deleting action...";
|
||||
//qDebug() << "Deleting action...";
|
||||
DatabaseManager::Action action = actionsList.takeFirst();
|
||||
_db->removeAction(action.entryId);
|
||||
|
||||
|
|
@ -854,16 +859,17 @@ void NetvibesFetcher::finishedFeedsUpdate()
|
|||
|
||||
void NetvibesFetcher::networkError(QNetworkReply::NetworkError e)
|
||||
{
|
||||
qWarning() << "Network error!, error code: " << e;
|
||||
|
||||
_currentReply->disconnect(this);
|
||||
_currentReply->deleteLater();
|
||||
_currentReply = 0;
|
||||
|
||||
if (e == QNetworkReply::OperationCanceledError)
|
||||
if (e == QNetworkReply::OperationCanceledError) {
|
||||
emit canceled();
|
||||
else
|
||||
} else {
|
||||
emit error(500);
|
||||
qWarning() << "Network error!, error code: " << e;
|
||||
}
|
||||
|
||||
_busy = false;
|
||||
}
|
||||
|
||||
|
|
@ -879,11 +885,11 @@ void NetvibesFetcher::taskEnd()
|
|||
s->setNetvibesLastUpdateDate(QDateTime::currentDateTime().toTime_t());
|
||||
|
||||
if(_busyType) {
|
||||
qDebug() << "Update ends!";
|
||||
//qDebug() << "Update ends!";
|
||||
emit ready();
|
||||
_busy = false;
|
||||
} else {
|
||||
qDebug() << "Init ends!";
|
||||
//qDebug() << "Init ends!";
|
||||
emit ready();
|
||||
_busy = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ public:
|
|||
Q_INVOKABLE void updateFeeds();
|
||||
Q_INVOKABLE void updateTab(const QString &tabId);
|
||||
Q_INVOKABLE void cancel();
|
||||
Q_INVOKABLE bool isBusy();
|
||||
|
||||
signals:
|
||||
void quit();
|
||||
|
|
|
|||
|
|
@ -44,8 +44,10 @@ Settings* Settings::instance()
|
|||
|
||||
void Settings::setOfflineMode(bool value)
|
||||
{
|
||||
settings.setValue("offlinemode", value);
|
||||
emit settingsChanged();
|
||||
if (getOfflineMode() != value) {
|
||||
settings.setValue("offlinemode", value);
|
||||
emit settingsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
bool Settings::getOfflineMode()
|
||||
|
|
@ -53,10 +55,25 @@ bool Settings::getOfflineMode()
|
|||
return settings.value("offlinemode", false).toBool();
|
||||
}
|
||||
|
||||
void Settings::setShowTabIcons(bool value)
|
||||
{
|
||||
if (getShowTabIcons() != value) {
|
||||
settings.setValue("showtabicons", value);
|
||||
emit settingsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
bool Settings::getShowTabIcons()
|
||||
{
|
||||
return settings.value("showtabicons", false).toBool();
|
||||
}
|
||||
|
||||
void Settings::setSignedIn(bool value)
|
||||
{
|
||||
settings.setValue("signedin", value);
|
||||
emit settingsChanged();
|
||||
if (getSignedIn() != value) {
|
||||
settings.setValue("signedin", value);
|
||||
emit settingsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
bool Settings::getSignedIn()
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@ public:
|
|||
Q_INVOKABLE bool getOfflineMode();
|
||||
Q_INVOKABLE void setSignedIn(bool value);
|
||||
Q_INVOKABLE bool getSignedIn();
|
||||
Q_INVOKABLE bool getShowTabIcons();
|
||||
Q_INVOKABLE void setShowTabIcons(bool value);
|
||||
|
||||
// Netvibes Fetcher
|
||||
Q_INVOKABLE void setNetvibesUsername(const QString &value);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue