1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #include "RemoteDialog.hxx"
11 #include <RemoteServer.hxx>
14 using namespace ::std
;
16 RemoteDialog::RemoteDialog( vcl::Window
*pWindow
)
17 : ModalDialog(pWindow
, "RemoteDialog",
18 "modules/simpress/ui/remotedialog.ui")
20 get(m_pButtonConnect
, "connect");
21 get(m_pButtonClose
, "close");
22 get(m_pClientBox
, "tree");
24 m_pButtonConnect
->SetClickHdl( LINK( this, RemoteDialog
, HandleConnectButton
) );
25 SetCloseHdl( LINK( this, RemoteDialog
, CloseHdl
) );
26 m_pButtonClose
->SetClickHdl( LINK( this, RemoteDialog
, CloseClickHdl
) );
29 RemoteDialog::~RemoteDialog()
34 void RemoteDialog::dispose()
36 m_pButtonConnect
.clear();
37 m_pButtonClose
.clear();
39 ModalDialog::dispose();
42 IMPL_LINK_NOARG(RemoteDialog
, HandleConnectButton
, Button
*, void)
45 // Fixme: Try and connect
46 #if defined(ENABLE_SDREMOTE) && defined(ENABLE_SDREMOTE_BLUETOOTH)
47 long aSelected
= m_pClientBox
->GetActiveEntryIndex();
50 TClientBoxEntry aEntry
= m_pClientBox
->GetEntryData(aSelected
);
51 OUString
aPin ( m_pClientBox
->getPin() );
52 if ( RemoteServer::connectClient( aEntry
->m_pClientInfo
, aPin
) )
61 IMPL_LINK_NOARG( RemoteDialog
, CloseClickHdl
, Button
*, void )
65 IMPL_LINK_NOARG( RemoteDialog
, CloseHdl
, SystemWindow
&, void )
67 #ifdef ENABLE_SDREMOTE
68 RemoteServer::restoreDiscoverable();
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */