Skip to content

Commit

Permalink
Merge pull request xbmc#22001 from ksooo/favourites-window
Browse files Browse the repository at this point in the history
[favourites][estuary] Add Favourites window.
  • Loading branch information
ksooo committed Oct 13, 2022
2 parents 7a923e4 + 100f85f commit 58e6ecb
Show file tree
Hide file tree
Showing 37 changed files with 815 additions and 307 deletions.
97 changes: 87 additions & 10 deletions addons/resource.language.en_gb/resources/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,8 @@ msgctxt "#117"
msgid "Delete"
msgstr ""

#: xbmc/dialogs/GUIDialogFavourites.cpp
#: xbmc/favourites/ContextMenus.h
#: xbmc/favourites/GUIDialogFavourites.cpp
#: xbmc/pvr/PVRContextMenus.cpp
#: xbmc/windows/GUIWindowFileManager.cpp
#: xbmc/games/dialogs/osd/DialogGameSaves.cpp
Expand Down Expand Up @@ -4049,7 +4050,7 @@ msgctxt "#1029"
msgid "Enter the new label"
msgstr ""

#: xbmc/dialogs/GUIDialogFavourites.cpp
#: xbmc/favourites/GUIWindowFavourites.cpp
#: xbmc/music/dialogs/GUIDialogMusicInfo.cpp
msgctxt "#1030"
msgid "Browse for image"
Expand All @@ -4076,6 +4077,8 @@ msgctxt "#1035"
msgid "Enable submenu buttons"
msgstr ""

#: xbmc/addons/Skin.cpp
#: addons/skin.estuary/xml/MyFavourites.xml
msgctxt "#1036"
msgid "Favourites"
msgstr ""
Expand Down Expand Up @@ -5152,7 +5155,14 @@ msgctxt "#10058"
msgid "Remove tag from library"
msgstr ""

#empty strings from id 10059 to 10098
#empty string with id 10059

#: xbmc/guilib/WindowIDs.h
msgctxt "#10060"
msgid "Favourites"
msgstr ""

#empty strings from id 10061 to 10098

#: xbmc/guilib/WindowIDs.h
msgctxt "#10099"
Expand Down Expand Up @@ -6850,12 +6860,14 @@ msgctxt "#13331"
msgid "Error: Out of memory"
msgstr ""

#: xbmc/dialogs/GUIDialogFavourites.cpp
#: xbmc/favourites/ContextMenus.h
#: xbmc/favourites/GUIDialogFavourites.cpp
msgctxt "#13332"
msgid "Move up"
msgstr ""

#: xbmc/dialogs/GUIDialogFavourites.cpp
#: xbmc/favourites/ContextMenus.h
#: xbmc/favourites/GUIDialogFavourites.cpp
msgctxt "#13333"
msgid "Move down"
msgstr ""
Expand Down Expand Up @@ -8594,7 +8606,8 @@ msgctxt "#15014"
msgid "Keep"
msgstr ""

#: xbmc/dialogs/GUIDialogFavourites.cpp
#: xbmc/favourites/ContextMenus.h
#: xbmc/favourites/GUIDialogFavourites.cpp
#: xbmc/video/VideoDatabase.cpp
msgctxt "#15015"
msgid "Remove"
Expand Down Expand Up @@ -8745,7 +8758,62 @@ msgctxt "#15216"
msgid "Play in party mode"
msgstr ""

#empty strings from id 15217 to 15299
#. Label for actions associated with favourites
#: addons/skin.estuary/xml/Variables.xml
msgctxt "#15217"
msgid "Action"
msgstr ""

#. Label for an action associated with a favourite.
#: xbmc/Util.cpp
msgctxt "#15218"
msgid "Play media"
msgstr ""

#. Label for an action associated with a favourite
#: xbmc/Util.cpp
msgctxt "#15219"
msgid "Show picture"
msgstr ""

#. Label for an action associated with a favourite. Placeholder will be filled with the name of the window the favourite's content will be displayed in.
#: xbmc/favourites/FavouritesService.cpp
#: xbmc/Util.cpp
msgctxt "#15220"
msgid "Show content in \"{}\""
msgstr ""

#. Label for an action associated with a favourite
#: xbmc/Util.cpp
msgctxt "#15221"
msgid "Execute script"
msgstr ""

#. Label for an action associated with a favourite
#: xbmc/Util.cpp
msgctxt "#15222"
msgid "Execute Android app"
msgstr ""

#. Label for an action associated with a favourite
#: xbmc/Util.cpp
msgctxt "#15223"
msgid "Execute add-on"
msgstr ""

#. Label for an action associated with a favourite
#: xbmc/Util.cpp
msgctxt "#15224"
msgid "Other / Unknown"
msgstr ""

#. genric label for 'provider'
#: addons/skin.estuary/xml/Variables.xml
msgctxt "#15225"
msgid "Provider"
msgstr ""

#empty strings from id 15225 to 15299

#: xbmc/windows/GUIMediaWindow.cpp
#: xbmc/windows/GUIWindowFileManager.cpp
Expand Down Expand Up @@ -8826,7 +8894,7 @@ msgstr ""

#empty strings from id 16005 to 16007

#: xbmc/dialogs/GUIDialogFavourites.cpp
#: xbmc/favourites/GUIWindowFavourites.cpp
msgctxt "#16008"
msgid "Enter new title"
msgstr ""
Expand Down Expand Up @@ -11462,7 +11530,13 @@ msgctxt "#19348"
msgid "Provider"
msgstr ""

#empty strings from id 19349 to 19498
#. label for 'by user preference' sort method
#: xbmc/utils/SortUtils.cpp
msgctxt "#19349"
msgid "User preference"
msgstr ""

#empty strings from id 19350 to 19498

#. label for epg genre value
#: xbmc/pvr/epg/Epg.cpp
Expand Down Expand Up @@ -12171,6 +12245,7 @@ msgid "Remote thumb"
msgstr ""

#: xbmc/dialogs/GUIDialogContextMenu.cpp
#: xbmc/favourites/GUIWindowFavourites.cpp
#: xbmc/music/dialogs/GUIDialogMusicInfo.cpp
msgctxt "#20016"
msgid "Current thumb"
Expand All @@ -12184,13 +12259,15 @@ msgid "Local thumb"
msgstr ""

#: xbmc/dialogs/GUIDialogContextMenu.cpp
#: xbmc/favourites/GUIWindowFavourites.cpp
#: xbmc/music/dialogs/GUIDialogMusicInfo.cpp
msgctxt "#20018"
msgid "No thumb"
msgstr ""

