aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormontellese <montellese@xbmc.org>2013-02-02 15:22:29 +0100
committermontellese <montellese@xbmc.org>2013-02-02 15:22:29 +0100
commit2726cb1284320d2b008046622f9aa52ddda296c9 (patch)
tree388207e89390a9019cc5b3b72b45fe04072d0cd5
parenta1ddaf04fbb29cb6c09fd6b07c2f7212f0a6918a (diff)
artwork: add "Add art" button to video artwork selection dialog
-rw-r--r--language/English/strings.po7
-rw-r--r--xbmc/video/dialogs/GUIDialogVideoInfo.cpp12
2 files changed, 18 insertions, 1 deletions
diff --git a/language/English/strings.po b/language/English/strings.po
index 5a7f5a5a09..52fa7a3cc5 100644
--- a/language/English/strings.po
+++ b/language/English/strings.po
@@ -5392,7 +5392,12 @@ msgctxt "#13515"
msgid "No art"
msgstr ""
-#empty strings from id 13516 to 13549
+#: xbmc/video/dialogs/GUIDialogVideoInfo.cpp
+msgctxt "#13516"
+msgid "Add art"
+msgstr ""
+
+#empty strings from id 13517 to 13549
#: xbmc/settings/GUISettings.cpp
msgctxt "#13550"
diff --git a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp
index 35d2923786..aa829a767f 100644
--- a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp
+++ b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp
@@ -29,6 +29,7 @@
#include "video/VideoInfoScanner.h"
#include "ApplicationMessenger.h"
#include "video/VideoInfoTag.h"
+#include "guilib/GUIKeyboardFactory.h"
#include "guilib/GUIWindowManager.h"
#include "dialogs/GUIDialogOK.h"
#include "dialogs/GUIDialogYesNo.h"
@@ -604,6 +605,7 @@ string CGUIDialogVideoInfo::ChooseArtType(const CFileItem &videoItem, map<string
dialog->SetHeading(13511);
dialog->Reset();
dialog->SetUseDetails(true);
+ dialog->EnableButton(true, 13516);
CVideoDatabase db;
db.Open();
@@ -631,6 +633,16 @@ string CGUIDialogVideoInfo::ChooseArtType(const CFileItem &videoItem, map<string
dialog->SetItems(&items);
dialog->DoModal();
+ if (dialog->IsButtonPressed())
+ {
+ // Get the new artwork name
+ CStdString strArtworkName;
+ if (!CGUIKeyboardFactory::ShowAndGetInput(strArtworkName, g_localizeStrings.Get(13516), false))
+ return "";
+
+ return strArtworkName;
+ }
+
return dialog->GetSelectedItem()->GetLabel();
}