Sha256: 6eef68f1501beea28f3572a868f906b03697e0d751d70acba8bd55d06894fd24
Contents?: true
Size: 814 Bytes
Versions: 1
Compression:
Stored size: 814 Bytes
Contents
# Volay module module Volay # Utils class class Utils attr_reader :app ## # Initialize utils class # # @param [Gtk::Builder] app Application # def initialize(app) @app = app end ## # Change status icon stock # def update_status_icon icon = status_icon @app.get_object('status_icon') .set_stock(icon) @app.get_object('toggle_mute').set_active(@app.mixer.muted?) @app.get_object('toggle_mute_image') .set_stock(icon) end def status_icon case @app.mixer.percent when 66..100 icon = 'volume-high' when 33..65 icon = 'volume-medium' when 0..32 icon = 'volume-low' end unless @app.mixer.muted? icon.nil? ? 'volume-muted' : icon end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
volay-1.0.1 | lib/volay/utils.rb |