gtk3 3.0.3-x86-mingw32 → 3.0.4-x86-mingw32

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: 07f101b2474a79a88b69d8f2fc3c8c3f47dfadd9
4
- data.tar.gz: 9bbfc3d43c98602ff9a88b21dd6a22b131beff5b
3
+ metadata.gz: 464b1a7549b2d26ff2a707e7b9090f87911e731f
4
+ data.tar.gz: 2bc2458410c948011b0835e07a903821a883c974
5
5
  SHA512:
6
- metadata.gz: 1dbc4234798ea615b0d0ccb00c103b8d67194a53d0b627d0619a6d5922420e6b964367fffcb7b53d3dbf50d3d23b14aefb60502541ff2f242f6ca1250a055a50
7
- data.tar.gz: 34a9f723006d0498c9aba607090043b8f0ddec0c40c7a6035b3ed719b7a915dafb9c3868bcfa0c0b8c20eac3811833ae7def095f43b8dc4fdd927450e05e4c70
6
+ metadata.gz: 60bf86b6ab8b598ac092e0427f7065efbda9c064d3abe8fccc0b9ac1408e905847a9711fb1dbd56c707737ae9e2aa9e00c811f2a62dc362355c380b1619cfb13
7
+ data.tar.gz: 15c581434f6237cea49a7480f6418cec02e012ae82ca26aefeb844ddcb228442feaf9e1f055dffac667c63231ebe49f19dc75a99a24409acd15072e13d3d97bf
data/ext/gtk3/extconf.rb CHANGED
@@ -66,6 +66,7 @@ setup_windows(module_name, base_dir)
66
66
  unless required_pkg_config_package(package_id,
67
67
  :debian => "libgtk-3-dev",
68
68
  :redhat => "gtk3-devel",
69
+ :arch => "gtk3",
69
70
  :homebrew => "gtk+3",
70
71
  :macports => "gtk3")
71
72
  exit(false)
data/lib/2.0/gtk3.so CHANGED
Binary file
data/lib/2.1/gtk3.so CHANGED
Binary file
data/lib/2.2/gtk3.so CHANGED
Binary file
@@ -435,6 +435,88 @@ https://developer.gnome.org/gtk3/stable/ch01s04.html#id-1.2.3.12.7
435
435
 
436
436
  * exampleapp3/exampleapp.rb
437
437
 
