[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - 4 commits - android/sdremote sd/source

Michael Meeks michael.meeks at suse.com
Wed Feb 6 11:44:07 PST 2013


 android/sdremote/res/xml/preferences.xml                                     |    2 -
 android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java |   12 +++++-----
 android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java    |    4 ++-
 sd/source/ui/dlg/RemoteDialog.cxx                                            |   11 +++++----
 4 files changed, 17 insertions(+), 12 deletions(-)

New commits:
commit 1ff566f4887ae0ddf99159f8f035e9b91a67643d
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Wed Feb 6 17:21:41 2013 +0000

    fdo#58699 - sdremote - fix it so it closes even with no bluetooth.
    
    Change-Id: I09588f4e4b22466843f855d99c06f616c04518ac
    Signed-off-by: Jan Holesovsky <kendy at suse.cz>

diff --git a/sd/source/ui/dlg/RemoteDialog.cxx b/sd/source/ui/dlg/RemoteDialog.cxx
index 97b1f3c..fd60895 100644
--- a/sd/source/ui/dlg/RemoteDialog.cxx
+++ b/sd/source/ui/dlg/RemoteDialog.cxx
@@ -27,9 +27,10 @@ RemoteDialog::RemoteDialog( Window *pWindow ) :
 {
     (void) mPreviouslyDiscoverable; // avoid warnings about unused member
 
-#ifdef ENABLE_SDREMOTE
     FreeResource();
 
+#ifdef ENABLE_SDREMOTE
+
 #ifdef ENABLE_SDREMOTE_BLUETOOTH
     mPreviouslyDiscoverable = RemoteServer::isBluetoothDiscoverable();
     if ( !mPreviouslyDiscoverable )
@@ -45,11 +46,11 @@ RemoteDialog::RemoteDialog( Window *pWindow ) :
     {
         mClientBox.addEntry( *aIt );
     }
+#endif
 
     mButtonConnect.SetClickHdl( LINK( this, RemoteDialog, HandleConnectButton ) );
     SetCloseHdl( LINK( this, RemoteDialog, CloseHdl ) );
     mButtonCancel.SetClickHdl( LINK( this, RemoteDialog, CloseHdl ) );
-#endif
 }
 
 RemoteDialog::~RemoteDialog()
@@ -84,8 +85,8 @@ IMPL_LINK_NOARG( RemoteDialog, CloseHdl )
     {
         RemoteServer::setBluetoothDiscoverable( false );
     }
-    Close();
 #endif
+    Close();
     return 0;
 }
 
commit 478508a2410f1bff94af8ee9dfb1ea1e65cac09c
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue Jan 1 13:57:50 2013 +0200

    WaE: private field 'mPreviouslyDiscoverable' is not used
    
    Change-Id: Ib3f16646035fe29aa64608a17f1a3063f9ebde95
    Signed-off-by: Jan Holesovsky <kendy at suse.cz>

diff --git a/sd/source/ui/dlg/RemoteDialog.cxx b/sd/source/ui/dlg/RemoteDialog.cxx
index d5c66ca..97b1f3c 100644
--- a/sd/source/ui/dlg/RemoteDialog.cxx
+++ b/sd/source/ui/dlg/RemoteDialog.cxx
@@ -25,6 +25,8 @@ RemoteDialog::RemoteDialog( Window *pWindow ) :
     mClientBox(         this, NULL, SdResId( LB_SERVERS ) ),
     mPreviouslyDiscoverable()
 {
+    (void) mPreviouslyDiscoverable; // avoid warnings about unused member
+
 #ifdef ENABLE_SDREMOTE
     FreeResource();
 
@@ -47,8 +49,6 @@ RemoteDialog::RemoteDialog( Window *pWindow ) :
     mButtonConnect.SetClickHdl( LINK( this, RemoteDialog, HandleConnectButton ) );
     SetCloseHdl( LINK( this, RemoteDialog, CloseHdl ) );
     mButtonCancel.SetClickHdl( LINK( this, RemoteDialog, CloseHdl ) );
-#else
-    (void) mPreviouslyDiscoverable; // avoid warnings about unused member
 #endif
 }
 
