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
wilder-work
Marc Mutz 24 years ago
parent 2627d323f4
commit 03d8ab45b1
  1. 40
      kmmainwin.cpp
  2. 7
      kmmainwin.rc

@ -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" );

@ -1,5 +1,5 @@
<!DOCTYPE kpartgui >
<kpartgui version="31" name="kmmainwin" >
<kpartgui version="32" name="kmmainwin" >
<MenuBar>
<Menu noMerge="1" name="file" >
<text>&amp;File</text>
@ -40,6 +40,11 @@
<Action name="view_columns_unread"/>
<Action name="view_columns_total"/>
<Separator/>
<Action name="expand_thread"/>
<Action name="collapse_thread"/>
<Action name="expand_all_threads"/>
<Action name="collapse_all_threads"/>
<Separator/>
<Action name="toggle_fixedfont"/>
<Separator/>
<Action name="view_source"/>

Loading…
Cancel
Save