gio2 3.0.7 → 3.0.8
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/ext/gio2/extconf.rb +1 -0
- data/ext/gio2/rb-gio2.c +0 -45
- data/lib/gio2/application-command-line.rb +12 -0
- data/test/test-application-command-line.rb +2 -4
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 663005473dbd4e7b6512a58febe14d1ba2369a02
|
|
4
|
+
data.tar.gz: e8ad28137450bc5029952d9158f0b881792a285e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78c07c3d7e44e79ab4349b865fb06cdb41c9b42c7e7ba2c3b0ac68db1605f79c5cb0e6d71450a1e69be3761367f7b3e4c553f35e773e5ddfa743089f44d1e4f8
|
|
7
|
+
data.tar.gz: 27b6e814a106555717bf313279c6d0644e372460f46a86bfb006def93be5c3830defdaaf4b27959128221a455e8b63366326cb5c46146d0da421b7f19146032f
|
data/ext/gio2/extconf.rb
CHANGED
data/ext/gio2/rb-gio2.c
CHANGED
|
@@ -22,49 +22,6 @@
|
|
|
22
22
|
|
|
23
23
|
#define RG_TARGET_NAMESPACE rb_mGio
|
|
24
24
|
|
|
25
|
-
static gboolean
|
|
26
|
-
name_equal(GIArgInfo *info, const gchar *target_name)
|
|
27
|
-
{
|
|
28
|
-
GITypeInfo type_info;
|
|
29
|
-
GIBaseInfo *interface_info;
|
|
30
|
-
const gchar *namespace;
|
|
31
|
-
const gchar *name;
|
|
32
|
-
gboolean equal_name_p = FALSE;
|
|
33
|
-
|
|
34
|
-
g_arg_info_load_type(info, &type_info);
|
|
35
|
-
interface_info = g_type_info_get_interface(&type_info);
|
|
36
|
-
namespace = g_base_info_get_namespace(interface_info);
|
|
37
|
-
name = g_base_info_get_name(interface_info);
|
|
38
|
-
if (strcmp(namespace, "Gio") == 0 && strcmp(name, target_name) == 0) {
|
|
39
|
-
equal_name_p = TRUE;
|
|
40
|
-
}
|
|
41
|
-
g_base_info_unref(interface_info);
|
|
42
|
-
|
|
43
|
-
return equal_name_p;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
static void
|
|
47
|
-
rb_gio2_async_ready_callback_callback(GObject *source_object,
|
|
48
|
-
GAsyncResult *result,
|
|
49
|
-
gpointer user_data)
|
|
50
|
-
{
|
|
51
|
-
RBGICallbackData *callback_data = user_data;
|
|
52
|
-
ID id_call;
|
|
53
|
-
|
|
54
|
-
CONST_ID(id_call, "call");
|
|
55
|
-
rb_funcall(callback_data->rb_callback, id_call, 2,
|
|
56
|
-
GOBJ2RVAL(source_object), GOBJ2RVAL(result));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
static gpointer
|
|
60
|
-
rb_gio2_async_ready_callback_finder(GIArgInfo *info)
|
|
61
|
-
{
|
|
62
|
-
if (!name_equal(info, "AsyncReadyCallback")) {
|
|
63
|
-
return NULL;
|
|
64
|
-
}
|
|
65
|
-
return rb_gio2_async_ready_callback_callback;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
25
|
void
|
|
69
26
|
Init_gio2 (void)
|
|
70
27
|
{
|
|
@@ -74,6 +31,4 @@ Init_gio2 (void)
|
|
|
74
31
|
|
|
75
32
|
rb_gio2_init_application(RG_TARGET_NAMESPACE);
|
|
76
33
|
rb_gio2_init_pollable_source(RG_TARGET_NAMESPACE);
|
|
77
|
-
|
|
78
|
-
rb_gi_callback_register_finder(rb_gio2_async_ready_callback_finder);
|
|
79
34
|
}
|
|
@@ -16,6 +16,18 @@
|
|
|
16
16
|
|
|
17
17
|
module Gio
|
|
18
18
|
class ApplicationCommandLine
|
|
19
|
+
def initialize(properties=nil)
|
|
20
|
+
if properties
|
|
21
|
+
arguments = properties[:arguments]
|
|
22
|
+
if arguments and !arguments.is_a?(GLib::Variant)
|
|
23
|
+
arguments = GLib::Variant.new(arguments,
|
|
24
|
+
GLib::VariantType::BYTESTRING_ARRAY)
|
|
25
|
+
properties = properties.merge(:arguments => arguments)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
super(properties)
|
|
29
|
+
end
|
|
30
|
+
|
|
19
31
|
alias_method :arguments_raw, :arguments
|
|
20
32
|
def arguments
|
|
21
33
|
arguments_raw[0]
|
|
@@ -16,12 +16,10 @@
|
|
|
16
16
|
|
|
17
17
|
class TestApplicationCommandLine < Test::Unit::TestCase
|
|
18
18
|
include GioTestUtils::Omissions
|
|
19
|
-
def setup
|
|
20
|
-
@command_line = Gio::ApplicationCommandLine.new
|
|
21
|
-
end
|
|
22
19
|
|
|
23
20
|
test "#arguments" do
|
|
24
21
|
omit_on_travis_ci
|
|
25
|
-
|
|
22
|
+
command_line = Gio::ApplicationCommandLine.new(:arguments => ["hello"])
|
|
23
|
+
assert_equal(["hello"], command_line.arguments)
|
|
26
24
|
end
|
|
27
25
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gio2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- The Ruby-GNOME2 Project Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-04-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: glib2
|
|
@@ -16,28 +16,28 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 3.0.
|
|
19
|
+
version: 3.0.8
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - '='
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 3.0.
|
|
26
|
+
version: 3.0.8
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: gobject-introspection
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - '='
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 3.0.
|
|
33
|
+
version: 3.0.8
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - '='
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 3.0.
|
|
40
|
+
version: 3.0.8
|
|
41
41
|
description: Ruby/GIO2 is a Ruby binding of gio-2.x.
|
|
42
42
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
|
43
43
|
executables: []
|
|
@@ -97,7 +97,7 @@ files:
|
|
|
97
97
|
- test/test-version.rb
|
|
98
98
|
homepage: http://ruby-gnome2.sourceforge.jp/
|
|
99
99
|
licenses:
|
|
100
|
-
- LGPLv2.1
|
|
100
|
+
- LGPLv2.1+
|
|
101
101
|
metadata: {}
|
|
102
102
|
post_install_message:
|
|
103
103
|
rdoc_options: []
|
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
115
115
|
version: '0'
|
|
116
116
|
requirements: []
|
|
117
117
|
rubyforge_project:
|
|
118
|
-
rubygems_version: 2.
|
|
118
|
+
rubygems_version: 2.5.1
|
|
119
119
|
signing_key:
|
|
120
120
|
specification_version: 4
|
|
121
121
|
summary: Ruby/GIO2 is a Ruby binding of gio-2.x.
|