gtk3 3.3.0 → 3.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +0 -7
- data/lib/gtk3.rb +1 -6
- data/lib/gtk3/loader.rb +1 -6
- data/sample/misc/aboutdialog.rb +15 -14
- data/sample/misc/calendar.rb +10 -18
- data/sample/misc/flowbox.rb +17 -18
- data/sample/misc/tooltips.rb +2 -3
- metadata +13 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d2a616d85af5c928974490dfe39764e9e10840ec2a7731de5e9794a00d730bb
|
4
|
+
data.tar.gz: d0a2c0918189f289c7afdb1a1f9cbb03665ed61112a669f6ffbdaad18cbadd0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a8d1a80a170135dfc466db9eaee060dfb4bfb787f00a8b2ef4ba3d5931b471c422e595b96ec3fb44aa87aa25346bef4ecd8588cbdd4471d14a023804798f444
|
7
|
+
data.tar.gz: dccc02a3eb266d27a73485797e0964f8f989050744f9bbcc0f26b3d5e12646067a093fced914506fc093595c64cd3d4bbbc273d0df9863b3a1625d97f749f910
|
data/Rakefile
CHANGED
@@ -24,11 +24,4 @@ package_name = File.basename(__dir__)
|
|
24
24
|
spec = Gem::Specification.load("#{package_name}.gemspec")
|
25
25
|
|
26
26
|
GNOME2::Rake::PackageTask.define(spec, __dir__) do |package|
|
27
|
-
package.windows.packages = []
|
28
|
-
package.windows.dependencies = []
|
29
|
-
package.cross_compiling do |spec|
|
30
|
-
if /mingw|mswin/ =~ spec.platform.to_s
|
31
|
-
spec.add_runtime_dependency("rsvg2", "= #{package.version}")
|
32
|
-
end
|
33
|
-
end
|
34
27
|
end
|
data/lib/gtk3.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2006-
|
1
|
+
# Copyright (C) 2006-2018 Ruby-GNOME2 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
|
@@ -14,15 +14,10 @@
|
|
14
14
|
# License along with this library; if not, write to the Free Software
|
15
15
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
16
|
|
17
|
-
require "gobject-introspection"
|
18
17
|
require "atk"
|
19
18
|
require "gdk3"
|
20
19
|
require "gio2"
|
21
20
|
|
22
|
-
if /cygwin|mingw|mswin/ === RUBY_PLATFORM
|
23
|
-
require "rsvg2"
|
24
|
-
end
|
25
|
-
|
26
21
|
require "gtk3/loader"
|
27
22
|
|
28
23
|
module Gtk
|
data/lib/gtk3/loader.rb
CHANGED
data/sample/misc/aboutdialog.rb
CHANGED
@@ -2,9 +2,10 @@
|
|
2
2
|
=begin
|
3
3
|
aboutdialog.rb - Ruby/GTK sample script.
|
4
4
|
|
5
|
-
Copyright (c) 2005-
|
5
|
+
Copyright (c) 2005-2018 Ruby-GNOME2 Project Team
|
6
6
|
This program is licenced under the same licence as Ruby-GNOME2.
|
7
7
|
=end
|
8
|
+
|
8
9
|
require "gtk3"
|
9
10
|
|
10
11
|
unless Gtk::Version.or_later?(3, 4, 2)
|
@@ -13,21 +14,21 @@ unless Gtk::Version.or_later?(3, 4, 2)
|
|
13
14
|
end
|
14
15
|
|
15
16
|
a = Gtk::AboutDialog.new
|
16
|
-
a.artists
|
17
|
-
a.authors
|
18
|
-
a.comments
|
19
|
-
a.copyright
|
20
|
-
a.documenters
|
21
|
-
a.license
|
22
|
-
a.logo
|
23
|
-
a.program_name
|
17
|
+
a.artists = ["Artist 1 <no1@foo.bar.com>", "Artist 2 <no2@foo.bar.com>"]
|
18
|
+
a.authors = ["Author 1 <no1@foo.bar.com>", "Author 2 <no2@foo.bar.com>"]
|
19
|
+
a.comments = "This is a sample script for Gtk::AboutDialog"
|
20
|
+
a.copyright = "Copyright (C) 2005 Ruby-GNOME2 Project"
|
21
|
+
a.documenters = ["Documenter 1 <no1@foo.bar.com>", "Documenter 2 <no2@foo.bar.com>"]
|
22
|
+
a.license = "This program is licenced under the same licence as Ruby-GNOME2."
|
23
|
+
a.logo = GdkPixbuf::Pixbuf.new(:file => File.join(__dir__, "gnome-logo-icon.png"))
|
24
|
+
a.program_name = "Gtk::AboutDialog sample"
|
24
25
|
a.translator_credits = "Translator 1\nTranslator 2\n"
|
25
|
-
a.version
|
26
|
-
a.website
|
27
|
-
a.website_label
|
26
|
+
a.version = "1.0.0"
|
27
|
+
a.website = "https://ruby-gnome2.osdn.jp"
|
28
|
+
a.website_label = "Ruby-GNOME2 Project Website"
|
28
29
|
|
29
|
-
a.signal_connect("activate-link") do |
|
30
|
-
p
|
30
|
+
a.signal_connect("activate-link") do |_widget, uri|
|
31
|
+
p _widget.class
|
31
32
|
p uri
|
32
33
|
end
|
33
34
|
|
data/sample/misc/calendar.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
calendar.rb - Gtk::Calendar sample script.
|
3
3
|
|
4
|
-
Copyright (c) 2002-
|
4
|
+
Copyright (c) 2002-2018 Ruby-GNOME2 Project Team
|
5
5
|
This program is licenced under the same licence as Ruby-GNOME2.
|
6
6
|
=end
|
7
7
|
|
@@ -29,38 +29,30 @@ cal.mark_day(date.day)
|
|
29
29
|
|
30
30
|
cal.set_display_options(Gtk::CalendarDisplayOptions::SHOW_HEADING |
|
31
31
|
Gtk::CalendarDisplayOptions::SHOW_DAY_NAMES |
|
32
|
-
Gtk::CalendarDisplayOptions::NO_MONTH_CHANGE |
|
33
32
|
Gtk::CalendarDisplayOptions::SHOW_WEEK_NUMBERS)
|
34
|
-
|
35
|
-
puts "this is #{month} #{day}, #{year}"
|
33
|
+
|
34
|
+
puts "this is #{cal.month} #{cal.day}, #{cal.year}"
|
36
35
|
|
37
36
|
cal.signal_connect("day_selected") do
|
38
|
-
|
39
|
-
puts "selected day: #{day}"
|
37
|
+
puts "selected day: #{cal.day}"
|
40
38
|
end
|
41
39
|
cal.signal_connect("month_changed") do
|
42
|
-
|
43
|
-
puts "changed month: #{month}"
|
40
|
+
puts "changed month: #{cal.month}"
|
44
41
|
end
|
45
42
|
cal.signal_connect("day_selected_double_click") do
|
46
|
-
|
47
|
-
puts "dclicked day: #{day}"
|
43
|
+
puts "dclicked day: #{cal.day}"
|
48
44
|
end
|
49
45
|
cal.signal_connect("prev_month") do
|
50
|
-
|
51
|
-
puts "prev month: #{month}"
|
46
|
+
puts "prev month: #{cal.month}"
|
52
47
|
end
|
53
48
|
cal.signal_connect("next_month") do
|
54
|
-
|
55
|
-
puts "next_month: #{month}"
|
49
|
+
puts "next_month: #{cal.month}"
|
56
50
|
end
|
57
51
|
cal.signal_connect("prev_year") do
|
58
|
-
|
59
|
-
puts "prev_year: #{year}"
|
52
|
+
puts "prev_year: #{cal.year}"
|
60
53
|
end
|
61
54
|
cal.signal_connect("next_year") do
|
62
|
-
|
63
|
-
puts "next year: #{year}"
|
55
|
+
puts "next year: #{cal.year}"
|
64
56
|
end
|
65
57
|
|
66
58
|
Gtk.main
|
data/sample/misc/flowbox.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
#
|
3
3
|
# Copyright (c) 2014 Gian Mario Tagliaretti
|
4
|
-
# Copyright (c) 2015 Ruby-GNOME2 Project Team
|
4
|
+
# Copyright (c) 2015-2018 Ruby-GNOME2 Project Team
|
5
5
|
#
|
6
6
|
# Permission is granted to copy, distribute and/or modify this document
|
7
7
|
# under the terms of the GNU Free Documentation License, Version 1.3
|
@@ -37,7 +37,7 @@ class FlowBoxWindow < Gtk::Window
|
|
37
37
|
set_default_size(300, 250)
|
38
38
|
|
39
39
|
header = Gtk::HeaderBar.new
|
40
|
-
header.
|
40
|
+
header.title = "Flow Box"
|
41
41
|
header.subtitle = "Sample FlowBox app"
|
42
42
|
header.show_close_button = true
|
43
43
|
|
@@ -46,13 +46,17 @@ class FlowBoxWindow < Gtk::Window
|
|
46
46
|
scrolled = Gtk::ScrolledWindow.new
|
47
47
|
scrolled.set_policy(Gtk::PolicyType::NEVER, Gtk::PolicyType::AUTOMATIC)
|
48
48
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
fill_flowbox
|
49
|
+
flowbox = Gtk::FlowBox.new
|
50
|
+
flowbox.valign = :start
|
51
|
+
flowbox.max_children_per_line = 30
|
52
|
+
flowbox.selection_mode = :none
|
54
53
|
|
55
|
-
|
54
|
+
COLORS.each do |color|
|
55
|
+
swatch = create_color_swatch(color)
|
56
|
+
flowbox.add swatch
|
57
|
+
end
|
58
|
+
|
59
|
+
scrolled.add(flowbox)
|
56
60
|
add(scrolled)
|
57
61
|
|
58
62
|
signal_connect("destroy") { Gtk.main_quit }
|
@@ -60,23 +64,18 @@ class FlowBoxWindow < Gtk::Window
|
|
60
64
|
|
61
65
|
private
|
62
66
|
|
63
|
-
def
|
67
|
+
def create_color_swatch(color_name)
|
64
68
|
color = Gdk::RGBA.parse(color_name)
|
65
69
|
button = Gtk::Button.new
|
66
70
|
|
67
71
|
area = Gtk::DrawingArea.new
|
68
72
|
area.set_size_request(24, 24)
|
69
|
-
area.
|
73
|
+
area.signal_connect("draw") do |_, context|
|
74
|
+
context.set_source_rgba(color)
|
75
|
+
context.paint
|
76
|
+
end
|
70
77
|
|
71
78
|
button.add(area)
|
72
|
-
|
73
|
-
button
|
74
|
-
end
|
75
|
-
|
76
|
-
def fill_flowbox
|
77
|
-
COLORS.each do |color|
|
78
|
-
@flowbox.add(color_swatch_new(color))
|
79
|
-
end
|
80
79
|
end
|
81
80
|
end
|
82
81
|
|
data/sample/misc/tooltips.rb
CHANGED
@@ -173,8 +173,7 @@ rectangles = [ Rectangle.new(10, 10, 0.0, 0.0, 0.9, "Blue box!"),
|
|
173
173
|
drawingarea = Gtk::DrawingArea.new
|
174
174
|
drawingarea.set_size_request(320, 240)
|
175
175
|
drawingarea.has_tooltip = true
|
176
|
-
drawingarea.signal_connect('draw')
|
177
|
-
cr = drawingarea.window.create_cairo_context
|
176
|
+
drawingarea.signal_connect('draw') do |_widget, cr|
|
178
177
|
cr.rectangle(0, 0, drawingarea.allocation.width, drawingarea.allocation.height)
|
179
178
|
cr.set_source_rgb(1.0, 1.0, 1.0)
|
180
179
|
cr.fill
|
@@ -186,7 +185,7 @@ drawingarea.signal_connect('draw') {
|
|
186
185
|
cr.set_source_rgba(r.r, r.g, r.b, 0.5)
|
187
186
|
cr.fill
|
188
187
|
}
|
189
|
-
|
188
|
+
end
|
190
189
|
drawingarea.signal_connect('query-tooltip') { |widget, x, y, keyboard_tip, tooltip|
|
191
190
|
drawingarea_query_tooltip(keyboard_tip, x, y, tooltip, rectangles)
|
192
191
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gtk3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.1
|
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: 2019-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gio2
|
@@ -16,70 +16,70 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.3.
|
19
|
+
version: 3.3.1
|
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.3.
|
26
|
+
version: 3.3.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: atk
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.3.
|
33
|
+
version: 3.3.1
|
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.3.
|
40
|
+
version: 3.3.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pango
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 3.3.
|
47
|
+
version: 3.3.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 3.3.
|
54
|
+
version: 3.3.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: gdk_pixbuf2
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 3.3.
|
61
|
+
version: 3.3.1
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 3.3.
|
68
|
+
version: 3.3.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: gdk3
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 3.3.
|
75
|
+
version: 3.3.1
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 3.3.
|
82
|
+
version: 3.3.1
|
83
83
|
description: Ruby/GTK3 is a Ruby binding of GTK+-3.x.
|
84
84
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
85
85
|
executables: []
|
@@ -651,8 +651,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
651
651
|
- !ruby/object:Gem::Version
|
652
652
|
version: '0'
|
653
653
|
requirements: []
|
654
|
-
|
655
|
-
rubygems_version: 3.0.0.beta1
|
654
|
+
rubygems_version: 3.0.2
|
656
655
|
signing_key:
|
657
656
|
specification_version: 4
|
658
657
|
summary: Ruby/GTK3 is a Ruby binding of GTK+-3.x.
|