Permalink
Browse files

Merge pull request #1194 from Memphiz/keyboardrefactor

Refactor of our GUI Keyboard for allowing native onscreen keyboards
  • Loading branch information...
2 parents e92898e + b648a45 commit 63c8b72748ae2f5a8ca8057ac55c8ed7799d804a @Memphiz Memphiz committed Aug 1, 2012
Showing with 1,012 additions and 407 deletions.
  1. +18 −6 XBMC-ATV2.xcodeproj/project.pbxproj
  2. +28 −6 XBMC-IOS.xcodeproj/project.pbxproj
  3. +14 −6 XBMC.xcodeproj/project.pbxproj
  4. +6 −3 project/VS2010Express/XBMC.vcxproj
  5. +16 −7 project/VS2010Express/XBMC.vcxproj.filters
  6. +2 −2 xbmc/Application.cpp
  7. +2 −2 xbmc/GUIPassword.cpp
  8. +2 −2 xbmc/addons/GUIDialogAddonSettings.cpp
  9. +2 −2 xbmc/dialogs/GUIDialogFavourites.cpp
  10. +2 −2 xbmc/dialogs/GUIDialogFileBrowser.cpp
  11. +0 −92 xbmc/dialogs/GUIDialogKeyboard.h
  12. +71 −209 xbmc/dialogs/{GUIDialogKeyboard.cpp → GUIDialogKeyboardGeneric.cpp}
  13. +86 −0 xbmc/dialogs/GUIDialogKeyboardGeneric.h
  14. +2 −2 xbmc/dialogs/GUIDialogMediaSource.cpp
  15. +2 −2 xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp
  16. +1 −1 xbmc/dialogs/Makefile
  17. +2 −2 xbmc/filesystem/IDirectory.cpp
  18. +4 −4 xbmc/guilib/GUIEditControl.cpp
  19. +39 −0 xbmc/guilib/GUIKeyboard.h
  20. +214 −0 xbmc/guilib/GUIKeyboardFactory.cpp
  21. +47 −0 xbmc/guilib/GUIKeyboardFactory.h
  22. +1 −0 xbmc/guilib/Makefile.in
  23. +2 −2 xbmc/interfaces/Builtins.cpp
  24. +8 −8 xbmc/interfaces/python/xbmcmodule/keyboard.cpp
  25. +2 −2 xbmc/interfaces/python/xbmcmodule/keyboard.h
  26. +4 −4 xbmc/music/infoscanner/MusicInfoScanner.cpp
  27. +6 −6 xbmc/music/windows/GUIWindowMusicBase.cpp
  28. +3 −3 xbmc/music/windows/GUIWindowMusicNav.cpp
  29. +2 −2 xbmc/music/windows/GUIWindowMusicPlaylist.cpp
  30. +2 −2 xbmc/music/windows/GUIWindowMusicPlaylistEditor.cpp
  31. +2 −2 xbmc/network/GUIDialogAccessPoints.cpp
  32. +34 −0 xbmc/osx/ios/IOSKeyboard.h
  33. +65 −0 xbmc/osx/ios/IOSKeyboard.mm
  34. +43 −0 xbmc/osx/ios/IOSKeyboardView.h
  35. +233 −0 xbmc/osx/ios/IOSKeyboardView.mm
  36. +3 −0 xbmc/osx/ios/XBMCController.h
  37. +16 −0 xbmc/osx/ios/XBMCController.mm
  38. +4 −4 xbmc/settings/GUIDialogLockSettings.cpp
  39. +4 −4 xbmc/settings/GUIDialogProfileSettings.cpp
  40. +2 −2 xbmc/settings/GUIDialogSettings.cpp
  41. +2 −2 xbmc/utils/FileUtils.cpp
  42. +6 −6 xbmc/video/windows/GUIWindowVideoBase.cpp
  43. +2 −2 xbmc/video/windows/GUIWindowVideoNav.cpp
  44. +2 −2 xbmc/video/windows/GUIWindowVideoPlaylist.cpp
  45. +2 −2 xbmc/windows/GUIMediaWindow.cpp
  46. +2 −2 xbmc/windows/GUIWindowFileManager.cpp
