visualruby 3.0.19 → 3.0.20
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 +14 -12
- data/examples/settings_file/bin/SavableSettings.rb +1 -1
- data/lib/GladeGUI.rb +15 -17
- data/my_yard.yaml +10 -8
- data/src/main/VR_Tools.rb +0 -35
- metadata +3 -7
- data/examples/alert_box/.vr_settings.yaml +0 -19
- data/examples/phantom/.vr_settings.yaml +0 -22
- data/examples/pop_up/.vr_settings.yaml +0 -19
- data/examples/settings_file/.vr_settings.yaml +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d8ea4fd5071dfeaab6d16e17b2884fab71679c5
|
4
|
+
data.tar.gz: a76c646b8987c3acbd8e7221c48138d6cb3f9b7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0dfff4b7f083c560f6143850834c9897d66306a7e3a22c58c6f529bceed3b68231f8ee7bf89fab106cc9b32c94ac11514f5bcfec995ad03824b1df3f8770389
|
7
|
+
data.tar.gz: 21fdf376c9f9a26a3c5e175b0ca241f5c01062051c0a448571ea02149f192dcad6f3fc001edce4faff5dec2d2bb4de48db51d52a26e78bfda648f4886611dafc
|
data/.vr_settings.yaml
CHANGED
@@ -1,26 +1,28 @@
|
|
1
1
|
--- !ruby/object:VR_ENV
|
2
2
|
vr_yaml_file: "/home/eric/vrp/vr3/.vr_settings.yaml"
|
3
|
-
width:
|
4
|
-
height:
|
5
|
-
panel_pos:
|
6
|
-
notebook_panel_position:
|
3
|
+
width: 1364
|
4
|
+
height: 691
|
5
|
+
panel_pos: 297
|
6
|
+
notebook_panel_position: 472
|
7
7
|
run_command_line: ruby vr
|
8
8
|
open_files:
|
9
|
-
- "/home/eric/vrp/vr3/
|
10
|
-
- "/home/eric/vrp/vr3/src/main/VR_Main.rb"
|
11
|
-
- "/home/eric/vrp/vr3/examples/settings_file/bin/MainApp.rb"
|
12
|
-
- "/home/eric/vrp/vr3/examples/settings_file/bin/SavableSettings.rb"
|
9
|
+
- "/home/eric/vrp/vr3/yard_hack/common.css"
|
13
10
|
- "/home/eric/vrp/vr3/src/editor/VR_Tabs.rb"
|
11
|
+
- "/home/eric/vrp/vr3/lib/Alert.rb"
|
12
|
+
- "/home/eric/vrp/vr3/lib/GladeGUI.rb"
|
13
|
+
- "/home/eric/vrp/vr3/src/main/NewProjectGUI.rb"
|
14
|
+
- "/home/eric/vrp/vr3/src/main/VR_Main.rb"
|
14
15
|
- "/home/eric/vrp/vr3/src/main/VR_File_Tree.rb"
|
15
|
-
- "/home/eric/vrp/vr3/
|
16
|
+
- "/home/eric/vrp/vr3/lib/SavableClass.rb"
|
16
17
|
open_folders:
|
17
18
|
- "/home/eric/vrp/vr3"
|
18
19
|
- "/home/eric/vrp/vr3/lib"
|
19
20
|
- "/home/eric/vrp/vr3/src"
|
20
21
|
- "/home/eric/vrp/vr3/src/editor"
|
22
|
+
- "/home/eric/vrp/vr3/src/main"
|
21
23
|
- "/home/eric/vrp/vr3/yard_hack"
|
22
|
-
current_file: "/home/eric/vrp/vr3/
|
23
|
-
current_line:
|
24
|
-
rdoc_command_line:
|
24
|
+
current_file: "/home/eric/vrp/vr3/lib/SavableClass.rb"
|
25
|
+
current_line: 41
|
26
|
+
rdoc_command_line: yardoc lib - site/*.*
|
25
27
|
builder: !ruby/object:Gtk::Builder {}
|
26
28
|
top_level_window: false
|
data/lib/GladeGUI.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
#
|
1
|
+
|
3
2
|
# GladeGUI connects your class to a glade form.
|
4
3
|
# It will load a .glade
|
5
4
|
# file into memory, enabling your ruby programs to have a GUI interface.
|
@@ -8,7 +7,7 @@
|
|
8
7
|
# variable is an instance of {Gtk::Builder}[http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3ABuilder]
|
9
8
|
# It holds references to all your windows and widgets.
|
10
9
|
#
|
11
|
-
#
|
10
|
+
# ==Include the GladeGUI interface
|
12
11
|
#
|
13
12
|
# To use the GladeGUI interface, include this line in your code:
|
14
13
|
#
|
@@ -340,36 +339,35 @@ end
|
|
340
339
|
# @return none
|
341
340
|
def get_glade_variables(obj = self)
|
342
341
|
obj.instance_variables.each do |var_name|
|
342
|
+
next if var_name == :@builder or var_name == :@top_level_window
|
343
343
|
var = obj.instance_variable_get(var_name)
|
344
344
|
var_name = var_name.to_s.gsub("@", "") #fix for ruby 1.9 giving symbols
|
345
345
|
if var.is_a? Hash
|
346
346
|
var.each_pair do |key, val|
|
347
|
-
if glade_value = get_control_value("#{var_name}[#{key.to_s}]")
|
347
|
+
if glade_value = get_control_value("#{var_name}[#{key.to_s}]", obj)
|
348
348
|
var[key] = glade_value
|
349
349
|
end
|
350
350
|
end
|
351
351
|
obj.instance_variable_set("@"+ var_name, var)
|
352
352
|
elsif var.is_a? Array
|
353
353
|
var.each_index do |i|
|
354
|
-
if glade_value = get_control_value("#{var_name}[#{i.to_s}]")
|
354
|
+
if glade_value = get_control_value("#{var_name}[#{i.to_s}]", obj)
|
355
355
|
var[i] = glade_value
|
356
356
|
end
|
357
357
|
end
|
358
358
|
obj.instance_variable_set("@"+ var_name, var)
|
359
359
|
else
|
360
|
-
glade_value = get_control_value(var_name)
|
361
|
-
|
362
|
-
obj.instance_variable_set("@"+ var_name, glade_value)
|
363
|
-
end
|
360
|
+
glade_value = get_control_value(var_name, obj)
|
361
|
+
obj.instance_variable_set("@"+ var_name, glade_value) unless glade_value.nil?
|
364
362
|
end
|
365
363
|
end
|
366
364
|
end
|
367
365
|
|
368
366
|
# @private
|
369
|
-
def get_control_value(glade_name)
|
370
|
-
return unless control =
|
367
|
+
def get_control_value(glade_name, obj = self)
|
368
|
+
return unless control = obj.builder[glade_name]
|
371
369
|
case control
|
372
|
-
when Gtk::CheckButton then control.active?
|
370
|
+
when Gtk::CheckButton, Gtk::ToggleButton then control.active?
|
373
371
|
when Gtk::Entry then control.text
|
374
372
|
when Gtk::TextView then control.buffer.text
|
375
373
|
when Gtk::FontButton then control.font_name
|
@@ -416,11 +414,11 @@ end
|
|
416
414
|
|
417
415
|
|
418
416
|
|
419
|
-
# The method you call to show the glade form.
|
420
|
-
# It loads the glade form, sets all the form's widgets to your instance variables,
|
421
|
-
# connects all your methods to their signals, and starts Gtk.main loop if necessary.
|
422
|
-
# @param [Object #builder] parent Optional parent that this window will always be on top of.
|
423
|
-
# @return nothing.
|
417
|
+
# The method you call to show the glade form.
|
418
|
+
# It loads the glade form, sets all the form's widgets to your instance variables,
|
419
|
+
# connects all your methods to their signals, and starts Gtk.main loop if necessary.
|
420
|
+
# @param [Object #builder] parent Optional parent that this window will always be on top of.
|
421
|
+
# @return nothing.
|
424
422
|
def show_glade(parent = nil)
|
425
423
|
load_glade()
|
426
424
|
if parent then
|
data/my_yard.yaml
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:MyYard
|
2
2
|
project_root: "/home/eric/vrp/vr3"
|
3
3
|
output_dir: doc
|
4
|
-
theme:
|
5
|
-
template:
|
6
|
-
files:
|
7
|
-
extra_files:
|
8
|
-
exclude:
|
4
|
+
theme: vr
|
5
|
+
template: visualruby
|
6
|
+
files: lib/**/*.rb
|
7
|
+
extra_files: site/*.*
|
8
|
+
exclude: ''
|
9
9
|
include_public: true
|
10
10
|
include_private: false
|
11
11
|
include_protected: false
|
12
|
-
|
12
|
+
include_private_tag: false
|
13
|
+
title: Visual Ruby
|
14
|
+
main: index.html
|
13
15
|
export_db: false
|
14
|
-
|
16
|
+
export_db_path: ".yardoc"
|
15
17
|
vr_yaml_file: "/home/eric/vrp/vr3/my_yard.yaml"
|
16
|
-
main: README.md
|
17
18
|
builder: !ruby/object:Gtk::Builder {}
|
18
19
|
top_level_window: true
|
20
|
+
no_private: false
|
data/src/main/VR_Tools.rb
CHANGED
@@ -88,40 +88,5 @@ END
|
|
88
88
|
end
|
89
89
|
|
90
90
|
end
|
91
|
-
# def VR_Tools.sudo_command(command)
|
92
|
-
# @pass ||= ""
|
93
|
-
# if @pass.strip() == ""
|
94
|
-
# @pass = VR::Dialog.input_box("Enter System Password:")
|
95
|
-
# end
|
96
|
-
# result = command + "\n" + `echo #{@pass} | sudo -S #{command}`
|
97
|
-
# @pass = "" if result.include? "incorrect password"
|
98
|
-
# return result
|
99
|
-
# end
|
100
91
|
|
101
|
-
# def VR_Tools.create_desktop_launcher()
|
102
|
-
# command = "vr " + Dir.pwd
|
103
|
-
# name = File.basename(Dir.pwd) + " Project"
|
104
|
-
# str = <<END
|
105
|
-
#
|
106
|
-
##!/usr/bin/env xdg-open
|
107
|
-
#
|
108
|
-
#[Desktop Entry]
|
109
|
-
#Version=1.0
|
110
|
-
#Type=Application
|
111
|
-
#Terminal=false
|
112
|
-
#Icon[en_US]=gnome-panel-launcher
|
113
|
-
#Name[en_US]=#{name}
|
114
|
-
#Exec=#{command}
|
115
|
-
#Comment[en_US]=Opens a Visual Ruby project
|
116
|
-
#Name=#{name}
|
117
|
-
#Comment=Opens a Visual Ruby project
|
118
|
-
#Icon=gnome-panel-launcher
|
119
|
-
#
|
120
|
-
#END
|
121
|
-
# return unless File.directory?(ENV["HOME"] + "/Desktop")
|
122
|
-
# fn = ENV["HOME"] + "/Desktop/" + name + ".desktop"
|
123
|
-
# File.open(fn,"w") { |f| f.puts(str) }
|
124
|
-
# File.chmod(0755, fn)
|
125
|
-
# alert("Created launcher:\n" + name + "\non your computer's desktop")
|
126
|
-
# end
|
127
92
|
|
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.0.
|
4
|
+
version: 3.0.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Cunningham
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir:
|
10
10
|
- "."
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-07-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gtk3
|
@@ -83,7 +83,6 @@ files:
|
|
83
83
|
- "./examples/active_record2/bin/glade/Paycheck.glade"
|
84
84
|
- "./examples/active_record2/db/development.sqlite3"
|
85
85
|
- "./examples/active_record2/main.rb"
|
86
|
-
- "./examples/alert_box/.vr_settings.yaml"
|
87
86
|
- "./examples/alert_box/bin/AlertBoxDemo.rb"
|
88
87
|
- "./examples/alert_box/bin/glade/AlertBoxDemo.glade"
|
89
88
|
- "./examples/alert_box/main.rb"
|
@@ -142,15 +141,12 @@ files:
|
|
142
141
|
- "./examples/listview_objects/bin/glade/DataObject.glade"
|
143
142
|
- "./examples/listview_objects/bin/glade/ListViewObjectsGUI.glade"
|
144
143
|
- "./examples/listview_objects/main.rb"
|
145
|
-
- "./examples/phantom/.vr_settings.yaml"
|
146
144
|
- "./examples/phantom/main.rb"
|
147
145
|
- "./examples/phantom/src/MyClass.rb"
|
148
146
|
- "./examples/phantom/src/glade/MyClass.glade"
|
149
|
-
- "./examples/pop_up/.vr_settings.yaml"
|
150
147
|
- "./examples/pop_up/main.rb"
|
151
148
|
- "./examples/pop_up/src/MyClass.rb"
|
152
149
|
- "./examples/pop_up/src/glade/MyClass.glade"
|
153
|
-
- "./examples/settings_file/.vr_settings.yaml"
|
154
150
|
- "./examples/settings_file/bin/MainApp.rb"
|
155
151
|
- "./examples/settings_file/bin/SavableSettings.rb"
|
156
152
|
- "./examples/settings_file/bin/glade/MainApp.glade"
|
@@ -264,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
264
260
|
version: '0'
|
265
261
|
requirements: []
|
266
262
|
rubyforge_project: nowarning
|
267
|
-
rubygems_version: 2.
|
263
|
+
rubygems_version: 2.5.1
|
268
264
|
signing_key:
|
269
265
|
specification_version: 4
|
270
266
|
summary: Create IDE designed to make great GUIs with Ruby
|
@@ -1,19 +0,0 @@
|
|
1
|
-
--- !ruby/object:VR_ENV
|
2
|
-
vr_yaml_file: ".vr_settings.yaml"
|
3
|
-
width: 1329
|
4
|
-
height: 753
|
5
|
-
panel_pos: 513
|
6
|
-
notebook_panel_position: 400
|
7
|
-
run_command_line: ruby main.rb
|
8
|
-
open_files:
|
9
|
-
- "/home/eric/vrp/vr3/examples/alert_box/bin/AlertBoxDemo.rb"
|
10
|
-
open_folders:
|
11
|
-
- "/home/eric/vrp/vr3/examples/alert_box"
|
12
|
-
- "/home/eric/vrp/vr3/examples/alert_box/bin"
|
13
|
-
- "/home/eric/vrp/vr3/examples/alert_box/bin/glade"
|
14
|
-
current_file: "/home/eric/vrp/vr3/examples/alert_box/bin/AlertBoxDemo.rb"
|
15
|
-
current_line: 71
|
16
|
-
rdoc_command_line: rdoc
|
17
|
-
builder: !ruby/object:Gtk::Builder {}
|
18
|
-
top_level_window: false
|
19
|
-
settings_file_version: 1
|
@@ -1,22 +0,0 @@
|
|
1
|
-
--- !ruby/object:VR_ENV
|
2
|
-
vr_yaml_file: ".vr_settings.yaml"
|
3
|
-
width: 1102
|
4
|
-
height: 611
|
5
|
-
panel_pos: 360
|
6
|
-
notebook_panel_position: 400
|
7
|
-
run_command_line: ruby main.rb
|
8
|
-
open_files:
|
9
|
-
- "/home/eric/vrp/phantom/main.rb"
|
10
|
-
- "/home/eric/vrp/phantom/src/MyClass.rb"
|
11
|
-
open_folders:
|
12
|
-
- "/home/eric/vrp/phantom"
|
13
|
-
- "/home/eric/vrp/phantom/src"
|
14
|
-
- "/home/eric/vrp/phantom/src/glade"
|
15
|
-
current_file: "/home/eric/vrp/phantom/main.rb"
|
16
|
-
current_line: 11
|
17
|
-
rdoc_command_line: rdoc -x README
|
18
|
-
browser: firefox
|
19
|
-
backup_path: "/home/eric"
|
20
|
-
tab_spaces: 2
|
21
|
-
glade_path: glade-3
|
22
|
-
font_name: Monospace 10
|
@@ -1,19 +0,0 @@
|
|
1
|
-
--- !ruby/object:VR_ENV
|
2
|
-
vr_yaml_file: ".vr_settings.yaml"
|
3
|
-
width: 800
|
4
|
-
height: 600
|
5
|
-
panel_pos: 360
|
6
|
-
notebook_panel_position: 400
|
7
|
-
run_command_line: ruby main.rb
|
8
|
-
open_files:
|
9
|
-
- "/home/eric/vrp/vrx/Untitled"
|
10
|
-
open_folders:
|
11
|
-
- "/home/eric/vrp/examples/pop_up"
|
12
|
-
current_file: "/home/eric/vrp/vrx/Untitled"
|
13
|
-
current_line: 1
|
14
|
-
rdoc_command_line: rdoc -x README
|
15
|
-
browser: firefox
|
16
|
-
backup_path: "/home/eric"
|
17
|
-
tab_spaces: 2
|
18
|
-
glade_path: glade-3
|
19
|
-
font_name: Monospace 10
|
@@ -1,22 +0,0 @@
|
|
1
|
-
--- !ruby/object:VR_ENV
|
2
|
-
vr_yaml_file: ".vr_settings.yaml"
|
3
|
-
width: 1264
|
4
|
-
height: 727
|
5
|
-
panel_pos: 267
|
6
|
-
notebook_panel_position: 444
|
7
|
-
run_command_line: ruby main.rb
|
8
|
-
open_files:
|
9
|
-
- "/home/eric/vrp/vr3/examples/settings_file/main.rb"
|
10
|
-
- "/home/eric/vrp/vr3/examples/settings_file/bin/SavableSettings.rb"
|
11
|
-
- "/home/eric/vrp/vr3/examples/settings_file/bin/MainApp.rb"
|
12
|
-
open_folders:
|
13
|
-
- "/home/eric/vrp/vr3/examples/settings_file"
|
14
|
-
current_file: "/home/eric/vrp/vr3/examples/settings_file/main.rb"
|
15
|
-
current_line: 15
|
16
|
-
rdoc_command_line: rdoc -x README
|
17
|
-
browser: firefox
|
18
|
-
backup_path: "/home/eric"
|
19
|
-
tab_spaces: 2
|
20
|
-
glade_path: glade-3
|
21
|
-
font_name: Monospace 10
|
22
|
-
filename: ".vr_settings.yaml"
|