commit a925e55a00c51925b8714511c6c40583b3442734
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Wed Feb 6 10:29:15 2013 +0000

    sdremote - enable volume control slide-switching by default.
    
    This is far and away the easiest way to switch slide. The coverflow
    with it's physics / momentum is really no-where near as useful.
    
    Signed-off-by: Jan Holesovsky <kendy at suse.cz>

diff --git a/android/sdremote/res/xml/preferences.xml b/android/sdremote/res/xml/preferences.xml
index ad7b1b3..292c851 100644
--- a/android/sdremote/res/xml/preferences.xml
+++ b/android/sdremote/res/xml/preferences.xml
@@ -3,7 +3,7 @@
 
     <!-- <SwitchPreference android:defaultValue="false" android:title="@string/options_autodecline" android:key="option_autodecline"/> -->
     <CheckBoxPreference
-        android:defaultValue="false"
+        android:defaultValue="true"
         android:key="option_volumeswitching"
         android:summary="@string/options_volumeswitching_descripton"
         android:title="@string/options_volumeswitching" />
commit ad34704ad00f92845f60525dd09abcca8bcd125b
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Wed Jan 30 19:42:32 2013 +1100

    sdremote - don't let incoming thumbnails crash us if we switched view.
    
    Signed-off-by: Jan Holesovsky <kendy at suse.cz>

diff --git a/android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java b/android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java
index 555d3e1..9ad3b79 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java
@@ -148,7 +148,8 @@ public class PresentationFragment extends SherlockFragment {
         LocalBroadcastManager
                         .getInstance(getActivity().getApplicationContext())
                         .unregisterReceiver(mListener);
-
+        mTopView = null;
+        mContext = null;
     }
 
     private void updateSlideNumberDisplay(int aPosition) {
@@ -259,6 +260,9 @@ public class PresentationFragment extends SherlockFragment {
 
         @Override
         public void onReceive(Context aContext, Intent aIntent) {
+
+            if (mTopView == null || mTopView.getAdapter() == null)
+                return;
             if (aIntent.getAction().equals(
                             CommunicationService.MSG_SLIDE_CHANGED)) {
                 int aSlide = aIntent.getExtras().getInt("slide_number");
@@ -271,10 +275,8 @@ public class PresentationFragment extends SherlockFragment {
                 mTopView.setSelection(aSlide, true);
             } else if (aIntent.getAction().equals(
                             CommunicationService.MSG_SLIDE_PREVIEW)) {
-                // int aNSlide = aIntent.getExtras().getInt("slide_number");
-                ((ThumbnailAdapter) mTopView.getAdapter())
-                                .notifyDataSetChanged();
-                //                mTopView.requestLayout();
+                ThumbnailAdapter aThumbAdaptor = (ThumbnailAdapter) mTopView.getAdapter();
+                aThumbAdaptor.notifyDataSetChanged();
             } else if (aIntent.getAction().equals(
                             CommunicationService.MSG_SLIDE_NOTES)) {
                 int aPosition = aIntent.getExtras().getInt("slide_number");
diff --git a/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java b/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java
index c7731ee..dace201 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java
@@ -155,6 +155,8 @@ public class ThumbnailFragment extends SherlockFragment {
 
         @Override
         public void onReceive(Context aContext, Intent aIntent) {
+            if (mGrid == null)
+                return;
             if (aIntent.getAction().equals(
                             CommunicationService.MSG_SLIDE_CHANGED)) {
                 int aSlide = aIntent.getExtras().getInt("slide_number");
@@ -234,4 +236,4 @@ public class ThumbnailFragment extends SherlockFragment {
         }
     }
 }
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list