visualruby 3.6.10 → 3.6.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.vr_settings.yaml +2 -2
- data/examples/06_alert_box/.vr_settings.yaml +2 -2
- data/examples/dialog_box/.vr_settings.yaml +1 -1
- data/examples/dialog_box/src/ChooserDialog.rb +7 -6
- data/lib/AlertDialog.rb +8 -8
- data/lib/glade/AlertDialog.glade +19 -13
- data/src/version.rb +1 -1
- metadata +1 -2
- data/examples/dialog_box/src/glade/MyClass.glade +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f89abef05a8f6c12be3069183f51a2063e41a6160021194d9b1eb61c034f9df
|
4
|
+
data.tar.gz: c696cecc0d174d60bcc088717562a5360536ab8193cdbc398f4dcd3e8d8b969c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b60417faa39285caddde81953048382f8fb678229c76135b7bee29b495ed1e2ec6e8c38072a00f83a05e3a6dc506e2b46aaa779b4aa59f94d3fbc250b7c4f6cc
|
7
|
+
data.tar.gz: 11f10bd05c75adb1e335d0c7e67c855a198159ac8bc251e7a28b78bc92b3244cbdd21496df0f8a712491b1b99aaf0ad06ebf8e331d8b0d0556e44a63f9b4ae91
|
data/.vr_settings.yaml
CHANGED
@@ -37,8 +37,8 @@ open_folders:
|
|
37
37
|
- "/home/eric/vrp/vr3/src/editor"
|
38
38
|
- "/home/eric/vrp/vr3/src/main"
|
39
39
|
- "/home/eric/vrp/vr3/src/main/glade"
|
40
|
-
current_file: "/home/eric/vrp/vr3/
|
41
|
-
current_line:
|
40
|
+
current_file: "/home/eric/vrp/vr3/src/version.rb"
|
41
|
+
current_line: 1
|
42
42
|
rdoc_command_line: rdoc -x README
|
43
43
|
builder: !ruby/object:Gtk::Builder {}
|
44
44
|
top_level_window: false
|
@@ -12,8 +12,8 @@ open_files:
|
|
12
12
|
open_folders:
|
13
13
|
- "/home/eric/vrp/vr3/examples/06_alert_box"
|
14
14
|
- "/home/eric/vrp/vr3/examples/06_alert_box/src"
|
15
|
-
current_file: "/home/eric/vrp/vr3/examples/06_alert_box/
|
16
|
-
current_line:
|
15
|
+
current_file: "/home/eric/vrp/vr3/examples/06_alert_box/alertdemo.rb"
|
16
|
+
current_line: 2
|
17
17
|
rdoc_command_line: rdoc -x README
|
18
18
|
builder: !ruby/object:Gtk::Builder {}
|
19
19
|
top_level_window: false
|
@@ -1,18 +1,19 @@
|
|
1
1
|
|
2
2
|
class ChooserDialog
|
3
3
|
|
4
|
-
include GladeGUI
|
4
|
+
include GladeGUI # to load ChooserDialog.glade
|
5
5
|
|
6
6
|
def run()
|
7
|
-
load_glade
|
7
|
+
load_glade # in GladeGUI
|
8
8
|
response = @builder[:window1].run()
|
9
|
-
@builder[:window1].hide
|
10
9
|
case response
|
11
10
|
when Gtk::ResponseType::OK
|
12
|
-
|
11
|
+
lang, default = @builder[:comboLang].active_text, @builder[:checkDefault].active?
|
13
12
|
when Gtk::ResponseType::CANCEL
|
14
|
-
|
15
|
-
end
|
13
|
+
lang, default = nil, nil
|
14
|
+
end
|
15
|
+
@builder[:window1].close
|
16
|
+
return lang, default
|
16
17
|
end
|
17
18
|
|
18
19
|
end
|
data/lib/AlertDialog.rb
CHANGED
@@ -16,12 +16,12 @@ module VR
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def before_show
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
# @builder[:window1].show_all
|
20
|
+
# @builder[:boxData].visible = false
|
21
|
+
# @builder[:input_text].visible = false
|
22
|
+
# @builder[:ui_grid].visible = false
|
23
|
+
# @builder[:choices_text].visible = false
|
24
|
+
# @builder[:headline].hide
|
25
25
|
@flags[:title] = @flags[:title] ? @flags[:title] : @flags[:headline]
|
26
26
|
@builder[:window1].title = @flags[:title] if @flags[:title]
|
27
27
|
width = @flags[:width].to_i > 100 ? @flags[:width].to_i : 300
|
@@ -59,8 +59,8 @@ module VR
|
|
59
59
|
@builder[:boxData].visible = true
|
60
60
|
@builder[:input_text].show
|
61
61
|
end
|
62
|
-
@builder[:button_no].
|
63
|
-
@builder[:button_cancel].
|
62
|
+
@builder[:button_no].show if @flags[:button_no]
|
63
|
+
@builder[:button_cancel].show if @flags[:button_cancel]
|
64
64
|
set_glade_variables
|
65
65
|
set_glade_hash(@flags)
|
66
66
|
end
|
data/lib/glade/AlertDialog.glade
CHANGED
@@ -12,9 +12,9 @@
|
|
12
12
|
<child internal-child="vbox">
|
13
13
|
<object class="GtkBox">
|
14
14
|
<property name="can-focus">False</property>
|
15
|
-
<property name="margin-start">
|
16
|
-
<property name="margin-end">
|
17
|
-
<property name="margin-top">
|
15
|
+
<property name="margin-start">30</property>
|
16
|
+
<property name="margin-end">30</property>
|
17
|
+
<property name="margin-top">36</property>
|
18
18
|
<property name="margin-bottom">20</property>
|
19
19
|
<property name="orientation">vertical</property>
|
20
20
|
<child internal-child="action_area">
|
@@ -70,10 +70,7 @@
|
|
70
70
|
<object class="GtkBox" id="box1">
|
71
71
|
<property name="visible">True</property>
|
72
72
|
<property name="can-focus">False</property>
|
73
|
-
<property name="margin-
|
74
|
-
<property name="margin-end">20</property>
|
75
|
-
<property name="margin-top">20</property>
|
76
|
-
<property name="margin-bottom">20</property>
|
73
|
+
<property name="margin-bottom">34</property>
|
77
74
|
<property name="orientation">vertical</property>
|
78
75
|
<property name="spacing">15</property>
|
79
76
|
<child>
|
@@ -110,17 +107,14 @@
|
|
110
107
|
</object>
|
111
108
|
<packing>
|
112
109
|
<property name="expand">False</property>
|
113
|
-
<property name="fill">
|
110
|
+
<property name="fill">False</property>
|
114
111
|
<property name="position">1</property>
|
115
112
|
</packing>
|
116
113
|
</child>
|
117
114
|
<child>
|
118
115
|
<object class="GtkBox" id="boxData">
|
119
|
-
<property name="visible">True</property>
|
120
116
|
<property name="can-focus">False</property>
|
121
|
-
<property name="margin-
|
122
|
-
<property name="margin-end">20</property>
|
123
|
-
<property name="margin-bottom">20</property>
|
117
|
+
<property name="margin-bottom">30</property>
|
124
118
|
<property name="hexpand">True</property>
|
125
119
|
<property name="vexpand">True</property>
|
126
120
|
<property name="orientation">vertical</property>
|
@@ -145,7 +139,7 @@
|
|
145
139
|
</packing>
|
146
140
|
</child>
|
147
141
|
<child>
|
148
|
-
<!-- n-columns=2 n-rows=
|
142
|
+
<!-- n-columns=2 n-rows=3 -->
|
149
143
|
<object class="GtkGrid" id="ui_grid">
|
150
144
|
<property name="can-focus">False</property>
|
151
145
|
<property name="row-spacing">10</property>
|
@@ -156,6 +150,18 @@
|
|
156
150
|
<child>
|
157
151
|
<placeholder/>
|
158
152
|
</child>
|
153
|
+
<child>
|
154
|
+
<placeholder/>
|
155
|
+
</child>
|
156
|
+
<child>
|
157
|
+
<placeholder/>
|
158
|
+
</child>
|
159
|
+
<child>
|
160
|
+
<placeholder/>
|
161
|
+
</child>
|
162
|
+
<child>
|
163
|
+
<placeholder/>
|
164
|
+
</child>
|
159
165
|
</object>
|
160
166
|
<packing>
|
161
167
|
<property name="expand">False</property>
|
data/src/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: visualruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Cunningham
|
@@ -208,7 +208,6 @@ files:
|
|
208
208
|
- "./examples/dialog_box/dialog_box.rb"
|
209
209
|
- "./examples/dialog_box/src/ChooserDialog.rb"
|
210
210
|
- "./examples/dialog_box/src/glade/ChooserDialog.glade"
|
211
|
-
- "./examples/dialog_box/src/glade/MyClass.glade"
|
212
211
|
- "./img/close.png"
|
213
212
|
- "./img/folder.png"
|
214
213
|
- "./img/glade.png"
|
@@ -1,36 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!-- Generated with glade 3.16.1 -->
|
3
|
-
<interface>
|
4
|
-
<requires lib="gtk+" version="3.0"/>
|
5
|
-
<object class="GtkWindow" id="window1">
|
6
|
-
<property name="can_focus">False</property>
|
7
|
-
<property name="window_position">center</property>
|
8
|
-
<child>
|
9
|
-
<object class="GtkButtonBox" id="buttonbox1">
|
10
|
-
<property name="visible">True</property>
|
11
|
-
<property name="can_focus">False</property>
|
12
|
-
<property name="halign">center</property>
|
13
|
-
<property name="valign">center</property>
|
14
|
-
<property name="margin_left">50</property>
|
15
|
-
<property name="margin_right">50</property>
|
16
|
-
<property name="margin_top">50</property>
|
17
|
-
<property name="margin_bottom">50</property>
|
18
|
-
<property name="orientation">vertical</property>
|
19
|
-
<property name="layout_style">start</property>
|
20
|
-
<child>
|
21
|
-
<object class="GtkButton" id="button1">
|
22
|
-
<property name="label" translatable="yes">button</property>
|
23
|
-
<property name="visible">True</property>
|
24
|
-
<property name="can_focus">True</property>
|
25
|
-
<property name="receives_default">True</property>
|
26
|
-
</object>
|
27
|
-
<packing>
|
28
|
-
<property name="expand">True</property>
|
29
|
-
<property name="fill">True</property>
|
30
|
-
<property name="position">0</property>
|
31
|
-
</packing>
|
32
|
-
</child>
|
33
|
-
</object>
|
34
|
-
</child>
|
35
|
-
</object>
|
36
|
-
</interface>
|