bump product version to 6.3.0.0.beta1
[LibreOffice.git] / sd / source / ui / dlg / RemoteDialog.cxx
blob2298d4a243fd1f08eafefd939d4c0592b6afd28b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #include "RemoteDialog.hxx"
11 #include <RemoteServer.hxx>
13 using namespace ::sd;
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()
31 disposeOnce();
34 void RemoteDialog::dispose()
36 m_pButtonConnect.clear();
37 m_pButtonClose.clear();
38 m_pClientBox.clear();
39 ModalDialog::dispose();
42 IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton, Button*, void)
44 // setBusy( true );
45 // Fixme: Try and connect
46 #if defined(ENABLE_SDREMOTE) && defined(ENABLE_SDREMOTE_BLUETOOTH)
47 long aSelected = m_pClientBox->GetActiveEntryIndex();
48 if ( aSelected < 0 )
49 return;
50 TClientBoxEntry aEntry = m_pClientBox->GetEntryData(aSelected);
51 OUString aPin ( m_pClientBox->getPin() );
52 if ( RemoteServer::connectClient( aEntry->m_pClientInfo, aPin ) )
54 CloseHdl( *this );
56 #else
57 (void) this;
58 #endif
61 IMPL_LINK_NOARG( RemoteDialog, CloseClickHdl, Button*, void )
63 CloseHdl(*this);
65 IMPL_LINK_NOARG( RemoteDialog, CloseHdl, SystemWindow&, void )
67 #ifdef ENABLE_SDREMOTE
68 RemoteServer::restoreDiscoverable();
69 #endif
70 Close();
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */