/usr/share/system-config-lvm/WaitMsg.py is in system-config-lvm 1.1.18-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | import gtk
class WaitMsg:
def __init__(self, message):
self.displayed = False
self.msg = message
def show(self):
self.dlg = gtk.MessageDialog(None, 0,
gtk.MESSAGE_INFO, gtk.BUTTONS_NONE,
self.msg)
self.dlg.set_modal(True)
self.dlg.show_now()
self.displayed = True
# change cursor
cursor = gtk.gdk.Cursor(gtk.gdk.WATCH)
self.dlg.get_root_window().set_cursor(cursor)
self.refresh()
self.refresh()
self.refresh()
def hide(self):
if self.displayed:
self.dlg.destroy()
self.displayed = False
# revert cursor
cursor = gtk.gdk.Cursor(gtk.gdk.LEFT_PTR)
self.dlg.get_root_window().set_cursor(cursor)
self.refresh()
def refresh(self):
while gtk.events_pending():
gtk.main_iteration(False)
|