diff --git a/interfaces/iassistant.cpp b/interfaces/iassistant.cpp
index 573bdfe..2ff26ff 100644
--- a/interfaces/iassistant.cpp
+++ b/interfaces/iassistant.cpp
@@ -17,8 +17,6 @@
 */
 
 #include "iassistant.h"
-#include <ktexteditor/view.h>
-#include <ktexteditor/document.h>
 #include <kaction.h>
 #include <QMetaType>
 
@@ -28,6 +26,7 @@ Q_DECLARE_METATYPE(KSharedPtr<IAssistantAction>)
 
 KAction* KDevelop::IAssistantAction::toKAction() const {
     KAction* ret = new KAction(KIcon(icon()), description(), 0);
+    ret->setToolTip(toolTip());
     qRegisterMetaType<KSharedPtr<IAssistantAction> >("KSharedPtr<IAssistantAction>()");
     
     //Add the data as a KSharedPtr to the action, so this assistant stays alive at least as long as the KAction
@@ -54,10 +53,6 @@ QString KDevelop::IAssistantAction::toolTip() const {
     return QString();
 }
 
-unsigned int KDevelop::IAssistantAction::flags() const {
-    return NoFlag;
-}
-
 KDevelop::IAssistant::IAssistant() : KSharedObject(*(QObject*)this) {
 }
 
@@ -71,7 +66,6 @@ QString KDevelop::IAssistant::title() const {
 }
 
 void KDevelop::IAssistant::doHide() {
-    kDebug() << "hiding";
     emit hide();
 }
 
@@ -87,36 +81,6 @@ void KDevelop::IAssistant::clearActions() {
     m_actions.clear();
 }
 
-KTextEditor::View* KDevelop::ITextAssistant::view() const {
-  return m_view;
-}
-
-KTextEditor::Cursor KDevelop::ITextAssistant::invocationCursor() const {
-  return m_invocationCursor;
-}
-
-KDevelop::ITextAssistant::ITextAssistant(KTextEditor::View* view) {
-  m_view = view;
-  connect(view, SIGNAL(cursorPositionChanged(KTextEditor::View*,KTextEditor::Cursor)), SLOT(cursorPositionChanged(KTextEditor::View*,KTextEditor::Cursor)));
-  connect(view->document(), SIGNAL(textInserted(KTextEditor::Document*,KTextEditor::Range)), SLOT(textInserted(KTextEditor::Document*,KTextEditor::Range)));
-  m_invocationCursor = view->cursorPosition();
-}
-
-ITextAssistant::~ITextAssistant()
-{
-
-}
-
-void KDevelop::ITextAssistant::textInserted(KTextEditor::Document* document, KTextEditor::Range range) {
-    if(document->text(range).contains("\n"))
-        emit hide();
-}
-
-void KDevelop::ITextAssistant::cursorPositionChanged(KTextEditor::View* /*view*/, KTextEditor::Cursor cursor) {
-  if(abs((m_invocationCursor - cursor).line()) > 2)
-    emit hide();
-}
-
 QString KDevelop::DummyAssistantAction::description() const {
     return m_description;
 }
diff --git a/interfaces/iassistant.h b/interfaces/iassistant.h
index 2887d20..8b0d6d5 100644
--- a/interfaces/iassistant.h
+++ b/interfaces/iassistant.h
@@ -22,16 +22,11 @@
 #include <QtCore/QPointer>
 #include <QtGui/QIcon>
 #include <KDE/KSharedPtr>
-#include <ktexteditor/cursor.h>
 #include "interfacesexport.h"
 #include <util/ksharedobject.h>
 
 class KAction;
 
-namespace KTextEditor {
-class View;
-class Cursor;
-}
 namespace KDevelop {
 
 ///Represents a single assistant action.
@@ -59,16 +54,7 @@ class KDEVPLATFORMINTERFACES_EXPORT IAssistantAction : public QObject, public KS
         ///May return an icon for this action
         ///The default implementation returns an invalid icon, which means that no icon is shown
         virtual QIcon icon() const;
-        
-        enum Flags {
-            NoFlag = 0,
-            OwnLineFlag //If this flag is given, the action is shown in an own line. This is useful when the description tends to be very long.
-        };
-        
-        ///May return any or'ed combination of Flags
-        ///The default-implementation returns NoFlag
-        virtual uint flags() const;
-        
+
     public Q_SLOTS:
         ///Execute this action
         virtual void execute() = 0;
@@ -122,32 +108,6 @@ class KDEVPLATFORMINTERFACES_EXPORT IAssistant : public QObject, public KSharedO
         QList<IAssistantAction::Ptr> m_actions;
 };
 
-///A helper assistant base class that binds itself to a view, and hides itself as soon as
-///the cursor was moved too far away from the invocation position, or a newline was inserted.
-class KDEVPLATFORMINTERFACES_EXPORT ITextAssistant : public IAssistant
-{
-  Q_OBJECT
-public:
-  ITextAssistant(KTextEditor::View* view);
-  ~ITextAssistant();
-  
-  ///@return The view this text-assistant was created with. May be zero if it was deleted already.
-  KTextEditor::View* view() const;
-  ///Position where the cursor was when this assistant was created
-  KTextEditor::Cursor invocationCursor() const;
-private Q_SLOTS:
-  //This function checks whether the cursor was moved away by more than 2 lines from the initial position, and hides the assistant if so.
-  //Override it to change this behavior.
-  virtual void cursorPositionChanged(KTextEditor::View*,KTextEditor::Cursor);
-  //This function checks whether a newline was inserted, and hides the assistant if so.
-  //Override it to change this behavior.
-  virtual void textInserted(KTextEditor::Document*,KTextEditor::Range);
-  
-private:
-  QPointer<KTextEditor::View> m_view;
-  KTextEditor::Cursor m_invocationCursor;
-};
-
 }
 
 #endif // KDEVELOP_IASSISTANT_H
