conquest-gtk 0.0.1 → 0.2
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.
- data/lib/conquest/gtk/gui.rb +26 -17
- data/lib/conquest/gtk/version.rb +1 -1
- metadata +2 -2
data/lib/conquest/gtk/gui.rb
CHANGED
@@ -18,7 +18,13 @@ module Conquest
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def init_ui
|
21
|
-
|
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
|
-
|
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
|
-
|
34
|
-
|
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
|
-
#
|
42
|
+
# vbox_ards_code contains the ARDS code and its copy button.
|
41
43
|
|
42
|
-
|
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
|
-
|
48
|
-
|
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
|
-
|
53
|
-
|
54
|
-
|
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
|
65
|
+
add hbox_main
|
57
66
|
end
|
58
67
|
|
59
68
|
def init_signals
|
data/lib/conquest/gtk/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2012-11-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: conquest
|