View
24 XBMC-ATV2.xcodeproj/project.pbxproj
@@ -56,6 +56,9 @@
DF527783151BAFD600B5B63B /* WebSocketV8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF52777D151BAFD600B5B63B /* WebSocketV8.cpp */; };
DF527788151BAFEE00B5B63B /* Base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF527784151BAFEE00B5B63B /* Base64.cpp */; };
DF527789151BAFEE00B5B63B /* HttpResponse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF527786151BAFEE00B5B63B /* HttpResponse.cpp */; };
+ DF830D4715BB2CFC00602BE6 /* GUIKeyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF830D4315BB2CFC00602BE6 /* GUIKeyboard.cpp */; };
+ DF830D4815BB2CFC00602BE6 /* GUIKeyboardFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF830D4515BB2CFC00602BE6 /* GUIKeyboardFactory.cpp */; };
+ DF830D4B15BB2D2300602BE6 /* GUIDialogKeyboardGeneric.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF830D4915BB2D2300602BE6 /* GUIDialogKeyboardGeneric.cpp */; };
DF93D7701444B09C007C6459 /* AFPFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D7381444B09C007C6459 /* AFPFile.cpp */; };
DF93D7731444B09C007C6459 /* CDDAFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D73E1444B09C007C6459 /* CDDAFile.cpp */; };
DF93D7741444B09C007C6459 /* CurlFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D7401444B09C007C6459 /* CurlFile.cpp */; };
@@ -333,7 +336,6 @@
F56C7959131EC154000AD0F6 /* GUIDialogFileBrowser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C736F131EC151000AD0F6 /* GUIDialogFileBrowser.cpp */; };
F56C795A131EC154000AD0F6 /* GUIDialogGamepad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C7371131EC151000AD0F6 /* GUIDialogGamepad.cpp */; };
F56C795B131EC154000AD0F6 /* GUIDialogKaiToast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C7373131EC151000AD0F6 /* GUIDialogKaiToast.cpp */; };
- F56C795C131EC154000AD0F6 /* GUIDialogKeyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C7375131EC151000AD0F6 /* GUIDialogKeyboard.cpp */; };
F56C795D131EC154000AD0F6 /* GUIDialogMediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C7377131EC151000AD0F6 /* GUIDialogMediaSource.cpp */; };
F56C795E131EC154000AD0F6 /* GUIDialogMuteBug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C7379131EC151000AD0F6 /* GUIDialogMuteBug.cpp */; };
F56C795F131EC154000AD0F6 /* GUIDialogNumeric.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C737B131EC151000AD0F6 /* GUIDialogNumeric.cpp */; };
@@ -1083,6 +1085,12 @@
DF527785151BAFEE00B5B63B /* Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Base64.h; sourceTree = "<group>"; };
DF527786151BAFEE00B5B63B /* HttpResponse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HttpResponse.cpp; sourceTree = "<group>"; };
DF527787151BAFEE00B5B63B /* HttpResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HttpResponse.h; sourceTree = "<group>"; };
+ DF830D4315BB2CFC00602BE6 /* GUIKeyboard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIKeyboard.cpp; sourceTree = "<group>"; };
+ DF830D4415BB2CFC00602BE6 /* GUIKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIKeyboard.h; sourceTree = "<group>"; };
+ DF830D4515BB2CFC00602BE6 /* GUIKeyboardFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIKeyboardFactory.cpp; sourceTree = "<group>"; };
+ DF830D4615BB2CFC00602BE6 /* GUIKeyboardFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIKeyboardFactory.h; sourceTree = "<group>"; };
+ DF830D4915BB2D2300602BE6 /* GUIDialogKeyboardGeneric.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogKeyboardGeneric.cpp; sourceTree = "<group>"; };
+ DF830D4A15BB2D2300602BE6 /* GUIDialogKeyboardGeneric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogKeyboardGeneric.h; sourceTree = "<group>"; };
DF93D7381444B09C007C6459 /* AFPFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AFPFile.cpp; sourceTree = "<group>"; };
DF93D7391444B09C007C6459 /* AFPFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFPFile.h; sourceTree = "<group>"; };
DF93D73E1444B09C007C6459 /* CDDAFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CDDAFile.cpp; sourceTree = "<group>"; };
@@ -1747,8 +1755,6 @@
F56C7372131EC151000AD0F6 /* GUIDialogGamepad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogGamepad.h; sourceTree = "<group>"; };
F56C7373131EC151000AD0F6 /* GUIDialogKaiToast.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogKaiToast.cpp; sourceTree = "<group>"; };
F56C7374131EC151000AD0F6 /* GUIDialogKaiToast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogKaiToast.h; sourceTree = "<group>"; };
- F56C7375131EC151000AD0F6 /* GUIDialogKeyboard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogKeyboard.cpp; sourceTree = "<group>"; };
- F56C7376131EC151000AD0F6 /* GUIDialogKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogKeyboard.h; sourceTree = "<group>"; };
F56C7377131EC151000AD0F6 /* GUIDialogMediaSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogMediaSource.cpp; sourceTree = "<group>"; };
F56C7378131EC151000AD0F6 /* GUIDialogMediaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogMediaSource.h; sourceTree = "<group>"; };
F56C7379131EC151000AD0F6 /* GUIDialogMuteBug.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogMuteBug.cpp; sourceTree = "<group>"; };
@@ -4194,8 +4200,8 @@
F56C7372131EC151000AD0F6 /* GUIDialogGamepad.h */,
F56C7373131EC151000AD0F6 /* GUIDialogKaiToast.cpp */,
F56C7374131EC151000AD0F6 /* GUIDialogKaiToast.h */,
- F56C7375131EC151000AD0F6 /* GUIDialogKeyboard.cpp */,
- F56C7376131EC151000AD0F6 /* GUIDialogKeyboard.h */,
+ DF830D4915BB2D2300602BE6 /* GUIDialogKeyboardGeneric.cpp */,
+ DF830D4A15BB2D2300602BE6 /* GUIDialogKeyboardGeneric.h */,
F56C7377131EC151000AD0F6 /* GUIDialogMediaSource.cpp */,
F56C7378131EC151000AD0F6 /* GUIDialogMediaSource.h */,
F56C7379131EC151000AD0F6 /* GUIDialogMuteBug.cpp */,
@@ -4615,6 +4621,10 @@
F56C74C1131EC152000AD0F6 /* GUIIncludes.h */,
F56C751C131EC152000AD0F6 /* GUIInfoTypes.cpp */,
F56C74C2131EC152000AD0F6 /* GUIInfoTypes.h */,
+ DF830D4315BB2CFC00602BE6 /* GUIKeyboard.cpp */,
+ DF830D4415BB2CFC00602BE6 /* GUIKeyboard.h */,
+ DF830D4515BB2CFC00602BE6 /* GUIKeyboardFactory.cpp */,
+ DF830D4615BB2CFC00602BE6 /* GUIKeyboardFactory.h */,
F56C751D131EC152000AD0F6 /* GUILabel.cpp */,
F56C74C3131EC152000AD0F6 /* GUILabel.h */,
F56C751E131EC152000AD0F6 /* GUILabelControl.cpp */,
@@ -6478,7 +6488,6 @@
F56C7959131EC154000AD0F6 /* GUIDialogFileBrowser.cpp in Sources */,
F56C795A131EC154000AD0F6 /* GUIDialogGamepad.cpp in Sources */,
F56C795B131EC154000AD0F6 /* GUIDialogKaiToast.cpp in Sources */,
- F56C795C131EC154000AD0F6 /* GUIDialogKeyboard.cpp in Sources */,
F56C795D131EC154000AD0F6 /* GUIDialogMediaSource.cpp in Sources */,
F56C795E131EC154000AD0F6 /* GUIDialogMuteBug.cpp in Sources */,
F56C795F131EC154000AD0F6 /* GUIDialogNumeric.cpp in Sources */,
@@ -7219,6 +7228,9 @@
36A9465315AA269B00727135 /* DirectoryNodeTags.cpp in Sources */,
7C1D698B15A8142F00658B65 /* DatabaseManager.cpp in Sources */,
7C1A493D15A968BA004AF4A4 /* SeekHandler.cpp in Sources */,
+ DF830D4715BB2CFC00602BE6 /* GUIKeyboard.cpp in Sources */,
+ DF830D4815BB2CFC00602BE6 /* GUIKeyboardFactory.cpp in Sources */,
+ DF830D4B15BB2D2300602BE6 /* GUIDialogKeyboardGeneric.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
34 XBMC-IOS.xcodeproj/project.pbxproj
@@ -43,6 +43,7 @@
C893606F152C870600812418 /* monitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C893606D152C870600812418 /* monitor.cpp */; };
C8936072152C871400812418 /* PythonMonitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C8936070152C871400812418 /* PythonMonitor.cpp */; };
C8EC5D26136953E100CCC10D /* XBMC_keytable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C8EC5D24136953E100CCC10D /* XBMC_keytable.cpp */; };
+ DF02A888153382A60084754E /* IOSKeyboard.mm in Sources */ = {isa = PBXBuildFile; fileRef = DF02A887153382A60084754E /* IOSKeyboard.mm */; };
DF0DF18013A3AF9F008ED511 /* NFSDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF0DF17D13A3AF9F008ED511 /* NFSDirectory.cpp */; };
DF2E329415509B2C000F5772 /* XbmcContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF2E329215509B2C000F5772 /* XbmcContext.cpp */; };
DF33C29415509BF50046CDCB /* ilog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF33C29115509BF50046CDCB /* ilog.cpp */; };
@@ -56,6 +57,8 @@
DF52775A151BAF8200B5B63B /* WebSocketV8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF527754151BAF8200B5B63B /* WebSocketV8.cpp */; };
DF527760151BAFA000B5B63B /* Base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF52775C151BAFA000B5B63B /* Base64.cpp */; };
DF527761151BAFA000B5B63B /* HttpResponse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF52775E151BAFA000B5B63B /* HttpResponse.cpp */; };
+ DF830C9515BB20FC00602BE6 /* GUIDialogKeyboardGeneric.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF830C9315BB20FC00602BE6 /* GUIDialogKeyboardGeneric.cpp */; };
+ DF830C9E15BB215500602BE6 /* GUIKeyboardFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF830C9C15BB215500602BE6 /* GUIKeyboardFactory.cpp */; };
DF93D7CF1444B105007C6459 /* AFPFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D7971444B105007C6459 /* AFPFile.cpp */; };
DF93D7D21444B105007C6459 /* CDDAFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D79D1444B105007C6459 /* CDDAFile.cpp */; };
DF93D7D31444B105007C6459 /* CurlFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D79F1444B105007C6459 /* CurlFile.cpp */; };
@@ -121,6 +124,7 @@
DFDB00251516403A005079A4 /* DirectoryCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DFDB001E1516403A005079A4 /* DirectoryCache.cpp */; };
DFDB00261516403A005079A4 /* FileCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DFDB00201516403A005079A4 /* FileCache.cpp */; };
DFDB00271516403A005079A4 /* MemBufferCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DFDB00221516403A005079A4 /* MemBufferCache.cpp */; };
+ DFE3505B1532535500F84CAA /* IOSKeyboardView.mm in Sources */ = {isa = PBXBuildFile; fileRef = DFE3505A1532535500F84CAA /* IOSKeyboardView.mm */; };
DFFD59401506B5B10088DE4B /* IOSEAGLView.mm in Sources */ = {isa = PBXBuildFile; fileRef = DFFD593F1506B5B10088DE4B /* IOSEAGLView.mm */; };
DFFEFBEE15160739001294DC /* IOSScreenManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = DFFEFBED15160739001294DC /* IOSScreenManager.mm */; };
DFFEFC0415160808001294DC /* IOSExternalTouchController.mm in Sources */ = {isa = PBXBuildFile; fileRef = DFFEFC0315160808001294DC /* IOSExternalTouchController.mm */; };
@@ -423,7 +427,6 @@
F56C8943131F42ED000AD0F6 /* GUIDialogFileBrowser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C8352131F42E8000AD0F6 /* GUIDialogFileBrowser.cpp */; };
F56C8944131F42ED000AD0F6 /* GUIDialogGamepad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C8354131F42E8000AD0F6 /* GUIDialogGamepad.cpp */; };
F56C8945131F42ED000AD0F6 /* GUIDialogKaiToast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C8356131F42E8000AD0F6 /* GUIDialogKaiToast.cpp */; };
- F56C8946131F42ED000AD0F6 /* GUIDialogKeyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C8358131F42E8000AD0F6 /* GUIDialogKeyboard.cpp */; };
F56C8947131F42ED000AD0F6 /* GUIDialogMediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C835A131F42E8000AD0F6 /* GUIDialogMediaSource.cpp */; };
F56C8948131F42ED000AD0F6 /* GUIDialogMuteBug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C835C131F42E8000AD0F6 /* GUIDialogMuteBug.cpp */; };
F56C8949131F42ED000AD0F6 /* GUIDialogNumeric.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F56C835E131F42E8000AD0F6 /* GUIDialogNumeric.cpp */; };
@@ -1055,6 +1058,10 @@
C8936071152C871400812418 /* PythonMonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PythonMonitor.h; sourceTree = "<group>"; };
C8EC5D24136953E100CCC10D /* XBMC_keytable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XBMC_keytable.cpp; sourceTree = "<group>"; };
C8EC5D25136953E100CCC10D /* XBMC_keytable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XBMC_keytable.h; sourceTree = "<group>"; };
+ DF02A831153373EC0084754E /* GUIKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIKeyboard.h; sourceTree = "<group>"; };
+ DF02A86D153381990084754E /* GUIKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIKeyboard.h; sourceTree = "<group>"; };
+ DF02A881153382560084754E /* IOSKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOSKeyboard.h; sourceTree = "<group>"; };
+ DF02A887153382A60084754E /* IOSKeyboard.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = IOSKeyboard.mm; sourceTree = "<group>"; };
DF0DF17D13A3AF9F008ED511 /* NFSDirectory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NFSDirectory.cpp; sourceTree = "<group>"; };
DF0DF17E13A3AF9F008ED511 /* NFSDirectory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NFSDirectory.h; sourceTree = "<group>"; };
DF2E329215509B2C000F5772 /* XbmcContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XbmcContext.cpp; sourceTree = "<group>"; };
@@ -1081,6 +1088,10 @@
DF52775D151BAFA000B5B63B /* Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Base64.h; sourceTree = "<group>"; };
DF52775E151BAFA000B5B63B /* HttpResponse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HttpResponse.cpp; sourceTree = "<group>"; };
DF52775F151BAFA000B5B63B /* HttpResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HttpResponse.h; sourceTree = "<group>"; };
+ DF830C9315BB20FC00602BE6 /* GUIDialogKeyboardGeneric.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogKeyboardGeneric.cpp; sourceTree = "<group>"; };
+ DF830C9415BB20FC00602BE6 /* GUIDialogKeyboardGeneric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogKeyboardGeneric.h; sourceTree = "<group>"; };
+ DF830C9C15BB215500602BE6 /* GUIKeyboardFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIKeyboardFactory.cpp; sourceTree = "<group>"; };
+ DF830C9D15BB215500602BE6 /* GUIKeyboardFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIKeyboardFactory.h; sourceTree = "<group>"; };
DF93D7971444B105007C6459 /* AFPFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AFPFile.cpp; sourceTree = "<group>"; };
DF93D7981444B105007C6459 /* AFPFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFPFile.h; sourceTree = "<group>"; };
DF93D79D1444B105007C6459 /* CDDAFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CDDAFile.cpp; sourceTree = "<group>"; };
@@ -1225,6 +1236,8 @@
DFDB00211516403A005079A4 /* FileCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileCache.h; sourceTree = "<group>"; };
DFDB00221516403A005079A4 /* MemBufferCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemBufferCache.cpp; sourceTree = "<group>"; };
DFDB00231516403A005079A4 /* MemBufferCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemBufferCache.h; sourceTree = "<group>"; };
+ DFE350591532535500F84CAA /* IOSKeyboardView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOSKeyboardView.h; sourceTree = "<group>"; };
+ DFE3505A1532535500F84CAA /* IOSKeyboardView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = IOSKeyboardView.mm; sourceTree = "<group>"; };
DFFD593E1506B5B10088DE4B /* IOSEAGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOSEAGLView.h; sourceTree = "<group>"; };
DFFD593F1506B5B10088DE4B /* IOSEAGLView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = IOSEAGLView.mm; sourceTree = "<group>"; };
DFFEFBEC15160739001294DC /* IOSScreenManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOSScreenManager.h; sourceTree = "<group>"; };
@@ -1943,8 +1956,6 @@
F56C8355131F42E8000AD0F6 /* GUIDialogGamepad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogGamepad.h; sourceTree = "<group>"; };
F56C8356131F42E8000AD0F6 /* GUIDialogKaiToast.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogKaiToast.cpp; sourceTree = "<group>"; };
F56C8357131F42E8000AD0F6 /* GUIDialogKaiToast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogKaiToast.h; sourceTree = "<group>"; };
- F56C8358131F42E8000AD0F6 /* GUIDialogKeyboard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogKeyboard.cpp; sourceTree = "<group>"; };
- F56C8359131F42E8000AD0F6 /* GUIDialogKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogKeyboard.h; sourceTree = "<group>"; };
F56C835A131F42E8000AD0F6 /* GUIDialogMediaSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogMediaSource.cpp; sourceTree = "<group>"; };
F56C835B131F42E8000AD0F6 /* GUIDialogMediaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogMediaSource.h; sourceTree = "<group>"; };
F56C835C131F42E8000AD0F6 /* GUIDialogMuteBug.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogMuteBug.cpp; sourceTree = "<group>"; };
@@ -4550,8 +4561,8 @@
F56C8355131F42E8000AD0F6 /* GUIDialogGamepad.h */,
F56C8356131F42E8000AD0F6 /* GUIDialogKaiToast.cpp */,
F56C8357131F42E8000AD0F6 /* GUIDialogKaiToast.h */,
- F56C8358131F42E8000AD0F6 /* GUIDialogKeyboard.cpp */,
- F56C8359131F42E8000AD0F6 /* GUIDialogKeyboard.h */,
+ DF830C9315BB20FC00602BE6 /* GUIDialogKeyboardGeneric.cpp */,
+ DF830C9415BB20FC00602BE6 /* GUIDialogKeyboardGeneric.h */,
F56C835A131F42E8000AD0F6 /* GUIDialogMediaSource.cpp */,
F56C835B131F42E8000AD0F6 /* GUIDialogMediaSource.h */,
F56C835C131F42E8000AD0F6 /* GUIDialogMuteBug.cpp */,
@@ -4971,6 +4982,9 @@
F56C84A4131F42E9000AD0F6 /* GUIIncludes.h */,
F56C84FF131F42E9000AD0F6 /* GUIInfoTypes.cpp */,
F56C84A5131F42E9000AD0F6 /* GUIInfoTypes.h */,
+ DF830C9C15BB215500602BE6 /* GUIKeyboardFactory.cpp */,
+ DF830C9D15BB215500602BE6 /* GUIKeyboardFactory.h */,
+ DF02A831153373EC0084754E /* GUIKeyboard.h */,
F56C8500131F42E9000AD0F6 /* GUILabel.cpp */,
F56C84A6131F42E9000AD0F6 /* GUILabel.h */,
F56C8501131F42E9000AD0F6 /* GUILabelControl.cpp */,
@@ -5084,6 +5098,7 @@
F56C84DF131F42E9000AD0F6 /* XBTF.h */,
F56C8535131F42E9000AD0F6 /* XBTFReader.cpp */,
F56C84E0131F42E9000AD0F6 /* XBTFReader.h */,
+ DF02A86D153381990084754E /* GUIKeyboard.h */,
);
path = guilib;
sourceTree = "<group>";
@@ -5969,6 +5984,10 @@
isa = PBXGroup;
children = (
F56C8BB6131F44AA000AD0F6 /* English.lproj */,
+ DF02A887153382A60084754E /* IOSKeyboard.mm */,
+ DF02A881153382560084754E /* IOSKeyboard.h */,
+ DFE350591532535500F84CAA /* IOSKeyboardView.h */,
+ DFE3505A1532535500F84CAA /* IOSKeyboardView.mm */,
F56C8B9E131F4466000AD0F6 /* XBMC.png */,
F56C8B9F131F4466000AD0F6 /* XBMCApplication.h */,
F56C8BA0131F4466000AD0F6 /* XBMCApplication.m */,
@@ -6580,7 +6599,6 @@
F56C8943131F42ED000AD0F6 /* GUIDialogFileBrowser.cpp in Sources */,
F56C8944131F42ED000AD0F6 /* GUIDialogGamepad.cpp in Sources */,
F56C8945131F42ED000AD0F6 /* GUIDialogKaiToast.cpp in Sources */,
- F56C8946131F42ED000AD0F6 /* GUIDialogKeyboard.cpp in Sources */,
F56C8947131F42ED000AD0F6 /* GUIDialogMediaSource.cpp in Sources */,
F56C8948131F42ED000AD0F6 /* GUIDialogMuteBug.cpp in Sources */,
F56C8949131F42ED000AD0F6 /* GUIDialogNumeric.cpp in Sources */,
@@ -7230,6 +7248,10 @@
36A9465B15AA26BC00727135 /* DirectoryNodeTags.cpp in Sources */,
7C1D697815A8141000658B65 /* DatabaseManager.cpp in Sources */,
7C1A495315A968FB004AF4A4 /* SeekHandler.cpp in Sources */,
+ DFE3505B1532535500F84CAA /* IOSKeyboardView.mm in Sources */,
+ DF02A888153382A60084754E /* IOSKeyboard.mm in Sources */,
+ DF830C9515BB20FC00602BE6 /* GUIDialogKeyboardGeneric.cpp in Sources */,
+ DF830C9E15BB215500602BE6 /* GUIKeyboardFactory.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
20 XBMC.xcodeproj/project.pbxproj
@@ -342,6 +342,8 @@
DF527736151BAF4C00B5B63B /* WebSocketV13.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF52772F151BAF4C00B5B63B /* WebSocketV13.cpp */; };
DF527737151BAF4C00B5B63B /* WebSocketV8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF527731151BAF4C00B5B63B /* WebSocketV8.cpp */; };
DF673AA51443819600A5A509 /* AddonManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18B49FF41152BFA5001AF8A6 /* AddonManager.cpp */; };
+ DF830D0C15BB260C00602BE6 /* GUIDialogKeyboardGeneric.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF830D0A15BB260C00602BE6 /* GUIDialogKeyboardGeneric.cpp */; };
+ DF830D1215BB262700602BE6 /* GUIKeyboardFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF830D0F15BB262700602BE6 /* GUIKeyboardFactory.cpp */; };
DF93D65D1444A7A3007C6459 /* SlingboxDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D65C1444A7A3007C6459 /* SlingboxDirectory.cpp */; };
DF93D6991444A8B1007C6459 /* AFPFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6631444A8B0007C6459 /* AFPFile.cpp */; };
DF93D69A1444A8B1007C6459 /* DirectoryCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6651444A8B0007C6459 /* DirectoryCache.cpp */; };
@@ -593,7 +595,6 @@
E38E20810D25F9FD00618676 /* GUIDialogFileBrowser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E17A80D25F9FA00618676 /* GUIDialogFileBrowser.cpp */; };
E38E20820D25F9FD00618676 /* GUIDialogFileStacking.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E17AA0D25F9FA00618676 /* GUIDialogFileStacking.cpp */; };
E38E20830D25F9FD00618676 /* GUIDialogGamepad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E17AC0D25F9FA00618676 /* GUIDialogGamepad.cpp */; };
- E38E20870D25F9FD00618676 /* GUIDialogKeyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E17B40D25F9FA00618676 /* GUIDialogKeyboard.cpp */; };
E38E20890D25F9FD00618676 /* GUIDialogMediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E17B80D25F9FA00618676 /* GUIDialogMediaSource.cpp */; };
E38E208A0D25F9FD00618676 /* GUIDialogMusicOSD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E17BA0D25F9FA00618676 /* GUIDialogMusicOSD.cpp */; };
E38E208B0D25F9FD00618676 /* GUIDialogMusicScan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38E17BC0D25F9FA00618676 /* GUIDialogMusicScan.cpp */; };
@@ -1708,6 +1709,11 @@
DF527730151BAF4C00B5B63B /* WebSocketV13.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSocketV13.h; sourceTree = "<group>"; };
DF527731151BAF4C00B5B63B /* WebSocketV8.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebSocketV8.cpp; sourceTree = "<group>"; };
DF527732151BAF4C00B5B63B /* WebSocketV8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSocketV8.h; sourceTree = "<group>"; };
+ DF830D0A15BB260C00602BE6 /* GUIDialogKeyboardGeneric.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogKeyboardGeneric.cpp; sourceTree = "<group>"; };
+ DF830D0B15BB260C00602BE6 /* GUIDialogKeyboardGeneric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogKeyboardGeneric.h; sourceTree = "<group>"; };
+ DF830D0E15BB262700602BE6 /* GUIKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIKeyboard.h; sourceTree = "<group>"; };
+ DF830D0F15BB262700602BE6 /* GUIKeyboardFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIKeyboardFactory.cpp; sourceTree = "<group>"; };
+ DF830D1015BB262700602BE6 /* GUIKeyboardFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIKeyboardFactory.h; sourceTree = "<group>"; };
DF93D65B1444A7A3007C6459 /* SlingboxDirectory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlingboxDirectory.h; sourceTree = "<group>"; };
DF93D65C1444A7A3007C6459 /* SlingboxDirectory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SlingboxDirectory.cpp; sourceTree = "<group>"; };
DF93D6631444A8B0007C6459 /* AFPFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AFPFile.cpp; sourceTree = "<group>"; };
@@ -2261,8 +2267,6 @@
E38E17AB0D25F9FA00618676 /* GUIDialogFileStacking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogFileStacking.h; sourceTree = "<group>"; };
E38E17AC0D25F9FA00618676 /* GUIDialogGamepad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogGamepad.cpp; sourceTree = "<group>"; };
E38E17AD0D25F9FA00618676 /* GUIDialogGamepad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogGamepad.h; sourceTree = "<group>"; };
- E38E17B40D25F9FA00618676 /* GUIDialogKeyboard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogKeyboard.cpp; sourceTree = "<group>"; };
- E38E17B50D25F9FA00618676 /* GUIDialogKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogKeyboard.h; sourceTree = "<group>"; };
E38E17B80D25F9FA00618676 /* GUIDialogMediaSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogMediaSource.cpp; sourceTree = "<group>"; };
E38E17B90D25F9FA00618676 /* GUIDialogMediaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDialogMediaSource.h; sourceTree = "<group>"; };
E38E17BA0D25F9FA00618676 /* GUIDialogMusicOSD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIDialogMusicOSD.cpp; sourceTree = "<group>"; };
@@ -3315,6 +3319,9 @@
18B7C7171294222D009E7A26 /* GUIIncludes.h */,
18B7C7721294222E009E7A26 /* GUIInfoTypes.cpp */,
18B7C7181294222D009E7A26 /* GUIInfoTypes.h */,
+ DF830D0E15BB262700602BE6 /* GUIKeyboard.h */,
+ DF830D0F15BB262700602BE6 /* GUIKeyboardFactory.cpp */,
+ DF830D1015BB262700602BE6 /* GUIKeyboardFactory.h */,
18B7C7731294222E009E7A26 /* GUILabel.cpp */,
18B7C7191294222D009E7A26 /* GUILabel.h */,
18B7C7741294222E009E7A26 /* GUILabelControl.cpp */,
@@ -3766,8 +3773,8 @@
E38E17AD0D25F9FA00618676 /* GUIDialogGamepad.h */,
E38A06CC0D95AA5500FF8227 /* GUIDialogKaiToast.cpp */,
E38A06CD0D95AA5500FF8227 /* GUIDialogKaiToast.h */,
- E38E17B40D25F9FA00618676 /* GUIDialogKeyboard.cpp */,
- E38E17B50D25F9FA00618676 /* GUIDialogKeyboard.h */,
+ DF830D0A15BB260C00602BE6 /* GUIDialogKeyboardGeneric.cpp */,
+ DF830D0B15BB260C00602BE6 /* GUIDialogKeyboardGeneric.h */,
E38E17B80D25F9FA00618676 /* GUIDialogMediaSource.cpp */,
E38E17B90D25F9FA00618676 /* GUIDialogMediaSource.h */,
E38E17BE0D25F9FA00618676 /* GUIDialogMuteBug.cpp */,
@@ -6539,7 +6546,6 @@
E38E20810D25F9FD00618676 /* GUIDialogFileBrowser.cpp in Sources */,
E38E20820D25F9FD00618676 /* GUIDialogFileStacking.cpp in Sources */,
E38E20830D25F9FD00618676 /* GUIDialogGamepad.cpp in Sources */,
- E38E20870D25F9FD00618676 /* GUIDialogKeyboard.cpp in Sources */,
E38E20890D25F9FD00618676 /* GUIDialogMediaSource.cpp in Sources */,
E38E208A0D25F9FD00618676 /* GUIDialogMusicOSD.cpp in Sources */,
E38E208B0D25F9FD00618676 /* GUIDialogMusicScan.cpp in Sources */,
@@ -7311,6 +7317,8 @@
36A9464C15AA25FD00727135 /* DirectoryNodeTags.cpp in Sources */,
7C1D682915A7D2FD00658B65 /* DatabaseManager.cpp in Sources */,
7C1A492315A962EE004AF4A4 /* SeekHandler.cpp in Sources */,
+ DF830D0C15BB260C00602BE6 /* GUIDialogKeyboardGeneric.cpp in Sources */,
+ DF830D1215BB262700602BE6 /* GUIKeyboardFactory.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
9 project/VS2010Express/XBMC.vcxproj
@@ -335,7 +335,7 @@
<ClCompile Include="..\..\xbmc\dialogs\GUIDialogFileBrowser.cpp" />
<ClCompile Include="..\..\xbmc\dialogs\GUIDialogGamepad.cpp" />
<ClCompile Include="..\..\xbmc\dialogs\GUIDialogKaiToast.cpp" />
- <ClCompile Include="..\..\xbmc\dialogs\GUIDialogKeyboard.cpp" />
+ <ClCompile Include="..\..\xbmc\dialogs\GUIDialogKeyboardGeneric.cpp" />
<ClCompile Include="..\..\xbmc\dialogs\GUIDialogMediaSource.cpp" />
<ClCompile Include="..\..\xbmc\dialogs\GUIDialogMuteBug.cpp" />
<ClCompile Include="..\..\xbmc\dialogs\GUIDialogNumeric.cpp" />
@@ -496,6 +496,7 @@
<ClCompile Include="..\..\xbmc\guilib\GUIImage.cpp" />
<ClCompile Include="..\..\xbmc\guilib\GUIIncludes.cpp" />
<ClCompile Include="..\..\xbmc\guilib\GUIInfoTypes.cpp" />
+ <ClCompile Include="..\..\xbmc\guilib\GUIKeyboardFactory.cpp" />
<ClCompile Include="..\..\xbmc\guilib\GUILabel.cpp" />
<ClCompile Include="..\..\xbmc\guilib\GUILabelControl.cpp" />
<ClCompile Include="..\..\xbmc\guilib\GUIListContainer.cpp" />
@@ -921,10 +922,13 @@
<ClInclude Include="..\..\xbmc\cores\AudioEngine\Utils\AEWAVLoader.h" />
<ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Audio\DVDAudioCodecPassthrough.h" />
<ClInclude Include="..\..\xbmc\cores\paplayer\PCMCodec.h" />
+ <ClInclude Include="..\..\xbmc\dialogs\GUIDialogKeyboardGeneric.h" />
<ClInclude Include="..\..\xbmc\filesystem\ImageFile.h" />
<ClInclude Include="..\..\xbmc\filesystem\VideoDatabaseDirectory\DirectoryNodeTags.h" />
<ClInclude Include="..\..\xbmc\filesystem\windows\WINFileSMB.h" />
<ClInclude Include="..\..\xbmc\filesystem\windows\WINSMBDirectory.h" />
+ <ClInclude Include="..\..\xbmc\guilib\GUIKeyboard.h" />
+ <ClInclude Include="..\..\xbmc\guilib\GUIKeyboardFactory.h" />
<ClInclude Include="..\..\xbmc\input\windows\WINJoystick.h" />
<ClInclude Include="..\..\xbmc\interfaces\python\xbmcmodule\pythreadstate.h" />
<ClInclude Include="..\..\xbmc\network\httprequesthandler\HTTPImageHandler.h" />
@@ -1468,7 +1472,6 @@
<ClInclude Include="..\..\xbmc\dialogs\GUIDialogFileBrowser.h" />
<ClInclude Include="..\..\xbmc\dialogs\GUIDialogGamepad.h" />
<ClInclude Include="..\..\xbmc\dialogs\GUIDialogKaiToast.h" />
- <ClInclude Include="..\..\xbmc\dialogs\GUIDialogKeyboard.h" />
<ClInclude Include="..\..\xbmc\dialogs\GUIDialogMediaSource.h" />
<ClInclude Include="..\..\xbmc\dialogs\GUIDialogMuteBug.h" />
<ClInclude Include="..\..\xbmc\dialogs\GUIDialogNumeric.h" />
@@ -2282,4 +2285,4 @@
</VisualStudio>
</ProjectExtensions>
<Import Project="$(SolutionDir)\$(ProjectFileName).targets.user" Condition="Exists('$(SolutionDir)\$(ProjectFileName).targets.user')" />
-</Project>
+</Project>
View
23 project/VS2010Express/XBMC.vcxproj.filters
@@ -897,9 +897,6 @@
<ClCompile Include="..\..\xbmc\dialogs\GUIDialogKaiToast.cpp">
<Filter>dialogs</Filter>
</ClCompile>
- <ClCompile Include="..\..\xbmc\dialogs\GUIDialogKeyboard.cpp">
- <Filter>dialogs</Filter>
- </ClCompile>
<ClCompile Include="..\..\xbmc\dialogs\GUIDialogMediaSource.cpp">
<Filter>dialogs</Filter>
</ClCompile>
@@ -2587,6 +2584,12 @@
<ClCompile Include="..\..\xbmc\utils\EndianSwap.cpp">
<Filter>utils</Filter>
</ClCompile>
+ <ClCompile Include="..\..\xbmc\guilib\GUIKeyboardFactory.cpp">
+ <Filter>guilib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\dialogs\GUIDialogKeyboardGeneric.cpp">
+ <Filter>dialogs</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\xbmc\win32\pch.h">
@@ -3402,9 +3405,6 @@
<ClInclude Include="..\..\xbmc\dialogs\GUIDialogKaiToast.h">
<Filter>dialogs</Filter>
</ClInclude>
- <ClInclude Include="..\..\xbmc\dialogs\GUIDialogKeyboard.h">
- <Filter>dialogs</Filter>
- </ClInclude>
<ClInclude Include="..\..\xbmc\dialogs\GUIDialogMediaSource.h">
<Filter>dialogs</Filter>
</ClInclude>
@@ -5215,6 +5215,15 @@
<ClInclude Include="..\..\xbmc\filesystem\VideoDatabaseDirectory\DirectoryNodeTags.h">
<Filter>filesystem\VideoDatabaseDirectory</Filter>
</ClInclude>
+ <ClInclude Include="..\..\xbmc\guilib\GUIKeyboard.h">
+ <Filter>guilib</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\guilib\GUIKeyboardFactory.h">
+ <Filter>guilib</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\dialogs\GUIDialogKeyboardGeneric.h">
+ <Filter>dialogs</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\xbmc\win32\XBMC_PC.rc">
@@ -5226,4 +5235,4 @@
<Filter>win32</Filter>
</CustomBuild>
</ItemGroup>
-</Project>
+</Project>
View
4 xbmc/Application.cpp
@@ -233,7 +233,7 @@
#include "settings/GUIDialogContentSettings.h"
#include "video/dialogs/GUIDialogVideoScan.h"
#include "dialogs/GUIDialogBusy.h"
-#include "dialogs/GUIDialogKeyboard.h"
+#include "dialogs/GUIDialogKeyboardGeneric.h"
#include "dialogs/GUIDialogYesNo.h"
#include "dialogs/GUIDialogOK.h"
#include "dialogs/GUIDialogProgress.h"
@@ -1209,7 +1209,7 @@ bool CApplication::Initialize()
g_windowManager.Add(new CGUIWindowPointer); // window id = 99
g_windowManager.Add(new CGUIDialogYesNo); // window id = 100
g_windowManager.Add(new CGUIDialogProgress); // window id = 101
- g_windowManager.Add(new CGUIDialogKeyboard); // window id = 103
+ g_windowManager.Add(new CGUIDialogKeyboardGeneric); // window id = 103
g_windowManager.Add(new CGUIDialogVolumeBar); // window id = 104
g_windowManager.Add(new CGUIDialogSeekBar); // window id = 115
g_windowManager.Add(new CGUIDialogSubMenu); // window id = 105
View
4 xbmc/GUIPassword.cpp
@@ -23,7 +23,7 @@
#include "GUIUserMessages.h"
#include "ApplicationMessenger.h"
#include "dialogs/GUIDialogGamepad.h"
-#include "dialogs/GUIDialogKeyboard.h"
+#include "guilib/GUIKeyboardFactory.h"
#include "dialogs/GUIDialogNumeric.h"
#include "dialogs/GUIDialogOK.h"
#include "settings/GUIDialogLockSettings.h"
@@ -466,7 +466,7 @@ int CGUIPassword::VerifyPassword(LockType btnType, const CStdString& strPassword
iVerifyPasswordResult = CGUIDialogGamepad::ShowAndVerifyPassword(const_cast<CStdString&>(strPassword), strHeading, 0);
break;
case LOCK_MODE_QWERTY:
- iVerifyPasswordResult = CGUIDialogKeyboard::ShowAndVerifyPassword(const_cast<CStdString&>(strPassword), strHeading, 0);
+ iVerifyPasswordResult = CGUIKeyboardFactory::ShowAndVerifyPassword(const_cast<CStdString&>(strPassword), strHeading, 0);
break;
default: // must not be supported, treat as unlocked
iVerifyPasswordResult = 0;
View
4 xbmc/addons/GUIDialogAddonSettings.cpp
@@ -40,7 +40,7 @@
#include "addons/Scraper.h"
#include "guilib/GUIWindowManager.h"
#include "ApplicationMessenger.h"
-#include "dialogs/GUIDialogKeyboard.h"
+#include "guilib/GUIKeyboardFactory.h"
#include "FileItem.h"
#include "settings/Settings.h"
#include "GUIInfoManager.h"
@@ -251,7 +251,7 @@ bool CGUIDialogAddonSettings::ShowVirtualKeyboard(int iControl)
if (bEncoded)
CURL::Decode(value);
- if (CGUIDialogKeyboard::ShowAndGetInput(value, label, true, bHidden))
+ if (CGUIKeyboardFactory::ShowAndGetInput(value, label, true, bHidden))
{
// if hidden hide input
if (bHidden)
View
4 xbmc/dialogs/GUIDialogFavourites.cpp
@@ -23,7 +23,7 @@
#include "GUIDialogContextMenu.h"
#include "Favourites.h"
#include "guilib/GUIWindowManager.h"
-#include "GUIDialogKeyboard.h"
+#include "guilib/GUIKeyboardFactory.h"
#include "FileItem.h"
#include "guilib/LocalizeStrings.h"
@@ -172,7 +172,7 @@ void CGUIDialogFavourites::OnRename(int item)
return;
CStdString label((*m_favourites)[item]->GetLabel());
- if (CGUIDialogKeyboard::ShowAndGetInput(label, g_localizeStrings.Get(16008), false))
+ if (CGUIKeyboardFactory::ShowAndGetInput(label, g_localizeStrings.Get(16008), false))
(*m_favourites)[item]->SetLabel(label);
CFavourites::Save(*m_favourites);
View
4 xbmc/dialogs/GUIDialogFileBrowser.cpp
@@ -33,7 +33,7 @@
#include "Application.h"
#include "GUIDialogOK.h"
#include "GUIDialogYesNo.h"
-#include "GUIDialogKeyboard.h"
+#include "guilib/GUIKeyboardFactory.h"
#include "GUIUserMessages.h"
#include "filesystem/Directory.h"
#include "filesystem/File.h"
@@ -247,7 +247,7 @@ bool CGUIDialogFileBrowser::OnMessage(CGUIMessage& message)
else if (message.GetSenderId() == CONTROL_NEWFOLDER)
{
CStdString strInput;
- if (CGUIDialogKeyboard::ShowAndGetInput(strInput,g_localizeStrings.Get(119),false))
+ if (CGUIKeyboardFactory::ShowAndGetInput(strInput,g_localizeStrings.Get(119),false))
{
CStdString strPath;
URIUtils::AddFileToFolder(m_vecItems->GetPath(),strInput,strPath);
View
92 xbmc/dialogs/GUIDialogKeyboard.h
@@ -1,92 +0,0 @@
-#pragma once
-
-/*
- * 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
- *
- */
-
-#include "guilib/GUIDialog.h"
-#include "utils/Variant.h"
-
-enum KEYBOARD {CAPS, LOWER, SYMBOLS };
-
-class CGUIDialogKeyboard: public CGUIDialog
-{
-
-public:
- CGUIDialogKeyboard(void);
- virtual ~CGUIDialogKeyboard(void);
-
- virtual void FrameMove();
- void SetHeading(const CVariant& heading);
- void SetText(const CStdString& aTextString);
- CStdString GetText() const;
- bool IsConfirmed() { return m_bIsConfirmed; };
- void SetHiddenInput(bool hiddenInput) { m_hiddenInput = hiddenInput; };
-
- static bool ShowAndGetInput(CStdString& aTextString, bool allowEmptyResult);
- static bool ShowAndGetInput(CStdString& aTextString, const CVariant &heading, bool allowEmptyResult, bool hiddenInput = false);
- static bool ShowAndGetNewPassword(CStdString& strNewPassword);
- static bool ShowAndGetNewPassword(CStdString& newPassword, const CVariant &heading, bool allowEmpty);
- static bool ShowAndVerifyNewPassword(CStdString& strNewPassword);
- static bool ShowAndVerifyNewPassword(CStdString& newPassword, const CVariant &heading, bool allowEmpty);
- static int ShowAndVerifyPassword(CStdString& strPassword, const CStdString& strHeading, int iRetries);
- static bool ShowAndGetFilter(CStdString& aTextString, bool searching);
-protected:
- virtual void OnInitWindow();
- virtual bool OnAction(const CAction &action);
- virtual bool OnMessage(CGUIMessage& message);
- virtual void OnDeinitWindow(int nextWindowID);
- void SetControlLabel(int id, const CStdString &label);
- void OnShift();
- void MoveCursor(int iAmount);
- int GetCursorPos() const;
- void OnSymbols();
- void OnIPAddress();
- void OnOK();
-
-private:
-
- void OnClickButton(int iButtonControl);
- void OnRemoteNumberClick(int key);
- void UpdateButtons();
- char GetCharacter(int iButton);
- void UpdateLabel();
- void ResetShiftAndSymbols();
-
- void Character(WCHAR wch);
- void Backspace();
- void SendSearchMessage();
-
- CStdStringW m_strEdit;
- bool m_bIsConfirmed;
- KEYBOARD m_keyType;
- int m_iMode;
- bool m_bShift;
- bool m_hiddenInput;
- // filtering type
- enum FILTERING { FILTERING_NONE = 0, FILTERING_CURRENT, FILTERING_SEARCH };
- FILTERING m_filtering;
-
- unsigned int m_lastRemoteClickTime;
- WORD m_lastRemoteKeyClicked;
- int m_indexInSeries;
- CStdString m_strHeading;
- static const char* s_charsSeries[10];
-};
View
280 xbmc/dialogs/GUIDialogKeyboard.cpp → xbmc/dialogs/GUIDialogKeyboardGeneric.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005-2008 Team XBMC
+ * Copyright (C) 2012 Team XBMC
* http://www.xbmc.org
*
* This Program is free software; you can redistribute it and/or modify
@@ -19,24 +19,21 @@
*
*/
-#include "GUIDialogKeyboard.h"
-#include "settings/GUISettings.h"
+#include "interfaces/AnnouncementManager.h"
+#include "input/XBMC_vkeys.h"
#include "guilib/GUILabelControl.h"
+#include "guilib/GUIWindowManager.h"
+#include "guilib/LocalizeStrings.h"
+#include "GUIUserMessages.h"
#include "GUIDialogNumeric.h"
#include "GUIDialogOK.h"
-#include "GUIUserMessages.h"
-#include "guilib/GUIWindowManager.h"
-#include "input/XBMC_vkeys.h"
-#include "utils/RegExp.h"
-#include "GUIPassword.h"
-#include "utils/md5.h"
+#include "GUIDialogKeyboardGeneric.h"
#include "utils/TimeUtils.h"
+#include "utils/RegExp.h"
#include "ApplicationMessenger.h"
-#include "settings/AdvancedSettings.h"
-#include "guilib/LocalizeStrings.h"
-#include "interfaces/AnnouncementManager.h"
#include "utils/CharsetConverter.h"
+
// Symbol mapping (based on MS virtual keyboard - may need improving)
static char symbol_map[37] = ")!@#$%^&*([]{}-_=+;:\'\",.<>/?\\|`~ ";
@@ -60,22 +57,20 @@ static char symbolButtons[] = "._-@/\\";
#define SEARCH_DELAY 1000
#define REMOTE_SMS_DELAY 1000
-CGUIDialogKeyboard::CGUIDialogKeyboard(void)
+CGUIDialogKeyboardGeneric::CGUIDialogKeyboardGeneric()
: CGUIDialog(WINDOW_DIALOG_KEYBOARD, "DialogKeyboard.xml")
+, CGUIKeyboard()
+, m_pCharCallback(NULL)
{
m_bIsConfirmed = false;
m_bShift = false;
m_hiddenInput = false;
- m_filtering = FILTERING_NONE;
m_keyType = LOWER;
m_strHeading = "";
m_lastRemoteClickTime = 0;
}
-CGUIDialogKeyboard::~CGUIDialogKeyboard(void)
-{}
-
-void CGUIDialogKeyboard::OnInitWindow()
+void CGUIDialogKeyboardGeneric::OnInitWindow()
{
CGUIDialog::OnInitWindow();
@@ -108,7 +103,7 @@ void CGUIDialogKeyboard::OnInitWindow()
ANNOUNCEMENT::CAnnouncementManager::Announce(ANNOUNCEMENT::Input, "xbmc", "OnInputRequested", data);
}
-bool CGUIDialogKeyboard::OnAction(const CAction &action)
+bool CGUIDialogKeyboardGeneric::OnAction(const CAction &action)
{
bool handled(true);
if (action.GetID() == ACTION_BACKSPACE)
@@ -201,14 +196,14 @@ bool CGUIDialogKeyboard::OnAction(const CAction &action)
else // unhandled by us - let's see if the baseclass wants it
handled = CGUIDialog::OnAction(action);
- if (handled && m_filtering == FILTERING_SEARCH)
+ if (handled && m_pCharCallback)
{ // we did _something_, so make sure our search message filter is reset
- SendSearchMessage();
+ m_pCharCallback(this, GetText());
}
return handled;
}
-bool CGUIDialogKeyboard::OnMessage(CGUIMessage& message)
+bool CGUIDialogKeyboardGeneric::OnMessage(CGUIMessage& message)
{
CGUIDialog::OnMessage(message);
@@ -276,22 +271,22 @@ bool CGUIDialogKeyboard::OnMessage(CGUIMessage& message)
return true;
}
-void CGUIDialogKeyboard::SetText(const CStdString& aTextString)
+void CGUIDialogKeyboardGeneric::SetText(const CStdString& aTextString)
{
m_strEdit.Empty();
g_charsetConverter.utf8ToW(aTextString, m_strEdit);
UpdateLabel();
MoveCursor(m_strEdit.size());
}
-CStdString CGUIDialogKeyboard::GetText() const
+CStdString CGUIDialogKeyboardGeneric::GetText() const
{
CStdString utf8String;
g_charsetConverter.wToUTF8(m_strEdit, utf8String);
return utf8String;
}
-void CGUIDialogKeyboard::Character(WCHAR ch)
+void CGUIDialogKeyboardGeneric::Character(WCHAR ch)
{
if (!ch) return;
// TODO: May have to make this routine take a WCHAR for the symbols?
@@ -300,7 +295,7 @@ void CGUIDialogKeyboard::Character(WCHAR ch)
MoveCursor(1);
}
-void CGUIDialogKeyboard::FrameMove()
+void CGUIDialogKeyboardGeneric::FrameMove()
{
// reset the hide state of the label when the remote
// sms style input times out
@@ -312,7 +307,7 @@ void CGUIDialogKeyboard::FrameMove()
CGUIDialog::FrameMove();
}
-void CGUIDialogKeyboard::UpdateLabel() // FIXME seems to be called twice for one USB SDL keyboard action/character
+void CGUIDialogKeyboardGeneric::UpdateLabel() // FIXME seems to be called twice for one USB SDL keyboard action/character
{
CGUILabelControl* pEdit = ((CGUILabelControl*)GetControl(CTL_LABEL_EDIT));
if (pEdit)
@@ -338,31 +333,13 @@ void CGUIDialogKeyboard::UpdateLabel() // FIXME seems to be called twice for one
// don't send until the REMOTE_SMS_DELAY has passed
if (m_lastRemoteClickTime && m_lastRemoteClickTime + REMOTE_SMS_DELAY >= now)
return;
- if (m_filtering == FILTERING_CURRENT)
- { // send our filter message
- CGUIMessage message(GUI_MSG_NOTIFY_ALL, GetID(), 0, GUI_MSG_FILTER_ITEMS);
- message.SetStringParam(utf8Edit);
- g_windowManager.SendMessage(message);
- }
- if (m_filtering == FILTERING_SEARCH)
- SendSearchMessage();
+ if (m_pCharCallback)
+ m_pCharCallback(this, utf8Edit);
}
}
-void CGUIDialogKeyboard::SendSearchMessage()
-{
- CStdString utf8Edit;
- g_charsetConverter.wToUTF8(m_strEdit, utf8Edit);
- // send our search message (only the active window needs it)
- CGUIMessage message(GUI_MSG_NOTIFY_ALL, GetID(), 0, GUI_MSG_SEARCH_UPDATE);
- message.SetStringParam(utf8Edit);
- CGUIWindow *window = g_windowManager.GetWindow(g_windowManager.GetActiveWindow());
- if (window)
- window->OnMessage(message);
-}
-
-void CGUIDialogKeyboard::Backspace()
+void CGUIDialogKeyboardGeneric::Backspace()
{
int iPos = GetCursorPos();
if (iPos > 0)
@@ -373,7 +350,7 @@ void CGUIDialogKeyboard::Backspace()
}
}
-void CGUIDialogKeyboard::OnClickButton(int iButtonControl)
+void CGUIDialogKeyboardGeneric::OnClickButton(int iButtonControl)
{
if (iButtonControl == CTL_BUTTON_BACKSPACE)
{
@@ -383,7 +360,7 @@ void CGUIDialogKeyboard::OnClickButton(int iButtonControl)
Character(GetCharacter(iButtonControl));
}
-void CGUIDialogKeyboard::OnRemoteNumberClick(int key)
+void CGUIDialogKeyboardGeneric::OnRemoteNumberClick(int key)
{
unsigned int now = CTimeUtils::GetFrameTime();
@@ -425,7 +402,7 @@ void CGUIDialogKeyboard::OnRemoteNumberClick(int key)
Character(ch);
}
-char CGUIDialogKeyboard::GetCharacter(int iButton)
+char CGUIDialogKeyboardGeneric::GetCharacter(int iButton)
{
// First the numbers
if (iButton >= 48 && iButton <= 57)
@@ -466,7 +443,7 @@ char CGUIDialogKeyboard::GetCharacter(int iButton)
return 0;
}
-void CGUIDialogKeyboard::UpdateButtons()
+void CGUIDialogKeyboardGeneric::UpdateButtons()
{
if (m_bShift)
{ // show the button depressed
@@ -539,142 +516,8 @@ void CGUIDialogKeyboard::UpdateButtons()
}
}
-// Show keyboard with initial value (aTextString) and replace with result string.
-// Returns: true - successful display and input (empty result may return true or false depending on parameter)
-// false - unsucessful display of the keyboard or cancelled editing
-bool CGUIDialogKeyboard::ShowAndGetInput(CStdString& aTextString, const CVariant &heading, bool allowEmptyResult, bool hiddenInput /* = false */)
-{
- CGUIDialogKeyboard *pKeyboard = (CGUIDialogKeyboard*)g_windowManager.GetWindow(WINDOW_DIALOG_KEYBOARD);
-
- if (!pKeyboard)
- return false;
-
- // setup keyboard
- pKeyboard->Initialize();
- pKeyboard->SetHeading(heading);
- pKeyboard->SetHiddenInput(hiddenInput);
- pKeyboard->SetText(aTextString);
- // do this using a thread message to avoid render() conflicts
- ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_KEYBOARD, g_windowManager.GetActiveWindow()};
- CApplicationMessenger::Get().SendMessage(tMsg, true);
- pKeyboard->Close();
-
- // If have text - update this.
- if (pKeyboard->IsConfirmed())
- {
- aTextString = pKeyboard->GetText();
- if (!allowEmptyResult && aTextString.IsEmpty())
- return false;
- return true;
- }
- else return false;
-}
-
-bool CGUIDialogKeyboard::ShowAndGetInput(CStdString& aTextString, bool allowEmptyResult)
-{
- return ShowAndGetInput(aTextString, "", allowEmptyResult) != 0;
-}
-// Shows keyboard and prompts for a password.
-// Differs from ShowAndVerifyNewPassword() in that no second verification is necessary.
-bool CGUIDialogKeyboard::ShowAndGetNewPassword(CStdString& newPassword, const CVariant &heading, bool allowEmpty)
-{
- return ShowAndGetInput(newPassword, heading, allowEmpty, true);
-}
-
-// Shows keyboard and prompts for a password.
-// Differs from ShowAndVerifyNewPassword() in that no second verification is necessary.
-bool CGUIDialogKeyboard::ShowAndGetNewPassword(CStdString& newPassword)
-{
- return ShowAndGetNewPassword(newPassword, 12340, false);
-}
-
-// \brief Show keyboard twice to get and confirm a user-entered password string.
-// \param newPassword Overwritten with user input if return=true.
-// \param heading Heading to display
-// \param allowEmpty Whether a blank password is valid or not.
-// \return true if successful display and user input entry/re-entry. false if unsucessful display, no user input, or canceled editing.
-bool CGUIDialogKeyboard::ShowAndVerifyNewPassword(CStdString& newPassword, const CVariant &heading, bool allowEmpty)
-{
- // Prompt user for password input
- CStdString userInput = "";
- if (!ShowAndGetInput(userInput, heading, allowEmpty, true))
- { // user cancelled, or invalid input
- return false;
- }
- // success - verify the password
- CStdString checkInput = "";
- if (!ShowAndGetInput(checkInput, 12341, allowEmpty, true))
- { // user cancelled, or invalid input
- return false;
- }
- // check the password
- if (checkInput == userInput)
- {
- XBMC::XBMC_MD5 md5state;
- md5state.append(userInput);
- md5state.getDigest(newPassword);
- newPassword.ToLower();
- return true;
- }
- CGUIDialogOK::ShowAndGetInput(12341, 12344, 0, 0);
- return false;
-}
-
-// \brief Show keyboard twice to get and confirm a user-entered password string.
-// \param strNewPassword Overwritten with user input if return=true.
-// \return true if successful display and user input entry/re-entry. false if unsucessful display, no user input, or canceled editing.
-bool CGUIDialogKeyboard::ShowAndVerifyNewPassword(CStdString& newPassword)
-{
- CStdString heading = g_localizeStrings.Get(12340);
- return ShowAndVerifyNewPassword(newPassword, heading, false);
-}
-
-// \brief Show keyboard and verify user input against strPassword.
-// \param strPassword Value to compare against user input.
-// \param dlgHeading String shown on dialog title. Converts to localized string if contains a positive integer.
-// \param iRetries If greater than 0, shows "Incorrect password, %d retries left" on dialog line 2, else line 2 is blank.
-// \return 0 if successful display and user input. 1 if unsucessful input. -1 if no user input or canceled editing.
-int CGUIDialogKeyboard::ShowAndVerifyPassword(CStdString& strPassword, const CStdString& strHeading, int iRetries)
-{
- CStdString strHeadingTemp;
- if (1 > iRetries && strHeading.size())
- strHeadingTemp = strHeading;
- else
- strHeadingTemp.Format("%s - %i %s", g_localizeStrings.Get(12326).c_str(), g_guiSettings.GetInt("masterlock.maxretries") - iRetries, g_localizeStrings.Get(12343).c_str());
-
- CStdString strUserInput = "";
- if (!ShowAndGetInput(strUserInput, strHeadingTemp, false, true)) //bool hiddenInput = false/true ? TODO: GUI Setting to enable disable this feature y/n?
- return -1; // user canceled out
-
- if (!strPassword.IsEmpty())
- {
- if (strPassword == strUserInput)
- return 0;
-
- CStdString md5pword2;
- XBMC::XBMC_MD5 md5state;
- md5state.append(strUserInput);
- md5state.getDigest(md5pword2);
- if (strPassword.Equals(md5pword2))
- return 0; // user entered correct password
- else return 1; // user must have entered an incorrect password
- }
- else
- {
- if (!strUserInput.IsEmpty())
- {
- XBMC::XBMC_MD5 md5state;
- md5state.append(strUserInput);
- md5state.getDigest(strPassword);
- strPassword.ToLower();
- return 0; // user entered correct password
- }
- else return 1;
- }
-}
-
-void CGUIDialogKeyboard::OnDeinitWindow(int nextWindowID)
+void CGUIDialogKeyboardGeneric::OnDeinitWindow(int nextWindowID)
{
// call base class
CGUIDialog::OnDeinitWindow(nextWindowID);
@@ -684,7 +527,7 @@ void CGUIDialogKeyboard::OnDeinitWindow(int nextWindowID)
ANNOUNCEMENT::CAnnouncementManager::Announce(ANNOUNCEMENT::Input, "xbmc", "OnInputFinished");
}
-void CGUIDialogKeyboard::MoveCursor(int iAmount)
+void CGUIDialogKeyboardGeneric::MoveCursor(int iAmount)
{
CGUILabelControl* pEdit = ((CGUILabelControl*)GetControl(CTL_LABEL_EDIT));
if (pEdit)
@@ -693,7 +536,7 @@ void CGUIDialogKeyboard::MoveCursor(int iAmount)
}
}
-int CGUIDialogKeyboard::GetCursorPos() const
+int CGUIDialogKeyboardGeneric::GetCursorPos() const
{
const CGUILabelControl* pEdit = (const CGUILabelControl*)GetControl(CTL_LABEL_EDIT);
if (pEdit)
@@ -703,7 +546,7 @@ int CGUIDialogKeyboard::GetCursorPos() const
return 0;
}
-void CGUIDialogKeyboard::OnSymbols()
+void CGUIDialogKeyboardGeneric::OnSymbols()
{
if (m_keyType == SYMBOLS)
m_keyType = LOWER;
@@ -712,13 +555,13 @@ void CGUIDialogKeyboard::OnSymbols()
UpdateButtons();
}
-void CGUIDialogKeyboard::OnShift()
+void CGUIDialogKeyboardGeneric::OnShift()
{
m_bShift = !m_bShift;
UpdateButtons();
}
-void CGUIDialogKeyboard::OnIPAddress()
+void CGUIDialogKeyboardGeneric::OnIPAddress()
{
// find any IP address in the current string if there is any
// We match to #.#.#.#
@@ -747,16 +590,16 @@ void CGUIDialogKeyboard::OnIPAddress()
}
}
-void CGUIDialogKeyboard::ResetShiftAndSymbols()
+void CGUIDialogKeyboardGeneric::ResetShiftAndSymbols()
{
if (m_bShift) OnShift();
if (m_keyType == SYMBOLS) OnSymbols();
m_lastRemoteClickTime = 0;
}
-const char* CGUIDialogKeyboard::s_charsSeries[10] = { " 0!@#$%^&*()[]{}<>/\\|", ".,1;:\'\"-+_=?`~", "ABC2", "DEF3", "GHI4", "JKL5", "MNO6", "PQRS7", "TUV8", "WXYZ9" };
+const char* CGUIDialogKeyboardGeneric::s_charsSeries[10] = { " 0!@#$%^&*()[]{}<>/\\|", ".,1;:\'\"-+_=?`~", "ABC2", "DEF3", "GHI4", "JKL5", "MNO6", "PQRS7", "TUV8", "WXYZ9" };
-void CGUIDialogKeyboard::SetControlLabel(int id, const CStdString &label)
+void CGUIDialogKeyboardGeneric::SetControlLabel(int id, const CStdString &label)
{ // find all controls with this id, and set all their labels
CGUIMessage message(GUI_MSG_LABEL_SET, GetID(), id);
message.SetLabel(label);
@@ -767,29 +610,48 @@ void CGUIDialogKeyboard::SetControlLabel(int id, const CStdString &label)
}
}
-void CGUIDialogKeyboard::OnOK()
+void CGUIDialogKeyboardGeneric::OnOK()
{
m_bIsConfirmed = true;
Close();
}
-bool CGUIDialogKeyboard::ShowAndGetFilter(CStdString &filter, bool searching)
+void CGUIDialogKeyboardGeneric::SetHeading(const CVariant &heading)
{
- CGUIDialogKeyboard *pKeyboard = (CGUIDialogKeyboard*)g_windowManager.GetWindow(WINDOW_DIALOG_KEYBOARD);
+ if (heading.isString())
+ m_strHeading = heading.asString();
+ else if (heading.isInteger() && heading.asInteger())
+ m_strHeading = g_localizeStrings.Get((uint32_t)heading.asInteger());
+}
+
+int CGUIDialogKeyboardGeneric::GetWindowId() const
+{
+ return GetID();
+}
+
+bool CGUIDialogKeyboardGeneric::ShowAndGetInput(char_callback_t pCallback, const std::string &initialString, std::string &typedString, const std::string &heading, bool bHiddenInput)
+{
+ CGUIDialogKeyboardGeneric *pKeyboard = (CGUIDialogKeyboardGeneric*)g_windowManager.GetWindow(WINDOW_DIALOG_KEYBOARD);
if (!pKeyboard)
return false;
- pKeyboard->m_filtering = searching ? FILTERING_SEARCH : FILTERING_CURRENT;
- bool ret = ShowAndGetInput(filter, searching ? 16017 : 16028, true);
- pKeyboard->m_filtering = FILTERING_NONE;
- return ret;
-}
+ m_pCharCallback = pCallback;
+ // setup keyboard
+ pKeyboard->Initialize();
+ pKeyboard->SetHeading(heading);
+ pKeyboard->SetHiddenInput(bHiddenInput);
+ pKeyboard->SetText(initialString);
+ // do this using a thread message to avoid render() conflicts
+ ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_KEYBOARD, g_windowManager.GetActiveWindow()};
+ CApplicationMessenger::Get().SendMessage(tMsg, true);
+ pKeyboard->Close();
-void CGUIDialogKeyboard::SetHeading(const CVariant &heading)
-{
- if (heading.isString())
- m_strHeading = heading.asString();
- else if (heading.isInteger() && heading.asInteger())
- m_strHeading = g_localizeStrings.Get((uint32_t)heading.asInteger());
+ // If have text - update this.
+ if (pKeyboard->IsConfirmed())
+ {
+ typedString = pKeyboard->GetText();
+ return true;
+ }
+ else return false;
}
View
86 xbmc/dialogs/GUIDialogKeyboardGeneric.h
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2012 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
+ *
+ */
+
+#pragma once
+
+#include "guilib/GUIKeyboard.h"
+#include "guilib/GUIDialog.h"
+#include "utils/Variant.h"
+
+enum KEYBOARD {CAPS, LOWER, SYMBOLS };
+
+class CGUIDialogKeyboardGeneric : public CGUIDialog, public CGUIKeyboard
+{
+ public:
+ CGUIDialogKeyboardGeneric();
+
+ //CGUIKeyboard Interface
+ virtual bool ShowAndGetInput(char_callback_t pCallback, const std::string &initialString, std::string &typedString, const std::string &heading, bool bHiddenInput);
+ virtual int GetWindowId() const;
+
+ //CGUIDialog Interface
+ virtual void FrameMove();
+ void SetHeading(const CVariant& heading);
+ void SetText(const CStdString& aTextString);
+ CStdString GetText() const;
+ bool IsConfirmed() { return m_bIsConfirmed; };
+ void SetHiddenInput(bool hiddenInput) { m_hiddenInput = hiddenInput; };
+ void Character(WCHAR wch);
+
+ protected:
+ virtual void OnInitWindow();
+ virtual bool OnAction(const CAction &action);
+ virtual bool OnMessage(CGUIMessage& message);
+ virtual void OnDeinitWindow(int nextWindowID);
+ void SetControlLabel(int id, const CStdString &label);
+ void OnShift();
+ void MoveCursor(int iAmount);
+ int GetCursorPos() const;
+ void OnSymbols();
+ void OnIPAddress();
+ void OnOK();
+
+ private:
+ void OnClickButton(int iButtonControl);
+ void OnRemoteNumberClick(int key);
+ void UpdateButtons();
+ char GetCharacter(int iButton);
+ void UpdateLabel();
+ void ResetShiftAndSymbols();
+ void Backspace();
+ void SendSearchMessage();
+
+ CStdStringW m_strEdit;
+ bool m_bIsConfirmed;
+ KEYBOARD m_keyType;
+ int m_iMode;
+ bool m_bShift;
+ bool m_hiddenInput;
+
+ unsigned int m_lastRemoteClickTime;
+ WORD m_lastRemoteKeyClicked;
+ int m_indexInSeries;
+ CStdString m_strHeading;
+ static const char* s_charsSeries[10];
+
+
+ char_callback_t m_pCharCallback;
+};
View
4 xbmc/dialogs/GUIDialogMediaSource.cpp
@@ -20,7 +20,7 @@
*/
#include "GUIDialogMediaSource.h"
-#include "GUIDialogKeyboard.h"
+#include "guilib/GUIKeyboardFactory.h"
#include "GUIDialogFileBrowser.h"
#include "video/windows/GUIWindowVideoBase.h"
#include "video/dialogs/GUIDialogVideoScan.h"
@@ -304,7 +304,7 @@ void CGUIDialogMediaSource::OnPath(int item)
m_bNameChanged=true;
CStdString path(m_paths->Get(item)->GetPath());
- CGUIDialogKeyboard::ShowAndGetInput(path, g_localizeStrings.Get(1021), false);
+ CGUIKeyboardFactory::ShowAndGetInput(path, g_localizeStrings.Get(1021), false);
URIUtils::AddSlashAtEnd(path);
m_paths->Get(item)->SetPath(path);
View
4 xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp
@@ -20,7 +20,7 @@
*/
#include "GUIDialogSmartPlaylistEditor.h"
-#include "GUIDialogKeyboard.h"
+#include "guilib/GUIKeyboardFactory.h"
#include "Util.h"
#include "utils/URIUtils.h"
#include "GUIDialogSmartPlaylistRule.h"
@@ -166,7 +166,7 @@ void CGUIDialogSmartPlaylistEditor::OnOK()
{
CStdString filename(CUtil::MakeLegalFileName(m_playlist.m_playlistName));
CStdString path;
- if (CGUIDialogKeyboard::ShowAndGetInput(filename, g_localizeStrings.Get(16013), false))
+ if (CGUIKeyboardFactory::ShowAndGetInput(filename, g_localizeStrings.Get(16013), false))
{
path = URIUtils::AddFileToFolder(g_guiSettings.GetString("system.playlistspath"),m_playlist.GetSaveLocation());
path = URIUtils::AddFileToFolder(path, CUtil::MakeLegalFileName(filename));
View
2 xbmc/dialogs/Makefile
@@ -7,7 +7,7 @@ SRCS=GUIDialogBoxBase.cpp \
GUIDialogFileBrowser.cpp \
GUIDialogGamepad.cpp \
GUIDialogKaiToast.cpp \
- GUIDialogKeyboard.cpp \
+ GUIDialogKeyboardGeneric.cpp \
GUIDialogMediaSource.cpp \
GUIDialogMuteBug.cpp \
GUIDialogNumeric.cpp \
View
4 xbmc/filesystem/IDirectory.cpp
@@ -23,7 +23,7 @@
#include "IDirectory.h"
#include "Util.h"
#include "dialogs/GUIDialogOK.h"
-#include "dialogs/GUIDialogKeyboard.h"
+#include "guilib/GUIKeyboardFactory.h"
#include "URL.h"
#include "PasswordManager.h"
#include "utils/URIUtils.h"
@@ -114,7 +114,7 @@ bool IDirectory::ProcessRequirements()
if (type == "keyboard")
{
CStdString input;
- if (CGUIDialogKeyboard::ShowAndGetInput(input, m_requirements["heading"], false))
+ if (CGUIKeyboardFactory::ShowAndGetInput(input, m_requirements["heading"], false))
{
m_requirements["input"] = input;
return true;
View
8 xbmc/guilib/GUIEditControl.cpp
@@ -22,7 +22,7 @@
#include "GUIEditControl.h"
#include "GUIWindowManager.h"
#include "utils/CharsetConverter.h"
-#include "dialogs/GUIDialogKeyboard.h"
+#include "GUIKeyboardFactory.h"
#include "dialogs/GUIDialogNumeric.h"
#include "input/XBMC_vkeys.h"
#include "LocalizeStrings.h"
@@ -287,17 +287,17 @@ void CGUIEditControl::OnClick()
textChanged = CGUIDialogNumeric::ShowAndGetIPAddress(utf8, heading);
break;
case INPUT_TYPE_SEARCH:
- textChanged = CGUIDialogKeyboard::ShowAndGetFilter(utf8, true);
+ textChanged = CGUIKeyboardFactory::ShowAndGetFilter(utf8, true);
break;
case INPUT_TYPE_FILTER:
- textChanged = CGUIDialogKeyboard::ShowAndGetFilter(utf8, false);
+ textChanged = CGUIKeyboardFactory::ShowAndGetFilter(utf8, false);
break;
case INPUT_TYPE_PASSWORD_MD5:
utf8 = ""; // TODO: Ideally we'd send this to the keyboard and tell the keyboard we have this type of input
// fallthrough
case INPUT_TYPE_TEXT:
default:
- textChanged = CGUIDialogKeyboard::ShowAndGetInput(utf8, heading, true, m_inputType == INPUT_TYPE_PASSWORD || m_inputType == INPUT_TYPE_PASSWORD_MD5);
+ textChanged = CGUIKeyboardFactory::ShowAndGetInput(utf8, heading, true, m_inputType == INPUT_TYPE_PASSWORD || m_inputType == INPUT_TYPE_PASSWORD_MD5);
break;
}
if (textChanged)
View
39 xbmc/guilib/GUIKeyboard.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2012 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
+ *
+ */
+
+#pragma once
+
+#include <string>
+
+class CGUIKeyboard;
+enum FILTERING { FILTERING_NONE = 0, FILTERING_CURRENT, FILTERING_SEARCH };
+typedef void (*char_callback_t) (CGUIKeyboard *ref, const std::string &typedString);
+
+class CGUIKeyboard
+{
+ public:
+
+ CGUIKeyboard(){};
+
+ //entrypoint
+ virtual bool ShowAndGetInput(char_callback_t pCallback, const std::string &initialString, std::string &typedString, const std::string &heading, bool bHiddenInput = false) = 0;
+ virtual int GetWindowId() const {return 0;}
+};
View
214 xbmc/guilib/GUIKeyboardFactory.cpp
@@ -0,0 +1,214 @@
+/*
+ * 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
+ *
+ */
+
+#include "Application.h"
+#include "LocalizeStrings.h"
+#include "GUIKeyboardFactory.h"
+#include "dialogs/GUIDialogOK.h"
+#include "GUIUserMessages.h"
+#include "GUIWindowManager.h"
+#include "settings/GUISettings.h"
+#include "utils/md5.h"
+
+
+#include "dialogs/GUIDialogKeyboardGeneric.h"
+#if defined(TARGET_DARWIN_IOS)
+#include "osx/ios/IOSKeyboard.h"
+#endif
+
+FILTERING CGUIKeyboardFactory::m_filtering = FILTERING_NONE;
+
+CGUIKeyboardFactory::CGUIKeyboardFactory(void)
+{
+}
+
+CGUIKeyboardFactory::~CGUIKeyboardFactory(void)
+{}
+
+void CGUIKeyboardFactory::keyTypedCB(CGUIKeyboard *ref, const std::string &typedString)
+{
+ if(ref)
+ {
+ // send our search message (only the active window needs it)
+ CGUIMessage message(GUI_MSG_NOTIFY_ALL, ref->GetWindowId(), 0);
+ CGUIWindow *window = NULL;
+ switch(m_filtering)
+ {
+ case FILTERING_SEARCH:
+ window = g_windowManager.GetWindow(g_windowManager.GetActiveWindow());
+ message.SetParam1(GUI_MSG_SEARCH_UPDATE);
+ message.SetStringParam(typedString);
+ if (window)
+ window->OnMessage(message);
+ break;
+ case FILTERING_CURRENT:
+ message.SetParam1(GUI_MSG_FILTER_ITEMS);
+ message.SetStringParam(typedString);
+ g_windowManager.SendMessage(message);
+ break;
+ }
+ }
+}
+
+// Show keyboard with initial value (aTextString) and replace with result string.
+// Returns: true - successful display and input (empty result may return true or false depending on parameter)
+// false - unsucessful display of the keyboard or cancelled editing
+bool CGUIKeyboardFactory::ShowAndGetInput(CStdString& aTextString, const CVariant &heading, bool allowEmptyResult, bool hiddenInput /* = false */)
+{
+ bool confirmed = false;
+ CGUIKeyboard *kb = NULL;
+ bool needsFreeing = true;
+#if defined(TARGET_DARWIN_IOS) && !defined(TARGET_DARWIN_IOS_ATV2)
+ kb = new CIOSKeyboard();
+#endif
+
+ if(!kb)
+ {
+ kb = (CGUIDialogKeyboardGeneric*)g_windowManager.GetWindow(WINDOW_DIALOG_KEYBOARD);
+ needsFreeing = false;
+ }
+
+ confirmed = kb->ShowAndGetInput(keyTypedCB, aTextString, aTextString, heading.asString(), hiddenInput);
+ if(needsFreeing)
+ delete kb;
+
+ if (confirmed)
+ {
+ if (!allowEmptyResult && aTextString.IsEmpty())
+ confirmed = false;
+ }
+
+ return confirmed;
+}
+
+bool CGUIKeyboardFactory::ShowAndGetInput(CStdString& aTextString, bool allowEmptyResult)
+{
+ return ShowAndGetInput(aTextString, "", allowEmptyResult) != 0;
+}
+
+// Shows keyboard and prompts for a password.
+// Differs from ShowAndVerifyNewPassword() in that no second verification is necessary.
+bool CGUIKeyboardFactory::ShowAndGetNewPassword(CStdString& newPassword, const CVariant &heading, bool allowEmpty)
+{
+ return ShowAndGetInput(newPassword, heading, allowEmpty, true);
+}
+
+// Shows keyboard and prompts for a password.
+// Differs from ShowAndVerifyNewPassword() in that no second verification is necessary.
+bool CGUIKeyboardFactory::ShowAndGetNewPassword(CStdString& newPassword)
+{
+ return ShowAndGetNewPassword(newPassword, 12340, false);
+}
+
+bool CGUIKeyboardFactory::ShowAndGetFilter(CStdString &filter, bool searching)
+{
+ m_filtering = searching ? FILTERING_SEARCH : FILTERING_CURRENT;
+ bool ret = ShowAndGetInput(filter, searching ? 16017 : 16028, true);
+ m_filtering = FILTERING_NONE;
+ return ret;
+}
+
+
+// \brief Show keyboard twice to get and confirm a user-entered password string.
+// \param newPassword Overwritten with user input if return=true.
+// \param heading Heading to display
+// \param allowEmpty Whether a blank password is valid or not.
+// \return true if successful display and user input entry/re-entry. false if unsucessful display, no user input, or canceled editing.
+bool CGUIKeyboardFactory::ShowAndVerifyNewPassword(CStdString& newPassword, const CVariant &heading, bool allowEmpty)
+{
+ // Prompt user for password input
+ CStdString userInput = "";
+ if (!ShowAndGetInput(userInput, heading, allowEmpty, true))
+ { // user cancelled, or invalid input
+ return false;
+ }
+ // success - verify the password
+ CStdString checkInput = "";
+ if (!ShowAndGetInput(checkInput, 12341, allowEmpty, true))
+ { // user cancelled, or invalid input
+ return false;
+ }
+ // check the password
+ if (checkInput == userInput)
+ {
+ XBMC::XBMC_MD5 md5state;
+ md5state.append(userInput);
+ md5state.getDigest(newPassword);
+ newPassword.ToLower();
+ return true;
+ }
+ CGUIDialogOK::ShowAndGetInput(12341, 12344, 0, 0);
+ return false;
+}
+
+// \brief Show keyboard twice to get and confirm a user-entered password string.
+// \param strNewPassword Overwritten with user input if return=true.
+// \return true if successful display and user input entry/re-entry. false if unsucessful display, no user input, or canceled editing.
+bool CGUIKeyboardFactory::ShowAndVerifyNewPassword(CStdString& newPassword)
+{
+ CStdString heading = g_localizeStrings.Get(12340);
+ return ShowAndVerifyNewPassword(newPassword, heading, false);
+}
+
+// \brief Show keyboard and verify user input against strPassword.
+// \param strPassword Value to compare against user input.
+// \param dlgHeading String shown on dialog title. Converts to localized string if contains a positive integer.
+// \param iRetries If greater than 0, shows "Incorrect password, %d retries left" on dialog line 2, else line 2 is blank.
+// \return 0 if successful display and user input. 1 if unsucessful input. -1 if no user input or canceled editing.
+int CGUIKeyboardFactory::ShowAndVerifyPassword(CStdString& strPassword, const CStdString& strHeading, int iRetries)
+{
+ CStdString strHeadingTemp;
+ if (1 > iRetries && strHeading.size())
+ strHeadingTemp = strHeading;
+ else
+ strHeadingTemp.Format("%s - %i %s", g_localizeStrings.Get(12326).c_str(), g_guiSettings.GetInt("masterlock.maxretries") - iRetries, g_localizeStrings.Get(12343).c_str());
+
+ CStdString strUserInput = "";
+ if (!ShowAndGetInput(strUserInput, strHeadingTemp, false, true)) //bool hiddenInput = false/true ? TODO: GUI Setting to enable disable this feature y/n?
+ return -1; // user canceled out
+
+ if (!strPassword.IsEmpty())
+ {
+ if (strPassword == strUserInput)
+ return 0;
+
+ CStdString md5pword2;
+ XBMC::XBMC_MD5 md5state;
+ md5state.append(strUserInput);
+ md5state.getDigest(md5pword2);
+ if (strPassword.Equals(md5pword2))
+ return 0; // user entered correct password
+ else return 1; // user must have entered an incorrect password
+ }
+ else
+ {
+ if (!strUserInput.IsEmpty())
+ {
+ XBMC::XBMC_MD5 md5state;
+ md5state.append(strUserInput);
+ md5state.getDigest(strPassword);
+ strPassword.ToLower();
+ return 0; // user entered correct password
+ }
+ else return 1;
+ }
+}
+
View
47 xbmc/guilib/GUIKeyboardFactory.h
@@ -0,0 +1,47 @@
+#pragma once
+
+/*
+ * 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
+ *
+ */
+
+#include "GUIDialog.h"
+#include "utils/Variant.h"
+#include "GUIKeyboard.h"
+
+class CGUIKeyboardFactory
+{
+
+ public:
+ CGUIKeyboardFactory(void);
+ virtual ~CGUIKeyboardFactory(void);
+
+ static bool ShowAndGetInput(CStdString& aTextString, bool allowEmptyResult);
+ static bool ShowAndGetInput(CStdString& aTextString, const CVariant &heading, bool allowEmptyResult, bool hiddenInput = false);
+ static bool ShowAndGetNewPassword(CStdString& strNewPassword);
+ static bool ShowAndGetNewPassword(CStdString& newPassword, const CVariant &heading, bool allowEmpty);
+ static bool ShowAndVerifyNewPassword(CStdString& strNewPassword);
+ static bool ShowAndVerifyNewPassword(CStdString& newPassword, const CVariant &heading, bool allowEmpty);
+ static int ShowAndVerifyPassword(CStdString& strPassword, const CStdString& strHeading, int iRetries);
+ static bool ShowAndGetFilter(CStdString& aTextString, bool searching);
+
+ private:
+ static FILTERING m_filtering;
+ static void keyTypedCB(CGUIKeyboard *ref, const std::string &typedString);
+};
View
1 xbmc/guilib/Makefile.in
@@ -27,6 +27,7 @@ SRCS=AnimatedGif.cpp \
GUIImage.cpp \
GUIIncludes.cpp \
GUIInfoTypes.cpp \
+ GUIKeyboardFactory.cpp \
GUILabel.cpp \
GUILabelControl.cpp \
GUIListContainer.cpp \
View
4 xbmc/interfaces/Builtins.cpp
@@ -29,7 +29,7 @@
#include "FileItem.h"
#include "addons/GUIDialogAddonSettings.h"
#include "dialogs/GUIDialogFileBrowser.h"
-#include "dialogs/GUIDialogKeyboard.h"
+#include "guilib/GUIKeyboardFactory.h"
#include "dialogs/GUIDialogKaiToast.h"
#include "music/dialogs/GUIDialogMusicScan.h"
#include "dialogs/GUIDialogNumeric.h"
@@ -1057,7 +1057,7 @@ int CBuiltins::Execute(const CStdString& execString)
g_mediaManager.GetLocalDrives(localShares);
if (execute.Equals("skin.setstring"))
{
- if (CGUIDialogKeyboard::ShowAndGetInput(value, g_localizeStrings.Get(1029), true))
+ if (CGUIKeyboardFactory::ShowAndGetInput(value, g_localizeStrings.Get(1029), true))
g_settings.SetSkinString(string, value);
}
else if (execute.Equals("skin.setnumeric"))
View
16 xbmc/interfaces/python/xbmcmodule/keyboard.cpp
@@ -23,7 +23,7 @@
#include "pythreadstate.h"
#include "pyutil.h"
#include "guilib/GUIWindowManager.h"
-#include "dialogs/GUIDialogKeyboard.h"
+#include "dialogs/GUIDialogKeyboardGeneric.h"
#include "ApplicationMessenger.h"
using namespace std;
@@ -58,7 +58,7 @@ namespace PYXBMC
self->strHeading = utf8Heading;
self->bHidden = (0 != bHidden);
PyXBMCGUILock();
- self->dlg = (CGUIDialogKeyboard*)g_windowManager.GetWindow(WINDOW_DIALOG_KEYBOARD);
+ self->dlg = (CGUIDialogKeyboardGeneric*)g_windowManager.GetWindow(WINDOW_DIALOG_KEYBOARD);
PyXBMCGUIUnlock();
return (PyObject*)self;
@@ -82,7 +82,7 @@ namespace PYXBMC
PyObject* Keyboard_DoModal(Keyboard *self, PyObject *args)
{
- CGUIDialogKeyboard *pKeyboard = ((Keyboard*)self)->dlg;
+ CGUIDialogKeyboardGeneric *pKeyboard = ((Keyboard*)self)->dlg;
if(!pKeyboard)
{
PyErr_SetString(PyExc_SystemError, "Unable to load virtual keyboard");
@@ -127,7 +127,7 @@ namespace PYXBMC
if (line && !PyXBMCGetUnicodeString(utf8Line, line, 1)) return NULL;
self->strDefault = utf8Line;
- CGUIDialogKeyboard *pKeyboard = ((Keyboard*)self)->dlg;
+ CGUIDialogKeyboardGeneric *pKeyboard = ((Keyboard*)self)->dlg;
if(!pKeyboard)
{
PyErr_SetString(PyExc_SystemError, "Unable to load keyboard");
@@ -157,7 +157,7 @@ namespace PYXBMC
if (!PyArg_ParseTuple(args, (char*)"|b", &bHidden)) return NULL;
self->bHidden = (0 != bHidden);
- CGUIDialogKeyboard *pKeyboard = ((Keyboard*)self)->dlg;
+ CGUIDialogKeyboardGeneric *pKeyboard = ((Keyboard*)self)->dlg;
if(!pKeyboard)
{
PyErr_SetString(PyExc_SystemError, "Unable to load keyboard");
@@ -190,7 +190,7 @@ namespace PYXBMC
if (line && !PyXBMCGetUnicodeString(utf8Line, line, 1)) return NULL;
self->strHeading = utf8Line;
- CGUIDialogKeyboard *pKeyboard = ((Keyboard*)self)->dlg;
+ CGUIDialogKeyboardGeneric *pKeyboard = ((Keyboard*)self)->dlg;
if(!pKeyboard)
{
PyErr_SetString(PyExc_SystemError, "Unable to load keyboard");
@@ -217,7 +217,7 @@ namespace PYXBMC
PyObject* Keyboard_GetText(Keyboard *self, PyObject *args)
{
- CGUIDialogKeyboard *pKeyboard = ((Keyboard*)self)->dlg;
+ CGUIDialogKeyboardGeneric *pKeyboard = ((Keyboard*)self)->dlg;
if(!pKeyboard)
{
PyErr_SetString(PyExc_SystemError, "Unable to load keyboard");
@@ -239,7 +239,7 @@ namespace PYXBMC
PyObject* Keyboard_IsConfirmed(Keyboard *self, PyObject *args)
{
- CGUIDialogKeyboard *pKeyboard = ((Keyboard*)self)->dlg;
+ CGUIDialogKeyboardGeneric *pKeyboard = ((Keyboard*)self)->dlg;
if(!pKeyboard)
{
PyErr_SetString(PyExc_SystemError, "Unable to load keyboard");
View
4 xbmc/interfaces/python/xbmcmodule/keyboard.h
@@ -24,7 +24,7 @@
#include <string>
#pragma once
-class CGUIDialogKeyboard;
+class CGUIDialogKeyboardGeneric;
#ifdef __cplusplus
extern "C" {
@@ -37,7 +37,7 @@ namespace PYXBMC
std::string strDefault;
std::string strHeading;
bool bHidden;
- CGUIDialogKeyboard* dlg;
+ CGUIDialogKeyboardGeneric* dlg;
} Keyboard;
extern PyTypeObject Keyboard_Type;
View
8 xbmc/music/infoscanner/MusicInfoScanner.cpp
@@ -35,7 +35,7 @@
#include "guilib/GUIWindowManager.h"
#include "dialogs/GUIDialogProgress.h"
#include "dialogs/GUIDialogSelect.h"
-#include "dialogs/GUIDialogKeyboard.h"
+#include "guilib/GUIKeyboardFactory.h"
#include "filesystem/File.h"
#include "filesystem/Directory.h"
#include "settings/AdvancedSettings.h"
@@ -1027,11 +1027,11 @@ bool CMusicInfoScanner::DownloadAlbumInfo(const CStdString& strPath, const CStdS
}
// manual button pressed
CStdString strNewAlbum = strAlbum;
- if (!CGUIDialogKeyboard::ShowAndGetInput(strNewAlbum, g_localizeStrings.Get(16011), false)) return false;
+ if (!CGUIKeyboardFactory::ShowAndGetInput(strNewAlbum, g_localizeStrings.Get(16011), false)) return false;
if (strNewAlbum == "") return false;
CStdString strNewArtist = strArtist;
- if (!CGUIDialogKeyboard::ShowAndGetInput(strNewArtist, g_localizeStrings.Get(16025), false)) return false;
+ if (!CGUIKeyboardFactory::ShowAndGetInput(strNewArtist, g_localizeStrings.Get(16025), false)) return false;
pDialog->SetLine(0, strNewAlbum);
pDialog->SetLine(1, strNewArtist);
@@ -1221,7 +1221,7 @@ bool CMusicInfoScanner::DownloadArtistInfo(const CStdString& strPath, const CStd
}
// manual button pressed
CStdString strNewArtist = strArtist;
- if (!CGUIDialogKeyboard::ShowAndGetInput(strNewArtist, g_localizeStrings.Get(16025), false)) return false;
+ if (!CGUIKeyboardFactory::ShowAndGetInput(strNewArtist, g_localizeStrings.Get(16025), false)) return false;
if (pDialog)
{
View
12 xbmc/music/windows/GUIWindowMusicBase.cpp
@@ -51,7 +51,7 @@
#include "guilib/GUIWindowManager.h"
#include "dialogs/GUIDialogOK.h"
#include "dialogs/GUIDialogYesNo.h"
-#include "dialogs/GUIDialogKeyboard.h"
+#include "guilib/GUIKeyboardFactory.h"
#include "dialogs/GUIDialogProgress.h"
#include "FileItem.h"
#include "filesystem/File.h"
@@ -380,11 +380,11 @@ void CGUIWindowMusicBase::OnManualAlbumInfo()
{
CAlbum album;
album.idAlbum = -1; // not in the db
- if (!CGUIDialogKeyboard::ShowAndGetInput(album.strAlbum, g_localizeStrings.Get(16011), false))
+ if (!CGUIKeyboardFactory::ShowAndGetInput(album.strAlbum, g_localizeStrings.Get(16011), false))
return;
CStdString strArtist = StringUtils::Join(album.artist, g_advancedSettings.m_musicItemSeparator);
- if (!CGUIDialogKeyboard::ShowAndGetInput(strArtist, g_localizeStrings.Get(16025), false))
+ if (!CGUIKeyboardFactory::ShowAndGetInput(strArtist, g_localizeStrings.Get(16025), false))
return;
ShowAlbumInfo(album,"",true);
@@ -791,10 +791,10 @@ bool CGUIWindowMusicBase::FindAlbumInfo(const CStdString& strAlbum, const CStdSt
return false;
if (m_dlgProgress && allowSelection != SELECTION_AUTO)
{
- if (!CGUIDialogKeyboard::ShowAndGetInput(strTempAlbum, g_localizeStrings.Get(16011), false))
+ if (!CGUIKeyboardFactory::ShowAndGetInput(strTempAlbum, g_localizeStrings.Get(16011), false))
return false;
- if (!CGUIDialogKeyboard::ShowAndGetInput(strTempArtist, g_localizeStrings.Get(16025), false))
+ if (!CGUIKeyboardFactory::ShowAndGetInput(strTempArtist, g_localizeStrings.Get(16025), false))
return false;
}
else
@@ -841,7 +841,7 @@ bool CGUIWindowMusicBase::FindArtistInfo(const CStdString& strArtist, CMusicArti
return false;
if (m_dlgProgress && allowSelection != SELECTION_AUTO)
{
- if (!CGUIDialogKeyboard::ShowAndGetInput(strTempArtist, g_localizeStrings.Get(16025), false))
+ if (!CGUIKeyboardFactory::ShowAndGetInput(strTempArtist, g_localizeStrings.Get(16025), false))
return false;
}
else
View
6 xbmc/music/windows/GUIWindowMusicNav.cpp
@@ -35,7 +35,7 @@
#include "music/tags/MusicInfoTag.h"
#include "guilib/GUIWindowManager.h"
#include "dialogs/GUIDialogOK.h"
-#include "dialogs/GUIDialogKeyboard.h"
+#include "guilib/GUIKeyboardFactory.h"
#include "dialogs/GUIDialogYesNo.h"
#include "guilib/GUIEditControl.h"
#include "GUIUserMessages.h"
@@ -164,7 +164,7 @@ bool CGUIWindowMusicNav::OnMessage(CGUIMessage& message)
return true;
}
CStdString search(GetProperty("search").asString());
- CGUIDialogKeyboard::ShowAndGetFilter(search, true);
+ CGUIKeyboardFactory::ShowAndGetFilter(search, true);
SetProperty("search", search);
return true;
}
@@ -255,7 +255,7 @@ bool CGUIWindowMusicNav::OnClick(int iItem)
else
{
CStdString search(GetProperty("search").asString());
- CGUIDialogKeyboard::ShowAndGetFilter(search, true);
+ CGUIKeyboardFactory::ShowAndGetFilter(search, true);
SetProperty("search", search);
}
return true;
View
4 xbmc/music/windows/GUIWindowMusicPlaylist.cpp
@@ -30,7 +30,7 @@
#include "utils/LabelFormatter.h"
#include "music/tags/MusicInfoTag.h"
#include "guilib/GUIWindowManager.h"
-#include "dialogs/GUIDialogKeyboard.h"
+#include "guilib/GUIKeyboardFactory.h"
#include "GUIUserMessages.h"
#include "Favourites.h"
#include "settings/Settings.h"
@@ -282,7 +282,7 @@ bool CGUIWindowMusicPlayList::MoveCurrentPlayListItem(int iItem, int iAction, bo
void CGUIWindowMusicPlayList::SavePlayList()
{
CStdString strNewFileName;
- if (CGUIDialogKeyboard::ShowAndGetInput(strNewFileName, g_localizeStrings.Get(16012), false))
+ if (CGUIKeyboardFactory::ShowAndGetInput(strNewFileName, g_localizeStrings.Get(16012), false))
{
// need 2 rename it
CStdString strFolder, strPath;
View
4 xbmc/music/windows/GUIWindowMusicPlaylistEditor.cpp
@@ -31,7 +31,7 @@
#include "filesystem/Directory.h"
#include "playlists/PlayListM3U.h"
#include "guilib/GUIWindowManager.h"
-#include "dialogs/GUIDialogKeyboard.h"
+#include "guilib/GUIKeyboardFactory.h"
#include "FileItem.h"
#include "settings/GUISettings.h"
#include "GUIUserMessages.h"
@@ -392,7 +392,7 @@ void CGUIWindowMusicPlaylistEditor::OnSavePlaylist()
CStdString name = URIUtils::GetFileName(m_strLoadedPlaylist);
CStdString strExt = URIUtils::GetExtension(name);
name = name.Mid(0,name.size()-strExt.size());
- if (CGUIDialogKeyboard::ShowAndGetInput(name, g_localizeStrings.Get(16012), false))
+ if (CGUIKeyboardFactory::ShowAndGetInput(name, g_localizeStrings.Get(16012), false))
{ // save playlist as an .m3u
PLAYLIST::CPlayListM3U playlist;
playlist.Add(*m_playlist);
View
4 xbmc/network/GUIDialogAccessPoints.cpp
@@ -20,7 +20,7 @@
*/
#include "GUIDialogAccessPoints.h"
-#include "dialogs/GUIDialogKeyboard.h"
+#include "guilib/GUIKeyboardFactory.h"
#ifdef _LINUX
#include "linux/NetworkLinux.h"
#endif
@@ -52,7 +52,7 @@ bool CGUIDialogAccessPoints::OnAction(const CAction &action)
if (iItem == (int) m_aps.size())
{
m_selectedAPEssId = "";
- if (CGUIDialogKeyboard::ShowAndGetInput(m_selectedAPEssId, g_localizeStrings.Get(789), false))
+ if (CGUIKeyboardFactory::ShowAndGetInput(m_selectedAPEssId, g_localizeStrings.Get(789), false))
{
m_selectedAPEncMode = m_aps[iItem].getEncryptionMode();
m_wasItemSelected = true;
View
34 xbmc/osx/ios/IOSKeyboard.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2012 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
+ *
+ */
+#pragma once
+
+#include "guilib/GUIKeyboard.h"
+