gtk3 3.0.8-x86-mingw32 → 3.0.9-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/ext/gtk3/rb-gtk3.c +17 -0
  3. data/lib/2.2/gtk3.so +0 -0
  4. data/lib/2.3/gtk3.so +0 -0
  5. data/lib/gtk3/container.rb +0 -7
  6. data/lib/gtk3/deprecated.rb +3 -3
  7. data/lib/gtk3/image.rb +7 -7
  8. data/lib/gtk3/loader.rb +11 -5
  9. data/lib/gtk3/text-buffer.rb +33 -12
  10. data/lib/gtk3/text-view.rb +53 -0
  11. data/lib/gtk3/tree-model.rb +5 -0
  12. data/lib/gtk3/tree-view.rb +25 -0
  13. data/lib/gtk3/widget.rb +0 -5
  14. data/sample/gtk-demo/TODO +10 -6
  15. data/sample/gtk-demo/application.ui +93 -70
  16. data/sample/gtk-demo/appmenu.ui +19 -0
  17. data/sample/gtk-demo/assistant.rb +1 -0
  18. data/sample/gtk-demo/css_accordion.css +8 -8
  19. data/sample/gtk-demo/css_accordion.rb +2 -2
  20. data/sample/gtk-demo/css_basics.css +1 -1
  21. data/sample/gtk-demo/css_basics.rb +2 -2
  22. data/sample/gtk-demo/css_multiplebgs.rb +2 -2
  23. data/sample/gtk-demo/css_pixbufs.css +2 -2
  24. data/sample/gtk-demo/css_pixbufs.rb +2 -2
  25. data/sample/gtk-demo/css_shadows.css +5 -5
  26. data/sample/gtk-demo/css_shadows.rb +2 -2
  27. data/sample/gtk-demo/cssview.css +5 -5
  28. data/sample/gtk-demo/data/16x16/gtk3-demo-symbolic.symbolic.png +0 -0
  29. data/sample/gtk-demo/data/16x16/gtk3-demo.png +0 -0
  30. data/sample/gtk-demo/data/22x22/gtk3-demo-symbolic.symbolic.png +0 -0
  31. data/sample/gtk-demo/data/22x22/gtk3-demo.png +0 -0
  32. data/sample/gtk-demo/data/24x24/gtk3-demo-symbolic.symbolic.png +0 -0
  33. data/sample/gtk-demo/data/24x24/gtk3-demo.png +0 -0
  34. data/sample/gtk-demo/data/256x256/gtk3-demo-symbolic.symbolic.png +0 -0
  35. data/sample/gtk-demo/data/256x256/gtk3-demo.png +0 -0
  36. data/sample/gtk-demo/data/32x32/gtk3-demo-symbolic.symbolic.png +0 -0
  37. data/sample/gtk-demo/data/32x32/gtk3-demo.png +0 -0
  38. data/sample/gtk-demo/data/48x48/gtk3-demo-symbolic.symbolic.png +0 -0
  39. data/sample/gtk-demo/data/48x48/gtk3-demo.png +0 -0
  40. data/sample/gtk-demo/data/512x512/gtk3-demo-symbolic.symbolic.png +0 -0
  41. data/sample/gtk-demo/data/512x512/gtk3-demo.png +0 -0
  42. data/sample/gtk-demo/data/source.svg +2886 -0
  43. data/sample/gtk-demo/data/symbolic-source.svg +29 -0
  44. data/sample/gtk-demo/demo.gresource.xml +16 -5
  45. data/sample/gtk-demo/demo.ui +1 -0
  46. data/sample/gtk-demo/font_features.rb +1 -1
  47. data/sample/gtk-demo/main.rb +2 -2
  48. data/sample/gtk-demo/main.ui +18 -36
  49. data/sample/gtk-demo/markup.rb +53 -8
  50. data/sample/gtk-demo/markup.txt +2 -2
  51. data/sample/gtk-demo/org.gtk.Demo.gschema.xml +9 -0
  52. data/sample/gtk-demo/pixbufs.rb +105 -145
  53. data/sample/gtk-demo/reset.css +1 -58
  54. data/sample/gtk-demo/rotated_text.rb +119 -55
  55. data/sample/gtk-demo/shortcuts-boxes.ui +167 -0
  56. data/sample/gtk-demo/shortcuts-builder.ui +547 -0
  57. data/sample/gtk-demo/shortcuts-clocks.ui +166 -0
  58. data/sample/gtk-demo/shortcuts-gedit.ui +172 -0
  59. data/sample/gtk-demo/shortcuts.ui +65 -0
  60. data/sample/gtk-demo/stack.ui +5 -5
  61. data/sample/gtk-demo/textscroll.rb +106 -0
  62. data/sample/gtk-demo/theming.ui +58 -22
  63. data/sample/gtk-demo/theming_style_classes.rb +5 -4
  64. data/sample/gtk-demo/transparent.rb +143 -0
  65. data/sample/misc/aboutdialog.rb +1 -1
  66. data/sample/misc/bindings.rb +36 -15
  67. data/sample/misc/combobox.rb +1 -1
  68. data/sample/misc/dnd.rb +3 -3
  69. data/sample/misc/icons-theme-viewer.rb +1 -1
  70. data/sample/misc/iconview.rb +2 -2
  71. data/sample/misc/textbuffer-serialize.rb +18 -14
  72. data/sample/misc/to-drawable.rb +2 -2
  73. data/sample/misc/tooltips.rb +1 -0
  74. data/sample/misc/treeview.rb +1 -1
  75. data/sample/tutorial/README.md +18 -18
  76. data/test/test-gtk-clipboard.rb +1 -1
  77. data/test/test-gtk-combo-box.rb +2 -2
  78. data/test/test-gtk-icon-view.rb +2 -2
  79. data/test/test-gtk-image.rb +1 -1
  80. data/test/test-gtk-list-store.rb +9 -3
  81. data/test/test-gtk-text-view.rb +64 -0
  82. data/test/test-gtk-tree-path.rb +1 -3
  83. data/test/test-gtk-tree-view.rb +97 -0
  84. data/test/test-gtk-window.rb +2 -2
  85. data/test/test-pango-context.rb +56 -0
  86. metadata +46 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cce128e3d36321d7ca996eeb9a68a3cb0bd7b37e
4
- data.tar.gz: 1bca1c950a03c48b673d0c7dc471d8236d13faaa
3
+ metadata.gz: d8bbf34cf117cf1b1f63de5be79495831206293e
4
+ data.tar.gz: 530e7aea2c8bfc7bab0a942fa9a411143515430b
5
5
  SHA512:
6
- metadata.gz: 2444ec3778930cf4638ced3364d0d716de9e66fe0cd0a9371e26d208eb183dd1821a819f242d095b594b26c70d1cd2b5a2f1ecc255d72338f57c68b9908b9b5a
7
- data.tar.gz: ebb47da3bbff756db75855334a352df93cfc6473bdc07212962730ba869105772140223239be924fae5908b084f90b03a4915b329e43beab715a2c2e11e47a43
6
+ metadata.gz: 20259c9b35859a0a4db3ad0ebd53a06a49c0aef22ae8d540bcd263cf6e1ac7a1a1b05b4be43728e176ba1b6173dfcec05a5d589e33f695fde23cb6bf391fedd2
7
+ data.tar.gz: 61f5cff44a8f4261624ac1b0fb09b0c614b525a2b95e809554dc9facff99a9901c716caebd9ce91b3a84e70cc568a029b918471f3a15e8616bed1c8c52080f1a
data/ext/gtk3/rb-gtk3.c CHANGED
@@ -575,6 +575,21 @@ rb_gtk3_ui_manager_mark(gpointer object)
575
575
  }
576
576
  #endif
577
577
 
578
+ static void
579
+ rb_gtk3_text_tag_table_mark_body(GtkTextTag *tag, gpointer data)
580
+ {
581
+ rbgobj_gc_mark_instance(tag);
582
+ }
583
+
584
+ static void
585
+ rb_gtk3_text_tag_table_mark(gpointer object)
586
+ {
587
+ GtkTextTagTable *table;
588
+
589
+ table = GTK_TEXT_TAG_TABLE(object);
590
+ gtk_text_tag_table_foreach(table, rb_gtk3_text_tag_table_mark_body, NULL);
591
+ }
592
+
578
593
  void
579
594
  rbgtk3_class_init_func(gpointer g_class, G_GNUC_UNUSED gpointer class_data)
580
595
  {
@@ -614,6 +629,8 @@ Init_gtk3(void)
614
629
  #ifndef RB_GTK_UI_MANAGER_IS_DEPRECATED
615
630
  rbgobj_register_mark_func(GTK_TYPE_UI_MANAGER, rb_gtk3_ui_manager_mark);
616
631
  #endif
632
+ rbgobj_register_mark_func(GTK_TYPE_TEXT_TAG_TABLE,
633
+ rb_gtk3_text_tag_table_mark);
617
634
 
618
635
  rbgtk3_cell_layout_init();
619
636
  rbgtk3_container_init();
data/lib/2.2/gtk3.so CHANGED
Binary file
data/lib/2.3/gtk3.so CHANGED
Binary file
@@ -16,13 +16,6 @@
16
16
 
17
17
  module Gtk
18
18
  class Container
19
- class << self
20
- alias_method :child_properties_raw, :child_properties
21
- def child_properties
22
- child_properties_raw[0]
23
- end
24
- end
25
-
26
19
  include Enumerable
27
20
 
28
21
  alias_method :add_raw, :add
@@ -297,7 +297,7 @@ module Gtk
297
297
  case icon
298
298
  when Symbol
299
299
  context.set_icon(:stock_id => icon, :hot_x => hot_x, :hot_y => hot_y)
300
- when Gdk::Pixbuf
300
+ when GdkPixbuf::Pixbuf
301
301
  context.set_icon(:pixbuf => icon, :hot_x => hot_x, :hot_y => hot_y)
302
302
  when Gtk::Widget
303
303
  context.set_icon(:widget => icon, :hot_x => hot_x, :hot_y => hot_y)
@@ -523,7 +523,7 @@ module Gtk
523
523
  end
524
524
  when Symbol
525
525
  [{:stock => image, :size => size}]
526
- when Gdk::Pixbuf
526
+ when GdkPixbuf::Pixbuf
527
527
  [{:pixbuf => image}]
528
528
  when Gtk::IconSet
529
529
  [{:icon_set => image, :size => size}]
@@ -531,7 +531,7 @@ module Gtk
531
531
  [{:icon => image, :size => size}]
532
532
  else
533
533
  message =
534
- "Image must be String, Symbol, Gdk::Pixbuf, Gtk::IconSet or " +
534
+ "Image must be String, Symbol, GdkPixbuf::Pixbuf, Gtk::IconSet or " +
535
535
  "Gio::Icon: #{image.inspect}"
536
536
  raise ArgumentError, message
537
537
  end
data/lib/gtk3/image.rb CHANGED
@@ -21,7 +21,7 @@ module Gtk
21
21
  # given.
22
22
  #
23
23
  # @param Hash{Symbol => Gtk::Stock, String, Gtk::IconSet, Gio::Icon,
24
- # Gdk::Pixbuf, Gdk::PixbufAnimation, Cairo::Surface,
24
+ # GdkPixbuf::Pixbuf, GdkPixbuf::PixbufAnimation, Cairo::Surface,
25
25
  # Fixnum}
26
26
  #
27
27
  # @example Create an empty image.
@@ -45,18 +45,18 @@ module Gtk
45
45
  # icon = Gio::ThemedIcon.new 'gtk-open'
46
46
  # image = Gtk::Image.new :icon => icon, :size => :dialog
47
47
  #
48
- # @example Create an image from a Gdk::Pixbuf.
49
- # pixbuf = Gdk::Pixbuf.new 'path/to/the/image.png'
48
+ # @example Create an image from a GdkPixbuf::Pixbuf.
49
+ # pixbuf = GdkPixbuf::Pixbuf.new(:file => 'path/to/the/image.png')
50
50
  # image = Gtk::Image.new :pixbuf => pixbuf
51
51
  #
52
52
  # @example Create an image from an Gtk::IconSet, that itself is created
53
- # from a Gdk::Pixbuf.
54
- # pixbuf = Gdk::Pixbuf.new 'path/to/the/image.png'
53
+ # from a GdkPixbuf::Pixbuf.
54
+ # pixbuf = GdkPixbuf::Pixbuf.new(:file => 'path/to/the/image.png')
55
55
  # iconSet = Gtk::IconSet.new pixbuf
56
56
  # image = Gtk::Image.new :icon_set => iconSet, :size => :dialog
57
57
  #
58
- # @example Create an image from a Gdk::PixbufAnimation
59
- # pixAnim = Gdk::PixbufAnimation.new 'anim.gif'
58
+ # @example Create an image from a GdkPixbuf::PixbufAnimation
59
+ # pixAnim = GdkPixbuf::PixbufAnimation.new 'anim.gif'
60
60
  # image = Gtk::Image.new :animation => pixAnim
61
61
  #
62
62
  # @example Create an image from a file in a resource file
data/lib/gtk3/loader.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2014-2015 Ruby-GNOME2 Project Team
1
+ # Copyright (C) 2014-2016 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
@@ -142,6 +142,7 @@ module Gtk
142
142
  require "gtk3/text-buffer"
143
143
  require "gtk3/text-iter"
144
144
  require "gtk3/text-tag-table"
145
+ require "gtk3/text-view"
145
146
  require "gtk3/toggle-action"
146
147
  require "gtk3/toggle-button"
147
148
  require "gtk3/tool-button"
@@ -239,10 +240,15 @@ module Gtk
239
240
  end
240
241
  end
241
242
 
242
- def enum_class_name(info)
243
- case info.name
244
- when /\ARc/
245
- "RC#{$POSTMATCH}"
243
+ def rubyish_class_name(info)
244
+ case info
245
+ when GObjectIntrospection::EnumInfo
246
+ case info.name
247
+ when /\ARc/
248
+ "RC#{$POSTMATCH}"
249
+ else
250
+ super
251
+ end
246
252
  else
247
253
  super
248
254
  end
@@ -29,6 +29,37 @@ module Gtk
29
29
  tag
30
30
  end
31
31
 
32
+ alias_method :add_mark_raw, :add_mark
33
+ def add_mark(mark, where)
34
+ @marks ||= {}
35
+ add_mark_raw(mark, where)
36
+ mark_name = mark.name
37
+ @marks[mark_name] = mark if mark_name
38
+ end
39
+
40
+ alias_method :create_mark_raw, :create_mark
41
+ def create_mark(name, where, options={})
42
+ if options == true or options == false
43
+ options = {:left_gravity => options}
44
+ end
45
+ left_gravity = options[:left_gravity]
46
+ left_gravity = true if left_gravity.nil?
47
+ @marks ||= {}
48
+ if name.nil?
49
+ create_mark_raw(name, where, left_gravity)
50
+ else
51
+ @marks[name] = create_mark_raw(name, where, left_gravity)
52
+ end
53
+ end
54
+
55
+ alias_method :delete_mark_raw, :delete_mark
56
+ def delete_mark(mark)
57
+ @marks ||= {}
58
+ mark_name = mark.name
59
+ delete_mark_raw(mark)
60
+ @marks.delete(mark_name) if mark_name
61
+ end
62
+
32
63
  # prevent collision with deprecated methods.
33
64
  alias_method :get_iter_at_line_offset_raw, :get_iter_at_line_offset
34
65
  alias_method :get_iter_at_line_index_raw, :get_iter_at_line_index
@@ -99,7 +130,7 @@ module Gtk
99
130
  insert_interactive(iter, target, default_editable)
100
131
  else
101
132
  case target
102
- when Gdk::Pixbuf
133
+ when GdkPixbuf::Pixbuf
103
134
  insert_pixbuf_raw(iter, target)
104
135
  when TextChildAnchor
105
136
  insert_text_child_anchor_raw(iter, target)
@@ -148,19 +179,9 @@ module Gtk
148
179
  end
149
180
  end
150
181
 
151
- alias_method :serialize_formats_raw, :serialize_formats
152
- def serialize_formats
153
- serialize_formats_raw[0]
154
- end
155
-
156
- alias_method :deserialize_formats_raw, :deserialize_formats
157
- def deserialize_formats
158
- deserialize_formats_raw[0]
159
- end
160
-
161
182
  alias_method :serialize_raw, :serialize
162
183
  def serialize(*arguments)
163
- serialize_raw(*arguments)[0].pack("C*")
184
+ serialize_raw(*arguments).pack("C*")
164
185
  end
165
186
 
166
187
  alias_method :selection_bounds_raw, :selection_bounds
@@ -0,0 +1,53 @@
1
+ # Copyright (C) 2016 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ module Gtk
18
+ class TextView
19
+ def get_iter_at(options)
20
+ location = options[:location]
21
+ position = options[:position]
22
+
23
+ if location
24
+ get_iter_at_location(*location)
25
+ elsif position
26
+ get_iter_at_position(*position)
27
+ else
28
+ message = "must specify :location or :position: #{options.inspect}"
29
+ raise ArgumentError, message
30
+ end
31
+ end
32
+
33
+ alias_method :get_iter_at_location_raw, :get_iter_at_location
34
+ def get_iter_at_location(x, y)
35
+ found, iter = get_iter_at_location_raw(x, y)
36
+ if found
37
+ iter
38
+ else
39
+ nil
40
+ end
41
+ end
42
+
43
+ alias_method :get_iter_at_position_raw, :get_iter_at_position
44
+ def get_iter_at_position(x, y)
45
+ found, iter, trailing = get_iter_at_position_raw(x, y)
46
+ if found
47
+ [iter, trailing]
48
+ else
49
+ nil
50
+ end
51
+ end
52
+ end
53
+ end
@@ -100,6 +100,11 @@ module Gtk
100
100
  set(iter, columns, _values)
101
101
  end
102
102
 
103
+ alias_method :get_column_type_raw, :get_column_type
104
+ def get_column_type(index)
105
+ (@column_types ||= {})[index] ||= get_column_type_raw(index)
106
+ end
107
+
103
108
  private
104
109
  def setup_iter(iter)
105
110
  iter.model = self
@@ -61,5 +61,30 @@ module Gtk
61
61
  raise ArgumentError, "wrong number of arguments (#{args.size} for 2..4)"
62
62
  end
63
63
  end
64
+
65
+ alias_method :expand_row_raw, :expand_row
66
+ def expand_row(path, options={})
67
+ if options == true or options == false
68
+ open_all = options
69
+ else
70
+ open_all = options[:open_all]
71
+ open_all = true if open_all.nil?
72
+ end
73
+
74
+ expand_row_raw(path, open_all)
75
+ end
76
+
77
+ private
78
+ def create_signal_handler(signal_name, callback)
79
+ case signal_name
80
+ when "row-collapsed", "row-expanded"
81
+ lambda do |tree_view, iter, path, *extra_args|
82
+ iter.model = tree_view.model
83
+ callback.call(tree_view, iter, path, *extra_args)
84
+ end
85
+ else
86
+ super
87
+ end
88
+ end
64
89
  end
65
90
  end
data/lib/gtk3/widget.rb CHANGED
@@ -50,11 +50,6 @@ module Gtk
50
50
  end
51
51
  end
52
52
 
53
- alias_method :style_properties_raw, :style_properties
54
- def style_properties
55
- style_properties_raw[0]
56
- end
57
-
58
53
  alias_method :set_connect_func_raw, :set_connect_func
59
54
  def set_connect_func(&block)
60
55
  set_connect_func_raw do |*args|
data/sample/gtk-demo/TODO CHANGED
@@ -1,6 +1,10 @@
1
1
  # C version (3.19.1) versus Ruby version
2
2
 
3
- C version Ruby version Updated
3
+ # Ruby version : is there already a ruby version of the demo
4
+ # Updated 3.19 : if there is a ruby version is it udapted to 3.19
5
+ # Changed? 3.20: does this demo has changed with version 3.20
6
+ #
7
+ C version Ruby version Updated 3.20
4
8
  application.c no no
5
9
  assistant.c ok ok
6
10
  builder.c ok ok
@@ -25,6 +29,7 @@ expander.c ok ok
25
29
  filtermodel.c ok ok
26
30
  flowbox.c no no
27
31
  font_features.c ok ok
32
+ foreigndrawing no no
28
33
  gestures.c no no
29
34
  glarea.c no no
30
35
  headerbar.c ok ok
@@ -45,11 +50,11 @@ overlay.c ok ok
45
50
  overlay2.c ok ok
46
51
  panes.c ok ok
47
52
  pickers.c ok ok
48
- pixbufs.c ok no
53
+ pixbufs.c ok ok
49
54
  popover.c ok ok
50
55
  printing.c ok ok
51
56
  revealer.c ok ok
52
- rotated_text.c ok no
57
+ rotated_text.c ok ok
53
58
  scale.c ok ok
54
59
  search_entry.c no no
55
60
  search_entry2.c ok ok
@@ -60,11 +65,11 @@ spinbutton.c no no
60
65
  spinner.c ok ok
61
66
  stack.c ok ok
62
67
  textmask.c ok ok
63
- textscroll.c no no
68
+ textscroll.c ok ok
64
69
  textview.c ok no
65
70
  theming_style_classes.c ok ok
66
71
  toolpalette.c no no
67
- transparent.c no no
72
+ transparent.c ok ok
68
73
  tree_store.c ok no
69
74
 
70
75
  # Ruby version
@@ -72,4 +77,3 @@ Check all the ruby demos that doesn't correspond to a C version.
72
77
 
73
78
  # Demo that are not to be done
74
79
  pagesetup.c
75
-
@@ -1,100 +1,123 @@
1
1
  <?xml version="1.0"?>
2
2
  <interface>
3
- <object class="GtkGrid" id="grid">
3
+ <template class="DemoApplicationWindow" parent="GtkApplicationWindow">
4
+ <property name="title" translatable="yes">Application Class</property>
5
+ <property name="default-width">200</property>
6
+ <property name="default-height">200</property>
7
+ <property name="icon-name">document-open</property>
4
8
  <child>
5
- <object class="GtkToolbar" id="toolbar">
6
- <property name="hexpand">1</property>
7
- <style>
8
- <class name="primary-toolbar"/>
9
- </style>
10
- <child>
11
- <object class="GtkMenuToolButton" id="menutool">
12
- <property name="icon-name">document-open</property>
13
- </object>
14
- </child>
9
+ <object class="GtkGrid">
10
+ <property name="visible">1</property>
15
11
  <child>
16
- <object class="GtkToolButton" id="quit">
17
- <property name="icon-name">application-exit</property>
18
- <property name="action-name">app.quit</property>
12
+ <object class="GtkToolbar">
13
+ <property name="visible">1</property>
14
+ <property name="hexpand">1</property>
15
+ <style>
16
+ <class name="primary-toolbar"/>
17
+ </style>
18
+ <child>
19
+ <object class="GtkMenuToolButton" id="menutool">
20
+ <property name="visible">1</property>
21
+ <property name="icon-name">document-open</property>
22
+ </object>
23
+ </child>
24
+ <child>
25
+ <object class="GtkToolButton">
26
+ <property name="visible">1</property>
27
+ <property name="icon-name">application-exit</property>
28
+ <property name="action-name">app.quit</property>
29
+ </object>
30
+ </child>
31
+ <child>
32
+ <object class="GtkSeparatorToolItem">
33
+ <property name="visible">1</property>
34
+ </object>
35
+ </child>
36
+ <child>
37
+ <object class="GtkToolButton">
38
+ <property name="visible">1</property>
39
+ <property name="icon-name">applications-other</property>
40
+ <property name="action-name">win.logo</property>
41
+ </object>
42
+ </child>
19
43
  </object>
44
+ <packing>
45
+ <property name="left-attach">0</property>
46
+ <property name="top-attach">0</property>
47
+ </packing>
20
48
  </child>
21
49
  <child>
22
- <object class="GtkSeparatorToolItem" id="sep"/>
23
- </child>
24
- <child>
25
- <object class="GtkToolButton" id="logo">
26
- <property name="icon-name">applications-other</property>
27
- <property name="action-name">win.logo</property>
28
- </object>
29
- </child>
30
- </object>
31
- <packing>
32
- <property name="left-attach">0</property>
33
- <property name="top-attach">0</property>
34
- </packing>
35
- </child>
36
- <child>
37
- <object class="GtkInfoBar" id="infobar">
38
- <property name="no-show-all">1</property>
39
- <property name="hexpand">1</property>
40
- <child internal-child="content_area">
41
- <object class="GtkBox" id="content_area">
42
- <child>
43
- <object class="GtkLabel" id="message">
44
- <property name="visible">1</property>
45
- <property name="hexpand">1</property>
50
+ <object class="GtkInfoBar" id="infobar">
51
+ <property name="no-show-all">1</property>
52
+ <property name="hexpand">1</property>
53
+ <child internal-child="content_area">
54
+ <object class="GtkBox" id="content_area">
55
+ <child>
56
+ <object class="GtkLabel" id="message">
57
+ <property name="visible">1</property>
58
+ <property name="hexpand">1</property>
59
+ </object>
60
+ </child>
61
+ </object>
62
+ </child>
63
+ <child internal-child="action_area">
64
+ <object class="GtkBox">
65
+ <child>
66
+ <object class="GtkButton">
67
+ <property name="visible">1</property>
68
+ <property name="valign">center</property>
69
+ <property name="label" translatable="yes">_OK</property>
70
+ <property name="use_underline">1</property>
71
+ <signal name="clicked" handler="clicked_cb"/>
72
+ </object>
73
+ </child>
46
74
  </object>
47
75
  </child>
48
76
  </object>
77
+ <packing>
78
+ <property name="left-attach">0</property>
79
+ <property name="top-attach">1</property>
80
+ </packing>
49
81
  </child>
50
- <child internal-child="action_area">
51
- <object class="GtkBox" id="action_area">
82
+ <child>
83
+ <object class="GtkScrolledWindow">
84
+ <property name="visible">1</property>
85
+ <property name="shadow-type">in</property>
52
86
  <child>
53
- <object class="GtkButton" id="button">
87
+ <object class="GtkTextView">
54
88
  <property name="visible">1</property>
55
- <property name="valign">center</property>
56
- <property name="label" translatable="yes">_OK</property>
57
- <property name="use_underline">1</property>
89
+ <property name="hexpand">1</property>
90
+ <property name="vexpand">1</property>
91
+ <property name="buffer">buffer</property>
58
92
  </object>
59
93
  </child>
60
94
  </object>
95
+ <packing>
96
+ <property name="left-attach">0</property>
97
+ <property name="top-attach">2</property>
98
+ </packing>
61
99
  </child>
62
- </object>
63
- <packing>
64
- <property name="left-attach">0</property>
65
- <property name="top-attach">1</property>
66
- </packing>
67
- </child>
68
- <child>
69
- <object class="GtkScrolledWindow" id="sw">
70
- <property name="shadow-type">in</property>
71
100
  <child>
72
- <object class="GtkTextView" id="contents">
101
+ <object class="GtkStatusbar" id="status">
73
102
  <property name="hexpand">1</property>
74
- <property name="vexpand">1</property>
103
+ <property name="visible">1</property>
75
104
  </object>
105
+ <packing>
106
+ <property name="left-attach">0</property>
107
+ <property name="top-attach">3</property>
108
+ </packing>
76
109
  </child>
77
110
  </object>
78
- <packing>
79
- <property name="left-attach">0</property>
80
- <property name="top-attach">2</property>
81
- </packing>
82
111
  </child>
83
- <child>
84
- <object class="GtkStatusbar" id="status">
85
- <property name="hexpand">1</property>
86
- <property name="visible">1</property>
87
- </object>
88
- <packing>
89
- <property name="left-attach">0</property>
90
- <property name="top-attach">3</property>
91
- </packing>
92
- </child>
93
- </object>
112
+ </template>
94
113
  <menu id="toolmenu">
95
114
  <item>
96
115
  <attribute name="label">File1</attribute>
97
116
  <attribute name="action">win.file1</attribute>
98
117
  </item>
99
118
  </menu>
119
+ <object class="GtkTextBuffer" id="buffer">
120
+ <signal name="changed" handler="update_statusbar"/>
121
+ <signal name="mark-set" handler="mark_set_callback"/>
122
+ </object>
100
123
  </interface>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <interface>
3
+ <!-- interface-requires gtk+ 3.10 -->
4
+ <menu id="appmenu">
5
+ <section>
6
+ <item>
7
+ <attribute name="label" translatable="yes">About</attribute>
8
+ <attribute name="action">app.about</attribute>
9
+ </item>
10
+ </section>
11
+ <section>
12
+ <item>
13
+ <attribute name="label" translatable="yes">_Quit</attribute>
14
+ <attribute name="action">app.quit</attribute>
15
+ <attribute name="accel">&lt;Primary&gt;q</attribute>
16
+ </item>
17
+ </section>
18
+ </menu>
19
+ </interface>
@@ -60,6 +60,7 @@ module AssistantDemo
60
60
 
61
61
  entry = Gtk::Entry.new
62
62
  entry.activates_default = true
63
+ entry.valign = :center
63
64
  box.pack_start(entry, :expand => true, :fill => true, :padding => 0)
64
65
 
65
66
  entry.signal_connect "changed" do |widget|
@@ -7,7 +7,7 @@
7
7
  font: Cantarell 20px;
8
8
  }
