bugfix: safety against breaking the AI if you press undo while it's thinking
[kaya.git] / lib / kaya_ui.rb
blob2e902177153e1567db46299dab3edbc0ae96490f
1 # Copyright (c) 2009 Paolo Capriotti <p.capriotti@gmail.com>
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 require 'toolkit'
10 module Kaya
11   GUI = KDE::gui(:kaya) do |g|
12     g.menu_bar do |mb|
13       mb.menu(:game, :text => KDE::i18n("&Game")) do |m|
14         m.action :open_new
15         m.separator
16         m.action :open
17         m.action :save
18         m.action :save_as
19         m.separator
20         m.group :file_extensions
21         m.separator
22         m.action :quit
23       end
24       
25       mb.menu(:edit, :text => KDE::i18n("&Edit")) do |m|
26         m.action :undo
27         m.action :redo
28       end
29       
30       mb.menu(:move, :text => KDE::i18n("&Move")) do |m|
31         m.action :begin
32         m.action :back
33         m.action :pause
34         m.action :forward
35         m.action :end
36         m.separator
37         m.group :game_extensions
38         m.separator
39         m.action_list :game_actions
40       end
41       
42       mb.menu(:viewMenu, :text => KDE::i18n("&View")) do |m|
43         m.action :flip
44         m.action :toggle_console
45         m.action :toggle_history
46       end
47       
48       mb.menu(:settings) do |m|
49         m.action :preferences
50         m.action :configure_engines
51         m.action :configure_themes
52       end
53     end
54     
55     g.tool_bar(:main_toolbar, :text => KDE::i18n("&Main toolbar")) do |tb|
56       tb.action :open_new
57       tb.action :open
58       tb.action :save
59     end
60     
61     g.tool_bar(:edit_toolbar, :text => KDE::i18n("&Edit toolbar")) do |tb|
62       tb.action :undo
63       tb.action :redo
64     end
65     
66     g.tool_bar(:move_toolbar, :text => KDE::i18n("Mo&ve Toolbar")) do |tb|
67       tb.action :begin
68       tb.action :back
69       tb.action :pause
70       tb.action :forward
71       tb.action :end
72     end
73   end
74 end