author | alwin <alwin> | 2005-03-01 07:34:24 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-01 07:34:24 (UTC) |
commit | e12f0049687c84c24f0b7b737b65df2ed6a500a5 (patch) (unidiff) | |
tree | d35007beb337e020e997eec7758fdd88a3f3d56c | |
parent | 73faad9d936d5af7a331411a9572fd362907e023 (diff) | |
download | opie-e12f0049687c84c24f0b7b737b65df2ed6a500a5.zip opie-e12f0049687c84c24f0b7b737b65df2ed6a500a5.tar.gz opie-e12f0049687c84c24f0b7b737b65df2ed6a500a5.tar.bz2 |
*** empty log message ***
-rw-r--r-- | noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelper.cpp | 2 | ||||
-rw-r--r-- | noncore/applets/keyhelper/keyhelperapplet/config/KeycfgReader.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelper.cpp b/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelper.cpp index 4afdc1f..4723699 100644 --- a/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelper.cpp +++ b/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelper.cpp | |||
@@ -1,36 +1,38 @@ | |||
1 | #include "KeyHelper.h" | 1 | #include "KeyHelper.h" |
2 | #include <opie2/okeyfilter.h> | 2 | #include <opie2/okeyfilter.h> |
3 | #include <opie2/odebug.h> | ||
3 | 4 | ||
4 | KeyHelper::KeyHelper() | 5 | KeyHelper::KeyHelper() |
5 | { | 6 | { |
6 | qDebug("KeyHelper::KeyHelper()"); | 7 | qDebug("KeyHelper::KeyHelper()"); |
7 | load(); | 8 | load(); |
8 | 9 | ||
9 | m_oAction.setKeyModifiers(&m_oModifiers); | 10 | m_oAction.setKeyModifiers(&m_oModifiers); |
10 | m_oAction.setKeyMappings(&m_oMappings); | 11 | m_oAction.setKeyMappings(&m_oMappings); |
11 | m_oAction.setKeyExtensions(&m_oExtensions); | 12 | m_oAction.setKeyExtensions(&m_oExtensions); |
12 | m_oAction.setKeyRepeater(&m_oRepeater); | 13 | m_oAction.setKeyRepeater(&m_oRepeater); |
13 | m_oExtensions.setKeyModifiers(&m_oModifiers); | 14 | m_oExtensions.setKeyModifiers(&m_oModifiers); |
14 | } | 15 | } |
15 | 16 | ||
16 | KeyHelper::~KeyHelper() | 17 | KeyHelper::~KeyHelper() |
17 | { | 18 | { |
18 | unset(); | 19 | unset(); |
19 | qDebug("KeyHelper::~KeyHelper()"); | 20 | qDebug("KeyHelper::~KeyHelper()"); |
20 | } | 21 | } |
21 | 22 | ||
22 | bool KeyHelper::filter(int unicode, int keycode, int modifiers, | 23 | bool KeyHelper::filter(int unicode, int keycode, int modifiers, |
23 | bool isPress, bool autoRepeat) | 24 | bool isPress, bool autoRepeat) |
24 | { | 25 | { |
26 | odebug << "KeyHelper <<< "<<unicode<<" - "<<keycode<<" - "<<modifiers<<"\n"; | ||
25 | m_oAction.setAction(unicode, keycode, modifiers, | 27 | m_oAction.setAction(unicode, keycode, modifiers, |
26 | isPress, autoRepeat); | 28 | isPress, autoRepeat); |
27 | return(m_oAction.doAction()); | 29 | return(m_oAction.doAction()); |
28 | } | 30 | } |
29 | 31 | ||
30 | void KeyHelper::unset() | 32 | void KeyHelper::unset() |
31 | { | 33 | { |
32 | Opie::Core::OKeyFilter::inst()->remHandler(this);; | 34 | Opie::Core::OKeyFilter::inst()->remHandler(this);; |
33 | } | 35 | } |
34 | 36 | ||
35 | void KeyHelper::set() | 37 | void KeyHelper::set() |
36 | { | 38 | { |
diff --git a/noncore/applets/keyhelper/keyhelperapplet/config/KeycfgReader.cpp b/noncore/applets/keyhelper/keyhelperapplet/config/KeycfgReader.cpp index 44b4b2f..14e8a37 100644 --- a/noncore/applets/keyhelper/keyhelperapplet/config/KeycfgReader.cpp +++ b/noncore/applets/keyhelper/keyhelperapplet/config/KeycfgReader.cpp | |||
@@ -11,25 +11,25 @@ KeycfgReader::~KeycfgReader() | |||
11 | } | 11 | } |
12 | 12 | ||
13 | bool KeycfgReader::load() | 13 | bool KeycfgReader::load() |
14 | { | 14 | { |
15 | QString file; | 15 | QString file; |
16 | ConfigEx& cfg = ConfigEx::getInstance("keyhelper"); | 16 | ConfigEx& cfg = ConfigEx::getInstance("keyhelper"); |
17 | 17 | ||
18 | cfg.setGroup("Global"); | 18 | cfg.setGroup("Global"); |
19 | 19 | ||
20 | file = cfg.readEntry("XmlFile"); | 20 | file = cfg.readEntry("XmlFile"); |
21 | if(file.length() == 0 || !QFile::exists(file)){ | 21 | if(file.length() == 0 || !QFile::exists(file)){ |
22 | /* default */ | 22 | /* default */ |
23 | file = QDir::homeDirPath() + "/Settings/keyhelper.xml"; | 23 | file = QString(getenv( "HOME" )) + QString("/Settings/keyhelper.xml"); |
24 | } | 24 | } |
25 | return(load(file)); | 25 | return(load(file)); |
26 | } | 26 | } |
27 | 27 | ||
28 | bool KeycfgReader::load(const QString& path) | 28 | bool KeycfgReader::load(const QString& path) |
29 | { | 29 | { |
30 | bool success = false; | 30 | bool success = false; |
31 | 31 | ||
32 | KeyNames::reset(); | 32 | KeyNames::reset(); |
33 | 33 | ||
34 | QXmlSimpleReader parser; | 34 | QXmlSimpleReader parser; |
35 | KeycfgHandler handler(&parser); | 35 | KeycfgHandler handler(&parser); |