Permalink
Browse files

[keyboard] - change all occurences of GUIDialogKeyboard to the new ap…

…proach and removed unneeded keyboard includes
  • Loading branch information...
1 parent 628a646 commit 8142cf1621c54fbc8f99ae651abe9fdae390b463 @Memphiz Memphiz committed Jul 28, 2012
@@ -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
@@ -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;
@@ -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)
@@ -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);
@@ -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);
@@ -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);
@@ -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));
@@ -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;
@@ -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)
@@ -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"))
@@ -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");
@@ -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;
@@ -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)
{
@@ -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
@@ -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;
Oops, something went wrong.

0 comments on commit 8142cf1

Please sign in to comment.