[Libreoffice-commits] .: 2 commits - desktop/source sfx2/source

Michael Meeks mmeeks at kemper.freedesktop.org
Mon Oct 11 08:56:43 PDT 2010


 desktop/source/app/cmdlineargs.cxx   |    2 +-
 desktop/source/app/cmdlinehelp.cxx   |    2 +-
 desktop/source/app/makefile.mk       |    4 ++++
 sfx2/source/appl/shutdownicon.cxx    |    2 +-
 sfx2/source/appl/shutdowniconunx.cxx |    9 +++++++--
 5 files changed, 14 insertions(+), 5 deletions(-)

New commits:
commit 45beae272a78970d5911292d8794b60f00beaafb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 11 16:48:57 2010 +0100

    more quickstarter fixes i#108846

diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index c75f391..7cb8ec0 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -568,8 +568,8 @@ void ShutdownIcon::terminateDesktop()
         return;
         
     // always remove ourselves as listener
-    xDesktop->removeTerminateListener( pInst );
     pInst->m_bListenForTermination = true;
+    xDesktop->removeTerminateListener( pInst );
 
     // terminate desktop only if no tasks exist
     Reference< XFramesSupplier > xSupplier( xDesktop, UNO_QUERY );
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index de231b1..25660d0 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -37,6 +37,7 @@ static ResMgr *pVCLResMgr;
 static EggTrayIcon *pTrayIcon;
 static GtkWidget *pExitMenuItem = NULL;
 static GtkWidget *pOpenMenuItem = NULL;
+static GtkWidget *pDisableMenuItem = NULL;
 
 static void open_url_cb( GtkWidget *, gpointer data )
 {
@@ -65,8 +66,10 @@ static void systray_disable_cb()
 static void exit_quickstarter_cb( GtkWidget * )
 {
     egg_tray_icon_cancel_message (pTrayIcon, 1 );
-    ShutdownIcon::getInstance()->terminateDesktop();
     plugin_shutdown_sys_tray();
+    //terminate may cause this .so to be unloaded. So we must be hands off
+    //all calls into this .so after this call
+    ShutdownIcon::terminateDesktop();
 }
 
 static void menu_deactivate_cb( GtkWidget *pMenu )
@@ -263,7 +266,7 @@ static void populate_menu( GtkWidget *pMenu )
     pMenuItem = gtk_separator_menu_item_new();
     gtk_menu_shell_append( pMenuShell, pMenuItem );
 
-    (void) add_image_menu_item
+    pDisableMenuItem = add_image_menu_item
         ( pMenuShell, GTK_STOCK_CLOSE,
           pShutdownIcon->GetResString( STR_QUICKSTART_PRELAUNCH_UNX ),
           G_CALLBACK( systray_disable_cb ) );
@@ -287,6 +290,7 @@ static void refresh_menu( GtkWidget *pMenu )
     bool bModal = ShutdownIcon::bModalMode;
     gtk_widget_set_sensitive( pExitMenuItem, !bModal);
     gtk_widget_set_sensitive( pOpenMenuItem, !bModal);
+    gtk_widget_set_sensitive( pDisableMenuItem, !bModal);
 }
 
 extern "C" {
@@ -402,6 +406,7 @@ void SAL_DLLPUBLIC_EXPORT plugin_shutdown_sys_tray()
     pTrayIcon = NULL;
     pExitMenuItem = NULL;
     pOpenMenuItem = NULL;
+    pDisableMenuItem = NULL;
 }
 
 #endif // ENABLE_QUICKSTART_APPLET
commit 3ae112b753a71d32de70ee96afbe942b9aa7731c
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Mon Oct 11 16:47:39 2010 +0100

    Fix -quickstart option, and help (i#108846)

diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 8c93f46..7f3d141 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -450,7 +450,7 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
     }
     else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-quickstart" )) == sal_True )
     {
-#if defined(WNT) || defined(OS2) || defined(QUARTZ)
+#if defined(ENABLE_QUICKSTART_APPLET)
         SetBoolParam_Impl( CMD_BOOLPARAM_QUICKSTART, sal_True );
 #endif
         SetBoolParam_Impl( CMD_BOOLPARAM_NOQUICKSTART, sal_False );
diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx
index 0869565..a0ffd0b 100644
--- a/desktop/source/app/cmdlinehelp.cxx
+++ b/desktop/source/app/cmdlinehelp.cxx
@@ -83,7 +83,7 @@ namespace desktop
         "keep startup bitmap minimized.\n"\
         "no startup screen, no default document and no UI.\n"\
         "suppress restart/restore after fatal errors.\n"\
-        "starts the quickstart service (only available on windows and OS/2 platform)\n"\
+        "starts the quickstart service\n"\
         "don't show startup screen.\n"\
         "don't check for remote instances using the installation\n"\
         "don't start with an empty document\n"\
diff --git a/desktop/source/app/makefile.mk b/desktop/source/app/makefile.mk
index 085d852..e69b387 100644
--- a/desktop/source/app/makefile.mk
+++ b/desktop/source/app/makefile.mk
@@ -53,6 +53,10 @@ CFLAGS+=-DGNOME_VFS_ENABLED
 # DEPLOYMENTMISCLIB = -ldeploymentmisc$(DLLPOSTFIX)
 # .ENDIF
 
+.IF "$(GUI)"=="WNT" || "$(GUI)"=="OS2" || "$(GUIBASE)"=="aqua" || "$(ENABLE_SYSTRAY_GTK)"=="TRUE"
+CFLAGS+=-DENABLE_QUICKSTART_APPLET
+.ENDIF
+
 SHL1TARGET = sofficeapp
 SHL1OBJS = \
     $(SLO)$/app.obj \


More information about the Libreoffice-commits mailing list