9
9
 
10
- GtkWindow {
10
+ window {
11
11
  background: linear-gradient(153deg, #151515, #151515 5px, transparent 5px) 0 0,
12
12
  linear-gradient(333deg, #151515, #151515 5px, transparent 5px) 10px 5px,
13
13
  linear-gradient(153deg, #222, #222 5px, transparent 5px) 0 5px,
@@ -18,7 +18,7 @@ GtkWindow {
18
18
  background-size: 20px 20px;
19
19
  }
20
20
 
21
- .button {
21
+ button {
22
22
  color: black;
23
23
  background-color: #bbb;
24
24
  border-style: solid;
@@ -28,25 +28,25 @@ GtkWindow {
28
28
  padding: 12px 4px;
29
29
  }
30
30
 
31
- .button:first-child {
31
+ button:first-child {
32
32
  border-radius: 5px 0 0 5px;
33
33
  }
34
34
 
35
- .button:last-child {
35
+ button:last-child {
36
36
  border-radius: 0 5px 5px 0;
37
37
  border-width: 2px;
38
38
  }
39
39
 
40
- .button:hover {
40
+ button:hover {
41
41
  padding: 12px 48px;
42
42
  background-color: #4870bc;
43
43
  }
44
44
 
45
- .button *:hover {
45
+ button *:hover {
46
46
  color: white;
47
47
  }
48
48
 
49
- .button:hover:active,
50
- .button:active {
49
+ button:hover:active,
50
+ button:active {
51
51
  background-color: #993401;
52
52
  }