Commit 35a7a587 authored by Robert Knight's avatar Robert Knight

Possibly controversial. Disabled F1 shortcut for handbook in Konsole because...

Possibly controversial.  Disabled F1 shortcut for handbook in Konsole because it interferes with terminal programs which need this key.  Will review following beta feedback.  Remove un-used includes and re-enable DBus adaptor for Session.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=690414
parent 2532b5d1
macro_optional_find_package(XKB)
macro_bool_to_01(X11_Xrender_FOUND HAVE_XRENDER)
if (CMAKE_SYSTEM_NAME MATCHES Linux)
set (HAVE_PROC_CWD 1)
endif (CMAKE_SYSTEM_NAME MATCHES Linux)
configure_file (config-konsole.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konsole.h )
OPTION(KONSOLE_GENERATE_LINEFONT "Konsole: regenerate LineFont file" OFF)
configure_file (config-konsole.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konsole.h )
########### next target ###############
### Font Embedder
set(fontembedder_SRCS fontembedder.cpp )
kde4_add_executable(fontembedder ${fontembedder_SRCS})
target_link_libraries(fontembedder ${KDE4_KIO_LIBS} )
#qt4_add_dbus_adaptor( konsoleadaptors_SRCS org.kde.konsole.Konsole.xml konsole.h Konsole )
#qt4_add_dbus_adaptor( konsoleadaptors_SRCS org.kde.konsole.KonsoleScripting.xml konsole.h Konsole )
#qt4_add_dbus_adaptor( sessionadaptors_SRCS org.kde.konsole.Session.xml Session.h Session )
#qt4_add_dbus_adaptor( sessionadaptors_SRCS org.kde.konsole.SessionScripting.xml Session.h Session )
### Line graphics font
OPTION(KONSOLE_GENERATE_LINEFONT "Konsole: regenerate LineFont file" OFF)
if(KONSOLE_GENERATE_LINEFONT)
add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/LineFont.h COMMAND ${CMAKE_CURRENT_BINARY_DIR}/fontembedder ARGS ${CMAKE_SOURCE_DIR}/LineFont.src DEPENDS ${CMAKE_SOURCE_DIR}/LineFont.src )
endif(KONSOLE_GENERATE_LINEFONT)
########### next target ###############
#set(konsole_KDEINIT_SRCS
# ${konsoleadaptors_SRCS}
# ${sessionadaptors_SRCS}
# Pty.cpp
# BlockArray.cpp
# main.cpp
# konsole.cpp
# schema.cpp
# Session.cpp
# TerminalDisplay.cpp
# Vt102Emulation.cpp
# Screen.cpp
# Emulation.cpp
# History.cpp
# keytrans.cpp
# konsole_wcwidth.cpp
# konsolebookmarkhandler.cpp
# zmodem_dialog.cpp
# printsettings.cpp
# TerminalCharacterDecoder.cpp
# SessionManager.cpp
# ViewSplitter.cpp
# ViewContainer.cpp
# NavigationItem.cpp )
### Konsole Application
qt4_add_dbus_adaptor( sessionadaptors_SRCS org.kde.konsole.Session.xml Session.h Konsole::Session )
set(konsole_KDEINIT_SRCS
${sessionadaptors_SRCS}
......@@ -122,6 +91,9 @@ install(TARGETS kdeinit_konsole DESTINATION ${LIB_INSTALL_DIR} )
target_link_libraries( konsole kdeinit_konsole )
install(TARGETS konsole DESTINATION ${BIN_INSTALL_DIR})
### konsoleprofile command-line tool
install(FILES konsoleprofile PERMISSIONS OWNER_READ
OWNER_WRITE
OWNER_EXECUTE
......@@ -129,10 +101,12 @@ install(FILES konsoleprofile PERMISSIONS OWNER_READ
GROUP_READ
WORLD_READ
WORLD_EXECUTE DESTINATION ${BIN_INSTALL_DIR})
########### next target ###############
### Embedded Konsole KPart
set(konsolepart_PART_SRCS
#${sessionadaptors_SRCS}
${sessionadaptors_SRCS}
BlockArray.cpp
BookmarkHandler.cpp
ColorScheme.cpp
......@@ -173,8 +147,6 @@ set(konsolepart_PART_SRCS
konsole_wcwidth.cpp
)
kde4_add_plugin(konsolepart WITH_PREFIX ${konsolepart_PART_SRCS})
set_target_properties(konsolepart PROPERTIES DEFINE_SYMBOL KONSOLE_PART)
......@@ -187,15 +159,12 @@ endif(X11_XTest_LIB)
install(TARGETS konsolepart DESTINATION ${PLUGIN_INSTALL_DIR} )
########### next target ###############
### KWriteD Daemon
set(kded_kwrited_PART_SRCS kwrited.cpp )
kde4_add_plugin(kded_kwrited ${kded_kwrited_PART_SRCS})
target_link_libraries(kded_kwrited ${KDE4_KDE3SUPPORT_LIBS})
install(TARGETS kded_kwrited DESTINATION ${PLUGIN_INSTALL_DIR} )
......
......@@ -77,6 +77,20 @@ MainWindow::MainWindow()
// create menus
createGUI();
// replace standard shortcuts which cannot be used in a terminal
// (as they are reserved for use by terminal programs)
correctShortcuts();
}
void MainWindow::correctShortcuts()
{
// replace F1 shortcut for help contents
QAction* helpAction = actionCollection()->action("help_contents");
Q_ASSERT( helpAction );
helpAction->setShortcut( QKeySequence() );
}
void MainWindow::setDefaultProfile(const QString& key)
......@@ -98,7 +112,7 @@ void MainWindow::activeViewChanged(SessionController* controller)
if ( _pluggedController == controller )
return;
// associated bookmark menu with current session
// associate bookmark menu with current session
bookmarkHandler()->setActiveView(controller);
disconnect( bookmarkHandler() , SIGNAL(openUrl(const KUrl&)) , 0 , 0 );
connect( bookmarkHandler() , SIGNAL(openUrl(const KUrl&)) , controller ,
......
......@@ -134,10 +134,11 @@ class MainWindow : public KXmlGuiWindow
void viewFullScreen(bool fullScreen);
private:
void correctShortcuts();
void setupActions();
void setupWidgets();
QString activeSessionDir() const;
private:
ViewManager* _viewManager;
BookmarkHandler* _bookmarkHandler;
......
......@@ -49,15 +49,13 @@
// Konsole
#include <config-konsole.h>
//TODO - Re-add adaptors
//#include "sessionadaptor.h"
//#include "sessionscriptingadaptor.h"
#include <sessionadaptor.h>
#include "Pty.h"
#include "TerminalDisplay.h"
#include "Vt102Emulation.h"
#include "ZModemDialog.h"
using namespace Konsole;
int Session::lastSessionId = 0;
......@@ -81,12 +79,9 @@ Session::Session() :
, _hasDarkBackground(false)
{
//prepare DBus communication
//TODO - Re-add Session adaptor
// TODO
// numeric session identifier exposed via DBus isn't very user-friendly, but is this an issue?
new SessionAdaptor(this);
_sessionId = ++lastSessionId;
//QDBusConnection::sessionBus().registerObject(QLatin1String("/Sessions/session")+QString::number(_sessionId), this);
QDBusConnection::sessionBus().registerObject(QLatin1String("/Sessions/")+QString::number(_sessionId), this);
//create teletype for I/O with shell process
_shellProcess = new Pty();
......
......@@ -23,15 +23,6 @@
// Own
#include "TerminalDisplay.h"
// System
#include <assert.h>
#include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
// Qt
#include <QtGui/QApplication>
#include <QtGui/QBoxLayout>
......@@ -44,7 +35,6 @@
#include <QtGui/QLayout>
#include <QtGui/QPainter>
#include <QtGui/QPixmap>
#include <QtGui/QLayoutItem>
#include <QtGui/QScrollBar>
#include <QtGui/QStyle>
#include <QtCore/QTimer>
......@@ -751,7 +741,7 @@ void TerminalDisplay::scrollImage(int lines , const QRect& screenWindowRegion)
Q_ASSERT( (char*)lastCharPos + bytesToMove <
(char*)(_image + (this->_lines * this->_columns)) );
assert( (lines*this->_columns) < _imageSize );
Q_ASSERT( (lines*this->_columns) < _imageSize );
//scroll internal image down
memmove( firstCharPos , lastCharPos , bytesToMove );
......@@ -819,8 +809,8 @@ void TerminalDisplay::updateImage()
if (!_image)
updateImageSize(); // Create _image
assert( this->_usedLines <= this->_lines );
assert( this->_usedColumns <= this->_columns );
Q_ASSERT( this->_usedLines <= this->_lines );
Q_ASSERT( this->_usedColumns <= this->_columns );
int y,x,len;
......@@ -2417,9 +2407,9 @@ bool TerminalDisplay::event( QEvent *e )
// Override any of the following shortcuts because
// they are needed by the terminal
// (this list is taken from the QLineEdit::event() code)
switch ( keyCode )
{
// list is taken from the QLineEdit::event() code
case Qt::Key_Tab:
case Qt::Key_Delete:
case Qt::Key_Home:
......@@ -2544,8 +2534,8 @@ void TerminalDisplay::makeImage()
// confirm that array will be of non-zero size, since the painting code
// assumes a non-zero array length
assert( _lines > 0 && _columns > 0 );
assert( _usedLines <= _lines && _usedColumns <= _columns );
Q_ASSERT( _lines > 0 && _columns > 0 );
Q_ASSERT( _usedLines <= _lines && _usedColumns <= _columns );
_imageSize=_lines*_columns;
......
......@@ -2,22 +2,5 @@
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.kde.konsole.Session">
<method name="closeSession">
<arg type="b" direction="out"/>
</method>
<method name="sendSignal">
<arg type="b" direction="out"/>
<arg name="signal" type="b" direction="in"/>
</method>
<method name="clearHistory"/>
<property name="sessionName" type="s" access="read"/>
<property name="sessionPid" type="i" access="read"/>
<property name="schema" type="s" access="readwrite"/>
<property name="encoding" type="s" access="readwrite"/>
<property name="keytab" type="s" access="readwrite"/>
<property name="font" type="s" access="readwrite"/>
<property name="size" type="(ii)" access="readwrite">
<annotation name="com.trolltech.QtDBus.QtTypeName" value="QSize"/>
</property>
</interface>
</node>
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