import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

class MyWindow(Gtk.Window):

    M = ["Do not click here", "I said don't click here", "I'm warning you!", "I'm getting angry!", "Go click somewhere else!", "Click here if you're studpid"]

    def __init__(self):
        Gtk.Window.__init__(self, title="Angry Button")

        self.button = Gtk.Button(label="Don't Click Me")
        self.button.connect("clicked", self.on_button_clicked)
        self.add(self.button)  # add button to window
        self.counter = 0

    def on_button_clicked(self, widget):
        self.counter += 1
        label = MyWindow.M[(self.counter//2) % len(MyWindow.M)]
        self.button.set_label(label)

win = MyWindow()
win.connect("destroy", Gtk.main_quit)
win.show_all()
Gtk.main()
