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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd580ba8ac11f36e9f3e847750a0d4b51983f32b
4
- data.tar.gz: acd26736bdc28129060744495a8497fbf1192e3a
3
+ metadata.gz: c3642161520ea465b1c2593a913593fd00ce9037
4
+ data.tar.gz: 02c6cb3128ff4ac554dd9123d52fc5ee9a1e75e5
5
5
  SHA512:
6
- metadata.gz: 7a9c6e51712c4f66fdcc69f462996c992c42178ea1913d9b6cdf178be6ed13d5ab7863a018e2760682eccb6177a5d83a4b9d1c20851f92ec81b2d0ab1bfb59ce
7
- data.tar.gz: d17a5fce31b7fb69dde055ecaf547106e9842549133eb8156cba23aa2557b0195b690cb60ebacd97168675bc95daacd10426e82257e01e62c99421707b7c5038
6
+ metadata.gz: 03a28e5a4a6b8404ba849b0303f1ca5825e5baae672d6f7295f93b80c8e4e97faad8dd83b9ece29350768e8d0e9b75cb98c7b791fbecb138c6aeb756dd71630c
7
+ data.tar.gz: 26a6ba15b4a327bf539c27c53ae5f7d256583645f7fba8935d37afa808a79801818945805baea2be1ebc782685e29e84b26d4eeb24f98e59d8d2c27a414dae55
@@ -1,11 +1,13 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 2.0.0
5
- - 2.1.0
3
+ - 2.2.5
4
+ - 2.3.1
5
+
6
+ env:
7
+ global:
8
+ - DISPLAY=":99.0"
6
9
 
7
10
  before_install:
8
- - export DISPLAY=:99.0
9
11
  - sh -e /etc/init.d/xvfb start
10
12
 
11
13
  script: bundle exec rake
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ##Requirements
6
6
 
7
- * Ruby 1.9.3 or newer
7
+ * Ruby 2.0 or newer
8
8
 
9
9
  ##Installation
10
10
 
@@ -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">
@@ -26,14 +26,16 @@ module Volay
26
26
  end
27
27
 
28
28
  def status_icon
29
- case @app.mixer.percent
30
- when 66..100
31
- icon = 'volume-high'
32
- when 33..65
33
- icon = 'volume-medium'
34
- when 0..32
35
- icon = 'volume-low'
36
- end unless @app.mixer.muted?
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
@@ -1,4 +1,4 @@
1
1
  # Volay module
2
2
  module Volay
3
- VERSION = '1.0.1'.freeze
3
+ VERSION = '1.1.0'.freeze
4
4
  end
@@ -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
  #
@@ -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 = '>= 1.9.3'
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.1
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-06-28 00:00:00.000000000 Z
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: 1.9.3
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.5.1
218
+ rubygems_version: 2.6.7
205
219
  signing_key:
206
220
  specification_version: 4
207
221
  summary: The Volume system tray