diff pyink/FSM_window.py @ 1515:e963793c9793

Show component name at status bar of FSM editor window
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 11 May 2011 00:11:24 +0800
parents 5d4c7ec05bcd
children 7d6d77992aba
line wrap: on
line diff
--- a/pyink/FSM_window.py	Wed May 11 00:05:59 2011 +0800
+++ b/pyink/FSM_window.py	Wed May 11 00:11:24 2011 +0800
@@ -207,12 +207,13 @@
         builder = gtk.Builder()
         builder.add_from_file(fname)
 
-        main_win = builder.get_object("FSM_main_win")
+        main_win = builder.get_object('FSM_main_win')
+        comp_name_label = builder.get_object('comp_name')
         view_box = builder.get_object("view_box")
         add_state_button = builder.get_object('add_state')
         move_state_button = builder.get_object('move_state')
         
-        state_editor = builder.get_object("state_editor")
+        state_editor = builder.get_object('state_editor')
         state_name = builder.get_object('state_name')
         state_radius = builder.get_object('state_radius')
         state_entry_action = builder.get_object('state_entry_action')
@@ -249,6 +250,7 @@
 
         self._state_menu = state_menu
         self._transition_menu = transition_menu
+        self._comp_name_label = comp_name_label
         pass
 
     def show_error(self, msg):
@@ -2304,6 +2306,7 @@
     def switch_component(self, comp_name):
         self._compview.switch_component(comp_name)
         self._comp_name = comp_name
+        self._comp_name_label.set_text(comp_name)
         pass
 
     def current_component(self):