-rw-r--r-- | pwmanager/pwmanager/pwm.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp index bd07c80..cd56399 100644 --- a/pwmanager/pwmanager/pwm.cpp +++ b/pwmanager/pwmanager/pwm.cpp | |||
@@ -183,49 +183,51 @@ PwM::~PwM() | |||
183 | this, SLOT(docClosed(PwMDoc *))); | 183 | this, SLOT(docClosed(PwMDoc *))); |
184 | conf()->confWndMainWndSize(size()); | 184 | conf()->confWndMainWndSize(size()); |
185 | emit closed(this); | 185 | emit closed(this); |
186 | delete view; | 186 | delete view; |
187 | } | 187 | } |
188 | 188 | ||
189 | void PwM::initMenubar() | 189 | void PwM::initMenubar() |
190 | { | 190 | { |
191 | KIconLoader* picons; | 191 | KIconLoader* picons; |
192 | #ifndef PWM_EMBEDDED | 192 | #ifndef PWM_EMBEDDED |
193 | KIconLoader icons; | 193 | KIconLoader icons; |
194 | picons = &icons; | 194 | picons = &icons; |
195 | #else | 195 | #else |
196 | picons = KGlobal::iconLoader(); | 196 | picons = KGlobal::iconLoader(); |
197 | #endif | 197 | #endif |
198 | filePopup = new KPopupMenu(this); | 198 | filePopup = new KPopupMenu(this); |
199 | importPopup = new KPopupMenu(filePopup); | 199 | importPopup = new KPopupMenu(filePopup); |
200 | exportPopup = new KPopupMenu(filePopup); | 200 | exportPopup = new KPopupMenu(filePopup); |
201 | managePopup = new KPopupMenu(this); | 201 | managePopup = new KPopupMenu(this); |
202 | #ifdef CONFIG_KEYCARD | 202 | #ifdef CONFIG_KEYCARD |
203 | chipcardPopup = new KPopupMenu(this); | 203 | chipcardPopup = new KPopupMenu(this); |
204 | #endif // CONFIG_KEYCARD | 204 | #endif // CONFIG_KEYCARD |
205 | viewPopup = new KPopupMenu(this); | 205 | viewPopup = new KPopupMenu(this); |
206 | optionsPopup = new KPopupMenu(this); | 206 | optionsPopup = new KPopupMenu(this); |
207 | 207 | #ifdef PWM_EMBEDDED | |
208 | syncPopup = new KPopupMenu(this); | ||
209 | #endif | ||
208 | // "file" popup menu | 210 | // "file" popup menu |
209 | filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), | 211 | filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), |
210 | i18n("&New"), this, | 212 | i18n("&New"), this, |
211 | SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW); | 213 | SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW); |
212 | filePopup->insertItem(QIconSet(picons->loadIcon("fileopen", KIcon::Small)), | 214 | filePopup->insertItem(QIconSet(picons->loadIcon("fileopen", KIcon::Small)), |
213 | i18n("&Open"), this, | 215 | i18n("&Open"), this, |
214 | SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN); | 216 | SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN); |
215 | filePopup->insertItem(QIconSet(picons->loadIcon("fileclose", KIcon::Small)), | 217 | filePopup->insertItem(QIconSet(picons->loadIcon("fileclose", KIcon::Small)), |
216 | i18n("&Close"), this, | 218 | i18n("&Close"), this, |
217 | SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE); | 219 | SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE); |
218 | filePopup->insertSeparator(); | 220 | filePopup->insertSeparator(); |
219 | filePopup->insertItem(QIconSet(picons->loadIcon("filesave", KIcon::Small)), | 221 | filePopup->insertItem(QIconSet(picons->loadIcon("filesave", KIcon::Small)), |
220 | i18n("&Save"), this, | 222 | i18n("&Save"), this, |
221 | SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE); | 223 | SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE); |
222 | filePopup->insertItem(QIconSet(picons->loadIcon("filesaveas", KIcon::Small)), | 224 | filePopup->insertItem(QIconSet(picons->loadIcon("filesaveas", KIcon::Small)), |
223 | i18n("Save &as..."), | 225 | i18n("Save &as..."), |
224 | this, SLOT(saveAs_slot()), 0, | 226 | this, SLOT(saveAs_slot()), 0, |
225 | BUTTON_POPUP_FILE_SAVEAS); | 227 | BUTTON_POPUP_FILE_SAVEAS); |
226 | filePopup->insertSeparator(); | 228 | filePopup->insertSeparator(); |
227 | // "file/export" popup menu | 229 | // "file/export" popup menu |
228 | exportPopup->insertItem(i18n("&Text-file..."), this, | 230 | exportPopup->insertItem(i18n("&Text-file..."), this, |
229 | SLOT(exportToText()), 0, BUTTON_POPUP_EXPORT_TEXT); | 231 | SLOT(exportToText()), 0, BUTTON_POPUP_EXPORT_TEXT); |
230 | exportPopup->insertItem(i18n("&Gpasman / Kpasman ..."), this, | 232 | exportPopup->insertItem(i18n("&Gpasman / Kpasman ..."), this, |
231 | SLOT(exportToGpasman()), 0, BUTTON_POPUP_EXPORT_GPASMAN); | 233 | SLOT(exportToGpasman()), 0, BUTTON_POPUP_EXPORT_GPASMAN); |
@@ -306,48 +308,61 @@ void PwM::initMenubar() | |||
306 | viewPopup->insertSeparator(); | 308 | viewPopup->insertSeparator(); |
307 | viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)), | 309 | viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)), |
308 | i18n("&Lock all entries"), this, | 310 | i18n("&Lock all entries"), this, |
309 | SLOT(lockWnd_slot()), 0, | 311 | SLOT(lockWnd_slot()), 0, |
310 | BUTTON_POPUP_VIEW_LOCK); | 312 | BUTTON_POPUP_VIEW_LOCK); |
311 | viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)), | 313 | viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)), |
312 | i18n("&Deep-lock all entries"), this, | 314 | i18n("&Deep-lock all entries"), this, |
313 | SLOT(deepLockWnd_slot()), 0, | 315 | SLOT(deepLockWnd_slot()), 0, |
314 | BUTTON_POPUP_VIEW_DEEPLOCK); | 316 | BUTTON_POPUP_VIEW_DEEPLOCK); |
315 | viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)), | 317 | viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)), |
316 | i18n("&Unlock all entries"), this, | 318 | i18n("&Unlock all entries"), this, |
317 | SLOT(unlockWnd_slot()), 0, | 319 | SLOT(unlockWnd_slot()), 0, |
318 | BUTTON_POPUP_VIEW_UNLOCK); | 320 | BUTTON_POPUP_VIEW_UNLOCK); |
319 | menuBar()->insertItem(i18n("&View"), viewPopup); | 321 | menuBar()->insertItem(i18n("&View"), viewPopup); |
320 | // "options" popup menu | 322 | // "options" popup menu |
321 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), | 323 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), |
322 | i18n("&Configure..."), this, | 324 | i18n("&Configure..."), this, |
323 | SLOT(config_slot()), | 325 | SLOT(config_slot()), |
324 | BUTTON_POPUP_OPTIONS_CONFIG); | 326 | BUTTON_POPUP_OPTIONS_CONFIG); |
325 | menuBar()->insertItem(i18n("&Options"), optionsPopup); | 327 | menuBar()->insertItem(i18n("&Options"), optionsPopup); |
326 | // "help" popup menu | 328 | // "help" popup menu |
327 | #ifndef PWM_EMBEDDED | 329 | #ifndef PWM_EMBEDDED |
328 | helpPopup = helpMenu(QString::null, false); | 330 | helpPopup = helpMenu(QString::null, false); |
329 | #else | 331 | #else |
332 | Popup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), | ||
333 | i18n("&Configure..."), this, | ||
334 | SLOT(config_slot()), | ||
335 | BUTTON_POPUP_OPTIONS_CONFIG); | ||
336 | connect ( syncMenu, SIGNAL( activated ( int ) ), this, SLOT (slotSyncMenu( int ) ) ); | ||
337 | fillSyncMenu(); | ||
338 | |||
339 | menuBar()->insertItem(i18n("&Syncronize"), syncPopup); | ||
340 | |||
341 | |||
342 | |||
343 | |||
344 | |||
330 | helpPopup = new KPopupMenu(this); | 345 | helpPopup = new KPopupMenu(this); |
331 | 346 | ||
332 | 347 | ||
333 | helpPopup->insertItem(i18n("&License"), this, | 348 | helpPopup->insertItem(i18n("&License"), this, |
334 | SLOT(showLicense_slot()), 0, | 349 | SLOT(showLicense_slot()), 0, |
335 | BUTTON_POPUP_HELP_LICENSE); | 350 | BUTTON_POPUP_HELP_LICENSE); |
336 | 351 | ||
337 | helpPopup->insertItem(i18n("&Faq"), this, | 352 | helpPopup->insertItem(i18n("&Faq"), this, |
338 | SLOT(faq_slot()), 0, | 353 | SLOT(faq_slot()), 0, |
339 | BUTTON_POPUP_HELP_FAQ); | 354 | BUTTON_POPUP_HELP_FAQ); |
340 | 355 | ||
341 | helpPopup->insertItem(i18n("&About PwManager"), this, | 356 | helpPopup->insertItem(i18n("&About PwManager"), this, |
342 | SLOT(createAboutData_slot()), 0, | 357 | SLOT(createAboutData_slot()), 0, |
343 | BUTTON_POPUP_HELP_ABOUT); | 358 | BUTTON_POPUP_HELP_ABOUT); |
344 | 359 | ||
345 | #endif | 360 | #endif |
346 | menuBar()->insertItem(i18n("&Help"), helpPopup); | 361 | menuBar()->insertItem(i18n("&Help"), helpPopup); |
347 | 362 | ||
348 | } | 363 | } |
349 | 364 | ||
350 | void PwM::initToolbar() | 365 | void PwM::initToolbar() |
351 | { | 366 | { |
352 | KIconLoader* picons; | 367 | KIconLoader* picons; |
353 | #ifndef PWM_EMBEDDED | 368 | #ifndef PWM_EMBEDDED |