Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
790822f1
Commit
790822f1
authored
Jun 10, 2007
by
Robert Knight
Browse files
Use correct parent widget for part. Update TODO.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=673742
parent
70bd184f
Changes
5
Hide whitespace changes
Inline
Side-by-side
TODO
View file @
790822f1
...
...
@@ -29,16 +29,17 @@ The KDE 4.0 TODO List:
( this is the list which maps key sequences pressed by
the user to the corresponding text sequences
which are send to the terminal )
- Allow the window title set by the terminal program
to be used in the title bar of the Konsole window,
and/or the tab for the relevant terminal session.
- Get the Konsole part working properly in other
major KDE programs, such as Dolphin,
KDevelop, Kate etc.
Make as much of the functionality from the main
program available in the part as possible.
Essential: Make the part function and be stable in
Dolphin, KDevelop and Kate
Nice to have: Make as much of the functionality from the main
program available in the part as possible.
- Implement changing of the Konsole window size by
...
...
@@ -49,20 +50,14 @@ The KDE 4.0 TODO List:
the term "DCOP" for ideas on what users would like
to be able to do using Konsole's scripting facilities.
- Changing of profile
settings, changing of profile
using
- Changing of profile using
a command-line tool
( because going to the GUI to change a profile setting
is slower for advanced users since it requires a switch from
the keyboard to the mouse. Advanced users may also
appreciate the ability to script profile changes )
- Better documentation for shortcuts to move between views
(Shift+<Arrows> and Shift+Tab)
== ESSENTIAL TWEAKS ==
- When splitting the view, avoid scrolling existing views.
- More intelligent tab title format which can adjust its output
...
...
@@ -175,6 +170,13 @@ behaviour in KDE 3.
=== DONE ===
- Changing of profile settings via a command-line tool
( konsoleprofile )
- Allow the window title set by the terminal program
to be used in the title bar of the Konsole window,
and/or the tab for the relevant terminal session.
- When new output is added to a session, views should avoid
scrolling if possible unless they are tracking the output
or if the lines that the view was showing have been removed
...
...
src/Part.cpp
View file @
790822f1
...
...
@@ -50,15 +50,15 @@ extern "C"
using
namespace
Konsole
;
KParts
::
Part
*
PartFactory
::
createPartObject
(
QWidget
*
/*
parentWidget
*/
,
KParts
::
Part
*
PartFactory
::
createPartObject
(
QWidget
*
parentWidget
,
QObject
*
parent
,
const
char
*
/*classname*/
,
const
QStringList
&
/*args*/
)
{
return
new
Part
(
parent
);
return
new
Part
(
parentWidget
,
parent
);
}
Part
::
Part
(
QObject
*
parent
)
Part
::
Part
(
QWidget
*
parentWidget
,
QObject
*
parent
)
:
KParts
::
ReadOnlyPart
(
parent
)
,
_viewManager
(
0
)
,
_pluggedController
(
0
)
...
...
@@ -79,6 +79,10 @@ Part::Part(QObject* parent)
connect
(
_viewManager
,
SIGNAL
(
activeViewChanged
(
SessionController
*
))
,
this
,
SLOT
(
activeViewChanged
(
SessionController
*
))
);
connect
(
_viewManager
,
SIGNAL
(
empty
())
,
this
,
SLOT
(
debugFinished
())
);
_viewManager
->
widget
()
->
setParent
(
parentWidget
);
setWidget
(
_viewManager
->
widget
());
// create basic session
...
...
@@ -91,14 +95,29 @@ bool Part::openFile()
{
return
false
;
}
void
Part
::
debugFinished
()
{
qDebug
()
<<
__FUNCTION__
;
}
Session
*
Part
::
activeSession
()
const
{
// for now, just return the first available session
QList
<
Session
*>
list
=
SessionManager
::
instance
()
->
sessions
();
if
(
_pluggedController
)
{
qDebug
()
<<
__FUNCTION__
<<
" - have plugged controller"
;
Q_ASSERT
(
!
list
.
isEmpty
()
);
return
_pluggedController
->
session
();
}
else
{
// for now, just return the first available session
QList
<
Session
*>
list
=
SessionManager
::
instance
()
->
sessions
();
return
list
.
first
();
qDebug
()
<<
__FUNCTION__
<<
" - no plugged controller, selectin first from"
<<
list
.
count
()
<<
"sessions"
;
Q_ASSERT
(
!
list
.
isEmpty
()
);
return
list
.
first
();
}
}
void
Part
::
startProgram
(
const
QString
&
program
,
const
QStringList
&
arguments
)
...
...
src/Part.h
View file @
790822f1
...
...
@@ -57,7 +57,7 @@ Q_OBJECT
Q_INTERFACES
(
TerminalInterface
)
public:
/** Constructs a new Konsole part with the specified parent. */
Part
(
QObject
*
parent
=
0
);
Part
(
QWidget
*
parentWidget
,
QObject
*
parent
=
0
);
virtual
~
Part
();
/** Reimplemented from TerminalInterface. */
...
...
@@ -79,6 +79,8 @@ private slots:
Session
*
createSession
(
const
QString
&
key
);
void
activeViewChanged
(
SessionController
*
controller
);
void
debugFinished
();
private:
Session
*
activeSession
()
const
;
...
...
src/ViewManager.cpp
View file @
790822f1
...
...
@@ -248,16 +248,15 @@ void ViewManager::detachActiveView()
container
->
views
().
count
()
==
0
)
{
removeContainer
(
container
);
// this will need to be removed if Konsole is modified so the menu item to
// split the view is no longer one toggle-able item
//_splitViewAction->setChecked(false);
}
}
void
ViewManager
::
sessionFinished
()
{
// switch to the previous view before deleting the session views to prevent flicker
// occurring as a result of an interval between removing the active view and switching
// to the previous view
previousView
();
Session
*
session
=
qobject_cast
<
Session
*>
(
sender
());
...
...
@@ -440,7 +439,6 @@ void ViewManager::createView(Session* session)
// set initial size
// temporary default used for now
display
->
setSize
(
80
,
40
);
ViewProperties
*
properties
=
createController
(
session
,
display
);
...
...
src/ViewManager.h
View file @
790822f1
...
...
@@ -202,7 +202,7 @@ private:
SessionController
*
createController
(
Session
*
session
,
TerminalDisplay
*
display
);
private:
ViewSplitter
*
_viewSplitter
;
QPointer
<
ViewSplitter
>
_viewSplitter
;
QPointer
<
SessionController
>
_pluggedController
;
QHash
<
QPointer
<
TerminalDisplay
>
,
QPointer
<
Session
>
>
_sessionMap
;
KActionCollection
*
_actionCollection
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment