File tree 2 files changed +37
-0
lines changed
2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <glade-interface >
3
+ <!-- interface-requires gtk+ 2.24 -->
4
+ <!-- interface-naming-policy project-wide -->
5
+ <widget class =" GtkWindow" id =" window" >
6
+ <property name =" visible" >True</property >
7
+ <property name =" can_focus" >False</property >
8
+ <signal name =" destroy" handler =" on_window_destroy" after =" yes" />
9
+ <child >
10
+ <widget class =" GtkButton" id =" button" >
11
+ <property name =" label" translatable =" yes" >hello, world!</property >
12
+ <property name =" visible" >True</property >
13
+ <property name =" can_focus" >True</property >
14
+ <property name =" receives_default" >True</property >
15
+ <property name =" use_action_appearance" >False</property >
16
+ </widget >
17
+ </child >
18
+ </widget >
19
+ </glade-interface >
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+
3
+ import gtk
4
+ import gtk .glade
5
+
6
+
7
+ def on_button_clicked (w , * args ):
8
+ w .set_label ("you poked me!" )
9
+ w .connect ("clicked" , gtk .main_quit )
10
+
11
+
12
+ xml = gtk .glade .XML ('hw.glade' )
13
+ window = xml .get_widget ('window' )
14
+ window .connect ("delete_event" , gtk .main_quit )
15
+ button = xml .get_widget ('button' )
16
+ button .connect ("clicked" , on_button_clicked )
17
+ window .show_all ()
18
+ gtk .main ()
You can’t perform that action at this time.
0 commit comments