conquest-gtk 0.0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,13 @@ module Conquest
18
18
  end
19
19
 
20
20
  def init_ui
21
- vbox_main = Gtk::VBox.new false, 5
21
+ hbox_main = Gtk::HBox.new false, 5
22
+
23
+ ################################################################################
24
+
25
+ # vbox_hex_list contains the hex list and its copy button.
26
+
27
+ vbox_hex_list = Gtk::VBox.new false, 5
22
28
 
23
29
  # Both text views are directly in vbox_main.
24
30
 
@@ -26,34 +32,37 @@ module Conquest
26
32
  @txt_hex_list = Gtk::TextView.new
27
33
  scr_txt_hex_list.add_with_viewport @txt_hex_list
28
34
 
29
- scr_txt_ards_code = Gtk::ScrolledWindow.new
30
- @txt_ards_code = Gtk::TextView.new
31
- scr_txt_ards_code.add_with_viewport @txt_ards_code
35
+ @btn_copy_hex_list = Gtk::Button.new "Copy Hex List"
32
36
 
33
- # Automatic scrollbars on both text views.
34
- [scr_txt_hex_list, scr_txt_ards_code].map! do |scr|
35
- scr.set_policy *[Gtk::POLICY_AUTOMATIC] * 2
36
- end
37
+ vbox_hex_list.pack_start scr_txt_hex_list
38
+ vbox_hex_list.pack_start @btn_copy_hex_list, false
37
39
 
38
40
  ################################################################################
39
41
 
40
- # hbox_controls contains the two buttons along the bottom.
42
+ # vbox_ards_code contains the ARDS code and its copy button.
41
43
 
42
- hbox_controls = Gtk::HBox.new false, 5
44
+ vbox_ards_code = Gtk::VBox.new false, 5
45
+
46
+ scr_txt_ards_code = Gtk::ScrolledWindow.new
47
+ @txt_ards_code = Gtk::TextView.new
48
+ scr_txt_ards_code.add_with_viewport @txt_ards_code
43
49
 
44
- @btn_copy_hex_list = Gtk::Button.new "Copy Hex List"
45
50
  @btn_copy_ards_code = Gtk::Button.new "Copy ARDS Code"
46
51
 
47
- hbox_controls.add @btn_copy_hex_list
48
- hbox_controls.add @btn_copy_ards_code
52
+ vbox_ards_code.pack_start scr_txt_ards_code
53
+ vbox_ards_code.pack_start @btn_copy_ards_code, false
49
54
 
50
55
  ################################################################################
51
56
 
52
- vbox_main.pack_start scr_txt_hex_list
53
- vbox_main.pack_start scr_txt_ards_code
54
- vbox_main.pack_start hbox_controls, false
57
+ # Automatic scrollbars on both text views.
58
+ [scr_txt_hex_list, scr_txt_ards_code].map! do |scr|
59
+ scr.set_policy *[Gtk::POLICY_AUTOMATIC] * 2
60
+ end
61
+
62
+ hbox_main.pack_start vbox_hex_list, true
63
+ hbox_main.pack_start vbox_ards_code, true
55
64
 
56
- add vbox_main
65
+ add hbox_main
57
66
  end
58
67
 
59
68
  def init_signals
@@ -1,3 +1,3 @@
1
1
  module Conquest
2
- GUI_VERSION = "0.0.1"
2
+ GUI_VERSION = "0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conquest-gtk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: '0.2'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-02 00:00:00.000000000 Z
12
+ date: 2012-11-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: conquest