summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 45775c5..94bc4c1 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -206,7 +206,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
206#ifdef DESKTOP_VERSION 206#ifdef DESKTOP_VERSION
207 if ( KOPrefs::instance()->mShowIconFilter ) 207 if ( KOPrefs::instance()->mShowIconFilter )
208#else 208#else
209 if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar ) 209 if ( KOPrefs::instance()->mShowIconFilter || ( !p->mShowIconOnetoolbar &&!p->mShowIconFilterview ) )
210#endif 210#endif
211 211
212{ 212{
@@ -234,9 +234,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
234 QString addTest = "A"; 234 QString addTest = "A";
235 filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); 235 filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) );
236#ifdef DESKTOP_VERSION 236#ifdef DESKTOP_VERSION
237 addTest = "AAABBBCCCx"; 237 addTest = "AAAAAABBBCCCx";
238#else 238#else
239 addTest = "AAx"; 239 addTest = "AAAAAx";
240#endif 240#endif
241 filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); 241 filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) );
242 addToolBar (filterToolBar , tbd ); 242 addToolBar (filterToolBar , tbd );
@@ -837,7 +837,6 @@ void MainWindow::initActions()
837 connect( ne_action, SIGNAL( activated() ), 837 connect( ne_action, SIGNAL( activated() ),
838 mView, SLOT( newEvent() ) ); 838 mView, SLOT( newEvent() ) );
839 icon = loadPixmap( pathString + "newtodo" ); 839 icon = loadPixmap( pathString + "newtodo" );
840 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
841 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); 840 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
842 nt_action->addTo( mCurrentItemMenu ); 841 nt_action->addTo( mCurrentItemMenu );
843 connect( nt_action, SIGNAL( activated() ), 842 connect( nt_action, SIGNAL( activated() ),
@@ -857,6 +856,8 @@ void MainWindow::initActions()
857 configureToolBarMenu->insertSeparator(); 856 configureToolBarMenu->insertSeparator();
858 configureToolBarMenu->insertItem(i18n("Week Number"), 400); 857 configureToolBarMenu->insertItem(i18n("Week Number"), 400);
859 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); 858 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
859 icon = loadPixmap( pathString + "newtodo" );
860 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
860 861
861 //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); 862 //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu);
862 mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this ); 863 mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this );
@@ -1048,6 +1049,7 @@ void MainWindow::initActions()
1048 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); 1049 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
1049 1050
1050 1051
1052 icon = loadPixmap( pathString + "search" );
1051 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); 1053 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5);
1052 1054
1053 1055
@@ -2325,7 +2327,10 @@ void MainWindow::updateFilterToolbar()
2325 } else { 2327 } else {
2326 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2328 CalFilter *curfilter = mView->filterView()->selectedFilter();
2327 if ( curfilter ) { 2329 if ( curfilter ) {
2328 filterMenubar->changeItem( 0, curfilter->name() ); 2330 QString name = curfilter->name();
2331 if ( name.length() > 12 )
2332 name = name.left(10)+"...";
2333 filterMenubar->changeItem( 0, name );
2329 } 2334 }
2330 } 2335 }
2331 } 2336 }
@@ -2662,12 +2667,14 @@ void MainWindow::hideEvent ( QHideEvent * )
2662void MainWindow::resizeEvent( QResizeEvent* e) 2667void MainWindow::resizeEvent( QResizeEvent* e)
2663{ 2668{
2664#ifndef DESKTOP_VERSION 2669#ifndef DESKTOP_VERSION
2670 if ( filterToolBar ) {
2665 if ( !KOPrefs::instance()->mShowIconFilter && !KOPrefs::instance()->mShowIconOnetoolbar && QApplication::desktop()->width() > 320) { 2671 if ( !KOPrefs::instance()->mShowIconFilter && !KOPrefs::instance()->mShowIconOnetoolbar && QApplication::desktop()->width() > 320) {
2666 if (QApplication::desktop()->width() > QApplication::desktop()->height() ) 2672 if (QApplication::desktop()->width() > QApplication::desktop()->height() )
2667 filterToolBar->hide(); 2673 filterToolBar->hide();
2668 else 2674 else
2669 filterToolBar->show(); 2675 filterToolBar->show();
2670 } 2676 }
2677 }
2671#endif 2678#endif
2672 QMainWindow::resizeEvent( e); 2679 QMainWindow::resizeEvent( e);
2673} 2680}