File: tabtoolbar.rb

package info (click to toggle)
mikutter 5.0.4%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,700 kB
  • sloc: ruby: 21,307; sh: 181; makefile: 19
file content (25 lines) | stat: -rw-r--r-- 586 bytes parent folder | download
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
# -*- coding: utf-8 -*-

module Plugin::Gtk3
  class TabToolbar < Gtk::Grid
    def initialize(imaginally)
      type_strict imaginally => Plugin::GUI::TabToolbar
      @imaginally = imaginally
      super()
    end

    def set_button
      self.children.each(&method(:remove))
      current_world, = Plugin.filtering(:world_current, nil)
      ToolbarGenerator.generate(
        self,
        Plugin::GUI::Event.new(
          event: :tab_toolbar,
          widget: @imaginally.parent,
          messages: [],
          world: current_world
        ),
        :tab)
    end
  end
end