Skip to content

Commit

Permalink
[tvOS] Add setting to choose between Kodi or tvOS keyboard + settings…
Browse files Browse the repository at this point in the history
… from yab branch
  • Loading branch information
sy6sy2 committed May 19, 2019
1 parent b5af9e6 commit d1ee710
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 55 deletions.
56 changes: 55 additions & 1 deletion addons/resource.language.en_gb/resources/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -15527,7 +15527,61 @@ msgctxt "#24152"
msgid "The add-on is not compatible with this version of Kodi."
msgstr ""

#empty strings from id 24153 to 24990
#: apple remote
msgctxt "#24153"
msgid "Enable to make the Siri remote match the normal Apple tvOS behavior"
msgstr ""

#: apple remote
msgctxt "#24154"
msgid "Idle remote handling after N seconds"
msgstr ""

#: apple remote
msgctxt "#24155"
msgid "After remote idles, the first tap/swipe received will wake it"
msgstr ""

#: apple remote
msgctxt "#24156"
msgid "30 Seconds"
msgstr ""

#: apple remote
msgctxt "#24157"
msgid "60 Seconds"
msgstr ""

#: apple remote
msgctxt "#24158"
msgid "90 Seconds"
msgstr ""

#: apple remote
msgctxt "#24159"
msgid "120 Seconds"
msgstr ""

#: apple remote
msgctxt "#24160"
msgid "Enable Siri remote timeout"
msgstr ""

#: apple remote
msgctxt "#24161"
msgid "Enable remote input timeout for tap/swipe"
msgstr ""

msgctxt "#24162"
msgid "Use Kodi virtual keyboard"
msgstr ""

#: apple remote
msgctxt "#24163"
msgid "Match Apple tvOS Standard (Siri remote)"
msgstr ""

#empty strings from id 24164 to 24990

#. Used as error message in add-on browser when add-on repository data could not be downloaded
#: xbmc/filesystem/AddonsDirectory.cpp
Expand Down
115 changes: 62 additions & 53 deletions system/settings/darwin_tvos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,63 +8,72 @@
<default></default>
</setting>
<setting id="screensaver.usemusicvisinstead">
<default>false</default>
<default>false</default>
</setting>
<setting id="screensaver.usedimonpause">
<default>false</default>
<default>false</default>
</setting>
</group>
</category>
<category id="masterlock">
<visible>false</visible>
<visible>false</visible>
</category>
<category id="control">
<group id="1">
<setting id="input.peripherals">
<visible>false</visible>
</setting>
</group>
<group id="2">
<setting id="input.enablemouse">
<default>false</default>
<visible>false</visible>
</setting>
<setting id="input.controllerconfig">
<visible>false</visible>
</setting>
<setting id="input.appleremotemode">
<visible>false</visible>
</setting>
<setting id="input.appleremotesequencetime">
<visible>false</visible>
</setting>
<setting id="input.applesiri" type="boolean" label="24152" help="24153">
<level>1</level>
<default>false</default>
<control type="toggle" />
</setting>
<setting id="input.applesiritimeoutenabled" type="boolean" label="24160" help="24161">
<level>1</level>
<default>true</default>
<control type="toggle" />
</setting>
<setting id="input.applesiritimeout" type="integer" label="24154" help="24155">
<level>1</level>
<default>60</default>
<constraints>
<options>
<option label="24156">30</option>
<option label="24157">60</option>
<option label="24158">90</option>
<option label="24159">120</option>
</options>
</constraints>
<control type="list" format="integer" />
<dependencies>
<dependency type="enable" setting="input.applesiritimeoutenabled">true</dependency>
</dependencies>
</setting>
</group>
</section>
<section id="system">
<category id="input">
<group id="1">
<setting id="input.peripherals">
<visible>false</visible>
</setting>
</group>
<group id="2">
<setting id="input.enablemouse">
<default>false</default>
<visible>false</visible>
</setting>
<setting id="input.controllerconfig">
<visible>false</visible>
</setting>
</group>
<group id="3">
<setting id="input.appleremotemode">
<visible>false</visible>
</setting>
<setting id="input.appleremotesequencetime">
<visible>false</visible>
</setting>
<setting id="input.applesiri" type="boolean" label="24163" help="24153">
<level>1</level>
<default>false</default>
<control type="toggle" />
</setting>
<setting id="input.applesiritimeoutenabled" type="boolean" label="24160" help="24161">
<level>1</level>
<default>true</default>
<control type="toggle" />
</setting>
<setting id="input.applesiritimeout" type="integer" label="24154" help="24155">
<level>1</level>
<default>60</default>
<constraints>
<options>
<option label="24156">30</option>
<option label="24157">60</option>
<option label="24158">90</option>
<option label="24159">120</option>
</options>
</constraints>
<control type="list" format="integer" />
<dependencies>
<dependency type="enable" setting="input.applesiritimeoutenabled">true</dependency>
</dependencies>
</setting>
<setting id="input.appleusekodikeyboard" type="boolean" label="24162">
<level>1</level>
<default>false</default>
<control type="toggle" />
</setting>
</group>
</category>
</section>
<section id="player">
Expand Down Expand Up @@ -118,9 +127,9 @@
</group>
</category>
<category id="powermanagement">
<group id="1">
<visible>false</visible>
</group>
<group id="1">
<visible>false</visible>
</group>
</category>
</section>
</settings>
13 changes: 12 additions & 1 deletion xbmc/guilib/GUIKeyboardFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,18 @@ bool CGUIKeyboardFactory::ShowAndGetInput(std::string& aTextString, CVariant hea
headingStr = g_localizeStrings.Get((uint32_t)heading.asInteger());

#if defined(TARGET_DARWIN_EMBEDDED)
kb = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogKeyboardTouch>(WINDOW_DIALOG_KEYBOARD_TOUCH);
bool use_kodi_keyboard = false;
#if defined(TARGET_DARWIN_TVOS)
use_kodi_keyboard = CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_INPUT_APPLEUSEKODIKEYBOARD);
#endif
if(use_kodi_keyboard)
{
kb = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogKeyboardGeneric>(WINDOW_DIALOG_KEYBOARD);
}
else
{
kb = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogKeyboardTouch>(WINDOW_DIALOG_KEYBOARD_TOUCH);
}
#else
kb = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogKeyboardGeneric>(WINDOW_DIALOG_KEYBOARD);
#endif
Expand Down
1 change: 1 addition & 0 deletions xbmc/settings/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ const std::string CSettings::SETTING_INPUT_APPLEREMOTESEQUENCETIME = "input.appl
const std::string CSettings::SETTING_INPUT_APPLESIRI = "input.applesiri";
const std::string CSettings::SETTING_INPUT_APPLESIRITIMEOUT = "input.applesiritimeout";
const std::string CSettings::SETTING_INPUT_APPLESIRITIMEOUTENABLED = "input.applesiritimeoutenabled";
const std::string CSettings::SETTING_INPUT_APPLEUSEKODIKEYBOARD = "input.appleusekodikeyboard";
const std::string CSettings::SETTING_NETWORK_USEHTTPPROXY = "network.usehttpproxy";
const std::string CSettings::SETTING_NETWORK_HTTPPROXYTYPE = "network.httpproxytype";
const std::string CSettings::SETTING_NETWORK_HTTPPROXYSERVER = "network.httpproxyserver";
Expand Down
1 change: 1 addition & 0 deletions xbmc/settings/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ class CSettings : public CSettingsBase, public CSettingCreator, public CSettingC
static const std::string SETTING_INPUT_APPLESIRI;
static const std::string SETTING_INPUT_APPLESIRITIMEOUT;
static const std::string SETTING_INPUT_APPLESIRITIMEOUTENABLED;
static const std::string SETTING_INPUT_APPLEUSEKODIKEYBOARD;
static const std::string SETTING_NETWORK_USEHTTPPROXY;
static const std::string SETTING_NETWORK_HTTPPROXYTYPE;
static const std::string SETTING_NETWORK_HTTPPROXYSERVER;
Expand Down

0 comments on commit d1ee710

Please sign in to comment.