I propose to add ability to remove pid file while startup dialog. It useful if there was system crash (reset etc) and it need to remove pid file manually.
--- gajim.py.orig	2006-06-14 00:28:58.000000000 +0400
+++ gajim.py	2006-06-14 00:28:08.000000000 +0400
@@ -147,15 +147,19 @@
 
 if os.path.exists(pid_filename):
 	pritext = _('Gajim is already running')
-	sectext = _('Exit the already running Gajim, or delete pid file:\n "%s".\n Quiting...' % pid_filename)
+	sectext = _('Another instance of Gajim is already running\nRun anyway?')
 	dlg = gtk.MessageDialog(None, 
 				gtk.DIALOG_DESTROY_WITH_PARENT | gtk.DIALOG_MODAL,
-				gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, message_format = pritext)
+				gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, message_format = pritext)
 
 	dlg.format_secondary_text(sectext)
-	dlg.run()
+	ret = dlg.run()
 	dlg.destroy()
-	sys.exit(3)
+
+	if ret == gtk.RESPONSE_YES:
+		os.remove(pid_filename)
+	else:
+		sys.exit(3)
 
 # Create pif file
 f = open(pid_filename, 'a')

_______________________________________________
Gajim-devel mailing list
Gajim-devel@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/gajim-devel

Reply via email to