Develop and Download Open Source Software

Browse Subversion Repository

Contents of /event_handler/extra_command.rb

Parent Directory Parent Directory | Revision Log Revision Log


Revision 52 - (show annotations) (download)
Sun Apr 22 19:56:11 2007 UTC (16 years, 11 months ago) by bluedwarf
File size: 1362 byte(s)
New function to save buffer.

1 # extra_command.rb: the class definition of Edmaru::ExtraCommandHandler
2 #
3 # Copyright (C) 2007 Takashi Nakamoto
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License version 2 as
7 # published by the Free Software Foundation.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 # 02110-1301 USA.
18 #
19
20 require "event_handler/event_handler_base.rb"
21
22 module Edmaru
23 class ExtraCommandHandler
24 include EventHandlerBase
25
26 def init_action_table
27 @action_table = Hash.new
28
29 @action_table["KeyPress:control-c"] = Action.new("quit")
30 @action_table["KeyPress:control-f"] = Action.new("find-file")
31 @action_table["KeyPress:control-g"] = Action.new("extra-command-quit")
32 @action_table["KeyPress:control-s"] = Action.new("save-buffer")
33 end
34
35 def handle_unknown_event(event_name)
36 @action_manager.action(Action.new("extra-command-unknown", [event_name]))
37 end
38 end
39 end

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26