summaryrefslogtreecommitdiff
path: root/noncore/comm/keypebble/kvnc.cpp
Unidiff
Diffstat (limited to 'noncore/comm/keypebble/kvnc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/comm/keypebble/kvnc.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/noncore/comm/keypebble/kvnc.cpp b/noncore/comm/keypebble/kvnc.cpp
index 25c8919..2fa8d1f 100644
--- a/noncore/comm/keypebble/kvnc.cpp
+++ b/noncore/comm/keypebble/kvnc.cpp
@@ -118,42 +118,39 @@ KVNC::KVNC( QWidget *parent, const char *name, WFlags f) : QMainWindow( 0, name
118} 118}
119 119
120KVNC::~KVNC() 120KVNC::~KVNC()
121{ 121{
122 122
123} 123}
124 124
125void KVNC::newConnection() 125void KVNC::newConnection()
126{ 126{
127 curServer=new KRFBServer; 127 curServer=new KRFBServer;
128 128
129 KVNCConnDlg dlg( curServer,this); 129 KVNCConnDlg dlg( curServer,this);
130 dlg.showMaximized(); 130 if ( QPEApplication::execDialog( &dlg )) {
131 if (dlg.exec()) {
132 if (!curServer->name.isEmpty()) 131 if (!curServer->name.isEmpty())
133 bookmarkSelector->addBookmark(curServer); 132 bookmarkSelector->addBookmark(curServer);
134 canvas->openConnection(*curServer); 133 canvas->openConnection(*curServer);
135 } else 134 } else
136 curServer=0; 135 curServer=0;
137} 136}
138 137
139void KVNC::openConnection( QString name) 138void KVNC::openConnection( QString name)
140{ 139{
141 curServer=bookmarkSelector->getServer(name); 140 curServer=bookmarkSelector->getServer(name);
142 141
143 if (curServer) { 142 if (curServer) {
144 KVNCConnDlg dlg( curServer,this); 143 KVNCConnDlg dlg( curServer,this);
145 dlg.showMaximized(); 144 if ( QPEApplication::execDialog( &dlg ) ) {
146
147 if ( dlg.exec() ) {
148 canvas->openConnection(*curServer); 145 canvas->openConnection(*curServer);
149 bookmarkSelector->writeBookmarks(); 146 bookmarkSelector->writeBookmarks();
150 } else 147 } else
151 curServer=0; 148 curServer=0;
152 } 149 }
153} 150}
154 151
155void KVNC::openConnection( void ) 152void KVNC::openConnection( void )
156{ 153{
157 openConnection( bookmarkSelector->selectedBookmark()); 154 openConnection( bookmarkSelector->selectedBookmark());
158} 155}
159 156