gtk2 3.0.8 → 3.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b7cb45e48a1983e13a3190cf046d52e13354d7f
4
- data.tar.gz: 252f42ae906fb4d0f653b0fdfedee485745e38a1
3
+ metadata.gz: 09c854751da556f847d807085392ceb594f00d50
4
+ data.tar.gz: ef261ca8ceae4d276538b0725e8ef3d49d8afc68
5
5
  SHA512:
6
- metadata.gz: 1934092cf3feb82259d624ca43694c83108739963d1e80eac205e5c3ef3f08e8b3996f55ca6e31d4f6ff4b2d39977927b869614759deb83cbdc03806e4252f8f
7
- data.tar.gz: 3ea0cbbe5e3b4324309917b771a19136f543a16aa959f47410ba3030693eb83d1d3ad61931a089b32c6088ea24ee85eafc6558e80de01ea0aee0fd3b5284a52f
6
+ metadata.gz: 9f6b374a2a9c30d574e20b1d77ca743979b6bab54e9adb024f60b89b8c9a49b3fca8eca6e8174614d041ec5f08c2893bbfea34605ba9c7ab88c6fd4887d4179a
7
+ data.tar.gz: 925045502f9efd9b4d8075e37805050e5bc079943a43a23c6055c3049ec80f02a0997e0a9af82d0c8c96902b1ef09442cadad11eca1f80d1a843de8ec25dafdc
@@ -184,7 +184,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
184
184
  Boston, MA 02111-1307, USA.
185
185
  ]
186
186
 
187
- transparent = Gdk::Pixbuf.new(Demo.find_file("gtk-logo-rgb.gif")).add_alpha(true, 0xff, 0xff, 0xff)
187
+ transparent = GdkPixbuf::Pixbuf.new(:file => Demo.find_file("gtk-logo-rgb.gif")).add_alpha(true, 0xff, 0xff, 0xff)
188
188
 
