visualruby 1.0.13 → 1.0.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,6 +8,10 @@ class NewProjectGUI
8
8
  @parent.proj_path = nil
9
9
  end
10
10
 
11
+ def before_show
12
+ @builder["labelHomePath"].label = File.join(ENV["HOME"], "visualruby" + "/")
13
+ end
14
+
11
15
  def buttonCreate__clicked(*a)
12
16
  fn = @builder["entryFolderName"].text
13
17
  fn = fn.gsub(/[^\w\.]/, '_')
@@ -6,7 +6,7 @@
6
6
  <property name="visible">True</property>
7
7
  <property name="can_focus">False</property>
8
8
  <property name="modal">True</property>
9
- <property name="default_width">450</property>
9
+ <property name="default_width">550</property>
10
10
  <property name="default_height">300</property>
11
11
  <signal name="destroy" handler="destroy_window" swapped="no"/>
12
12
  <child>
@@ -68,7 +68,7 @@ You are free to move the project later.</property>
68
68
  </packing>
69
69
  </child>
70
70
  <child>
71
- <object class="GtkLabel" id="label3">
71
+ <object class="GtkLabel" id="labelHomePath">
72
72
  <property name="visible">True</property>
73
73
  <property name="can_focus">False</property>
74
74
  <property name="xalign">1</property>
@@ -103,7 +103,8 @@ END
103
103
  end
104
104
 
105
105
  #this works on Dir.pwd that's maybe different from project
106
- def VR_Tools.replace_html_in_docs()
106
+ def VR_Tools.replace_html_in_docs()
107
+ return if not File.file? "rdoc_replace.yaml"
107
108
  ar = YAML.load_file "rdoc_replace.yaml"
108
109
  Dir.glob("#{Dir.pwd}/doc/**/*.html") do |f|
109
110
  str = File.open(f).read
@@ -1,48 +1,16 @@
1
1
  --- !ruby/object:VR_ENV
2
- backup_path: /home/eric
3
- browser: firefox
4
- current_file: /home/eric/vrp/vrx/visualruby_examples/active_record2/active_record2.rb
5
- font_name: Monospace 10
6
- glade_path: glade-gtk2
7
- height: 865
2
+ current_file: /home/eric/vrp/vrx/visualruby_examples/active_record2/main.rb
3
+ height: 718
8
4
  open_files:
9
- - /home/eric/vrp/vrx/visualruby_examples/active_record2/active_record2.rb
5
+ - /home/eric/vrp/vrx/visualruby_examples/active_record2/main.rb
10
6
  - /home/eric/vrp/vrx/visualruby_examples/active_record2/bin/CompanyGUI.rb
11
7
  - /home/eric/vrp/vrx/visualruby_examples/active_record2/bin/Employee.rb
12
- - /home/eric/vrp/vrx/visualruby_examples/active_record2/bin/Paycheck.rb
13
- - /home/eric/vrp/vrx/visualruby_examples/active_record2/bin/Employer.rb
14
8
  open_folders:
15
9
  - /home/eric/vrp/vrx/visualruby_examples/active_record2
16
10
  - /home/eric/vrp/vrx/visualruby_examples/active_record2/bin
17
- - /home/eric/vrp/vrx/visualruby_examples/active_record2/bin/glade
18
- panel_pos: 541
11
+ panel_pos: 360
19
12
  rdoc_command_line: rdoc -x README
20
- run_command_line: ruby active_record2.rb
21
- tab_spaces: 2
22
- width: 1346
13
+ run_command_line: ruby main.rb
14
+ width: 1641
15
+ settings_file_version: 1
23
16
  builder: !ruby/object:Gtk::Builder {}
24
- glade_box: !ruby/object:VR::SimpleComboBoxEntry {}
25
- browser_box: !ruby/object:VR::SimpleComboBoxEntry {}
26
- buttonChooseFolder: ! '...'
27
- vbox1: !ruby/object:Gtk::VBox {}
28
- label7: ! 'Editor Font:'
29
- label3: ! 'Back-up Path:'
30
- window1: !ruby/object:Gtk::Window {}
31
- hbuttonbox1: !ruby/object:Gtk::HButtonBox {}
32
- buttonCancel: Cancel
33
- label8: ! 'RDoc Command Line: '
34
- table1: !ruby/object:Gtk::Table {}
35
- buttonTryBrowser: Try
36
- buttonSave: Save
37
- hboxBrowser: !ruby/object:Gtk::HBox {}
38
- hboxGlade: !ruby/object:Gtk::HBox {}
39
- label1: <big><big><b>Visual Ruby Settings</b></big></big>
40
- label2: ! 'Browser Command Line:'
41
- label4: ! 'Spaces for Each Tab in Editor:'
42
- label5: ! 'Glade Command Line:'
43
- label6: ! 'Command Line when "Run" is pressed:'
44
- hbox1: !ruby/object:Gtk::HBox {}
45
- hbox2: !ruby/object:Gtk::HBox {}
46
- hbox3: !ruby/object:Gtk::HBox {}
47
- hbox4: !ruby/object:Gtk::HBox {}
48
- buttonTryGlade: Try
@@ -15,6 +15,7 @@ class Employee < ActiveRecord::Base
15
15
 
16
16
  def balance()
17
17
  Paycheck.sum(:amount, :conditions => "employee_id = #{id}").round(2).to_s
18
+ # Paycheck.find("employee_id = #{id}").calculate(:sum, :amount).round(2).to_s
18
19
  end
19
20
 
20
21
  end
@@ -1,4 +1,4 @@
1
- require 'vrlib.rb'
1
+ require 'vrlib'
2
2
  require 'active_record'
3
3
 
4
4
  #make program output in real time so errors visible in VR.
@@ -1,20 +1,13 @@
1
1
  --- !ruby/object:VR_ENV
2
- backup_path: /home/eric
3
- browser: firefox
4
- current_file: /home/eric/vrp/vrx/visualruby_examples/all_widgets/all_widgets.rb
5
- font_name: Monospace 10
6
- glade_path: glade-3
7
- height: 649
2
+ current_file: /home/eric/vrp/vrx/visualruby_examples/all_widgets/main.rb
3
+ height: 600
8
4
  open_files:
9
- - /home/eric/vrp/vrx/visualruby_examples/all_widgets/bin/AllWidgets.rb
10
- - /home/eric/vrp/vrx/visualruby_examples/all_widgets/all_widgets.rb
5
+ - /home/eric/vrp/vrx/visualruby_examples/all_widgets/main.rb
11
6
  open_folders:
12
7
  - /home/eric/vrp/vrx/visualruby_examples/all_widgets
13
- - /home/eric/vrp/vrx/visualruby_examples/all_widgets/bin
14
- - /home/eric/vrp/vrx/visualruby_examples/all_widgets/bin/glade
15
8
  panel_pos: 360
16
9
  rdoc_command_line: rdoc -x README
17
- run_command_line: ruby all_widgets.rb
18
- tab_spaces: 2
19
- width: 1119
10
+ run_command_line: ruby main.rb
11
+ width: 800
12
+ settings_file_version: 1
20
13
  builder: !ruby/object:Gtk::Builder {}
@@ -9,5 +9,6 @@ STDERR.sync = true
9
9
  #everything in these directories will be included
10
10
  my_path = File.expand_path(File.dirname(__FILE__))
11
11
  require_all Dir.glob(my_path + "/bin/**/*.rb")
12
+
12
13
  AllWidgets.new.show
13
14
 
@@ -1,19 +1,12 @@
1
1
  --- !ruby/object:VR_ENV
2
- backup_path: /home/eric
3
- browser: firefox
4
- current_file: /home/eric/vrp/vrx/visualruby_examples/drag_drop/main.rb
5
- font_name: Monospace 10
6
- glade_path: glade-3
7
- height: 858
2
+ current_file: /home/eric/vrp/vrx/visualruby_examples/listview/Untitled
3
+ height: 600
8
4
  open_files:
9
- - /home/eric/vrp/vrx/visualruby_examples/drag_drop/bin/DragDropDemo.rb
10
- - /home/eric/vrp/vrx/visualruby_examples/drag_drop/main.rb
5
+ - /home/eric/vrp/vrx/visualruby_examples/listview/Untitled
11
6
  open_folders:
12
7
  - /home/eric/vrp/vrx/visualruby_examples/drag_drop
13
- - /home/eric/vrp/vrx/visualruby_examples/drag_drop/bin
14
- - /home/eric/vrp/vrx/visualruby_examples/drag_drop/bin/glade
15
- panel_pos: 594
8
+ panel_pos: 360
16
9
  rdoc_command_line: rdoc -x README
17
10
  run_command_line: ruby main.rb
18
- tab_spaces: 2
19
- width: 1434
11
+ width: 800
12
+ settings_file_version: 1
@@ -1,46 +1,12 @@
1
1
  --- !ruby/object:VR_ENV
2
- backup_path: /home/eric
3
- browser: C:\Program Files\iexplorer\iexplore.exe
4
- current_file: /home/eric/vrp/vrx/visualruby_examples/listview/main.rb
5
- font_name: Monospace 10
6
- glade_path: glade-gtk2
7
- height: 831
2
+ current_file: /home/eric/vrp/vrx/visualruby_examples/listview_objects/Untitled
3
+ height: 600
8
4
  open_files:
9
- - /home/eric/vrp/vrx/visualruby_examples/listview/bin/SongListView.rb
10
- - /home/eric/vrp/vrx/visualruby_examples/listview/bin/SongListViewGUI.rb
11
- - /home/eric/vrp/vrx/visualruby_examples/listview/main.rb
5
+ - /home/eric/vrp/vrx/visualruby_examples/listview_objects/Untitled
12
6
  open_folders:
13
7
  - /home/eric/vrp/vrx/visualruby_examples/listview
14
- - /home/eric/vrp/vrx/visualruby_examples/listview/bin
15
- - /home/eric/vrp/vrx/visualruby_examples/listview/bin/glade
16
- panel_pos: 494
8
+ panel_pos: 360
17
9
  rdoc_command_line: rdoc -x README
18
10
  run_command_line: ruby main.rb
19
- tab_spaces: 2
20
- width: 1190
21
- builder: !ruby/object:Gtk::Builder {}
22
- glade_box: !ruby/object:VR::SimpleComboBoxEntry {}
23
- browser_box: !ruby/object:VR::SimpleComboBoxEntry {}
24
- buttonChooseFolder: ! '...'
25
- vbox1: !ruby/object:Gtk::VBox {}
26
- label7: ! 'Editor Font:'
27
- label3: ! 'Back-up Path:'
28
- window1: !ruby/object:Gtk::Window {}
29
- hbuttonbox1: !ruby/object:Gtk::HButtonBox {}
30
- buttonCancel: Cancel
31
- label8: ! 'RDoc Command Line: '
32
- table1: !ruby/object:Gtk::Table {}
33
- buttonTryBrowser: Try
34
- buttonSave: Save
35
- hboxBrowser: !ruby/object:Gtk::HBox {}
36
- hboxGlade: !ruby/object:Gtk::HBox {}
37
- label1: <big><big><b>Visual Ruby Settings</b></big></big>
38
- label2: ! 'Browser Command Line:'
39
- label4: ! 'Spaces for Each Tab in Editor:'
40
- label5: ! 'Glade Command Line:'
41
- label6: ! 'Command Line when "Run" is pressed:'
42
- hbox1: !ruby/object:Gtk::HBox {}
43
- hbox2: !ruby/object:Gtk::HBox {}
44
- hbox3: !ruby/object:Gtk::HBox {}
45
- hbox4: !ruby/object:Gtk::HBox {}
46
- buttonTryGlade: Try
11
+ width: 800
12
+ settings_file_version: 1
@@ -1,46 +1,12 @@
1
1
  --- !ruby/object:VR_ENV
2
- backup_path: /home/eric
3
- browser: firefox
4
- current_file: /home/eric/vrp/vrx/visualruby_examples/listview_objects/main.rb
5
- font_name: Monospace 10
6
- glade_path: glade-gtk2
7
- height: 604
2
+ current_file: /home/eric/vrp/vrx/visualruby_examples/simple_ruby_gui/Untitled
3
+ height: 600
8
4
  open_files:
9
- - /home/eric/vrp/vrx/visualruby_examples/listview_objects/bin/ListViewObjectsGUI.rb
10
- - /home/eric/vrp/vrx/visualruby_examples/listview_objects/bin/ListViewObjects.rb
11
- - /home/eric/vrp/vrx/visualruby_examples/listview_objects/main.rb
5
+ - /home/eric/vrp/vrx/visualruby_examples/simple_ruby_gui/Untitled
12
6
  open_folders:
13
7
  - /home/eric/vrp/vrx/visualruby_examples/listview_objects
14
- - /home/eric/vrp/vrx/visualruby_examples/listview_objects/bin
15
- - /home/eric/vrp/vrx/visualruby_examples/listview_objects/bin/glade
16
8
  panel_pos: 360
17
9
  rdoc_command_line: rdoc -x README
18
10
  run_command_line: ruby main.rb
19
- tab_spaces: 2
20
- width: 1199
21
- builder: !ruby/object:Gtk::Builder {}
22
- glade_box: !ruby/object:VR::SimpleComboBoxEntry {}
23
- browser_box: !ruby/object:VR::SimpleComboBoxEntry {}
24
- buttonChooseFolder: ! '...'
25
- vbox1: !ruby/object:Gtk::VBox {}
26
- label7: ! 'Editor Font:'
27
- label3: ! 'Back-up Path:'
28
- window1: !ruby/object:Gtk::Window {}
29
- hbuttonbox1: !ruby/object:Gtk::HButtonBox {}
30
- buttonCancel: Cancel
31
- label8: ! 'RDoc Command Line: '
32
- table1: !ruby/object:Gtk::Table {}
33
- buttonTryBrowser: Try
34
- buttonSave: Save
35
- hboxBrowser: !ruby/object:Gtk::HBox {}
36
- hboxGlade: !ruby/object:Gtk::HBox {}
37
- label1: <big><big><b>Visual Ruby Settings</b></big></big>
38
- label2: ! 'Browser Command Line:'
39
- label4: ! 'Spaces for Each Tab in Editor:'
40
- label5: ! 'Glade Command Line:'
41
- label6: ! 'Command Line when "Run" is pressed:'
42
- hbox1: !ruby/object:Gtk::HBox {}
43
- hbox2: !ruby/object:Gtk::HBox {}
44
- hbox3: !ruby/object:Gtk::HBox {}
45
- hbox4: !ruby/object:Gtk::HBox {}
46
- buttonTryGlade: Try
11
+ width: 800
12
+ settings_file_version: 1
@@ -1,45 +1,16 @@
1
1
  --- !ruby/object:VR_ENV
2
- backup_path: /home/eric
3
- browser: firefox
4
- current_file: /home/eric/vrp/vrx/visualruby_examples/simple_ruby_gui/simple_ruby_gui
5
- font_name: Monospace 10
6
- glade_path: glade-gtk2
7
- height: 639
2
+ current_file: /home/eric/vrp/vrx/visualruby_examples/simple_ruby_gui/bin/DataObjectGUI.rb
3
+ height: 613
8
4
  open_files:
5
+ - /home/eric/vrp/vrx/visualruby_examples/simple_ruby_gui/main.rb
9
6
  - /home/eric/vrp/vrx/visualruby_examples/simple_ruby_gui/bin/DataObjectGUI.rb
10
- - /home/eric/vrp/vrx/visualruby_examples/simple_ruby_gui/simple_ruby_gui
11
7
  open_folders:
12
8
  - /home/eric/vrp/vrx/visualruby_examples/simple_ruby_gui
13
9
  - /home/eric/vrp/vrx/visualruby_examples/simple_ruby_gui/bin
14
10
  - /home/eric/vrp/vrx/visualruby_examples/simple_ruby_gui/bin/glade
15
11
  panel_pos: 360
16
12
  rdoc_command_line: rdoc -x README
17
- run_command_line: ruby simple_ruby_gui
18
- tab_spaces: 2
19
- width: 1122
13
+ run_command_line: ruby main.rb
14
+ width: 1411
15
+ settings_file_version: 1
20
16
  builder: !ruby/object:Gtk::Builder {}
21
- glade_box: !ruby/object:VR::SimpleComboBoxEntry {}
22
- browser_box: !ruby/object:VR::SimpleComboBoxEntry {}
23
- buttonChooseFolder: ! '...'
24
- vbox1: !ruby/object:Gtk::VBox {}
25
- label7: ! 'Editor Font:'
26
- label3: ! 'Back-up Path:'
27
- window1: !ruby/object:Gtk::Window {}
28
- hbuttonbox1: !ruby/object:Gtk::HButtonBox {}
29
- buttonCancel: Cancel
30
- label8: ! 'RDoc Command Line: '
31
- table1: !ruby/object:Gtk::Table {}
32
- buttonTryBrowser: Try
33
- buttonSave: Save
34
- hboxBrowser: !ruby/object:Gtk::HBox {}
35
- hboxGlade: !ruby/object:Gtk::HBox {}
36
- label1: <big><big><b>Visual Ruby Settings</b></big></big>
37
- label2: ! 'Browser Command Line:'
38
- label4: ! 'Spaces for Each Tab in Editor:'
39
- label5: ! 'Glade Command Line:'
40
- label6: ! 'Command Line when "Run" is pressed:'
41
- hbox1: !ruby/object:Gtk::HBox {}
42
- hbox2: !ruby/object:Gtk::HBox {}
43
- hbox3: !ruby/object:Gtk::HBox {}
44
- hbox4: !ruby/object:Gtk::HBox {}
45
- buttonTryGlade: Try
@@ -5,15 +5,15 @@ class DataObjectGUI
5
5
 
6
6
 
7
7
  def initialize(name, address, phone, email)
8
- super() #loads glade file and creates variables: @name, @address etc. from glade form names
9
- @name.text = name
10
- @address.text = address
11
- @phone.text = phone
12
- @email.text = email
8
+ @name = name
9
+ @address = address
10
+ @phone = phone
11
+ @email = email
13
12
  end
14
13
 
15
14
  def buttonShow__clicked(button)
16
- VR::msg "Curent values:\n\n#{@name.text}\n#{@address.text}\n#{@email.text}\n#{@phone.text}\n"
15
+ get_glade_variables()
16
+ VR::msg "Curent values:\n\n#{@name}\n#{@address}\n#{@email}\n#{@phone}\n"
17
17
  end
18
18
 
19
19
  end
@@ -1,18 +1,12 @@
1
1
  --- !ruby/object:VR_ENV
2
- backup_path: /home/eric
3
- browser: chromium-browser
4
- current_file: /home/eric/visualruby/treeview/bin/MyClass.rb
5
- font_name: Monospace 10
6
- glade_path: glade-gtk2
7
- height: 707
2
+ current_file: /home/eric/vrp/vrx/Untitled
3
+ height: 600
8
4
  open_files:
9
- - /home/eric/visualruby/treeview/bin/MyClass.rb
10
- - /home/eric/visualruby/treeview/main.rb
5
+ - /home/eric/vrp/vrx/Untitled
11
6
  open_folders:
12
- - /home/eric/visualruby/treeview
13
- - /home/eric/visualruby/treeview/bin
7
+ - /home/eric/vrp/vrx/visualruby_examples/treeview
14
8
  panel_pos: 360
15
9
  rdoc_command_line: rdoc -x README
16
10
  run_command_line: ruby main.rb
17
- tab_spaces: 2
18
- width: 1236
11
+ width: 800
12
+ settings_file_version: 1
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: 1.0.13
4
+ version: 1.0.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir:
11
11
  - .
12
12
  cert_chain: []
13
- date: 2013-12-11 00:00:00.000000000 Z
13
+ date: 2013-12-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rdoc
@@ -120,10 +120,10 @@ files:
120
120
  - skeleton/project/bin/MyClass.rb
121
121
  - skeleton/document/New.glade
122
122
  - skeleton/project/bin/glade/MyClass.glade
123
+ - visualruby_examples/simple_ruby_gui/main.rb
123
124
  - visualruby_examples/simple_ruby_gui/bin/DataObjectGUI.rb
124
125
  - visualruby_examples/simple_ruby_gui/bin/glade/DataObjectGUI.glade
125
126
  - visualruby_examples/simple_ruby_gui/.vr_settings.yaml
126
- - visualruby_examples/simple_ruby_gui/simple_ruby_gui
127
127
  - visualruby_examples/calculator/main.rb
128
128
  - visualruby_examples/calculator/bin/Calculator.rb
129
129
  - visualruby_examples/calculator/bin/glade/Calculator.glade
@@ -140,7 +140,7 @@ files:
140
140
  - visualruby_examples/listview/bin/glade/SongListViewGUI.glade
141
141
  - visualruby_examples/listview/bin/audio-x-generic.png
142
142
  - visualruby_examples/listview/.vr_settings.yaml
143
- - visualruby_examples/all_widgets/all_widgets.rb
143
+ - visualruby_examples/all_widgets/main.rb
144
144
  - visualruby_examples/all_widgets/bin/AllWidgets.rb
145
145
  - visualruby_examples/all_widgets/bin/glade/AllWidgets.glade
146
146
  - visualruby_examples/all_widgets/bin/splash.png
@@ -160,7 +160,7 @@ files:
160
160
  - visualruby_examples/active_record/bin/glade/Person.glade
161
161
  - visualruby_examples/active_record/db/development.sqlite3
162
162
  - visualruby_examples/active_record/.vr_settings.yaml
163
- - visualruby_examples/active_record2/active_record2.rb
163
+ - visualruby_examples/active_record2/main.rb
164
164
  - visualruby_examples/active_record2/bin/Employer.rb
165
165
  - visualruby_examples/active_record2/bin/Paycheck.rb
166
166
  - visualruby_examples/active_record2/bin/Employee.rb