diff --git a/shell/assistantpopup.cpp b/shell/assistantpopup.cpp
index 477678f..118541e 100644
--- a/shell/assistantpopup.cpp
+++ b/shell/assistantpopup.cpp
@@ -21,139 +21,50 @@
 #include <QToolButton>
 #include <QLabel>
 #include <klocalizedstring.h>
+#include <KAction>
 
 void AssistantPopup::updateActions() {
-    setUpdatesEnabled(false);
-    
-    setFrameStyle(QFrame::Panel);
-    
-//     foreach(QObject* child, children())
-//         delete child;
-
-    QWidget* parent = qobject_cast<QWidget*>(this->parent());
-
-    setGeometry(parent->width() / 6, parent->height() - 200, (parent->width() / 6) * 4, 200);
-    QVBoxLayout* layout = new QVBoxLayout(this);
-    QString title = m_assistant->title();
-    if(!title.isEmpty()) {
-        QLabel* l = new QLabel(title);
-        l->setWordWrap(true);
-        layout->addWidget(l);
+    m_assistantActions = m_assistant->actions();
+    if (!m_assistant->title().isEmpty()) {
+        QLabel* title = new QLabel("<b>" + m_assistant->title() + ":<b>");
+        title->setTextFormat(Qt::RichText);
+        addWidget(title);
     }
-    
-    m_actions = m_assistant->actions();
-
-    //Add widgets that need to be vertical
-    foreach(KDevelop::IAssistantAction::Ptr action, m_actions)
-        if(action->flags() & KDevelop::IAssistantAction::OwnLineFlag)
-            layout->addWidget(widgetForAction(action));
-    
-    QHBoxLayout* hLayout = new QHBoxLayout;
-    
-    //Now add horizontally aligned actions
-    foreach(KDevelop::IAssistantAction::Ptr action, m_actions)
-        if(!(action->flags() & KDevelop::IAssistantAction::OwnLineFlag))
-            hLayout->addWidget(widgetForAction(action));
-    
-    if(hLayout->count() == 0) {
-        delete hLayout;
-        layout->addWidget(widgetForAction(KDevelop::IAssistantAction::Ptr()));
-    } else{
-        hLayout->addWidget(widgetForAction(KDevelop::IAssistantAction::Ptr()));
-        layout->addLayout(hLayout);
-    }
-    QSize hint = sizeHint();
-    
-    resize(hint);
-    
-    move((parent->width() - hint.width())/2, parent->height() - hint.height());
-    
-    setUpdatesEnabled(true);
+    foreach(KDevelop::IAssistantAction::Ptr action, m_assistantActions)
+        addWidget(widgetForAction(action));
+    addSeparator();
+    addWidget(widgetForAction(KDevelop::IAssistantAction::Ptr()));
+    resize(sizeHint());
 }
 
-AssistantPopup::AssistantPopup(QWidget* parent, KDevelop::IAssistant::Ptr assistant) : QFrame(parent), m_assistant(assistant) {
+AssistantPopup::AssistantPopup(QWidget* parent, KDevelop::IAssistant::Ptr assistant) : QToolBar(parent), m_assistant(assistant) {
     Q_ASSERT(assistant);
-    m_normalPalette = palette();
-    
     setAutoFillBackground(true);
-
-    updateActions();
-}
-
-void AssistantPopup::assistantActionsChanged() {
     updateActions();
 }
 
 QWidget* AssistantPopup::widgetForAction(KDevelop::IAssistantAction::Ptr action) {
-    int index = m_actions.indexOf(action);
-    QFrame* containerWidget = new QFrame;
-    containerWidget->setAutoFillBackground(true);
-    containerWidget->setPalette(m_normalPalette);
-//     containerWidget->setFrameStyle(QFrame::Panel);
-    QHBoxLayout* layout = new QHBoxLayout(containerWidget);
-    
-    QString desc;
-    if(action)
-        desc = action->description();
-    else
-        desc = i18n("Hide");
-    
-    QLabel* label = new QLabel(desc);
-    label->setWordWrap(true);
-    label->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
     QToolButton* button = new QToolButton;
-    button->setText(QString("%1").arg(index+1));
-
+    KAction* realAction;
+    QString buttonText;
+    int index = m_assistantActions.indexOf(action);
     if(index == -1) {
-        kDebug() << "connecting with doHide";
-        connect(button, SIGNAL(clicked(bool)), SLOT(executeHideAction()));
+        realAction = new KAction(button);
+        buttonText = "&0 - " + i18n("Hide");
+    }
+    else {
+        realAction = action->toKAction();
+        buttonText = QString("&%1 - ").arg(index+1) + action->description();
     }
-    if(index == 0)
-        connect(button, SIGNAL(clicked(bool)), SLOT(executeAction1()));
-    if(index == 1)
-        connect(button, SIGNAL(clicked(bool)), SLOT(executeAction2()));
-    if(index == 2)
-        connect(button, SIGNAL(clicked(bool)), SLOT(executeAction3()));
-    if(index == 3)
-        connect(button, SIGNAL(clicked(bool)), SLOT(executeAction4()));
-    
-    layout->addWidget(button);
-    layout->addWidget(label);
-    
-    return containerWidget;
+    realAction->setParent(button);
+    connect(realAction, SIGNAL(triggered(bool)), SLOT(executeHideAction()));
+    button->setDefaultAction(realAction);
+    button->setText(buttonText);
+    return button;
 }
 
 void AssistantPopup::executeHideAction() {
-    KDevelop::IAssistant::Ptr assistant = m_assistant;
-    assistant->doHide();
-}
-
-void AssistantPopup::executeAction(int number) {
-    Q_ASSERT(m_assistant);
-    //Copy the assistant, we may get destroyed during the execute() call
-    KDevelop::IAssistant::Ptr assistant = m_assistant;
-    
-    QList<KDevelop::IAssistantAction::Ptr> actions = assistant->actions();
-    if(actions.size() > number)
-        actions[number]->execute();
-    
-    assistant->doHide();
-}
-
-void AssistantPopup::executeAction1() {
-    executeAction(0);
-}
-
-void AssistantPopup::executeAction2() {
-    executeAction(1);
-}
-
-void AssistantPopup::executeAction3() {
-    executeAction(2);
-}
-
-void AssistantPopup::executeAction4() {
-    executeAction(3);
+    m_assistant->doHide();
 }
 
 KSharedPtr< KDevelop::IAssistant > AssistantPopup::assistant() const {
diff --git a/shell/assistantpopup.h b/shell/assistantpopup.h
index 37de2c5..20a3b24 100644
--- a/shell/assistantpopup.h
+++ b/shell/assistantpopup.h
@@ -19,32 +19,24 @@
 #ifndef ASSISTANTPOPUP_H
 #define ASSISTANTPOPUP_H
 
-#include <QFrame>
+#include <QToolBar>
 #include <interfaces/iassistant.h>
 #include <ksharedptr.h>
 
 
-class AssistantPopup : public QFrame
+class AssistantPopup : public QToolBar
 {
-    Q_OBJECT
+Q_OBJECT
 public:
     typedef KSharedPtr<AssistantPopup> Ptr;
     AssistantPopup(QWidget* parent, KDevelop::IAssistant::Ptr assistant);
     KDevelop::IAssistant::Ptr assistant() const;
-    public slots:
-    void executeAction1();
-    void executeAction2();
-    void executeAction3();
-    void executeAction4();
     void executeHideAction();
-    void assistantActionsChanged();
-    private:
-        void executeAction(int number);
-        void updateActions();
-        QWidget* widgetForAction(KDevelop::IAssistantAction::Ptr action);
-        KDevelop::IAssistant::Ptr m_assistant;
-        QList<KDevelop::IAssistantAction::Ptr> m_actions;
-        QPalette m_normalPalette;
+private:
+    void updateActions();
+    QWidget* widgetForAction(KDevelop::IAssistantAction::Ptr action);
+    KDevelop::IAssistant::Ptr m_assistant;
+    QList<KDevelop::IAssistantAction::Ptr> m_assistantActions;
 };
 
 #endif // ASSISTANTPOPUP_H
diff --git a/shell/uicontroller.cpp b/shell/uicontroller.cpp
index aae941f..30e6c3a 100644
--- a/shell/uicontroller.cpp
+++ b/shell/uicontroller.cpp
@@ -180,33 +180,6 @@ UiController::UiController(Core *core)
     connect( QApplication::instance(),
              SIGNAL( focusChanged( QWidget*, QWidget* ) ),
             this, SLOT( widgetChanged( QWidget*, QWidget* ) ) );
-
-    KActionCollection * actions = defaultMainWindow()->actionCollection();
-
-    KAction* assistantaction1 = actions->addAction("assistant_action_1");
-    assistantaction1->setText( i18n("&Assistant Action 1") );
-    assistantaction1->setShortcut( Qt::ALT | Qt::Key_1 );
-    connect(assistantaction1, SIGNAL(triggered(bool)), this, SLOT(assistantAction1()));
-
-    KAction* assistantaction2 = actions->addAction("assistant_action_2");
-    assistantaction2->setText( i18n("&Assistant Action 2") );
-    assistantaction2->setShortcut( Qt::ALT | Qt::Key_2 );
-    connect(assistantaction2, SIGNAL(triggered(bool)), this, SLOT(assistantAction2(bool)));
-
-    KAction* assistantaction3 = actions->addAction("assistant_action_3");
-    assistantaction3->setText( i18n("&Assistant Action 3") );
-    assistantaction3->setShortcut( Qt::ALT | Qt::Key_3 );
-    connect(assistantaction3, SIGNAL(triggered(bool)), this, SLOT(assistantAction3(bool)));
-
-    KAction* assistantaction4 = actions->addAction("assistant_action_4");
-    assistantaction4->setText( i18n("&Assistant Action 4") );
-    assistantaction4->setShortcut( Qt::ALT | Qt::Key_4 );
-    connect(assistantaction4, SIGNAL(triggered(bool)), this, SLOT(assistantAction4(bool)));
-
-    KAction* assistantactionhide = actions->addAction("assistant_action_hide");
-    assistantactionhide->setText( i18n("&Hide Assistant") );
-    assistantactionhide->setShortcut( Qt::ALT | Qt::Key_0 );
-    connect(assistantactionhide, SIGNAL(triggered(bool)), this, SLOT(assistantHide()));
 }
 
 UiController::~UiController()
@@ -627,6 +600,27 @@ void UiController::hideAssistant(const KDevelop::IAssistant::Ptr& assistant)
     }
 }
 
+QPoint getAssistantDisplayPoint(const AssistantPopup* popup, const KTextEditor::View* view)
+{
+    const int PADDING = 4; //add a little space between the current line and the popup
+    KTextEditor::Cursor cursor = view->cursorPosition();
+    KTextEditor::Cursor cursorNextLine = view->cursorPosition();
+    cursorNextLine.setLine(cursorNextLine.line()+1);
+    //this is ugly... any better way to get lineheight?
+    int lineHeight = view->cursorToCoordinate(cursorNextLine).y() - view->cursorToCoordinate(cursor).y() + PADDING;
+    //Default position is right below the current line
+    QPoint pos = view->cursorToCoordinate(cursor);
+    pos.ry() += lineHeight;
+    //Make sure the popup isn't too far down, or place above current line
+    if (pos.y() + popup->height() > view->height())
+        pos.ry() -= lineHeight + popup->height() + PADDING;
+    //Make sure the popup isn't too far right, or put it's right corner at the edge
+    if (pos.x() + popup->width() > view->width())
+        pos.rx() = view->width() - popup->width();
+
+    return pos;
+}
+
 void UiController::popUpAssistant(const KDevelop::IAssistant::Ptr& assistant)
 {
     assistantHide();
@@ -644,7 +638,11 @@ void UiController::popUpAssistant(const KDevelop::IAssistant::Ptr& assistant)
 
         d->currentShownAssistant = new AssistantPopup(textWidget->editorView(), assistant);
         if(assistant->actions().count())
+        {
+            QPoint pos = getAssistantDisplayPoint(d->currentShownAssistant, textWidget->editorView());
+            d->currentShownAssistant->move(pos);
             d->currentShownAssistant->show();
+        }
 
         connect(assistant.data(), SIGNAL(hide()), SLOT(assistantHide()), Qt::DirectConnection);
         connect(assistant.data(), SIGNAL(actionsChanged()), SLOT(assistantActionsChanged()), Qt::DirectConnection);
@@ -656,25 +654,6 @@ const QMap< IToolViewFactory*, Sublime::ToolDocument* >& UiController::factoryDo
     return d->factoryDocuments;
 }
 
