|
|
@ -17,7 +17,7 @@
|
|
|
|
#include "terminal_focus_watcher.h"
|
|
|
|
#include "terminal_focus_watcher.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include <tqobjectlist.h>
|
|
|
|
#include <tqobjectlist.h>
|
|
|
|
#include <clipboard.h>
|
|
|
|
#include <tqclipboard.h>
|
|
|
|
#include <tqtimer.h>
|
|
|
|
#include <tqtimer.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -56,10 +56,10 @@ void Session::slotFocusChanged()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (checkFocusWidget())
|
|
|
|
if (checkFocusWidget())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
base_widget->setFocusProxy(base_widget->focusWidget());
|
|
|
|
base_widget->setFocusProxy(base_widget->tqfocusWidget());
|
|
|
|
active_terminal = base_widget->focusWidget();
|
|
|
|
active_terminal = base_widget->tqfocusWidget();
|
|
|
|
int terminal_id = terminal_ids[base_widget->focusWidget()];
|
|
|
|
int terminal_id = terminal_ids[base_widget->tqfocusWidget()];
|
|
|
|
slotTitleChange(base_widget->focusWidget(),
|
|
|
|
slotTitleChange(base_widget->tqfocusWidget(),
|
|
|
|
terminals[terminal_id]->title());
|
|
|
|
terminals[terminal_id]->title());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -67,7 +67,7 @@ void Session::slotFocusChanged()
|
|
|
|
int Session::activeTerminalId()
|
|
|
|
int Session::activeTerminalId()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (checkFocusWidget())
|
|
|
|
if (checkFocusWidget())
|
|
|
|
return terminal_ids[base_widget->focusWidget()];
|
|
|
|
return terminal_ids[base_widget->tqfocusWidget()];
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -123,7 +123,7 @@ void Session::pasteClipboard()
|
|
|
|
void Session::pasteClipboard(int terminal_id)
|
|
|
|
void Session::pasteClipboard(int terminal_id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (terminal_parts[terminal_id])
|
|
|
|
if (terminal_parts[terminal_id])
|
|
|
|
terminal_parts[terminal_id]->sendInput(TQApplication::clipboard()->text(TQClipboard::Clipboard));
|
|
|
|
terminal_parts[terminal_id]->sendInput(TQApplication::tqclipboard()->text(TQClipboard::Clipboard));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Session::pasteSelection()
|
|
|
|
void Session::pasteSelection()
|
|
|
@ -138,7 +138,7 @@ void Session::pasteSelection()
|
|
|
|
void Session::pasteSelection(int terminal_id)
|
|
|
|
void Session::pasteSelection(int terminal_id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (terminal_parts[terminal_id])
|
|
|
|
if (terminal_parts[terminal_id])
|
|
|
|
terminal_parts[terminal_id]->sendInput(TQApplication::clipboard()->text(TQClipboard::Selection));
|
|
|
|
terminal_parts[terminal_id]->sendInput(TQApplication::tqclipboard()->text(TQClipboard::Selection));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Session::runCommand(const TQString& command)
|
|
|
|
void Session::runCommand(const TQString& command)
|
|
|
@ -323,7 +323,7 @@ void Session::split(TQWidget* active_terminal, Qt::Orientation o)
|
|
|
|
|
|
|
|
|
|
|
|
terminal->widget()->show();
|
|
|
|
terminal->widget()->show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// If the parent splitter of this terminal already has two children,
|
|
|
|
// If the parent splitter of this terminal already has two tqchildren,
|
|
|
|
// add a new splitter to it and reparent the terminal to the new
|
|
|
|
// add a new splitter to it and reparent the terminal to the new
|
|
|
|
// splitter.
|
|
|
|
// splitter.
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -403,7 +403,7 @@ void Session::slotLastTerminalClosed()
|
|
|
|
|
|
|
|
|
|
|
|
void Session::slotTitleChange(TQWidget* w, const TQString& title)
|
|
|
|
void Session::slotTitleChange(TQWidget* w, const TQString& title)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (w == base_widget->focusWidget())
|
|
|
|
if (w == base_widget->tqfocusWidget())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
session_title = title;
|
|
|
|
session_title = title;
|
|
|
|
emit titleChanged( session_title);
|
|
|
|
emit titleChanged( session_title);
|
|
|
@ -412,8 +412,8 @@ void Session::slotTitleChange(TQWidget* w, const TQString& title)
|
|
|
|
|
|
|
|
|
|
|
|
bool Session::checkFocusWidget()
|
|
|
|
bool Session::checkFocusWidget()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (base_widget->focusWidget()
|
|
|
|
if (base_widget->tqfocusWidget()
|
|
|
|
&& base_widget->focusWidget()->isA(TQCString("TEWidget")))
|
|
|
|
&& base_widget->tqfocusWidget()->isA(TQCString("TEWidget")))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|