Class: Aniview::View::DelugeMenu
- Includes:
- Util
- Defined in:
- lib/aniview/view/delugemenu.rb
Instance Attribute Summary
Attributes inherited from Menu
Instance Method Summary collapse
Methods included from Util
decode_object, encode_object, error_message, format_duration, format_progress, format_size, parse_format, readline
Methods inherited from Menu
#adjustView, #auto_update, #change_screen_size, #color, #control, #draw, #expand, #fixCursor, #getLen, #initialize, #interface, #moveCursor, #pause, #refresh, #refreshFormats, #resolve_selected, #setFormat, #setName, #setRfunc, #unpause, #updated!, #updated?
Constructor Details
This class inherits a constructor from Aniview::View::Menu
Instance Method Details
#customControl(key, sel) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/aniview/view/delugemenu.rb', line 15 def customControl(key, sel) if @items != nil and @items.length > 0 item = @items.values[sel["out"]] else item = "" end if key == @pref.get("keybindings")["torrents_pause"] @interface.toggleTorrent(item) elsif key == @pref.get("keybindings")["torrents_remove"] @interface.removeTorrent(item, false) elsif key == @pref.get("keybindings")["torrents_remove_data"] @interface.removeTorrent(item, true) elsif key == "+" pause newval = Util.readline(@term, "mag:", "") @interface.addTorrent newval, Dir.home + "/downloads/" unpause end end |
#refresh_attributes ⇒ Object
8 9 10 11 12 13 |
# File 'lib/aniview/view/delugemenu.rb', line 8 def refresh_attributes @attributes = { "t" => @attributes["t"], "s" => @interface.getStatus } end |