Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
[keyboard] - change all occurences of GUIDialogKeyboard to the new ap…
Browse files Browse the repository at this point in the history
…proach and removed unneeded keyboard includes
  • Loading branch information
Memphiz committed Aug 1, 2012
1 parent 628a646 commit 8142cf1
Show file tree
Hide file tree
Showing 27 changed files with 77 additions and 77 deletions.
4 changes: 2 additions & 2 deletions xbmc/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions xbmc/GUIPassword.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions xbmc/addons/GUIDialogAddonSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions xbmc/dialogs/GUIDialogFavourites.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions xbmc/dialogs/GUIDialogFileBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions xbmc/dialogs/GUIDialogMediaSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/

#include "GUIDialogSmartPlaylistEditor.h"
#include "GUIDialogKeyboard.h"
#include "guilib/GUIKeyboardFactory.h"
#include "Util.h"
#include "utils/URIUtils.h"
#include "GUIDialogSmartPlaylistRule.h"
Expand Down Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions xbmc/filesystem/IDirectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions xbmc/guilib/GUIEditControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions xbmc/interfaces/Builtins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"))
Expand Down
16 changes: 8 additions & 8 deletions xbmc/interfaces/python/xbmcmodule/keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand All @@ -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");
Expand All @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions xbmc/interfaces/python/xbmcmodule/keyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <string>
#pragma once

class CGUIDialogKeyboard;
class CGUIDialogKeyboardGeneric;

#ifdef __cplusplus
extern "C" {
Expand All @@ -37,7 +37,7 @@ namespace PYXBMC
std::string strDefault;
std::string strHeading;
bool bHidden;
CGUIDialogKeyboard* dlg;
CGUIDialogKeyboardGeneric* dlg;
} Keyboard;

extern PyTypeObject Keyboard_Type;
Expand Down
8 changes: 4 additions & 4 deletions xbmc/music/infoscanner/MusicInfoScanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
{
Expand Down
12 changes: 6 additions & 6 deletions xbmc/music/windows/GUIWindowMusicBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions xbmc/music/windows/GUIWindowMusicNav.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 8142cf1

Please sign in to comment.