author | zautrix <zautrix> | 2005-07-10 10:17:55 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-10 10:17:55 (UTC) |
commit | 58b7818a74809dc9280a3249eeb7e0195a66f93d (patch) (unidiff) | |
tree | 04b04b867647a8c48d59e7a0fa89df6430039599 /korganizer/mainwindow.cpp | |
parent | e8b6635ef7c98996f0415e6a77394569493ab151 (diff) | |
download | kdepimpi-58b7818a74809dc9280a3249eeb7e0195a66f93d.zip kdepimpi-58b7818a74809dc9280a3249eeb7e0195a66f93d.tar.gz kdepimpi-58b7818a74809dc9280a3249eeb7e0195a66f93d.tar.bz2 |
fixx
-rw-r--r-- | korganizer/mainwindow.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 4bedb61..21d5a35 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -16,25 +16,23 @@ | |||
16 | #include <qspinbox.h> | 16 | #include <qspinbox.h> |
17 | #include <qcheckbox.h> | 17 | #include <qcheckbox.h> |
18 | #include <qmap.h> | 18 | #include <qmap.h> |
19 | #include <qwmatrix.h> | 19 | #include <qwmatrix.h> |
20 | #include <qtextbrowser.h> | 20 | #include <qtextbrowser.h> |
21 | #include <qtextstream.h> | 21 | #include <qtextstream.h> |
22 | #ifndef DESKTOP_VERSION | 22 | #ifndef DESKTOP_VERSION |
23 | #include <qpe/global.h> | 23 | #include <qpe/global.h> |
24 | #include <qpe/qpemenubar.h> | ||
25 | #include <qpe/qpetoolbar.h> | 24 | #include <qpe/qpetoolbar.h> |
26 | #include <qpe/resource.h> | 25 | #include <qpe/resource.h> |
27 | #include <qpe/qpeapplication.h> | 26 | #include <qpe/qpeapplication.h> |
28 | #include <qtopia/alarmserver.h> | 27 | #include <qtopia/alarmserver.h> |
29 | #include <qtopia/qcopenvelope_qws.h> | 28 | #include <qtopia/qcopenvelope_qws.h> |
30 | #include <unistd.h> // for sleep | 29 | #include <unistd.h> // for sleep |
31 | #else | 30 | #else |
32 | #include <qmenubar.h> | ||
33 | #include <qtoolbar.h> | 31 | #include <qtoolbar.h> |
34 | #include <qapplication.h> | 32 | #include <qapplication.h> |
35 | //#include <resource.h> | 33 | //#include <resource.h> |
36 | 34 | ||
37 | #endif | 35 | #endif |
38 | #include <libkcal/calendarlocal.h> | 36 | #include <libkcal/calendarlocal.h> |
39 | #include <libkcal/todo.h> | 37 | #include <libkcal/todo.h> |
40 | #include <libkcal/phoneformat.h> | 38 | #include <libkcal/phoneformat.h> |
@@ -220,17 +218,17 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
220 | } | 218 | } |
221 | else { | 219 | else { |
222 | if ( p->mToolBarUpF ) | 220 | if ( p->mToolBarUpF ) |
223 | tbd = Right; | 221 | tbd = Right; |
224 | else | 222 | else |
225 | tbd = Left; | 223 | tbd = Left; |
226 | } | 224 | } |
227 | filterToolBar = new QPEToolBar ( this ); | 225 | filterToolBar = new QPEToolBar ( this ); |
228 | filterMenubar = new QMenuBar( 0 ); | 226 | filterMenubar = new KMenuBar( 0 ); |
229 | QFontMetrics fm ( filterMenubar->font() ); | 227 | QFontMetrics fm ( filterMenubar->font() ); |
230 | 228 | ||
231 | filterPopupMenu = new QPopupMenu( this ); | 229 | filterPopupMenu = new QPopupMenu( this ); |
232 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); | 230 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); |
233 | QString addTest = "A"; | 231 | QString addTest = "A"; |
234 | filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); | 232 | filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); |
235 | #ifdef DESKTOP_VERSION | 233 | #ifdef DESKTOP_VERSION |
236 | addTest = "AAABBBCCCx"; | 234 | addTest = "AAABBBCCCx"; |
@@ -677,52 +675,52 @@ void MainWindow::initActions() | |||
677 | if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { | 675 | if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { |
678 | pathString += "icons16/"; | 676 | pathString += "icons16/"; |
679 | pixWid = 18; pixHei = 16; | 677 | pixWid = 18; pixHei = 16; |
680 | } | 678 | } |
681 | } else { | 679 | } else { |
682 | pathString += "iconsmini/"; | 680 | pathString += "iconsmini/"; |
683 | pixWid = 18; pixHei = 16; | 681 | pixWid = 18; pixHei = 16; |
684 | } | 682 | } |
683 | KMenuBar *menuBar1; | ||
685 | if ( KOPrefs::instance()->mShowFullMenu ) { | 684 | if ( KOPrefs::instance()->mShowFullMenu ) { |
686 | QMenuBar *menuBar1; | 685 | menuBar1 = new KMenuBar( this );//menuBar(); |
687 | menuBar1 = menuBar(); | ||
688 | menuBar1->insertItem( i18n("File"), importMenu ); | 686 | menuBar1->insertItem( i18n("File"), importMenu ); |
689 | menuBar1->insertItem( i18n("View"), viewMenu ); | 687 | menuBar1->insertItem( i18n("View"), viewMenu ); |
690 | menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu ); | 688 | menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu ); |
691 | menuBar1->insertItem( i18n("Action"), actionMenu ); | 689 | menuBar1->insertItem( i18n("Action"), actionMenu ); |
692 | #ifdef DESKTOP_VERSION | 690 | #ifdef DESKTOP_VERSION |
693 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); | 691 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); |
694 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 692 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
695 | #else | 693 | #else |
696 | menuBar1->insertItem( i18n("Sync"), syncMenu ); | 694 | menuBar1->insertItem( i18n("Sync"), syncMenu ); |
697 | menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); | 695 | menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); |
698 | #endif | 696 | #endif |
699 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 697 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
700 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); | 698 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); |
701 | menuBar1->insertItem( i18n("Help"), helpMenu ); | 699 | menuBar1->insertItem( i18n("Help"), helpMenu ); |
702 | } else { | 700 | } else { |
703 | QPEMenuBar *menuBar1; | 701 | menuBar1 = new KMenuBar( iconToolBar ); |
704 | menuBar1 = new QPEMenuBar( iconToolBar ); | ||
705 | QPopupMenu *menuBar = new QPopupMenu( this ); | 702 | QPopupMenu *menuBar = new QPopupMenu( this ); |
706 | icon = loadPixmap( pathString + "z_menu" ); | 703 | icon = loadPixmap( pathString + "z_menu" ); |
707 | menuBar1->insertItem( icon.pixmap(), menuBar); | 704 | menuBar1->insertItem( icon.pixmap(), menuBar); |
708 | //menuBar1->insertItem( i18n("ME"), menuBar); | 705 | //menuBar1->insertItem( i18n("ME"), menuBar); |
709 | menuBar->insertItem( i18n("File"), importMenu ); | 706 | menuBar->insertItem( i18n("File"), importMenu ); |
710 | menuBar->insertItem( i18n("View"), viewMenu ); | 707 | menuBar->insertItem( i18n("View"), viewMenu ); |
711 | menuBar->insertItem( i18n("Edit"), mCurrentItemMenu ); | 708 | menuBar->insertItem( i18n("Edit"), mCurrentItemMenu ); |
712 | menuBar->insertItem( i18n("Action"), actionMenu ); | 709 | menuBar->insertItem( i18n("Action"), actionMenu ); |
713 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); | 710 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); |
714 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 711 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
715 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 712 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
716 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); | 713 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); |
717 | menuBar->insertItem( i18n("Help"), helpMenu ); | 714 | menuBar->insertItem( i18n("Help"), helpMenu ); |
718 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); | 715 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); |
719 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); | 716 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); |
720 | } | 717 | } |
718 | connect ( menuBar1, SIGNAL( lostFocus () ), mView, SLOT ( slotResetFocus() ) ); | ||
721 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 719 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
722 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); | 720 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); |
723 | 721 | ||
724 | 722 | ||
725 | mWeekBgColor = iconToolBar->backgroundColor(); | 723 | mWeekBgColor = iconToolBar->backgroundColor(); |
726 | mWeekPixmap.resize( pixWid , pixHei ); | 724 | mWeekPixmap.resize( pixWid , pixHei ); |
727 | mWeekPixmap.fill( mWeekBgColor ); | 725 | mWeekPixmap.fill( mWeekBgColor ); |
728 | icon = mWeekPixmap; | 726 | icon = mWeekPixmap; |