New structure of auto-type classes

Use xvkbd code for sending auto-type keys
Fixed bug that prevented auto-typing non-latin1 chars
Added Italian translation
Fixed some new gcc warnings

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@238 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
sniperbeamer
2008-12-21 13:11:19 +00:00
parent bb80c9616a
commit 888d0982d4
31 changed files with 4330 additions and 842 deletions

View File

@@ -92,7 +92,7 @@ void AutoTypeDlg::resizeEvent(QResizeEvent* event){
bool AutoTypeDlg::event(QEvent* event){
if (!EventOccurred){
int t = event->type();
if ( t>=QEvent::MouseButtonPress&&t<=QEvent::KeyRelease || t>=QEvent::HoverEnter&&t<=QEvent::HoverMove )
if ( (t>=QEvent::MouseButtonPress && t<=QEvent::KeyRelease) || (t>=QEvent::HoverEnter && t<=QEvent::HoverMove) )
EventOccurred = true;
}
return QWidget::event(event);
@@ -100,6 +100,5 @@ bool AutoTypeDlg::event(QEvent* event){
void AutoTypeDlg::itemSelected(QTreeWidgetItem* item){
close();
QString err;
AutoType::perform(itemToEntry[item].dbHandle, err, pWasLocked, itemToEntry[item].nr, pWasLocked);
autoType->perform(itemToEntry[item].dbHandle, pWasLocked, itemToEntry[item].nr, pWasLocked);
}

View File

@@ -60,8 +60,9 @@ void CSelectIconDlg::OnAddIcon(){
QPixmap icon;
if(!icon.load(filenames[i])){
errors+=tr("%1: File could not be loaded.").arg(filenames[i].section("/",-1)).append("\n");
continue;}
dynamic_cast<ICustomIcons*>(db)->addIcon(icon.scaled(16,16,Qt::KeepAspectRatio,Qt::SmoothTransformation));
continue;
}
dynamic_cast<ICustomIcons*>(db)->addIcon(icon.scaled(16,16,Qt::KeepAspectRatio,Qt::SmoothTransformation));
}
if(errors.size())
QMessageBox::warning(this,tr("Error"),tr("An error occured while loading the icon(s):").append("\n").append(errors));

View File

@@ -72,7 +72,7 @@ CSettingsDlg::CSettingsDlg(QWidget* parent):QDialog(parent,Qt::Dialog)
#endif
#ifdef GLOBAL_AUTOTYPE
pShortcut = AutoType::shortcut;
pShortcut = autoType->getShortcut();
connect(this,SIGNAL(rejected()),SLOT(resetGlobalShortcut()));
#endif
@@ -417,7 +417,7 @@ void CSettingsDlg::OnSelectLanguage(int index){
#ifdef GLOBAL_AUTOTYPE
void CSettingsDlg::resetGlobalShortcut(){
AutoType::unregisterGlobalShortcut();
AutoType::registerGlobalShortcut(pShortcut);
autoType->unregisterGlobalShortcut();
autoType->registerGlobalShortcut(pShortcut);
}
#endif

View File

@@ -22,7 +22,7 @@
TargetWindowDlg::TargetWindowDlg(QWidget* parent) : QDialog(parent){
setupUi(this);
QStringList windowTitles = AutoType::getAllWindowTitles();
QStringList windowTitles = autoType->getAllWindowTitles();
windowTitles.sort();
for (QStringList::const_iterator i = windowTitles.constBegin(); i != windowTitles.constEnd(); ++i)
comboWindow->addItem(*i);