* [gentoo-commits] gentoo-x86 commit in app-portage/elogviewer/files: elogviewer-0.5.2-clear_warning.patch
@ 2008-04-25 2:19 Christian Faulhammer (opfer)
0 siblings, 0 replies; only message in thread
From: Christian Faulhammer (opfer) @ 2008-04-25 2:19 UTC (permalink / raw
To: gentoo-commits
opfer 08/04/25 02:19:30
Added: elogviewer-0.5.2-clear_warning.patch
Log:
add a warning when all files are about to be cleared, patch contributed by James Blanding <ilikepi AT gmail DOT com> in bug 218978
(Portage version: 2.1.4.4)
Revision Changes Path
1.1 app-portage/elogviewer/files/elogviewer-0.5.2-clear_warning.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-portage/elogviewer/files/elogviewer-0.5.2-clear_warning.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-portage/elogviewer/files/elogviewer-0.5.2-clear_warning.patch?rev=1.1&content-type=text/plain
Index: elogviewer-0.5.2-clear_warning.patch
===================================================================
--- elogviewer.orig 2008-04-24 17:41:01.000000000 -0400
+++ elogviewer 2008-04-24 18:59:09.000000000 -0400
@@ -47,6 +47,10 @@
Christian Faulhammer (V-Li) has written the man page.
'''
+_clearwarn = '''
+<big>WARNING:</big> Are you sure you want to clear all entries? This will permanently delete all elog files!
+'''
+
# Redirect messages to stderr
import sys
@@ -435,6 +439,23 @@
self.destroy()
+class ClearPrompt(gtk.MessageDialog):
+
+ def __init__(self):
+ gtk.MessageDialog.__init__(self,
+ parent=None,
+ #flasgs=0,
+ type=gtk.MESSAGE_WARNING,
+ buttons=gtk.BUTTONS_YES_NO,
+ message_format=None)
+ self.set_markup ( _clearwarn )
+
+ def do_prompt(self):
+ response = self.run()
+ self.destroy()
+ return response
+
+
class ActionGroup(gtk.ActionGroup):
def __init__(self, activate_action):
@@ -641,7 +662,10 @@
if action == "Delete":
self.delete()
if action == "Clear":
- self.clear()
+ cp = ClearPrompt()
+ confirmation = cp.do_prompt()
+ if confirmation == gtk.RESPONSE_YES:
+ self.clear()
if action == "Refresh":
self.refresh()
if action == "Quit":
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-25 2:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-25 2:19 [gentoo-commits] gentoo-x86 commit in app-portage/elogviewer/files: elogviewer-0.5.2-clear_warning.patch Christian Faulhammer (opfer)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox