aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspiff <spiff@xbmc.org>2012-07-12 23:08:26 +0200
committerspiff <spiff@xbmc.org>2012-07-12 23:10:50 +0200
commitc7fc25ad78983a17c8d36cabee30403af0914af4 (patch)
tree1470ac3027226a217e792774a5f75a1c595a38f3
parent197b43b3b94fec27536f29bedbc62c484eb5c6e9 (diff)
changed: remove CShortcut class and related code
this is a useless xbox remnant that won't ever be used elsewhere
-rw-r--r--XBMC-ATV2.xcodeproj/project.pbxproj6
-rw-r--r--XBMC-IOS.xcodeproj/project.pbxproj4
-rw-r--r--XBMC.xcodeproj/project.pbxproj4
-rw-r--r--project/VS2010Express/XBMC.vcxproj2
-rw-r--r--project/VS2010Express/XBMC.vcxproj.filters6
-rw-r--r--xbmc/FileItem.cpp24
-rw-r--r--xbmc/FileItem.h2
-rw-r--r--xbmc/ThumbLoader.cpp19
-rw-r--r--xbmc/programs/GUIWindowPrograms.cpp56
-rw-r--r--xbmc/programs/Makefile1
-rw-r--r--xbmc/programs/Shortcut.cpp194
-rw-r--r--xbmc/programs/Shortcut.h51
-rw-r--r--xbmc/windows/GUIWindowFileManager.cpp2
13 files changed, 2 insertions, 369 deletions
diff --git a/XBMC-ATV2.xcodeproj/project.pbxproj b/XBMC-ATV2.xcodeproj/project.pbxproj
index f04b1a2b4e..c189a56ed5 100644
--- a/XBMC-ATV2.xcodeproj/project.pbxproj
+++ b/XBMC-ATV2.xcodeproj/project.pbxproj
@@ -695,7 +695,6 @@
F56C7AED131EC155000AD0F6 /* GUIViewStatePrograms.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C76B5131EC153000AD0F6 /* GUIViewStatePrograms.cpp */; };
F56C7AEE131EC155000AD0F6 /* GUIWindowPrograms.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C76B7131EC153000AD0F6 /* GUIWindowPrograms.cpp */; };
F56C7AEF131EC155000AD0F6 /* ProgramDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C76B9131EC153000AD0F6 /* ProgramDatabase.cpp */; };
- F56C7AF0131EC155000AD0F6 /* Shortcut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C76BB131EC153000AD0F6 /* Shortcut.cpp */; };
F56C7AF3131EC155000AD0F6 /* RenderSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C76C3131EC153000AD0F6 /* RenderSystem.cpp */; };
F56C7AF4131EC155000AD0F6 /* GUIDialogContentSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C76C7131EC153000AD0F6 /* GUIDialogContentSettings.cpp */; };
F56C7AF5131EC155000AD0F6 /* GUIDialogLockSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C76C9131EC153000AD0F6 /* GUIDialogLockSettings.cpp */; };
@@ -2481,8 +2480,6 @@
F56C76B8131EC153000AD0F6 /* GUIWindowPrograms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIWindowPrograms.h; sourceTree = "<group>"; };
F56C76B9131EC153000AD0F6 /* ProgramDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProgramDatabase.cpp; sourceTree = "<group>"; };
F56C76BA131EC153000AD0F6 /* ProgramDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProgramDatabase.h; sourceTree = "<group>"; };
- F56C76BB131EC153000AD0F6 /* Shortcut.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Shortcut.cpp; sourceTree = "<group>"; };
- F56C76BC131EC153000AD0F6 /* Shortcut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shortcut.h; sourceTree = "<group>"; };
F56C76C3131EC153000AD0F6 /* RenderSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSystem.cpp; sourceTree = "<group>"; };
F56C76C4131EC153000AD0F6 /* RenderSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSystem.h; sourceTree = "<group>"; };
F56C76C7131EC153000AD0F6 /* GUIDialogContentSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogContentSettings.cpp; sourceTree = "<group>"; };
@@ -5245,8 +5242,6 @@
F56C76B8131EC153000AD0F6 /* GUIWindowPrograms.h */,
F56C76B9131EC153000AD0F6 /* ProgramDatabase.cpp */,
F56C76BA131EC153000AD0F6 /* ProgramDatabase.h */,
- F56C76BB131EC153000AD0F6 /* Shortcut.cpp */,
- F56C76BC131EC153000AD0F6 /* Shortcut.h */,
);
path = programs;
sourceTree = "<group>";
@@ -6857,7 +6852,6 @@
F56C7AED131EC155000AD0F6 /* GUIViewStatePrograms.cpp in Sources */,
F56C7AEE131EC155000AD0F6 /* GUIWindowPrograms.cpp in Sources */,
F56C7AEF131EC155000AD0F6 /* ProgramDatabase.cpp in Sources */,
- F56C7AF0131EC155000AD0F6 /* Shortcut.cpp in Sources */,
F56C7AF3131EC155000AD0F6 /* RenderSystem.cpp in Sources */,
F56C7AF4131EC155000AD0F6 /* GUIDialogContentSettings.cpp in Sources */,
F56C7AF5131EC155000AD0F6 /* GUIDialogLockSettings.cpp in Sources */,
diff --git a/XBMC-IOS.xcodeproj/project.pbxproj b/XBMC-IOS.xcodeproj/project.pbxproj
index 4828135523..98512460ae 100644
--- a/XBMC-IOS.xcodeproj/project.pbxproj
+++ b/XBMC-IOS.xcodeproj/project.pbxproj
@@ -2679,8 +2679,6 @@
F56C86A5131F42EB000AD0F6 /* GUIWindowPrograms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIWindowPrograms.h; sourceTree = "<group>"; };
F56C86A6131F42EB000AD0F6 /* ProgramDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProgramDatabase.cpp; sourceTree = "<group>"; };
F56C86A7131F42EB000AD0F6 /* ProgramDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProgramDatabase.h; sourceTree = "<group>"; };
- F56C86A8131F42EB000AD0F6 /* Shortcut.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Shortcut.cpp; sourceTree = "<group>"; };
- F56C86A9131F42EB000AD0F6 /* Shortcut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shortcut.h; sourceTree = "<group>"; };
F56C86AC131F42EB000AD0F6 /* RenderSystemGLES.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSystemGLES.cpp; sourceTree = "<group>"; };
F56C86AD131F42EB000AD0F6 /* RenderSystemGLES.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSystemGLES.h; sourceTree = "<group>"; };
F56C86AE131F42EB000AD0F6 /* RenderSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSystem.cpp; sourceTree = "<group>"; };
@@ -5601,8 +5599,6 @@
F56C86A5131F42EB000AD0F6 /* GUIWindowPrograms.h */,
F56C86A6131F42EB000AD0F6 /* ProgramDatabase.cpp */,
F56C86A7131F42EB000AD0F6 /* ProgramDatabase.h */,
- F56C86A8131F42EB000AD0F6 /* Shortcut.cpp */,
- F56C86A9131F42EB000AD0F6 /* Shortcut.h */,
);
path = programs;
sourceTree = "<group>";
diff --git a/XBMC.xcodeproj/project.pbxproj b/XBMC.xcodeproj/project.pbxproj
index 1b181fcb28..7e07ec38e2 100644
--- a/XBMC.xcodeproj/project.pbxproj
+++ b/XBMC.xcodeproj/project.pbxproj
@@ -2672,8 +2672,6 @@
E38E1DFF0D25F9FD00618676 /* SectionLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SectionLoader.h; sourceTree = "<group>"; };
E38E1E010D25F9FD00618676 /* VideoSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VideoSettings.cpp; sourceTree = "<group>"; };
E38E1E020D25F9FD00618676 /* VideoSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoSettings.h; sourceTree = "<group>"; };
- E38E1E070D25F9FD00618676 /* Shortcut.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Shortcut.cpp; sourceTree = "<group>"; };
- E38E1E080D25F9FD00618676 /* Shortcut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shortcut.h; sourceTree = "<group>"; };
E38E1E090D25F9FD00618676 /* SlideShowPicture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SlideShowPicture.cpp; sourceTree = "<group>"; };
E38E1E0A0D25F9FD00618676 /* SlideShowPicture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlideShowPicture.h; sourceTree = "<group>"; };
E38E1E0D0D25F9FD00618676 /* Song.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Song.cpp; sourceTree = "<group>"; };
@@ -3671,8 +3669,6 @@
E38E18240D25F9FA00618676 /* GUIWindowPrograms.h */,
E38E1DF30D25F9FD00618676 /* ProgramDatabase.cpp */,
E38E1DF40D25F9FD00618676 /* ProgramDatabase.h */,
- E38E1E070D25F9FD00618676 /* Shortcut.cpp */,
- E38E1E080D25F9FD00618676 /* Shortcut.h */,
);
path = programs;
sourceTree = "<group>";
diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj
index 588181796f..f07e528e11 100644
--- a/project/VS2010Express/XBMC.vcxproj
+++ b/project/VS2010Express/XBMC.vcxproj
@@ -854,7 +854,6 @@
<ClCompile Include="..\..\xbmc\programs\GUIViewStatePrograms.cpp" />
<ClCompile Include="..\..\xbmc\programs\GUIWindowPrograms.cpp" />
<ClCompile Include="..\..\xbmc\programs\ProgramDatabase.cpp" />
- <ClCompile Include="..\..\xbmc\programs\Shortcut.cpp" />
<ClCompile Include="..\..\xbmc\rendering\dx\GUIWindowTestPatternDX.cpp" />
<ClCompile Include="..\..\xbmc\rendering\dx\RenderSystemDX.cpp" />
<ClCompile Include="..\..\xbmc\rendering\gl\GUIWindowTestPatternGL.cpp">
@@ -1808,7 +1807,6 @@
<ClInclude Include="..\..\xbmc\programs\GUIViewStatePrograms.h" />
<ClInclude Include="..\..\xbmc\programs\GUIWindowPrograms.h" />
<ClInclude Include="..\..\xbmc\programs\ProgramDatabase.h" />
- <ClInclude Include="..\..\xbmc\programs\Shortcut.h" />
<ClInclude Include="..\..\xbmc\rendering\dx\GUIWindowTestPatternDX.h" />
<ClInclude Include="..\..\xbmc\rendering\dx\RenderSystemDX.h" />
<ClInclude Include="..\..\xbmc\rendering\gl\GUIWindowTestPatternGL.h">
diff --git a/project/VS2010Express/XBMC.vcxproj.filters b/project/VS2010Express/XBMC.vcxproj.filters
index 67dc3dd4af..e40ca7ed7e 100644
--- a/project/VS2010Express/XBMC.vcxproj.filters
+++ b/project/VS2010Express/XBMC.vcxproj.filters
@@ -1456,9 +1456,6 @@
<ClCompile Include="..\..\xbmc\programs\GUIWindowPrograms.cpp">
<Filter>programs</Filter>
</ClCompile>
- <ClCompile Include="..\..\xbmc\programs\Shortcut.cpp">
- <Filter>programs</Filter>
- </ClCompile>
<ClCompile Include="..\..\xbmc\rendering\RenderSystem.cpp">
<Filter>rendering</Filter>
</ClCompile>
@@ -4043,9 +4040,6 @@
<ClInclude Include="..\..\xbmc\programs\GUIWindowPrograms.h">
<Filter>programs</Filter>
</ClInclude>
- <ClInclude Include="..\..\xbmc\programs\Shortcut.h">
- <Filter>programs</Filter>
- </ClInclude>
<ClInclude Include="..\..\xbmc\rendering\RenderSystem.h">
<Filter>rendering</Filter>
</ClInclude>
diff --git a/xbmc/FileItem.cpp b/xbmc/FileItem.cpp
index d7fde05604..b4d6344361 100644
--- a/xbmc/FileItem.cpp
+++ b/xbmc/FileItem.cpp
@@ -681,21 +681,11 @@ bool CFileItem::IsPythonScript() const
return URIUtils::GetExtension(m_strPath).Equals(".py", false);
}
-bool CFileItem::IsXBE() const
-{
- return URIUtils::GetExtension(m_strPath).Equals(".xbe", false);
-}
-
bool CFileItem::IsType(const char *ext) const
{
return URIUtils::GetExtension(m_strPath).Equals(ext, false);
}
-bool CFileItem::IsShortCut() const
-{
- return URIUtils::GetExtension(m_strPath).Equals(".cut", false);
-}
-
bool CFileItem::IsNFO() const
{
return URIUtils::GetExtension(m_strPath).Equals(".nfo", false);
@@ -961,20 +951,6 @@ void CFileItem::FillInDefaultIcon()
{
SetIconImage("DefaultPlaylist.png");
}
- else if ( IsXBE() )
- {
- // xbe
- SetIconImage("DefaultProgram.png");
- }
- else if ( IsShortCut() && !IsLabelPreformated() )
- {
- // shortcut
- CStdString strFName = URIUtils::GetFileName(m_strPath);
- int iPos = strFName.ReverseFind(".");
- CStdString strDescription = strFName.Left(iPos);
- SetLabel(strDescription);
- SetIconImage("DefaultShortcut.png");
- }
else if ( IsPythonScript() )
{
SetIconImage("DefaultScript.png");
diff --git a/xbmc/FileItem.h b/xbmc/FileItem.h
index 2e569b6e1e..3ef2ef61d1 100644
--- a/xbmc/FileItem.h
+++ b/xbmc/FileItem.h
@@ -103,12 +103,10 @@ public:
bool IsPlayList() const;
bool IsSmartPlayList() const;
bool IsPythonScript() const;
- bool IsXBE() const;
bool IsPlugin() const;
bool IsScript() const;
bool IsAddonsPath() const;
bool IsSourcesPath() const;
- bool IsShortCut() const;
bool IsNFO() const;
bool IsDVDImage() const;
bool IsOpticalMediaFile() const;
diff --git a/xbmc/ThumbLoader.cpp b/xbmc/ThumbLoader.cpp
index 3e34e78660..14f60f9d25 100644
--- a/xbmc/ThumbLoader.cpp
+++ b/xbmc/ThumbLoader.cpp
@@ -31,7 +31,6 @@
#include "guilib/GUIWindowManager.h"
#include "TextureCache.h"
#include "utils/log.h"
-#include "programs/Shortcut.h"
#include "video/VideoInfoTag.h"
#include "video/VideoDatabase.h"
#include "cores/dvdplayer/DVDFileInfo.h"
@@ -488,23 +487,7 @@ bool CProgramThumbLoader::FillThumb(CFileItem &item)
CStdString CProgramThumbLoader::GetLocalThumb(const CFileItem &item)
{
// look for the thumb
- if (item.IsShortCut())
- {
- CShortcut shortcut;
- if ( shortcut.Create( item.GetPath() ) )
- {
- // use the shortcut's thumb
- if (!shortcut.m_strThumb.IsEmpty())
- return shortcut.m_strThumb;
- else
- {
- CFileItem cut(shortcut.m_strPath,false);
- if (FillThumb(cut))
- return cut.GetThumbnailImage();
- }
- }
- }
- else if (item.m_bIsFolder)
+ if (item.m_bIsFolder)
{
CStdString folderThumb = item.GetFolderThumb();
if (XFILE::CFile::Exists(folderThumb))
diff --git a/xbmc/programs/GUIWindowPrograms.cpp b/xbmc/programs/GUIWindowPrograms.cpp
index 653ad85cb7..91418d37a4 100644
--- a/xbmc/programs/GUIWindowPrograms.cpp
+++ b/xbmc/programs/GUIWindowPrograms.cpp
@@ -22,7 +22,6 @@
#include "system.h"
#include "GUIWindowPrograms.h"
#include "Util.h"
-#include "Shortcut.h"
#include "filesystem/HDDirectory.h"
#include "GUIPassword.h"
#include "dialogs/GUIDialogMediaSource.h"
@@ -89,25 +88,6 @@ bool CGUIWindowPrograms::OnMessage(CGUIMessage& message)
case GUI_MSG_CLICKED:
{
- if (message.GetSenderId() == CONTROL_BTNSORTBY)
- {
- // need to update shortcuts manually
- if (CGUIMediaWindow::OnMessage(message))
- {
- LABEL_MASKS labelMasks;
- m_guiState->GetSortMethodLabelMasks(labelMasks);
- CLabelFormatter formatter("", labelMasks.m_strLabel2File);
- for (int i=0;i<m_vecItems->Size();++i)
- {
- CFileItemPtr item = m_vecItems->Get(i);
- if (item->IsShortCut())
- formatter.FormatLabel2(item.get());
- }
- return true;
- }
- else
- return false;
- }
if (m_viewControl.HasControl(message.GetSenderId())) // list/thumb control
{
int iAction = message.GetParam1();
@@ -143,20 +123,6 @@ void CGUIWindowPrograms::GetContextButtons(int itemNumber, CContextButtons &butt
}
else
{
- if (item->IsXBE() || item->IsShortCut())
- {
- CStdString strLaunch = g_localizeStrings.Get(518); // Launch
- buttons.Add(CONTEXT_BUTTON_LAUNCH, strLaunch);
-
- if (g_passwordManager.IsMasterLockUnlocked(false) || g_settings.GetCurrentProfile().canWriteDatabases())
- {
- if (item->IsShortCut())
- buttons.Add(CONTEXT_BUTTON_RENAME, 16105); // rename
- else
- buttons.Add(CONTEXT_BUTTON_RENAME, 520); // edit xbe title
- }
- }
-
if (!m_vecItems->IsPlugin() && (item->IsPlugin() || item->IsScript()))
buttons.Add(CONTEXT_BUTTON_INFO, 24003); // Add-on info
if (item->IsPlugin() || item->IsScript() || m_vecItems->IsPlugin())
@@ -184,29 +150,9 @@ bool CGUIWindowPrograms::OnContextButton(int itemNumber, CONTEXT_BUTTON button)
{
case CONTEXT_BUTTON_RENAME:
{
- CStdString strDescription;
- CShortcut cut;
- if (item->IsShortCut())
- {
- cut.Create(item->GetPath());
- strDescription = cut.m_strLabel;
- }
- else
- strDescription = item->GetLabel();
-
+ CStdString strDescription = item->GetLabel();
if (CGUIDialogKeyboard::ShowAndGetInput(strDescription, g_localizeStrings.Get(16008), false))
{
- if (item->IsShortCut())
- {
- cut.m_strLabel = strDescription;
- cut.Save(item->GetPath());
- }
- else
- {
- // SetXBEDescription will truncate to 40 characters.
- //CUtil::SetXBEDescription(item->GetPath(),strDescription);
- //m_database.SetDescription(item->GetPath(),strDescription);
- }
Update(m_vecItems->GetPath());
}
return true;
diff --git a/xbmc/programs/Makefile b/xbmc/programs/Makefile
index 15d79ee741..f9f7dfa030 100644
--- a/xbmc/programs/Makefile
+++ b/xbmc/programs/Makefile
@@ -1,7 +1,6 @@
SRCS=GUIViewStatePrograms.cpp \
GUIWindowPrograms.cpp \
ProgramDatabase.cpp \
- Shortcut.cpp \
LIB=programs.a
diff --git a/xbmc/programs/Shortcut.cpp b/xbmc/programs/Shortcut.cpp
deleted file mode 100644
index d440c529df..0000000000
--- a/xbmc/programs/Shortcut.cpp
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-// Shortcut.cpp: implementation of the CShortcut class.
-//
-//////////////////////////////////////////////////////////////////////
-
-#include "Shortcut.h"
-#include "Util.h"
-#include "utils/XBMCTinyXML.h"
-#include "filesystem/File.h"
-
-using namespace XFILE;
-
-//////////////////////////////////////////////////////////////////////
-// Construction/Destruction
-//////////////////////////////////////////////////////////////////////
-
-CShortcut::CShortcut()
-{
-}
-
-CShortcut::~CShortcut()
-{
-}
-
-bool CShortcut::Create(const CStdString& szPath)
-{
- CXBMCTinyXML xmlDoc;
- if ( !xmlDoc.LoadFile( szPath ) )
- return FALSE;
-
- bool bPath = false;
-
- TiXmlElement* pRootElement = xmlDoc.RootElement();
- CStdString strValue = pRootElement->Value();
- if ( strValue != "shortcut")
- return false;
- const TiXmlNode *pChild = pRootElement->FirstChild();
-
- m_strCustomGame.Empty();
- while (pChild > 0)
- {
- CStdString strValue = pChild->Value();
- if (strValue == "path")
- {
- if (pChild->FirstChild())
- {
- m_strPath = pChild->FirstChild()->Value();
- bPath = true;
- }
- }
-
- if (strValue == "video")
- {
- if (pChild->FirstChild())
- {
- m_strVideo = pChild->FirstChild()->Value();
- }
- }
-
- if (strValue == "parameters")
- {
- if (pChild->FirstChild())
- {
- m_strParameters = pChild->FirstChild()->Value();
- }
- }
-
- if (strValue == "thumb")
- {
- if (pChild->FirstChild())
- {
- m_strThumb = pChild->FirstChild()->Value();
- }
- }
-
- if (strValue == "label")
- {
- if (pChild->FirstChild())
- {
- m_strLabel = pChild->FirstChild()->Value();
- }
- }
-
- if (strValue == "custom")
- {
- const TiXmlNode* pCustomElement = pChild->FirstChildElement();
- while (pCustomElement > 0)
- {
- CStdString strCustomValue = pCustomElement->Value();
- if (strCustomValue == "game")
- m_strCustomGame = pCustomElement->FirstChild()->Value();
-
- pCustomElement = pCustomElement->NextSibling();
- }
- }
-
- pChild = pChild->NextSibling();
-
- }
-
- return bPath ? true : false;
-}
-
-bool CShortcut::Save(const CStdString& strFileName)
-{
- // Make shortcut filename compatible
- CStdString strTotalPath = CUtil::MakeLegalPath(strFileName);
-
- // Remove old file
- CFile::Delete(strTotalPath);
-
- // Create shortcut document:
- // <shortcut>
- // <path>F:\App\default.xbe</path>
- // </shortcut>
- CXBMCTinyXML xmlDoc;
- TiXmlElement xmlRootElement("shortcut");
- TiXmlNode *pRootNode = xmlDoc.InsertEndChild(xmlRootElement);
- if (!pRootNode) return false;
-
- TiXmlElement newElement("path");
- TiXmlNode *pNewNode = pRootNode->InsertEndChild(newElement);
- if (!pNewNode) return false;
-
- TiXmlText value(m_strPath);
- pNewNode->InsertEndChild(value);
-
- if (!m_strThumb.IsEmpty())
- {
- TiXmlElement newElement("thumb");
- TiXmlNode *pNewNode = pRootNode->InsertEndChild(newElement);
- if (!pNewNode) return false;
-
- TiXmlText thumbValue(m_strThumb);
- pNewNode->InsertEndChild(thumbValue);
- }
- if (!m_strLabel.IsEmpty())
- {
- TiXmlElement newElement("label");
- TiXmlNode *pNewNode = pRootNode->InsertEndChild(newElement);
- if (!pNewNode) return false;
-
- TiXmlText labelValue(m_strLabel);
- pNewNode->InsertEndChild(labelValue);
- }
- if (!m_strVideo.IsEmpty())
- {
- TiXmlElement newElement("video");
- TiXmlNode *pNewNode = pRootNode->InsertEndChild(newElement);
- if (!pNewNode) return false;
-
- TiXmlText labelValue(m_strVideo);
- pNewNode->InsertEndChild(labelValue);
- }
- if (!m_strParameters.IsEmpty())
- {
- TiXmlElement newElement("parameters");
- TiXmlNode *pNewNode = pRootNode->InsertEndChild(newElement);
- if (!pNewNode) return false;
-
- TiXmlText labelValue(m_strParameters);
- pNewNode->InsertEndChild(labelValue);
- }
- if (!m_strCustomGame.IsEmpty())
- {
- TiXmlElement customElement("custom");
- TiXmlNode* pCustomNode = pRootNode->InsertEndChild(customElement);
- TiXmlText game(m_strCustomGame);
- TiXmlElement gameElement("game");
- TiXmlNode* pGameNode = pCustomNode->InsertEndChild(gameElement);
- pGameNode->InsertEndChild(game);
- }
-
- return xmlDoc.SaveFile(strTotalPath);
-}
diff --git a/xbmc/programs/Shortcut.h b/xbmc/programs/Shortcut.h
deleted file mode 100644
index cb579a7a9e..0000000000
--- a/xbmc/programs/Shortcut.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-// Shortcut.h: interface for the CShortcut class.
-//
-//////////////////////////////////////////////////////////////////////
-
-#if !defined(AFX_SHORTCUT_H__641CCF68_6D2A_426E_9204_C0E4BEF12D00__INCLUDED_)
-#define AFX_SHORTCUT_H__641CCF68_6D2A_426E_9204_C0E4BEF12D00__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#include "utils/StdString.h"
-
-class CShortcut
-{
-public:
- CShortcut();
- virtual ~CShortcut();
-
- bool Create(const CStdString& szPath);
- bool Save(const CStdString& strFileName);
-
- CStdString m_strPath;
- CStdString m_strVideo;
- CStdString m_strParameters;
- CStdString m_strCustomGame;
- CStdString m_strThumb;
- CStdString m_strLabel;
-};
-
-#endif // !defined(AFX_SHORTCUT_H__641CCF68_6D2A_426E_9204_C0E4BEF12D00__INCLUDED_)
diff --git a/xbmc/windows/GUIWindowFileManager.cpp b/xbmc/windows/GUIWindowFileManager.cpp
index 6e505d84af..9596cec898 100644
--- a/xbmc/windows/GUIWindowFileManager.cpp
+++ b/xbmc/windows/GUIWindowFileManager.cpp
@@ -630,8 +630,6 @@ void CGUIWindowFileManager::OnStart(CFileItem *pItem)
return ;
}
#endif
- if (pItem->IsShortCut())
- CUtil::RunShortcut(pItem->GetPath());
if (pItem->IsPicture())
{
CGUIWindowSlideShow *pSlideShow = (CGUIWindowSlideShow *)g_windowManager.GetWindow(WINDOW_SLIDESHOW);