-rw-r--r-- | pwmanager/pwmanager/pwm.cpp | 13 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwm.h | 1 |
2 files changed, 12 insertions, 2 deletions
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp index 57b4432..26a44b1 100644 --- a/pwmanager/pwmanager/pwm.cpp +++ b/pwmanager/pwmanager/pwm.cpp | |||
@@ -124,25 +124,26 @@ enum { | |||
124 | BUTTON_POPUP_IMPORT_GPASMAN | 124 | BUTTON_POPUP_IMPORT_GPASMAN |
125 | #ifdef CONFIG_KWALLETIF | 125 | #ifdef CONFIG_KWALLETIF |
126 | ,BUTTON_POPUP_IMPORT_KWALLET | 126 | ,BUTTON_POPUP_IMPORT_KWALLET |
127 | #endif | 127 | #endif |
128 | }; | 128 | }; |
129 | 129 | ||
130 | #ifdef PWM_EMBEDDED | 130 | #ifdef PWM_EMBEDDED |
131 | // Button IDs for "help" popup menu | 131 | // Button IDs for "help" popup menu |
132 | enum { | 132 | enum { |
133 | BUTTON_POPUP_HELP_LICENSE = 0, | 133 | BUTTON_POPUP_HELP_LICENSE = 0, |
134 | BUTTON_POPUP_HELP_FAQ, | 134 | BUTTON_POPUP_HELP_FAQ, |
135 | BUTTON_POPUP_HELP_ABOUT, | 135 | BUTTON_POPUP_HELP_ABOUT, |
136 | BUTTON_POPUP_HELP_SYNC | 136 | BUTTON_POPUP_HELP_SYNC, |
137 | BUTTON_POPUP_HELP_WHATSNEW | ||
137 | }; | 138 | }; |
138 | #endif | 139 | #endif |
139 | 140 | ||
140 | // Button IDs for toolbar | 141 | // Button IDs for toolbar |
141 | enum { | 142 | enum { |
142 | BUTTON_TOOL_NEW = 0, | 143 | BUTTON_TOOL_NEW = 0, |
143 | BUTTON_TOOL_OPEN, | 144 | BUTTON_TOOL_OPEN, |
144 | BUTTON_TOOL_SAVE, | 145 | BUTTON_TOOL_SAVE, |
145 | BUTTON_TOOL_SAVEAS, | 146 | BUTTON_TOOL_SAVEAS, |
146 | BUTTON_TOOL_PRINT, | 147 | BUTTON_TOOL_PRINT, |
147 | BUTTON_TOOL_ADD, | 148 | BUTTON_TOOL_ADD, |
148 | BUTTON_TOOL_EDIT, | 149 | BUTTON_TOOL_EDIT, |
@@ -354,24 +355,28 @@ void PwM::initMenubar() | |||
354 | helpPopup->insertItem(i18n("&Faq"), this, | 355 | helpPopup->insertItem(i18n("&Faq"), this, |
355 | SLOT(faq_slot()), 0, | 356 | SLOT(faq_slot()), 0, |
356 | BUTTON_POPUP_HELP_FAQ); | 357 | BUTTON_POPUP_HELP_FAQ); |
357 | 358 | ||
358 | helpPopup->insertItem(i18n("&About PwManager"), this, | 359 | helpPopup->insertItem(i18n("&About PwManager"), this, |
359 | SLOT(createAboutData_slot()), 0, | 360 | SLOT(createAboutData_slot()), 0, |
360 | BUTTON_POPUP_HELP_ABOUT); | 361 | BUTTON_POPUP_HELP_ABOUT); |
361 | 362 | ||
362 | helpPopup->insertItem(i18n("&Sync HowTo"), this, | 363 | helpPopup->insertItem(i18n("&Sync HowTo"), this, |
363 | SLOT(syncHowTo_slot()), 0, | 364 | SLOT(syncHowTo_slot()), 0, |
364 | BUTTON_POPUP_HELP_SYNC); | 365 | BUTTON_POPUP_HELP_SYNC); |
365 | 366 | ||
367 | helpPopup->insertItem(i18n("&What's New"), this, | ||
368 | SLOT(whatsnew_slot()), 0, | ||
369 | BUTTON_POPUP_HELP_WHATSNEW); | ||
370 | |||
366 | #endif | 371 | #endif |
367 | menuBar()->insertItem(i18n("&Help"), helpPopup); | 372 | menuBar()->insertItem(i18n("&Help"), helpPopup); |
368 | 373 | ||
369 | } | 374 | } |
370 | 375 | ||
371 | void PwM::initToolbar() | 376 | void PwM::initToolbar() |
372 | { | 377 | { |
373 | KIconLoader* picons; | 378 | KIconLoader* picons; |
374 | #ifndef PWM_EMBEDDED | 379 | #ifndef PWM_EMBEDDED |
375 | KIconLoader icons; | 380 | KIconLoader icons; |
376 | picons = &icons; | 381 | picons = &icons; |
377 | #else | 382 | #else |
@@ -1279,37 +1284,41 @@ void PwM::showStatMsg(const QString &msg) | |||
1279 | void PwM::focusInEvent(QFocusEvent *e) | 1284 | void PwM::focusInEvent(QFocusEvent *e) |
1280 | { | 1285 | { |
1281 | if (e->gotFocus()) { | 1286 | if (e->gotFocus()) { |
1282 | emit gotFocus(this); | 1287 | emit gotFocus(this); |
1283 | } else if (e->lostFocus()) { | 1288 | } else if (e->lostFocus()) { |
1284 | emit lostFocus(this); | 1289 | emit lostFocus(this); |
1285 | } | 1290 | } |
1286 | } | 1291 | } |
1287 | 1292 | ||
1288 | 1293 | ||
1289 | #ifdef PWM_EMBEDDED | 1294 | #ifdef PWM_EMBEDDED |
1290 | 1295 | ||
1296 | void PwM::whatsnew_slot() | ||
1297 | { | ||
1298 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); | ||
1299 | } | ||
1300 | |||
1291 | void PwM::showLicense_slot() | 1301 | void PwM::showLicense_slot() |
1292 | { | 1302 | { |
1293 | KApplication::showLicence(); | 1303 | KApplication::showLicence(); |
1294 | } | 1304 | } |
1295 | 1305 | ||
1296 | void PwM::faq_slot() | 1306 | void PwM::faq_slot() |
1297 | { | 1307 | { |
1298 | KApplication::showFile( "PWM/Pi FAQ", "kdepim/pwmanager/pwmanagerFAQ.txt" ); | 1308 | KApplication::showFile( "PWM/Pi FAQ", "kdepim/pwmanager/pwmanagerFAQ.txt" ); |
1299 | } | 1309 | } |
1300 | 1310 | ||
1301 | void PwM::syncHowTo_slot() | 1311 | void PwM::syncHowTo_slot() |
1302 | { | 1312 | { |
1303 | qDebug("PwM::syncHowTo_slot"); | ||
1304 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); | 1313 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); |
1305 | } | 1314 | } |
1306 | 1315 | ||
1307 | 1316 | ||
1308 | void PwM::createAboutData_slot() | 1317 | void PwM::createAboutData_slot() |
1309 | { | 1318 | { |
1310 | QString version; | 1319 | QString version; |
1311 | #include <../version> | 1320 | #include <../version> |
1312 | QMessageBox::about( this, "About PwManager/Pi", | 1321 | QMessageBox::about( this, "About PwManager/Pi", |
1313 | "PwManager/Platform-independent\n" | 1322 | "PwManager/Platform-independent\n" |
1314 | "(PWM/Pi) " +version + " - " + | 1323 | "(PWM/Pi) " +version + " - " + |
1315 | #ifdef DESKTOP_VERSION | 1324 | #ifdef DESKTOP_VERSION |
diff --git a/pwmanager/pwmanager/pwm.h b/pwmanager/pwmanager/pwm.h index 6ed9d34..fe1f7a1 100644 --- a/pwmanager/pwmanager/pwm.h +++ b/pwmanager/pwmanager/pwm.h | |||
@@ -165,24 +165,25 @@ public slots: | |||
165 | /** generate a new chipcard */ | 165 | /** generate a new chipcard */ |
166 | void genNewCard_slot(); | 166 | void genNewCard_slot(); |
167 | /** completely erase the current card */ | 167 | /** completely erase the current card */ |
168 | void eraseCard_slot(); | 168 | void eraseCard_slot(); |
169 | /** returns the ID number of the current card */ | 169 | /** returns the ID number of the current card */ |
170 | void readCardId_slot(); | 170 | void readCardId_slot(); |
171 | /** make backup image of the current card */ | 171 | /** make backup image of the current card */ |
172 | void makeCardBackup_slot(); | 172 | void makeCardBackup_slot(); |
173 | /** write backup image to current card */ | 173 | /** write backup image to current card */ |
174 | void replayCardBackup_slot(); | 174 | void replayCardBackup_slot(); |
175 | 175 | ||
176 | #ifdef PWM_EMBEDDED | 176 | #ifdef PWM_EMBEDDED |
177 | void whatsnew_slot(); | ||
177 | void showLicense_slot(); | 178 | void showLicense_slot(); |
178 | void faq_slot(); | 179 | void faq_slot(); |
179 | void createAboutData_slot(); | 180 | void createAboutData_slot(); |
180 | void syncHowTo_slot(); | 181 | void syncHowTo_slot(); |
181 | #endif | 182 | #endif |
182 | 183 | ||
183 | protected: | 184 | protected: |
184 | /** is this window virgin? */ | 185 | /** is this window virgin? */ |
185 | bool isVirgin() | 186 | bool isVirgin() |
186 | { return virgin; } | 187 | { return virgin; } |
187 | /** add/remove virginity */ | 188 | /** add/remove virginity */ |
188 | void setVirgin(bool v); | 189 | void setVirgin(bool v); |