lib/rabbit/action.rb in rabbit-2.2.1 vs lib/rabbit/action.rb in rabbit-3.0.0

- old
+ new

@@ -1,7 +1,25 @@ -require 'rabbit/gtk' +# Copyright (C) 2005-2017 Kouhei Sutou <kou@cozmixng.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +require "rabbit/gtk" + +Gtk.init if Gtk.respond_to?(:init) + module Gtk class Action alias _activate activate def activate(&block) @block = block @@ -127,17 +145,18 @@ canvas.logger.warn($!) end end end - dir = ::File.join("rabbit", "action") - require_files_under_directory_in_load_path(dir) - module_function def update_processing_action_status(canvas) canvas.action("ToggleIndexMode").sensitive = !canvas.processing? canvas.action("CacheAllSlides").sensitive = !canvas.processing? canvas.action("SaveAsImage").sensitive = !canvas.processing? canvas.action("Print").sensitive = !canvas.processing? end end end + +require "rabbit/action/basic" +require "rabbit/action/radio" +require "rabbit/action/toggle"