cifrado r78 - in trunk: . package/cifrado



Author: bersace
Date: Fri Apr  4 14:29:28 2008
New Revision: 78
URL: http://svn.gnome.org/viewvc/cifrado?rev=78&view=rev

Log:
Utiliser GtkTextBuffer::changed plutÃt que GtkTextView::focus-out-event.


Modified:
   trunk/ChangeLog
   trunk/package/cifrado/cifrado.py

Modified: trunk/package/cifrado/cifrado.py
==============================================================================
--- trunk/package/cifrado/cifrado.py	(original)
+++ trunk/package/cifrado/cifrado.py	Fri Apr  4 14:29:28 2008
@@ -59,7 +59,6 @@
             # jeu
             'on_jeu_nb_chefs_champ_value_changed':      self.on_jeu_nb_chefs_champ_value_changed,
             'on_jeu_nom_champ_changed':                 self.on_jeu_nom_champ_changed,
-            'on_jeu_trame_champ_focus_out_event':       self.on_jeu_trame_champ_focus_out_event,
             # force
             'on_force_nv_btn_clicked':                  self.on_force_nv_btn_clicked,
             'on_force_nom_edited':                      self.on_force_nom_edited,
@@ -72,7 +71,6 @@
             'on_msg_nv_btn_clicked':                    self.on_msg_nv_btn_clicked,
             'on_msg_impr_btn_clicked':                  self.on_msg_impr_btn_clicked,
             'on_msg_suppr_btn_clicked':                 self.on_msg_suppr_btn_clicked,
-            'on_msg_champ_focus_out_event':             self.on_msg_champ_focus_out_event,
             # emissions
             'on_em_dest_select_changed':                self.on_em_dest_select_changed,
             'on_em_env_champ_toggled':                  self.on_em_env_champ_toggled,
@@ -96,6 +94,9 @@
         self.glade.signal_autoconnect(dic)
         self.glade.get_widget('msg_liste').get_selection().connect('changed', self.on_msg_selected)
 
+        self.glade.get_widget('jeu_trame_champ').get_buffer().connect('changed', self.on_trame_changed)
+        self.glade.get_widget('msg_champ').get_buffer().connect('changed', self.on_msg_changed)
+
         # FORCES
         liste = self.glade.get_widget('forces_liste')
 
@@ -459,8 +460,6 @@
         self.sync(True)
 
 
-
-
     def get_msg_crt(self):
         liste = self.glade.get_widget('msg_liste')
         sel = liste.get_selection()
@@ -496,8 +495,7 @@
         self.jeu.nb_chefs= bouton.get_value_as_int()
         self.sync(False)
 
-    def on_jeu_trame_champ_focus_out_event(self, widget, event):
-        tampon = widget.get_buffer()
+    def on_trame_changed(self, tampon):
         self.jeu.trame = tampon.get_text(tampon.get_start_iter(),
                                          tampon.get_end_iter())
         self.sync(False)
@@ -620,8 +618,7 @@
             self.jeu.messages.remove(iter)
         self.sync(False)
 
-    def on_msg_champ_focus_out_event(self, champ, event):
-        tampon = champ.get_buffer()
+    def on_msg_changed(self, tampon):
         self.get_msg_crt().message = tampon.get_text(tampon.get_start_iter(),
                                                          tampon.get_end_iter())
         self.sync(False)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]