summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-08-17 16:19:18 (UTC)
committer zautrix <zautrix>2005-08-17 16:19:18 (UTC)
commitc21edc19916722f5dd4e939f1522d311a86411fd (patch) (side-by-side diff)
treeed91c2cd9afb7d37c73f2056851c95293eff6038 /korganizer
parent9e6d1f7f45ef1444dc6ee96347a2dbd67a0d79dd (diff)
downloadkdepimpi-c21edc19916722f5dd4e939f1522d311a86411fd.zip
kdepimpi-c21edc19916722f5dd4e939f1522d311a86411fd.tar.gz
kdepimpi-c21edc19916722f5dd4e939f1522d311a86411fd.tar.bz2
minor kopi fixes
Diffstat (limited to 'korganizer') (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
@@ -203,13 +203,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
iconToolBar = new QPEToolBar( this );
addToolBar (iconToolBar , tbd );
#ifdef DESKTOP_VERSION
if ( KOPrefs::instance()->mShowIconFilter )
#else
- if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar )
+ if ( KOPrefs::instance()->mShowIconFilter || ( !p->mShowIconOnetoolbar &&!p->mShowIconFilterview ) )
#endif
{
if ( p->mToolBarHorF ) {
if ( p->mToolBarUpF )
tbd = Bottom;
@@ -231,15 +231,15 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
#endif
filterPopupMenu = new QPopupMenu( this );
filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 );
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 );
connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) );
connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) );
if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar )
@@ -834,13 +834,12 @@ void MainWindow::initActions()
icon = loadPixmap( pathString + "newevent" );
QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
ne_action->addTo( mCurrentItemMenu );
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() ),
mView, SLOT( newTodo() ) );
mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0,
this );
@@ -854,12 +853,14 @@ void MainWindow::initActions()
configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 );
configureToolBarMenu->insertSeparator();
configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 );
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 );
mShowAction->addTo( mCurrentItemMenu );
connect( mShowAction, SIGNAL( activated() ),
mView, SLOT( showIncidence() ) );
@@ -1045,12 +1046,13 @@ void MainWindow::initActions()
action = new QAction( "purge_completed", i18n("Purge Completed..."), 0,
this );
action->addTo( actionMenu );
connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
+ icon = loadPixmap( pathString + "search" );
configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5);
actionMenu->insertSeparator();
action = new QAction( "manage cat", i18n("Edit category list..."), 0,
@@ -2322,13 +2324,16 @@ void MainWindow::updateFilterToolbar()
if ( filterMenubar ) {
if ( !mView->filterView()->filtersEnabled() ) {
filterMenubar->changeItem( 0, i18n("No Filter") );
} 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 );
}
}
}
}
void MainWindow::selectFilterPopup( int fil )
{
@@ -2659,15 +2664,17 @@ 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);
}