summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp21
-rw-r--r--noncore/apps/opie-console/mainwindow.h2
-rw-r--r--noncore/apps/opie-console/terminalwidget.cpp0
3 files changed, 23 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index abcdb84..a6fc30b 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -49,12 +49,13 @@ MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(
m_scriptsData.setAutoDelete(TRUE);
initUI();
populateProfiles();
populateScripts();
}
+
void MainWindow::initUI() {
setToolBarsMovable( FALSE );
/* tool bar for the menu */
m_tool = new QToolBar( this );
m_tool->setHorizontalStretchable( TRUE );
@@ -116,18 +117,25 @@ void MainWindow::initUI() {
m_disconnect->addTo( m_console );
connect(m_disconnect, SIGNAL(activated() ),
this, SLOT(slotDisconnect() ) );
m_console->insertSeparator();
+ m_quickLaunch = new QAction( tr("QuickLaunch"), Resource::loadPixmap("console/konsole_mini"), QString::null, 0, this, 0 );
+ m_quickLaunch->addTo( m_icons );
+ connect( m_quickLaunch, SIGNAL( activated() ),
+ this, SLOT( slotQuickLaunch() ) );
+
m_transfer = new QAction( tr("Transfer file..."), Resource::loadPixmap("pass") , QString::null,
0, this, 0 );
m_transfer->addTo( m_console );
connect(m_transfer, SIGNAL(activated() ),
this, SLOT(slotTransfer() ) );
+
+
/*
* immediate change of line wrap policy
*/
m_isWrapped = false;
m_wrap = new QAction( tr("Line wrap"), Resource::loadPixmap( "linewrap" ), QString::null, 0, this, 0 );
m_wrap->addTo( m_console );
@@ -399,12 +407,22 @@ void MainWindow::slotTerminate() {
currentSession()->layer()->close();
slotClose();
/* FIXME move to the next session */
}
+void MainWindow::slotQuickLaunch() {
+ Profile prof = manager()->profile( "default" );
+ if ( prof.name() == "default" ) {
+ create( prof );
+ } else {
+ QMessageBox::warning(this, tr("Failure"),tr("please configure one profile named \"default\""));
+ }
+
+}
+
void MainWindow::slotConfigure() {
ConfigDialog conf( manager()->all(), factory() );
conf.showMaximized();
int ret = conf.exec();
@@ -456,12 +474,15 @@ void MainWindow::slotClose() {
* and then we will make a profile
*/
void MainWindow::slotProfile( int id) {
Profile prof = manager()->profile( m_sessionsPop->text( id) );
create( prof );
}
+
+
+
void MainWindow::create( const Profile& prof ) {
if(m_curSession)
if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide();
Session *ses = manager()->fromProfile( prof, tabWidget() );
diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h
index 0fac38b..86939c1 100644
--- a/noncore/apps/opie-console/mainwindow.h
+++ b/noncore/apps/opie-console/mainwindow.h
@@ -64,12 +64,13 @@ private slots:
void slotOpenKeb(bool);
void slotOpenButtons(bool);
void slotRecordScript();
void slotSaveScript();
void slotRunScript(int);
void slotFullscreen();
+ void slotQuickLaunch();
void slotWrap();
void slotSessionChanged( Session* );
void slotKeyReceived(FKey, ushort, ushort, bool);
void slotSaveHistory();
/* what could these both slot do? */
@@ -110,12 +111,13 @@ private:
QPopupMenu* m_console;
QPopupMenu* m_sessionsPop;
QPopupMenu* m_scriptsPop;
QPopupMenu* m_scripts;
QAction* m_connect;
QAction* m_disconnect;
+ QAction* m_quickLaunch;
QAction* m_terminate;
QAction* m_transfer;
QAction* m_setProfiles;
QAction* m_openKeys;
QAction* m_openButtons;
QAction* m_recordScript;
diff --git a/noncore/apps/opie-console/terminalwidget.cpp b/noncore/apps/opie-console/terminalwidget.cpp
index a8cee93..70f7c9b 100644
--- a/noncore/apps/opie-console/terminalwidget.cpp
+++ b/noncore/apps/opie-console/terminalwidget.cpp