-rw-r--r-- | pwmanager/pwmanager/pwm.cpp | 68 |
1 files changed, 37 insertions, 31 deletions
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp index 8373850..694fb13 100644 --- a/pwmanager/pwmanager/pwm.cpp +++ b/pwmanager/pwmanager/pwm.cpp | |||
@@ -12,32 +12,38 @@ | |||
12 | /*************************************************************************** | 12 | /*************************************************************************** |
13 | * copyright (C) 2004 by Ulf Schenk | 13 | * copyright (C) 2004 by Ulf Schenk |
14 | * This file is originaly based on version 1.0.1 of pwmanager | 14 | * This file is originaly based on version 1.0.1 of pwmanager |
15 | * and was modified to run on embedded devices that run microkde | 15 | * and was modified to run on embedded devices that run microkde |
16 | * | 16 | * |
17 | * $Id$ | 17 | * $Id$ |
18 | **************************************************************************/ | 18 | **************************************************************************/ |
19 | 19 | ||
20 | #include <klocale.h> | 20 | #include <klocale.h> |
21 | #include <klistview.h> | 21 | #include <klistview.h> |
22 | #include <ktoolbar.h> | 22 | #include <ktoolbar.h> |
23 | #include <kfiledialog.h> | 23 | #include <kfiledialog.h> |
24 | #include <kiconloader.h> | 24 | #include <kiconloader.h> |
25 | #include <kmessagebox.h> | 25 | #include <kmessagebox.h> |
26 | 26 | ||
27 | #include <qstatusbar.h> | 27 | #include <qstatusbar.h> |
28 | #include <QDesktopWidget> | ||
29 | //Added by qt3to4: | ||
30 | #include <Q3ValueList> | ||
31 | #include <QHideEvent> | ||
32 | #include <QFocusEvent> | ||
33 | #include <QCloseEvent> | ||
28 | 34 | ||
29 | #ifndef PWM_EMBEDDED | 35 | #ifndef PWM_EMBEDDED |
30 | #include <kmenubar.h> | 36 | #include <kmenubar.h> |
31 | #include <kstatusbar.h> | 37 | #include <kstatusbar.h> |
32 | #include <dcopclient.h> | 38 | #include <dcopclient.h> |
33 | #include "configwndimpl.h" | 39 | #include "configwndimpl.h" |
34 | #include "configuration.h" | 40 | #include "configuration.h" |
35 | #else | 41 | #else |
36 | #include <qmenubar.h> | 42 | #include <qmenubar.h> |
37 | #include <qmessagebox.h> | 43 | #include <qmessagebox.h> |
38 | #include <pwmprefs.h> | 44 | #include <pwmprefs.h> |
39 | #include <kpimglobalprefs.h> | 45 | #include <kpimglobalprefs.h> |
40 | #include <kprefsdialog.h> | 46 | #include <kprefsdialog.h> |
41 | #include <kcmconfigs/kcmpwmconfig.h> | 47 | #include <kcmconfigs/kcmpwmconfig.h> |
42 | #include <kcmconfigs/kcmkdepimconfig.h> | 48 | #include <kcmconfigs/kcmkdepimconfig.h> |
43 | #include <kcmultidialog.h> | 49 | #include <kcmultidialog.h> |
@@ -173,33 +179,33 @@ enum { | |||
173 | PwM::PwM(PwMInit *_init, PwMDoc *doc, | 179 | PwM::PwM(PwMInit *_init, PwMDoc *doc, |
174 | bool virginity, | 180 | bool virginity, |
175 | QWidget *parent, const char *name) | 181 | QWidget *parent, const char *name) |
176 | : KMainWindow(parent, "HALLO") | 182 | : KMainWindow(parent, "HALLO") |
177 | , forceQuit (false) | 183 | , forceQuit (false) |
178 | , forceMinimizeToTray (false) | 184 | , forceMinimizeToTray (false) |
179 | { | 185 | { |
180 | syncManager = 0; | 186 | syncManager = 0; |
181 | virgin = !virginity; | 187 | virgin = !virginity; |
182 | init = _init; | 188 | init = _init; |
183 | connect(doc, SIGNAL(docClosed(PwMDoc *)), | 189 | connect(doc, SIGNAL(docClosed(PwMDoc *)), |
184 | this, SLOT(docClosed(PwMDoc *))); | 190 | this, SLOT(docClosed(PwMDoc *))); |
185 | initMenubar(); | 191 | initMenubar(); |
186 | initToolbar(); | 192 | initToolbar(); |
187 | initMetrics(); | 193 | initMetrics(); |
188 | setVirgin(virginity); | 194 | setVirgin(virginity); |
189 | setFocusPolicy(QWidget::WheelFocus); | 195 | setFocusPolicy(Qt::WheelFocus); |
190 | #ifndef PWM_EMBEDDED | 196 | #ifndef PWM_EMBEDDED |
191 | statusBar()->show(); | 197 | statusBar()->show(); |
192 | #endif | 198 | #endif |
193 | view = makeNewListView(doc); | 199 | view = makeNewListView(doc); |
194 | setCentralWidget(view); | 200 | setCentralWidget(view); |
195 | updateCaption(); | 201 | updateCaption(); |
196 | showStatMsg(i18n("Ready.")); | 202 | showStatMsg(i18n("Ready.")); |
197 | } | 203 | } |
198 | 204 | ||
199 | PwM::~PwM() | 205 | PwM::~PwM() |
200 | { | 206 | { |
201 | //qDebug("PwM::~PwM() %x", this); | 207 | //qDebug("PwM::~PwM() %x", this); |
202 | disconnect(curDoc(), SIGNAL(docClosed(PwMDoc *)), | 208 | disconnect(curDoc(), SIGNAL(docClosed(PwMDoc *)), |
203 | this, SLOT(docClosed(PwMDoc *))); | 209 | this, SLOT(docClosed(PwMDoc *))); |
204 | conf()->confWndMainWndSize(size()); | 210 | conf()->confWndMainWndSize(size()); |
205 | //LR closing of windows changed | 211 | //LR closing of windows changed |
@@ -227,169 +233,169 @@ void PwM::initMenubar() | |||
227 | 233 | ||
228 | connect ( syncPopup, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); | 234 | connect ( syncPopup, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); |
229 | syncManager->fillSyncMenu(); | 235 | syncManager->fillSyncMenu(); |
230 | 236 | ||
231 | #endif | 237 | #endif |
232 | filePopup = new KPopupMenu(this); | 238 | filePopup = new KPopupMenu(this); |
233 | importPopup = new KPopupMenu(filePopup); | 239 | importPopup = new KPopupMenu(filePopup); |
234 | exportPopup = new KPopupMenu(filePopup); | 240 | exportPopup = new KPopupMenu(filePopup); |
235 | managePopup = new KPopupMenu(this); | 241 | managePopup = new KPopupMenu(this); |
236 | #ifdef CONFIG_KEYCARD | 242 | #ifdef CONFIG_KEYCARD |
237 | chipcardPopup = new KPopupMenu(this); | 243 | chipcardPopup = new KPopupMenu(this); |
238 | #endif // CONFIG_KEYCARD | 244 | #endif // CONFIG_KEYCARD |
239 | viewPopup = new KPopupMenu(this); | 245 | viewPopup = new KPopupMenu(this); |
240 | optionsPopup = new KPopupMenu(this); | 246 | optionsPopup = new KPopupMenu(this); |
241 | 247 | ||
242 | // "file" popup menu | 248 | // "file" popup menu |
243 | filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), | 249 | filePopup->insertItem(QIcon(picons->loadIcon("filenew", KIcon::Small)), |
244 | i18n("&New"), this, | 250 | i18n("&New"), this, |
245 | SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW); | 251 | SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW); |
246 | filePopup->insertItem(QIconSet(picons->loadIcon("fileopen", KIcon::Small)), | 252 | filePopup->insertItem(QIcon(picons->loadIcon("fileopen", KIcon::Small)), |
247 | i18n("&Open"), this, | 253 | i18n("&Open"), this, |
248 | SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN); | 254 | SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN); |
249 | filePopup->insertItem(QIconSet(picons->loadIcon("fileclose", KIcon::Small)), | 255 | filePopup->insertItem(QIcon(picons->loadIcon("fileclose", KIcon::Small)), |
250 | i18n("&Close"), this, | 256 | i18n("&Close"), this, |
251 | SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE); | 257 | SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE); |
252 | filePopup->insertSeparator(); | 258 | filePopup->insertSeparator(); |
253 | filePopup->insertItem(QIconSet(picons->loadIcon("filesave", KIcon::Small)), | 259 | filePopup->insertItem(QIcon(picons->loadIcon("filesave", KIcon::Small)), |
254 | i18n("&Save"), this, | 260 | i18n("&Save"), this, |
255 | SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE); | 261 | SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE); |
256 | filePopup->insertItem(QIconSet(picons->loadIcon("filesaveas", KIcon::Small)), | 262 | filePopup->insertItem(QIcon(picons->loadIcon("filesaveas", KIcon::Small)), |
257 | i18n("Save &as..."), | 263 | i18n("Save &as..."), |
258 | this, SLOT(saveAs_slot()), 0, | 264 | this, SLOT(saveAs_slot()), 0, |
259 | BUTTON_POPUP_FILE_SAVEAS); | 265 | BUTTON_POPUP_FILE_SAVEAS); |
260 | filePopup->insertSeparator(); | 266 | filePopup->insertSeparator(); |
261 | // "file/export" popup menu | 267 | // "file/export" popup menu |
262 | exportPopup->insertItem(i18n("&Text-file..."), this, | 268 | exportPopup->insertItem(i18n("&Text-file..."), this, |
263 | SLOT(exportToText()), 0, BUTTON_POPUP_EXPORT_TEXT); | 269 | SLOT(exportToText()), 0, BUTTON_POPUP_EXPORT_TEXT); |
264 | exportPopup->insertItem(i18n("&Gpasman / Kpasman ..."), this, | 270 | exportPopup->insertItem(i18n("&Gpasman / Kpasman ..."), this, |
265 | SLOT(exportToGpasman()), 0, BUTTON_POPUP_EXPORT_GPASMAN); | 271 | SLOT(exportToGpasman()), 0, BUTTON_POPUP_EXPORT_GPASMAN); |
266 | exportPopup->insertItem(i18n("&CSV (Comma Separated Value) ..."), this, | 272 | exportPopup->insertItem(i18n("&CSV (Comma Separated Value) ..."), this, |
267 | SLOT(exportToCsv()), 0, BUTTON_POPUP_EXPORT_CSV); | 273 | SLOT(exportToCsv()), 0, BUTTON_POPUP_EXPORT_CSV); |
268 | #ifdef CONFIG_KWALLETIF | 274 | #ifdef CONFIG_KWALLETIF |
269 | exportPopup->insertItem(i18n("&KWallet..."), this, | 275 | exportPopup->insertItem(i18n("&KWallet..."), this, |
270 | SLOT(exportToKWallet()), 0, BUTTON_POPUP_EXPORT_KWALLET); | 276 | SLOT(exportToKWallet()), 0, BUTTON_POPUP_EXPORT_KWALLET); |
271 | #endif | 277 | #endif |
272 | filePopup->insertItem(QIconSet(picons->loadIcon("fileexport", KIcon::Small)), | 278 | filePopup->insertItem(QIcon(picons->loadIcon("fileexport", KIcon::Small)), |
273 | i18n("E&xport"), exportPopup, | 279 | i18n("E&xport"), exportPopup, |
274 | BUTTON_POPUP_FILE_EXPORT); | 280 | BUTTON_POPUP_FILE_EXPORT); |
275 | // "file/import" popup menu | 281 | // "file/import" popup menu |
276 | importPopup->insertItem(i18n("&Text-file..."), this, | 282 | importPopup->insertItem(i18n("&Text-file..."), this, |
277 | SLOT(importFromText()), 0, BUTTON_POPUP_IMPORT_TEXT); | 283 | SLOT(importFromText()), 0, BUTTON_POPUP_IMPORT_TEXT); |
278 | importPopup->insertItem(i18n("&Gpasman / Kpasman ..."), this, | 284 | importPopup->insertItem(i18n("&Gpasman / Kpasman ..."), this, |
279 | SLOT(importFromGpasman()), 0, BUTTON_POPUP_IMPORT_GPASMAN); | 285 | SLOT(importFromGpasman()), 0, BUTTON_POPUP_IMPORT_GPASMAN); |
280 | importPopup->insertItem(i18n("&CSV (Comma Separated Value) ..."), this, | 286 | importPopup->insertItem(i18n("&CSV (Comma Separated Value) ..."), this, |
281 | SLOT(importCsv()), 0, BUTTON_POPUP_IMPORT_CSV); | 287 | SLOT(importCsv()), 0, BUTTON_POPUP_IMPORT_CSV); |
282 | #ifdef CONFIG_KWALLETIF | 288 | #ifdef CONFIG_KWALLETIF |
283 | importPopup->insertItem(i18n("&KWallet..."), this, | 289 | importPopup->insertItem(i18n("&KWallet..."), this, |
284 | SLOT(importKWallet()), 0, BUTTON_POPUP_IMPORT_KWALLET); | 290 | SLOT(importKWallet()), 0, BUTTON_POPUP_IMPORT_KWALLET); |
285 | #endif | 291 | #endif |
286 | filePopup->insertItem(QIconSet(picons->loadIcon("fileimport", KIcon::Small)), | 292 | filePopup->insertItem(QIcon(picons->loadIcon("fileimport", KIcon::Small)), |
287 | i18n("I&mport"), importPopup, | 293 | i18n("I&mport"), importPopup, |
288 | BUTTON_POPUP_FILE_IMPORT); | 294 | BUTTON_POPUP_FILE_IMPORT); |
289 | filePopup->insertSeparator(); | 295 | filePopup->insertSeparator(); |
290 | #if 0 | 296 | #if 0 |
291 | filePopup->insertItem(QIconSet(picons->loadIcon("fileprint", KIcon::Small)), | 297 | filePopup->insertItem(QIcon(picons->loadIcon("fileprint", KIcon::Small)), |
292 | i18n("&Print..."), this, | 298 | i18n("&Print..."), this, |
293 | SLOT(print_slot()), 0, BUTTON_POPUP_FILE_PRINT); | 299 | SLOT(print_slot()), 0, BUTTON_POPUP_FILE_PRINT); |
294 | filePopup->insertSeparator(); | 300 | filePopup->insertSeparator(); |
295 | #endif | 301 | #endif |
296 | filePopup->insertItem(QIconSet(picons->loadIcon("exit", KIcon::Small)), | 302 | filePopup->insertItem(QIcon(picons->loadIcon("exit", KIcon::Small)), |
297 | i18n("&Quit"), this, | 303 | i18n("&Quit"), this, |
298 | SLOT(quitButton_slot()), 0, BUTTON_POPUP_FILE_QUIT); | 304 | SLOT(quitButton_slot()), 0, BUTTON_POPUP_FILE_QUIT); |
299 | menuBar()->insertItem(i18n("&File"), filePopup); | 305 | menuBar()->insertItem(i18n("&File"), filePopup); |
300 | // "manage" popup menu | 306 | // "manage" popup menu |
301 | managePopup->insertItem(QIconSet(picons->loadIcon("pencil", KIcon::Small)), | 307 | managePopup->insertItem(QIcon(picons->loadIcon("pencil", KIcon::Small)), |
302 | i18n("&Add password"), this, | 308 | i18n("&Add password"), this, |
303 | SLOT(addPwd_slot()), 0, | 309 | SLOT(addPwd_slot()), 0, |
304 | BUTTON_POPUP_MANAGE_ADD); | 310 | BUTTON_POPUP_MANAGE_ADD); |
305 | managePopup->insertSeparator(); | 311 | managePopup->insertSeparator(); |
306 | managePopup->insertItem(QIconSet(picons->loadIcon("edit", KIcon::Small)), | 312 | managePopup->insertItem(QIcon(picons->loadIcon("edit", KIcon::Small)), |
307 | i18n("&Edit"), this, SLOT(editPwd_slot()), 0, | 313 | i18n("&Edit"), this, SLOT(editPwd_slot()), 0, |
308 | BUTTON_POPUP_MANAGE_EDIT); | 314 | BUTTON_POPUP_MANAGE_EDIT); |
309 | managePopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)), | 315 | managePopup->insertItem(QIcon(picons->loadIcon("editdelete", KIcon::Small)), |
310 | i18n("&Delete"), this, SLOT(deletePwd_slot()), | 316 | i18n("&Delete"), this, SLOT(deletePwd_slot()), |
311 | 0, BUTTON_POPUP_MANAGE_DEL); | 317 | 0, BUTTON_POPUP_MANAGE_DEL); |
312 | managePopup->insertSeparator(); | 318 | managePopup->insertSeparator(); |
313 | managePopup->insertItem(QIconSet(picons->loadIcon("rotate", KIcon::Small)), | 319 | managePopup->insertItem(QIcon(picons->loadIcon("rotate", KIcon::Small)), |
314 | i18n("Change &Master Password"), this, | 320 | i18n("Change &Master Password"), this, |
315 | SLOT(changeMasterPwd_slot()), 0, | 321 | SLOT(changeMasterPwd_slot()), 0, |
316 | BUTTON_POPUP_MANAGE_CHANGEMP); | 322 | BUTTON_POPUP_MANAGE_CHANGEMP); |
317 | menuBar()->insertItem(i18n("&Manage"), managePopup); | 323 | menuBar()->insertItem(i18n("&Manage"), managePopup); |
318 | // "chipcard" popup menu | 324 | // "chipcard" popup menu |
319 | #ifdef CONFIG_KEYCARD | 325 | #ifdef CONFIG_KEYCARD |
320 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), | 326 | chipcardPopup->insertItem(QIcon(picons->loadIcon("filenew", KIcon::Small)), |
321 | i18n("&Generate new key-card"), this, | 327 | i18n("&Generate new key-card"), this, |
322 | SLOT(genNewCard_slot()), 0, | 328 | SLOT(genNewCard_slot()), 0, |
323 | BUTTON_POPUP_CHIPCARD_GENNEW); | 329 | BUTTON_POPUP_CHIPCARD_GENNEW); |
324 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)), | 330 | chipcardPopup->insertItem(QIcon(picons->loadIcon("editdelete", KIcon::Small)), |
325 | i18n("&Erase key-card"), this, | 331 | i18n("&Erase key-card"), this, |
326 | SLOT(eraseCard_slot()), 0, | 332 | SLOT(eraseCard_slot()), 0, |
327 | BUTTON_POPUP_CHIPCARD_DEL); | 333 | BUTTON_POPUP_CHIPCARD_DEL); |
328 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("", KIcon::Small)), | 334 | chipcardPopup->insertItem(QIcon(picons->loadIcon("", KIcon::Small)), |
329 | i18n("Read card-&ID"), this, | 335 | i18n("Read card-&ID"), this, |
330 | SLOT(readCardId_slot()), 0, | 336 | SLOT(readCardId_slot()), 0, |
331 | BUTTON_POPUP_CHIPCARD_READID); | 337 | BUTTON_POPUP_CHIPCARD_READID); |
332 | chipcardPopup->insertSeparator(); | 338 | chipcardPopup->insertSeparator(); |
333 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("2rightarrow", KIcon::Small)), | 339 | chipcardPopup->insertItem(QIcon(picons->loadIcon("2rightarrow", KIcon::Small)), |
334 | i18n("&Make card backup-image"), this, | 340 | i18n("&Make card backup-image"), this, |
335 | SLOT(makeCardBackup_slot()), 0, | 341 | SLOT(makeCardBackup_slot()), 0, |
336 | BUTTON_POPUP_CHIPCARD_SAVEBACKUP); | 342 | BUTTON_POPUP_CHIPCARD_SAVEBACKUP); |
337 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("2leftarrow", KIcon::Small)), | 343 | chipcardPopup->insertItem(QIcon(picons->loadIcon("2leftarrow", KIcon::Small)), |
338 | i18n("&Replay card backup-image"), this, | 344 | i18n("&Replay card backup-image"), this, |
339 | SLOT(replayCardBackup_slot()), 0, | 345 | SLOT(replayCardBackup_slot()), 0, |
340 | BUTTON_POPUP_CHIPCARD_REPLAYBACKUP); | 346 | BUTTON_POPUP_CHIPCARD_REPLAYBACKUP); |
341 | menuBar()->insertItem(i18n("&Chipcard manager"), chipcardPopup); | 347 | menuBar()->insertItem(i18n("&Chipcard manager"), chipcardPopup); |
342 | #endif // CONFIG_KEYCARD | 348 | #endif // CONFIG_KEYCARD |
343 | // "view" popup menu | 349 | // "view" popup menu |
344 | viewPopup->insertItem(QIconSet(picons->loadIcon("find", KIcon::Small)), | 350 | viewPopup->insertItem(QIcon(picons->loadIcon("find", KIcon::Small)), |
345 | i18n("&Find"), this, | 351 | i18n("&Find"), this, |
346 | SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND); | 352 | SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND); |
347 | viewPopup->insertSeparator(); | 353 | viewPopup->insertSeparator(); |
348 | viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)), | 354 | viewPopup->insertItem(QIcon(picons->loadIcon("halfencrypted", KIcon::Small)), |
349 | i18n("&Lock all entries"), this, | 355 | i18n("&Lock all entries"), this, |
350 | SLOT(lockWnd_slot()), 0, | 356 | SLOT(lockWnd_slot()), 0, |
351 | BUTTON_POPUP_VIEW_LOCK); | 357 | BUTTON_POPUP_VIEW_LOCK); |
352 | viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)), | 358 | viewPopup->insertItem(QIcon(picons->loadIcon("encrypted", KIcon::Small)), |
353 | i18n("&Deep-lock all entries"), this, | 359 | i18n("&Deep-lock all entries"), this, |
354 | SLOT(deepLockWnd_slot()), 0, | 360 | SLOT(deepLockWnd_slot()), 0, |
355 | BUTTON_POPUP_VIEW_DEEPLOCK); | 361 | BUTTON_POPUP_VIEW_DEEPLOCK); |
356 | viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)), | 362 | viewPopup->insertItem(QIcon(picons->loadIcon("decrypted", KIcon::Small)), |
357 | i18n("&Unlock all entries"), this, | 363 | i18n("&Unlock all entries"), this, |
358 | SLOT(unlockWnd_slot()), 0, | 364 | SLOT(unlockWnd_slot()), 0, |
359 | BUTTON_POPUP_VIEW_UNLOCK); | 365 | BUTTON_POPUP_VIEW_UNLOCK); |
360 | menuBar()->insertItem(i18n("&View"), viewPopup); | 366 | menuBar()->insertItem(i18n("&View"), viewPopup); |
361 | // "options" popup menu | 367 | // "options" popup menu |
362 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), | 368 | optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)), |
363 | i18n("&Configure PwM/Pi..."), this, | 369 | i18n("&Configure PwM/Pi..."), this, |
364 | SLOT(config_slot()),0, | 370 | SLOT(config_slot()),0, |
365 | BUTTON_POPUP_OPTIONS_CONFIG); | 371 | BUTTON_POPUP_OPTIONS_CONFIG); |
366 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), | 372 | optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)), |
367 | i18n("Global Settings..."), this, | 373 | i18n("Global Settings..."), this, |
368 | SLOT(config_global_slot()),0, | 374 | SLOT(config_global_slot()),0, |
369 | BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG); | 375 | BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG); |
370 | if ( QApplication::desktop()->width() <= 240 ) { | 376 | if ( QApplication::desktop()->width() <= 240 ) { |
371 | managePopup->insertSeparator(); | 377 | managePopup->insertSeparator(); |
372 | managePopup->insertItem(i18n("&Options"), optionsPopup); | 378 | managePopup->insertItem(i18n("&Options"), optionsPopup); |
373 | } else | 379 | } else |
374 | menuBar()->insertItem(i18n("&Options"), optionsPopup); | 380 | menuBar()->insertItem(i18n("&Options"), optionsPopup); |
375 | // "help" popup menu | 381 | // "help" popup menu |
376 | #ifndef PWM_EMBEDDED | 382 | #ifndef PWM_EMBEDDED |
377 | helpPopup = helpMenu(QString::null, false); | 383 | helpPopup = helpMenu(QString::null, false); |
378 | #else | 384 | #else |
379 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), | 385 | optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)), |
380 | i18n("C&ategories..."), this, | 386 | i18n("C&ategories..."), this, |
381 | SLOT(category_slot()),0, | 387 | SLOT(category_slot()),0, |
382 | BUTTON_POPUP_OPTIONS_CATEGORY); | 388 | BUTTON_POPUP_OPTIONS_CATEGORY); |
383 | 389 | ||
384 | 390 | ||
385 | menuBar()->insertItem(i18n("&Sync"), syncPopup); | 391 | menuBar()->insertItem(i18n("&Sync"), syncPopup); |
386 | 392 | ||
387 | 393 | ||
388 | 394 | ||
389 | 395 | ||
390 | 396 | ||
391 | helpPopup = new KPopupMenu(this); | 397 | helpPopup = new KPopupMenu(this); |
392 | 398 | ||
393 | 399 | ||
394 | helpPopup->insertItem(i18n("&License"), this, | 400 | helpPopup->insertItem(i18n("&License"), this, |
395 | SLOT(showLicense_slot()), 0, | 401 | SLOT(showLicense_slot()), 0, |
@@ -909,38 +915,38 @@ void PwM::config_slot() | |||
909 | init->initKWalletEmu(); | 915 | init->initKWalletEmu(); |
910 | 916 | ||
911 | PwMDocList *_dl = PwMDoc::getOpenDocList(); | 917 | PwMDocList *_dl = PwMDoc::getOpenDocList(); |
912 | const vector<PwMDocList::listItem> *dl = _dl->getList(); | 918 | const vector<PwMDocList::listItem> *dl = _dl->getList(); |
913 | vector<PwMDocList::listItem>::const_iterator i = dl->begin(), | 919 | vector<PwMDocList::listItem>::const_iterator i = dl->begin(), |
914 | end = dl->end(); | 920 | end = dl->end(); |
915 | PwMDoc *doc; | 921 | PwMDoc *doc; |
916 | while (i != end) { | 922 | while (i != end) { |
917 | doc = (*i).doc; | 923 | doc = (*i).doc; |
918 | // unlock-without-mpw timeout | 924 | // unlock-without-mpw timeout |
919 | doc->timer()->start(DocTimer::id_mpwTimer); | 925 | doc->timer()->start(DocTimer::id_mpwTimer); |
920 | // auto-lock timeout | 926 | // auto-lock timeout |
921 | doc->timer()->start(DocTimer::id_autoLockTimer); | 927 | doc->timer()->start(DocTimer::id_autoLockTimer); |
922 | ++i; | 928 | ++i; |
923 | } | 929 | } |
924 | 930 | ||
925 | const QValueList<PwM *> *ml = init->mainWndList(); | 931 | const Q3ValueList<PwM *> *ml = init->mainWndList(); |
926 | #ifndef PWM_EMBEDDED | 932 | #ifndef PWM_EMBEDDED |
927 | QValueList<PwM *>::const_iterator i2 = ml->begin(), | 933 | Q3ValueList<PwM *>::const_iterator i2 = ml->begin(), |
928 | end2 = ml->end(); | 934 | end2 = ml->end(); |
929 | #else | 935 | #else |
930 | QValueList<PwM *>::ConstIterator i2 = ml->begin(), | 936 | Q3ValueList<PwM *>::ConstIterator i2 = ml->begin(), |
931 | end2 = ml->end(); | 937 | end2 = ml->end(); |
932 | #endif | 938 | #endif |
933 | PwM *pwm; | 939 | PwM *pwm; |
934 | while (i2 != end2) { | 940 | while (i2 != end2) { |
935 | pwm = *i2; | 941 | pwm = *i2; |
936 | // reinitialize the window style. | 942 | // reinitialize the window style. |
937 | if (oldStyle != newStyle) | 943 | if (oldStyle != newStyle) |
938 | pwm->curView()->initStyle(newStyle); | 944 | pwm->curView()->initStyle(newStyle); |
939 | // set the new font | 945 | // set the new font |
940 | pwm->curView()->setFont(conf()->confGlobEntryFont()); | 946 | pwm->curView()->setFont(conf()->confGlobEntryFont()); |
941 | ++i2; | 947 | ++i2; |
942 | } | 948 | } |
943 | } | 949 | } |
944 | 950 | ||
945 | void PwM::activateMpButton(bool activate) | 951 | void PwM::activateMpButton(bool activate) |
946 | { | 952 | { |
@@ -1581,19 +1587,19 @@ bool PwM::sync(KSyncManager* manager, QString filename, int mode,QString resourc | |||
1581 | save(); | 1587 | save(); |
1582 | } | 1588 | } |
1583 | 1589 | ||
1584 | return ret; | 1590 | return ret; |
1585 | } | 1591 | } |
1586 | 1592 | ||
1587 | void PwM::removeSyncInfo( QString syncProfile) | 1593 | void PwM::removeSyncInfo( QString syncProfile) |
1588 | { | 1594 | { |
1589 | qDebug("PWM:removeSyncInfo for profile %s ", syncProfile.latin1()); | 1595 | qDebug("PWM:removeSyncInfo for profile %s ", syncProfile.latin1()); |
1590 | curDoc()->removeSyncInfo( syncProfile ); | 1596 | curDoc()->removeSyncInfo( syncProfile ); |
1591 | //US curDoc()->removeSyncInfo sets the dirtyFlag. | 1597 | //US curDoc()->removeSyncInfo sets the dirtyFlag. |
1592 | } | 1598 | } |
1593 | 1599 | ||
1594 | #endif | 1600 | #endif |
1595 | 1601 | ||
1596 | 1602 | ||
1597 | #ifndef PWM_EMBEDDED | 1603 | #ifndef PWM_EMBEDDED_ |
1598 | #include "pwm.moc" | 1604 | #include "moc_pwm.cpp" |
1599 | #endif | 1605 | #endif |