author | harlekin <harlekin> | 2003-03-21 22:29:00 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-03-21 22:29:00 (UTC) |
commit | 43b0fded770624c907aae043e88449f80040d7df (patch) (unidiff) | |
tree | 37e92b5da66c34323a831586c21a9c23b0abe261 | |
parent | 07a03b603d964b07d2866e04f480014fadcf1570 (diff) | |
download | opie-43b0fded770624c907aae043e88449f80040d7df.zip opie-43b0fded770624c907aae043e88449f80040d7df.tar.gz opie-43b0fded770624c907aae043e88449f80040d7df.tar.bz2 |
added a button for quicklaunch of a default profile
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 21 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.h | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/terminalwidget.cpp | 0 | ||||
-rw-r--r-- | pics/console/konsole_mini.png | bin | 0 -> 783 bytes |
4 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 | |||
@@ -52,6 +52,7 @@ MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow( | |||
52 | populateProfiles(); | 52 | populateProfiles(); |
53 | populateScripts(); | 53 | populateScripts(); |
54 | } | 54 | } |
55 | |||
55 | void MainWindow::initUI() { | 56 | void MainWindow::initUI() { |
56 | setToolBarsMovable( FALSE ); | 57 | setToolBarsMovable( FALSE ); |
57 | 58 | ||
@@ -119,12 +120,19 @@ void MainWindow::initUI() { | |||
119 | 120 | ||
120 | m_console->insertSeparator(); | 121 | m_console->insertSeparator(); |
121 | 122 | ||
123 | m_quickLaunch = new QAction( tr("QuickLaunch"), Resource::loadPixmap("console/konsole_mini"), QString::null, 0, this, 0 ); | ||
124 | m_quickLaunch->addTo( m_icons ); | ||
125 | connect( m_quickLaunch, SIGNAL( activated() ), | ||
126 | this, SLOT( slotQuickLaunch() ) ); | ||
127 | |||
122 | m_transfer = new QAction( tr("Transfer file..."), Resource::loadPixmap("pass") , QString::null, | 128 | m_transfer = new QAction( tr("Transfer file..."), Resource::loadPixmap("pass") , QString::null, |
123 | 0, this, 0 ); | 129 | 0, this, 0 ); |
124 | m_transfer->addTo( m_console ); | 130 | m_transfer->addTo( m_console ); |
125 | connect(m_transfer, SIGNAL(activated() ), | 131 | connect(m_transfer, SIGNAL(activated() ), |
126 | this, SLOT(slotTransfer() ) ); | 132 | this, SLOT(slotTransfer() ) ); |
127 | 133 | ||
134 | |||
135 | |||
128 | /* | 136 | /* |
129 | * immediate change of line wrap policy | 137 | * immediate change of line wrap policy |
130 | */ | 138 | */ |
@@ -402,6 +410,16 @@ void MainWindow::slotTerminate() { | |||
402 | /* FIXME move to the next session */ | 410 | /* FIXME move to the next session */ |
403 | } | 411 | } |
404 | 412 | ||
413 | void MainWindow::slotQuickLaunch() { | ||
414 | Profile prof = manager()->profile( "default" ); | ||
415 | if ( prof.name() == "default" ) { | ||
416 | create( prof ); | ||
417 | } else { | ||
418 | QMessageBox::warning(this, tr("Failure"),tr("please configure one profile named \"default\"")); | ||
419 | } | ||
420 | |||
421 | } | ||
422 | |||
405 | void MainWindow::slotConfigure() { | 423 | void MainWindow::slotConfigure() { |
406 | ConfigDialog conf( manager()->all(), factory() ); | 424 | ConfigDialog conf( manager()->all(), factory() ); |
407 | conf.showMaximized(); | 425 | conf.showMaximized(); |
@@ -459,6 +477,9 @@ void MainWindow::slotProfile( int id) { | |||
459 | Profile prof = manager()->profile( m_sessionsPop->text( id) ); | 477 | Profile prof = manager()->profile( m_sessionsPop->text( id) ); |
460 | create( prof ); | 478 | create( prof ); |
461 | } | 479 | } |
480 | |||
481 | |||
482 | |||
462 | void MainWindow::create( const Profile& prof ) { | 483 | void MainWindow::create( const Profile& prof ) { |
463 | if(m_curSession) | 484 | if(m_curSession) |
464 | if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); | 485 | if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); |
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 | |||
@@ -67,6 +67,7 @@ private slots: | |||
67 | void slotSaveScript(); | 67 | void slotSaveScript(); |
68 | void slotRunScript(int); | 68 | void slotRunScript(int); |
69 | void slotFullscreen(); | 69 | void slotFullscreen(); |
70 | void slotQuickLaunch(); | ||
70 | void slotWrap(); | 71 | void slotWrap(); |
71 | void slotSessionChanged( Session* ); | 72 | void slotSessionChanged( Session* ); |
72 | void slotKeyReceived(FKey, ushort, ushort, bool); | 73 | void slotKeyReceived(FKey, ushort, ushort, bool); |
@@ -113,6 +114,7 @@ private: | |||
113 | QPopupMenu* m_scripts; | 114 | QPopupMenu* m_scripts; |
114 | QAction* m_connect; | 115 | QAction* m_connect; |
115 | QAction* m_disconnect; | 116 | QAction* m_disconnect; |
117 | QAction* m_quickLaunch; | ||
116 | QAction* m_terminate; | 118 | QAction* m_terminate; |
117 | QAction* m_transfer; | 119 | QAction* m_transfer; |
118 | QAction* m_setProfiles; | 120 | QAction* m_setProfiles; |
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 | |||
diff --git a/pics/console/konsole_mini.png b/pics/console/konsole_mini.png new file mode 100644 index 0000000..590a417 --- a/dev/null +++ b/pics/console/konsole_mini.png | |||
Binary files differ | |||