Class: GtkGimdb::MovieBox::UserCheckButton
- Inherits:
-
Gtk::CheckButton
- Object
- Gtk::CheckButton
- GtkGimdb::MovieBox::UserCheckButton
- Defined in:
- lib/gimdb/movie_box.rb
Instance Method Summary (collapse)
-
- (UserCheckButton) initialize(user, movie, what)
constructor
A new instance of UserCheckButton.
Constructor Details
- (UserCheckButton) initialize(user, movie, what)
A new instance of UserCheckButton
110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/gimdb/movie_box.rb', line 110 def initialize(user, movie, what) super() self.active = movie.get_users(what).include?(user) self.signal_connect('toggled') do |b| if b.active? movie.set_user(user, what) else movie.remove_user(user, what) end end end |