volay 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -4
- data/README.md +1 -1
- data/glade/volay.glade +1 -0
- data/lib/volay/utils.rb +10 -8
- data/lib/volay/version.rb +1 -1
- data/lib/volay/widget/system_tray.rb +11 -0
- data/volay.gemspec +2 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3642161520ea465b1c2593a913593fd00ce9037
|
4
|
+
data.tar.gz: 02c6cb3128ff4ac554dd9123d52fc5ee9a1e75e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03a28e5a4a6b8404ba849b0303f1ca5825e5baae672d6f7295f93b80c8e4e97faad8dd83b9ece29350768e8d0e9b75cb98c7b791fbecb138c6aeb756dd71630c
|
7
|
+
data.tar.gz: 26a6ba15b4a327bf539c27c53ae5f7d256583645f7fba8935d37afa808a79801818945805baea2be1ebc782685e29e84b26d4eeb24f98e59d8d2c27a414dae55
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
data/glade/volay.glade
CHANGED
@@ -49,6 +49,7 @@
|
|
49
49
|
<property name="decorated">False</property>
|
50
50
|
<property name="deletable">False</property>
|
51
51
|
<signal name="focus-out-event" handler="on_system_tray_window_focus_out_event" swapped="no"/>
|
52
|
+
<signal name="key-release-event" handler="on_system_tray_window_key_release_event" swapped="no"/>
|
52
53
|
<signal name="show" handler="on_system_tray_window_show" swapped="no"/>
|
53
54
|
<child>
|
54
55
|
<object class="GtkBox" id="volume_control_box">
|
data/lib/volay/utils.rb
CHANGED
@@ -26,14 +26,16 @@ module Volay
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def status_icon
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
29
|
+
unless @app.mixer.muted?
|
30
|
+
case @app.mixer.percent
|
31
|
+
when 66..100
|
32
|
+
icon = 'volume-high'
|
33
|
+
when 33..65
|
34
|
+
icon = 'volume-medium'
|
35
|
+
when 0..32
|
36
|
+
icon = 'volume-low'
|
37
|
+
end
|
38
|
+
end
|
37
39
|
|
38
40
|
icon.nil? ? 'volume-muted' : icon
|
39
41
|
end
|
data/lib/volay/version.rb
CHANGED
@@ -6,6 +6,7 @@ module Volay
|
|
6
6
|
class SystemTray < Events
|
7
7
|
LEFT_CLICK = 1
|
8
8
|
RIGHT_CLICK = 3
|
9
|
+
M_KEYCODE = 47
|
9
10
|
|
10
11
|
##
|
11
12
|
# When left click on the status icon, popup the window menu
|
@@ -32,6 +33,16 @@ module Volay
|
|
32
33
|
@app.get_object('system_tray_window').hide
|
33
34
|
end
|
34
35
|
|
36
|
+
##
|
37
|
+
# Check for M keycode to toggle mute
|
38
|
+
#
|
39
|
+
def on_system_tray_window_key_release_event(_widget, event)
|
40
|
+
return unless event.is_a?(Gdk::EventKey) &&
|
41
|
+
event.hardware_keycode == M_KEYCODE
|
42
|
+
@app.mixer.toggle
|
43
|
+
@app.utils.update_status_icon
|
44
|
+
end
|
45
|
+
|
35
46
|
##
|
36
47
|
# When right click on the status icon
|
37
48
|
#
|
data/volay.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.executables = ['volay']
|
13
13
|
s.files = File.read(File.expand_path('../MANIFEST', __FILE__)).split("\n")
|
14
14
|
|
15
|
-
s.required_ruby_version = '>=
|
15
|
+
s.required_ruby_version = '>= 2.0'
|
16
16
|
|
17
17
|
s.add_dependency 'mixlib-cli', '=1.5.0'
|
18
18
|
s.add_dependency 'mixlib-shellout', '~>2.2'
|
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
|
21
21
|
s.add_development_dependency 'fakefs', '~>0.6'
|
22
22
|
s.add_development_dependency 'rake', '~>10.5'
|
23
|
+
s.add_development_dependency 'rack', '~>1.6'
|
23
24
|
s.add_development_dependency 'rack-test', '~>0.6'
|
24
25
|
s.add_development_dependency 'rspec', '~>3.4'
|
25
26
|
s.add_development_dependency 'simplecov', '~>0.11'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: volay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pierre Rambaud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-cli
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '10.5'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rack
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.6'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.6'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: rack-test
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -193,7 +207,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
193
207
|
requirements:
|
194
208
|
- - ">="
|
195
209
|
- !ruby/object:Gem::Version
|
196
|
-
version:
|
210
|
+
version: '2.0'
|
197
211
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
198
212
|
requirements:
|
199
213
|
- - ">="
|
@@ -201,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
215
|
version: '0'
|
202
216
|
requirements: []
|
203
217
|
rubyforge_project:
|
204
|
-
rubygems_version: 2.
|
218
|
+
rubygems_version: 2.6.7
|
205
219
|
signing_key:
|
206
220
|
specification_version: 4
|
207
221
|
summary: The Volume system tray
|