|
|
@ -44,6 +44,7 @@ class AutoTypePrivate{ |
|
|
|
inline static void sleepKeyStrokeDelay(){ sleep(config->autoTypeKeyStrokeDelay()); }; |
|
|
|
inline static void sleepKeyStrokeDelay(){ sleep(config->autoTypeKeyStrokeDelay()); }; |
|
|
|
static void templateToKeysyms(const QString& Template, QList<AutoTypeAction>& KeySymList,IEntryHandle* entry); |
|
|
|
static void templateToKeysyms(const QString& Template, QList<AutoTypeAction>& KeySymList,IEntryHandle* entry); |
|
|
|
static void stringToKeysyms(const QString& string,QList<AutoTypeAction>& KeySymList); |
|
|
|
static void stringToKeysyms(const QString& string,QList<AutoTypeAction>& KeySymList); |
|
|
|
|
|
|
|
static QString getRootGroupName(IEntryHandle* entry); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -193,8 +194,11 @@ void AutoType::performGlobal(){ |
|
|
|
QRegExp lineMatch("Auto-Type-Window(?:-(\\d+)|):([^\\n]+)", Qt::CaseInsensitive, QRegExp::RegExp2); |
|
|
|
QRegExp lineMatch("Auto-Type-Window(?:-(\\d+)|):([^\\n]+)", Qt::CaseInsensitive, QRegExp::RegExp2); |
|
|
|
QDateTime now = QDateTime::currentDateTime(); |
|
|
|
QDateTime now = QDateTime::currentDateTime(); |
|
|
|
for (int i=0; i<entries.size(); i++){ |
|
|
|
for (int i=0; i<entries.size(); i++){ |
|
|
|
if (entries[i]->expire()!=Date_Never && entries[i]->expire()<now) |
|
|
|
if ( (entries[i]->expire()!=Date_Never && entries[i]->expire()<now) || |
|
|
|
|
|
|
|
(AutoTypePrivate::getRootGroupName(entries[i]).compare("backup",Qt::CaseInsensitive)==0) |
|
|
|
|
|
|
|
){ |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool hasWindowEntry=false; |
|
|
|
bool hasWindowEntry=false; |
|
|
|
QString comment = entries[i]->comment(); |
|
|
|
QString comment = entries[i]->comment(); |
|
|
@ -564,3 +568,12 @@ void AutoTypePrivate::stringToKeysyms(const QString& string,QList<AutoTypeAction |
|
|
|
for(int i=0; i<string.length();i++) |
|
|
|
for(int i=0; i<string.length();i++) |
|
|
|
KeySymList << AutoTypeAction(TypeKey, HelperX11::getKeysym(string[i])); |
|
|
|
KeySymList << AutoTypeAction(TypeKey, HelperX11::getKeysym(string[i])); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString AutoTypePrivate::getRootGroupName(IEntryHandle* entry){ |
|
|
|
|
|
|
|
IGroupHandle* group = entry->group(); |
|
|
|
|
|
|
|
int level = group->level(); |
|
|
|
|
|
|
|
for (int i=0; i<level; i++) |
|
|
|
|
|
|
|
group = group->parent(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return group->title(); |
|
|
|
|
|
|
|
} |
|
|
|