-void UiController::assistantAction1() {
-    if(d->currentShownAssistant)
-        d->currentShownAssistant->executeAction1();
-}
-
-void UiController::assistantAction2(bool) {
-    if(d->currentShownAssistant)
-        d->currentShownAssistant->executeAction2();
-}
-
-void UiController::assistantAction3(bool) {
-    if(d->currentShownAssistant)
-        d->currentShownAssistant->executeAction3();
-}
-void UiController::assistantAction4(bool) {
-    if(d->currentShownAssistant)
-        d->currentShownAssistant->executeAction4();
-}
-
 void UiController::assistantHide() {
     if(d->currentShownAssistant)
         hideAssistant(d->currentShownAssistant->assistant());
@@ -685,7 +664,6 @@ void UiController::assistantActionsChanged() {
         popUpAssistant(d->currentShownAssistant->assistant());
 }
 
-
 }
 
 
diff --git a/shell/uicontroller.h b/shell/uicontroller.h
index b4d0008..02ebd5c 100644
--- a/shell/uicontroller.h
+++ b/shell/uicontroller.h
@@ -111,10 +111,6 @@ public Q_SLOTS:
     void raiseToolView(Sublime::View * view);
 
 private Q_SLOTS:
-    void assistantAction1();
-    void assistantAction2(bool);
-    void assistantAction3(bool);
-    void assistantAction4(bool);
     void assistantHide();
     void assistantActionsChanged();
 
