gio2 4.2.8 → 4.3.0
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/lib/gio2/action.rb +12 -1
- data/lib/gio2/bytes-icon.rb +25 -0
- data/lib/gio2/loader.rb +23 -22
- data/lib/gio2/menu-item.rb +5 -2
- data/test/test-menu-item.rb +9 -1
- data/test/test-simple-action.rb +21 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6121635b732b04c98e445446e174a0a09e1a45f3fd3afd012f3d71e9ccf9a00f
|
4
|
+
data.tar.gz: b6f4863c19caa84981b4c7fd0ccfb8275cb6c526d4b8e4f13653505c3e1f4906
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c191edd7865dddb43e31f8288a17838a73c75ba1fab41111231f2daecd43ef39ecbe3502c47488a68f26bb2bfef6fb8aee961b0c45799f3fc3046ecfc33d6dc
|
7
|
+
data.tar.gz: 70738058045a6f24e2c3751b1bbaa1cef90fbb9d57d6bf7f0f4d99dbcef5fce5e275f956d24e29cddb37cd742d09fc9a97040c636d1c5418d0dc3932de559a83
|
data/lib/gio2/action.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2015 Ruby-
|
1
|
+
# Copyright (C) 2015-2025 Ruby-GNOME Project Team
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -26,5 +26,16 @@ module Gio
|
|
26
26
|
end
|
27
27
|
activate_raw(parameter)
|
28
28
|
end
|
29
|
+
|
30
|
+
alias_method :change_state_raw, :change_state
|
31
|
+
def change_state(value)
|
32
|
+
case value
|
33
|
+
when GLib::Variant
|
34
|
+
# do nothing
|
35
|
+
else
|
36
|
+
value = GLib::Variant.new(value, state_type)
|
37
|
+
end
|
38
|
+
change_state_raw(value)
|
39
|
+
end
|
29
40
|
end
|
30
41
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Copyright (C) 2025 Ruby-GNOME Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
module Gio
|
18
|
+
class BytesIcon
|
19
|
+
alias_method :initialize_raw, :initialize
|
20
|
+
def initialize(bytes)
|
21
|
+
@bytes = bytes
|
22
|
+
initialize_raw(@bytes)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/gio2/loader.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2013-
|
1
|
+
# Copyright (C) 2013-2025 Ruby-GNOME Project Team
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -58,28 +58,29 @@ module Gio
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def require_libraries
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
61
|
+
require_relative "action"
|
62
|
+
require_relative "action-map"
|
63
|
+
require_relative "application-command-line"
|
64
|
+
require_relative "bytes-icon"
|
65
|
+
require_relative "content-type"
|
66
|
+
require_relative "file"
|
67
|
+
require_relative "icon"
|
68
|
+
require_relative "inet-address"
|
69
|
+
require_relative "input-stream"
|
70
|
+
require_relative "list-model"
|
71
|
+
require_relative "menu-item"
|
72
|
+
require_relative "output-stream"
|
73
|
+
require_relative "pollable-input-stream"
|
74
|
+
require_relative "pollable-output-stream"
|
75
|
+
require_relative "resources"
|
76
|
+
require_relative "ruby-input-stream"
|
77
|
+
require_relative "ruby-output-stream"
|
78
|
+
require_relative "settings"
|
79
|
+
require_relative "settings-schema-source"
|
80
|
+
require_relative "simple-action"
|
81
|
+
require_relative "volume"
|
81
82
|
|
82
|
-
|
83
|
+
require_relative "deprecated"
|
83
84
|
end
|
84
85
|
|
85
86
|
def define_content_type_class
|
data/lib/gio2/menu-item.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2018 Ruby-
|
1
|
+
# Copyright (C) 2018-2025 Ruby-GNOME Project Team
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -34,7 +34,10 @@ module Gio
|
|
34
34
|
define_method(name) do
|
35
35
|
self[Gio.const_get(constant_name)]
|
36
36
|
end
|
37
|
-
|
37
|
+
|
38
|
+
setter = "#{name}="
|
39
|
+
next if method_defined?(setter)
|
40
|
+
define_method(setter) do |value|
|
38
41
|
self[Gio.const_get(constant_name)] = value
|
39
42
|
end
|
40
43
|
end
|
data/test/test-menu-item.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2018 Ruby-
|
1
|
+
# Copyright (C) 2018-2025 Ruby-GNOME Project Team
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -35,5 +35,13 @@ class TestMenuItem < Test::Unit::TestCase
|
|
35
35
|
@menu_item.action_namespace = "doc"
|
36
36
|
assert_equal("doc", @menu_item.action_namespace)
|
37
37
|
end
|
38
|
+
|
39
|
+
test "icon" do
|
40
|
+
only_gio_version(2, 36, 0)
|
41
|
+
assert_nil(@menu_item.action_namespace)
|
42
|
+
icon = Gio::ThemedIcon.new("edit")
|
43
|
+
@menu_item.icon = icon
|
44
|
+
assert_equal(icon.serialize, @menu_item.icon)
|
45
|
+
end
|
38
46
|
end
|
39
47
|
end
|
data/test/test-simple-action.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2015 Ruby-
|
1
|
+
# Copyright (C) 2015-2025 Ruby-GNOME Project Team
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -41,4 +41,24 @@ class TestSimpleAction < Test::Unit::TestCase
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
44
|
+
|
45
|
+
sub_test_case "#change_state" do
|
46
|
+
def setup
|
47
|
+
@action = Gio::SimpleAction.new("show", nil, GLib::Variant.new(true))
|
48
|
+
end
|
49
|
+
|
50
|
+
test "GLib::Variant" do
|
51
|
+
@action.change_state(GLib::Variant.new(false))
|
52
|
+
assert do
|
53
|
+
not @action.state
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
test "false" do
|
58
|
+
@action.change_state(false)
|
59
|
+
assert do
|
60
|
+
not @action.state
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
44
64
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gio2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Ruby-GNOME Project Team
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: fiddle
|
@@ -29,14 +29,14 @@ dependencies:
|
|
29
29
|
requirements:
|
30
30
|
- - '='
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 4.
|
32
|
+
version: 4.3.0
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - '='
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 4.
|
39
|
+
version: 4.3.0
|
40
40
|
description: Ruby/GIO2 provide Ruby binding to a VFS API and useful APIs for desktop
|
41
41
|
applications (such as networking and D-Bus support).
|
42
42
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
@@ -60,6 +60,7 @@ files:
|
|
60
60
|
- lib/gio2/action-map.rb
|
61
61
|
- lib/gio2/action.rb
|
62
62
|
- lib/gio2/application-command-line.rb
|
63
|
+
- lib/gio2/bytes-icon.rb
|
63
64
|
- lib/gio2/content-type.rb
|
64
65
|
- lib/gio2/deprecated.rb
|
65
66
|
- lib/gio2/file.rb
|
@@ -140,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
141
|
- !ruby/object:Gem::Version
|
141
142
|
version: '0'
|
142
143
|
requirements: []
|
143
|
-
rubygems_version: 3.6.
|
144
|
+
rubygems_version: 3.6.7
|
144
145
|
specification_version: 4
|
145
146
|
summary: Ruby/GIO2 is a Ruby binding of gio-2.x.
|
146
147
|
test_files: []
|