2012-08-07 18:03:23 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "sdattr.hxx"
|
|
|
|
#include "sdresid.hxx"
|
|
|
|
#include "cusshow.hxx"
|
|
|
|
|
|
|
|
#include "RemoteDialog.hxx"
|
|
|
|
#include "RemoteDialog.hrc"
|
2012-08-10 13:27:40 +02:00
|
|
|
#include "RemoteServer.hxx"
|
2012-08-07 18:03:23 +02:00
|
|
|
|
2012-08-10 13:27:40 +02:00
|
|
|
using namespace ::sd;
|
|
|
|
using namespace ::std;
|
2012-08-08 11:42:58 +02:00
|
|
|
|
|
|
|
RemoteDialog::RemoteDialog( Window *pWindow ) :
|
2012-08-10 13:27:40 +02:00
|
|
|
ModalDialog( pWindow, SdResId( DLG_PAIR_REMOTE ) ),
|
|
|
|
mButtonConnect( this, SdResId( BTN_CONNECT ) ),
|
|
|
|
mButtonCancel( this, SdResId( BTN_CANCEL ) ),
|
|
|
|
mClientBox( this, NULL, SdResId( LB_SERVERS ) )
|
2012-08-07 18:03:23 +02:00
|
|
|
{
|
2012-08-10 13:27:40 +02:00
|
|
|
FreeResource();
|
|
|
|
|
2012-08-10 17:20:16 +02:00
|
|
|
vector<ClientInfo*> aClients( RemoteServer::getClients() );
|
2012-08-10 13:27:40 +02:00
|
|
|
|
2012-08-10 17:20:16 +02:00
|
|
|
for ( vector<ClientInfo*>::const_iterator aIt( aClients.begin() );
|
2012-08-10 13:27:40 +02:00
|
|
|
aIt < aClients.end(); aIt++ )
|
|
|
|
{
|
2012-08-10 17:20:16 +02:00
|
|
|
mClientBox.addEntry( **aIt );
|
2012-08-10 13:27:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
mButtonConnect.SetClickHdl( LINK( this, RemoteDialog, HandleConnectButton ) );
|
2012-08-07 18:03:23 +02:00
|
|
|
}
|
|
|
|
|
2012-08-08 11:42:58 +02:00
|
|
|
RemoteDialog::~RemoteDialog()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-08-10 13:27:40 +02:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton)
|
|
|
|
{
|
|
|
|
// setBusy( true );
|
|
|
|
// Fixme: Try and connect
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2012-08-07 18:03:23 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|