[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kdeui
From: Jean-Baptiste Mardelle <bj () altern ! org>
Date: 2004-07-13 20:36:18
Message-ID: 20040713203618.3807516B0D () office ! kde ! org
[Download RAW message or body]
CVS commit by mardelle:
Add a context menu item to enable/disable use of tabulations in the widget.
M +10 -5 ktextedit.cpp 1.21
M +2 -0 ktextedit.h 1.17
--- kdelibs/kdeui/ktextedit.cpp #1.20:1.21
@@ -198,4 +198,9 @@ void KTextEdit::deleteWordForward()
}
+void KTextEdit::slotAllowTab()
+{
+setTabChangesFocus(!tabChangesFocus());
+}
+
QPopupMenu *KTextEdit::createPopupMenu( const QPoint &pos )
{
@@ -214,10 +219,7 @@ QPopupMenu *KTextEdit::createPopupMenu(
menu->changeItem( id - IdPaste, SmallIconSet("editpaste"), menu->text( id - IdPaste) );
menu->changeItem( id - IdClear, SmallIconSet("editclear"), menu->text( id - IdClear) );
- }
-
- if ( !isReadOnly() ) {
menu->insertSeparator();
- int id = menu->insertItem( SmallIconSet( "spellcheck" ), i18n( "Check Spelling..." ),
+ id = menu->insertItem( SmallIconSet( "spellcheck" ), i18n( "Check Spelling..." ),
this, SLOT( checkSpelling() ) );
@@ -228,4 +230,7 @@ QPopupMenu *KTextEdit::createPopupMenu(
this, SLOT( toggleAutoSpellCheck() ) );
menu->setItemChecked(id, d->checkSpellingEnabled);
+ menu->insertSeparator();
+ id=menu->insertItem(i18n("Allow Tabulations"),this,SLOT(slotAllowTab()));
+ menu->setItemChecked(id, !tabChangesFocus());
}
--- kdelibs/kdeui/ktextedit.h #1.16:1.17
@@ -154,4 +155,5 @@ private slots:
void spellCheckerFinished();
void toggleAutoSpellCheck();
+ void slotAllowTab();
private:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic