[Kazehakase-cvs] CVS update: kazehakase/data/ext/ruby/kz

Back to archive index

Kouhei Sutou kous****@users*****
Wed May 10 15:32:38 JST 2006


Index: kazehakase/data/ext/ruby/kz/ruby-dialog.rb
diff -u kazehakase/data/ext/ruby/kz/ruby-dialog.rb:1.5 kazehakase/data/ext/ruby/kz/ruby-dialog.rb:1.6
--- kazehakase/data/ext/ruby/kz/ruby-dialog.rb:1.5	Wed May 10 15:26:49 2006
+++ kazehakase/data/ext/ruby/kz/ruby-dialog.rb	Wed May 10 15:32:38 2006
@@ -184,12 +184,9 @@
       handled = false
       case event.keyval
       when Gdk::Keyval::GDK_Return
-        text =****@entry*****
-        unless text.empty?
-          eval_print(text)
-          update_history(text)
-        end
-        @entry.text = ""
+        activate_input
+      when Gdk::Keyval::GDK_m
+        activate_input if event.state.control_mask?
       when Gdk::Keyval::GDK_p
         handled = previous_history if event.state.control_mask?
       when Gdk::Keyval::GDK_Up
@@ -204,6 +201,15 @@
       handled
     end
 
+    def activate_input
+      text =****@entry*****
+      unless text.empty?
+        eval_print(text)
+        update_history(text)
+      end
+      @entry.text = ""
+    end
+
     def update_history(text)
       if @@history.last != text
         @@history << text


More information about the Kazehakase-cvs mailing list
Back to archive index