#!/usr/bin/python

from gi.repository import Gtk

def on_button_clicked(button, user_data):
    print("Label text: %s" % user_data.get_text())

handlers = {"on_button_clicked": on_button_clicked,
            "on_delete_event": Gtk.main_quit }

builder = Gtk.Builder.new_from_file("user_data.glade")
builder.connect_signals(handlers)
window = builder.get_object("window")
window.connect("delete-event", Gtk.main_quit)
window.show_all()

Gtk.main()
