-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 47 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.h | 1 |
2 files changed, 17 insertions, 31 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 745efaf..44ef458 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -57,12 +57,8 @@ void MainWindow::initUI() { | |||
57 | m_scripts = new QPopupMenu( this ); | 57 | m_scripts = new QPopupMenu( this ); |
58 | m_sessionsPop= new QPopupMenu( this ); | 58 | m_sessionsPop= new QPopupMenu( this ); |
59 | //m_settings = new QPopupMenu( this ); | ||
60 | 59 | ||
61 | /* add a toolbar for icons */ | 60 | /* add a toolbar for icons */ |
62 | m_icons = new QToolBar(this); | 61 | m_icons = new QToolBar(this); |
63 | 62 | ||
64 | |||
65 | |||
66 | |||
67 | /* | 63 | /* |
68 | * the settings action | 64 | * the settings action |
@@ -71,6 +67,4 @@ void MainWindow::initUI() { | |||
71 | Resource::loadPixmap( "SettingsIcon" ), | 67 | Resource::loadPixmap( "SettingsIcon" ), |
72 | QString::null, 0, this, 0); | 68 | QString::null, 0, this, 0); |
73 | // m_setProfiles->addTo( m_settings ); | ||
74 | m_setProfiles->addTo( m_icons ); | ||
75 | m_setProfiles->addTo( m_console ); | 69 | m_setProfiles->addTo( m_console ); |
76 | connect( m_setProfiles, SIGNAL(activated() ), | 70 | connect( m_setProfiles, SIGNAL(activated() ), |
@@ -81,19 +75,19 @@ void MainWindow::initUI() { | |||
81 | * new Action for new sessions | 75 | * new Action for new sessions |
82 | */ | 76 | */ |
83 | QAction* a = new QAction(tr("New Connection"), | 77 | QAction* newCon = new QAction(tr("New Connection"), |
84 | Resource::loadPixmap( "new" ), | 78 | Resource::loadPixmap( "new" ), |
85 | QString::null, 0, this, 0); | 79 | QString::null, 0, this, 0); |
86 | a->addTo( m_console ); | 80 | newCon->addTo( m_console ); |
87 | a->addTo( m_icons ); | 81 | connect( newCon, SIGNAL(activated() ), |
88 | connect(a, SIGNAL(activated() ), | ||
89 | this, SLOT(slotNew() ) ); | 82 | this, SLOT(slotNew() ) ); |
90 | 83 | ||
91 | m_console->insertSeparator(); | 84 | m_console->insertSeparator(); |
92 | /* save icon is not available */ | 85 | /* save icon is not available */ |
93 | a = new QAction(tr("Save Connection"), | 86 | |
87 | QAction *saveCon = new QAction(tr("Save Connection"), | ||
94 | Resource::loadPixmap("save"), QString::null, | 88 | Resource::loadPixmap("save"), QString::null, |
95 | 0, this, 0 ); | 89 | 0, this, 0 ); |
96 | a->addTo( m_console ); | 90 | saveCon->addTo( m_console ); |
97 | connect(a, SIGNAL(activated() ), | 91 | connect( saveCon, SIGNAL(activated() ), |
98 | this, SLOT(slotSaveSession() ) ); | 92 | this, SLOT(slotSaveSession() ) ); |
99 | m_console->insertSeparator(); | 93 | m_console->insertSeparator(); |
@@ -134,5 +128,4 @@ void MainWindow::initUI() { | |||
134 | , QString::null, 0, this, 0); | 128 | , QString::null, 0, this, 0); |
135 | m_fullscreen->addTo( m_console ); | 129 | m_fullscreen->addTo( m_console ); |
136 | m_fullscreen->addTo( m_icons ); | ||
137 | connect( m_fullscreen, SIGNAL( activated() ), | 130 | connect( m_fullscreen, SIGNAL( activated() ), |
138 | this, SLOT( slotFullscreen() ) ); | 131 | this, SLOT( slotFullscreen() ) ); |
@@ -176,10 +169,6 @@ void MainWindow::initUI() { | |||
176 | Resource::loadPixmap( "console/keys/keyboard_icon" ), | 169 | Resource::loadPixmap( "console/keys/keyboard_icon" ), |
177 | QString::null, 0, this, 0); | 170 | QString::null, 0, this, 0); |
178 | |||
179 | m_openKeys->setToggleAction(true); | 171 | m_openKeys->setToggleAction(true); |
180 | 172 | connect (m_openKeys, SIGNAL(toggled(bool)), this, SLOT(slotOpenKeb(bool))); | |
181 | connect (m_openKeys, SIGNAL(toggled(bool)), | ||
182 | this, SLOT(slotOpenKeb(bool))); | ||
183 | m_openKeys->addTo(m_icons); | ||
184 | 173 | ||
185 | /* insert the submenu */ | 174 | /* insert the submenu */ |
@@ -193,7 +182,4 @@ void MainWindow::initUI() { | |||
193 | m_bar->insertItem( tr("Scripts"), m_scripts ); | 182 | m_bar->insertItem( tr("Scripts"), m_scripts ); |
194 | 183 | ||
195 | /* the settings menu */ | ||
196 | // m_bar->insertItem( tr("Settings"), m_settings ); | ||
197 | |||
198 | /* and the keyboard */ | 184 | /* and the keyboard */ |
199 | m_keyBar = new QToolBar(this); | 185 | m_keyBar = new QToolBar(this); |
@@ -206,10 +192,6 @@ void MainWindow::initUI() { | |||
206 | this, SLOT(slotKeyReceived(FKey, ushort, ushort, bool))); | 192 | this, SLOT(slotKeyReceived(FKey, ushort, ushort, bool))); |
207 | 193 | ||
208 | m_buttonBar = new QToolBar( this ); | ||
209 | addToolBar( m_buttonBar, "Buttons", QMainWindow::Top, TRUE ); | ||
210 | m_buttonBar->setHorizontalStretchable( TRUE ); | ||
211 | m_buttonBar->hide(); | ||
212 | 194 | ||
213 | a = new QAction(tr("Copy"), | 195 | QAction *a = new QAction(tr("Copy"), |
214 | Resource::loadPixmap("copy"), QString::null, | 196 | Resource::loadPixmap("copy"), QString::null, |
215 | 0, this, 0 ); | 197 | 0, this, 0 ); |
@@ -218,12 +200,17 @@ void MainWindow::initUI() { | |||
218 | this, SLOT(slotCopy() ) ); | 200 | this, SLOT(slotCopy() ) ); |
219 | 201 | ||
220 | a = new QAction(tr("Paste"), | 202 | QAction *paste = new QAction(tr("Paste"), |
221 | Resource::loadPixmap("paste"), QString::null, | 203 | Resource::loadPixmap("paste"), QString::null, |
222 | 0, this, 0 ); | 204 | 0, this, 0 ); |
223 | a->addTo( m_icons ); | 205 | connect( paste, SIGNAL(activated() ), |
224 | connect( a, SIGNAL(activated() ), | ||
225 | this, SLOT(slotPaste() ) ); | 206 | this, SLOT(slotPaste() ) ); |
226 | 207 | ||
227 | 208 | ||
209 | newCon->addTo( m_icons ); | ||
210 | m_setProfiles->addTo( m_icons ); | ||
211 | paste->addTo( m_icons ); | ||
212 | m_openKeys->addTo(m_icons); | ||
213 | m_fullscreen->addTo( m_icons ); | ||
214 | |||
228 | m_connect->setEnabled( false ); | 215 | m_connect->setEnabled( false ); |
229 | m_disconnect->setEnabled( false ); | 216 | m_disconnect->setEnabled( false ); |
diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h index 7cc2aa5..19d3a3d 100644 --- a/noncore/apps/opie-console/mainwindow.h +++ b/noncore/apps/opie-console/mainwindow.h | |||
@@ -105,5 +105,4 @@ private: | |||
105 | QMenuBar* m_bar; | 105 | QMenuBar* m_bar; |
106 | QPopupMenu* m_console; | 106 | QPopupMenu* m_console; |
107 | QPopupMenu* m_settings; | ||
108 | QPopupMenu* m_sessionsPop; | 107 | QPopupMenu* m_sessionsPop; |
109 | QPopupMenu* m_scripts; | 108 | QPopupMenu* m_scripts; |