aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/resource.language.en_gb/resources/strings.po90
-rw-r--r--configure.ac20
-rw-r--r--system/keymaps/touchscreen.xml9
-rw-r--r--xbmc/addons/AddonInstaller.cpp37
-rw-r--r--xbmc/addons/AddonInstaller.h10
-rw-r--r--xbmc/addons/AddonManager.cpp9
-rw-r--r--xbmc/addons/GUIWindowAddonBrowser.cpp17
-rw-r--r--xbmc/addons/Repository.cpp15
-rw-r--r--xbmc/addons/Repository.h3
-rw-r--r--xbmc/cores/dvdplayer/DVDPlayerVideo.cpp2
-rw-r--r--xbmc/dialogs/GUIDialogExtendedProgressBar.cpp9
-rw-r--r--xbmc/guilib/LocalizeStrings.cpp14
-rw-r--r--xbmc/guilib/LocalizeStrings.h4
-rw-r--r--xbmc/settings/windows/GUIWindowSettingsScreenCalibration.cpp24
-rw-r--r--xbmc/utils/ProgressJob.cpp14
-rw-r--r--xbmc/utils/ProgressJob.h2
-rw-r--r--xbmc/utils/Weather.cpp2
17 files changed, 200 insertions, 81 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index 0226c9e0cc..d5fcfc5364 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -56,6 +56,9 @@ msgid "Settings"
msgstr ""
#: Unknown
+#: xbmc/music/windows/GUIWindowMusicBase.cpp
+#: xbmc/music/windows/GUIWindowMusicNav.cpp
+#: xbmc/video/windows/GUIWindowVideoBase.cpp
#: xbmc/windows/GUIWindowFileManager.cpp
msgctxt "#6"
msgid "Kodi SVN"
@@ -786,6 +789,8 @@ msgctxt "#188"
msgid "Select all"
msgstr ""
+#: xbmc/music/MusicDatabase.cpp
+#: xbmc/music/windows/GUIWindowMusicBase.cpp
msgctxt "#189"
msgid "Scanning media information"
msgstr ""
@@ -806,11 +811,15 @@ msgctxt "#193"
msgid "Scan"
msgstr ""
+#: xbmc/pvr/windows/GUIWindowPVRSearch.cpp
+#: xbmc/video/dialogs/GUIDialogVideoInfo.cpp
+#: xbmc/video/windows/GUIWindowVideoBase.cpp
msgctxt "#194"
msgid "Searching..."
msgstr ""
#: xbmc/addons/guidialogaddoninfo.cpp
+#: xbmc/video/windows/GUIWindowVideoBase.cpp
msgctxt "#195"
msgid "No information found!"
msgstr ""
@@ -1102,6 +1111,8 @@ msgid "Fetching CD information"
msgstr ""
#: xbmc/dialogs/GUIDialogFileBrowser.cpp
+#: xbmc/video/dialogs/GUIDialogVideoInfo.cpp
+#: xbmc/music/windows/GUIWindowMusicBase.cpp
#: xbmc/video/windows/GUIWindowVideoNav.cpp
msgctxt "#257"
msgid "Error"
@@ -1215,6 +1226,9 @@ msgctxt "#283"
msgid "Search results"
msgstr ""
+#: xbmc/pvr/windows/GUIWindowPVRSearch.cpp
+#: xbmc/video/dialogs/GUIDialogVideoInfo.cpp
+#: xbmc/video/windows/GUIWindowVideoBase.cpp
msgctxt "#284"
msgid "No results found"
msgstr ""
@@ -1340,6 +1354,7 @@ msgctxt "#312"
msgid "(0=auto)"
msgstr ""
+#: xbmc/music/MusicDatabase.cpp
msgctxt "#313"
msgid "Cleaning database"
msgstr ""
@@ -1420,6 +1435,7 @@ msgctxt "#332"
msgid "Error compressing database"
msgstr ""
+#: xbmc/music/MusicDatabase.cpp
msgctxt "#333"
msgid "Do you want to clean the library?"
msgstr ""
@@ -1854,6 +1870,7 @@ msgctxt "#425"
msgid "No album information found"
msgstr ""
+#: xbmc/music/MusicDatabase.cpp
msgctxt "#426"
msgid "No CD information found"
msgstr ""
@@ -1892,10 +1909,12 @@ msgctxt "#434"
msgid "From %s at %i %s"
msgstr ""
+#: xbmc/Application.cpp
msgctxt "#435"
msgid "No optical disc drive detected"
msgstr ""
+#: xbmc/Application.cpp
msgctxt "#436"
msgid "You need an optical disc drive to play this video"
msgstr ""
@@ -2057,6 +2076,9 @@ msgctxt "#476"
msgid "Music & video"
msgstr ""
+#: xbmc/music/windows/GUIWindowMusicBase.cpp
+#: xbmc/music/windows/GUIWindowMusicNav.cpp
+#: xbmc/video/windows/GUIWindowVideoBase.cpp
#: xbmc/windows/GUIWindowFileManager.cpp
msgctxt "#477"
msgid "Unable to load playlist"
@@ -2145,6 +2167,7 @@ msgctxt "#499"
msgid "Unable to connect to online lookup service"
msgstr ""
+#: xbmc/music/windows/GUIWindowMusicBase.cpp
msgctxt "#500"
msgid "Downloading album information failed"
msgstr ""
@@ -2769,6 +2792,7 @@ msgid "Remove from library"
msgstr ""
#: system/settings/settings.xml
+#: xbmc/video/VideoDatabase.cpp
msgctxt "#647"
msgid "Export video library"
msgstr ""
@@ -2874,7 +2898,7 @@ msgstr ""
#: xbmc/settings/AdvancedSettings.cpp
msgctxt "#670"
-msgid "Verbose logging for the [B[libcURL[/B] library (HTTP(S), DAV)"
+msgid "Verbose logging for the [B]libcURL[/B] library (HTTP(S), DAV)"
msgstr ""
#empty string with id 671
@@ -2921,7 +2945,7 @@ msgstr ""
#: xbmc/settings/AdvancedSettings.cpp
msgctxt "#680"
-msgid "Verbose logging for the [B]Video[B] component"
+msgid "Verbose logging for the [B]Video[/B] component"
msgstr ""
#empty strings from id 681 to 699
@@ -3825,10 +3849,12 @@ msgid "Use password protection"
msgstr ""
#: system/settings/settings.xml
+#: xbmc/network/NetworkServices.cpp
msgctxt "#1273"
msgid "AirPlay"
msgstr ""
+#: xbmc/network/NetworkServices.cpp
msgctxt "#1274"
msgid "AirTunes"
msgstr ""
@@ -4267,6 +4293,7 @@ msgstr ""
#. Fallback message indicating an add-on error.
#: xbmc/interfaces/python/PythonInvoker.cpp
+#: xbmc/pvr/dialogs/GUIDialogPVRChannelManager.cpp
msgctxt "#2103"
msgid "Add-on error"
msgstr ""
@@ -4890,6 +4917,7 @@ msgid "Enter new password"
msgstr ""
#: xbmc/dialogs/GUIDialogNumeric.cpp
+#: xbmc/guilib/GUIKeyboardFactory.cpp
msgctxt "#12341"
msgid "Re-enter new password"
msgstr ""
@@ -4908,6 +4936,7 @@ msgstr ""
#: xbmc/dialogs/GUIDialogGamepad.cpp
#: xbmc/dialogs/GUIDialogNumeric.cpp
+#: xbmc/guilib/GUIKeyboardFactory.cpp
msgctxt "#12344"
msgid "Passwords entered did not match."
msgstr ""
@@ -5873,6 +5902,7 @@ msgctxt "#13345"
msgid "Switch LED off on playback"
msgstr ""
+#: xbmc/video/windows/GUIWindowVideoBase.cpp
msgctxt "#13346"
msgid "Movie information"
msgstr ""
@@ -6470,10 +6500,12 @@ msgstr ""
#empty strings from id 13614 to 13619
+#: xbmc/osx/XBMCHelper.cpp
msgctxt "#13620"
msgid "Apple Remote error"
msgstr ""
+#: xbmc/osx/XBMCHelper.cpp
msgctxt "#13621"
msgid "Apple Remote support couldn't be enabled."
msgstr ""
@@ -6724,6 +6756,10 @@ msgctxt "#14056"
msgid "Stop scan"
msgstr ""
+#: xbmc/music/MusicDatabase.cpp
+#: xbmc/music/windows/GUIWindowMusicBase.cpp
+#: xbmc/video/dialogs/GUIDialogVideoInfo.cpp
+#: xbmc/video/windows/GUIWindowVideoBase.cpp
msgctxt "#14057"
msgid "Not possible while scanning for media information"
msgstr ""
@@ -6975,6 +7011,7 @@ msgstr ""
#empty strings from id 14111 to 15010
+#: xbmc/music/MusicDatabase.cpp
#: xbmc/video/VideoDatabase.cpp
msgctxt "#15011"
msgid "%i Items failed to export"
@@ -7270,6 +7307,7 @@ msgctxt "#16028"
msgid "Enter value"
msgstr ""
+#: xbmc/pvr/dialogs/GUIDialogPVRChannelManager.cpp
msgctxt "#16029"
msgid "Check the log for more information about this message."
msgstr ""
@@ -7766,10 +7804,18 @@ msgctxt "#19032"
msgid "Timeline"
msgstr ""
+#: xbmc/pvr/addons/PVRClients.cpp
+#: xbmc/pvr/dialogs/GUIDialogPVRGuideInfo.cpp
+#: xbmc/pvr/PVRManager.cpp
+#: xbmc/pvr/timers/PVRTimers.cpp
+#: xbmc/pvr/windows/GUIWindowPVRBase.cpp
+#: xbmc/pvr/windows/GUIWindowPVRChannels.cpp
+#: xbmc/video/windows/GUIWindowVideoBase.cpp
msgctxt "#19033"
msgid "Information"
msgstr ""
+#: xbmc/pvr/windows/GUIWindowPVRBase.cpp
msgctxt "#19034"
msgid "Already started recording on this channel"
msgstr ""
@@ -7778,6 +7824,8 @@ msgctxt "#19035"
msgid "%s couldn't be played.[CR]Check the log for more information about this message."
msgstr ""
+#: xbmc/pvr/windows/GUIWindowPVRBase.cpp
+#: xbmc/video/windows/GUIWindowVideoBase.cpp
msgctxt "#19036"
msgid "This recording can't be played.[CR]Check the log for more information about this message."
msgstr ""
@@ -7787,6 +7835,8 @@ msgctxt "#19037"
msgid "Show signal quality"
msgstr ""
+#: xbmc/pvr/addons/PVRClients.cpp
+#: xbmc/pvr/windows/GUIWindowPVRChannels.cpp
msgctxt "#19038"
msgid "Not supported by the PVR backend."
msgstr ""
@@ -7857,6 +7907,7 @@ msgid "Hide channel"
msgstr ""
#: xbmc/epg/EpgInfoTag.cpp
+#: xbmc/pvr/windows/GUIWindowPVRBase.cpp
msgctxt "#19055"
msgid "No information available"
msgstr ""
@@ -7908,6 +7959,7 @@ msgctxt "#19066"
msgid "Channel icons"
msgstr ""
+#: xbmc/pvr/dialogs/GUIDialogPVRGuideInfo.cpp
msgctxt "#19067"
msgid "This event is already being recorded."
msgstr ""
@@ -8083,6 +8135,7 @@ msgctxt "#19108"
msgid "Framerate {fallback}"
msgstr ""
+#: xbmc/pvr/timers/PVRTimers.cpp
msgctxt "#19109"
msgid "Couldn't save timer.[CR]Check the log for more information about this message."
msgstr ""
@@ -8091,6 +8144,7 @@ msgctxt "#19110"
msgid "An unexpected error occurred.[CR]Try again later or check the log for more information."
msgstr ""
+#: xbmc/pvr/addons/PVRClients.cpp
msgctxt "#19111"
msgid "PVR backend error.[CR]Check the log for more information about this message."
msgstr ""
@@ -8308,6 +8362,7 @@ msgctxt "#19163"
msgid "Recordings"
msgstr ""
+#: xbmc/pvr/PVRManager.cpp
msgctxt "#19164"
msgid "Can't start recording.[CR]Check the log for more information about this message."
msgstr ""
@@ -8445,10 +8500,12 @@ msgctxt "#19191"
msgid "PVR service"
msgstr ""
+#: xbmc/pvr/addons/PVRClients.cpp
msgctxt "#19192"
msgid "None of the connected PVR backends supports scanning for channels."
msgstr ""
+#: xbmc/pvr/addons/PVRClients.cpp
msgctxt "#19193"
msgid "The channel scan can't be started.[CR]Check the log for more information about this message."
msgstr ""
@@ -8540,6 +8597,7 @@ msgctxt "#19214"
msgid "Enter a valid URL for the new channel"
msgstr ""
+#: xbmc/pvr/timers/PVRTimers.cpp
msgctxt "#19215"
msgid "The PVR backend does not support timers."
msgstr ""
@@ -8751,10 +8809,12 @@ msgctxt "#19263"
msgid "Locked channel. Enter PIN:"
msgstr ""
+#: xbmc/pvr/PVRManager.cpp
msgctxt "#19264"
msgid "Incorrect PIN"
msgstr ""
+#: xbmc/pvr/PVRManager.cpp
msgctxt "#19265"
msgid "The entered PIN number was incorrect."
msgstr ""
@@ -9834,6 +9894,7 @@ msgctxt "#20098"
msgid "Fetching information for album"
msgstr ""
+#: xbmc/music/windows/GUIWindowMusicBase.cpp
msgctxt "#20099"
msgid "A CD or track can't be ripped while being played"
msgstr ""
@@ -10252,6 +10313,7 @@ msgid "Change information provider"
msgstr ""
#: system/settings/settings.xml
+#: xbmc/music/MusicDatabase.cpp
msgctxt "#20196"
msgid "Export music library"
msgstr ""
@@ -10265,6 +10327,7 @@ msgctxt "#20198"
msgid "No artist found!"
msgstr ""
+#: xbmc/music/windows/GUIWindowMusicBase.cpp
msgctxt "#20199"
msgid "Downloading artist information failed"
msgstr ""
@@ -10562,6 +10625,7 @@ msgctxt "#20348"
msgid "Directors"
msgstr ""
+#: xbmc/video/windows/GUIWindowVideoBase.cpp
msgctxt "#20349"
msgid "No video files found in this path!"
msgstr ""
@@ -11010,10 +11074,12 @@ msgctxt "#20447"
msgid "Ignore and refresh from Internet?"
msgstr ""
+#: xbmc/video/VideoInfoScanner.cpp
msgctxt "#20448"
msgid "Couldn't download information"
msgstr ""
+#: xbmc/video/VideoInfoScanner.cpp
msgctxt "#20449"
msgid "Unable to connect to remote server"
msgstr ""
@@ -11960,6 +12026,7 @@ msgid "Discography"
msgstr ""
#: xbmc/dialogs/GUIDialogMediaFilter.cpp
+#: xbmc/music/windows/GUIWindowMusicBase.cpp
msgctxt "#21889"
msgid "Searching artist"
msgstr ""
@@ -12277,6 +12344,7 @@ msgstr ""
#empty strings from id 23105 to 23999
#strings 24000 thru 24299 reserved for the Add-ons framework
+#: xbmc/addons/GUIDialogAddonSettings.cpp
#: xbmc/addons/GUIViewStateAddonBrowser.cpp
msgctxt "#24000"
msgid "Add-on"
@@ -12422,6 +12490,7 @@ msgctxt "#24029"
msgid "Service for weather information"
msgstr ""
+#: xbmc/addons/GUIDialogAddonSettings.cpp
msgctxt "#24030"
msgid "This add-on can't be configured"
msgstr ""
@@ -12441,6 +12510,7 @@ msgctxt "#24033"
msgid "Install from repository"
msgstr ""
+#: xbmc/addons/GUIViewStateAddonBrowser.cpp
msgctxt "#24034"
msgid "Check for updates"
msgstr ""
@@ -12728,7 +12798,17 @@ msgctxt "#24091"
msgid "This add-on can't be disabled"
msgstr ""
-#empty strings from id 24092 to 24093
+#. Used as title of the progress dialog when checking for add-on updates in add-on browser
+#: xbmc/addons/AddonInstaller.cpp
+msgctxt "#24092"
+msgid "Checking for add-on updates"
+msgstr ""
+
+#. Used as a text in the progress dialog when checking for add-on updates. %s contains repository name
+#: xbmc/addons/Repository.cpp
+msgctxt "#24093"
+msgid "Checking %s..."
+msgstr ""
#: xbmc/addons/guidialogaddoninfo.cpp
msgctxt "#24094"
@@ -13421,22 +13501,26 @@ msgstr ""
#empty strings from id 33085 to 33099
#: xbmc/network/network.cpp
+#: xbmc/network/NetworkServices.cpp
msgctxt "#33100"
msgid "Failed to start"
msgstr ""
#: xbmc/network/network.cpp
+#: xbmc/network/NetworkServices.cpp
#: system/settings/settings.xml
msgctxt "#33101"
msgid "Web server"
msgstr ""
#: xbmc/network/network.cpp
+#: xbmc/network/NetworkServices.cpp
msgctxt "#33102"
msgid "Event server"
msgstr ""
#: xbmc/network/network.cpp
+#: xbmc/network/NetworkServices.cpp
msgctxt "#33103"
msgid "Remote communication server"
msgstr ""
diff --git a/configure.ac b/configure.ac
index cf1821216d..1c97b6d71e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,10 +64,10 @@ AC_DEFUN([XB_FIND_SONAME],
fi
elif [[ "$host_vendor" != "apple" ]]; then
AC_MSG_CHECKING([for lib$2 soname])
- $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS $4 -l$2 -Wl,-M 2>/dev/null | grep "^LOAD.*$2" | awk '{V=2; print $V}')
+ $1_FILENAME=$($CC -nostdlib -o /dev/null $CFLAGS $LDFLAGS $4 -l$2 -Wl,-M 2>/dev/null | grep "^LOAD.*$2" | awk '{V=2; print $V}')
if [[ -z $$1_FILENAME ]]; then
#try gold linker syntax
- $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS $4 -l$2 -Wl,-t 3>&1 1>&2 2>&3 | grep "lib$2")
+ $1_FILENAME=$($CC -nostdlib -o /dev/null $CFLAGS $LDFLAGS $4 -l$2 -Wl,-t 3>&1 1>&2 2>&3 | grep "lib$2")
fi
if [[ ! -z $$1_FILENAME ]]; then
$1_SONAME=$($OBJDUMP -p $$1_FILENAME | grep "SONAME.*$2" | awk '{V=2; print $V}')
@@ -725,12 +725,16 @@ case $host in
esac
AC_SUBST([ARCH])
-check_sdl_arch=[`file $NATIVE_ROOT/lib/libSDL_image.dylib | awk '{print $NF}'`]
-if test "x$check_sdl_arch" = "xi386" ; then
- DARWIN_NATIVE_ARCH=-m32
-elif test "x$check_sdl_arch" = "xx86_64" ; then
- DARWIN_NATIVE_ARCH=-m64
-fi
+case $host in
+ *-apple-darwin*)
+ check_sdl_arch=[`file $NATIVE_ROOT/lib/libSDL_image.dylib | awk '{print $NF}'`]
+ if test "x$check_sdl_arch" = "xi386" ; then
+ DARWIN_NATIVE_ARCH=-m32
+ elif test "x$check_sdl_arch" = "xx86_64" ; then
+ DARWIN_NATIVE_ARCH=-m64
+ fi
+ ;;
+esac
AC_SUBST([DARWIN_NATIVE_ARCH])
if test "$target_platform" = "target_android" ; then
diff --git a/system/keymaps/touchscreen.xml b/system/keymaps/touchscreen.xml
index bd47a89c7d..576fb273bd 100644
--- a/system/keymaps/touchscreen.xml
+++ b/system/keymaps/touchscreen.xml
@@ -43,4 +43,13 @@
<swipe direction="right">Highlight</swipe>
</touch>
</MyFiles>
+ <ScreenCalibration>
+ <touch>
+ <swipe direction="up">Up</swipe>
+ <swipe direction="down">Down</swipe>
+ <swipe direction="right">Right</swipe>
+ <swipe direction="left">Left</swipe>
+ <tap pointers="1">NextCalibration</tap>
+ </touch>
+ </ScreenCalibration>
</keymap>
diff --git a/xbmc/addons/AddonInstaller.cpp b/xbmc/addons/AddonInstaller.cpp
index 290d491a40..7266557d3e 100644
--- a/xbmc/addons/AddonInstaller.cpp
+++ b/xbmc/addons/AddonInstaller.cpp
@@ -39,6 +39,7 @@
#include "dialogs/GUIDialogKaiToast.h"
#include "dialogs/GUIDialogOK.h"
#include "dialogs/GUIDialogProgress.h"
+#include "dialogs/GUIDialogExtendedProgressBar.h"
#include "URL.h"
#include <functional>
@@ -57,7 +58,7 @@ struct find_map : public binary_function<CAddonInstaller::JobMap::value_type, un
};
CAddonInstaller::CAddonInstaller()
- : m_repoUpdateJob(0)
+ : m_repoUpdateJob(nullptr)
{ }
CAddonInstaller::~CAddonInstaller()
@@ -79,7 +80,7 @@ void CAddonInstaller::OnJobComplete(unsigned int jobID, bool success, CJob* job)
{
// repo job finished
m_repoUpdateDone.Set();
- m_repoUpdateJob = 0;
+ m_repoUpdateJob = nullptr;
lock.Leave();
}
else
@@ -280,16 +281,6 @@ bool CAddonInstaller::InstallFromZip(const std::string &path)
return false;
}
-void CAddonInstaller::InstallFromXBMCRepo(const set<std::string> &addonIDs)
-{
- // first check we have the our repositories up to date (and wait until we do)
- UpdateRepos(false, true);
-
- // now install the addons
- for (set<std::string>::const_iterator i = addonIDs.begin(); i != addonIDs.end(); ++i)
- Install(*i);
-}
-
bool CAddonInstaller::CheckDependencies(const AddonPtr &addon, CAddonDatabase *database /* = NULL */)
{
std::vector<std::string> preDeps;
@@ -366,11 +357,19 @@ CDateTime CAddonInstaller::LastRepoUpdate() const
return update;
}
-void CAddonInstaller::UpdateRepos(bool force, bool wait)
+void CAddonInstaller::UpdateRepos(bool force /*= false*/, bool wait /*= false*/, bool showProgress /*= false*/)
{
CSingleLock lock(m_critSection);
- if (m_repoUpdateJob)
+ if (m_repoUpdateJob != nullptr)
{
+ //Hook up dialog to running job
+ if (showProgress && !m_repoUpdateJob->HasProgressIndicator())
+ {
+ auto* dialog = static_cast<CGUIDialogExtendedProgressBar*>(g_windowManager.GetWindow(WINDOW_DIALOG_EXT_PROGRESS));
+ if (dialog)
+ m_repoUpdateJob->SetProgressIndicators(dialog->GetHandle(g_localizeStrings.Get(24092)), nullptr);
+ }
+
if (wait)
{
// wait for our job to complete
@@ -404,7 +403,15 @@ void CAddonInstaller::UpdateRepos(bool force, bool wait)
|| repo->Version() != database.GetRepoVersion(repo->ID()))
{
CLog::Log(LOGDEBUG, "Checking repositories for updates (triggered by %s)", repo->Name().c_str());
- m_repoUpdateJob = CJobManager::GetInstance().AddJob(new CRepositoryUpdateJob(addons), this);
+
+ m_repoUpdateJob = new CRepositoryUpdateJob(addons);
+ if (showProgress)
+ {
+ auto* dialog = static_cast<CGUIDialogExtendedProgressBar*>(g_windowManager.GetWindow(WINDOW_DIALOG_EXT_PROGRESS));
+ if (dialog)
+ m_repoUpdateJob->SetProgressIndicators(dialog->GetHandle(g_localizeStrings.Get(24092)), nullptr);
+ }
+ CJobManager::GetInstance().AddJob(m_repoUpdateJob, this);
if (wait)
{
// wait for our job to complete
diff --git a/xbmc/addons/AddonInstaller.h b/xbmc/addons/AddonInstaller.h
index ede0e5c8ca..82b8ea0923 100644
--- a/xbmc/addons/AddonInstaller.h
+++ b/xbmc/addons/AddonInstaller.h
@@ -21,6 +21,7 @@
#include "utils/FileOperationJob.h"
#include "addons/Addon.h"
+#include "addons/Repository.h"
#include "utils/Stopwatch.h"
#include "threads/Event.h"
@@ -70,11 +71,6 @@ public:
*/
bool InstallFromZip(const std::string &path);
- /*! \brief Install a set of addons from the official repository (if needed)
- \param addonIDs a set of addon IDs to install
- */
- void InstallFromXBMCRepo(const std::set<std::string> &addonIDs);
-
/*! \brief Check whether dependencies of an addon exist or are installable.
Iterates through the addon's dependencies, checking they're installed or installable.
Each dependency must also satisfies CheckDependencies in turn.
@@ -102,7 +98,7 @@ public:
\return the last time a repository was updated.
*/
CDateTime LastRepoUpdate() const;
- void UpdateRepos(bool force = false, bool wait = false);
+ void UpdateRepos(bool force = false, bool wait = false, bool showProgress = false);
void OnJobComplete(unsigned int jobID, bool success, CJob* job);
void OnJobProgress(unsigned int jobID, unsigned int progress, unsigned int total, const CJob *job);
@@ -154,7 +150,7 @@ private:
CCriticalSection m_critSection;
JobMap m_downloadJobs;
CStopWatch m_repoUpdateWatch; ///< repository updates are done based on this counter
- unsigned int m_repoUpdateJob; ///< the job ID of the repository updates
+ ADDON::CRepositoryUpdateJob* m_repoUpdateJob;
CEvent m_repoUpdateDone; ///< event set when the repository updates are complete
};
diff --git a/xbmc/addons/AddonManager.cpp b/xbmc/addons/AddonManager.cpp
index 3f53ad567f..ba4bd7ee43 100644
--- a/xbmc/addons/AddonManager.cpp
+++ b/xbmc/addons/AddonManager.cpp
@@ -787,11 +787,10 @@ std::string CAddonMgr::GetTranslatedString(const cp_cfg_element_t *root, const c
{
// see if we have a "lang" attribute
const char *lang = m_cpluff->lookup_cfg_value((cp_cfg_element_t*)&child, "@lang");
- if (lang != NULL &&
- (g_langInfo.GetLocale().Matches(lang) || strcmp(lang, "en") == 0))
+ if (lang != NULL && g_langInfo.GetLocale().Matches(lang))
translatedValues.insert(std::make_pair(lang, child.value != NULL ? child.value : ""));
- else if (lang == NULL)
- translatedValues.insert(std::make_pair("en", child.value != NULL ? child.value : ""));
+ else if (lang == NULL || strcmp(lang, "en") == 0 || strcmp(lang, "en_GB") == 0)
+ translatedValues.insert(std::make_pair("en_GB", child.value != NULL ? child.value : ""));
}
}
@@ -803,7 +802,7 @@ std::string CAddonMgr::GetTranslatedString(const cp_cfg_element_t *root, const c
// find the language from the list that matches the current locale best
std::string matchingLanguage = g_langInfo.GetLocale().FindBestMatch(languages);
if (matchingLanguage.empty())
- matchingLanguage = "en";
+ matchingLanguage = "en_GB";
auto const& translatedValue = translatedValues.find(matchingLanguage);
if (translatedValue != translatedValues.end())
diff --git a/xbmc/addons/GUIWindowAddonBrowser.cpp b/xbmc/addons/GUIWindowAddonBrowser.cpp
index 7991871ec2..1fcb9f4265 100644
--- a/xbmc/addons/GUIWindowAddonBrowser.cpp
+++ b/xbmc/addons/GUIWindowAddonBrowser.cpp
@@ -125,7 +125,7 @@ bool CGUIWindowAddonBrowser::OnMessage(CGUIMessage& message)
}
else if (iControl == CONTROL_CHECK_FOR_UPDATES)
{
- CAddonInstaller::Get().UpdateRepos(true);
+ CAddonInstaller::Get().UpdateRepos(true, false, true);
return true;
}
else if (m_viewControl.HasControl(iControl)) // list/thumb control
@@ -225,13 +225,6 @@ class UpdateAddons : public IRunnable
}
};
-class UpdateRepos : public IRunnable
-{
- virtual void Run()
- {
- CAddonInstaller::Get().UpdateRepos(true, true);
- }
-};
bool CGUIWindowAddonBrowser::OnClick(int iItem)
{
@@ -247,14 +240,6 @@ bool CGUIWindowAddonBrowser::OnClick(int iItem)
CAddonInstaller::Get().InstallFromZip(path);
return true;
}
- else if (item->GetPath() == "addons://check/")
- {
- // perform the check for updates
- UpdateRepos updater;
- if (CGUIDialogBusy::Wait(&updater))
- Refresh();
- return true;
- }
if (item->GetPath() == "addons://update_all/")
{
// fire off a threaded update of all addons
diff --git a/xbmc/addons/Repository.cpp b/xbmc/addons/Repository.cpp
index de08385ced..9a20089dc9 100644
--- a/xbmc/addons/Repository.cpp
+++ b/xbmc/addons/Repository.cpp
@@ -18,6 +18,7 @@
*
*/
+#include <iterator>
#include "Repository.h"
#include "addons/AddonDatabase.h"
#include "addons/AddonInstaller.h"
@@ -225,8 +226,6 @@ bool CRepositoryUpdateJob::DoWork()
map<string, AddonPtr> addons;
for (VECADDONS::const_iterator i = m_repos.begin(); i != m_repos.end(); ++i)
{
- if (ShouldCancel(0, 0))
- return false;
const RepositoryPtr repo = std::dynamic_pointer_cast<CRepository>(*i);
VECADDONS newAddons;
if (GrabAddons(repo, newAddons))
@@ -305,6 +304,7 @@ bool CRepositoryUpdateJob::DoWork()
}
database.CommitMultipleExecute();
textureDB.CommitMultipleExecute();
+ MarkFinished();
if (!notifications.empty() && CSettings::Get().GetBool("general.addonnotifications"))
{
if (notifications.size() == 1)
@@ -322,6 +322,12 @@ bool CRepositoryUpdateJob::DoWork()
bool CRepositoryUpdateJob::GrabAddons(const RepositoryPtr& repo, VECADDONS& addons)
{
+ SetText(StringUtils::Format(g_localizeStrings.Get(24093).c_str(), repo->Name().c_str()));
+ const unsigned int total = repo->m_dirs.size() * 2;
+
+ if (ShouldCancel(0, total))
+ return false;
+
CAddonDatabase database;
database.Open();
string oldReposum;
@@ -331,7 +337,7 @@ bool CRepositoryUpdateJob::GrabAddons(const RepositoryPtr& repo, VECADDONS& addo
string reposum;
for (CRepository::DirList::const_iterator it = repo->m_dirs.begin(); it != repo->m_dirs.end(); ++it)
{
- if (ShouldCancel(0, 0))
+ if (ShouldCancel(std::distance(repo->m_dirs.cbegin(), it), total))
return false;
if (!it->checksum.empty())
{
@@ -350,7 +356,7 @@ bool CRepositoryUpdateJob::GrabAddons(const RepositoryPtr& repo, VECADDONS& addo
map<string, AddonPtr> uniqueAddons;
for (CRepository::DirList::const_iterator it = repo->m_dirs.begin(); it != repo->m_dirs.end(); ++it)
{
- if (ShouldCancel(0, 0))
+ if (ShouldCancel(repo->m_dirs.size() + std::distance(repo->m_dirs.cbegin(), it), total))
return false;
VECADDONS addons;
if (!CRepository::Parse(*it, addons))
@@ -382,6 +388,7 @@ bool CRepositoryUpdateJob::GrabAddons(const RepositoryPtr& repo, VECADDONS& addo
database.GetRepository(repo->ID(), addons);
database.SetRepoTimestamp(repo->ID(), CDateTime::GetCurrentDateTime().GetAsDBDateTime(), repo->Version());
}
+ SetProgress(total, total);
return true;
}
diff --git a/xbmc/addons/Repository.h b/xbmc/addons/Repository.h
index a3ec1f4059..a879db61d7 100644
--- a/xbmc/addons/Repository.h
+++ b/xbmc/addons/Repository.h
@@ -21,6 +21,7 @@
#include "Addon.h"
#include "utils/Job.h"
+#include "utils/ProgressJob.h"
namespace ADDON
{
@@ -64,7 +65,7 @@ namespace ADDON
CRepository(const CRepository &rhs);
};
- class CRepositoryUpdateJob : public CJob
+ class CRepositoryUpdateJob : public CProgressJob
{
public:
CRepositoryUpdateJob(const VECADDONS& repos);
diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
index 48c3e7b6f2..a8add39774 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
@@ -1206,7 +1206,7 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts)
// don't wait when going ff
if (m_speed > DVD_PLAYSPEED_NORMAL)
maxWaitTime = 0;
- int buffer = g_renderManager.WaitForBuffer(m_bStop, std::max(DVD_TIME_TO_MSEC(iSleepTime) + 500, 10));
+ int buffer = g_renderManager.WaitForBuffer(m_bStop, maxWaitTime);
if (buffer < 0)
{
m_droppingStats.AddOutputDropGain(pts, 1/m_fFrameRate);
diff --git a/xbmc/dialogs/GUIDialogExtendedProgressBar.cpp b/xbmc/dialogs/GUIDialogExtendedProgressBar.cpp
index 7a39fa9a32..7c3e13f57a 100644
--- a/xbmc/dialogs/GUIDialogExtendedProgressBar.cpp
+++ b/xbmc/dialogs/GUIDialogExtendedProgressBar.cpp
@@ -18,6 +18,7 @@
*
*/
+#include <cmath>
#include "GUIDialogExtendedProgressBar.h"
#include "guilib/GUIProgressControl.h"
#include "guilib/GUISliderControl.h"
@@ -53,11 +54,9 @@ void CGUIDialogProgressBarHandle::SetTitle(const string &strTitle)
void CGUIDialogProgressBarHandle::SetProgress(int currentItem, int itemCount)
{
- float fPercentage = (float)((currentItem*100)/itemCount);
- if (fPercentage > 100.0F)
- fPercentage = 100.0F;
-
- m_fPercentage = fPercentage;
+ float fPercentage = (currentItem*100.0f)/itemCount;
+ if (!std::isnan(fPercentage))
+ m_fPercentage = std::min(100.0f, fPercentage);
}
CGUIDialogExtendedProgressBar::CGUIDialogExtendedProgressBar(void)
diff --git a/xbmc/guilib/LocalizeStrings.cpp b/xbmc/guilib/LocalizeStrings.cpp
index 4f04a02c26..cad1ba1e35 100644
--- a/xbmc/guilib/LocalizeStrings.cpp
+++ b/xbmc/guilib/LocalizeStrings.cpp
@@ -64,13 +64,13 @@ bool CLocalizeStrings::LoadSkinStrings(const std::string& path, const std::strin
std::string encoding;
if (!LoadStr2Mem(path, language, encoding))
{
- if (StringUtils::EqualsNoCase(language, ADDON_LANGUAGE_DEFAULT)) // no fallback, nothing to do
+ if (StringUtils::EqualsNoCase(language, LANGUAGE_DEFAULT)) // no fallback, nothing to do
return false;
}
// load the fallback
- if (!StringUtils::EqualsNoCase(language, ADDON_LANGUAGE_DEFAULT))
- LoadStr2Mem(path, ADDON_LANGUAGE_DEFAULT, encoding);
+ if (!StringUtils::EqualsNoCase(language, LANGUAGE_DEFAULT))
+ LoadStr2Mem(path, LANGUAGE_DEFAULT, encoding);
return true;
}
@@ -100,7 +100,7 @@ bool CLocalizeStrings::LoadStr2Mem(const std::string &pathname_in, const std::st
}
if (LoadPO(URIUtils::AddFileToFolder(pathname, "strings.po"), encoding, offset,
- StringUtils::EqualsNoCase(language, CORE_LANGUAGE_DEFAULT) || StringUtils::EqualsNoCase(language, ADDON_LANGUAGE_DEFAULT)))
+ StringUtils::EqualsNoCase(language, LANGUAGE_DEFAULT) || StringUtils::EqualsNoCase(language, LANGUAGE_OLD_DEFAULT)))
return true;
CLog::Log(LOGDEBUG, "LocalizeStrings: no strings.po file exist at %s, fallback to strings.xml",
@@ -198,7 +198,7 @@ bool CLocalizeStrings::LoadXML(const std::string &filename, std::string &encodin
bool CLocalizeStrings::Load(const std::string& strPathName, const std::string& strLanguage)
{
- bool bLoadFallback = !StringUtils::EqualsNoCase(strLanguage, CORE_LANGUAGE_DEFAULT);
+ bool bLoadFallback = !StringUtils::EqualsNoCase(strLanguage, LANGUAGE_DEFAULT);
std::string encoding;
CSingleLock lock(m_critSection);
@@ -207,14 +207,14 @@ bool CLocalizeStrings::Load(const std::string& strPathName, const std::string& s
if (!LoadStr2Mem(strPathName, strLanguage, encoding))
{
// try loading the fallback
- if (!bLoadFallback || !LoadStr2Mem(strPathName, CORE_LANGUAGE_DEFAULT, encoding))
+ if (!bLoadFallback || !LoadStr2Mem(strPathName, LANGUAGE_DEFAULT, encoding))
return false;
bLoadFallback = false;
}
if (bLoadFallback)
- LoadStr2Mem(strPathName, CORE_LANGUAGE_DEFAULT, encoding);
+ LoadStr2Mem(strPathName, LANGUAGE_DEFAULT, encoding);
// fill in the constant strings
m_strings[20022].strTranslated = "";
diff --git a/xbmc/guilib/LocalizeStrings.h b/xbmc/guilib/LocalizeStrings.h
index 9d1c90c94a..ddea1e82a5 100644
--- a/xbmc/guilib/LocalizeStrings.h
+++ b/xbmc/guilib/LocalizeStrings.h
@@ -46,8 +46,8 @@ struct LocStr
};
// The default fallback language is fixed to be English
-const std::string CORE_LANGUAGE_DEFAULT = "resource.language.en_gb";
-const std::string ADDON_LANGUAGE_DEFAULT = "English";
+const std::string LANGUAGE_DEFAULT = "resource.language.en_gb";
+const std::string LANGUAGE_OLD_DEFAULT = "English";
class CLocalizeStrings
{
diff --git a/xbmc/settings/windows/GUIWindowSettingsScreenCalibration.cpp b/xbmc/settings/windows/GUIWindowSettingsScreenCalibration.cpp
index d8e22cbb26..cc4dab8954 100644
--- a/xbmc/settings/windows/GUIWindowSettingsScreenCalibration.cpp
+++ b/xbmc/settings/windows/GUIWindowSettingsScreenCalibration.cpp
@@ -99,7 +99,24 @@ bool CGUIWindowSettingsScreenCalibration::OnAction(const CAction &action)
return true;
}
break;
+ // ignore all gesture meta actions
+ case ACTION_GESTURE_BEGIN:
+ case ACTION_GESTURE_END:
+ case ACTION_GESTURE_NOTIFY:
+ case ACTION_GESTURE_PAN:
+ case ACTION_GESTURE_ROTATE:
+ case ACTION_GESTURE_ZOOM:
+ return true;
}
+
+ // if we see a mouse move event without dx and dy (amount2 and amount3) these
+ // are the focus actions which are generated on touch events and those should
+ // be eaten/ignored here. Else we will switch to the screencalibration controls
+ // which are at that x/y value on each touch/tap/swipe which makes the whole window
+ // unusable for touch screens
+ if (action.GetID() == ACTION_MOUSE_MOVE && action.GetAmount(2) == 0 && action.GetAmount(3) == 0)
+ return true;
+
return CGUIWindow::OnAction(action); // base class to handle basic movement etc.
}
@@ -191,6 +208,13 @@ bool CGUIWindowSettingsScreenCalibration::OnMessage(CGUIMessage& message)
}
}
break;
+ // send before touch for requesting gesture features - we don't want this
+ // it would result in unfocus in the onmessage below ...
+ case GUI_MSG_GESTURE_NOTIFY:
+ // send after touch for unfocussing - we don't want this in this window!
+ case GUI_MSG_UNFOCUS_ALL:
+ return true;
+ break;
}
return CGUIWindow::OnMessage(message);
}
diff --git a/xbmc/utils/ProgressJob.cpp b/xbmc/utils/ProgressJob.cpp
index bd84b5cd86..3a69eafb18 100644
--- a/xbmc/utils/ProgressJob.cpp
+++ b/xbmc/utils/ProgressJob.cpp
@@ -55,13 +55,10 @@ CProgressJob::~CProgressJob()
bool CProgressJob::ShouldCancel(unsigned int progress, unsigned int total) const
{
- if (m_progressDialog != NULL)
- {
- if (IsCancelled())
- return true;
+ if (IsCancelled())
+ return true;
- SetProgress(progress, total);
- }
+ SetProgress(progress, total);
return CJob::ShouldCancel(progress, total);
}
@@ -195,3 +192,8 @@ bool CProgressJob::IsCancelled() const
return false;
}
+
+bool CProgressJob::HasProgressIndicator() const
+{
+ return m_progress != nullptr || m_progressDialog != nullptr;
+}
diff --git a/xbmc/utils/ProgressJob.h b/xbmc/utils/ProgressJob.h
index ff813c037c..6f7d46dfa5 100644
--- a/xbmc/utils/ProgressJob.h
+++ b/xbmc/utils/ProgressJob.h
@@ -59,6 +59,8 @@ public:
*/
void SetProgressIndicators(CGUIDialogProgressBarHandle* progressBar, CGUIDialogProgress* progressDialog, bool updateProgress = true, bool updateInformation = true);
+ bool HasProgressIndicator() const;
+
protected:
CProgressJob();
CProgressJob(CGUIDialogProgressBarHandle* progressBar);
diff --git a/xbmc/utils/Weather.cpp b/xbmc/utils/Weather.cpp
index 02f401aad5..16953c82fb 100644
--- a/xbmc/utils/Weather.cpp
+++ b/xbmc/utils/Weather.cpp
@@ -162,7 +162,7 @@ void CWeatherJob::FormatTemperature(std::string &text, int temp)
void CWeatherJob::LoadLocalizedToken()
{
// We load the english strings in to get our tokens
- std::string language = CORE_LANGUAGE_DEFAULT;
+ std::string language = LANGUAGE_DEFAULT;
CSettingString* languageSetting = static_cast<CSettingString*>(CSettings::Get().GetSetting("locale.language"));
if (languageSetting != NULL)
language = languageSetting->GetDefault();