summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp27
1 files changed, 17 insertions, 10 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 ) :
#ifdef DESKTOP_VERSION
if ( KOPrefs::instance()->mShowIconFilter )
#else
- if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar )
+ if ( KOPrefs::instance()->mShowIconFilter || ( !p->mShowIconOnetoolbar &&!p->mShowIconFilterview ) )
#endif
{
@@ -234,9 +234,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
QString addTest = "A";
filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) );
#ifdef DESKTOP_VERSION
- addTest = "AAABBBCCCx";
+ addTest = "AAAAAABBBCCCx";
#else
- addTest = "AAx";
+ addTest = "AAAAAx";
#endif
filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) );
addToolBar (filterToolBar , tbd );
@@ -837,7 +837,6 @@ void MainWindow::initActions()
connect( ne_action, SIGNAL( activated() ),
mView, SLOT( newEvent() ) );
icon = loadPixmap( pathString + "newtodo" );
- configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
nt_action->addTo( mCurrentItemMenu );
connect( nt_action, SIGNAL( activated() ),
@@ -857,6 +856,8 @@ void MainWindow::initActions()
configureToolBarMenu->insertSeparator();
configureToolBarMenu->insertItem(i18n("Week Number"), 400);
configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
+ icon = loadPixmap( pathString + "newtodo" );
+ configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
//actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu);
mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this );
@@ -1048,6 +1049,7 @@ void MainWindow::initActions()
connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
+ icon = loadPixmap( pathString + "search" );
configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5);
@@ -2325,7 +2327,10 @@ void MainWindow::updateFilterToolbar()
} else {
CalFilter *curfilter = mView->filterView()->selectedFilter();
if ( curfilter ) {
- filterMenubar->changeItem( 0, curfilter->name() );
+ QString name = curfilter->name();
+ if ( name.length() > 12 )
+ name = name.left(10)+"...";
+ filterMenubar->changeItem( 0, name );
}
}
}
@@ -2662,11 +2667,13 @@ void MainWindow::hideEvent ( QHideEvent * )
void MainWindow::resizeEvent( QResizeEvent* e)
{
#ifndef DESKTOP_VERSION
- if ( !KOPrefs::instance()->mShowIconFilter && !KOPrefs::instance()->mShowIconOnetoolbar && QApplication::desktop()->width() > 320) {
- if (QApplication::desktop()->width() > QApplication::desktop()->height() )
- filterToolBar->hide();
- else
- filterToolBar->show();
+ if ( filterToolBar ) {
+ if ( !KOPrefs::instance()->mShowIconFilter && !KOPrefs::instance()->mShowIconOnetoolbar && QApplication::desktop()->width() > 320) {
+ if (QApplication::desktop()->width() > QApplication::desktop()->height() )
+ filterToolBar->hide();
+ else
+ filterToolBar->show();
+ }
}
#endif
QMainWindow::resizeEvent( e);