Diffstat (limited to 'noncore/comm/keypebble/kvnc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/comm/keypebble/kvnc.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/comm/keypebble/kvnc.cpp b/noncore/comm/keypebble/kvnc.cpp index 5b1dc9f..48a442c 100644 --- a/noncore/comm/keypebble/kvnc.cpp +++ b/noncore/comm/keypebble/kvnc.cpp | |||
@@ -138,49 +138,50 @@ void KVNC::newConnection() | |||
138 | 138 | ||
139 | void KVNC::openConnection( QString name) | 139 | void KVNC::openConnection( QString name) |
140 | { | 140 | { |
141 | curServer=bookmarkSelector->getServer(name); | 141 | curServer=bookmarkSelector->getServer(name); |
142 | 142 | ||
143 | if (curServer) { | 143 | if (curServer) { |
144 | KVNCConnDlg dlg( curServer,this); | 144 | KVNCConnDlg dlg( curServer,this); |
145 | dlg.showMaximized(); | 145 | dlg.showMaximized(); |
146 | 146 | ||
147 | if ( dlg.exec() ) { | 147 | if ( dlg.exec() ) { |
148 | canvas->openConnection(*curServer); | 148 | canvas->openConnection(*curServer); |
149 | bookmarkSelector->writeBookmarks(); | 149 | bookmarkSelector->writeBookmarks(); |
150 | } else | 150 | } else |
151 | curServer=0; | 151 | curServer=0; |
152 | } | 152 | } |
153 | } | 153 | } |
154 | 154 | ||
155 | void KVNC::openConnection( void ) | 155 | void KVNC::openConnection( void ) |
156 | { | 156 | { |
157 | openConnection( bookmarkSelector->selectedBookmark()); | 157 | openConnection( bookmarkSelector->selectedBookmark()); |
158 | } | 158 | } |
159 | 159 | ||
160 | void KVNC::openConnection( QListBoxItem * item) | 160 | void KVNC::openConnection( QListBoxItem * item) |
161 | { | 161 | { |
162 | openConnection(item->text()); | 162 | if (item) |
163 | openConnection(item->text()); | ||
163 | } | 164 | } |
164 | 165 | ||
165 | void KVNC::setupActions() | 166 | void KVNC::setupActions() |
166 | { | 167 | { |
167 | cornerMenu = new QPopupMenu( this ); | 168 | cornerMenu = new QPopupMenu( this ); |
168 | 169 | ||
169 | fullScreenAction = new QAction( tr("Full Screen"), QString::null, 0, 0 ); | 170 | fullScreenAction = new QAction( tr("Full Screen"), QString::null, 0, 0 ); |
170 | connect( fullScreenAction, SIGNAL(activated()), | 171 | connect( fullScreenAction, SIGNAL(activated()), |
171 | this, SLOT( toggleFullScreen() ) ); | 172 | this, SLOT( toggleFullScreen() ) ); |
172 | fullScreenAction->addTo( cornerMenu ); | 173 | fullScreenAction->addTo( cornerMenu ); |
173 | fullScreenAction->setEnabled( false ); | 174 | fullScreenAction->setEnabled( false ); |
174 | 175 | ||
175 | ctlAltDelAction = new QAction( tr("Send Contrl-Alt-Delete"), QString::null, 0, 0 ); | 176 | ctlAltDelAction = new QAction( tr("Send Contrl-Alt-Delete"), QString::null, 0, 0 ); |
176 | connect( ctlAltDelAction, SIGNAL(activated()), | 177 | connect( ctlAltDelAction, SIGNAL(activated()), |
177 | canvas, SLOT( sendCtlAltDel() ) ); | 178 | canvas, SLOT( sendCtlAltDel() ) ); |
178 | ctlAltDelAction->addTo( cornerMenu ); | 179 | ctlAltDelAction->addTo( cornerMenu ); |
179 | ctlAltDelAction->setEnabled( false ); | 180 | ctlAltDelAction->setEnabled( false ); |
180 | 181 | ||
181 | disconnectAction = new QAction( tr("Disconnect"), QString::null, 0, 0 ); | 182 | disconnectAction = new QAction( tr("Disconnect"), QString::null, 0, 0 ); |
182 | connect( disconnectAction, SIGNAL(activated()), | 183 | connect( disconnectAction, SIGNAL(activated()), |
183 | this, SLOT( closeConnection() ) ); | 184 | this, SLOT( closeConnection() ) ); |
184 | disconnectAction->addTo( cornerMenu ); | 185 | disconnectAction->addTo( cornerMenu ); |
185 | disconnectAction->setEnabled( false ); | 186 | disconnectAction->setEnabled( false ); |
186 | 187 | ||