summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-02-18 09:24:23 +0000
committerThorsten Behrens <tbehrens@suse.com>2013-02-19 12:59:55 +0100
commit943fd58a4fce2a1009060f2f8907e806983721e7 (patch)
tree0bc3509e98e38c5540680494b42d0ace2cbaffe0 /sd/source/ui/dlg
parent66e5365a626e99752110fb94b4e1469c0dff32bd (diff)
improve bluetooth discoverability toggling API.
Change-Id: I289d43fcb173b64b01183a41f780bc74d2ba0abe (cherry picked from commit 21979643e47e503a20113b1e8e98814717c71ac5) Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
Diffstat (limited to 'sd/source/ui/dlg')
-rw-r--r--sd/source/ui/dlg/RemoteDialog.cxx21
-rw-r--r--sd/source/ui/dlg/RemoteDialog.hxx2
2 files changed, 3 insertions, 20 deletions
diff --git a/sd/source/ui/dlg/RemoteDialog.cxx b/sd/source/ui/dlg/RemoteDialog.cxx
index fd6089570a98..f9cff1bc9385 100644
--- a/sd/source/ui/dlg/RemoteDialog.cxx
+++ b/sd/source/ui/dlg/RemoteDialog.cxx
@@ -22,22 +22,12 @@ RemoteDialog::RemoteDialog( Window *pWindow ) :
ModalDialog( pWindow, SdResId( DLG_PAIR_REMOTE ) ),
mButtonConnect( this, SdResId( BTN_CONNECT ) ),
mButtonCancel( this, SdResId( BTN_CANCEL ) ),
- mClientBox( this, NULL, SdResId( LB_SERVERS ) ),
- mPreviouslyDiscoverable()
+ mClientBox( this, NULL, SdResId( LB_SERVERS ) )
{
- (void) mPreviouslyDiscoverable; // avoid warnings about unused member
-
FreeResource();
#ifdef ENABLE_SDREMOTE
-
-#ifdef ENABLE_SDREMOTE_BLUETOOTH
- mPreviouslyDiscoverable = RemoteServer::isBluetoothDiscoverable();
- if ( !mPreviouslyDiscoverable )
- RemoteServer::setBluetoothDiscoverable( true );
-#else
- RemoteServer::setBluetoothDiscoverable( false );
-#endif
+ RemoteServer::ensureDiscoverable();
vector<ClientInfo*> aClients( RemoteServer::getClients() );
@@ -80,12 +70,7 @@ IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton)
IMPL_LINK_NOARG( RemoteDialog, CloseHdl )
{
-#if defined(ENABLE_SDREMOTE) && defined(ENABLE_SDREMOTE_BLUETOOTH)
- if ( !mPreviouslyDiscoverable )
- {
- RemoteServer::setBluetoothDiscoverable( false );
- }
-#endif
+ RemoteServer::restoreDiscoverable();
Close();
return 0;
}
diff --git a/sd/source/ui/dlg/RemoteDialog.hxx b/sd/source/ui/dlg/RemoteDialog.hxx
index bc4831bd4ab6..882b9c21c343 100644
--- a/sd/source/ui/dlg/RemoteDialog.hxx
+++ b/sd/source/ui/dlg/RemoteDialog.hxx
@@ -27,8 +27,6 @@ private:
OKButton mButtonConnect;
CancelButton mButtonCancel;
ClientBox mClientBox;
- // Whether discoverability was enabled befor the dialog started.
- bool mPreviouslyDiscoverable;
DECL_DLLPRIVATE_LINK( HandleConnectButton, void * );
DECL_LINK( CloseHdl, void * );