189
189
  Gtk::AboutDialog.set_email_hook {|about, link|
190
190
  puts "send mail to #{link}"
@@ -222,7 +222,7 @@ Boston, MA 02111-1307, USA.
222
222
  factory.add_default
223
223
 
224
224
  filename = Demo.find_file('gtk-logo-rgb.gif')
225
- pixbuf = Gdk::Pixbuf.new(filename)
225
+ pixbuf = GdkPixbuf::Pixbuf.new(:file => filename)
226
226
 
227
227
  transparent = pixbuf.add_alpha(true, 0xff, 0xff, 0xff)
228
228
 
@@ -23,7 +23,7 @@ module Demo
23
23
 
24
24
  cr.new_path
25
25
 
26
- loader = Gdk::PixbufLoader.new
26
+ loader = GdkPixbuf::PixbufLoader.new
27
27
  File.open("background.jpg", "rb") do |f|
28
28
  loader.last_write(f.read)
29
29
  end
@@ -18,7 +18,7 @@ module Demo
18
18
 
19
19
  def draw(cr)
20
20
  cr.save do
21
- loader = Gdk::PixbufLoader.new
21
+ loader = GdkPixbuf::PixbufLoader.new
22
22
  File.open("background.jpg", "rb") do |f|
23
23
  loader.last_write(f.read)
24
24
  end
@@ -37,10 +37,10 @@ puts path
37
37
 
38
38
  def initialize
39
39
  super('Gtk::IconView demo')
40
- @file_pixbuf = Gdk::Pixbuf.new(Demo.find_file("gnome-fs-regular.png"))
41
- @folder_pixbuf = Gdk::Pixbuf.new(Demo.find_file("gnome-fs-directory.png"))
40
+ @file_pixbuf = GdkPixbuf::Pixbuf.new(:file => Demo.find_file("gnome-fs-regular.png"))
41
+ @folder_pixbuf = GdkPixbuf::Pixbuf.new(:file => Demo.find_file("gnome-fs-directory.png"))
42
42
 
43
- @store = Gtk::ListStore.new(String, String, TrueClass, Gdk::Pixbuf)
43
+ @store = Gtk::ListStore.new(String, String, TrueClass, GdkPixbuf::Pixbuf)
44
44
  @parent = "/"
45
45
 
46
46
  @store.set_default_sort_func do |a, b|
@@ -6,7 +6,7 @@
6
6
  = Images
7
7
 
8
8
  Gtk::Image is used to display an image; the image can be in a number of formats.
9
- Typically, you load an image into a Gdk::Pixbuf, then display the pixbuf.
9
+ Typically, you load an image into a GdkPixbuf::Pixbuf, then display the pixbuf.
10
10
 
11
11
  This demo code shows some of the more obscure cases, in the simple
12
12
  case a call to Gtk::Image.new is all you need.
@@ -55,7 +55,7 @@ module Demo
55
55
  pixbuf = nil
56
56
  begin
57
57
  filename = Demo.find_file('gtk-logo-rgb.gif')
58
- pixbuf = Gdk::Pixbuf.new(filename)
58
+ pixbuf = GdkPixbuf::Pixbuf.new(:file => filename)
59
59
  rescue
60
60
  # This code shows off error handling. You can just use
61
61
  # Gtk::Image.new instead if you don't want to report
@@ -159,7 +159,7 @@ module Demo
159
159
  @pixbuf_loader = nil
160
160
  end
161
161
 
162
- @pixbuf_loader = Gdk::PixbufLoader.new
162
+ @pixbuf_loader = GdkPixbuf::PixbufLoader.new
163
163
 
164
164
  @pixbuf_loader.signal_connect('area_prepared') do |loader|
165
165
  pixbuf = loader.pixbuf
@@ -5,7 +5,7 @@
5
5
  =begin
6
6
  = Pixbufs
7
7
 
8
- A Gdk::Pixbuf represents an image, normally in RGB or RGBA format.
8
+ A GdkPixbuf::Pixbuf represents an image, normally in RGB or RGBA format.
9
9
  Pixbufs are normally used to load files from disk and perform
10
10
  image scaling.
11
11
 
@@ -51,9 +51,11 @@ module Demo
51
51
 
52
52
  set_size_request(@background.width, @background.height)
53
53
 
54
- @frame = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB,
55
- false, 8,
56
- @background.width, @background.height)
54
+ @frame = GdkPixbuf::Pixbuf.new(:colorspace => :rgb,
55
+ :has_alpha => false,
56
+ :bits_per_sample => 8,
57
+ :width => @background.width,
58
+ :height => @background.height)
57
59
 
58
60
  @da = Gtk::DrawingArea.new
59
61
 
@@ -96,12 +98,12 @@ module Demo
96
98
  # in the location where the file is installed.
97
99
  #
98
100
  filename = Demo.find_file(BACKGROUND_NAME)
99
- @background = Gdk::Pixbuf.new(filename)
101
+ @background = GdkPixbuf::Pixbuf.new(:file => filename)
100
102
 
101
103
  IMAGE_NAMES.each_with_index do |basename, i|
102
104
  filename = Demo.find_file(basename)
103
105
 
104
- @images[i] = Gdk::Pixbuf.new(filename)
106
+ @images[i] = GdkPixbuf::Pixbuf.new(:file => filename)
105
107
  end
106
108
  end
107
109
 
@@ -154,7 +156,7 @@ module Demo
154
156
  dest = r1.intersect(r2)
155
157
  if dest
156
158
  @frame.composite!(image, dest.x, dest.y, dest.width, dest.height,
157
- xpos, ypos, k, k, Gdk::Pixbuf::INTERP_NEAREST,
159
+ xpos, ypos, k, k, :nearest,
158
160
  if (i & 1) == 1
159
161
  [
160
162
  127,
@@ -147,7 +147,7 @@ module Demo
147
147
  # Make the result the proper size for our thumbnail
148
148
  w, h = Gtk::IconSize.lookup(size)
149
149
 
150
- scaled = info.small_icon.scale(w, h, Gdk::Pixbuf::INTERP_BILINEAR)
150
+ scaled = info.small_icon.scale(w, h, GdkPixbuf::Pixbuf::INTERP_BILINEAR)
151
151
  info.small_icon = scaled
152
152
  end
153
153
 
@@ -188,14 +188,14 @@ module Demo
188
188
  #
189
189
 
190
190
  filename = Demo.find_file("gtk-logo-rgb.gif")
191
- pixbuf = Gdk::Pixbuf.new(filename) if filename
191
+ pixbuf = GdkPixbuf::Pixbuf.new(:file => filename) if filename
192
192
 
193
193
  unless pixbuf
194
194
  $stderr.print "Failed to load image file gtk-logo-rgb.gif\n"
195
195
  exit 1
196
196
  end
197
197
 
198
- scaled = pixbuf.scale(32, 32, Gdk::Pixbuf::INTERP_BILINEAR)
198
+ scaled = pixbuf.scale(32, 32, :bilinear)
199
199
  pixbuf = scaled
200
200
 
201
201
  ##
@@ -31,7 +31,7 @@ a.comments = "This is a sample script for Gtk::AboutDialog"
31
31
  a.copyright = "Copyright (C) 2005 Ruby-GNOME2 Project"
32
32
  a.documenters = ["Documenter 1 <no1@foo.bar.com>", "Documenter 2 <no2@foo.bar.com>"]
33
33
  a.license = "This program is licenced under the same licence as Ruby-GNOME2."
34
- a.logo = Gdk::Pixbuf.new("gnome-logo-icon.png")
34
+ a.logo = GdkPixbuf::Pixbuf.new(:file => "gnome-logo-icon.png")
35
35
  a.program_name = "Gtk::AboutDialog sample"
36
36
  a.translator_credits = "Translator 1\nTranslator 2\n"
37
37
  a.version = "1.0.0"
@@ -35,7 +35,7 @@ end
35
35
  #
36
36
  # Icon and text
37
37
  #
38
- model = Gtk::ListStore.new(Gdk::Pixbuf, String)
38
+ model = Gtk::ListStore.new(GdkPixbuf::Pixbuf, String)
39
39
  [[Gtk::Stock::QUIT, "quit"],
40
40
  [Gtk::Stock::CANCEL, "cancel"],
41
41
  [Gtk::Stock::OK, "ok"]].each do |stock, name|
@@ -13,7 +13,7 @@ require 'gtk2'
13
13
  TEXT_COLUMN = 0
14
14
  PIXBUF_COLUMN = 1
15
15
 
16
- model = Gtk::ListStore.new(String, Gdk::Pixbuf)
16
+ model = Gtk::ListStore.new(String, GdkPixbuf::Pixbuf)
17
17
 
18
18
  iv = Gtk::IconView.new(model)
19
19
 
@@ -23,7 +23,7 @@ iv.pixbuf_column = PIXBUF_COLUMN
23
23
  Dir.glob("../gtk-demo/gnome*.png").each do |f|
24
24
  iter = model.append
25
25
  iter[TEXT_COLUMN] = File.basename(f)
26
- iter[PIXBUF_COLUMN] = Gdk::Pixbuf.new(f)
26
+ iter[PIXBUF_COLUMN] = GdkPixbuf::Pixbuf.new(:file => f)
27
27
  end
28
28
 
29
29
  iv.signal_connect("item_activated") do |iv, path|
@@ -56,7 +56,7 @@ ifp.create_items([
56
56
  ["/_Misc", "<LastBranch>"],
57
57
  ["/_Misc/Tearoff", "<Tearoff>"],
58
58
  ["/_Misc/Title", "<Title>"],
59
- ["/_Misc/Image", "<ImageItem>", "", Gdk::Pixbuf.new("gnome-logo-icon.png"), cal_misc, 1],
59
+ ["/_Misc/Image", "<ImageItem>", "", GdkPixbuf::Pixbuf.new(:file => "gnome-logo-icon.png"), cal_misc, 1],
60
60
  ["/_Misc/Separator", "<Separator>"],
61
61
  ["/_Misc/Item", "<Item>", nil, nil, cal_misc, 2]
62
62
  ])
@@ -60,7 +60,7 @@ ifp.create_item("/_Misc", "<LastBranch>")
60
60
  ifp.create_item("/_Misc/Tearoff", "<Tearoff>")
61
61
  ifp.create_item("/_Misc/Title", "<Title>")
62
62
  ifp.create_item("/_Misc/Seperator", "<Separator>")
63
- ifp.create_item("/_Misc/Image", "<ImageItem>", "", Gdk::Pixbuf.new("gnome-logo-icon.png")) do
63
+ ifp.create_item("/_Misc/Image", "<ImageItem>", "", GdkPixbuf::Pixbuf.new(:file => "gnome-logo-icon.png")) do
64
64
  p "ImageItem"
65
65
  end
66
66
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  =begin
3
- to_drawable.rb - Gdk::Pixbuf(GDK methods) sample script.
3
+ to_drawable.rb - GdkPixbuf::Pixbuf(GDK methods) sample script.
4
4
 
5
5
  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
6
6
  This program is licenced under the same licence as Ruby-GNOME2.
@@ -16,7 +16,7 @@ unless filename
16
16
  exit(1)
17
17
  end
18
18
 
19
- pixbuf = Gdk::Pixbuf.new(filename)
19
+ pixbuf = GdkPixbuf::Pixbuf.new(:file => filename)
20
20
 
21
21
  w = Gtk::Window.new("Drawable sample")
22
22
  w.realize
@@ -13,7 +13,7 @@ require 'gtk2'
13
13
  window = Gtk::Window.new("Gtk::TreeView sample")
14
14
 
15
15
  # Create data
16
- model = Gtk::TreeStore.new(String, String, Gdk::Color, Float, Gdk::Pixbuf)
16
+ model = Gtk::TreeStore.new(String, String, Gdk::Color, Float, GdkPixbuf::Pixbuf)
17
17
 
18
18
  # column 1
19
19
  root_iter = model.append(nil)
@@ -23,12 +23,12 @@ class TestGdkPixbuf < Test::Unit::TestCase
23
23
  width, height = gdk_window.size
24
24
 
25
25
  assert_nothing_raised do
26
- Gdk::Pixbuf.from_drawable(colormap,
27
- gdk_window,
28
- src_x,
29
- src_y,
30
- width,
31
- height)
26
+ GdkPixbuf::Pixbuf.from_drawable(colormap,
27
+ gdk_window,
28
+ src_x,
29
+ src_y,
30
+ width,
31
+ height)
32
32
  end
33
33
  end
34
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtk2
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.8
4
+ version: 3.0.9
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: 2016-04-03 00:00:00.000000000 Z
11
+ date: 2016-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: atk
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.8
19
+ version: 3.0.9
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.8
26
+ version: 3.0.9
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pango
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.0.8
33
+ version: 3.0.9
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.8
40
+ version: 3.0.9
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: gdk_pixbuf2
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 3.0.8
47
+ version: 3.0.9
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.0.8
54
+ version: 3.0.9
55
55
  description: Ruby/GTK2 is a Ruby binding of GTK+-2.x.
56
56
  email: ruby-gnome2-devel-en@lists.sourceforge.net
57
57
  executables: []
@@ -546,7 +546,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
546
546
  requirements:
547
547
  - - ">="
548
548
  - !ruby/object:Gem::Version
549
- version: 1.9.3
549
+ version: 2.1.0
550
550
  required_rubygems_version: !ruby/object:Gem::Requirement
551
551
  requirements:
552
552
  - - ">="