438
+ In this step, we make our application show the content of all the files that it is given on the commandline.
439
+ To this end, we need to easily access widgets from the template. So we use the method `Gtk::Widget.bind_template_child` like in the code below:
440
+
441
+ ```ruby
442
+ class ExampleAppWindow < Gtk::ApplicationWindow
443
+ type_register
444
+ class << self
445
+ def init
446
+ set_template(:resource => "/org/gtk/exampleapp/window.ui")
447
+ bind_template_child("stack")
448
+ end
449
+ end
450
+ ```
451
+ Most of this piece of code have been seen previously, a window widget interface is defined with a template. But the usage of `bind_template_child("stack")` will add a method, to each ExampleAppWindow instance, which name will be `ExampleAppWindow#stack` and that will return the corresponding child widget in the template.
452
+
453
+ The initial implementation of `Gtk::Widget.bind_template_child` have been done in this [pull request](https://github.com/ruby-gnome2/ruby-gnome2/pull/445)
454
+
455
+ This new way to access the stack widget is used in the following code. We have previously handled the *open* signal in our application like this:
456
+
457
+ ```ruby
458
+ class ExampleAppWindow < Gtk::ApplicationWindow
459
+ def open(file)
460
+
461
+ end
462
+ end
463
+
464
+ class ExampleApp < Gtk::Application
465
+ def initialize
466
+ # ...
467
+
468
+ signal_connect "open" do |application, files, hin|
469
+ windows = application.windows
470
+ win = nil
471
+ unless windows.empty?
472
+ win = windows.first
473
+ else
474
+ win = ExampleAppWindow.new(application)
475
+ end
476
+
477
+ files.each { |file| win.open(file) }
478
+
479
+ win.present
480
+ end
481
+ end
482
+ end
483
+ ```
484
+
485
+ The `open` method of the main window is called with for each file. Now we manage those files like this:
486
+
487
+ ```ruby
488
+ def open(file)
489
+ basename = file.basename
490
+ scrolled = Gtk::ScrolledWindow.new
491
+ scrolled.show
492
+ scrolled.set_hexpand(true)
493
+ scrolled.set_vexpand(true)
494
+ view = Gtk::TextView.new
495
+ view.set_editable(false)
496
+ view.set_cursor_visible(false)
497
+ view.show
498
+ scrolled.add(view)
499
+ stack.add_titled(scrolled, basename, basename)
500
+ stream = file.read
501
+ view.buffer.text = stream.read
502
+ end
503
+ ```
504
+ Each file is opened and loaded in a `Gtk::TextView` with
505
+
506
+ ```ruby
507
+ stream = file.read
508
+ view.buffer.text = stream.read
509
+ ```
510
+
511
+ We get the basename, of the file in argument, that will be used as title for each tab of the stack widget:
512
+
513
+ ```
514
+ stack.add_titled(scrolled, basename, basename)
515
+ ```
516
+
517
+ In this line, given that `self` is `ExampleAppWindow` the usage of `stack` is a call to the method we have created previously. So here we add a tab with a `Gtk::ScrolledWindow` in the `Gtk::Stack` widget of our template and we display the file content.
518
+
519
+
438
520
  ### An application menu
439
521
  https://developer.gnome.org/gtk3/stable/ch01s04.html#id-1.2.3.12.8
440
522
 
@@ -51,6 +51,14 @@ module GtkTestUtils
51
51
  end
52
52
  end
53
53
 
54
+ def window_have_default_title?
55
+ # Maybe 03213b9509fc1df16c66194ea168aed6c15110e9 in GTK+
56
+ return false if Gtk::Version.or_later?(3, 17, 0)
57
+ return true if csd_supported?
58
+
59
+ false
60
+ end
61
+
54
62
  def fixture_path(*components)
55
63
  File.join(File.dirname(__FILE__), "fixture", *components)
56
64
  end
@@ -20,7 +20,7 @@ class TestGtkColorChooserDialog < Test::Unit::TestCase
20
20
  sub_test_case ".new" do
21
21
  test "no argument" do
22
22
  dialog = Gtk::ColorChooserDialog.new
23
- if csd_supported?
23
+ if window_have_default_title?
24
24
  assert_equal("", dialog.title)
25
25
  else
26
26
  assert_nil(dialog.title)
@@ -20,7 +20,7 @@ class TestGtkFontChooserDialog < Test::Unit::TestCase
20
20
  sub_test_case ".new" do
21
21
  test "no argument" do
22
22
  dialog = Gtk::FontChooserDialog.new
23
- if csd_supported?
23
+ if window_have_default_title?
24
24
  assert_equal("", dialog.title)
25
25
  else
26
26
  assert_nil(dialog.title)
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.0.3
4
+ version: 3.0.4
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - The Ruby-GNOME2 Project Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-16 00:00:00.000000000 Z
11
+ date: 2015-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: glib2
@@ -16,112 +16,112 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.3
19
+ version: 3.0.4
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.3
26
+ version: 3.0.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: gio2
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.0.3
33
+ version: 3.0.4
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.3
40
+ version: 3.0.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: atk
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 3.0.3
47
+ version: 3.0.4
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.3
54
+ version: 3.0.4
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pango
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 3.0.3
61
+ version: 3.0.4
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.0.3
68
+ version: 3.0.4
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: gdk_pixbuf2
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 3.0.3
75
+ version: 3.0.4
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.0.3
82
+ version: 3.0.4
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: gdk3
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 3.0.3
89
+ version: 3.0.4
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 3.0.3
96
+ version: 3.0.4
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: gobject-introspection
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 3.0.3
103
+ version: 3.0.4
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 3.0.3
110
+ version: 3.0.4
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rsvg2
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 3.0.3
117
+ version: 3.0.4
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: 3.0.3
124
+ version: 3.0.4
125
125
  description: Ruby/GTK3 is a Ruby binding of GTK+-3.x.
126
126
  email: ruby-gnome2-devel-en@lists.sourceforge.net
127
127
  executables: []