File: kazehakase-init.rb

package info (click to toggle)
kazehakase 0.4.2-1etch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 7,260 kB
  • ctags: 7,377
  • sloc: ansic: 62,697; cpp: 13,422; sh: 9,083; ruby: 1,588; makefile: 1,026; xml: 372
file content (47 lines) | stat: -rw-r--r-- 764 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Gtk.init

module Kz
  DEFAULT_LOAD_PATH = $LOAD_PATH.dup

  class << self
    def reload(kz)
      barrier do
        if ENABLE
          $LOAD_PATH.clear
          $LOAD_PATH.concat(DEFAULT_LOAD_PATH)
          kz.ext_reload
        end
      end
    end

    def pop_statusbar(kz, id_or_name, timeout)
      Gtk.timeout_add(timeout) do
        barrier do
          kz.statusbar.set_text(nil, id_or_name)
          false
        end
      end
    end

    def setup(kz)
      barrier do
        kz.ext_setup
      end
    end
  end

  class Window
    def ext_setup
      Actions.init_actions(self)
    end

    def ext_reload
      Actions.reload_actions(self)
    end
  end
end

require "kz/gettext"
require "kz/utils"
require "kz/actions"
require "kz/sidebar"