Merge pull request #2022 from ronie/skin-startup
authorArne Morten Kvarving <spiff@xbmc.org>
Sat, 6 Apr 2013 11:11:08 +0000 (04:11 -0700)
committerArne Morten Kvarving <spiff@xbmc.org>
Sat, 6 Apr 2013 11:11:08 +0000 (04:11 -0700)
Always load Startup.xml

1  2 
xbmc/GUIInfoManager.cpp
xbmc/GUIInfoManager.h
xbmc/addons/Skin.cpp
xbmc/addons/Skin.h

diff --combined xbmc/GUIInfoManager.cpp
@@@ -1,5 -1,5 +1,5 @@@
  /*
 - *      Copyright (C) 2005-2012 Team XBMC
 + *      Copyright (C) 2005-2013 Team XBMC
   *      http://www.xbmc.org
   *
   *  This Program is free software; you can redistribute it and/or modify
  #include "dialogs/GUIDialogProgress.h"
  #include "Application.h"
  #include "Util.h"
 -#include "network/libscrobbler/lastfmscrobbler.h"
  #include "utils/URIUtils.h"
  #include "utils/Weather.h"
  #include "PartyModeManager.h"
  #include "addons/Visualisation.h"
  #include "input/ButtonTranslator.h"
  #include "utils/AlarmClock.h"
 -#ifdef HAS_LCD
 -#include "utils/LCD.h"
 -#endif
  #include "LangInfo.h"
  #include "utils/SystemInfo.h"
  #include "guilib/GUITextBox.h"
  #include "pictures/GUIWindowSlideShow.h"
 -#include "music/LastFmManager.h"
  #include "pictures/PictureInfoTag.h"
  #include "music/tags/MusicInfoTag.h"
  #include "guilib/GUIWindowManager.h"
  #include "playlists/PlayList.h"
 +#include "profiles/ProfilesManager.h"
  #include "utils/TuxBoxUtil.h"
  #include "windowing/WindowingFactory.h"
  #include "powermanagement/PowerManager.h"
  #include "settings/AdvancedSettings.h"
 +#include "settings/DisplaySettings.h"
 +#include "settings/MediaSettings.h"
  #include "settings/Settings.h"
 +#include "settings/SkinSettings.h"
  #include "guilib/LocalizeStrings.h"
 +#include "utils/CharsetConverter.h"
  #include "utils/CPUInfo.h"
  #include "utils/StringUtils.h"
  #include "utils/MathUtils.h"
@@@ -79,7 -79,6 +79,7 @@@
  #include "video/VideoThumbLoader.h"
  #include "music/MusicThumbLoader.h"
  #include "video/VideoDatabase.h"
 +#include "cores/IPlayer.h"
  #include "cores/AudioEngine/Utils/AEUtil.h"
  
  #define SYSHEATUPDATEINTERVAL 60000
@@@ -189,6 -188,7 +189,6 @@@ const infomap player_labels[] =  {{ "ha
                                    { "hasduration",      PLAYER_HASDURATION },
                                    { "passthrough",      PLAYER_PASSTHROUGH },
                                    { "cachelevel",       PLAYER_CACHELEVEL },          // labels from here
 -                                  { "seekbar",          PLAYER_SEEKBAR },
                                    { "progress",         PLAYER_PROGRESS },
                                    { "progresscache",    PLAYER_PROGRESS_CACHE },
                                    { "volume",           PLAYER_VOLUME },
@@@ -275,7 -275,8 +275,8 @@@ const infomap system_labels[] =  {{ "ha
                                    { "alarmpos",         SYSTEM_ALARM_POS },
                                    { "isinhibit",        SYSTEM_ISINHIBIT },
                                    { "hasshutdown",      SYSTEM_HAS_SHUTDOWN },
-                                   { "haspvr",           SYSTEM_HAS_PVR }};
+                                   { "haspvr",           SYSTEM_HAS_PVR },
+                                   { "startupwindow",    SYSTEM_STARTUP_WINDOW }};
  
  const infomap system_param[] =   {{ "hasalarm",         SYSTEM_HAS_ALARM },
                                    { "hascoreid",        SYSTEM_HAS_CORE_ID },
                                    { "hasaddon",         SYSTEM_HAS_ADDON },
                                    { "coreusage",        SYSTEM_GET_CORE_USAGE }};
  
 -const infomap lcd_labels[] =     {{ "playicon",         LCD_PLAY_ICON },
 -                                  { "progressbar",      LCD_PROGRESS_BAR },
 -                                  { "cputemperature",   LCD_CPU_TEMPERATURE },
 -                                  { "gputemperature",   LCD_GPU_TEMPERATURE },
 -                                  { "hddtemperature",   LCD_HDD_TEMPERATURE },
 -                                  { "fanspeed",         LCD_FAN_SPEED },
 -                                  { "date",             LCD_DATE },
 -                                  { "time21",           LCD_TIME_21 },
 -                                  { "time22",           LCD_TIME_22 },
 -                                  { "timewide21",       LCD_TIME_W21 },
 -                                  { "timewide22",       LCD_TIME_W22 },
 -                                  { "time41",           LCD_TIME_41 },
 -                                  { "time42",           LCD_TIME_42 },
 -                                  { "time43",           LCD_TIME_43 },
 -                                  { "time44",           LCD_TIME_44 }};
 -
  const infomap network_labels[] = {{ "isdhcp",            NETWORK_IS_DHCP },
                                    { "ipaddress",         NETWORK_IP_ADDRESS }, //labels from here
                                    { "linkstate",         NETWORK_LINK_STATE },
@@@ -302,6 -319,16 +303,6 @@@ const infomap musicpartymode[] = {{ "en
                                    { "relaxedsongspicked",MUSICPM_RELAXEDSONGSPICKED },
                                    { "randomsongspicked", MUSICPM_RANDOMSONGSPICKED }};
  
 -const infomap audioscrobbler[] = {{ "enabled",           AUDIOSCROBBLER_ENABLED },
 -                                  { "connectstate",      AUDIOSCROBBLER_CONN_STATE }, //labels from here
 -                                  { "submitinterval",    AUDIOSCROBBLER_SUBMIT_INT },
 -                                  { "filescached",       AUDIOSCROBBLER_FILES_CACHED },
 -                                  { "submitstate",       AUDIOSCROBBLER_SUBMIT_STATE }};
 -
 -const infomap lastfm[] =         {{ "radioplaying",      LASTFM_RADIOPLAYING },
 -                                  { "canlove",           LASTFM_CANLOVE},
 -                                  { "canban",            LASTFM_CANBAN}};
 -
  const infomap musicplayer[] =    {{ "title",            MUSICPLAYER_TITLE },
                                    { "album",            MUSICPLAYER_ALBUM },
                                    { "artist",           MUSICPLAYER_ARTIST },
@@@ -351,7 -378,6 +352,7 @@@ const infomap videoplayer[] =    {{ "ti
                                    { "season",           VIDEOPLAYER_SEASON },
                                    { "rating",           VIDEOPLAYER_RATING },
                                    { "ratingandvotes",   VIDEOPLAYER_RATING_AND_VOTES },
 +                                  { "votes",            VIDEOPLAYER_VOTES },
                                    { "tvshowtitle",      VIDEOPLAYER_TVSHOW },
                                    { "premiered",        VIDEOPLAYER_PREMIERED },
                                    { "studio",           VIDEOPLAYER_STUDIO },
@@@ -448,7 -474,6 +449,7 @@@ const infomap listitem_labels[]= {{ "th
                                    { "size",             LISTITEM_SIZE },
                                    { "rating",           LISTITEM_RATING },
                                    { "ratingandvotes",   LISTITEM_RATING_AND_VOTES },
 +                                  { "votes",            LISTITEM_VOTES },
                                    { "programcount",     LISTITEM_PROGRAM_COUNT },
                                    { "duration",         LISTITEM_DURATION },
                                    { "isselected",       LISTITEM_ISSELECTED },
@@@ -781,6 -806,14 +782,6 @@@ int CGUIInfoManager::TranslateSingleStr
            return weather[i].val;
        }
      }
 -    else if (cat.name == "lcd")
 -    {
 -      for (size_t i = 0; i < sizeof(lcd_labels) / sizeof(infomap); i++)
 -      {
 -        if (prop.name == lcd_labels[i].str)
 -          return lcd_labels[i].val;
 -      }
 -    }
      else if (cat.name == "network")
      {
        for (size_t i = 0; i < sizeof(network_labels) / sizeof(infomap); i++)
            return musicpartymode[i].val;
        }
      }
 -    else if (cat.name == "audioscrobbler")
 -    {
 -      for (size_t i = 0; i < sizeof(audioscrobbler) / sizeof(infomap); i++)
 -      {
 -        if (prop.name == audioscrobbler[i].str)
 -          return audioscrobbler[i].val;
 -      }
 -    }
 -    else if (cat.name == "lastfm")
 -    {
 -      for (size_t i = 0; i < sizeof(lastfm) / sizeof(infomap); i++)
 -      {
 -        if (prop.name == lastfm[i].str)
 -          return lastfm[i].val;
 -      }
 -    }
      else if (cat.name == "system")
      {
        for (size_t i = 0; i < sizeof(system_labels) / sizeof(infomap); i++)
          if (prop.name == "string")
          {
            if (prop.num_params() == 2)
 -            return AddMultiInfo(GUIInfo(SKIN_STRING, g_settings.TranslateSkinString(prop.param(0)), ConditionalStringParameter(prop.param(1))));
 +            return AddMultiInfo(GUIInfo(SKIN_STRING, CSkinSettings::Get().TranslateString(prop.param(0)), ConditionalStringParameter(prop.param(1))));
            else
 -            return AddMultiInfo(GUIInfo(SKIN_STRING, g_settings.TranslateSkinString(prop.param(0))));
 +            return AddMultiInfo(GUIInfo(SKIN_STRING, CSkinSettings::Get().TranslateString(prop.param(0))));
          }
          if (prop.name == "hassetting")
 -          return AddMultiInfo(GUIInfo(SKIN_BOOL, g_settings.TranslateSkinBool(prop.param(0))));
 +          return AddMultiInfo(GUIInfo(SKIN_BOOL, CSkinSettings::Get().TranslateBool(prop.param(0))));
          else if (prop.name == "hastheme")
            return AddMultiInfo(GUIInfo(SKIN_HAS_THEME, ConditionalStringParameter(prop.param(0))));
        }
@@@ -1171,10 -1220,8 +1172,10 @@@ TIME_FORMAT CGUIInfoManager::TranslateT
    else if (format.Equals("hh:mm")) return TIME_FORMAT_HH_MM;
    else if (format.Equals("mm:ss")) return TIME_FORMAT_MM_SS;
    else if (format.Equals("hh:mm:ss")) return TIME_FORMAT_HH_MM_SS;
 +  else if (format.Equals("hh:mm:ss xx")) return TIME_FORMAT_HH_MM_SS_XX;
    else if (format.Equals("h")) return TIME_FORMAT_H;
    else if (format.Equals("h:mm:ss")) return TIME_FORMAT_H_MM_SS;
 +  else if (format.Equals("h:mm:ss xx")) return TIME_FORMAT_H_MM_SS_XX;
    else if (format.Equals("xx")) return TIME_FORMAT_XX;
    return TIME_FORMAT_GUESS;
  }
@@@ -1271,6 -1318,9 +1272,6 @@@ CStdString CGUIInfoManager::GetLabel(in
    case SYSTEM_DATE:
      strLabel = GetDate();
      break;
 -  case LCD_DATE:
 -    strLabel = GetDate(true);
 -    break;
    case SYSTEM_FPS:
      strLabel.Format("%02.2f", m_fps);
      break;
      strLabel.Format("%2.1f dB", CAEUtil::PercentToGain(g_settings.m_fVolumeLevel));
      break;
    case PLAYER_SUBTITLE_DELAY:
 -    strLabel.Format("%2.3f s", g_settings.m_currentVideoSettings.m_SubtitleDelay);
 +    strLabel.Format("%2.3f s", CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay);
      break;
    case PLAYER_AUDIO_DELAY:
 -    strLabel.Format("%2.3f s", g_settings.m_currentVideoSettings.m_AudioDelay);
 +    strLabel.Format("%2.3f s", CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay);
      break;
    case PLAYER_CHAPTER:
      if(g_application.IsPlaying() && g_application.m_pPlayer)
      break;
    case PLAYER_TITLE:
      {
 -      if (g_application.IsPlayingVideo())
 -        strLabel = GetLabel(VIDEOPLAYER_TITLE);
 +      if(m_currentFile)
 +      {
 +        if (m_currentFile->HasPVRChannelInfoTag())
 +        {
 +          CEpgInfoTag tag;
 +          return m_currentFile->GetPVRChannelInfoTag()->GetEPGNow(tag) ?
 +                   tag.Title() :
 +                   g_guiSettings.GetBool("epg.hidenoinfoavailable") ?
 +                     StringUtils::EmptyString :
 +                     g_localizeStrings.Get(19055); // no information available
 +        }
 +        if (m_currentFile->HasPVRRecordingInfoTag() && !m_currentFile->GetPVRRecordingInfoTag()->m_strTitle.IsEmpty())
 +          return m_currentFile->GetPVRRecordingInfoTag()->m_strTitle;
 +        if (m_currentFile->HasVideoInfoTag() && !m_currentFile->GetVideoInfoTag()->m_strTitle.IsEmpty())
 +          return m_currentFile->GetVideoInfoTag()->m_strTitle;
 +        if (m_currentFile->HasMusicInfoTag() && !m_currentFile->GetMusicInfoTag()->GetTitle().IsEmpty())
 +          return m_currentFile->GetMusicInfoTag()->GetTitle();
 +        // don't have the title, so use dvdplayer, label, or drop down to title from path
 +        if (g_application.m_pPlayer && !g_application.m_pPlayer->GetPlayingTitle().IsEmpty())
 +          return g_application.m_pPlayer->GetPlayingTitle();
 +        if (!m_currentFile->GetLabel().IsEmpty())
 +          return m_currentFile->GetLabel();
 +        return CUtil::GetTitleFromPath(m_currentFile->GetPath());
 +      }
        else
 -        strLabel = GetLabel(MUSICPLAYER_TITLE);
 +      {
 +        if (g_application.m_pPlayer && !g_application.m_pPlayer->GetPlayingTitle().IsEmpty())
 +          return g_application.m_pPlayer->GetPlayingTitle();
 +      }
      }
      break;
    case MUSICPLAYER_TITLE:
    break;
    case VIDEOPLAYER_VIDEO_CODEC:
      if(g_application.IsPlaying() && g_application.m_pPlayer)
 -      strLabel = g_application.m_pPlayer->GetVideoCodecName();
 +    {
 +      SPlayerVideoStreamInfo info;
 +      g_application.m_pPlayer->GetVideoStreamInfo(info);
 +      strLabel = info.videoCodecName;
 +    }
      break;
    case VIDEOPLAYER_VIDEO_RESOLUTION:
      if(g_application.IsPlaying() && g_application.m_pPlayer)
      break;
    case VIDEOPLAYER_AUDIO_CODEC:
      if(g_application.IsPlaying() && g_application.m_pPlayer)
 -      strLabel = g_application.m_pPlayer->GetAudioCodecName();
 +    {
 +      SPlayerAudioStreamInfo info;
 +      g_application.m_pPlayer->GetAudioStreamInfo(g_application.m_pPlayer->GetAudioStream(), info);
 +      strLabel = info.audioCodecName;
 +    }
      break;
    case VIDEOPLAYER_VIDEO_ASPECT:
      if (g_application.IsPlaying() && g_application.m_pPlayer)
      {
 -      float aspect;
 -      g_application.m_pPlayer->GetVideoAspectRatio(aspect);
 -      strLabel = CStreamDetails::VideoAspectToAspectDescription(aspect);
 +      SPlayerVideoStreamInfo info;
 +      g_application.m_pPlayer->GetVideoStreamInfo(info);
 +      strLabel = CStreamDetails::VideoAspectToAspectDescription(info.videoAspectRatio);
      }
      break;
    case VIDEOPLAYER_AUDIO_CHANNELS:
      if(g_application.IsPlaying() && g_application.m_pPlayer)
 -      strLabel.Format("%i", g_application.m_pPlayer->GetChannels());
 +    {
 +      SPlayerAudioStreamInfo info;
 +      g_application.m_pPlayer->GetAudioStreamInfo(g_application.m_pPlayer->GetAudioStream(), info);
 +      strLabel.Format("%i", info.channels);
 +    }
      break;
    case PLAYLIST_LENGTH:
    case PLAYLIST_POSITION:
    case SYSTEM_CPU_TEMPERATURE:
    case SYSTEM_GPU_TEMPERATURE:
    case SYSTEM_FAN_SPEED:
 -  case LCD_CPU_TEMPERATURE:
 -  case LCD_GPU_TEMPERATURE:
 -  case LCD_FAN_SPEED:
    case SYSTEM_CPU_USAGE:
      return GetSystemHeatInfo(info);
      break;
    case SYSTEM_SCREEN_RESOLUTION:
      if(g_Windowing.IsFullScreen())
        strLabel.Format("%ix%i@%.2fHz - %s (%02.2f fps)",
 -        g_settings.m_ResInfo[g_guiSettings.m_LookAndFeelResolution].iScreenWidth,
 -        g_settings.m_ResInfo[g_guiSettings.m_LookAndFeelResolution].iScreenHeight,
 -        g_settings.m_ResInfo[g_guiSettings.m_LookAndFeelResolution].fRefreshRate,
 +        CDisplaySettings::Get().GetCurrentResolutionInfo().iScreenWidth,
 +        CDisplaySettings::Get().GetCurrentResolutionInfo().iScreenHeight,
 +        CDisplaySettings::Get().GetCurrentResolutionInfo().fRefreshRate,
          g_localizeStrings.Get(244), GetFPS());
      else
        strLabel.Format("%ix%i - %s (%02.2f fps)",
 -        g_settings.m_ResInfo[g_guiSettings.m_LookAndFeelResolution].iScreenWidth,
 -        g_settings.m_ResInfo[g_guiSettings.m_LookAndFeelResolution].iScreenHeight,
 +        CDisplaySettings::Get().GetCurrentResolutionInfo().iScreenWidth,
 +        CDisplaySettings::Get().GetCurrentResolutionInfo().iScreenHeight,
          g_localizeStrings.Get(242), GetFPS());
      return strLabel;
      break;
      }
      break;
    case SYSTEM_SCREEN_MODE:
 -    strLabel = g_settings.m_ResInfo[g_graphicsContext.GetVideoResolution()].strMode;
 +    strLabel = CDisplaySettings::Get().GetResolutionInfo(g_graphicsContext.GetVideoResolution()).strMode;
      break;
    case SYSTEM_SCREEN_WIDTH:
 -    strLabel.Format("%i", g_settings.m_ResInfo[g_graphicsContext.GetVideoResolution()].iScreenWidth);
 +    strLabel.Format("%i", CDisplaySettings::Get().GetResolutionInfo(g_graphicsContext.GetVideoResolution()).iScreenWidth);
      break;
    case SYSTEM_SCREEN_HEIGHT:
 -    strLabel.Format("%i", g_settings.m_ResInfo[g_graphicsContext.GetVideoResolution()].iScreenHeight);
 +    strLabel.Format("%i", CDisplaySettings::Get().GetResolutionInfo(g_graphicsContext.GetVideoResolution()).iScreenHeight);
      break;
    case SYSTEM_CURRENT_WINDOW:
      return g_localizeStrings.Get(g_windowManager.GetFocusedWindow());
      break;
+   case SYSTEM_STARTUP_WINDOW:
+     strLabel.Format("%i", g_guiSettings.GetInt("lookandfeel.startupwindow"));
+     break;
    case SYSTEM_CURRENT_CONTROL:
      {
        CGUIWindow *window = g_windowManager.GetWindow(g_windowManager.GetFocusedWindow());
      }
      break;
    case SYSTEM_PROFILENAME:
 -    strLabel = g_settings.GetCurrentProfile().getName();
 +    strLabel = CProfilesManager::Get().GetCurrentProfile().getName();
      break;
    case SYSTEM_PROFILECOUNT:
 -    strLabel.Format("%i", g_settings.GetNumProfiles());
 +    strLabel.Format("%i", CProfilesManager::Get().GetNumberOfProfiles());
      break;
    case SYSTEM_LANGUAGE:
      strLabel = g_guiSettings.GetString("locale.language");
          strLabel = friendlyName;
      }
      break;
 -  case LCD_PLAY_ICON:
 -    {
 -      int iPlaySpeed = g_application.GetPlaySpeed();
 -      if (g_application.IsPaused())
 -        strLabel.Format("\7");
 -      else if (iPlaySpeed < 1)
 -        strLabel.Format("\3:%ix", iPlaySpeed);
 -      else if (iPlaySpeed > 1)
 -        strLabel.Format("\4:%ix", iPlaySpeed);
 -      else
 -        strLabel.Format("\5");
 -    }
 -    break;
 -
 -  case LCD_TIME_21:
 -  case LCD_TIME_22:
 -  case LCD_TIME_W21:
 -  case LCD_TIME_W22:
 -  case LCD_TIME_41:
 -  case LCD_TIME_42:
 -  case LCD_TIME_43:
 -  case LCD_TIME_44:
 -    //alternatively, set strLabel
 -    return GetLcdTime( info );
 -    break;
  
    case SKIN_THEME:
      strLabel = g_guiSettings.GetString("lookandfeel.skintheme");
      if (g_SkinInfo)
        strLabel = g_SkinInfo->GetCurrentAspect();
      break;
 -#ifdef HAS_LCD
 -  case LCD_PROGRESS_BAR:
 -    if (g_lcd && g_lcd->IsConnected()) strLabel = g_lcd->GetProgressBar(g_application.GetTime(), g_application.GetTotalTime());
 -    break;
 -#endif
    case NETWORK_IP_ADDRESS:
      {
        CNetworkInterface* iface = g_application.getNetwork().GetFirstConnectedInterface();
      }
      break;
  
 -  case AUDIOSCROBBLER_CONN_STATE:
 -  case AUDIOSCROBBLER_SUBMIT_INT:
 -  case AUDIOSCROBBLER_FILES_CACHED:
 -  case AUDIOSCROBBLER_SUBMIT_STATE:
 -    strLabel=GetAudioScrobblerLabel(info);
 -    break;
    case VISUALISATION_PRESET:
      {
        CGUIMessage msg(GUI_MSG_GET_VISUALISATION, 0, 0);
@@@ -2100,11 -2155,11 +2104,11 @@@ bool CGUIInfoManager::GetBool(int condi
      return GetMultiInfoBool(m_multiInfo[condition - MULTI_INFO_START], contextWindow, item);
    }
    else if (condition == SYSTEM_HASLOCKS)
 -    bReturn = g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE;
 +    bReturn = CProfilesManager::Get().GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE;
    else if (condition == SYSTEM_HAS_PVR)
      bReturn = true;
    else if (condition == SYSTEM_ISMASTER)
 -    bReturn = g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && g_passwordManager.bMasterUser;
 +    bReturn = CProfilesManager::Get().GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && g_passwordManager.bMasterUser;
    else if (condition == SYSTEM_ISFULLSCREEN)
      bReturn = g_Windowing.IsFullScreen();
    else if (condition == SYSTEM_ISSTANDALONE)
    else if (condition == SYSTEM_SHOW_EXIT_BUTTON)
      bReturn = g_advancedSettings.m_showExitButton;
    else if (condition == SYSTEM_HAS_LOGINSCREEN)
 -    bReturn = g_settings.UsingLoginScreen();
 +    bReturn = CProfilesManager::Get().UsingLoginScreen();
    else if (condition == WEATHER_IS_FETCHED)
      bReturn = g_weatherManager.IsFetched();
    else if (condition >= PVR_CONDITIONS_START && condition <= PVR_CONDITIONS_END)
      case MUSICPM_ENABLED:
        bReturn = g_partyModeManager.IsEnabled();
      break;
 -    case AUDIOSCROBBLER_ENABLED:
 -      bReturn = CLastFmManager::GetInstance()->IsLastFmEnabled();
 -    break;
 -    case LASTFM_RADIOPLAYING:
 -      bReturn = CLastFmManager::GetInstance()->IsRadioEnabled();
 -      break;
 -    case LASTFM_CANLOVE:
 -      bReturn = CLastFmManager::GetInstance()->CanLove();
 -      break;
 -    case LASTFM_CANBAN:
 -      bReturn = CLastFmManager::GetInstance()->CanBan();
 -      break;
      case MUSICPLAYER_HASPREVIOUS:
        {
          // requires current playlist be PLAYLIST_MUSIC
@@@ -2450,15 -2517,15 +2454,15 @@@ bool CGUIInfoManager::GetMultiInfoBool(
      {
        case SKIN_BOOL:
          {
 -          bReturn = g_settings.GetSkinBool(info.GetData1());
 +          bReturn = CSkinSettings::Get().GetBool(info.GetData1());
          }
          break;
        case SKIN_STRING:
          {
            if (info.GetData2())
 -            bReturn = g_settings.GetSkinString(info.GetData1()).Equals(m_stringParameters[info.GetData2()]);
 +            bReturn = StringUtils::EqualsNoCase(CSkinSettings::Get().GetString(info.GetData1()), m_stringParameters[info.GetData2()]);
            else
 -            bReturn = !g_settings.GetSkinString(info.GetData1()).IsEmpty();
 +            bReturn = !CSkinSettings::Get().GetString(info.GetData1()).empty();
          }
          break;
        case SKIN_HAS_THEME:
            {
              CGUIWindow *window = GetWindowWithCondition(contextWindow, WINDOW_CONDITION_IS_MEDIA_WINDOW);
              if (window)
 -              bReturn = g_settings.GetWatchMode(((CGUIMediaWindow *)window)->CurrentDirectory().GetContent()) == VIDEO_SHOW_UNWATCHED;
 +              bReturn = CMediaSettings::Get().GetWatchedMode(((CGUIMediaWindow *)window)->CurrentDirectory().GetContent()) == WatchedModeUnwatched;
            }
          }
          break;
            if (info.GetData1() == 1)
            { // relative index
              if (g_playlistPlayer.GetCurrentPlaylist() != PLAYLIST_MUSIC)
 -              return false;
 +            {
 +              bReturn = false;
 +              break;
 +            }
              index += g_playlistPlayer.GetCurrentSong();
            }
 -          if (index >= 0 && index < g_playlistPlayer.GetPlaylist(PLAYLIST_MUSIC).size())
 -            return true;
 -          return false;
 +          bReturn = (index >= 0 && index < g_playlistPlayer.GetPlaylist(PLAYLIST_MUSIC).size());
          }
          break;
      }
@@@ -2852,11 -2918,11 +2856,11 @@@ CStdString CGUIInfoManager::GetMultiInf
  {
    if (info.m_info == SKIN_STRING)
    {
 -    return g_settings.GetSkinString(info.GetData1());
 +    return CSkinSettings::Get().GetString(info.GetData1());
    }
    else if (info.m_info == SKIN_BOOL)
    {
 -    bool bInfo = g_settings.GetSkinBool(info.GetData1());
 +    bool bInfo = CSkinSettings::Get().GetBool(info.GetData1());
      if (bInfo)
        return g_localizeStrings.Get(20122);
    }
@@@ -3064,7 -3130,7 +3068,7 @@@ CStdString CGUIInfoManager::GetImage(in
      return g_weatherManager.GetInfo(WEATHER_IMAGE_CURRENT_ICON);
    else if (info == SYSTEM_PROFILETHUMB)
    {
 -    CStdString thumb = g_settings.GetCurrentProfile().getThumb();
 +    CStdString thumb = CProfilesManager::Get().GetCurrentProfile().getThumb();
      if (thumb.IsEmpty())
        thumb = "unknown-user.png";
      return thumb;
@@@ -3139,6 -3205,77 +3143,6 @@@ CStdString CGUIInfoManager::GetTime(TIM
    return LocalizeTime(time, format);
  }
  
 -CStdString CGUIInfoManager::GetLcdTime( int _eInfo ) const
 -{
 -  CDateTime time=CDateTime::GetCurrentDateTime();
 -  CStdString strLcdTime;
 -
 -#ifdef HAS_LCD
 -
 -  UINT       nCharset;
 -  UINT       nLine;
 -  CStdString strTimeMarker;
 -
 -  nCharset = 0;
 -  nLine = 0;
 -
 -  switch ( _eInfo )
 -  {
 -    case LCD_TIME_21:
 -      nCharset = 1; // CUSTOM_CHARSET_SMALLCHAR;
 -      nLine = 0;
 -      strTimeMarker = ".";
 -    break;
 -    case LCD_TIME_22:
 -      nCharset = 1; // CUSTOM_CHARSET_SMALLCHAR;
 -      nLine = 1;
 -      strTimeMarker = ".";
 -    break;
 -
 -    case LCD_TIME_W21:
 -      nCharset = 2; // CUSTOM_CHARSET_MEDIUMCHAR;
 -      nLine = 0;
 -      strTimeMarker = ".";
 -    break;
 -    case LCD_TIME_W22:
 -      nCharset = 2; // CUSTOM_CHARSET_MEDIUMCHAR;
 -      nLine = 1;
 -      strTimeMarker = ".";
 -    break;
 -
 -    case LCD_TIME_41:
 -      nCharset = 3; // CUSTOM_CHARSET_BIGCHAR;
 -      nLine = 0;
 -      strTimeMarker = " ";
 -    break;
 -    case LCD_TIME_42:
 -      nCharset = 3; // CUSTOM_CHARSET_BIGCHAR;
 -      nLine = 1;
 -      strTimeMarker = "o";
 -    break;
 -    case LCD_TIME_43:
 -      nCharset = 3; // CUSTOM_CHARSET_BIGCHAR;
 -      nLine = 2;
 -      strTimeMarker = "o";
 -    break;
 -    case LCD_TIME_44:
 -      nCharset = 3; // CUSTOM_CHARSET_BIGCHAR;
 -      nLine = 3;
 -      strTimeMarker = " ";
 -    break;
 -  }
 -
 -  strLcdTime += g_lcd->GetBigDigit( nCharset, time.GetHour()  , nLine, 2, 2, true );
 -  strLcdTime += strTimeMarker;
 -  strLcdTime += g_lcd->GetBigDigit( nCharset, time.GetMinute(), nLine, 2, 2, false );
 -  strLcdTime += strTimeMarker;
 -  strLcdTime += g_lcd->GetBigDigit( nCharset, time.GetSecond(), nLine, 2, 2, false );
 -
 -#endif
 -
 -  return strLcdTime;
 -}
 -
  CStdString CGUIInfoManager::LocalizeTime(const CDateTime &time, TIME_FORMAT format) const
  {
    const CStdString timeFormat = g_langInfo.GetTimeFormat();
    case TIME_FORMAT_HH_MM_XX:
        return time.GetAsLocalizedTime(use12hourclock ? "h:mm xx" : "HH:mm", false);
    case TIME_FORMAT_HH_MM_SS:
 -    return time.GetAsLocalizedTime("", true);
 +    return time.GetAsLocalizedTime("hh:mm:ss", true);
 +  case TIME_FORMAT_HH_MM_SS_XX:
 +    return time.GetAsLocalizedTime("hh:mm:ss xx", true);
    case TIME_FORMAT_H:
      return time.GetAsLocalizedTime("h", false);
    case TIME_FORMAT_H_MM_SS:
      return time.GetAsLocalizedTime("h:mm:ss", true);
 +  case TIME_FORMAT_H_MM_SS_XX:
 +    return time.GetAsLocalizedTime("h:mm:ss xx", true);
    case TIME_FORMAT_XX:
      return use12hourclock ? time.GetAsLocalizedTime("xx", false) : "";
    default:
@@@ -3322,11 -3455,7 +3326,11 @@@ CStdString CGUIInfoManager::GetPlaylist
  
  CStdString CGUIInfoManager::GetMusicLabel(int item)
  {
 -  if (!g_application.IsPlayingAudio() || !m_currentFile->HasMusicInfoTag()) return "";
 +  if (!g_application.IsPlaying() || !m_currentFile->HasMusicInfoTag()) return "";
 +
 +  SPlayerAudioStreamInfo info;
 +  g_application.m_pPlayer->GetAudioStreamInfo(g_application.m_pPlayer->GetAudioStream(), info);
 +
    switch (item)
    {
    case MUSICPLAYER_PLAYLISTLEN:
        float fTimeSpan = (float)(CTimeUtils::GetFrameTime() - m_lastMusicBitrateTime);
        if (fTimeSpan >= 500.0f)
        {
 -        m_MusicBitrate = g_application.m_pPlayer->GetAudioBitrate();
 +        m_MusicBitrate = info.bitrate;
          m_lastMusicBitrateTime = CTimeUtils::GetFrameTime();
        }
        CStdString strBitrate = "";
    case MUSICPLAYER_CHANNELS:
      {
        CStdString strChannels = "";
 -      if (g_application.m_pPlayer->GetChannels() > 0)
 +      if (info.channels > 0)
        {
 -        strChannels.Format("%i", g_application.m_pPlayer->GetChannels());
 +        strChannels.Format("%i", info.channels);
        }
        return strChannels;
      }
    case MUSICPLAYER_CODEC:
      {
        CStdString strCodec;
 -      strCodec.Format("%s", g_application.m_pPlayer->GetAudioCodecName().c_str());
 +      strCodec.Format("%s", info.audioCodecName);
        return strCodec;
      }
      break;
@@@ -3478,13 -3607,30 +3482,13 @@@ CStdString CGUIInfoManager::GetMusicTag
  
  CStdString CGUIInfoManager::GetVideoLabel(int item)
  {
 -  if (!g_application.IsPlayingVideo())
 +  if (!g_application.IsPlaying())
      return "";
  
    if (item == VIDEOPLAYER_TITLE)
    {
 -    if (m_currentFile->HasPVRChannelInfoTag())
 -    {
 -      CEpgInfoTag tag;
 -      return m_currentFile->GetPVRChannelInfoTag()->GetEPGNow(tag) ?
 -          tag.Title() :
 -          g_guiSettings.GetBool("epg.hidenoinfoavailable") ?
 -              StringUtils::EmptyString :
 -              g_localizeStrings.Get(19055); // no information available
 -    }
 -    if (m_currentFile->HasPVRRecordingInfoTag() && !m_currentFile->GetPVRRecordingInfoTag()->m_strTitle.IsEmpty())
 -      return m_currentFile->GetPVRRecordingInfoTag()->m_strTitle;
 -    if (m_currentFile->HasVideoInfoTag() && !m_currentFile->GetVideoInfoTag()->m_strTitle.IsEmpty())
 -      return m_currentFile->GetVideoInfoTag()->m_strTitle;
 -    // don't have the title, so use dvdplayer, label, or drop down to title from path
 -    if (!g_application.m_pPlayer->GetPlayingTitle().IsEmpty())
 -      return g_application.m_pPlayer->GetPlayingTitle();
 -    if (!m_currentFile->GetLabel().IsEmpty())
 -      return m_currentFile->GetLabel();
 -    return CUtil::GetTitleFromPath(m_currentFile->GetPath());
 +    if(g_application.IsPlayingVideo())
 +       return GetLabel(PLAYER_TITLE);
    }
    else if (item == VIDEOPLAYER_PLAYLISTLEN)
    {
          return strRatingAndVotes;
        }
        break;
 +    case VIDEOPLAYER_VOTES:
 +      return m_currentFile->GetVideoInfoTag()->m_strVotes;
      case VIDEOPLAYER_YEAR:
        {
          CStdString strYear;
@@@ -3716,7 -3860,7 +3720,7 @@@ CStdString CGUIInfoManager::GetCurrentP
  {
    if (format == TIME_FORMAT_GUESS && GetTotalPlayTime() >= 3600)
      format = TIME_FORMAT_HH_MM_SS;
 -  if (g_application.IsPlayingAudio() || g_application.IsPlayingVideo())
 +  if (g_application.IsPlaying())
      return StringUtils::SecondsToTimeString((int)(GetPlayTime()/1000), format);
    return "";
  }
@@@ -3746,7 -3890,7 +3750,7 @@@ CStdString CGUIInfoManager::GetCurrentP
    if (format == TIME_FORMAT_GUESS && GetTotalPlayTime() >= 3600)
      format = TIME_FORMAT_HH_MM_SS;
    int timeRemaining = GetPlayTimeRemaining();
 -  if (timeRemaining && (g_application.IsPlayingAudio() || g_application.IsPlayingVideo()))
 +  if (timeRemaining && g_application.IsPlaying())
      return StringUtils::SecondsToTimeString(timeRemaining, format);
    return "";
  }
@@@ -3887,12 -4031,15 +3891,12 @@@ string CGUIInfoManager::GetSystemHeatIn
    CStdString text;
    switch(info)
    {
 -    case LCD_CPU_TEMPERATURE:
      case SYSTEM_CPU_TEMPERATURE:
        return m_cpuTemp.IsValid() ? m_cpuTemp.ToString() : "?";
        break;
 -    case LCD_GPU_TEMPERATURE:
      case SYSTEM_GPU_TEMPERATURE:
        return m_gpuTemp.IsValid() ? m_gpuTemp.ToString() : "?";
        break;
 -    case LCD_FAN_SPEED:
      case SYSTEM_FAN_SPEED:
        text.Format("%i%%", m_fanSpeed * 2);
        break;
@@@ -3972,6 -4119,27 +3976,6 @@@ bool CGUIInfoManager::GetDisplayAfterSe
    return false;
  }
  
 -CStdString CGUIInfoManager::GetAudioScrobblerLabel(int item)
 -{
 -  switch (item)
 -  {
 -  case AUDIOSCROBBLER_CONN_STATE:
 -    return CLastfmScrobbler::GetInstance()->GetConnectionState();
 -    break;
 -  case AUDIOSCROBBLER_SUBMIT_INT:
 -    return CLastfmScrobbler::GetInstance()->GetSubmitInterval();
 -    break;
 -  case AUDIOSCROBBLER_FILES_CACHED:
 -    return CLastfmScrobbler::GetInstance()->GetFilesCached();
 -    break;
 -  case AUDIOSCROBBLER_SUBMIT_STATE:
 -    return CLastfmScrobbler::GetInstance()->GetSubmitState();
 -    break;
 -  }
 -
 -  return "";
 -}
 -
  void CGUIInfoManager::Clear()
  {
    CSingleLock lock(m_critInfo);
@@@ -4302,10 -4470,6 +4306,10 @@@ CStdString CGUIInfoManager::GetItemLabe
        }
      }
      break;
 +  case LISTITEM_VOTES:
 +    if (item->HasVideoInfoTag())
 +      return item->GetVideoInfoTag()->m_strVotes;
 +    break;
    case LISTITEM_PROGRAM_COUNT:
      {
        CStdString count;
@@@ -4981,7 -5145,7 +4985,7 @@@ void CGUIInfoManager::SetCurrentSlide(C
  {
    if (m_currentSlide->GetPath() != item.GetPath())
    {
 -    if (!item.HasPictureInfoTag() && !item.GetPictureInfoTag()->Loaded())
 +    if (!item.GetPictureInfoTag()->Loaded()) // If picture metadata has not been loaded yet, load it now
        item.GetPictureInfoTag()->Load(item.GetPath());
      *m_currentSlide = item;
    }
diff --combined xbmc/GUIInfoManager.h
@@@ -7,7 -7,7 +7,7 @@@
  #define GUIINFOMANAGER_H_
  
  /*
 - *      Copyright (C) 2005-2012 Team XBMC
 + *      Copyright (C) 2005-2013 Team XBMC
   *      http://www.xbmc.org
   *
   *  This Program is free software; you can redistribute it and/or modify
@@@ -162,6 -162,21 +162,6 @@@ namespace INF
  #define SYSTEM_HDD_LOCKSTATE        157
  #define SYSTEM_HDD_LOCKKEY          158
  #define SYSTEM_INTERNET_STATE       159
 -#define LCD_PLAY_ICON               160
 -#define LCD_PROGRESS_BAR            161
 -#define LCD_CPU_TEMPERATURE         162
 -#define LCD_GPU_TEMPERATURE         163
 -#define LCD_HDD_TEMPERATURE         164
 -#define LCD_FAN_SPEED               165
 -#define LCD_DATE                    166
 -#define LCD_TIME_21                 172 // Small bigfont
 -#define LCD_TIME_22                 173
 -#define LCD_TIME_W21                174 // Medum bigfont
 -#define LCD_TIME_W22                175
 -#define LCD_TIME_41                 176 // Big bigfont
 -#define LCD_TIME_42                 177
 -#define LCD_TIME_43                 178
 -#define LCD_TIME_44                 179
  #define SYSTEM_ALARM_LESS_OR_EQUAL  180
  #define SYSTEM_PROFILECOUNT         181
  #define SYSTEM_ISFULLSCREEN         182
  #define SYSTEM_ISINHIBIT            184
  #define SYSTEM_HAS_SHUTDOWN         185
  #define SYSTEM_HAS_PVR              186
+ #define SYSTEM_STARTUP_WINDOW       187
  
  #define NETWORK_IP_ADDRESS          190
  #define NETWORK_MAC_ADDRESS         191
  #define VIDEOPLAYER_CHANNEL_GROUP     306
  #define VIDEOPLAYER_PARENTAL_RATING   307
  #define VIDEOPLAYER_HAS_EPG           308
 -
 -#define AUDIOSCROBBLER_ENABLED      325
 -#define AUDIOSCROBBLER_CONN_STATE   326
 -#define AUDIOSCROBBLER_SUBMIT_INT   327
 -#define AUDIOSCROBBLER_FILES_CACHED 328
 -#define AUDIOSCROBBLER_SUBMIT_STATE 329
 -#define LASTFM_RADIOPLAYING         330
 -#define LASTFM_CANLOVE              331
 -#define LASTFM_CANBAN               332
 +#define VIDEOPLAYER_VOTES             309
  
  #define CONTAINER_CAN_FILTER         342
  #define CONTAINER_CAN_FILTERADVANCED 343
  #define CONTROL_GROUP_HAS_FOCUS     29999
  #define CONTROL_HAS_FOCUS           30000
  
 -#define VERSION_MAJOR 12
 +#define VERSION_MAJOR 13
  #define VERSION_MINOR 0
 -#define VERSION_TAG "-RC3"
 +#define VERSION_TAG "-ALPHA3"
  
  #define LISTITEM_START              35000
  #define LISTITEM_THUMB              (LISTITEM_START)
  #define LISTITEM_PARENTALRATING     (LISTITEM_START + 101)
  #define LISTITEM_PROGRESS           (LISTITEM_START + 102)
  #define LISTITEM_HAS_EPG            (LISTITEM_START + 103)
 +#define LISTITEM_VOTES              (LISTITEM_START + 104)
  
  #define LISTITEM_PROPERTY_START     (LISTITEM_START + 200)
  #define LISTITEM_PROPERTY_END       (LISTITEM_PROPERTY_START + 1000)
@@@ -704,6 -727,7 +705,6 @@@ public
    CStdString GetImage(int info, int contextWindow, CStdString *fallback = NULL);
  
    CStdString GetTime(TIME_FORMAT format = TIME_FORMAT_GUESS) const;
 -  CStdString GetLcdTime( int _eInfo ) const;
    CStdString GetDate(bool bNumbersOnly = false);
    CStdString GetDuration(TIME_FORMAT format = TIME_FORMAT_GUESS) const;
  
@@@ -840,6 -864,8 +841,6 @@@ protected
    int AddMultiInfo(const GUIInfo &info);
    int AddListItemProp(const CStdString &str, int offset=0);
  
 -  CStdString GetAudioScrobblerLabel(int item);
 -
    /*!
     * @brief Get the EPG tag that is currently active
     * @param tag The active tag
diff --combined xbmc/addons/Skin.cpp
@@@ -1,5 -1,5 +1,5 @@@
  /*
 - *      Copyright (C) 2005-2012 Team XBMC
 + *      Copyright (C) 2005-2013 Team XBMC
   *      http://www.xbmc.org
   *
   *  This Program is free software; you can redistribute it and/or modify
@@@ -22,8 -22,9 +22,8 @@@
  #include "AddonManager.h"
  #include "filesystem/File.h"
  #include "filesystem/SpecialProtocol.h"
 -#include "guilib/Key.h"
 +#include "guilib/WindowIDs.h"
  #include "utils/URIUtils.h"
 -#include "settings/Settings.h"
  #include "utils/log.h"
  #include "utils/StringUtils.h"
  #include "settings/GUISettings.h"
@@@ -91,7 -92,6 +91,6 @@@ CSkinInfo::CSkinInfo(const cp_extension
    str = CAddonMgr::Get().GetExtValue(ext->configuration, "@debugging");
    m_debugging = !strcmp(str.c_str(), "true");
  
-   m_onlyAnimateToHome = true;
    LoadStartupWindows(ext);
    m_Version = 2.11;
  }
@@@ -221,7 -221,6 +220,6 @@@ bool CSkinInfo::LoadStartupWindows(cons
    m_startupWindows.push_back(CStartupWindow(WINDOW_FILES, "7"));
    m_startupWindows.push_back(CStartupWindow(WINDOW_SETTINGS_MENU, "5"));
    m_startupWindows.push_back(CStartupWindow(WINDOW_WEATHER, "8"));
-   m_onlyAnimateToHome = true;
    return true;
  }
  
@@@ -257,7 -256,7 +255,7 @@@ bool CSkinInfo::TranslateResolution(con
  int CSkinInfo::GetFirstWindow() const
  {
    int startWindow = GetStartWindow();
-   if (HasSkinFile("Startup.xml") && (!m_onlyAnimateToHome || startWindow == WINDOW_HOME))
+   if (HasSkinFile("Startup.xml"))
      startWindow = WINDOW_STARTUP_ANIM;
    return startWindow;
  }
diff --combined xbmc/addons/Skin.h
@@@ -1,7 -1,7 +1,7 @@@
  #pragma once
  
  /*
 - *      Copyright (C) 2005-2012 Team XBMC
 + *      Copyright (C) 2005-2013 Team XBMC
   *      http://www.xbmc.org
   *
   *  This Program is free software; you can redistribute it and/or modify
@@@ -137,7 -137,6 +137,6 @@@ protected
    CStdString m_currentAspect;
  
    std::vector<CStartupWindow> m_startupWindows;
-   bool m_onlyAnimateToHome;
    bool m_debugging;
  };