From 03d8ab45b1d4af446743d9baaba3cb96fcc69068 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 3 May 2002 21:02:04 +0000 Subject: [PATCH] Make {expand,collapse}{,_all}_threads available via the View menu. TODO: - move them into a submenu a la netscape? - properly enable/disable them when changing from threaded to non-threaded folder. Unfortunately, this turns out to be quite non-trivial, since message and folder actions are currently only updated on aboutToShow() signals. I could add the same hack for the view menu, but maybe someone has a better idea... svn path=/trunk/kdenetwork/kmail/; revision=153603 --- kmmainwin.cpp | 40 ++++++++++++++++++++++++---------------- kmmainwin.rc | 7 ++++++- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/kmmainwin.cpp b/kmmainwin.cpp index 264544a7f..1839f5e5f 100644 --- a/kmmainwin.cpp +++ b/kmmainwin.cpp @@ -633,22 +633,6 @@ void KMMainWin::createWidgets(void) i18n("Select folder with focus"), CTRL+Key_Space, mFolderTree, SLOT(selectCurrentFolder()), actionCollection(), "select_current_folder"); - new KAction( i18n("Expand Thread"), Key_Period, this, - SLOT(slotExpandThread()), - actionCollection(), "expand_thread" ); - - new KAction( i18n("Collapse Thread"), Key_Comma, this, - SLOT(slotCollapseThread()), - actionCollection(), "collapse_thread" ); - - new KAction( i18n("Expand All Threads"), CTRL+Key_Period, this, - SLOT(slotExpandAllThreads()), - actionCollection(), "expand_all_threads" ); - - new KAction( i18n("Collapse All Threads"), CTRL+Key_Comma, this, - SLOT(slotCollapseAllThreads()), - actionCollection(), "collapse_all_threads" ); - new KAction( i18n( "Move to the Next Unread Text" ), Key_Space, this, SLOT( slotReadOn() ), actionCollection(), "read_on" ); @@ -2681,6 +2665,30 @@ void KMMainWin::setupMenuBar() totalColumnToggle->setToolTip( msg ); totalColumnToggle->setChecked( mFolderTree->isTotalActive() ); + (void)new KAction( KGuiItem( i18n("View->","Expand Thread"), QString::null, + i18n("Expand the current thread") ), + Key_Period, this, + SLOT(slotExpandThread()), + actionCollection(), "expand_thread" ); + + (void)new KAction( KGuiItem( i18n("View->","Collapse Thread"), QString::null, + i18n("Collapse the current thread") ), + Key_Comma, this, + SLOT(slotCollapseThread()), + actionCollection(), "collapse_thread" ); + + (void)new KAction( KGuiItem( i18n("View->","Expand all Threads"), QString::null, + i18n("Expand all threads in the current folder") ), + CTRL+Key_Period, this, + SLOT(slotExpandAllThreads()), + actionCollection(), "expand_all_threads" ); + + (void)new KAction( KGuiItem( i18n("View->","Collapse all Threads"), QString::null, + i18n("Collapse all threads in the current folder") ), + CTRL+Key_Comma, this, + SLOT(slotCollapseAllThreads()), + actionCollection(), "collapse_all_threads" ); + toggleFixFontAction = new KToggleAction( i18n("Fixed Font &Widths"), 0, this, SLOT(slotToggleFixedFont()), actionCollection(), "toggle_fixedfont" ); diff --git a/kmmainwin.rc b/kmmainwin.rc index 8f54434a5..6c0183b2a 100644 --- a/kmmainwin.rc +++ b/kmmainwin.rc @@ -1,5 +1,5 @@ - + &File @@ -40,6 +40,11 @@ + + + + +