Skip to content

Commit

Permalink
video: move "Stack" toggle to settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Montellese committed Aug 2, 2013
1 parent 5bf2a98 commit 8848f57
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 24 deletions.
6 changes: 0 additions & 6 deletions addons/skin.confluence/720p/MyVideoNav.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,6 @@
<include>ButtonCommonValues</include>
<label>137</label>
</control>
<control type="radiobutton" id="7">
<description>Stack Toggle</description>
<textwidth>170</textwidth>
<include>ButtonCommonValues</include>
<label>346</label>
</control>
<control type="radiobutton" id="17">
<description>Flatten</description>
<textwidth>170</textwidth>
Expand Down
7 changes: 5 additions & 2 deletions language/English/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -9976,7 +9976,10 @@ msgctxt "#20434"
msgid "Sets"
msgstr ""

#empty string with id 20435
#: system/settings/settings.xml
msgctxt "#20435"
msgid "Combine split video items"
msgstr ""

msgctxt "#20436"
msgid "Export actor thumbs?"
Expand Down Expand Up @@ -12967,7 +12970,7 @@ msgstr ""

#: system/settings/settings.xml
msgctxt "#36182"
msgid "No info available yet."
msgid "Enables direct playback of videos that are in folders, without having to open those folders first, as well as displaying multi-part video files as single items in non-library views."
msgstr ""

#: system/settings/settings.xml
Expand Down
4 changes: 2 additions & 2 deletions system/settings/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,8 @@
<level>4</level>
<default>100024</default> <!-- WINDOW_VIDEO_FILES -->
</setting>
<setting id="myvideos.stackvideos" type="boolean" label="0" help="36182">
<level>4</level>
<setting id="myvideos.stackvideos" type="boolean" label="20435" help="36182">
<level>1</level>
<default>false</default>
</setting>
<setting id="myvideos.flatten" type="boolean" label="0" help="36183">
Expand Down
17 changes: 3 additions & 14 deletions xbmc/video/windows/GUIWindowVideoBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ using namespace PVR;
#define CONTROL_LABELFILES 12

#define CONTROL_PLAY_DVD 6
#define CONTROL_STACK 7
#define CONTROL_BTNSCAN 8

#define PROPERTY_GROUP_BY "group.by"
Expand Down Expand Up @@ -156,21 +155,15 @@ bool CGUIWindowVideoBase::OnMessage(CGUIMessage& message)
case GUI_MSG_CLICKED:
{
int iControl = message.GetSenderId();
if (iControl == CONTROL_STACK)
{
CSettings::Get().ToggleBool("myvideos.stackvideos");
CSettings::Get().Save();
UpdateButtons();
Update( m_vecItems->GetPath() );
}
#if defined(HAS_DVD_DRIVE)
else if (iControl == CONTROL_PLAY_DVD)
if (iControl == CONTROL_PLAY_DVD)
{
// play movie...
MEDIA_DETECT::CAutorun::PlayDiscAskResume(g_mediaManager.TranslateDevicePath(""));
}
else
#endif
else if (iControl == CONTROL_BTNTYPE)
if (iControl == CONTROL_BTNTYPE)
{
CGUIMessage msg(GUI_MSG_ITEM_SELECTED, GetID(), CONTROL_BTNTYPE);
g_windowManager.SendMessage(msg);
Expand Down Expand Up @@ -271,10 +264,6 @@ void CGUIWindowVideoBase::UpdateButtons()
CONTROL_SELECT_ITEM(CONTROL_BTNTYPE, nWindow);

CONTROL_ENABLE(CONTROL_BTNSCAN);

SET_CONTROL_LABEL(CONTROL_STACK, 14000); // Stack
SET_CONTROL_SELECTED(GetID(), CONTROL_STACK, CSettings::Get().GetBool("myvideos.stackvideos"));
CONTROL_ENABLE_ON_CONDITION(CONTROL_STACK, m_stackingAvailable);

CGUIMediaWindow::UpdateButtons();
}
Expand Down

0 comments on commit 8848f57

Please sign in to comment.