Class: Smartdict::Gui::StatusIcon
- Inherits:
-
Gtk::StatusIcon
- Object
- Gtk::StatusIcon
- Smartdict::Gui::StatusIcon
- Defined in:
- lib/smartdict/gui/status_icon.rb
Instance Method Summary collapse
-
#initialize(controller) ⇒ StatusIcon
constructor
A new instance of StatusIcon.
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() self.pixbuf = Gdk::Pixbuf.new(Smartdict::Icons.logo) signal_connect('activate'){@controller.toggle_visibility} ##Show menu on rigth click self.signal_connect('popup-menu'){|tray, , time| @menu.popup(nil, nil, , time)} end |