Class: Smartdict::Gui::StatusIcon

Inherits:
Gtk::StatusIcon
  • Object
show all
Defined in:
lib/smartdict/gui/status_icon.rb

Instance Method Summary collapse

Constructor Details

#initialize(controller) ⇒ StatusIcon

Returns a new instance of StatusIcon.



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/smartdict/gui/status_icon.rb', line 4

def initialize(controller)
  @controller = controller
  super()

  build_menu
  self.pixbuf = Gdk::Pixbuf.new(Smartdict::Icons.)

  signal_connect('activate'){@controller.toggle_visibility}

  ##Show menu on rigth click
  self.signal_connect('popup-menu'){|tray, button, time| @menu.popup(nil, nil, button, time)}
end