Skip to content
This repository
Browse code

Merge pull request #2163 from Montellese/artwork_add

add "Add art" button to video artwork selection dialog
  • Loading branch information...
commit e008bada2d11eec8631e08dd9a623f69bb4dc1e3 2 parents 07361ee + 2726cb1
Sascha Montellese authored February 06, 2013
7  language/English/strings.po
@@ -5383,7 +5383,12 @@ msgctxt "#13515"
5383 5383
 msgid "No art"
5384 5384
 msgstr ""
5385 5385
 
5386  
-#empty strings from id 13516 to 13549
  5386
+#: xbmc/video/dialogs/GUIDialogVideoInfo.cpp
  5387
+msgctxt "#13516"
  5388
+msgid "Add art"
  5389
+msgstr ""
  5390
+
  5391
+#empty strings from id 13517 to 13549
5387 5392
 
5388 5393
 #: xbmc/settings/GUISettings.cpp
5389 5394
 msgctxt "#13550"
12  xbmc/video/dialogs/GUIDialogVideoInfo.cpp
@@ -29,6 +29,7 @@
29 29
 #include "video/VideoInfoScanner.h"
30 30
 #include "ApplicationMessenger.h"
31 31
 #include "video/VideoInfoTag.h"
  32
+#include "guilib/GUIKeyboardFactory.h"
32 33
 #include "guilib/GUIWindowManager.h"
33 34
 #include "dialogs/GUIDialogOK.h"
34 35
 #include "dialogs/GUIDialogYesNo.h"
@@ -604,6 +605,7 @@ string CGUIDialogVideoInfo::ChooseArtType(const CFileItem &videoItem, map<string
604 605
   dialog->SetHeading(13511);
605 606
   dialog->Reset();
606 607
   dialog->SetUseDetails(true);
  608
+  dialog->EnableButton(true, 13516);
607 609
 
608 610
   CVideoDatabase db;
609 611
   db.Open();
@@ -631,6 +633,16 @@ string CGUIDialogVideoInfo::ChooseArtType(const CFileItem &videoItem, map<string
631 633
   dialog->SetItems(&items);
632 634
   dialog->DoModal();
633 635
 
  636
+  if (dialog->IsButtonPressed())
  637
+  {
  638
+    // Get the new artwork name
  639
+    CStdString strArtworkName;
  640
+    if (!CGUIKeyboardFactory::ShowAndGetInput(strArtworkName, g_localizeStrings.Get(13516), false))
  641
+      return "";
  642
+
  643
+    return strArtworkName;
  644
+  }
  645
+
634 646
   return dialog->GetSelectedItem()->GetLabel();
635 647
 }
636 648
 

0 notes on commit e008bad

Please sign in to comment.
Something went wrong with that request. Please try again.