Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Marcus_H
kdepim3
r709066.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File r709066.diff of Package kdepim3
------------------------------------------------------------------------ r709066 | vkrause | 2007-09-06 16:00:22 +0200 (Thu, 06 Sep 2007) | 37 lines Merged revisions 702833-702837,702839,702841-702888,702890-702952,702954-703209,703211-703454,703456-703461,703463-703760,703762-703855,703857-703886,703888-703946,703948-703961,703963-704170,704172-704178,704180-704185,704187-704195,704197-704304,704306-705719,705721-708727,708729-709065 via svnmerge from https://vkrause@svn.kde.org/home/kde/branches/work/~vkrause/enterprise ........ r706113 | vkrause | 2007-08-29 15:17:57 +0200 (Wed, 29 Aug 2007) | 3 lines Show only the status menu if a context menu is requested on a status column. ........ r706139 | vkrause | 2007-08-29 16:28:00 +0200 (Wed, 29 Aug 2007) | 2 lines Toggle message status when clicking on a status column. ........ r706145 | vkrause | 2007-08-29 16:40:27 +0200 (Wed, 29 Aug 2007) | 2 lines Prevent changing flags in read-only folders. ........ r708324 | vkrause | 2007-09-04 16:21:33 +0200 (Tue, 04 Sep 2007) | 3 lines - handle multi-state columns correctly - don't trigger when trying to select multiple items ........ r709045 | vkrause | 2007-09-06 14:54:59 +0200 (Thu, 06 Sep 2007) | 4 lines - consider margin for default column width - move flag columns to the front when enabling them, unless they have been moved manually already ........ r709056 | vkrause | 2007-09-06 15:39:13 +0200 (Thu, 06 Sep 2007) | 2 lines Rename todo message flag to avoid confusion with korganizer todos. ........ r709061 | vkrause | 2007-09-06 15:49:42 +0200 (Thu, 06 Sep 2007) | 2 lines Make sure we always have the correct message status action states. ........ ------------------------------------------------------------------------ --- kmail/kmheaders.cpp +++ kmail/kmheaders.cpp @@ -128,7 +128,7 @@ KMHeaders::KMHeaders(KMMainWidget *aOwne mPopup->setCheckable(true); mPopup->insertItem(i18n("Status"), KPaintInfo::COL_STATUS); mPopup->insertItem(i18n("Important"), KPaintInfo::COL_IMPORTANT); - mPopup->insertItem(i18n("Todo"), KPaintInfo::COL_TODO); + mPopup->insertItem(i18n("Action Item"), KPaintInfo::COL_TODO); mPopup->insertItem(i18n("Attachment"), KPaintInfo::COL_ATTACHMENT); mPopup->insertItem(i18n("Spam/Ham"), KPaintInfo::COL_SPAM_HAM); mPopup->insertItem(i18n("Watched/Ignored"), KPaintInfo::COL_WATCHED_IGNORED); @@ -256,6 +256,7 @@ void KMHeaders::slotToggleColumn(int id, bool *show = 0; int *col = 0; int width = 0; + int moveToCol = -1; switch ( static_cast<KPaintInfo::ColumnIds>(id) ) { @@ -270,56 +271,72 @@ void KMHeaders::slotToggleColumn(int id, { show = &mPaintInfo.showAttachment; col = &mPaintInfo.attachmentCol; - width = pixAttachment->width(); + width = pixAttachment->width() + 8; + if ( *col == header()->mapToIndex( *col ) ) + moveToCol = 0; break; } case KPaintInfo::COL_IMPORTANT: { show = &mPaintInfo.showImportant; col = &mPaintInfo.importantCol; - width = pixFlag->width(); + width = pixFlag->width() + 8; + if ( *col == header()->mapToIndex( *col ) ) + moveToCol = 0; break; } case KPaintInfo::COL_TODO: { show = &mPaintInfo.showTodo; col = &mPaintInfo.todoCol; - width = pixTodo->width(); + width = pixTodo->width() + 8; + if ( *col == header()->mapToIndex( *col ) ) + moveToCol = 0; break; } case KPaintInfo::COL_SPAM_HAM: { show = &mPaintInfo.showSpamHam; col = &mPaintInfo.spamHamCol; - width = pixSpam->width(); + width = pixSpam->width() + 8; + if ( *col == header()->mapToIndex( *col ) ) + moveToCol = 0; break; } case KPaintInfo::COL_WATCHED_IGNORED: { show = &mPaintInfo.showWatchedIgnored; col = &mPaintInfo.watchedIgnoredCol; - width = pixWatched->width(); + width = pixWatched->width() + 8; + if ( *col == header()->mapToIndex( *col ) ) + moveToCol = 0; break; } case KPaintInfo::COL_STATUS: { show = &mPaintInfo.showStatus; col = &mPaintInfo.statusCol; - width = pixNew->width(); + width = pixNew->width() + 8; + if ( *col == header()->mapToIndex( *col ) ) + moveToCol = 0; break; } case KPaintInfo::COL_SIGNED: { show = &mPaintInfo.showSigned; col = &mPaintInfo.signedCol; - width = pixFullySigned->width(); + width = pixFullySigned->width() + 8; + if ( *col == header()->mapToIndex( *col ) ) + moveToCol = 0; break; } case KPaintInfo::COL_CRYPTO: { show = &mPaintInfo.showCrypto; col = &mPaintInfo.cryptoCol; - width = pixFullyEncrypted->width(); + width = pixFullyEncrypted->width() + 8; + if ( *col == header()->mapToIndex( *col ) ) + moveToCol = 0; break; } case KPaintInfo::COL_RECEIVER: @@ -345,6 +362,8 @@ void KMHeaders::slotToggleColumn(int id, if (*show) { header()->setResizeEnabled(true, *col); setColumnWidth(*col, width); + if ( moveToCol >= 0 ) + header()->moveSection( *col, moveToCol ); } else { header()->setResizeEnabled(false, *col); @@ -2263,6 +2282,31 @@ void KMHeaders::contentsMousePressEvent( if ((e->button() == LeftButton) ) mMousePressed = true; } + + // check if we are on a status column and toggle it + if ( lvi && e->button() == LeftButton && !( e->state() & (ShiftButton | ControlButton | AltButton | MetaButton) ) ) { + bool flagsToggleable = GlobalSettings::self()->allowLocalFlags() || !(mFolder ? mFolder->isReadOnly() : true); + int section = header()->sectionAt( e->pos().x() ); + HeaderItem *item = static_cast<HeaderItem*>( lvi ); + KMMsgBase *msg = mFolder->getMsgBase(item->msgId()); + if ( section == mPaintInfo.flagCol && flagsToggleable ) { + setMsgStatus( KMMsgStatusFlag, true ); + } else if ( section == mPaintInfo.importantCol && flagsToggleable ) { + setMsgStatus( KMMsgStatusFlag, true ); + } else if ( section == mPaintInfo.todoCol && flagsToggleable ) { + setMsgStatus( KMMsgStatusTodo, true ); + } else if ( section == mPaintInfo.watchedIgnoredCol && flagsToggleable ) { + if ( msg->isWatched() || msg->isIgnored() ) + setMsgStatus( KMMsgStatusIgnored, true ); + else + setMsgStatus( KMMsgStatusWatched, true ); + } else if ( section == mPaintInfo.statusCol ) { + if ( msg->isUnread() || msg->isNew() ) + setMsgStatus( KMMsgStatusRead ); + else + setMsgStatus( KMMsgStatusUnread ); + } + } } //----------------------------------------------------------------------------- @@ -2324,6 +2368,22 @@ void KMHeaders::highlightMessage(QListVi void KMHeaders::slotRMB() { if (!topLevelWidget()) return; // safe bet + mOwner->updateMessageActions(); + + // check if the user clicked into a status column and only show the respective menues + QListViewItem *item = itemAt( viewport()->mapFromGlobal( QCursor::pos() ) ); + if ( item ) { + int section = header()->sectionAt( viewportToContents( viewport()->mapFromGlobal( QCursor::pos() ) ).x() ); + if ( section == mPaintInfo.flagCol || section == mPaintInfo.importantCol + || section == mPaintInfo.todoCol || section == mPaintInfo.statusCol ) { + mOwner->statusMenu()->popup( QCursor::pos() ); + return; + } + if ( section == mPaintInfo.watchedIgnoredCol ) { + mOwner->threadStatusMenu()->popup( QCursor::pos() ); + return; + } + } QPopupMenu *menu = new QPopupMenu(this); --- kmail/kmmainwidget.cpp +++ kmail/kmmainwidget.cpp @@ -3004,10 +3004,10 @@ void KMMainWidget::setupActions() mToggleFlagAction->setCheckedState( i18n("Remove &Important Message Mark") ); mStatusMenu->insert( mToggleFlagAction ); - mToggleTodoAction = new KToggleAction(i18n("Mark Message as &To-do"), "mail_todo", + mToggleTodoAction = new KToggleAction(i18n("Mark Message as &Action Item"), "mail_todo", 0, this, SLOT(slotSetMsgStatusTodo()), actionCollection(), "status_todo"); - mToggleTodoAction->setCheckedState( i18n("Remove &To-do Message Mark") ); + mToggleTodoAction->setCheckedState( i18n("Remove &Action Item Message Mark") ); mStatusMenu->insert( mToggleTodoAction ); //----- "Mark Thread" submenu @@ -3041,10 +3041,10 @@ void KMMainWidget::setupActions() mToggleThreadFlagAction->setCheckedState( i18n("Remove &Important Thread Mark") ); mThreadStatusMenu->insert( mToggleThreadFlagAction ); - mToggleThreadTodoAction = new KToggleAction(i18n("Mark Thread as &To-do"), "mail_todo", + mToggleThreadTodoAction = new KToggleAction(i18n("Mark Thread as &Action Item"), "mail_todo", 0, this, SLOT(slotSetThreadStatusTodo()), actionCollection(), "thread_todo"); - mToggleThreadTodoAction->setCheckedState( i18n("Remove &To-do Thread Mark") ); + mToggleThreadTodoAction->setCheckedState( i18n("Remove &Action Item Thread Mark") ); mThreadStatusMenu->insert( mToggleThreadTodoAction ); //------- "Watch and ignore thread" actions Property changes on: . ___________________________________________________________________ Name: svnmerge-integrated - /branches/KDE/3.5/kdepim:1-658468 /branches/work/~vkrause/enterprise:1-702832,702889,702953-703455,703761-704186,704305 + /branches/KDE/3.5/kdepim:1-658468 /branches/work/~vkrause/enterprise:1-702837,702839-709065
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor