-rw-r--r-- | bin/kdepim/WhatsNew.txt | 8 | ||||
-rw-r--r-- | bin/kdepim/kaddressbook/icons16/z_menu.png | bin | 0 -> 713 bytes | |||
-rw-r--r-- | bin/kdepim/kaddressbook/icons22/z_menu.png | bin | 0 -> 1017 bytes | |||
-rw-r--r-- | bin/kdepim/korganizer/icons16/z_menu.png | bin | 0 -> 713 bytes | |||
-rw-r--r-- | bin/kdepim/korganizer/iconsmini/z_menu.png | bin | 0 -> 572 bytes | |||
-rw-r--r-- | bin/kdepim/korganizer/z_menu.png | bin | 0 -> 1017 bytes | |||
-rw-r--r-- | kaddressbook/kabcore.cpp | 2 | ||||
-rw-r--r-- | korganizer/kotodoviewitem.cpp | 7 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 29 | ||||
-rw-r--r-- | pwmanager/pwmanager/listviewpwm.cpp | 8 | ||||
-rw-r--r-- | pwmanager/pwmanager/listviewpwm.h | 2 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmview.cpp | 2 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmviewstyle.cpp | 4 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmviewstyle.h | 2 |
14 files changed, 48 insertions, 16 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 657d1de..7438f9d 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,34 +1,42 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.0.15 ************ | ||
4 | |||
5 | PwM/Pi: | ||
6 | Added keyboard shorcuts for | ||
7 | - toggling summary view (space bar) | ||
8 | - delete item (delete + backspace key) | ||
9 | - add new item ( i + n key) | ||
10 | |||
3 | ********** VERSION 2.0.14 ************ | 11 | ********** VERSION 2.0.14 ************ |
4 | 12 | ||
5 | Made Passwordmanager PwM/Pi more userfriendly: | 13 | Made Passwordmanager PwM/Pi more userfriendly: |
6 | Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. | 14 | Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. |
7 | Fixed bug in KO/Pi todo printing. | 15 | Fixed bug in KO/Pi todo printing. |
8 | Made Qtopia calendar import possible on desktop . | 16 | Made Qtopia calendar import possible on desktop . |
9 | 17 | ||
10 | ********** VERSION 2.0.13 ************ | 18 | ********** VERSION 2.0.13 ************ |
11 | 19 | ||
12 | Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. | 20 | Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. |
13 | 21 | ||
14 | In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". | 22 | In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". |
15 | 23 | ||
16 | OM/Pi: | 24 | OM/Pi: |
17 | Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. | 25 | Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. |
18 | Added missing German translation. | 26 | Added missing German translation. |
19 | Added warning if path is specified in local folder settings of account config. | 27 | Added warning if path is specified in local folder settings of account config. |
20 | 28 | ||
21 | ********** VERSION 2.0.12 ************ | 29 | ********** VERSION 2.0.12 ************ |
22 | 30 | ||
23 | KO/Pi: | 31 | KO/Pi: |
24 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. | 32 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. |
25 | Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. | 33 | Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. |
26 | Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. | 34 | Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. |
27 | 35 | ||
28 | Fixed problem in pi-sync mode when wrong password was sent. | 36 | Fixed problem in pi-sync mode when wrong password was sent. |
29 | 37 | ||
30 | OM/Pi: | 38 | OM/Pi: |
31 | Fixed a crash when displaying mails with "Show mail as html" was checked in the config. | 39 | Fixed a crash when displaying mails with "Show mail as html" was checked in the config. |
32 | Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. | 40 | Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. |
33 | 41 | ||
34 | ********** VERSION 2.0.11 ************ | 42 | ********** VERSION 2.0.11 ************ |
diff --git a/bin/kdepim/kaddressbook/icons16/z_menu.png b/bin/kdepim/kaddressbook/icons16/z_menu.png new file mode 100644 index 0000000..b32c8e5 --- a/dev/null +++ b/bin/kdepim/kaddressbook/icons16/z_menu.png | |||
Binary files differ | |||
diff --git a/bin/kdepim/kaddressbook/icons22/z_menu.png b/bin/kdepim/kaddressbook/icons22/z_menu.png new file mode 100644 index 0000000..b1866a2 --- a/dev/null +++ b/bin/kdepim/kaddressbook/icons22/z_menu.png | |||
Binary files differ | |||
diff --git a/bin/kdepim/korganizer/icons16/z_menu.png b/bin/kdepim/korganizer/icons16/z_menu.png new file mode 100644 index 0000000..b32c8e5 --- a/dev/null +++ b/bin/kdepim/korganizer/icons16/z_menu.png | |||
Binary files differ | |||
diff --git a/bin/kdepim/korganizer/iconsmini/z_menu.png b/bin/kdepim/korganizer/iconsmini/z_menu.png new file mode 100644 index 0000000..584791a --- a/dev/null +++ b/bin/kdepim/korganizer/iconsmini/z_menu.png | |||
Binary files differ | |||
diff --git a/bin/kdepim/korganizer/z_menu.png b/bin/kdepim/korganizer/z_menu.png new file mode 100644 index 0000000..b1866a2 --- a/dev/null +++ b/bin/kdepim/korganizer/z_menu.png | |||
Binary files differ | |||
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 1b17665..79f897b 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2099,65 +2099,65 @@ void KABCore::addActionsManually() | |||
2099 | #ifdef KAB_EMBEDDED | 2099 | #ifdef KAB_EMBEDDED |
2100 | QPopupMenu *fileMenu = new QPopupMenu( this ); | 2100 | QPopupMenu *fileMenu = new QPopupMenu( this ); |
2101 | QPopupMenu *editMenu = new QPopupMenu( this ); | 2101 | QPopupMenu *editMenu = new QPopupMenu( this ); |
2102 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 2102 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
2103 | 2103 | ||
2104 | KToolBar* tb = mMainWindow->toolBar(); | 2104 | KToolBar* tb = mMainWindow->toolBar(); |
2105 | 2105 | ||
2106 | #ifndef DESKTOP_VERSION | 2106 | #ifndef DESKTOP_VERSION |
2107 | if ( KABPrefs::instance()->mFullMenuBarVisible ) { | 2107 | if ( KABPrefs::instance()->mFullMenuBarVisible ) { |
2108 | #endif | 2108 | #endif |
2109 | QMenuBar* mb = mMainWindow->menuBar(); | 2109 | QMenuBar* mb = mMainWindow->menuBar(); |
2110 | 2110 | ||
2111 | //US setup menubar. | 2111 | //US setup menubar. |
2112 | //Disable the following block if you do not want to have a menubar. | 2112 | //Disable the following block if you do not want to have a menubar. |
2113 | mb->insertItem( i18n("&File"), fileMenu ); | 2113 | mb->insertItem( i18n("&File"), fileMenu ); |
2114 | mb->insertItem( i18n("&Edit"), editMenu ); | 2114 | mb->insertItem( i18n("&Edit"), editMenu ); |
2115 | mb->insertItem( i18n("&View"), viewMenu ); | 2115 | mb->insertItem( i18n("&View"), viewMenu ); |
2116 | mb->insertItem( i18n("&Settings"), settingsMenu ); | 2116 | mb->insertItem( i18n("&Settings"), settingsMenu ); |
2117 | #ifdef DESKTOP_VERSION | 2117 | #ifdef DESKTOP_VERSION |
2118 | mb->insertItem( i18n("Synchronize"), syncMenu ); | 2118 | mb->insertItem( i18n("Synchronize"), syncMenu ); |
2119 | #else | 2119 | #else |
2120 | mb->insertItem( i18n("Sync"), syncMenu ); | 2120 | mb->insertItem( i18n("Sync"), syncMenu ); |
2121 | #endif | 2121 | #endif |
2122 | //mb->insertItem( i18n("&Change"), changeMenu ); | 2122 | //mb->insertItem( i18n("&Change"), changeMenu ); |
2123 | mb->insertItem( i18n("&Help"), helpMenu ); | 2123 | mb->insertItem( i18n("&Help"), helpMenu ); |
2124 | mIncSearchWidget = new IncSearchWidget( tb ); | 2124 | mIncSearchWidget = new IncSearchWidget( tb ); |
2125 | // tb->insertWidget(-1, 0, mIncSearchWidget); | 2125 | // tb->insertWidget(-1, 0, mIncSearchWidget); |
2126 | #ifndef DESKTOP_VERSION | 2126 | #ifndef DESKTOP_VERSION |
2127 | } else { | 2127 | } else { |
2128 | //US setup toolbar | 2128 | //US setup toolbar |
2129 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); | 2129 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); |
2130 | QPopupMenu *popupBarTB = new QPopupMenu( this ); | 2130 | QPopupMenu *popupBarTB = new QPopupMenu( this ); |
2131 | menuBarTB->insertItem( "ME", popupBarTB); | 2131 | menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); |
2132 | tb->insertWidget(-1, 0, menuBarTB); | 2132 | tb->insertWidget(-1, 0, menuBarTB); |
2133 | mIncSearchWidget = new IncSearchWidget( tb ); | 2133 | mIncSearchWidget = new IncSearchWidget( tb ); |
2134 | 2134 | ||
2135 | tb->enableMoving(false); | 2135 | tb->enableMoving(false); |
2136 | popupBarTB->insertItem( i18n("&File"), fileMenu ); | 2136 | popupBarTB->insertItem( i18n("&File"), fileMenu ); |
2137 | popupBarTB->insertItem( i18n("&Edit"), editMenu ); | 2137 | popupBarTB->insertItem( i18n("&Edit"), editMenu ); |
2138 | popupBarTB->insertItem( i18n("&View"), viewMenu ); | 2138 | popupBarTB->insertItem( i18n("&View"), viewMenu ); |
2139 | popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); | 2139 | popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); |
2140 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); | 2140 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); |
2141 | mViewManager->getFilterAction()->plug ( popupBarTB); | 2141 | mViewManager->getFilterAction()->plug ( popupBarTB); |
2142 | //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); | 2142 | //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); |
2143 | popupBarTB->insertItem( i18n("&Help"), helpMenu ); | 2143 | popupBarTB->insertItem( i18n("&Help"), helpMenu ); |
2144 | if (QApplication::desktop()->width() > 320 ) { | 2144 | if (QApplication::desktop()->width() > 320 ) { |
2145 | // mViewManager->getFilterAction()->plug ( tb); | 2145 | // mViewManager->getFilterAction()->plug ( tb); |
2146 | } | 2146 | } |
2147 | } | 2147 | } |
2148 | #endif | 2148 | #endif |
2149 | // mActionQuit->plug ( mMainWindow->toolBar()); | 2149 | // mActionQuit->plug ( mMainWindow->toolBar()); |
2150 | 2150 | ||
2151 | 2151 | ||
2152 | 2152 | ||
2153 | //US Now connect the actions with the menue entries. | 2153 | //US Now connect the actions with the menue entries. |
2154 | #ifdef DESKTOP_VERSION | 2154 | #ifdef DESKTOP_VERSION |
2155 | mActionPrint->plug( fileMenu ); | 2155 | mActionPrint->plug( fileMenu ); |
2156 | mActionPrintDetails->plug( fileMenu ); | 2156 | mActionPrintDetails->plug( fileMenu ); |
2157 | fileMenu->insertSeparator(); | 2157 | fileMenu->insertSeparator(); |
2158 | #endif | 2158 | #endif |
2159 | mActionMail->plug( fileMenu ); | 2159 | mActionMail->plug( fileMenu ); |
2160 | fileMenu->insertSeparator(); | 2160 | fileMenu->insertSeparator(); |
2161 | 2161 | ||
2162 | mActionNewContact->plug( fileMenu ); | 2162 | mActionNewContact->plug( fileMenu ); |
2163 | mActionNewContact->plug( tb ); | 2163 | mActionNewContact->plug( tb ); |
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index 70f00c6..6559119 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp | |||
@@ -335,66 +335,69 @@ bool KOTodoViewItem::isAlternate() | |||
335 | { | 335 | { |
336 | item->m_odd = previous = !previous; | 336 | item->m_odd = previous = !previous; |
337 | item->m_known = true; | 337 | item->m_known = true; |
338 | item = static_cast<KOTodoViewItem *>(item->nextSibling()); | 338 | item = static_cast<KOTodoViewItem *>(item->nextSibling()); |
339 | } | 339 | } |
340 | } | 340 | } |
341 | return m_odd; | 341 | return m_odd; |
342 | } | 342 | } |
343 | return false; | 343 | return false; |
344 | } | 344 | } |
345 | 345 | ||
346 | void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) | 346 | void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) |
347 | { | 347 | { |
348 | QColorGroup _cg = cg; | 348 | QColorGroup _cg = cg; |
349 | QColorGroup::ColorRole role; | 349 | QColorGroup::ColorRole role; |
350 | if ( KOPrefs::instance()->mTodoViewUsesForegroundColor ) | 350 | if ( KOPrefs::instance()->mTodoViewUsesForegroundColor ) |
351 | role = QColorGroup::Text; | 351 | role = QColorGroup::Text; |
352 | else | 352 | else |
353 | role = QColorGroup::Base; | 353 | role = QColorGroup::Base; |
354 | //#ifndef KORG_NOLVALTERNATION | 354 | //#ifndef KORG_NOLVALTERNATION |
355 | if (isAlternate()) | 355 | if (isAlternate()) |
356 | _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground()); | 356 | _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground()); |
357 | bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors; | 357 | bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors; |
358 | QColor colorToSet; | 358 | QColor colorToSet; |
359 | if ( setColor ) { | 359 | if ( setColor ) { |
360 | QStringList categories = mTodo->categories(); | 360 | QStringList categories = mTodo->categories(); |
361 | QString cat = categories.first(); | 361 | QString cat = categories.first(); |
362 | if ( !cat.isEmpty()) { | 362 | if ( !cat.isEmpty()) { |
363 | colorToSet = *(KOPrefs::instance()->categoryColor(cat) ); | 363 | colorToSet = *(KOPrefs::instance()->categoryColor(cat) ); |
364 | } else | 364 | } else |
365 | setColor = false; | 365 | setColor = false; |
366 | } | 366 | } |
367 | 367 | bool openMode = !isOpen(); | |
368 | int odue = mTodo->hasDueSubTodo( !isOpen()); | 368 | // maybe we are in flat-display-mode |
369 | if ( !firstChild() ) | ||
370 | openMode = false; | ||
371 | int odue = mTodo->hasDueSubTodo( openMode ); | ||
369 | if (odue == 2) { | 372 | if (odue == 2) { |
370 | colorToSet = KOPrefs::instance()->mTodoOverdueColor; | 373 | colorToSet = KOPrefs::instance()->mTodoOverdueColor; |
371 | setColor = true; | 374 | setColor = true; |
372 | } else if ( odue == 1 ) { | 375 | } else if ( odue == 1 ) { |
373 | colorToSet = KOPrefs::instance()->mTodoDueTodayColor; | 376 | colorToSet = KOPrefs::instance()->mTodoDueTodayColor; |
374 | setColor = true; | 377 | setColor = true; |
375 | } | 378 | } |
376 | 379 | ||
377 | 380 | ||
378 | if ( setColor ) { | 381 | if ( setColor ) { |
379 | _cg.setColor(role,colorToSet ); | 382 | _cg.setColor(role,colorToSet ); |
380 | if ( role == QColorGroup::Base) { | 383 | if ( role == QColorGroup::Base) { |
381 | int rgb = colorToSet.red(); | 384 | int rgb = colorToSet.red(); |
382 | rgb += colorToSet.blue()/2; | 385 | rgb += colorToSet.blue()/2; |
383 | rgb += colorToSet.green(); | 386 | rgb += colorToSet.green(); |
384 | if ( rgb < 200 ) | 387 | if ( rgb < 200 ) |
385 | _cg.setColor(QColorGroup::Text,Qt::white ); | 388 | _cg.setColor(QColorGroup::Text,Qt::white ); |
386 | } | 389 | } |
387 | } | 390 | } |
388 | //#endif | 391 | //#endif |
389 | if ( column > 0 ){ | 392 | if ( column > 0 ){ |
390 | if ( column == 2 && !KOPrefs::instance()->mTodoViewShowsPercentage ) { | 393 | if ( column == 2 && !KOPrefs::instance()->mTodoViewShowsPercentage ) { |
391 | p->save(); | 394 | p->save(); |
392 | int progress = (int)(( (width-6)*mTodo->percentComplete())/100.0 + 0.5); | 395 | int progress = (int)(( (width-6)*mTodo->percentComplete())/100.0 + 0.5); |
393 | 396 | ||
394 | p->fillRect( 0, 0, width, height(), _cg.base() ); // background | 397 | p->fillRect( 0, 0, width, height(), _cg.base() ); // background |
395 | // p->setPen(Qt::black ); //border | 398 | // p->setPen(Qt::black ); //border |
396 | // p->setBrush( KOPrefs::instance()->mHighlightColorKGlobalSettings::baseColor() ); //filling | 399 | // p->setBrush( KOPrefs::instance()->mHighlightColorKGlobalSettings::baseColor() ); //filling |
397 | QColor fc = KOPrefs::instance()->mHighlightColor; | 400 | QColor fc = KOPrefs::instance()->mHighlightColor; |
398 | if ( mTodo->percentComplete() == 100 ) | 401 | if ( mTodo->percentComplete() == 100 ) |
399 | fc = darkGreen; | 402 | fc = darkGreen; |
400 | p->drawRect( 2, 2, width-4, height()-4); | 403 | p->drawRect( 2, 2, width-4, height()-4); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 006a8dd..019f41f 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -490,110 +490,113 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | |||
490 | else if ( msg == "-showNextXView" ) { | 490 | else if ( msg == "-showNextXView" ) { |
491 | mView->viewManager()->showNextXView(); | 491 | mView->viewManager()->showNextXView(); |
492 | } | 492 | } |
493 | 493 | ||
494 | 494 | ||
495 | } | 495 | } |
496 | 496 | ||
497 | showMaximized(); | 497 | showMaximized(); |
498 | raise(); | 498 | raise(); |
499 | } | 499 | } |
500 | 500 | ||
501 | QPixmap MainWindow::loadPixmap( QString name ) | 501 | QPixmap MainWindow::loadPixmap( QString name ) |
502 | { | 502 | { |
503 | return SmallIcon( name ); | 503 | return SmallIcon( name ); |
504 | 504 | ||
505 | } | 505 | } |
506 | void MainWindow::initActions() | 506 | void MainWindow::initActions() |
507 | { | 507 | { |
508 | //KOPrefs::instance()->mShowFullMenu | 508 | //KOPrefs::instance()->mShowFullMenu |
509 | iconToolBar->clear(); | 509 | iconToolBar->clear(); |
510 | KOPrefs *p = KOPrefs::instance(); | 510 | KOPrefs *p = KOPrefs::instance(); |
511 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); | 511 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); |
512 | 512 | ||
513 | QPopupMenu *viewMenu = new QPopupMenu( this ); | 513 | QPopupMenu *viewMenu = new QPopupMenu( this ); |
514 | QPopupMenu *actionMenu = new QPopupMenu( this ); | 514 | QPopupMenu *actionMenu = new QPopupMenu( this ); |
515 | QPopupMenu *importMenu = new QPopupMenu( this ); | 515 | QPopupMenu *importMenu = new QPopupMenu( this ); |
516 | selectFilterMenu = new QPopupMenu( this ); | 516 | selectFilterMenu = new QPopupMenu( this ); |
517 | selectFilterMenu->setCheckable( true ); | 517 | selectFilterMenu->setCheckable( true ); |
518 | syncMenu = new QPopupMenu( this ); | 518 | syncMenu = new QPopupMenu( this ); |
519 | configureAgendaMenu = new QPopupMenu( this ); | 519 | configureAgendaMenu = new QPopupMenu( this ); |
520 | configureToolBarMenu = new QPopupMenu( this ); | 520 | configureToolBarMenu = new QPopupMenu( this ); |
521 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 521 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
522 | |||
523 | QIconSet icon; | ||
524 | int pixWid = 22, pixHei = 22; | ||
525 | QString pathString = ""; | ||
526 | if ( !p->mToolBarMiniIcons ) { | ||
527 | if ( QApplication::desktop()->width() < 480 ) { | ||
528 | pathString += "icons16/"; | ||
529 | pixWid = 18; pixHei = 16; | ||
530 | } | ||
531 | } else { | ||
532 | pathString += "iconsmini/"; | ||
533 | pixWid = 18; pixHei = 16; | ||
534 | } | ||
522 | if ( KOPrefs::instance()->mShowFullMenu ) { | 535 | if ( KOPrefs::instance()->mShowFullMenu ) { |
523 | QMenuBar *menuBar1; | 536 | QMenuBar *menuBar1; |
524 | menuBar1 = menuBar(); | 537 | menuBar1 = menuBar(); |
525 | menuBar1->insertItem( i18n("File"), importMenu ); | 538 | menuBar1->insertItem( i18n("File"), importMenu ); |
526 | menuBar1->insertItem( i18n("View"), viewMenu ); | 539 | menuBar1->insertItem( i18n("View"), viewMenu ); |
527 | menuBar1->insertItem( i18n("Actions"), actionMenu ); | 540 | menuBar1->insertItem( i18n("Actions"), actionMenu ); |
528 | #ifdef DESKTOP_VERSION | 541 | #ifdef DESKTOP_VERSION |
529 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); | 542 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); |
530 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 543 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
531 | #else | 544 | #else |
532 | menuBar1->insertItem( i18n("Sync"), syncMenu ); | 545 | menuBar1->insertItem( i18n("Sync"), syncMenu ); |
533 | menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); | 546 | menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); |
534 | #endif | 547 | #endif |
535 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 548 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
536 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); | 549 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); |
537 | menuBar1->insertItem( i18n("Help"), helpMenu ); | 550 | menuBar1->insertItem( i18n("Help"), helpMenu ); |
538 | } else { | 551 | } else { |
539 | QPEMenuBar *menuBar1; | 552 | QPEMenuBar *menuBar1; |
540 | menuBar1 = new QPEMenuBar( iconToolBar ); | 553 | menuBar1 = new QPEMenuBar( iconToolBar ); |
541 | QPopupMenu *menuBar = new QPopupMenu( this ); | 554 | QPopupMenu *menuBar = new QPopupMenu( this ); |
542 | menuBar1->insertItem( i18n("ME"), menuBar); | 555 | icon = loadPixmap( pathString + "z_menu" ); |
556 | menuBar1->insertItem( icon.pixmap(), menuBar); | ||
557 | //menuBar1->insertItem( i18n("ME"), menuBar); | ||
543 | menuBar->insertItem( i18n("File"), importMenu ); | 558 | menuBar->insertItem( i18n("File"), importMenu ); |
544 | menuBar->insertItem( i18n("View"), viewMenu ); | 559 | menuBar->insertItem( i18n("View"), viewMenu ); |
545 | menuBar->insertItem( i18n("Actions"), actionMenu ); | 560 | menuBar->insertItem( i18n("Actions"), actionMenu ); |
546 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); | 561 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); |
547 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 562 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
548 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 563 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
549 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); | 564 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); |
550 | menuBar->insertItem( i18n("Help"), helpMenu ); | 565 | menuBar->insertItem( i18n("Help"), helpMenu ); |
551 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); | 566 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); |
552 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); | 567 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); |
553 | } | 568 | } |
554 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 569 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
555 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); | 570 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); |
556 | QIconSet icon; | ||
557 | int pixWid = 22, pixHei = 22; | ||
558 | QString pathString = ""; | ||
559 | if ( !p->mToolBarMiniIcons ) { | ||
560 | if ( QApplication::desktop()->width() < 480 ) { | ||
561 | pathString += "icons16/"; | ||
562 | pixWid = 18; pixHei = 16; | ||
563 | } | ||
564 | } else { | ||
565 | pathString += "iconsmini/"; | ||
566 | pixWid = 18; pixHei = 16; | ||
567 | } | ||
568 | mWeekBgColor = iconToolBar->backgroundColor(); | 571 | mWeekBgColor = iconToolBar->backgroundColor(); |
569 | mWeekPixmap.resize( pixWid , pixHei ); | 572 | mWeekPixmap.resize( pixWid , pixHei ); |
570 | mWeekPixmap.fill( mWeekBgColor ); | 573 | mWeekPixmap.fill( mWeekBgColor ); |
571 | icon = mWeekPixmap; | 574 | icon = mWeekPixmap; |
572 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); | 575 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); |
573 | if ( p-> mShowIconWeekNum ) | 576 | if ( p-> mShowIconWeekNum ) |
574 | mWeekAction->addTo( iconToolBar ); | 577 | mWeekAction->addTo( iconToolBar ); |
575 | mWeekFont = font(); | 578 | mWeekFont = font(); |
576 | 579 | ||
577 | int fontPoint = mWeekFont.pointSize(); | 580 | int fontPoint = mWeekFont.pointSize(); |
578 | QFontMetrics f( mWeekFont ); | 581 | QFontMetrics f( mWeekFont ); |
579 | int fontWid = f.width( "30" ); | 582 | int fontWid = f.width( "30" ); |
580 | while ( fontWid > pixWid ) { | 583 | while ( fontWid > pixWid ) { |
581 | --fontPoint; | 584 | --fontPoint; |
582 | mWeekFont.setPointSize( fontPoint ); | 585 | mWeekFont.setPointSize( fontPoint ); |
583 | QFontMetrics f( mWeekFont ); | 586 | QFontMetrics f( mWeekFont ); |
584 | fontWid = f.width( "30" ); | 587 | fontWid = f.width( "30" ); |
585 | qDebug("dec-- "); | 588 | qDebug("dec-- "); |
586 | } | 589 | } |
587 | 590 | ||
588 | connect( mWeekAction, SIGNAL( activated() ), | 591 | connect( mWeekAction, SIGNAL( activated() ), |
589 | this, SLOT( weekAction() ) ); | 592 | this, SLOT( weekAction() ) ); |
590 | 593 | ||
591 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); | 594 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); |
592 | 595 | ||
593 | //#endif | 596 | //#endif |
594 | // ****************** | 597 | // ****************** |
595 | QAction *action; | 598 | QAction *action; |
596 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); | 599 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); |
597 | configureToolBarMenu->setCheckable( true ); | 600 | configureToolBarMenu->setCheckable( true ); |
598 | 601 | ||
599 | 602 | ||
diff --git a/pwmanager/pwmanager/listviewpwm.cpp b/pwmanager/pwmanager/listviewpwm.cpp index 8d46fff..0df9431 100644 --- a/pwmanager/pwmanager/listviewpwm.cpp +++ b/pwmanager/pwmanager/listviewpwm.cpp | |||
@@ -18,64 +18,72 @@ | |||
18 | **************************************************************************/ | 18 | **************************************************************************/ |
19 | 19 | ||
20 | #include "listviewpwm.h" | 20 | #include "listviewpwm.h" |
21 | #include "pwmexception.h" | 21 | #include "pwmexception.h" |
22 | #include "pwmview.h" | 22 | #include "pwmview.h" |
23 | 23 | ||
24 | #include <qpainter.h> | 24 | #include <qpainter.h> |
25 | #include <qpixmap.h> | 25 | #include <qpixmap.h> |
26 | 26 | ||
27 | #include <kiconloader.h> | 27 | #include <kiconloader.h> |
28 | 28 | ||
29 | #ifdef PWM_EMBEDDED | 29 | #ifdef PWM_EMBEDDED |
30 | #include <kglobal.h> | 30 | #include <kglobal.h> |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | ListViewPwM::ListViewPwM(QWidget *parent, const char *name) | 33 | ListViewPwM::ListViewPwM(QWidget *parent, const char *name) |
34 | : KListView(parent, name) | 34 | : KListView(parent, name) |
35 | { | 35 | { |
36 | //setResizeMode(QListView::AllColumns); | 36 | //setResizeMode(QListView::AllColumns); |
37 | setAllColumnsShowFocus (true ); | 37 | setAllColumnsShowFocus (true ); |
38 | } | 38 | } |
39 | 39 | ||
40 | bool ListViewPwM::event(QEvent *e) | 40 | bool ListViewPwM::event(QEvent *e) |
41 | { | 41 | { |
42 | if (e->type() == QEvent::LayoutHint) | 42 | if (e->type() == QEvent::LayoutHint) |
43 | emit layoutChanged(); | 43 | emit layoutChanged(); |
44 | if (e->type() == QEvent::KeyPress) { | 44 | if (e->type() == QEvent::KeyPress) { |
45 | QKeyEvent* ke = (QKeyEvent*) e; | 45 | QKeyEvent* ke = (QKeyEvent*) e; |
46 | if ( ke->key() == Qt::Key_Space) { | 46 | if ( ke->key() == Qt::Key_Space) { |
47 | emit toggleOverview(); | 47 | emit toggleOverview(); |
48 | return true; | 48 | return true; |
49 | } | 49 | } |
50 | if ( ke->key() == Qt::Key_I || ke->key() == Qt::Key_N || ke->key() == Qt::Key_Insert) { | ||
51 | emit insertPW(); | ||
52 | return true; | ||
53 | } | ||
54 | if ( ke->key() == Qt::Key_Delete || ke->key() == Qt::Key_Backspace) { | ||
55 | emit deletePW(); | ||
56 | return true; | ||
57 | } | ||
50 | 58 | ||
51 | } | 59 | } |
52 | return KListView::event(e); | 60 | return KListView::event(e); |
53 | } | 61 | } |
54 | 62 | ||
55 | 63 | ||
56 | QPixmap * ListViewItemPwM::onPix = 0; | 64 | QPixmap * ListViewItemPwM::onPix = 0; |
57 | QPixmap * ListViewItemPwM::offPix = 0; | 65 | QPixmap * ListViewItemPwM::offPix = 0; |
58 | 66 | ||
59 | ListViewItemPwM::ListViewItemPwM(QListView *parent) | 67 | ListViewItemPwM::ListViewItemPwM(QListView *parent) |
60 | : QCheckListItem(parent, "", QCheckListItem::CheckBox) | 68 | : QCheckListItem(parent, "", QCheckListItem::CheckBox) |
61 | { | 69 | { |
62 | if (!onPix) { | 70 | if (!onPix) { |
63 | PWM_ASSERT(!offPix); | 71 | PWM_ASSERT(!offPix); |
64 | KIconLoader* picons; | 72 | KIconLoader* picons; |
65 | #ifndef PWM_EMBEDDED | 73 | #ifndef PWM_EMBEDDED |
66 | KIconLoader il; | 74 | KIconLoader il; |
67 | picons = &il; | 75 | picons = &il; |
68 | #else | 76 | #else |
69 | picons = KGlobal::iconLoader(); | 77 | picons = KGlobal::iconLoader(); |
70 | #endif | 78 | #endif |
71 | 79 | ||
72 | KIconLoader il; | 80 | KIconLoader il; |
73 | #ifndef PWM_EMBEDDED | 81 | #ifndef PWM_EMBEDDED |
74 | static QPixmap onP(picons->loadIcon("button_ok", KIcon::Small)); | 82 | static QPixmap onP(picons->loadIcon("button_ok", KIcon::Small)); |
75 | #else | 83 | #else |
76 | static QPixmap onP(picons->loadIcon("decrypted", KIcon::Small)); | 84 | static QPixmap onP(picons->loadIcon("decrypted", KIcon::Small)); |
77 | #endif | 85 | #endif |
78 | onPix = &onP; | 86 | onPix = &onP; |
79 | static QPixmap offP(picons->loadIcon("encrypted", KIcon::Small)); | 87 | static QPixmap offP(picons->loadIcon("encrypted", KIcon::Small)); |
80 | offPix = &offP; | 88 | offPix = &offP; |
81 | } | 89 | } |
diff --git a/pwmanager/pwmanager/listviewpwm.h b/pwmanager/pwmanager/listviewpwm.h index 840ee73..51008b8 100644 --- a/pwmanager/pwmanager/listviewpwm.h +++ b/pwmanager/pwmanager/listviewpwm.h | |||
@@ -5,54 +5,56 @@ | |||
5 | * * | 5 | * * |
6 | * This program is free software; you can redistribute it and/or modify * | 6 | * This program is free software; you can redistribute it and/or modify * |
7 | * it under the terms of the GNU General Public License version 2 * | 7 | * it under the terms of the GNU General Public License version 2 * |
8 | * as published by the Free Software Foundation. * | 8 | * as published by the Free Software Foundation. * |
9 | * * | 9 | * * |
10 | ***************************************************************************/ | 10 | ***************************************************************************/ |
11 | 11 | ||
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 | #ifndef __LISTVIEW_H | 20 | #ifndef __LISTVIEW_H |
21 | #define __LISTVIEW_H | 21 | #define __LISTVIEW_H |
22 | 22 | ||
23 | #include <klistview.h> | 23 | #include <klistview.h> |
24 | 24 | ||
25 | /** PwManager implementation of the list view. | 25 | /** PwManager implementation of the list view. |
26 | * Derived from KListView. | 26 | * Derived from KListView. |
27 | */ | 27 | */ |
28 | class ListViewPwM : public KListView | 28 | class ListViewPwM : public KListView |
29 | { | 29 | { |
30 | Q_OBJECT | 30 | Q_OBJECT |
31 | public: | 31 | public: |
32 | ListViewPwM(QWidget *parent = 0, const char *name = 0); | 32 | ListViewPwM(QWidget *parent = 0, const char *name = 0); |
33 | 33 | ||
34 | signals: | 34 | signals: |
35 | void layoutChanged(); | 35 | void layoutChanged(); |
36 | void toggleOverview(); | 36 | void toggleOverview(); |
37 | void insertPW(); | ||
38 | void deletePW( ); | ||
37 | 39 | ||
38 | protected: | 40 | protected: |
39 | virtual bool event(QEvent *e); | 41 | virtual bool event(QEvent *e); |
40 | }; | 42 | }; |
41 | 43 | ||
42 | class ListViewItemPwM : public QCheckListItem | 44 | class ListViewItemPwM : public QCheckListItem |
43 | { | 45 | { |
44 | public: | 46 | public: |
45 | ListViewItemPwM(QListView *parent); | 47 | ListViewItemPwM(QListView *parent); |
46 | 48 | ||
47 | protected: | 49 | protected: |
48 | void paintCell(QPainter *p, const QColorGroup &cg, | 50 | void paintCell(QPainter *p, const QColorGroup &cg, |
49 | int column, int width, int align); | 51 | int column, int width, int align); |
50 | 52 | ||
51 | protected: | 53 | protected: |
52 | /** pixmap to display for an item with state "on" */ | 54 | /** pixmap to display for an item with state "on" */ |
53 | static QPixmap *onPix; | 55 | static QPixmap *onPix; |
54 | /** pixmap to display for an item with state "off" */ | 56 | /** pixmap to display for an item with state "off" */ |
55 | static QPixmap *offPix; | 57 | static QPixmap *offPix; |
56 | }; | 58 | }; |
57 | 59 | ||
58 | #endif | 60 | #endif |
diff --git a/pwmanager/pwmanager/pwmview.cpp b/pwmanager/pwmanager/pwmview.cpp index 0092692..2533487 100644 --- a/pwmanager/pwmanager/pwmview.cpp +++ b/pwmanager/pwmanager/pwmview.cpp | |||
@@ -37,64 +37,66 @@ | |||
37 | #include <qapplication.h> | 37 | #include <qapplication.h> |
38 | #include <qlayout.h> | 38 | #include <qlayout.h> |
39 | 39 | ||
40 | //US ENH: wouldn't it be a good idea if we could use this consts everywhere else. | 40 | //US ENH: wouldn't it be a good idea if we could use this consts everywhere else. |
41 | //US ENH: for examle in listviewpwm.cpp | 41 | //US ENH: for examle in listviewpwm.cpp |
42 | //US ENH: Because of that I transfer them into the headerfile. | 42 | //US ENH: Because of that I transfer them into the headerfile. |
43 | /* | 43 | /* |
44 | #define COLUMN_DESC 0 | 44 | #define COLUMN_DESC 0 |
45 | #define COLUMN_NAME 1 | 45 | #define COLUMN_NAME 1 |
46 | #define COLUMN_PW 2 | 46 | #define COLUMN_PW 2 |
47 | #define COLUMN_URL 3 | 47 | #define COLUMN_URL 3 |
48 | #define COLUMN_LAUNCHER 4 | 48 | #define COLUMN_LAUNCHER 4 |
49 | */ | 49 | */ |
50 | 50 | ||
51 | PwMView::PwMView(PwM *_mainClass, | 51 | PwMView::PwMView(PwM *_mainClass, |
52 | QWidget *parent, PwMDoc *_doc, | 52 | QWidget *parent, PwMDoc *_doc, |
53 | const char *name) | 53 | const char *name) |
54 | : PwMViewStyle(parent, name) | 54 | : PwMViewStyle(parent, name) |
55 | { | 55 | { |
56 | PWM_ASSERT(_mainClass); | 56 | PWM_ASSERT(_mainClass); |
57 | PWM_ASSERT(parent); | 57 | PWM_ASSERT(parent); |
58 | PWM_ASSERT(_doc); | 58 | PWM_ASSERT(_doc); |
59 | setView(this); | 59 | setView(this); |
60 | doc = _doc; | 60 | doc = _doc; |
61 | doc->setListViewPointer(this); | 61 | doc->setListViewPointer(this); |
62 | mainClass = _mainClass; | 62 | mainClass = _mainClass; |
63 | resize(_mainClass->size()); | 63 | resize(_mainClass->size()); |
64 | initStyle(conf()->confWndMainViewStyle()); | 64 | initStyle(conf()->confWndMainViewStyle()); |
65 | initCtxMenu(); | 65 | initCtxMenu(); |
66 | doc->setCurrentView(this); | 66 | doc->setCurrentView(this); |
67 | connect(doc, SIGNAL(dataChanged(PwMDoc *)), this, SLOT(updateView())); | 67 | connect(doc, SIGNAL(dataChanged(PwMDoc *)), this, SLOT(updateView())); |
68 | connect(this, SIGNAL(editPW()), mainClass, SLOT(editPwd_slot())); | 68 | connect(this, SIGNAL(editPW()), mainClass, SLOT(editPwd_slot())); |
69 | connect(this, SIGNAL(insertPW()), mainClass, SLOT(addPwd_slot())); | ||
70 | connect(this, SIGNAL(deletePW()), mainClass, SLOT(deletePwd_slot())); | ||
69 | } | 71 | } |
70 | 72 | ||
71 | PwMView::~PwMView() | 73 | PwMView::~PwMView() |
72 | { | 74 | { |
73 | } | 75 | } |
74 | 76 | ||
75 | void PwMView::initCtxMenu() | 77 | void PwMView::initCtxMenu() |
76 | { | 78 | { |
77 | ctxMenu = new QPopupMenu(this); | 79 | ctxMenu = new QPopupMenu(this); |
78 | ctxMenu->insertItem(i18n("&Add password"), mainClass, SLOT(addPwd_slot())); | 80 | ctxMenu->insertItem(i18n("&Add password"), mainClass, SLOT(addPwd_slot())); |
79 | ctxMenu->insertSeparator(); | 81 | ctxMenu->insertSeparator(); |
80 | ctxMenu->insertItem(i18n("&Edit"), mainClass, SLOT(editPwd_slot())); | 82 | ctxMenu->insertItem(i18n("&Edit"), mainClass, SLOT(editPwd_slot())); |
81 | ctxMenu->insertItem(i18n("&Delete"), mainClass, SLOT(deletePwd_slot())); | 83 | ctxMenu->insertItem(i18n("&Delete"), mainClass, SLOT(deletePwd_slot())); |
82 | ctxMenu->insertSeparator(); | 84 | ctxMenu->insertSeparator(); |
83 | ctxMenu->insertItem(i18n("copy password to clipboard"), | 85 | ctxMenu->insertItem(i18n("copy password to clipboard"), |
84 | this, SLOT(copyPwToClip())); | 86 | this, SLOT(copyPwToClip())); |
85 | ctxMenu->insertItem(i18n("copy username to clipboard"), | 87 | ctxMenu->insertItem(i18n("copy username to clipboard"), |
86 | this, SLOT(copyNameToClip())); | 88 | this, SLOT(copyNameToClip())); |
87 | ctxMenu->insertItem(i18n("copy description to clipboard"), | 89 | ctxMenu->insertItem(i18n("copy description to clipboard"), |
88 | this, SLOT(copyDescToClip())); | 90 | this, SLOT(copyDescToClip())); |
89 | ctxMenu->insertItem(i18n("copy url to clipboard"), | 91 | ctxMenu->insertItem(i18n("copy url to clipboard"), |
90 | this, SLOT(copyUrlToClip())); | 92 | this, SLOT(copyUrlToClip())); |
91 | ctxMenu->insertItem(i18n("copy launcher to clipboard"), | 93 | ctxMenu->insertItem(i18n("copy launcher to clipboard"), |
92 | this, SLOT(copyLauncherToClip())); | 94 | this, SLOT(copyLauncherToClip())); |
93 | ctxMenu->insertItem(i18n("copy comment to clipboard"), | 95 | ctxMenu->insertItem(i18n("copy comment to clipboard"), |
94 | this, SLOT(copyCommentToClip())); | 96 | this, SLOT(copyCommentToClip())); |
95 | ctxMenu->insertSeparator(); | 97 | ctxMenu->insertSeparator(); |
96 | ctxMenu->insertItem(i18n("Execute \"Launcher\""), mainClass, | 98 | ctxMenu->insertItem(i18n("Execute \"Launcher\""), mainClass, |
97 | SLOT(execLauncher_slot())); | 99 | SLOT(execLauncher_slot())); |
98 | ctxMenu->insertItem(i18n("Go to \"URL\""), mainClass, | 100 | ctxMenu->insertItem(i18n("Go to \"URL\""), mainClass, |
99 | SLOT(goToURL_slot())); | 101 | SLOT(goToURL_slot())); |
100 | } | 102 | } |
diff --git a/pwmanager/pwmanager/pwmviewstyle.cpp b/pwmanager/pwmanager/pwmviewstyle.cpp index 5f25880..ee35472 100644 --- a/pwmanager/pwmanager/pwmviewstyle.cpp +++ b/pwmanager/pwmanager/pwmviewstyle.cpp | |||
@@ -74,64 +74,68 @@ void PwMViewStyle::initStyle(style_t style) | |||
74 | if (v->isVisible()) | 74 | if (v->isVisible()) |
75 | v->hide(); | 75 | v->hide(); |
76 | switch (style) { | 76 | switch (style) { |
77 | case style_0: | 77 | case style_0: |
78 | delete_ifnot_null(s0); | 78 | delete_ifnot_null(s0); |
79 | delete_ifnot_null(s1); | 79 | delete_ifnot_null(s1); |
80 | s0 = new PwMViewStyle_0(v); | 80 | s0 = new PwMViewStyle_0(v); |
81 | lv = s0->getLv(); | 81 | lv = s0->getLv(); |
82 | commentBox = s0->getCommentBox(); | 82 | commentBox = s0->getCommentBox(); |
83 | break; | 83 | break; |
84 | case style_1: | 84 | case style_1: |
85 | delete_ifnot_null(s0); | 85 | delete_ifnot_null(s0); |
86 | delete_ifnot_null(s1); | 86 | delete_ifnot_null(s1); |
87 | s1 = new PwMViewStyle_1(v); | 87 | s1 = new PwMViewStyle_1(v); |
88 | lv = s1->getLv(); | 88 | lv = s1->getLv(); |
89 | commentBox = s1->getCommentBox(); | 89 | commentBox = s1->getCommentBox(); |
90 | break; | 90 | break; |
91 | default: | 91 | default: |
92 | BUG(); | 92 | BUG(); |
93 | return; | 93 | return; |
94 | } | 94 | } |
95 | curStyle = style; | 95 | curStyle = style; |
96 | connect(lv, SIGNAL(pressed(QListViewItem *)), | 96 | connect(lv, SIGNAL(pressed(QListViewItem *)), |
97 | v, SLOT(handleToggle(QListViewItem *))); | 97 | v, SLOT(handleToggle(QListViewItem *))); |
98 | connect(lv, SIGNAL(rightButtonClicked(QListViewItem *, const QPoint &, int)), | 98 | connect(lv, SIGNAL(rightButtonClicked(QListViewItem *, const QPoint &, int)), |
99 | v, SLOT(handleRightClick(QListViewItem *, const QPoint &, int))); | 99 | v, SLOT(handleRightClick(QListViewItem *, const QPoint &, int))); |
100 | connect(lv, SIGNAL(clicked(QListViewItem *)), | 100 | connect(lv, SIGNAL(clicked(QListViewItem *)), |
101 | v, SLOT(refreshCommentTextEdit(QListViewItem *))); | 101 | v, SLOT(refreshCommentTextEdit(QListViewItem *))); |
102 | connect(lv, SIGNAL(returnPressed(QListViewItem *)), | 102 | connect(lv, SIGNAL(returnPressed(QListViewItem *)), |
103 | this, SLOT(editPassWord(QListViewItem *))); | 103 | this, SLOT(editPassWord(QListViewItem *))); |
104 | connect(lv, SIGNAL(doubleClicked(QListViewItem *)), | 104 | connect(lv, SIGNAL(doubleClicked(QListViewItem *)), |
105 | this, SLOT(editPassWord(QListViewItem *))); | 105 | this, SLOT(editPassWord(QListViewItem *))); |
106 | connect(lv, SIGNAL(insertPW()), | ||
107 | this, SIGNAL( insertPW() )); | ||
108 | connect(lv, SIGNAL(deletePW()), | ||
109 | this, SIGNAL( deletePW() )); | ||
106 | 110 | ||
107 | lv->addColumn(i18n("Description"), 180); | 111 | lv->addColumn(i18n("Description"), 180); |
108 | lv->addColumn(i18n("Username"), 150); | 112 | lv->addColumn(i18n("Username"), 150); |
109 | lv->addColumn(i18n("Password"), 150); | 113 | lv->addColumn(i18n("Password"), 150); |
110 | lv->addColumn(i18n("URL"), 180); | 114 | lv->addColumn(i18n("URL"), 180); |
111 | lv->addColumn(i18n("Launcher"), 120); | 115 | lv->addColumn(i18n("Launcher"), 120); |
112 | v->tmpReEnableSort(); | 116 | v->tmpReEnableSort(); |
113 | 117 | ||
114 | //US ENH : load the size of the listviewcolumns | 118 | //US ENH : load the size of the listviewcolumns |
115 | switch (curStyle) | 119 | switch (curStyle) |
116 | { | 120 | { |
117 | case style_0: | 121 | case style_0: |
118 | s0->restoreSettings(PWMPrefs::instance()); | 122 | s0->restoreSettings(PWMPrefs::instance()); |
119 | break; | 123 | break; |
120 | case style_1: | 124 | case style_1: |
121 | s1->restoreSettings(PWMPrefs::instance()); | 125 | s1->restoreSettings(PWMPrefs::instance()); |
122 | break; | 126 | break; |
123 | default: | 127 | default: |
124 | BUG(); | 128 | BUG(); |
125 | } | 129 | } |
126 | 130 | ||
127 | resizeView(v->size()); | 131 | resizeView(v->size()); |
128 | v->updateView(); | 132 | v->updateView(); |
129 | if (wasMaximized) { | 133 | if (wasMaximized) { |
130 | v->showMaximized(); | 134 | v->showMaximized(); |
131 | } else { | 135 | } else { |
132 | v->show(); | 136 | v->show(); |
133 | } | 137 | } |
134 | connect(lv, SIGNAL(layoutChanged()), | 138 | connect(lv, SIGNAL(layoutChanged()), |
135 | v, SLOT(reorgLp())); | 139 | v, SLOT(reorgLp())); |
136 | } | 140 | } |
137 | 141 | ||
diff --git a/pwmanager/pwmanager/pwmviewstyle.h b/pwmanager/pwmanager/pwmviewstyle.h index 5656cbc..6c2d81c 100644 --- a/pwmanager/pwmanager/pwmviewstyle.h +++ b/pwmanager/pwmanager/pwmviewstyle.h | |||
@@ -79,35 +79,37 @@ protected: | |||
79 | void addCategory(const QString &cat); | 79 | void addCategory(const QString &cat); |
80 | /** delete Category from view */ | 80 | /** delete Category from view */ |
81 | void delCategory(const QString &cat); | 81 | void delCategory(const QString &cat); |
82 | /** delete all categories from view */ | 82 | /** delete all categories from view */ |
83 | void delAllCategories(); | 83 | void delAllCategories(); |
84 | /** select the specified category */ | 84 | /** select the specified category */ |
85 | void selectCategory(const QString &cat); | 85 | void selectCategory(const QString &cat); |
86 | /** returns the number of categories in this view. | 86 | /** returns the number of categories in this view. |
87 | * This value dosn't say anything about the number of | 87 | * This value dosn't say anything about the number of |
88 | * categories in the document. | 88 | * categories in the document. |
89 | */ | 89 | */ |
90 | int numCategories(); | 90 | int numCategories(); |
91 | /** resize the view */ | 91 | /** resize the view */ |
92 | void resizeView(const QSize &size); | 92 | void resizeView(const QSize &size); |
93 | ListViewPwM *lv; | 93 | ListViewPwM *lv; |
94 | CommentBox *commentBox; | 94 | CommentBox *commentBox; |
95 | 95 | ||
96 | protected slots: | 96 | protected slots: |
97 | void editPassWord( QListViewItem * ); | 97 | void editPassWord( QListViewItem * ); |
98 | 98 | ||
99 | private: | 99 | private: |
100 | /** which style has the view? | 100 | /** which style has the view? |
101 | * KListBox on the left, | 101 | * KListBox on the left, |
102 | * or QComboBox on the top? | 102 | * or QComboBox on the top? |
103 | */ | 103 | */ |
104 | style_t curStyle; | 104 | style_t curStyle; |
105 | 105 | ||
106 | PwMViewStyle_0 *s0; | 106 | PwMViewStyle_0 *s0; |
107 | PwMViewStyle_1 *s1; | 107 | PwMViewStyle_1 *s1; |
108 | PwMView *v; | 108 | PwMView *v; |
109 | signals: | 109 | signals: |
110 | void editPW(); | 110 | void editPW(); |
111 | void insertPW(); | ||
112 | void deletePW(); | ||
111 | 113 | ||
112 | }; | 114 | }; |
113 | #endif | 115 | #endif |