gtk3 3.3.0 → 3.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed7ce36fe6005666b9e51ba0155dc822b29d49abc725e343705fefcb640db699
4
- data.tar.gz: a341c695ba2e7f891347893b229433109783820b5d026c6655387affbfc71d75
3
+ metadata.gz: 0d2a616d85af5c928974490dfe39764e9e10840ec2a7731de5e9794a00d730bb
4
+ data.tar.gz: d0a2c0918189f289c7afdb1a1f9cbb03665ed61112a669f6ffbdaad18cbadd0f
5
5
  SHA512:
6
- metadata.gz: 7812aecaf900383c5c53eb015873b751ccec81fd21a7098b24ff9b9996db4f78681faad661151c7b0251a98ac9ec4af1310688b9738f624281a8b52d18f62eab
7
- data.tar.gz: 2f09d6ecbc7d0c26d81b38555985dcee4951dadde10117b633d4c4f7a8d980fd89d8bf7d630d2d03256276b5c84d7a925d517d43a70dbd2b7fac4e9b781d4e92
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
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2006-2015 Ruby-GNOME2 Project Team
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
@@ -69,12 +69,7 @@ module Gtk
69
69
  end
70
70
 
71
71
  def require_extension
72
- begin
73
- major, minor, _ = RUBY_VERSION.split(/\./)
74
- require "#{major}.#{minor}/gtk3.so"
75
- rescue LoadError
76
- require "gtk3.so"
77
- end
72
+ require "gtk3.so"
78
73
  end
79
74
 
80
75
  def require_libraries
@@ -2,9 +2,10 @@
2
2
  =begin
3
3
  aboutdialog.rb - Ruby/GTK sample script.
4
4
 
5
- Copyright (c) 2005-2015 Ruby-GNOME2 Project Team
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 = ["Artist 1 <no1@foo.bar.com>", "Artist 2 <no2@foo.bar.com>"]
17
- a.authors = ["Author 1 <no1@foo.bar.com>", "Author 2 <no2@foo.bar.com>"]
18
- a.comments = "This is a sample script for Gtk::AboutDialog"
19
- a.copyright = "Copyright (C) 2005 Ruby-GNOME2 Project"
20
- a.documenters = ["Documenter 1 <no1@foo.bar.com>", "Documenter 2 <no2@foo.bar.com>"]
21
- a.license = "This program is licenced under the same licence as Ruby-GNOME2."
22
- a.logo = GdkPixbuf::Pixbuf.new(:file => File.join(__dir__, "gnome-logo-icon.png"))
23
- a.program_name = "Gtk::AboutDialog sample"
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 = "1.0.0"
26
- a.website = "https://ruby-gnome2.osdn.jp"
27
- a.website_label = "Ruby-GNOME2 Project Website"
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 |about_dialog, uri|
30
- p widget.class
30
+ a.signal_connect("activate-link") do |_widget, uri|
31
+ p _widget.class
31
32
  p uri
32
33
  end
33
34
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  calendar.rb - Gtk::Calendar sample script.
3
3
 
4
- Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
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
- year, month, day = cal.date
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
- year, month, day = cal.date
39
- puts "selected day: #{day}"
37
+ puts "selected day: #{cal.day}"
40
38
  end
41
39
  cal.signal_connect("month_changed") do
42
- year, month, day = cal.date
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
- year, month, day = cal.date
47
- puts "dclicked day: #{day}"
43
+ puts "dclicked day: #{cal.day}"
48
44
  end
49
45
  cal.signal_connect("prev_month") do
50
- year, month, day = cal.date
51
- puts "prev month: #{month}"
46
+ puts "prev month: #{cal.month}"
52
47
  end
53
48
  cal.signal_connect("next_month") do
54
- year, month, day = cal.date
55
- puts "next_month: #{month}"
49
+ puts "next_month: #{cal.month}"
56
50
  end
57
51
  cal.signal_connect("prev_year") do
58
- year, month, day = cal.date
59
- puts "prev_year: #{year}"
52
+ puts "prev_year: #{cal.year}"
60
53
  end
61
54
  cal.signal_connect("next_year") do
62
- year, month, day = cal.date
63
- puts "next year: #{year}"
55
+ puts "next year: #{cal.year}"
64
56
  end
65
57
 
66
58
  Gtk.main
@@ -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.set_title("Flow Box")
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
- @flowbox = Gtk::FlowBox.new
50
- @flowbox.set_valign(Gtk::Align::START)
51
- @flowbox.set_max_children_per_line(30)
52
- @flowbox.set_selection_mode(Gtk::SelectionMode::NONE)
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
- scrolled.add(@flowbox)
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 color_swatch_new(color_name)
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.override_background_color(0, color)
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
 
@@ -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.0
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: 2018-10-31 00:00:00.000000000 Z
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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.0
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
- rubyforge_project:
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.