summaryrefslogtreecommitdiffstats
path: root/khtml/rendering
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-02 21:21:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-02 21:21:15 +0000
commit96900dbce3aaa1fcac74a07a71482c5c6fcd3cab (patch)
treebf3fc68d0dcc660fce0e21171373a2d4e2395707 /khtml/rendering
parent5f99bff82d3413803bcc652999f4f631058179d6 (diff)
downloadtdelibs-96900dbce3aaa1fcac74a07a71482c5c6fcd3cab.tar.gz
tdelibs-96900dbce3aaa1fcac74a07a71482c5c6fcd3cab.zip
* Large set of SuSE patches to fix bugs and add functionality
* kdemm is included but not used by knotify as it does not work out of the box git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1171141 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khtml/rendering')
-rw-r--r--khtml/rendering/render_form.cpp18
-rw-r--r--khtml/rendering/render_form.h4
2 files changed, 20 insertions, 2 deletions
diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp
index 403295a8f..58a9a8d33 100644
--- a/khtml/rendering/render_form.cpp
+++ b/khtml/rendering/render_form.cpp
@@ -385,7 +385,9 @@ TQPopupMenu *LineEditWidget::createPopupMenu()
if (m_input->autoComplete()) {
popup->insertSeparator();
- int id = popup->insertItem( SmallIconSet("history_clear"), i18n("Clear &History"), ClearHistory );
+ int id = popup->insertItem( SmallIconSet("edit"), i18n("&Edit History..."), EditHistory );
+ popup->setItemEnabled( id, (compObj() && !compObj()->isEmpty()) );
+ id = popup->insertItem( SmallIconSet("history_clear"), i18n("Clear &History"), ClearHistory );
popup->setItemEnabled( id, (compObj() && !compObj()->isEmpty()) );
}
@@ -409,11 +411,25 @@ void LineEditWidget::extendedMenuActivated( int id)
m_view->clearCompletionHistory(m_input->name().string());
if (compObj())
compObj()->clear();
+ case EditHistory:
+ {
+ KHistoryComboEditor dlg( compObj() ? compObj()->items() : TQStringList(), this );
+ connect( &dlg, TQT_SIGNAL( removeFromHistory(const TQString&) ), TQT_SLOT( slotRemoveFromHistory(const TQString&)) );
+ dlg.exec();
+ }
default:
break;
}
}
+void LineEditWidget::slotRemoveFromHistory(const TQString &entry)
+{
+ m_view->removeFormCompletionItem(m_input->name().string(), entry);
+ if (compObj())
+ compObj()->removeItem(entry);
+}
+
+
bool LineEditWidget::event( TQEvent *e )
{
if (KLineEdit::event(e))
diff --git a/khtml/rendering/render_form.h b/khtml/rendering/render_form.h
index 33a31a910..c414e079c 100644
--- a/khtml/rendering/render_form.h
+++ b/khtml/rendering/render_form.h
@@ -272,10 +272,12 @@ private slots:
void spellCheckerMisspelling( const TQString &text, const TQStringList &, unsigned int pos);
void spellCheckerCorrected( const TQString &, const TQString &, unsigned int );
void spellCheckerFinished();
+ void slotRemoveFromHistory( const TQString & );
private:
enum LineEditMenuID {
- ClearHistory
+ ClearHistory,
+ EditHistory
};
DOM::HTMLInputElementImpl* m_input;
KHTMLView* m_view;