-rw-r--r-- | microkde/kdeui/klistview.cpp | 2 | ||||
-rw-r--r-- | pwmanager/pwmanager/globalstuff.h | 4 | ||||
-rw-r--r-- | pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp | 7 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmprefs.h | 4 |
4 files changed, 9 insertions, 8 deletions
diff --git a/microkde/kdeui/klistview.cpp b/microkde/kdeui/klistview.cpp index 6477d11..5b50ba9 100644 --- a/microkde/kdeui/klistview.cpp +++ b/microkde/kdeui/klistview.cpp | |||
@@ -1856,49 +1856,49 @@ int KListView::itemIndex( const QListViewItem *item ) const | |||
1856 | 1856 | ||
1857 | return j; | 1857 | return j; |
1858 | } | 1858 | } |
1859 | } | 1859 | } |
1860 | 1860 | ||
1861 | QListViewItem* KListView::itemAtIndex(int index) | 1861 | QListViewItem* KListView::itemAtIndex(int index) |
1862 | { | 1862 | { |
1863 | if (index<0) | 1863 | if (index<0) |
1864 | return 0; | 1864 | return 0; |
1865 | 1865 | ||
1866 | int j(0); | 1866 | int j(0); |
1867 | for (QListViewItemIterator it=firstChild(); it.current(); it++) | 1867 | for (QListViewItemIterator it=firstChild(); it.current(); it++) |
1868 | { | 1868 | { |
1869 | if (j==index) | 1869 | if (j==index) |
1870 | return it.current(); | 1870 | return it.current(); |
1871 | j++; | 1871 | j++; |
1872 | }; | 1872 | }; |
1873 | return 0; | 1873 | return 0; |
1874 | } | 1874 | } |
1875 | 1875 | ||
1876 | 1876 | ||
1877 | void KListView::emitContextMenu (KListView*, QListViewItem* i) | 1877 | void KListView::emitContextMenu (KListView*, QListViewItem* i) |
1878 | { | 1878 | { |
1879 | QPoint p; | 1879 | QPoint p; |
1880 | qDebug("KListView::emitContextMenu "); | 1880 | // qDebug("KListView::emitContextMenu "); |
1881 | 1881 | ||
1882 | if (i) | 1882 | if (i) |
1883 | p = viewport()->mapToGlobal(itemRect(i).center()); | 1883 | p = viewport()->mapToGlobal(itemRect(i).center()); |
1884 | else | 1884 | else |
1885 | p = mapToGlobal(rect().center()); | 1885 | p = mapToGlobal(rect().center()); |
1886 | 1886 | ||
1887 | emit contextMenu (this, i, p); | 1887 | emit contextMenu (this, i, p); |
1888 | } | 1888 | } |
1889 | 1889 | ||
1890 | void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int col) | 1890 | void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int col) |
1891 | { | 1891 | { |
1892 | qDebug("KListView::emitContextMenu col"); | 1892 | qDebug("KListView::emitContextMenu col"); |
1893 | emit contextRequest( i, p, col ); | 1893 | emit contextRequest( i, p, col ); |
1894 | emit contextMenu (this, i, p); | 1894 | emit contextMenu (this, i, p); |
1895 | } | 1895 | } |
1896 | 1896 | ||
1897 | void KListView::setAcceptDrops (bool val) | 1897 | void KListView::setAcceptDrops (bool val) |
1898 | { | 1898 | { |
1899 | QListView::setAcceptDrops (val); | 1899 | QListView::setAcceptDrops (val); |
1900 | viewport()->setAcceptDrops (val); | 1900 | viewport()->setAcceptDrops (val); |
1901 | } | 1901 | } |
1902 | 1902 | ||
1903 | int KListView::dropVisualizerWidth () const | 1903 | int KListView::dropVisualizerWidth () const |
1904 | { | 1904 | { |
diff --git a/pwmanager/pwmanager/globalstuff.h b/pwmanager/pwmanager/globalstuff.h index 4f70f68..090fcda 100644 --- a/pwmanager/pwmanager/globalstuff.h +++ b/pwmanager/pwmanager/globalstuff.h | |||
@@ -24,54 +24,54 @@ | |||
24 | #include "config.h" | 24 | #include "config.h" |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #include "compiler.h" | 27 | #include "compiler.h" |
28 | 28 | ||
29 | //US BUG: the following code caused compile errors with certain gcccompilers (2.95). | 29 | //US BUG: the following code caused compile errors with certain gcccompilers (2.95). |
30 | // Because of that I replaced it with a Qt version, which should do the same. | 30 | // Because of that I replaced it with a Qt version, which should do the same. |
31 | #include <string> | 31 | #include <string> |
32 | 32 | ||
33 | #ifndef PWM_EMBEDDED | 33 | #ifndef PWM_EMBEDDED |
34 | #include <sstream> | 34 | #include <sstream> |
35 | #else | 35 | #else |
36 | #include <qstring.h> | 36 | #include <qstring.h> |
37 | #include <qtextstream.h> | 37 | #include <qtextstream.h> |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #ifndef CONFIG_KEYCARD | 40 | #ifndef CONFIG_KEYCARD |
41 | class QWidget; | 41 | class QWidget; |
42 | void no_keycard_support_msg_box(QWidget *parentWidget); | 42 | void no_keycard_support_msg_box(QWidget *parentWidget); |
43 | #endif // CONFIG_KEYCARD | 43 | #endif // CONFIG_KEYCARD |
44 | 44 | ||
45 | #ifdef PROG_NAME | 45 | #ifdef PROG_NAME |
46 | # undef PROG_NAME | 46 | # undef PROG_NAME |
47 | #endif | 47 | #endif |
48 | #define PROG_NAME"PwManager-MicroKDE" | 48 | #define PROG_NAME"PwM/Pi" |
49 | 49 | ||
50 | #ifdef PACKAGE_NAME | 50 | #ifdef PACKAGE_NAME |
51 | # undef PACKAGE_NAME | 51 | # undef PACKAGE_NAME |
52 | #endif | 52 | #endif |
53 | #define PACKAGE_NAME"pwmanager-microkde" | 53 | #define PACKAGE_NAME"pwm-pi" |
54 | 54 | ||
55 | #ifdef PACKAGE_VER | 55 | #ifdef PACKAGE_VER |
56 | # undef PACKAGE_VER | 56 | # undef PACKAGE_VER |
57 | #endif | 57 | #endif |
58 | #define PACKAGE_VER"1.0.1" | 58 | #define PACKAGE_VER"1.0.1" |
59 | 59 | ||
60 | #ifdef CONFIG_DEBUG | 60 | #ifdef CONFIG_DEBUG |
61 | # define PWM_DEBUG | 61 | # define PWM_DEBUG |
62 | #else | 62 | #else |
63 | # undef PWM_DEBUG | 63 | # undef PWM_DEBUG |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #ifdef QT_MAKE_VERSION | 66 | #ifdef QT_MAKE_VERSION |
67 | # undef QT_MAKE_VERSION | 67 | # undef QT_MAKE_VERSION |
68 | #endif | 68 | #endif |
69 | #define QT_MAKE_VERSION(a,b,c)(((a) << 16) | ((b) << 8) | (c)) | 69 | #define QT_MAKE_VERSION(a,b,c)(((a) << 16) | ((b) << 8) | (c)) |
70 | 70 | ||
71 | /** remove "unused parameter" warnings */ | 71 | /** remove "unused parameter" warnings */ |
72 | #ifdef PARAM_UNUSED | 72 | #ifdef PARAM_UNUSED |
73 | # undef PARAM_UNUSED | 73 | # undef PARAM_UNUSED |
74 | #endif | 74 | #endif |
75 | #define PARAM_UNUSED(x)(void)x | 75 | #define PARAM_UNUSED(x)(void)x |
76 | 76 | ||
77 | /** return the number of elements in an array */ | 77 | /** return the number of elements in an array */ |
diff --git a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp index 720dfcc..26b9708 100644 --- a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp +++ b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp | |||
@@ -192,77 +192,78 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n | |||
192 | QGridLayout *externalappLayout = new QGridLayout( externalappPage, 3, 2); | 192 | QGridLayout *externalappLayout = new QGridLayout( externalappPage, 3, 2); |
193 | 193 | ||
194 | i = 0; | 194 | i = 0; |
195 | 195 | ||
196 | browserLineEdit = new QLineEdit(externalappPage); | 196 | browserLineEdit = new QLineEdit(externalappPage); |
197 | QLabel* browserLineLabel = new QLabel(browserLineEdit, i18n("Favourite browser:"), externalappPage); | 197 | QLabel* browserLineLabel = new QLabel(browserLineEdit, i18n("Favourite browser:"), externalappPage); |
198 | externalappLayout->addWidget(browserLineLabel,i,0); | 198 | externalappLayout->addWidget(browserLineLabel,i,0); |
199 | externalappLayout->addWidget(browserLineEdit,i,1); | 199 | externalappLayout->addWidget(browserLineEdit,i,1); |
200 | ++i; | 200 | ++i; |
201 | 201 | ||
202 | xtermLineEdit = new QLineEdit(externalappPage); | 202 | xtermLineEdit = new QLineEdit(externalappPage); |
203 | QLabel* xtermLineLabel = new QLabel(xtermLineEdit, i18n("Favourite x-terminal:"), externalappPage); | 203 | QLabel* xtermLineLabel = new QLabel(xtermLineEdit, i18n("Favourite x-terminal:"), externalappPage); |
204 | externalappLayout->addWidget(xtermLineLabel,i,0); | 204 | externalappLayout->addWidget(xtermLineLabel,i,0); |
205 | externalappLayout->addWidget(xtermLineEdit,i,1); | 205 | externalappLayout->addWidget(xtermLineEdit,i,1); |
206 | ++i; | 206 | ++i; |
207 | 207 | ||
208 | 208 | ||
209 | // miscelaneous page | 209 | // miscelaneous page |
210 | ////////////////////////////////////////////////////// | 210 | ////////////////////////////////////////////////////// |
211 | QWidget *miscPage = new QWidget( this ); | 211 | QWidget *miscPage = new QWidget( this ); |
212 | QGridLayout *miscLayout = new QGridLayout( miscPage, 3, 2); | 212 | QGridLayout *miscLayout = new QGridLayout( miscPage, 3, 2); |
213 | 213 | ||
214 | i = 0; | 214 | i = 0; |
215 | 215 | ||
216 | /*US ENH: PWM/Pi has no tray and con be minimized | ||
216 | sb = addWidBool(i18n("Show icon in system-tray"),&(prefs->mTray),miscPage); | 217 | sb = addWidBool(i18n("Show icon in system-tray"),&(prefs->mTray),miscPage); |
217 | miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); | 218 | miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); |
218 | ++i; | 219 | ++i; |
219 | 220 | */ | |
220 | 221 | ||
221 | sb = addWidBool(i18n("Open document with passwords unlocked"),&(prefs->mUnlockOnOpen),miscPage); | 222 | sb = addWidBool(i18n("Open document with passwords unlocked"),&(prefs->mUnlockOnOpen),miscPage); |
222 | miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); | 223 | miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); |
223 | ++i; | 224 | ++i; |
224 | 225 | ||
226 | /*US ENH: PWM/Pi has no tray and con be minimized | ||
225 | sb = addWidBool(i18n("auto-minimize to tray on startup"),&(prefs->mAutoMinimizeOnStart),miscPage); | 227 | sb = addWidBool(i18n("auto-minimize to tray on startup"),&(prefs->mAutoMinimizeOnStart),miscPage); |
226 | miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); | 228 | miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); |
227 | sb->checkBox()->setEnabled (FALSE); | ||
228 | ++i; | 229 | ++i; |
229 | 230 | ||
230 | KPrefsWidRadios * minimizeRadio = addWidRadios(i18n("auto-lock on minimize:") ,&(prefs->mMinimizeLock), miscPage); | 231 | KPrefsWidRadios * minimizeRadio = addWidRadios(i18n("auto-lock on minimize:") ,&(prefs->mMinimizeLock), miscPage); |
231 | minimizeRadio->addRadio(i18n("don't lock")); | 232 | minimizeRadio->addRadio(i18n("don't lock")); |
232 | minimizeRadio->addRadio(i18n("normal lock")); | 233 | minimizeRadio->addRadio(i18n("normal lock")); |
233 | minimizeRadio->addRadio(i18n("deep-lock")); | 234 | minimizeRadio->addRadio(i18n("deep-lock")); |
234 | miscLayout->addMultiCellWidget( (QWidget*)minimizeRadio->groupBox(),i,i,0,2); | 235 | miscLayout->addMultiCellWidget( (QWidget*)minimizeRadio->groupBox(),i,i,0,2); |
235 | ++i; | 236 | ++i; |
236 | 237 | ||
237 | sb = addWidBool(i18n("KWallet emulation"),&(prefs->mKWalletEmu),miscPage); | 238 | sb = addWidBool(i18n("KWallet emulation"),&(prefs->mKWalletEmu),miscPage); |
238 | miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); | 239 | miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); |
239 | ++i; | 240 | ++i; |
240 | 241 | ||
241 | sb = addWidBool(i18n("Close instead Minimize into tray"),&(prefs->mClose),miscPage); | 242 | sb = addWidBool(i18n("Close instead Minimize into tray"),&(prefs->mClose),miscPage); |
242 | miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); | 243 | miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); |
243 | ++i; | 244 | ++i; |
244 | 245 | */ | |
245 | 246 | ||
246 | 247 | ||
247 | tabWidget->addTab( windowStylePage, i18n( "Look && feel" ) ); | 248 | tabWidget->addTab( windowStylePage, i18n( "Look && feel" ) ); |
248 | tabWidget->addTab( filePage, i18n( "File" ) ); | 249 | tabWidget->addTab( filePage, i18n( "File" ) ); |
249 | tabWidget->addTab( timeoutPage, i18n( "Timeout" ) ); | 250 | tabWidget->addTab( timeoutPage, i18n( "Timeout" ) ); |
250 | tabWidget->addTab( autostartPage, i18n( "Autostart" ) ); | 251 | tabWidget->addTab( autostartPage, i18n( "Autostart" ) ); |
251 | tabWidget->addTab( externalappPage, i18n( "External apps" ) ); | 252 | tabWidget->addTab( externalappPage, i18n( "External apps" ) ); |
252 | tabWidget->addTab( miscPage, i18n( "Miscellaneous" ) ); | 253 | tabWidget->addTab( miscPage, i18n( "Miscellaneous" ) ); |
253 | 254 | ||
254 | 255 | ||
255 | connect( permissionLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) ); | 256 | connect( permissionLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) ); |
256 | connect( pwTimeoutSpinBox, SIGNAL( valueChanged(int) ), this, SLOT( modified() ) ); | 257 | connect( pwTimeoutSpinBox, SIGNAL( valueChanged(int) ), this, SLOT( modified() ) ); |
257 | connect( lockTimeoutSpinBox, SIGNAL( valueChanged(int) ), this, SLOT( modified() ) ); | 258 | connect( lockTimeoutSpinBox, SIGNAL( valueChanged(int) ), this, SLOT( modified() ) ); |
258 | connect( autostartLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) ); | 259 | connect( autostartLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) ); |
259 | connect( browserLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) ); | 260 | connect( browserLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) ); |
260 | connect( xtermLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) ); | 261 | connect( xtermLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) ); |
261 | 262 | ||
262 | } | 263 | } |
263 | 264 | ||
264 | 265 | ||
265 | void PWMConfigWidget::usrReadConfig() | 266 | void PWMConfigWidget::usrReadConfig() |
266 | { | 267 | { |
267 | PWMPrefs* prefs = PWMPrefs::instance(); | 268 | PWMPrefs* prefs = PWMPrefs::instance(); |
268 | 269 | ||
diff --git a/pwmanager/pwmanager/pwmprefs.h b/pwmanager/pwmanager/pwmprefs.h index 1c8b982..5b8f9d8 100644 --- a/pwmanager/pwmanager/pwmprefs.h +++ b/pwmanager/pwmanager/pwmprefs.h | |||
@@ -19,62 +19,62 @@ | |||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | 22 | ||
23 | $Id$ | 23 | $Id$ |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #ifndef PWMPREFS_H | 26 | #ifndef PWMPREFS_H |
27 | #define PWMPREFS_H | 27 | #define PWMPREFS_H |
28 | 28 | ||
29 | #include <qstringlist.h> | 29 | #include <qstringlist.h> |
30 | #include <qsize.h> | 30 | #include <qsize.h> |
31 | 31 | ||
32 | #include <kpimprefs.h> | 32 | #include <kpimprefs.h> |
33 | 33 | ||
34 | class KConfig; | 34 | class KConfig; |
35 | 35 | ||
36 | #define conf() PWMPrefs::instance() | 36 | #define conf() PWMPrefs::instance() |
37 | 37 | ||
38 | 38 | ||
39 | 39 | ||
40 | 40 | ||
41 | #define CONF_DEFAULT_PWTIMEOUT 10/* 10 sec */ | 41 | #define CONF_DEFAULT_PWTIMEOUT 10/* 10 sec */ |
42 | #define CONF_DEFAULT_LOCKTIMEOUT 0/* 0 == disable */ | 42 | #define CONF_DEFAULT_LOCKTIMEOUT 0/* 0 == disable */ |
43 | #define CONF_DEFAULT_TRAY true | 43 | #define CONF_DEFAULT_TRAY false |
44 | #define CONF_DEFAULT_UNLOCKONOPEN true | 44 | #define CONF_DEFAULT_UNLOCKONOPEN true |
45 | #define CONF_DEFAULT_MAINVIEWSTYLE 1/* Category List Left */ | 45 | #define CONF_DEFAULT_MAINVIEWSTYLE 1/* Category List Left */ |
46 | #define CONF_DEFAULT_COMPRESSION 0x01/* gzip */ | 46 | #define CONF_DEFAULT_COMPRESSION 0x01/* gzip */ |
47 | #define CONF_DEFAULT_CRYPTALGO (0x01 - 1)/* blowfish */ | 47 | #define CONF_DEFAULT_CRYPTALGO (0x01 - 1)/* blowfish */ |
48 | #define CONF_DEFAULT_HASHALGO (0x01 - 1)/* sha1 */ | 48 | #define CONF_DEFAULT_HASHALGO (0x01 - 1)/* sha1 */ |
49 | #define CONF_DEFAULT_AUTOMINIMIZE false | 49 | #define CONF_DEFAULT_AUTOMINIMIZE false |
50 | #define CONF_DEFAULT_BROWSERCOMMAND "" | 50 | #define CONF_DEFAULT_BROWSERCOMMAND "" |
51 | #define CONF_DEFAULT_XTERMCOMMAND "konsole -e" | 51 | #define CONF_DEFAULT_XTERMCOMMAND "konsole -e" |
52 | #define CONF_DEFAULT_FILEPERMISSIONS 0600 | 52 | #define CONF_DEFAULT_FILEPERMISSIONS 0600 |
53 | #define CONF_DEFAULT_MAKEFILEBACKUP false | 53 | #define CONF_DEFAULT_MAKEFILEBACKUP false |
54 | #define CONF_DEFAULT_AUTOSTART_DEEPL true | 54 | #define CONF_DEFAULT_AUTOSTART_DEEPL true |
55 | #define CONF_DEFAULT_AUTODEEPLOCK true | 55 | #define CONF_DEFAULT_AUTODEEPLOCK true |
56 | #define CONF_DEFAULT_KWALLETEMU true | 56 | #define CONF_DEFAULT_KWALLETEMU false |
57 | #define CONF_DEFAULT_MINIMIZELOCK 2/* deep-lock */ | 57 | #define CONF_DEFAULT_MINIMIZELOCK 2/* deep-lock */ |
58 | #define CONF_DEFAULT_NEWENTRLOCKSTAT false/* new entries unlocked */ | 58 | #define CONF_DEFAULT_NEWENTRLOCKSTAT false/* new entries unlocked */ |
59 | #define CONF_DEFAULT_WNDCLOSE true/* don't minimize to tray */ | 59 | #define CONF_DEFAULT_WNDCLOSE true/* don't minimize to tray */ |
60 | 60 | ||
61 | 61 | ||
62 | class PWMPrefs : public KPimPrefs | 62 | class PWMPrefs : public KPimPrefs |
63 | { | 63 | { |
64 | public: | 64 | public: |
65 | virtual ~PWMPrefs(); | 65 | virtual ~PWMPrefs(); |
66 | 66 | ||
67 | static PWMPrefs *instance(); | 67 | static PWMPrefs *instance(); |
68 | 68 | ||
69 | public: | 69 | public: |
70 | /* functions for reading the configuration settings */ | 70 | /* functions for reading the configuration settings */ |
71 | /* GLOBAL */ | 71 | /* GLOBAL */ |
72 | QString confGlobAutoStart(); | 72 | QString confGlobAutoStart(); |
73 | QString confGlobBrowserCommand(); | 73 | QString confGlobBrowserCommand(); |
74 | QString confGlobXtermCommand(); | 74 | QString confGlobXtermCommand(); |
75 | QFont confGlobEntryFont(); | 75 | QFont confGlobEntryFont(); |
76 | int confGlobPwTimeout(); | 76 | int confGlobPwTimeout(); |
77 | int confGlobLockTimeout(); | 77 | int confGlobLockTimeout(); |
78 | int confGlobCompression(); | 78 | int confGlobCompression(); |
79 | int confGlobCryptAlgo(); | 79 | int confGlobCryptAlgo(); |
80 | int confGlobHashAlgo(); | 80 | int confGlobHashAlgo(); |