summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg/RemoteDialog.cxx
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2012-08-13 16:09:46 +0200
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2012-08-13 21:41:48 +0200
commit4533d34d9acdd3779333334d1d560bf707267e04 (patch)
tree7af977891291be0376203f7790c5aed33361babe /sd/source/ui/dlg/RemoteDialog.cxx
parentcf3de756eac964ce073872996956daa0e0840ff8 (diff)
Finished pin verification server side.
Change-Id: Ib59be7fb21ae132d1a19b414acd55f3c54448841
Diffstat (limited to 'sd/source/ui/dlg/RemoteDialog.cxx')
-rw-r--r--sd/source/ui/dlg/RemoteDialog.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/sd/source/ui/dlg/RemoteDialog.cxx b/sd/source/ui/dlg/RemoteDialog.cxx
index 465febc5fba9..0df0f7070547 100644
--- a/sd/source/ui/dlg/RemoteDialog.cxx
+++ b/sd/source/ui/dlg/RemoteDialog.cxx
@@ -24,14 +24,14 @@ RemoteDialog::RemoteDialog( Window *pWindow ) :
mButtonCancel( this, SdResId( BTN_CANCEL ) ),
mClientBox( this, NULL, SdResId( LB_SERVERS ) )
{
- FreeResource();
+ FreeResource();
vector<ClientInfo*> aClients( RemoteServer::getClients() );
for ( vector<ClientInfo*>::const_iterator aIt( aClients.begin() );
aIt < aClients.end(); aIt++ )
{
- mClientBox.addEntry( **aIt );
+ mClientBox.addEntry( *aIt );
}
mButtonConnect.SetClickHdl( LINK( this, RemoteDialog, HandleConnectButton ) );
@@ -46,8 +46,15 @@ IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton)
{
// setBusy( true );
// Fixme: Try and connect
-
- return 1;
+ long aSelected = mClientBox.GetActiveEntryIndex();
+ if ( aSelected < 0 )
+ return 1;
+ TClientBoxEntry aEntry = mClientBox.GetEntryData(aSelected);
+ OUString aPin = mClientBox.getPin();
+ if ( RemoteServer::connectClient( aEntry->m_pClientInfo, aPin ) )
+ return 0;
+ else
+ return 1;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file