SLOT( focusSearchCombo() ),
actionCollection(),
"threadview_find" );
+ KStdAction::findNext( m_threadview,
+ SLOT( slotSearchNext() ),
+ actionCollection(),
+ "threadview_findnext");
+
+ KStdAction::findPrev( m_threadview,
+ SLOT( slotSearchPrev() ),
+ actionCollection(),
+ "threadview_findprev");
+
+ new KAction( i18n( "go back anchor" ),
+ "2leftarrow",
+ Key_Backspace,
+ m_threadview,
+ SLOT( slotGobackAnchor() ),
+ actionCollection(),
+ "threadview_goback" );
+
+ new KAction( i18n( "Start" ),
+ "up",
+ Key_Home,
+ m_threadview,
+ SLOT( slotGotoHeader() ),
+ actionCollection(),
+ "threadview_gotoheader" );
+
+ new KAction( i18n( "End" ),
+ "down",
+ Key_End,
+ m_threadview,
+ SLOT( slotGotoFooter() ),
+ actionCollection(),
+ "threadview_gotofooter" );
new KAction( i18n( "Reload" ),
"reload",
/* if this is parent, then show all responses, and search */
if ( m_viewmode == VIEWMODE_PARENT ) m_threadPart->showAll();
- insertSearchCombo();
+ slotSearchPrivate( FALSE );
+}
+
+/* public slot */
+void KitaThreadView::slotSearchNext(){ slotSearchPrivate( FALSE ); }
+void KitaThreadView::slotSearchPrev(){ slotSearchPrivate( TRUE ); }
+
+/* private */
+void KitaThreadView::slotSearchPrivate( bool rev )
+{
+ if ( m_datURL.isEmpty() ) return ; /* Nothing is shown on the screen.*/
+
+ /* jump */
+ QString str = SearchCombo->currentText();
+ if( str == QString::null ) return;
+ if( str == "" ) return;
+ if( str.at( 0 ) == ':' ) return;
+ if( str.at(0) == '?' ) return;
+
+ /* if this is parent, then show all responses, and search */
+ if ( m_viewmode == VIEWMODE_PARENT ) m_threadPart->showAll();
+
+ insertSearchCombo();
QStringList list = parseSearchQuery( SearchCombo->currentText() );
- m_threadPart->findText( SearchCombo->currentText(), m_revsearch );
+ m_threadPart->findText( SearchCombo->currentText(), rev );
SearchCombo->setFocus();
}
+
+/* public slot */
+void KitaThreadView::slotGobackAnchor(){ m_threadPart->slotGobackAnchor(); }
+void KitaThreadView::slotGotoHeader(){ m_threadPart->gotoAnchor( "header", FALSE );}
+void KitaThreadView::slotGotoFooter(){ m_threadPart->slotClickGotoFooter(); }
+
// vim:sw=2:
void KitaThreadView::slotComboActivated( int index )
void slotStopLoading();
void focusSearchCombo();
void slotDeleteButtonClicked();
+ void slotSearchNext();
+ void slotSearchPrev();
+ void slotGobackAnchor();
+ void slotGotoHeader();
+ void slotGotoFooter();
protected slots:
void slotDOMNodeActivated( const DOM::Node& node );
void slotShowErrorDialog( const QString& input, const KURL& urlOfInput = 0 );
void slotComboActivated( int index );
void slotUpdateInfo();
+ void slotSearchPrivate( bool rev );
signals:
void datURLRedirected( const KURL& newDatURL );
<MenuBar>
<Menu name="thread"><text>&Thread</text>
<Separator/>
+ <Action name="threadview_goback" />
+ <Action name="threadview_gotoheader" />
+ <Action name="threadview_gotofooter" />
+ <Separator/>
<Action name="threadview_reload" />
<Action name="threadview_stop" />
<Action name="threadview_delete" />
<Separator/>
<Action name="threadview_find" />
+ <Action name="threadview_findnext" />
+ <Action name="threadview_findprev" />
</Menu>
</MenuBar>
</kpartgui>