summaryrefslogtreecommitdiff
path: root/noncore/comm/keypebble/kvnc.cpp
Side-by-side diff
Diffstat (limited to 'noncore/comm/keypebble/kvnc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/comm/keypebble/kvnc.cpp3
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()
void KVNC::openConnection( QString name)
{
curServer=bookmarkSelector->getServer(name);
if (curServer) {
KVNCConnDlg dlg( curServer,this);
dlg.showMaximized();
if ( dlg.exec() ) {
canvas->openConnection(*curServer);
bookmarkSelector->writeBookmarks();
} else
curServer=0;
}
}
void KVNC::openConnection( void )
{
openConnection( bookmarkSelector->selectedBookmark());
}
void KVNC::openConnection( QListBoxItem * item)
{
- openConnection(item->text());
+ if (item)
+ openConnection(item->text());
}
void KVNC::setupActions()
{
cornerMenu = new QPopupMenu( this );
fullScreenAction = new QAction( tr("Full Screen"), QString::null, 0, 0 );
connect( fullScreenAction, SIGNAL(activated()),
this, SLOT( toggleFullScreen() ) );
fullScreenAction->addTo( cornerMenu );
fullScreenAction->setEnabled( false );
ctlAltDelAction = new QAction( tr("Send Contrl-Alt-Delete"), QString::null, 0, 0 );
connect( ctlAltDelAction, SIGNAL(activated()),
canvas, SLOT( sendCtlAltDel() ) );
ctlAltDelAction->addTo( cornerMenu );
ctlAltDelAction->setEnabled( false );
disconnectAction = new QAction( tr("Disconnect"), QString::null, 0, 0 );
connect( disconnectAction, SIGNAL(activated()),
this, SLOT( closeConnection() ) );
disconnectAction->addTo( cornerMenu );
disconnectAction->setEnabled( false );