author | zecke <zecke> | 2002-10-13 19:01:50 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-13 19:01:50 (UTC) |
commit | 130ae6144e031b4de2244990c53df8654bd840ae (patch) (unidiff) | |
tree | df4a5660fffd733064758cf346894269ca000cdc | |
parent | 495abbf351f29328b52cb055566ef8bec6f466f0 (diff) | |
download | opie-130ae6144e031b4de2244990c53df8654bd840ae.zip opie-130ae6144e031b4de2244990c53df8654bd840ae.tar.gz opie-130ae6144e031b4de2244990c53df8654bd840ae.tar.bz2 |
keep track of the current session
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 18 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.h | 1 |
2 files changed, 14 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 0a58b6c..bfd1c2e 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -72,17 +72,17 @@ void MainWindow::initUI() { | |||
72 | m_disconnect = new QAction(); | 72 | m_disconnect = new QAction(); |
73 | m_disconnect->setText( tr("Disconnect") ); | 73 | m_disconnect->setText( tr("Disconnect") ); |
74 | m_disconnect->addTo( m_console ); | 74 | m_disconnect->addTo( m_console ); |
75 | connect(m_disconnect, SIGNAL(activated() ), | 75 | connect(m_disconnect, SIGNAL(activated() ), |
76 | this, SLOT(slotDisconnect() ) ); | 76 | this, SLOT(slotDisconnect() ) ); |
77 | 77 | ||
78 | m_transfer = new QAction(); | 78 | m_transfer = new QAction(); |
79 | m_transfer->setText( tr("Transfer file...") ); | 79 | m_transfer->setText( tr("Transfer file...") ); |
80 | m_transfer->addTo( m_console ); | 80 | m_transfer->addTo( m_console ); |
81 | connect(m_transfer, SIGNAL(activated() ), | 81 | connect(m_transfer, SIGNAL(activated() ), |
82 | this, SLOT(slotTransfer() ) ); | 82 | this, SLOT(slotTransfer() ) ); |
83 | 83 | ||
84 | /* | 84 | /* |
85 | * terminate action | 85 | * terminate action |
86 | */ | 86 | */ |
87 | m_terminate = new QAction(); | 87 | m_terminate = new QAction(); |
88 | m_terminate->setText( tr("Terminate") ); | 88 | m_terminate->setText( tr("Terminate") ); |
@@ -161,12 +161,14 @@ void MainWindow::initUI() { | |||
161 | * connect to the menu activation | 161 | * connect to the menu activation |
162 | */ | 162 | */ |
163 | connect( m_sessionsPop, SIGNAL(activated( int ) ), | 163 | connect( m_sessionsPop, SIGNAL(activated( int ) ), |
164 | this, SLOT(slotProfile( int ) ) ); | 164 | this, SLOT(slotProfile( int ) ) ); |
165 | 165 | ||
166 | m_consoleWindow = new TabWidget( this, "blah"); | 166 | m_consoleWindow = new TabWidget( this, "blah"); |
167 | connect(m_consoleWindow, SIGNAL(activated(Session*) ), | ||
168 | this, SLOT(slotSessionChanged(Session*) ) ); | ||
167 | setCentralWidget( m_consoleWindow ); | 169 | setCentralWidget( m_consoleWindow ); |
168 | 170 | ||
169 | } | 171 | } |
170 | 172 | ||
171 | ProfileManager* MainWindow::manager() { | 173 | ProfileManager* MainWindow::manager() { |
172 | return m_manager; | 174 | return m_manager; |
@@ -325,6 +327,12 @@ void MainWindow::slotTransfer() | |||
325 | void MainWindow::slotOpenKeb(bool state) { | 327 | void MainWindow::slotOpenKeb(bool state) { |
326 | 328 | ||
327 | if (state) m_keyBar->show(); | 329 | if (state) m_keyBar->show(); |
328 | else m_keyBar->hide(); | 330 | else m_keyBar->hide(); |
329 | 331 | ||
330 | } | 332 | } |
333 | void MainWindow::slotSessionChanged( Session* ses ) { | ||
334 | if ( ses ) { | ||
335 | qWarning("changing %s", ses->name().latin1() ); | ||
336 | m_curSession = ses; | ||
337 | } | ||
338 | } | ||
diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h index 94144a4..d16d6af 100644 --- a/noncore/apps/opie-console/mainwindow.h +++ b/noncore/apps/opie-console/mainwindow.h | |||
@@ -59,12 +59,13 @@ private slots: | |||
59 | void slotProfile(int); | 59 | void slotProfile(int); |
60 | void slotTransfer(); | 60 | void slotTransfer(); |
61 | void slotOpenKeb(bool); | 61 | void slotOpenKeb(bool); |
62 | void slotRecordScript(); | 62 | void slotRecordScript(); |
63 | void slotSaveScript(); | 63 | void slotSaveScript(); |
64 | void slotRunScript(); | 64 | void slotRunScript(); |
65 | void slotSessionChanged( Session* ); | ||
65 | private: | 66 | private: |
66 | void initUI(); | 67 | void initUI(); |
67 | void populateProfiles(); | 68 | void populateProfiles(); |
68 | void create( const Profile& ); | 69 | void create( const Profile& ); |
69 | /** | 70 | /** |
70 | * the current session | 71 | * the current session |