File oooqs-1.0_rc3-quit.patch of Package OpenOffice_org-Quickstarter

--- oooqs/oooqs.cpp
+++ oooqs/oooqs.cpp
@@ -44,6 +44,9 @@
 	popupMenu = new KPopupMenu(this);
 
 	aboutData = aboutDta;
+	
+	/* the instance is stoped on quit by default */
+	killInstance = true;
 
 	/** Set the OpenOffice icon */
 	setPixmap(Icon("oooqs"));
@@ -171,6 +174,10 @@
   config = KGlobal::config();
   config->setGroup("General options");
   config->writeEntry("autostart", false);
+  /* does the user want to stop the runnig instance on quit? */
+  if (instance.isRunning())
+	if (KMessageBox::questionYesNo(NULL, i18n("There is still a quickstart-instance of %1 running.\nDo you want to kill it now?\n\nMake sure you close all your %2 documents before answering yes!").arg(suite).arg(suite), i18n("Running instance of %1 detected").arg(suite)) != 3)
+		 killInstance = false;
   /* real quit */
   kapp->quit();
 }
@@ -657,7 +664,7 @@
 
 /** Kills the OpenOffice.org Quickstart-Instance. */
 void OooQs::killQuickstart(){
-	if (instance.isRunning())
+	if ((instance.isRunning()) && (killInstance))
 		instance.kill();
 }
 /** Return the actionCollection. */
--- oooqs/oooqs.h
+++ oooqs/oooqs.h
@@ -53,6 +53,8 @@
 private: // Private attributes
 	/** Saves a pointer to the aboutData */
 	KAboutData* aboutData;
+	/** Enable to kill the quiststart instance on quit */
+	bool killInstance;
 	/** Saves the OpenOffice.org icon */
 	KPixmap icon;
 	/** The actionCollection containing the contextmenu-entrys */
openSUSE Build Service is sponsored by