#!/usr/bin/env python

import gtk

class Flash:
    def quit(self, widget, data=None):
        gtk.main_quit()

    def __init__(self):
        self.window = gtk.Window(gtk.WINDOW_POPUP)
        self.label = gtk.Label()
        self.label.set_markup ("<span size='xx-large' weight='bold'>CLICK ME TO QUIT!</span>")
        self.button = gtk.Button()
        self.button.add(self.label)
        self.label.show()
        self.button.connect("clicked", self.quit, None)
        self.window.add(self.button)
        self.window.realize()
        top = self.window.get_toplevel()
        screen = top.get_screen()
        monitor = screen.get_monitor_at_window(self.window.get_window())
        geom = screen.get_monitor_geometry(monitor)
        self.window.resize(geom.width, geom.height)
        self.window.set_opacity(0.6)
        self.button.show()
        self.window.show()

    def main(self):
        gtk.main()

if __name__ == "__main__":
    flash = Flash()
    flash.main()
