visualruby 3.4.6 → 3.4.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.vr_settings.yaml +9 -19
  3. data/examples/active_record/.vr_settings.yaml +1 -1
  4. data/examples/alert_box/.vr_settings.yaml +4 -2
  5. data/examples/alert_box/bin/glade/AlertBoxDemo.glade +91 -94
  6. data/examples/alert_box/main.rb +2 -3
  7. data/examples/all_widgets/.vr_settings.yaml +1 -1
  8. data/examples/all_widgets/bin/AllWidgets.rb +1 -2
  9. data/examples/all_widgets/bin/glade/AllWidgets.glade +33 -33
  10. data/examples/all_widgets/main.rb +1 -4
  11. data/examples/calculator/.vr_settings.yaml +3 -2
  12. data/examples/calculator/bin/glade/Calculator.glade +79 -110
  13. data/examples/calculator/main.rb +1 -5
  14. data/examples/child_window/.vr_settings.yaml +5 -5
  15. data/examples/child_window/bin/glade/ChildWindowDemo.glade +16 -16
  16. data/examples/child_window/bin/glade/ModalWindow.glade +14 -14
  17. data/examples/child_window/main.rb +1 -5
  18. data/examples/drag_drop/.vr_settings.yaml +6 -4
  19. data/examples/drag_drop/main.rb +1 -4
  20. data/examples/filetreeview/.vr_settings.yaml +3 -2
  21. data/examples/filetreeview/main.rb +1 -3
  22. data/examples/golf_handicap/.vr_settings.yaml +2 -2
  23. data/examples/listview/.vr_settings.yaml +2 -2
  24. data/examples/listview/main.rb +1 -3
  25. data/examples/listview_objects/.vr_settings.yaml +6 -5
  26. data/examples/listview_objects/main.rb +1 -5
  27. data/examples/phantom/.vr_settings.yaml +2 -2
  28. data/examples/phantom/main.rb +0 -2
  29. data/examples/phantom/src/glade/MyClass.glade +19 -19
  30. data/examples/settings_file/.vr_settings.yaml +2 -2
  31. data/examples/settings_file/main.rb +2 -3
  32. data/examples/settings_file/settings.yaml +3 -5
  33. data/examples/simple_ruby_gui/.vr_settings.yaml +2 -2
  34. data/examples/simple_ruby_gui/main.rb +2 -3
  35. data/lib/SavableHash.rb +25 -0
  36. data/src/version.rb +1 -1
  37. data/vr +0 -2
  38. metadata +4 -3
@@ -1,27 +1,27 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!-- Generated with glade 3.18.3 -->
2
+ <!-- Generated with glade 3.38.2 -->
3
3
  <interface>
4
4
  <requires lib="gtk+" version="3.0"/>
5
5
  <object class="GtkWindow" id="window1">
6
- <property name="can_focus">False</property>
6
+ <property name="can-focus">False</property>
7
7
  <property name="title" translatable="yes">Modal Window</property>
8
8
  <property name="modal">True</property>
9
- <property name="window_position">center</property>
9
+ <property name="window-position">center</property>
10
10
  <child>
11
11
  <object class="GtkBox" id="box1">
12
12
  <property name="visible">True</property>
13
- <property name="can_focus">False</property>
14
- <property name="margin_left">20</property>
15
- <property name="margin_right">20</property>
16
- <property name="margin_top">20</property>
17
- <property name="margin_bottom">20</property>
13
+ <property name="can-focus">False</property>
14
+ <property name="margin-left">20</property>
15
+ <property name="margin-right">20</property>
16
+ <property name="margin-top">20</property>
17
+ <property name="margin-bottom">20</property>
18
18
  <property name="orientation">vertical</property>
19
19
  <property name="spacing">20</property>
20
20
  <child>
21
21
  <object class="GtkLabel" id="label1">
22
22
  <property name="visible">True</property>
23
- <property name="can_focus">False</property>
24
- <property name="label" translatable="yes">This modal window freezes the parent, and is always on top.</property>
23
+ <property name="can-focus">False</property>
24
+ <property name="label" translatable="yes">This modal window freezes the parent, and it's always on top.</property>
25
25
  </object>
26
26
  <packing>
27
27
  <property name="expand">False</property>
@@ -32,15 +32,15 @@
32
32
  <child>
33
33
  <object class="GtkButtonBox" id="buttonbox1">
34
34
  <property name="visible">True</property>
35
- <property name="can_focus">False</property>
35
+ <property name="can-focus">False</property>
36
36
  <property name="orientation">vertical</property>
37
- <property name="layout_style">start</property>
37
+ <property name="layout-style">start</property>
38
38
  <child>
39
39
  <object class="GtkButton" id="buttonOk">
40
40
  <property name="label" translatable="yes">Ok</property>
41
41
  <property name="visible">True</property>
42
- <property name="can_focus">True</property>
43
- <property name="receives_default">True</property>
42
+ <property name="can-focus">True</property>
43
+ <property name="receives-default">True</property>
44
44
  </object>
45
45
  <packing>
46
46
  <property name="expand">False</property>
@@ -1,9 +1,5 @@
1
- #!/usr/bin/ruby
2
1
 
3
- #Updated for Gtk3!
4
-
5
- # ignore -- this is for development, same as require 'vrlib'
6
- require File.exists?("./../../lib/vrlib.rb") ? "./../../lib/vrlib.rb" : "vrlib"
2
+ require "vrlib"
7
3
 
8
4
  # from require_all gem:
9
5
  require_rel 'bin/'
@@ -1,16 +1,18 @@
1
1
  --- !ruby/object:VR_ENV
2
+ vr_yaml_file: "/home/eric/vrp/vr3/examples/drag_drop/.vr_settings.yaml"
2
3
  width: 1307
3
4
  height: 698
4
5
  panel_pos: 423
6
+ notebook_panel_position: 400
5
7
  run_command_line: ruby main.rb
6
8
  open_files:
7
9
  - "/home/eric/vrp/vr3/examples/drag_drop/bin/DragDropDemo.rb"
10
+ - "/home/eric/vrp/vr3/examples/drag_drop/main.rb"
8
11
  open_folders:
9
12
  - "/home/eric/vrp/vr3/examples/drag_drop"
10
13
  - "/home/eric/vrp/vr3/examples/drag_drop/bin"
11
- current_file: "/home/eric/vrp/vr3/examples/drag_drop/bin/DragDropDemo.rb"
14
+ - "/home/eric/vrp/vr3/examples/drag_drop/bin/glade"
15
+ current_file: "/home/eric/vrp/vr3/examples/drag_drop/main.rb"
16
+ current_line: 9
12
17
  rdoc_command_line: rdoc -x README
13
- vr_yaml_file: ".vr_settings.yaml"
14
- notebook_panel_position: 400
15
- current_line: 12
16
18
  settings_file_version: 1
@@ -1,11 +1,8 @@
1
- #!/usr/bin/ruby
2
1
 
3
- # ignore -- this is for development, same as require 'vrlib'
4
- require File.exists?("./../../lib/vrlib.rb") ? "./../../lib/vrlib.rb" : "vrlib"
2
+ require "vrlib"
5
3
 
6
4
  # from require_all gem:
7
5
  require_rel 'bin/'
8
6
 
9
-
10
7
  DragDropDemo.new.show_glade()
11
8
 
@@ -1,5 +1,5 @@
1
1
  --- !ruby/object:VR_ENV
2
- vr_yaml_file: ".vr_settings.yaml"
2
+ vr_yaml_file: "/home/eric/vrp/vr3/examples/filetreeview/.vr_settings.yaml"
3
3
  width: 1337
4
4
  height: 691
5
5
  panel_pos: 490
@@ -12,8 +12,9 @@ open_files:
12
12
  open_folders:
13
13
  - "/home/eric/vrp/vr3/examples/filetreeview"
14
14
  - "/home/eric/vrp/vr3/examples/filetreeview/bin"
15
+ - "/home/eric/vrp/vr3/examples/filetreeview/bin/glade"
15
16
  - "/home/eric/vrp/vr3/examples/filetreeview/img"
16
- current_file: "/home/eric/vrp/vr3/examples/filetreeview/bin/ProjectTree.rb"
17
+ current_file: "/home/eric/vrp/vr3/examples/filetreeview/main.rb"
17
18
  current_line: 12
18
19
  rdoc_command_line: rdoc -x README
19
20
  settings_file_version: 1
@@ -1,7 +1,5 @@
1
- #!/usr/bin/ruby
2
1
 
3
- # ignore -- this is for development, same as require 'vrlib'
4
- require File.exists?("./../../lib/vrlib.rb") ? "./../../lib/vrlib.rb" : "vrlib"
2
+ require "vrlib"
5
3
  require 'find'
6
4
 
7
5
 
@@ -15,8 +15,8 @@ open_folders:
15
15
  - "/home/eric/vrp/vr3/examples/golf_handicap"
16
16
  - "/home/eric/vrp/vr3/examples/golf_handicap/src"
17
17
  - "/home/eric/vrp/vr3/examples/golf_handicap/src/glade"
18
- current_file: "/home/eric/vrp/vr3/examples/golf_handicap/golf_handicap.gemspec"
19
- current_line: 3
18
+ current_file: "/home/eric/vrp/vr3/examples/golf_handicap/golf_handicap"
19
+ current_line: 20
20
20
  rdoc_command_line: rdoc -x README
21
21
  builder: !ruby/object:Gtk::Builder {}
22
22
  top_level_window: false
@@ -12,7 +12,7 @@ open_files:
12
12
  open_folders:
13
13
  - "/home/eric/vrp/vr3/examples/listview"
14
14
  - "/home/eric/vrp/vr3/examples/listview/bin"
15
- current_file: "/home/eric/vrp/vr3/examples/listview/bin/SongListView.rb"
16
- current_line: 74
15
+ current_file: "/home/eric/vrp/vr3/examples/listview/bin/SongListViewGUI.rb"
16
+ current_line: 42
17
17
  rdoc_command_line: rdoc -x README
18
18
  filename: ".vr_settings.yaml"
@@ -1,7 +1,5 @@
1
- #!/usr/bin/ruby
2
1
 
3
- # ignore -- this is for development, same as require 'vrlib'
4
- require File.exists?("./../../lib/vrlib.rb") ? "./../../lib/vrlib.rb" : "vrlib"
2
+ require "vrlib"
5
3
 
6
4
  # from require_all gem:
7
5
  require_rel 'bin/'
@@ -1,19 +1,20 @@
1
1
  --- !ruby/object:VR_ENV
2
- width: 1373
2
+ vr_yaml_file: "/home/eric/vrp/vr3/examples/listview_objects/.vr_settings.yaml"
3
+ width: 1301
3
4
  height: 665
4
5
  panel_pos: 256
6
+ notebook_panel_position: 400
5
7
  run_command_line: ruby main.rb
6
8
  open_files:
7
9
  - "/home/eric/vrp/vr3/examples/listview_objects/bin/ListViewObjectsGUI.rb"
8
10
  - "/home/eric/vrp/vr3/examples/listview_objects/bin/ListViewObjects.rb"
9
11
  - "/home/eric/vrp/vr3/examples/listview_objects/bin/DataObject.rb"
12
+ - "/home/eric/vrp/vr3/examples/listview_objects/main.rb"
10
13
  open_folders:
11
14
  - "/home/eric/vrp/vr3/examples/listview_objects"
12
15
  - "/home/eric/vrp/vr3/examples/listview_objects/bin"
13
16
  - "/home/eric/vrp/vr3/examples/listview_objects/bin/glade"
14
- current_file: "/home/eric/vrp/vr3/examples/listview_objects/bin/DataObject.rb"
17
+ current_file: "/home/eric/vrp/vr3/examples/listview_objects/bin/ListViewObjects.rb"
18
+ current_line: 38
15
19
  rdoc_command_line: rdoc -x README
16
- vr_yaml_file: ".vr_settings.yaml"
17
- notebook_panel_position: 400
18
- current_line: 3
19
20
  settings_file_version: 1
@@ -1,9 +1,5 @@
1
- #!/usr/bin/ruby
2
1
 
3
- # Updated for Gtk3!
4
-
5
- # ignore -- this is for development, same as require 'vrlib'
6
- require File.exists?("./../../lib/vrlib.rb") ? "./../../lib/vrlib.rb" : "vrlib"
2
+ require "vrlib"
7
3
 
8
4
  # from require_all gem:
9
5
  require_rel 'bin/'
@@ -1,6 +1,6 @@
1
1
  --- !ruby/object:VR_ENV
2
2
  vr_yaml_file: "/home/eric/vrp/vr3/examples/phantom/.vr_settings.yaml"
3
- width: 812
3
+ width: 953
4
4
  height: 600
5
5
  panel_pos: 360
6
6
  notebook_panel_position: 400
@@ -13,5 +13,5 @@ open_folders:
13
13
  - "/home/eric/vrp/vr3/examples/phantom/src"
14
14
  - "/home/eric/vrp/vr3/examples/phantom/src/glade"
15
15
  current_file: "/home/eric/vrp/vr3/examples/phantom/main.rb"
16
- current_line: 11
16
+ current_line: 1
17
17
  rdoc_command_line: rdoc -x README
@@ -1,5 +1,3 @@
1
- #!/usr/bin/ruby
2
-
3
1
  require "vrlib"
4
2
 
5
3
  # from require_all gem:
@@ -1,27 +1,27 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!-- Generated with glade 3.16.1 -->
2
+ <!-- Generated with glade 3.38.2 -->
3
3
  <interface>
4
4
  <requires lib="gtk+" version="3.0"/>
5
5
  <object class="GtkWindow" id="window1">
6
- <property name="width_request">400</property>
7
- <property name="can_focus">False</property>
8
- <property name="window_position">center</property>
6
+ <property name="width-request">400</property>
7
+ <property name="can-focus">False</property>
8
+ <property name="window-position">center</property>
9
9
  <child>
10
10
  <object class="GtkBox" id="box1">
11
11
  <property name="visible">True</property>
12
- <property name="can_focus">False</property>
13
- <property name="margin_left">20</property>
14
- <property name="margin_right">20</property>
15
- <property name="margin_top">20</property>
16
- <property name="margin_bottom">20</property>
12
+ <property name="can-focus">False</property>
13
+ <property name="margin-left">20</property>
14
+ <property name="margin-right">20</property>
15
+ <property name="margin-top">20</property>
16
+ <property name="margin-bottom">20</property>
17
17
  <property name="orientation">vertical</property>
18
18
  <property name="spacing">12</property>
19
19
  <child>
20
20
  <object class="GtkLabel" id="label1">
21
21
  <property name="visible">True</property>
22
- <property name="can_focus">False</property>
22
+ <property name="can-focus">False</property>
23
23
  <property name="label" translatable="yes">&lt;big&gt;Phantom Code&lt;/big&gt;</property>
24
- <property name="use_markup">True</property>
24
+ <property name="use-markup">True</property>
25
25
  </object>
26
26
  <packing>
27
27
  <property name="expand">False</property>
@@ -32,10 +32,10 @@
32
32
  <child>
33
33
  <object class="GtkLabel" id="label2">
34
34
  <property name="visible">True</property>
35
- <property name="can_focus">False</property>
35
+ <property name="can-focus">False</property>
36
36
  <property name="label" translatable="yes">This is a program with almost no source code. Its just a an empty class that includes the GladeGUI module. Here's a list of tasks its doing:
37
37
 
38
- 1) Loading MyCalss.glade into the @builder variable
38
+ 1) Loading MyClass.glade into the @builder variable
39
39
  2) Attaching the "clicked" signal to buttonCancel
40
40
  3) Making it so the program terminates if you press "X"
41
41
  4) Setting parent of this window if given.
@@ -50,8 +50,8 @@ MyClass.new.show_glade
50
50
 
51
51
  </property>
52
52
  <property name="wrap">True</property>
53
- <property name="width_chars">60</property>
54
- <property name="max_width_chars">33</property>
53
+ <property name="width-chars">60</property>
54
+ <property name="max-width-chars">33</property>
55
55
  </object>
56
56
  <packing>
57
57
  <property name="expand">False</property>
@@ -62,16 +62,16 @@ MyClass.new.show_glade
62
62
  <child>
63
63
  <object class="GtkButtonBox" id="buttonbox1">
64
64
  <property name="visible">True</property>
65
- <property name="can_focus">False</property>
65
+ <property name="can-focus">False</property>
66
66
  <property name="halign">center</property>
67
67
  <property name="valign">center</property>
68
- <property name="layout_style">start</property>
68
+ <property name="layout-style">start</property>
69
69
  <child>
70
70
  <object class="GtkButton" id="buttonCancel">
71
71
  <property name="label" translatable="yes">Cancel</property>
72
72
  <property name="visible">True</property>
73
- <property name="can_focus">True</property>
74
- <property name="receives_default">True</property>
73
+ <property name="can-focus">True</property>
74
+ <property name="receives-default">True</property>
75
75
  </object>
76
76
  <packing>
77
77
  <property name="expand">True</property>
@@ -13,6 +13,6 @@ open_folders:
13
13
  - "/home/eric/vrp/vr3/examples/settings_file"
14
14
  - "/home/eric/vrp/vr3/examples/settings_file/bin"
15
15
  - "/home/eric/vrp/vr3/examples/settings_file/bin/glade"
16
- current_file: "/home/eric/vrp/vr3/examples/settings_file/bin/MainApp.rb"
17
- current_line: 26
16
+ current_file: "/home/eric/vrp/vr3/examples/settings_file/bin/SavableSettings.rb"
17
+ current_line: 39
18
18
  rdoc_command_line: rdoc -x README
@@ -1,7 +1,6 @@
1
- #!/usr/bin/ruby
2
1
 
3
- # ignore -- this is for development, same as require 'vrlib'
4
- require File.exists?("./../../lib/vrlib.rb") ? "./../../lib/vrlib.rb" : "vrlib"
2
+
3
+ require "vrlib"
5
4
 
6
5
 
7
6
  # from require_all gem:
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:SavableSettings
2
- height: 415
3
- width: 609
2
+ height: 414
3
+ width: 350
4
4
  title: Savable Settings Demo
5
5
  text: |-
6
6
  Try running this program multiple times.
7
7
 
8
8
  It will create a file named settings.yaml that stores the height, width, title, and text from this window, so the window will be restored to the same state as when you exited.
9
9
 
10
- If you want to reset the file to the defaults, just delete the settings.yamls file.
10
+ If you want to reset the file to the defaults, just delete the settings.yaml file.
11
11
 
12
12
  You may need to click the 'Refresh' to see the settings.yaml file.
13
13
  vr_yaml_file: "/home/eric/vrp/vr3/examples/settings_file/settings.yaml"
14
- builder: !ruby/object:Gtk::Builder {}
15
- top_level_window: false
@@ -11,8 +11,8 @@ open_files:
11
11
  open_folders:
12
12
  - "/home/eric/vrp/vr3/examples/simple_ruby_gui"
13
13
  - "/home/eric/vrp/vr3/examples/simple_ruby_gui/bin"
14
- current_file: "/home/eric/vrp/vr3/examples/simple_ruby_gui/main.rb"
15
- current_line: 4
14
+ current_file: "/home/eric/vrp/vr3/examples/simple_ruby_gui/bin/DataObjectGUI.rb"
15
+ current_line: 22
16
16
  rdoc_command_line: rdoc -x README
17
17
  builder: !ruby/object:Gtk::Builder {}
18
18
  settings_file_version: 1
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/ruby
2
2
 
3
- #Updated for Gtk3!
4
3
 
5
4
  require "vrlib"
6
5
 
@@ -8,8 +7,8 @@ require "vrlib"
8
7
  require_rel 'bin'
9
8
 
10
9
 
11
- x = DataObjectGUI.new("Harvey Milktoast", "123 Main, Hemet, CA 90090",
10
+ form = DataObjectGUI.new("Harvey Milktoast", "123 Main, Hemet, CA 90090",
12
11
  "harvey@harveyserver.com", "132-243-4323")
13
- x.show_glade()
12
+ form.show_glade()
14
13
 
15
14
 
@@ -0,0 +1,25 @@
1
+
2
+ module VR
3
+
4
+ class SavableHash < Hash
5
+
6
+ def init(arg) #either file path or defaults hash
7
+ # if File(arg[:file]).exists
8
+ # return YAML.load(File.open(arg[:file]).read)
9
+ # else
10
+ arg
11
+ # end
12
+ end
13
+
14
+ def save()
15
+ file = self[:file]
16
+ alert file
17
+ File.open(file, "w") {|f| f.puts(self.to_yaml)}
18
+ end
19
+
20
+
21
+ end
22
+
23
+ end
24
+
25
+
data/src/version.rb CHANGED
@@ -1 +1 @@
1
- VERSION = "3.4.6"
1
+ VERSION = "3.4.7"
data/vr CHANGED
@@ -22,8 +22,6 @@ def load_everything
22
22
 
23
23
 
24
24
 
25
-
26
-
27
25
  VR_Main.new(ARGV, @splash).show_glade()
28
26
 
29
27
  end
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.4.6
4
+ version: 3.4.7
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: 2021-05-12 00:00:00.000000000 Z
12
+ date: 2021-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gtk3
@@ -184,6 +184,7 @@ files:
184
184
  - "./lib/DragDrop.rb"
185
185
  - "./lib/GladeGUI.rb"
186
186
  - "./lib/SavableClass.rb"
187
+ - "./lib/SavableHash.rb"
187
188
  - "./lib/Tools.rb"
188
189
  - "./lib/glade/Alert.glade"
189
190
  - "./lib/oinspect/MethodsListView.rb"
@@ -268,7 +269,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
269
  - !ruby/object:Gem::Version
269
270
  version: '0'
270
271
  requirements: []
271
- rubygems_version: 3.1.2
272
+ rubygems_version: 3.2.15
272
273
  signing_key:
273
274
  specification_version: 4
274
275
  summary: Create IDE designed to make great GUIs with Ruby