#: xbmc/dialogs/GUIDialogContextMenu.cpp
#: xbmc/dialogs/GUIDialogFavourites.cpp
#: xbmc/favourites/ContextMenus.h
#: xbmc/favourites/GUIDialogFavourites.cpp
msgctxt "#20019"
msgid "Choose thumbnail"
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion addons/skin.estuary/xml/Home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@
</item>
<item>
<label>$LOCALIZE[10134]</label>
<onclick>ActivateWindow(favourites)</onclick>
<onclick>ActivateWindow(favouritesbrowser)</onclick>
<property name="menu_id">$NUMBER[14000]</property>
<thumb>icons/sidemenu/favourites.png</thumb>
<property name="id">favorites</property>
Expand Down
41 changes: 41 additions & 0 deletions addons/skin.estuary/xml/MyFavourites.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<window>
<defaultcontrol always="true">500</defaultcontrol>
<backgroundcolor>background</backgroundcolor>
<views>50,52,53,55,500</views>
<menucontrol>9000</menucontrol>
<controls>
<include>DefaultBackground</include>
<control type="group">
<animation effect="fade" start="100" end="0" time="200" tween="sine" condition="$EXP[infodialog_active]">Conditional</animation>
<include>View_50_List</include>
<include>View_52_IconWall</include>
<include>View_53_Shift</include>
<include>View_55_WideList</include>
<include>View_500_Wall</include>
<control type="group">
<depth>DepthContentPanel</depth>
<include>OpenClose_Left</include>
<include>Visible_Left</include>
<visible>Control.IsVisible(55)</visible>
<include>ListThumbInfoPanel</include>
</control>
<include content="TopBar">
<param name="breadcrumbs_label" value="$LOCALIZE[1036]" />
</include>
<include content="BottomBar">
<param name="info_visible" value="true" />
</include>
<include>CommonScrollbars</include>
<include>MediaMenuMouseOverlay</include>
<control type="group">
<include>MediaMenuCommon</include>
<control type="grouplist" id="9000">
<top>50</top>
<include>MediaMenuListCommon</include>
<include>MediaMenuNowPlaying</include>
</control>
</control>
</control>
</controls>
</window>
3 changes: 3 additions & 0 deletions addons/skin.estuary/xml/Variables.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<value condition="String.IsEqual(ListItem.DbType,episode) + System.Setting(hideunwatchedepisodethumbs) + Integer.IsEqual(ListItem.Playcount,0) + !String.IsEmpty(Listitem.Art(fanart))">$INFO[Listitem.Art(fanart)]</value>
<value condition="String.IsEqual(ListItem.DbType,episode) + System.Setting(hideunwatchedepisodethumbs) + Integer.IsEqual(ListItem.Playcount,0) + String.IsEmpty(Listitem.Art(fanart))">OverlaySpoiler.png</value>
<value condition="String.IsEqual(ListItem.DbType,episode) + [ !System.Setting(hideunwatchedepisodethumbs) | Integer.IsGreater(ListItem.Playcount,0) ]">$INFO[Listitem.Art(thumb)]</value>
<value condition="Container.Content(favourites) + String.IsEmpty(Listitem.Art(thumb))">DefaultFavourites.png</value>
<value>$INFO[ListItem.Art(thumb)]</value>
</variable>
<variable name="MusicInfoThumbVar">
Expand Down Expand Up @@ -100,6 +101,7 @@
<value condition="String.IsEqual(listitem.dbtype,artist)">$INFO[ListItem.Genre,[COLOR button_focus]$LOCALIZE[515]: [/COLOR],[CR]]$INFO[ListItem.Property(Artist_YearsActive),[COLOR button_focus]$LOCALIZE[21898]: [/COLOR],[CR]]$INFO[ListItem.Property(Artist_Style),[COLOR button_focus]$LOCALIZE[736]: [/COLOR],[CR]]</value>
<value condition="String.IsEqual(listitem.dbtype,album)">$INFO[ListItem.Year,[COLOR button_focus]$LOCALIZE[345]: [/COLOR],[CR]]$INFO[ListItem.Genre,[COLOR button_focus]$LOCALIZE[515]: [/COLOR],[CR]]$INFO[ListItem.Property(album_label),[COLOR button_focus]$LOCALIZE[21899]: [/COLOR],[CR]]$INFO[ListItem.Property(album_style),[COLOR button_focus]$LOCALIZE[736]: [/COLOR],[CR]]</value>
<value condition="String.IsEqual(Listitem.DBType,season) | String.IsEqual(Listitem.DBType,tvshow)">$INFO[ListItem.Genre,[COLOR button_focus]$LOCALIZE[515]: [/COLOR],[CR]]$INFO[ListItem.Premiered,[COLOR button_focus]$LOCALIZE[20416]: [/COLOR]]</value>
<value condition="Container.Content(favourites)">$INFO[ListItem.Property(favourite.action),[COLOR button_focus]$LOCALIZE[15217]: [/COLOR],[CR]]$INFO[ListItem.Property(favourite.provider),[COLOR button_focus]$LOCALIZE[15225]: [/COLOR],[CR]]</value>
<value>$INFO[ListItem.Genre,[COLOR button_focus]$LOCALIZE[515]: [/COLOR],[CR]]$INFO[ListItem.Director,[COLOR button_focus]$LOCALIZE[20339]: [/COLOR],[CR]]$INFO[ListItem.Writer,[COLOR button_focus]$LOCALIZE[20417]: [/COLOR],[CR]]$INFO[ListItem.Premiered,[COLOR button_focus]$LOCALIZE[20416]: [/COLOR]]</value>
</variable>
<variable name="ShiftRightTextBoxVar">
Expand Down Expand Up @@ -137,6 +139,7 @@
<value condition="!String.IsEmpty(ListItem.Plot)">$INFO[ListItem.Plot]</value>
<value condition="String.IsEqual(ListItem.DBType,song) + !Window.IsActive(musicplaylist)">$VAR[MusicTrackInfo,[COLOR button_focus]$LOCALIZE[554]: [/COLOR],[CR]]$INFO[ListItem.Artist,[COLOR button_focus]$LOCALIZE[557]: [/COLOR],[CR]]$INFO[listitem.Album,[COLOR button_focus]$LOCALIZE[558]: [/COLOR],[CR]]$VAR[InfoDiscVar,[COLOR button_focus]$LOCALIZE[427]: [/COLOR],[CR]]$INFO[ListItem.Year,[COLOR button_focus]$LOCALIZE[345]: [/COLOR],[CR]]$INFO[ListItem.Genre,[COLOR button_focus]$LOCALIZE[515]: [/COLOR],[CR]]$INFO[ListItem.Duration,[COLOR button_focus]$LOCALIZE[180]: [/COLOR],[CR]]$INFO[ListItem.Playcount,[COLOR button_focus]$LOCALIZE[567]: [/COLOR],[CR]]$INFO[ListItem.LastPlayed,[COLOR button_focus]$LOCALIZE[568]: [/COLOR],]</value>
<value condition="String.IsEqual(ListItem.DBType,song) + Window.IsActive(musicplaylist)">[COLOR button_focus][B]$LOCALIZE[31037]: [/COLOR]$INFO[Container.CurrentItem,,/]$INFO[Container.NumItems][/B][CR]$VAR[MusicTrackInfo,[COLOR button_focus]$LOCALIZE[554]: [/COLOR],[CR]]$INFO[ListItem.Artist,[COLOR button_focus]$LOCALIZE[557]: [/COLOR],[CR]]$INFO[listitem.Album,[COLOR button_focus]$LOCALIZE[558]: [/COLOR],[CR]]$VAR[InfoDiscVar,[COLOR button_focus]$LOCALIZE[427]: [/COLOR],[CR]]$INFO[ListItem.Year,[COLOR button_focus]$LOCALIZE[345]: [/COLOR],[CR]]$INFO[ListItem.Genre,[COLOR button_focus]$LOCALIZE[515]: [/COLOR],[CR]]$INFO[ListItem.Duration,[COLOR button_focus]$LOCALIZE[180]: [/COLOR],[CR]]$INFO[ListItem.Playcount,[COLOR button_focus]$LOCALIZE[567]: [/COLOR]]</value>
<value condition="Container.Content(favourites)">$INFO[ListItem.Property(favourite.action),[COLOR button_focus]$LOCALIZE[15217]: [/COLOR],[CR]]$INFO[ListItem.Property(favourite.provider),[COLOR button_focus]$LOCALIZE[15225]: [/COLOR],[CR]]</value>
<value>$INFO[ListItem.Genre,[COLOR button_focus]$LOCALIZE[515]: [/COLOR],[CR]]</value>
</variable>
<variable name="NowPlayingInfoVar">
Expand Down
26 changes: 23 additions & 3 deletions addons/skin.estuary/xml/View_500_Wall.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<preloaditems>2</preloaditems>
<pagecontrol>531</pagecontrol>
<scrolltime tween="cubic" easing="out">500</scrolltime>
<visible>Container.Content(movies) | Container.Content(sets) | Container.Content(tvshows) | Container.Content(seasons) | Container.Content(episodes) | Container.Content(artists) | Container.Content(albums) | Container.Content(musicvideos) | Container.Content(addons) | Container.Content(images) | Container.Content(videos) | Container.Content(games)</visible>
<visible>Container.Content(movies) | Container.Content(sets) | Container.Content(tvshows) | Container.Content(seasons) | Container.Content(episodes) | Container.Content(artists) | Container.Content(albums) | Container.Content(musicvideos) | Container.Content(addons) | Container.Content(images) | Container.Content(videos) | Container.Content(games) | Container.Content(favourites)</visible>
<itemlayout height="445" width="300" condition="Container.Content(movies) | Container.Content(sets) | Container.Content(tvshows) | Container.Content(seasons) | [Container.Content(musicvideos) + Skin.HasSetting(show_musicvideoposter)]">
<control type="group">
<top>120</top>
Expand Down Expand Up @@ -111,14 +111,34 @@
<control type="group">
<depth>DepthContentPopout</depth>
<top>150</top>
<animation effect="zoom" start="100" end="110" time="200" tween="sine" easing="inout" center="150,350">Focus</animation>
<animation effect="zoom" start="110" end="100" time="200" tween="sine" easing="inout" center="150,350">UnFocus</animation>
<animation effect="zoom" start="100" end="110" time="200" tween="sine" easing="inout" center="160,350">Focus</animation>
<animation effect="zoom" start="110" end="100" time="200" tween="sine" easing="inout" center="160,350">UnFocus</animation>
<include content="InfoWallMusicLayout">
<param name="fallback_image" value="DefaultAddon.png" />
<param name="focused" value="true" />
</include>
</control>
</focusedlayout>
<itemlayout height="401" width="300" condition="Container.Content(favourites)">
<control type="group">
<top>150</top>
<include content="InfoWallMusicLayout">
<param name="fallback_image" value="DefaultFavourites.png" />
</include>
</control>
</itemlayout>
<focusedlayout height="401" width="300" condition="Container.Content(favourites)">
<control type="group">
<depth>DepthContentPopout</depth>
<top>150</top>
<animation effect="zoom" start="100" end="110" time="200" tween="sine" easing="inout" center="160,350">Focus</animation>
<animation effect="zoom" start="110" end="100" time="200" tween="sine" easing="inout" center="160,350">UnFocus</animation>
<include content="InfoWallMusicLayout">
<param name="fallback_image" value="DefaultFavourites.png" />
<param name="focused" value="true" />
</include>
</control>
</focusedlayout>
</control>
</control>
</include>
Expand Down
2 changes: 1 addition & 1 deletion addons/skin.estuary/xml/View_52_IconWall.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<onup>52</onup>
<ondown>52</ondown>
<scrolltime tween="cubic" easing="out">500</scrolltime>
<visible>Container.Content() | Container.Content(files) | Container.Content(tags) | Container.Content(years) | Container.Content(roles) | Container.Content(sources) | Container.Content(genres) | Container.Content(countries) | Container.Content(studios) | Container.Content(playlists) | Container.Content(unknown)</visible>
<visible>Container.Content() | Container.Content(files) | Container.Content(tags) | Container.Content(years) | Container.Content(roles) | Container.Content(sources) | Container.Content(genres) | Container.Content(countries) | Container.Content(studios) | Container.Content(playlists) | Container.Content(favourites) | Container.Content(unknown)</visible>
<viewtype label="31099">icon</viewtype>
<itemlayout height="280" width="440" condition="Container.Content() | Container.Content(files) | Container.Content(tags) | Container.Content(playlists) | [Container.Content(studios) + System.AddonIsEnabled(resource.images.studios.white)]">
<control type="group">
Expand Down
2 changes: 1 addition & 1 deletion addons/skin.estuary/xml/View_53_Shift.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<pagecontrol>5199</pagecontrol>
<scrolltime tween="cubic" easing="out">500</scrolltime>
<orientation>horizontal</orientation>
<visible>Container.Content(movies) | Container.Content(sets) | Container.Content(tvshows) | Container.Content(seasons) | Container.Content(musicvideos) | Container.Content(artists) | Container.Content(albums) | Container.Content(mixed) | Container.Content(images) | Container.Content(videos) | Container.Content(games)</visible>
<visible>Container.Content(movies) | Container.Content(sets) | Container.Content(tvshows) | Container.Content(seasons) | Container.Content(musicvideos) | Container.Content(artists) | Container.Content(albums) | Container.Content(mixed) | Container.Content(images) | Container.Content(videos) | Container.Content(games) | Container.Content(favourites)</visible>
<onleft>53</onleft>
<onup>9000</onup>
<ondown>5199</ondown>
Expand Down
8 changes: 4 additions & 4 deletions addons/skin.estuary/xml/View_55_WideList.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<shadowcolor>text_shadow</shadowcolor>
</control>
</itemlayout>
<focusedlayout height="list_item_height" condition="!Container.Content(songs) + !Container.Content(addons) + !Container.Content(playlists) + !Container.Content() + !Container.Content(tvshows) + !Container.Content(seasons) + !Container.Content(episodes) + !Container.Content(movies) + !Container.Content(musicvideos) + !Container.Content(videos)">
<focusedlayout height="list_item_height" condition="!Container.Content(songs) + !Container.Content(addons) + !Container.Content(playlists) + !Container.Content() + !Container.Content(tvshows) + !Container.Content(seasons) + !Container.Content(episodes) + !Container.Content(movies) + !Container.Content(musicvideos) + !Container.Content(videos)+ !Container.Content(favourites)">
<control type="image">
<left>0</left>
<right>0</right>
Expand Down Expand Up @@ -122,7 +122,7 @@
<shadowcolor>text_shadow</shadowcolor>
</control>
</focusedlayout>
<itemlayout height="list_item_height" condition="!Container.Content(songs) + !Container.Content(addons) + !Container.Content(playlists) + !Container.Content() + !Container.Content(tvshows) + !Container.Content(seasons) + !Container.Content(episodes) + !Container.Content(movies) + !Container.Content(musicvideos) + !Container.Content(videos)">
<itemlayout height="list_item_height" condition="!Container.Content(songs) + !Container.Content(addons) + !Container.Content(playlists) + !Container.Content() + !Container.Content(tvshows) + !Container.Content(seasons) + !Container.Content(episodes) + !Container.Content(movies) + !Container.Content(musicvideos) + !Container.Content(videos) + !Container.Content(favourites)">
<control type="image">
<left>35</left>
<centertop>50%</centertop>
Expand Down Expand Up @@ -150,7 +150,7 @@
<shadowcolor>text_shadow</shadowcolor>
</control>
</itemlayout>
<focusedlayout height="list_item_height" condition="Container.Content(playlists) | Container.Content()">
<focusedlayout height="list_item_height" condition="Container.Content(playlists) | Container.Content(favourites) | Container.Content()">
<control type="image">
<left>0</left>
<right>0</right>
Expand All @@ -177,7 +177,7 @@
<shadowcolor>text_shadow</shadowcolor>
</control>
</focusedlayout>
<itemlayout height="list_item_height" condition="Container.Content(playlists) | Container.Content()">
<itemlayout height="list_item_height" condition="Container.Content(playlists) | Container.Content(favourites) | Container.Content()">
<control type="image">
<left>20</left>
<top>10</top>
Expand Down
6 changes: 4 additions & 2 deletions xbmc/ContextMenuManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ void CContextMenuManager::Init()
std::make_shared<CONTEXTMENU::CRemoveResumePoint>(),
std::make_shared<CONTEXTMENU::CEjectDisk>(),
std::make_shared<CONTEXTMENU::CEjectDrive>(),
std::make_shared<CONTEXTMENU::CRemoveFavourite>(),
std::make_shared<CONTEXTMENU::CRenameFavourite>(),
std::make_shared<CONTEXTMENU::CMoveUpFavourite>(),
std::make_shared<CONTEXTMENU::CMoveDownFavourite>(),
std::make_shared<CONTEXTMENU::CChooseThumbnailForFavourite>(),
std::make_shared<CONTEXTMENU::CRenameFavourite>(),
std::make_shared<CONTEXTMENU::CRemoveFavourite>(),
std::make_shared<CONTEXTMENU::CAddRemoveFavourite>(),
};

Expand Down
Loading

0 comments on commit 58e6ecb

Please sign in to comment.