gtk3app 4.0.210128 → 5.0.210201
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/gtk3app.rb +1 -1
- data/lib/gtk3app/config.rb +3 -1
- data/lib/gtk3app/program.rb +16 -6
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 998ff273c17d31c59b52a2b36cac570b143685c78b900e107892a215cd4c68e9
|
4
|
+
data.tar.gz: d9c2ac98caa06f707f304b58a5075d59bf64f3eb91fc5e897e1e4f986c9a718d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdca0b8d096c94ebb102d50706bd32a25948e47080b7c55cabefc2b72d9fcb638f43455c8593ab62d261745235ea9cbe239f3937b24ffd1c9d1a47464cce1c14
|
7
|
+
data.tar.gz: d0b968ac3ec3463aa83419c88b751ffc71a4491b15aaf514d45a4d835e4575c1419f9d4459c262f4a38070109d95a2153924a020aed757fd099a42b7060efcb5
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Gtk3App
|
2
2
|
|
3
|
-
* [VERSION
|
3
|
+
* [VERSION 5.0.210201](https://github.com/carlosjhr64/gtk3app/releases)
|
4
4
|
* [github](https://www.github.com/carlosjhr64/gtk3app)
|
5
5
|
* [rubygems](https://rubygems.org/gems/gtk3app)
|
6
6
|
|
data/lib/gtk3app.rb
CHANGED
data/lib/gtk3app/config.rb
CHANGED
@@ -16,7 +16,7 @@ module Gtk3App
|
|
16
16
|
# * Hashes are all lower case.
|
17
17
|
# * Lower case bang! keys have special meaning in Such.
|
18
18
|
# * Note that method keys may have mixed case as the method itself.
|
19
|
-
CONFIG = {
|
19
|
+
@@CONFIG = {
|
20
20
|
# Application SHOULD modify LOGO to use it's own logo image.
|
21
21
|
Logo: "#{UserSpace::XDG['data']}/gtk3app/logo.png",
|
22
22
|
# Scale logo to this size.
|
@@ -103,4 +103,6 @@ module Gtk3App
|
|
103
103
|
# s0 tells AppMenu not to connect to any signal, otherwise it assumes "clicked".
|
104
104
|
app_menu!: [:APP_MENU, :app_menu, s0],
|
105
105
|
}
|
106
|
+
CONFIG = lambda{|k| @@CONFIG[k]}
|
107
|
+
def CONFIG.to_h = @@CONFIG
|
106
108
|
end
|
data/lib/gtk3app/program.rb
CHANGED
@@ -7,15 +7,15 @@ class << self
|
|
7
7
|
@options = HelpParser[kw[:version], kw[:help]]
|
8
8
|
install(kw)
|
9
9
|
|
10
|
-
Such::Thing.configure CONFIG
|
10
|
+
Such::Thing.configure @@CONFIG
|
11
11
|
@main = Such::Window.new :main!, 'delete-event' do quit! end
|
12
12
|
@main.set_decorated false if @options.notdecorated
|
13
13
|
|
14
14
|
vbox = Such::Box.new @main, [:vertical]
|
15
15
|
hbox = Such::Box.new vbox, [:horizontal]
|
16
16
|
|
17
|
-
size = CONFIG[:LogoSize]
|
18
|
-
@pixbuf = GdkPixbuf::Pixbuf.new(file:CONFIG[:Logo]).scale(size,size)
|
17
|
+
size = @@CONFIG[:LogoSize]
|
18
|
+
@pixbuf = GdkPixbuf::Pixbuf.new(file: @@CONFIG[:Logo]).scale(size,size)
|
19
19
|
logo = Gtk3App::EventImage.new hbox, [pixbuf:@pixbuf]
|
20
20
|
Gtk3App::AppMenu.new(logo, :app_menu!) do |widget,*e,signal|
|
21
21
|
case signal
|
@@ -94,7 +94,7 @@ class << self
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def help!
|
97
|
-
system
|
97
|
+
system(@@CONFIG[:Open], @@CONFIG[:HelpFile])
|
98
98
|
end
|
99
99
|
|
100
100
|
def minime!
|
@@ -146,7 +146,7 @@ class << self
|
|
146
146
|
stub = UserSpace.new parser:RBON,
|
147
147
|
appname:'gtk3app',
|
148
148
|
config:"config-#{VERSION.semantic(0..1)}"
|
149
|
-
stub.configures CONFIG
|
149
|
+
stub.configures @@CONFIG
|
150
150
|
|
151
151
|
# :klass and :config flags user wants xdg maintainance.
|
152
152
|
# :appname, :appdir, and :version are sanity checks.
|
@@ -158,7 +158,17 @@ class << self
|
|
158
158
|
config:"config-#{kw[:version].semantic(0..1)}"
|
159
159
|
app.configures kw[:config]
|
160
160
|
end
|
161
|
-
CONFIG
|
161
|
+
# Pad-up klass::CONFIG and switch to it:
|
162
|
+
if cfg = kw[:config]
|
163
|
+
@@CONFIG.each do |k,v|
|
164
|
+
if cfg.key? k
|
165
|
+
$stderr.puts "Overriding Gtk3App::CONFIG[#{k}]" if $VERBOSE
|
166
|
+
else
|
167
|
+
cfg[k]=v
|
168
|
+
end
|
169
|
+
end
|
170
|
+
@@CONFIG = cfg
|
171
|
+
end
|
162
172
|
end
|
163
173
|
end
|
164
174
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gtk3app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.210201
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- carlosjhr64
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01
|
11
|
+
date: 2021-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: help_parser
|
@@ -36,20 +36,20 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '5.
|
39
|
+
version: '5.1'
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 5.
|
42
|
+
version: 5.1.210201
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '5.
|
49
|
+
version: '5.1'
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 5.
|
52
|
+
version: 5.1.210201
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: rafini
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -116,20 +116,20 @@ dependencies:
|
|
116
116
|
requirements:
|
117
117
|
- - "~>"
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: '
|
119
|
+
version: '2.0'
|
120
120
|
- - ">="
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version:
|
122
|
+
version: 2.0.210201
|
123
123
|
type: :runtime
|
124
124
|
prerelease: false
|
125
125
|
version_requirements: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
127
|
- - "~>"
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version: '
|
129
|
+
version: '2.0'
|
130
130
|
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version:
|
132
|
+
version: 2.0.210201
|
133
133
|
description: |
|
134
134
|
Gtk3App provides a
|
135
135
|
[Ruby Gnome Gtk3](https://rubygems.org/gems/gtk3)
|