Commit f9e2b344 authored by Kurt Hindenburg's avatar Kurt Hindenburg
Browse files

Correct KPart issue where the wrong context menu was used and invalid menus were created.

BUG: 186745

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1017600
parent 163df682
......@@ -98,12 +98,10 @@ SessionController::SessionController(Session* session , TerminalDisplay* view, Q
Q_ASSERT( view );
// handle user interface related to session (menus etc.)
#ifdef KONSOLE_PART
if (isKonsolePart())
setXMLFile("konsole/partui.rc");
#else
else
setXMLFile("konsole/sessionui.rc");
#endif
setupActions();
actionCollection()->addAssociatedWidget(view);
......@@ -1109,6 +1107,15 @@ void SessionController::zmodemUpload()
}
}
bool SessionController::isKonsolePart() const
{
// Check to see if we are being called from Konsole or a KPart
if (QString(kapp->metaObject()->className()) == "Konsole::Application")
return false;
else
return true;
}
SessionTask::SessionTask(QObject* parent)
: QObject(parent)
, _autoDelete(false)
......
......@@ -213,6 +213,9 @@ private slots:
void zmodemDownload();
void zmodemUpload();
/* Returns true if called within a KPart; false if called within Konsole. */
bool isKonsolePart() const;
private:
// begins the search
// text - pattern to search for
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment