gtk3app 1.4.0 → 1.5.1

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: 169460b6e138bf15bd30d2ea36d31e4e813394c8
4
- data.tar.gz: 3ebd9eb5acb24a96c9b86bf41a8146d6b0bb323a
3
+ metadata.gz: e733fb2494133e2014b34f8d18c593c8d754eb22
4
+ data.tar.gz: b9df462fa64dd5aa4ea824fd61cce1a30048bf19
5
5
  SHA512:
6
- metadata.gz: ad83ecb96ff961283b30095a2d7be9b5f68ef1add4e3a961696849b21837c08b1bc5c1196c5f5f5a0c2a2f8508603325b0cba3f010b693bac083198bfd4892bb
7
- data.tar.gz: 389c1039cc9da16c61323ab0c761417b7b11d3aec0d025dd5678e1f31721093a4278e7b8c8a609b9d41246991e0de42a259ca756ff8c00b84ce12ff7f8bb0d3d
6
+ metadata.gz: 92c5f35f910fbddfa0658735bf13bb396401eb68163c23234c693624ef93e6ce7b8bc05db9806b6fab7a77603532fc3cdb0378edd1d1b8130904bc24cc59b0c8
7
+ data.tar.gz: b5b85b1d0057061c0d887d902a3db408059b82241ebb73ae91e1a4f7ab795576048a3696f31c00e0008e79c0328a7b7405d77c70ef5275b9fc106f528843030d
data/README.rdoc CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  == DESCRIPTION:
6
6
 
7
- _Gtk3App_ provides a _Gtk3_ application stub.
7
+ Gtk3App provides a Gtk3 application stub.
8
8
 
9
9
  It automatically provides for command line options parsing, user configuration, and minime windows.
10
10
 
@@ -23,11 +23,10 @@ Given a module file such as ./my_app.rb, the module is expected to at leat provi
23
23
 
24
24
  That's enough to get you going.
25
25
  The three examples in the ./examples[https://github.com/carlosjhr64/gtk3app/tree/master/examples]
26
- directory fully explains the rest of what _Gtk3App_ can do for you.
26
+ directory fully explains the rest of what Gtk3App can do for you.
27
27
 
28
28
  == HELP:
29
29
 
30
- Warning: Gdk constants are missing.
31
30
  This is the gtk3app stub.
32
31
  Usage:
33
32
  gtk3app [options] appname ...
@@ -41,16 +40,16 @@ directory fully explains the rest of what _Gtk3App_ can do for you.
41
40
 
42
41
  == FEATURES:
43
42
 
44
- * _Such_[https://github.com/carlosjhr64/Such] wrappers.
45
- * _Rafini_[https://github.com/carlosjhr64/rafini] refinements.
46
- * _HelpParser_[https://github.com/carlosjhr64/help_parser] command line options parsing.
47
- * _UserSpace_[https://github.com/carlosjhr64/user_space] XDG support.
43
+ * Such[https://github.com/carlosjhr64/Such] wrappers.
44
+ * Rafini[https://github.com/carlosjhr64/rafini] refinements.
45
+ * HelpParser[https://github.com/carlosjhr64/help_parser] command line options parsing.
46
+ * UserSpace[https://github.com/carlosjhr64/user_space] XDG support.
48
47
  * MiniMe, an alternative to the deprecated Gtk::StatusIcon.
49
48
  * Popup Application Menu from window button 3 press event (standard left click on application).
50
49
 
51
50
  == INSTALL:
52
51
 
53
- $ sudo gem install gtk3applib
52
+ $ sudo gem install gtk3app
54
53
 
55
54
  == LICENSE:
56
55
 
data/data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.0
1
+ 1.5.1
data/lib/gtk3app.rb CHANGED
@@ -1,3 +1,8 @@
1
+ # Rogues
2
+
3
+ require 'json'
4
+ require 'psych'
5
+
1
6
  # Standard Libraries
2
7
 
3
8
  require 'yaml'
@@ -13,19 +18,6 @@ require 'sys/proctable'
13
18
  # Workhorse Gems
14
19
 
15
20
  require 'gtk3'
16
- begin
17
- # TODO: remove when fixed.
18
- Gdk::Selection::PRIMARY
19
- Gdk::Selection::CLIPBOARD
20
- Gdk::Event::BUTTON_PRESS_MASK
21
- rescue NameError
22
- # This is surely a bug in the 2.2.* releases.
23
- # Just patching what I need for now.
24
- puts "Warning: Gdk constants are missing."
25
- Gdk::Selection::PRIMARY ||= 1
26
- Gdk::Selection::CLIPBOARD ||= 69
27
- Gdk::Event::BUTTON_PRESS_MASK ||= 256
28
- end
29
21
 
30
22
  require 'such'
31
23
  Such::Things.gtk_widget
@@ -1,4 +1,5 @@
1
1
  module Gtk3App
2
+ using Rafini::String
2
3
 
3
4
  # The gem's root directory
4
5
  APPDIR = File.dirname File.dirname __dir__
@@ -74,7 +75,7 @@ HELP
74
75
  about!: [:ABOUT, :about, 'activate'],
75
76
  about_dialog: {
76
77
  set_program_name: 'Gtk3App',
77
- set_version: VERSION,
78
+ set_version: VERSION.semantic(0..1),
78
79
  set_copyright: '(c) 2014 CarlosJHR64',
79
80
  set_comments: 'A Gtk3 Application Stub',
80
81
  set_website: 'https://github.com/carlosjhr64/gtk3app',
@@ -49,7 +49,7 @@ module Gtk3App
49
49
  if @slot
50
50
  s = CONFIG[:SlotsScale]
51
51
  x, y = CONFIG[:SLOTS_OFFSET]
52
- w, h = Gdk.screen_width, Gdk.screen_height
52
+ w, h = Gdk::Screen.width, Gdk::Screen.height
53
53
  case CONFIG[:SlotsOrientation]
54
54
  when :horizontal
55
55
  @mini.move(w-@slot*s+x, h-s+y)
data/lib/gtk3app/slot.rb CHANGED
@@ -11,7 +11,7 @@ module Slot
11
11
  end
12
12
 
13
13
  def self.get
14
- alive = Sys::ProcTable.ps.select{|p|p.cmdline=~/\bruby\b.*\bgtk3app\b/}.map{|p|p.pid.to_s}.is(true)
14
+ alive = Sys::ProcTable.ps.select{|p|p.cmdline=~/ruby.*\bgtk3app\b/}.map{|p|p.pid.to_s}.is(true)
15
15
  Slot.dbm do |db|
16
16
  Slot.numbers do |slot|
17
17
  unless alive[db[slot]]
@@ -1,3 +1,3 @@
1
1
  module Gtk3App
2
- VERSION = '1.4.0'
2
+ VERSION = '1.5.1'
3
3
  end
@@ -16,7 +16,7 @@ module Widget
16
16
  class AppMenu < Menu
17
17
  def initialize(window, *par, &block)
18
18
  @block = block
19
- window.add_events(Gdk::Event::BUTTON_PRESS_MASK)
19
+ window.add_events(Gdk::EventMask::BUTTON_PRESS_MASK)
20
20
  window.signal_connect('button_press_event') do |w,e|
21
21
  if e.button == 3
22
22
  self.popup(nil, nil, 3, e.time)
metadata CHANGED
@@ -1,15 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtk3app
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - carlosjhr64
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-30 00:00:00.000000000 Z
11
+ date: 2015-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: json
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 1.8.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.8.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: psych
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 2.0.8
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 2.0.8
41
+ - !ruby/object:Gem::Dependency
42
+ name: gtk3
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
47
+ version: 3.0.7
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 3.0.7
13
55
  - !ruby/object:Gem::Dependency
14
56
  name: help_parser
15
57
  requirement: !ruby/object:Gem::Requirement
@@ -79,7 +121,7 @@ dependencies:
79
121
  version: '0.9'
80
122
  - - ">="
81
123
  - !ruby/object:Gem::Version
82
- version: 0.9.4
124
+ version: 0.9.9
83
125
  type: :runtime
84
126
  prerelease: false
85
127
  version_requirements: !ruby/object:Gem::Requirement
@@ -89,41 +131,27 @@ dependencies:
89
131
  version: '0.9'
90
132
  - - ">="
91
133
  - !ruby/object:Gem::Version
92
- version: 0.9.4
93
- - !ruby/object:Gem::Dependency
94
- name: gtk3
95
- requirement: !ruby/object:Gem::Requirement
96
- requirements:
97
- - - '='
98
- - !ruby/object:Gem::Version
99
- version: 2.2.0
100
- type: :runtime
101
- prerelease: false
102
- version_requirements: !ruby/object:Gem::Requirement
103
- requirements:
104
- - - '='
105
- - !ruby/object:Gem::Version
106
- version: 2.2.0
134
+ version: 0.9.9
107
135
  - !ruby/object:Gem::Dependency
108
136
  name: such
109
137
  requirement: !ruby/object:Gem::Requirement
110
138
  requirements:
111
139
  - - "~>"
112
140
  - !ruby/object:Gem::Version
113
- version: '0.2'
141
+ version: '0.3'
114
142
  - - ">="
115
143
  - !ruby/object:Gem::Version
116
- version: 0.2.1
144
+ version: 0.3.0
117
145
  type: :runtime
118
146
  prerelease: false
119
147
  version_requirements: !ruby/object:Gem::Requirement
120
148
  requirements:
121
149
  - - "~>"
122
150
  - !ruby/object:Gem::Version
123
- version: '0.2'
151
+ version: '0.3'
124
152
  - - ">="
125
153
  - !ruby/object:Gem::Version
126
- version: 0.2.1
154
+ version: 0.3.0
127
155
  description: |
128
156
  _Gtk3App_ provides a _Gtk3_ application stub.
129
157
 
@@ -169,12 +197,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
197
  - !ruby/object:Gem::Version
170
198
  version: '0'
171
199
  requirements:
172
- - 'ruby: ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-linux]'
200
+ - 'ruby: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]'
173
201
  - 'system: linux/bash'
174
202
  rubyforge_project:
175
- rubygems_version: 2.4.1
203
+ rubygems_version: 2.4.5.1
176
204
  signing_key:
177
205
  specification_version: 4
178
206
  summary: _Gtk3App_ provides a _Gtk3_ application stub.
179
207
  test_files: []
180
- has_rdoc: