visualruby 3.0.4 → 3.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.vr_settings.yaml +8 -6
  3. data/bin/main/OpenProject.rb +6 -2
  4. data/bin/main/VR_File_Tree.rb +9 -3
  5. data/bin/main/VR_Main.rb +5 -1
  6. data/examples/active_record/.vr_settings.yaml +1 -1
  7. data/examples/active_record2/.vr_settings.yaml +5 -4
  8. data/examples/active_record2/bin/glade/Employer.glade +118 -113
  9. data/examples/active_record2/bin/glade/Paycheck.glade +119 -111
  10. data/examples/alert_box/.vr_settings.yaml +17 -0
  11. data/examples/all_widgets/.vr_settings.yaml +4 -4
  12. data/examples/settings_file/.vr_settings.yaml +24 -0
  13. data/skeleton/project/bin/glade/MyClass.glade +7 -2
  14. data/vrlib/.vr_settings.yaml +13 -10
  15. data/vrlib/lib/GladeGUI.rb +15 -38
  16. metadata +19 -27
  17. data/vrlib/doc/images/add.png +0 -0
  18. data/vrlib/doc/images/arrow_up.png +0 -0
  19. data/vrlib/doc/images/brick.png +0 -0
  20. data/vrlib/doc/images/brick_link.png +0 -0
  21. data/vrlib/doc/images/bug.png +0 -0
  22. data/vrlib/doc/images/bullet_black.png +0 -0
  23. data/vrlib/doc/images/bullet_toggle_minus.png +0 -0
  24. data/vrlib/doc/images/bullet_toggle_plus.png +0 -0
  25. data/vrlib/doc/images/date.png +0 -0
  26. data/vrlib/doc/images/delete.png +0 -0
  27. data/vrlib/doc/images/find.png +0 -0
  28. data/vrlib/doc/images/macFFBgHack.png +0 -0
  29. data/vrlib/doc/images/package.png +0 -0
  30. data/vrlib/doc/images/page_green.png +0 -0
  31. data/vrlib/doc/images/page_white_text.png +0 -0
  32. data/vrlib/doc/images/page_white_width.png +0 -0
  33. data/vrlib/doc/images/plugin.png +0 -0
  34. data/vrlib/doc/images/ruby.png +0 -0
  35. data/vrlib/doc/images/tag_blue.png +0 -0
  36. data/vrlib/doc/images/tag_green.png +0 -0
  37. data/vrlib/doc/images/transparent.png +0 -0
  38. data/vrlib/doc/images/wrench.png +0 -0
  39. data/vrlib/doc/images/wrench_orange.png +0 -0
  40. data/vrlib/doc/images/zoom.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b9b8f1f0860866d36f60bee6c68d338ba3c0abd
4
- data.tar.gz: 19a7bf3801b192416b3c8775bc59034d324ad2b2
3
+ metadata.gz: b4a5c4273bc1b2893f44ab5a4598362834bd5f4c
4
+ data.tar.gz: 90fd61bff4093150926ded8d97fbb7437e825f82
5
5
  SHA512:
6
- metadata.gz: 6fb614a003dd874f3ba978164f65a30cf1cd672a598b59f4641563a89794a0bd12dc673c2663725e1a38c1f233fb13f0a2349d210fd0b7e627dbc9793752ceb9
7
- data.tar.gz: 6bcf761d09fb618dd335b3990187dad16acee4e232ef79d75bd34c4a958a550180aa8bd598ec0205d233d9e80972daebaf598f7d68d99df07ca9347844b61602
6
+ metadata.gz: 1b2a63b83c6e032d067f41b74c041534a4d10bcd63ecff4f1edb97b6e3b189ae3780d7c69b5b9da07f5cfe818434cfe3c0a106552d0d385b01b6963a32f082d4
7
+ data.tar.gz: 3aefff5edcc0d70c678683e5c3f1234e032526bca070f76f8f0d14756566ba7cee1fb62ea952eac792acb2756454741feab40d25e98303a8d64b8b4b77f7576b
data/.vr_settings.yaml CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:VR_ENV
2
+ vr_yaml_file: ".vr_settings.yaml"
2
3
  width: 1364
3
4
  height: 691
4
5
  panel_pos: 270
6
+ notebook_panel_position: 474
5
7
  run_command_line: ruby vr
6
8
  open_files:
7
- - "/home/eric/vrp/vr3/vr"
8
- - "/home/eric/vrp/vr3/vr.gemspec"
9
+ - "/home/eric/vrp/vr3/bin/main/VR_Main.rb"
9
10
  open_folders:
10
11
  - "/home/eric/vrp/vr3"
12
+ - "/home/eric/vrp/vr3/bin"
13
+ - "/home/eric/vrp/vr3/bin/main"
11
14
  - "/home/eric/vrp/vr3/vrlib"
12
- current_file: "/home/eric/vrp/vr3/vr.gemspec"
15
+ - "/home/eric/vrp/vr3/vrlib/lib"
16
+ current_file: "/home/eric/vrp/vr3/bin/main/VR_Main.rb"
17
+ current_line: 188
13
18
  rdoc_command_line: rdoc -x README -x /*.glade -x /*.yaml -x /*.gemspec -x /*.css
14
- vr_yaml_file: ".vr_settings.yaml"
15
- notebook_panel_position: 474
16
- current_line: 16
17
19
  builder: !ruby/object:Gtk::Builder {}
18
20
  top_level_window: false
@@ -16,12 +16,16 @@ class OpenProject
16
16
  end
17
17
 
18
18
  def ftv__cursor_changed(*a)
19
- # return unless row = @ftv.selected_rows.first
20
19
  @ftv.expand_or_collapse_folder()
21
20
  end
22
21
 
23
22
  def ftv__row_activated(_self, path, col)
24
- buttonOpen__clicked
23
+ return unless row = @ftv.selected_rows.first
24
+ if @parent.project_valid?(row[:path])
25
+ buttonOpen__clicked
26
+ else
27
+ @ftv.expand_or_collapse_folder()
28
+ end
25
29
  end
26
30
 
27
31
  def buttonChange__clicked(*a)
@@ -13,9 +13,15 @@ class VR_File_Tree < VR::FileTreeView
13
13
 
14
14
  def self__row_activated(*args)
15
15
  return unless rows = selected_rows
16
- file_name = rows.first[:path]
17
- if File.extname(file_name) == ".glade"
18
- VR_Tools.popen("#{$VR_ENV_GLOBAL.glade_path} #{file_name} ")
16
+ file_name = rows.first[:path]
17
+ basename = File.basename(file_name)
18
+ ext = File.extname(file_name)
19
+ if ext == ".glade"
20
+ VR_Tools.popen("#{$VR_ENV_GLOBAL.glade_path} #{file_name} ")
21
+ elsif ext == ".gem"
22
+ if alert("Do you want to install <b>#{basename}</b>?", parent: @main, button_cancel: "Cancel")
23
+ popInstallGem_clicked
24
+ end
19
25
  elsif File.directory?(file_name)
20
26
  expand_or_collapse_folder()
21
27
  else
data/bin/main/VR_Main.rb CHANGED
@@ -184,7 +184,11 @@ class VR_Main
184
184
  VR_Tools.back_up()
185
185
  end
186
186
 
187
- def toolIndent__clicked(*a)
187
+ def toolIndent__clicked(*a)
188
+ # @tabs.docs[@tabs.page].indent_selected_lines()
189
+ # evt = Gdk::EventKey.new(:key_press)
190
+ # evt.keyval = Gdk::Keyval::GDK_6
191
+ # evt.put
188
192
  @tabs.docs[@tabs.page].indent($VR_ENV_GLOBAL.tab_spaces)
189
193
  end
190
194
 
@@ -2,7 +2,7 @@
2
2
  vr_yaml_file: ".vr_settings.yaml"
3
3
  width: 1139
4
4
  height: 691
5
- panel_pos: 453
5
+ panel_pos: 276
6
6
  notebook_panel_position: 400
7
7
  run_command_line: ruby active_record.rb
8
8
  open_files:
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:VR_ENV
2
2
  vr_yaml_file: ".vr_settings.yaml"
3
- width: 1046
4
- height: 718
3
+ width: 1065
4
+ height: 691
5
5
  panel_pos: 360
6
6
  notebook_panel_position: 400
7
7
  run_command_line: ruby main.rb
@@ -10,13 +10,14 @@ open_files:
10
10
  - "/home/eric/vrp/vr3/examples/active_record2/bin/CompanyGUI.rb"
11
11
  - "/home/eric/vrp/vr3/examples/active_record2/bin/Employer.rb"
12
12
  - "/home/eric/vrp/vr3/examples/active_record2/bin/Employee.rb"
13
+ - "/home/eric/vrp/vr3/examples/active_record2/bin/Paycheck.rb"
13
14
  open_folders:
14
15
  - "/home/eric/vrp/vr3/examples/active_record2"
15
16
  - "/home/eric/vrp/vr3/examples/active_record2/bin"
16
17
  - "/home/eric/vrp/vr3/examples/active_record2/bin/glade"
17
18
  - "/home/eric/vrp/vr3/examples/active_record2/db"
18
- current_file: "/home/eric/vrp/vr3/examples/active_record2/bin/Employee.rb"
19
- current_line: 22
19
+ current_file: "/home/eric/vrp/vr3/examples/active_record2/bin/CompanyGUI.rb"
20
+ current_line: 39
20
21
  rdoc_command_line: rdoc -x README
21
22
  builder: !ruby/object:Gtk::Builder {}
22
23
  filename: ".vr_settings.yaml"
@@ -1,144 +1,149 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Generated with glade 3.16.1 -->
2
3
  <interface>
3
- <requires lib="gtk+" version="2.16"/>
4
- <!-- interface-naming-policy project-wide -->
4
+ <requires lib="gtk+" version="3.0"/>
5
5
  <object class="GtkWindow" id="window1">
6
- <property name="visible">True</property>
7
- <property name="title" translatable="yes">Employer Info</property>
8
- <property name="modal">True</property>
9
- <signal name="destroy" handler="destroy_window"/>
6
+ <property name="can_focus">False</property>
7
+ <property name="window_position">center</property>
10
8
  <child>
11
- <object class="GtkHBox" id="hbox1">
9
+ <object class="GtkBox" id="box1">
12
10
  <property name="visible">True</property>
11
+ <property name="can_focus">False</property>
12
+ <property name="margin_left">20</property>
13
+ <property name="margin_right">20</property>
14
+ <property name="margin_top">20</property>
15
+ <property name="margin_bottom">20</property>
16
+ <property name="orientation">vertical</property>
17
+ <property name="spacing">11</property>
13
18
  <child>
14
- <object class="GtkVBox" id="vbox1">
15
- <property name="width_request">409</property>
19
+ <object class="GtkLabel" id="label1">
16
20
  <property name="visible">True</property>
21
+ <property name="can_focus">False</property>
22
+ <property name="label" translatable="yes">&lt;big&gt;&lt;big&gt;Edit Employer&lt;/big&gt;&lt;/big&gt;</property>
23
+ <property name="use_markup">True</property>
24
+ </object>
25
+ <packing>
26
+ <property name="expand">True</property>
27
+ <property name="fill">True</property>
28
+ <property name="padding">15</property>
29
+ <property name="position">0</property>
30
+ </packing>
31
+ </child>
32
+ <child>
33
+ <object class="GtkGrid" id="grid1">
34
+ <property name="visible">True</property>
35
+ <property name="can_focus">False</property>
36
+ <property name="row_spacing">10</property>
37
+ <property name="column_spacing">10</property>
17
38
  <child>
18
- <object class="GtkLabel" id="label1">
39
+ <object class="GtkLabel" id="label2">
19
40
  <property name="visible">True</property>
20
- <property name="label" translatable="yes">&lt;big&gt;&lt;big&gt;Edit Employer&lt;/big&gt;&lt;/big&gt;</property>
21
- <property name="use_markup">True</property>
41
+ <property name="can_focus">False</property>
42
+ <property name="xalign">1</property>
43
+ <property name="label" translatable="yes">Company</property>
22
44
  </object>
23
45
  <packing>
24
- <property name="padding">15</property>
25
- <property name="position">0</property>
46
+ <property name="left_attach">0</property>
47
+ <property name="top_attach">0</property>
48
+ <property name="width">1</property>
49
+ <property name="height">1</property>
50
+ </packing>
51
+ </child>
52
+ <child>
53
+ <object class="GtkLabel" id="label3">
54
+ <property name="visible">True</property>
55
+ <property name="can_focus">False</property>
56
+ <property name="xalign">1</property>
57
+ <property name="label" translatable="yes">Address</property>
58
+ </object>
59
+ <packing>
60
+ <property name="left_attach">0</property>
61
+ <property name="top_attach">1</property>
62
+ <property name="width">1</property>
63
+ <property name="height">1</property>
64
+ </packing>
65
+ </child>
66
+ <child>
67
+ <object class="GtkLabel" id="label4">
68
+ <property name="visible">True</property>
69
+ <property name="can_focus">False</property>
70
+ <property name="xalign">1</property>
71
+ <property name="label" translatable="yes">Company Type</property>
72
+ </object>
73
+ <packing>
74
+ <property name="left_attach">0</property>
75
+ <property name="top_attach">2</property>
76
+ <property name="width">1</property>
77
+ <property name="height">1</property>
26
78
  </packing>
27
79
  </child>
28
80
  <child>
29
- <object class="GtkTable" id="table1">
81
+ <object class="GtkEntry" id="address">
30
82
  <property name="visible">True</property>
31
- <property name="n_rows">3</property>
32
- <property name="n_columns">2</property>
33
- <property name="column_spacing">10</property>
34
- <property name="row_spacing">10</property>
35
- <child>
36
- <object class="GtkEntry" id="Employer.name">
37
- <property name="visible">True</property>
38
- <property name="can_focus">True</property>
39
- <property name="invisible_char">•</property>
40
- </object>
41
- <packing>
42
- <property name="left_attach">1</property>
43
- <property name="right_attach">2</property>
44
- </packing>
45
- </child>
46
- <child>
47
- <object class="GtkEntry" id="address">
48
- <property name="visible">True</property>
49
- <property name="can_focus">True</property>
50
- <property name="invisible_char">•</property>
51
- </object>
52
- <packing>
53
- <property name="left_attach">1</property>
54
- <property name="right_attach">2</property>
55
- <property name="top_attach">1</property>
56
- <property name="bottom_attach">2</property>
57
- </packing>
58
- </child>
59
- <child>
60
- <object class="GtkEntry" id="company_type">
61
- <property name="visible">True</property>
62
- <property name="can_focus">True</property>
63
- <property name="invisible_char">•</property>
64
- </object>
65
- <packing>
66
- <property name="left_attach">1</property>
67
- <property name="right_attach">2</property>
68
- <property name="top_attach">2</property>
69
- <property name="bottom_attach">3</property>
70
- </packing>
71
- </child>
72
- <child>
73
- <object class="GtkLabel" id="label2">
74
- <property name="visible">True</property>
75
- <property name="xalign">1</property>
76
- <property name="label" translatable="yes">Company Name:</property>
77
- </object>
78
- <packing>
79
- <property name="x_options">GTK_FILL</property>
80
- </packing>
81
- </child>
82
- <child>
83
- <object class="GtkLabel" id="label3">
84
- <property name="visible">True</property>
85
- <property name="xalign">1</property>
86
- <property name="label" translatable="yes">Address:</property>
87
- </object>
88
- <packing>
89
- <property name="top_attach">1</property>
90
- <property name="bottom_attach">2</property>
91
- <property name="x_options">GTK_FILL</property>
92
- </packing>
93
- </child>
94
- <child>
95
- <object class="GtkLabel" id="label4">
96
- <property name="visible">True</property>
97
- <property name="xalign">1</property>
98
- <property name="label" translatable="yes">Company Type:</property>
99
- </object>
100
- <packing>
101
- <property name="top_attach">2</property>
102
- <property name="bottom_attach">3</property>
103
- <property name="x_options">GTK_FILL</property>
104
- </packing>
105
- </child>
83
+ <property name="can_focus">True</property>
106
84
  </object>
107
85
  <packing>
108
- <property name="padding">5</property>
109
- <property name="position">1</property>
86
+ <property name="left_attach">1</property>
87
+ <property name="top_attach">1</property>
88
+ <property name="width">1</property>
89
+ <property name="height">1</property>
110
90
  </packing>
111
91
  </child>
112
92
  <child>
113
- <object class="GtkHButtonBox" id="hbuttonbox1">
93
+ <object class="GtkEntry" id="company_type">
114
94
  <property name="visible">True</property>
115
- <property name="spacing">20</property>
116
- <property name="layout_style">end</property>
117
- <child>
118
- <object class="GtkButton" id="buttonCancel">
119
- <property name="label" translatable="yes">Cancel</property>
120
- <property name="visible">True</property>
121
- <property name="can_focus">True</property>
122
- <property name="receives_default">True</property>
123
- <signal name="clicked" handler="destroy_window"/>
124
- </object>
125
- <packing>
126
- <property name="expand">False</property>
127
- <property name="fill">False</property>
128
- <property name="position">0</property>
129
- </packing>
130
- </child>
95
+ <property name="can_focus">True</property>
96
+ </object>
97
+ <packing>
98
+ <property name="left_attach">1</property>
99
+ <property name="top_attach">2</property>
100
+ <property name="width">1</property>
101
+ <property name="height">1</property>
102
+ </packing>
103
+ </child>
104
+ <child>
105
+ <object class="GtkEntry" id="name">
106
+ <property name="visible">True</property>
107
+ <property name="can_focus">True</property>
108
+ <property name="hexpand">True</property>
109
+ </object>
110
+ <packing>
111
+ <property name="left_attach">1</property>
112
+ <property name="top_attach">0</property>
113
+ <property name="width">1</property>
114
+ <property name="height">1</property>
115
+ </packing>
116
+ </child>
117
+ </object>
118
+ <packing>
119
+ <property name="expand">False</property>
120
+ <property name="fill">True</property>
121
+ <property name="position">1</property>
122
+ </packing>
123
+ </child>
124
+ <child>
125
+ <object class="GtkButtonBox" id="buttonbox1">
126
+ <property name="visible">True</property>
127
+ <property name="can_focus">False</property>
128
+ <property name="layout_style">end</property>
129
+ <child>
130
+ <object class="GtkButton" id="buttonCancel">
131
+ <property name="label" translatable="yes">Cancel</property>
132
+ <property name="visible">True</property>
133
+ <property name="can_focus">True</property>
134
+ <property name="receives_default">True</property>
131
135
  </object>
132
136
  <packing>
133
137
  <property name="expand">False</property>
134
- <property name="padding">13</property>
135
- <property name="position">2</property>
138
+ <property name="fill">False</property>
139
+ <property name="position">0</property>
136
140
  </packing>
137
141
  </child>
138
142
  </object>
139
143
  <packing>
140
- <property name="padding">20</property>
141
- <property name="position">0</property>
144
+ <property name="expand">False</property>
145
+ <property name="fill">True</property>
146
+ <property name="position">2</property>
142
147
  </packing>
143
148
  </child>
144
149
  </object>
@@ -1,142 +1,150 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Generated with glade 3.16.1 -->
2
3
  <interface>
3
- <requires lib="gtk+" version="2.16"/>
4
- <!-- interface-naming-policy project-wide -->
4
+ <requires lib="gtk+" version="3.0"/>
5
5
  <object class="GtkWindow" id="window1">
6
- <property name="visible">True</property>
6
+ <property name="can_focus">False</property>
7
7
  <property name="title" translatable="yes">Paycheck</property>
8
- <property name="modal">True</property>
9
- <signal name="destroy" handler="destroy_window"/>
8
+ <property name="window_position">center</property>
10
9
  <child>
11
- <object class="GtkHBox" id="hbox1">
10
+ <object class="GtkBox" id="box1">
12
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>
17
+ <property name="orientation">vertical</property>
18
+ <property name="spacing">10</property>
13
19
  <child>
14
- <object class="GtkVBox" id="vbox1">
20
+ <object class="GtkLabel" id="label4">
15
21
  <property name="visible">True</property>
22
+ <property name="can_focus">False</property>
23
+ <property name="ypad">16</property>
24
+ <property name="label" translatable="yes">&lt;big&gt;&lt;big&gt;Edit Paycheck&lt;/big&gt;&lt;/big&gt;</property>
25
+ <property name="use_markup">True</property>
26
+ </object>
27
+ <packing>
28
+ <property name="expand">False</property>
29
+ <property name="fill">False</property>
30
+ <property name="position">0</property>
31
+ </packing>
32
+ </child>
33
+ <child>
34
+ <object class="GtkGrid" id="grid1">
35
+ <property name="visible">True</property>
36
+ <property name="can_focus">False</property>
37
+ <property name="row_spacing">10</property>
38
+ <property name="column_spacing">10</property>
16
39
  <child>
17
- <object class="GtkLabel" id="label4">
40
+ <object class="GtkLabel" id="label1">
18
41
  <property name="visible">True</property>
19
- <property name="ypad">16</property>
20
- <property name="label" translatable="yes">&lt;big&gt;&lt;big&gt;Edit Paycheck&lt;/big&gt;&lt;/big&gt;</property>
21
- <property name="use_markup">True</property>
42
+ <property name="can_focus">False</property>
43
+ <property name="xalign">1</property>
44
+ <property name="label" translatable="yes">Date</property>
22
45
  </object>
23
46
  <packing>
24
- <property name="position">0</property>
47
+ <property name="left_attach">0</property>
48
+ <property name="top_attach">0</property>
49
+ <property name="width">1</property>
50
+ <property name="height">1</property>
51
+ </packing>
52
+ </child>
53
+ <child>
54
+ <object class="GtkLabel" id="label2">
55
+ <property name="visible">True</property>
56
+ <property name="can_focus">False</property>
57
+ <property name="xalign">1</property>
58
+ <property name="label" translatable="yes">Description</property>
59
+ </object>
60
+ <packing>
61
+ <property name="left_attach">0</property>
62
+ <property name="top_attach">1</property>
63
+ <property name="width">1</property>
64
+ <property name="height">1</property>
65
+ </packing>
66
+ </child>
67
+ <child>
68
+ <object class="GtkLabel" id="label3">
69
+ <property name="visible">True</property>
70
+ <property name="can_focus">False</property>
71
+ <property name="xalign">1</property>
72
+ <property name="label" translatable="yes">Amount</property>
73
+ </object>
74
+ <packing>
75
+ <property name="left_attach">0</property>
76
+ <property name="top_attach">2</property>
77
+ <property name="width">1</property>
78
+ <property name="height">1</property>
25
79
  </packing>
26
80
  </child>
27
81
  <child>
28
- <object class="GtkTable" id="table1">
82
+ <object class="GtkEntry" id="date">
29
83
  <property name="visible">True</property>
30
- <property name="n_rows">3</property>
31
- <property name="n_columns">2</property>
32
- <property name="column_spacing">10</property>
33
- <property name="row_spacing">15</property>
34
- <child>
35
- <object class="GtkEntry" id="date">
36
- <property name="visible">True</property>
37
- <property name="can_focus">True</property>
38
- <property name="invisible_char">•</property>
39
- </object>
40
- <packing>
41
- <property name="left_attach">1</property>
42
- <property name="right_attach">2</property>
43
- </packing>
44
- </child>
45
- <child>
46
- <object class="GtkEntry" id="description">
47
- <property name="visible">True</property>
48
- <property name="can_focus">True</property>
49
- <property name="invisible_char">•</property>
50
- </object>
51
- <packing>
52
- <property name="left_attach">1</property>
53
- <property name="right_attach">2</property>
54
- <property name="top_attach">1</property>
55
- <property name="bottom_attach">2</property>
56
- </packing>
57
- </child>
58
- <child>
59
- <object class="GtkEntry" id="amount">
60
- <property name="visible">True</property>
61
- <property name="can_focus">True</property>
62
- <property name="invisible_char">•</property>
63
- </object>
64
- <packing>
65
- <property name="left_attach">1</property>
66
- <property name="right_attach">2</property>
67
- <property name="top_attach">2</property>
68
- <property name="bottom_attach">3</property>
69
- </packing>
70
- </child>
71
- <child>
72
- <object class="GtkLabel" id="label1">
73
- <property name="visible">True</property>
74
- <property name="xalign">1</property>
75
- <property name="label" translatable="yes">Date:</property>
76
- </object>
77
- <packing>
78
- <property name="x_options">GTK_FILL</property>
79
- </packing>
80
- </child>
81
- <child>
82
- <object class="GtkLabel" id="label2">
83
- <property name="visible">True</property>
84
- <property name="xalign">1</property>
85
- <property name="label" translatable="yes">Description:</property>
86
- </object>
87
- <packing>
88
- <property name="top_attach">1</property>
89
- <property name="bottom_attach">2</property>
90
- <property name="x_options">GTK_FILL</property>
91
- </packing>
92
- </child>
93
- <child>
94
- <object class="GtkLabel" id="label3">
95
- <property name="visible">True</property>
96
- <property name="xalign">1</property>
97
- <property name="label" translatable="yes">Amount</property>
98
- </object>
99
- <packing>
100
- <property name="top_attach">2</property>
101
- <property name="bottom_attach">3</property>
102
- <property name="x_options">GTK_FILL</property>
103
- </packing>
104
- </child>
84
+ <property name="can_focus">True</property>
85
+ <property name="hexpand">True</property>
105
86
  </object>
106
87
  <packing>
107
- <property name="position">1</property>
88
+ <property name="left_attach">1</property>
89
+ <property name="top_attach">0</property>
90
+ <property name="width">1</property>
91
+ <property name="height">1</property>
108
92
  </packing>
109
93
  </child>
110
94
  <child>
111
- <object class="GtkHButtonBox" id="hbuttonbox1">
112
- <property name="width_request">400</property>
95
+ <object class="GtkEntry" id="description">
113
96
  <property name="visible">True</property>
114
- <property name="spacing">30</property>
115
- <property name="layout_style">end</property>
116
- <child>
117
- <object class="GtkButton" id="buttonCancel">
118
- <property name="label" translatable="yes">Done</property>
119
- <property name="visible">True</property>
120
- <property name="can_focus">True</property>
121
- <property name="receives_default">True</property>
122
- <signal name="clicked" handler="destroy_window"/>
123
- </object>
124
- <packing>
125
- <property name="expand">False</property>
126
- <property name="fill">False</property>
127
- <property name="position">0</property>
128
- </packing>
129
- </child>
97
+ <property name="can_focus">True</property>
130
98
  </object>
131
99
  <packing>
132
- <property name="padding">15</property>
133
- <property name="position">2</property>
100
+ <property name="left_attach">1</property>
101
+ <property name="top_attach">1</property>
102
+ <property name="width">1</property>
103
+ <property name="height">1</property>
104
+ </packing>
105
+ </child>
106
+ <child>
107
+ <object class="GtkEntry" id="amount">
108
+ <property name="visible">True</property>
109
+ <property name="can_focus">True</property>
110
+ </object>
111
+ <packing>
112
+ <property name="left_attach">1</property>
113
+ <property name="top_attach">2</property>
114
+ <property name="width">1</property>
115
+ <property name="height">1</property>
134
116
  </packing>
135
117
  </child>
136
118
  </object>
137
119
  <packing>
138
- <property name="padding">16</property>
139
- <property name="position">0</property>
120
+ <property name="expand">False</property>
121
+ <property name="fill">True</property>
122
+ <property name="position">1</property>
123
+ </packing>
124
+ </child>
125
+ <child>
126
+ <object class="GtkButtonBox" id="buttonbox1">
127
+ <property name="visible">True</property>
128
+ <property name="can_focus">False</property>
129
+ <property name="layout_style">end</property>
130
+ <child>
131
+ <object class="GtkButton" id="buttonCancel">
132
+ <property name="label" translatable="yes">Done</property>
133
+ <property name="visible">True</property>
134
+ <property name="can_focus">True</property>
135
+ <property name="receives_default">True</property>
136
+ </object>
137
+ <packing>
138
+ <property name="expand">False</property>
139
+ <property name="fill">True</property>
140
+ <property name="position">0</property>
141
+ </packing>
142
+ </child>
143
+ </object>
144
+ <packing>
145
+ <property name="expand">False</property>
146
+ <property name="fill">True</property>
147
+ <property name="position">2</property>
140
148
  </packing>
141
149
  </child>
142
150
  </object>
@@ -0,0 +1,17 @@
1
+ --- !ruby/object:VR_ENV
2
+ width: 1329
3
+ height: 753
4
+ panel_pos: 513
5
+ run_command_line: ruby main.rb
6
+ open_files:
7
+ - "/home/eric/vrp/vr3/examples/alert_box/bin/AlertBoxDemo.rb"
8
+ - "/home/eric/vrp/vr3/examples/alert_box/main.rb"
9
+ open_folders:
10
+ - "/home/eric/vrp/vr3/examples/alert_box"
11
+ - "/home/eric/vrp/vr3/examples/alert_box/bin"
12
+ current_file: "/home/eric/vrp/vr3/examples/alert_box/bin/AlertBoxDemo.rb"
13
+ rdoc_command_line: rdoc -x README
14
+ vr_yaml_file: ".vr_settings.yaml"
15
+ notebook_panel_position: 400
16
+ current_line: 61
17
+ settings_file_version: 1
@@ -1,7 +1,9 @@
1
1
  --- !ruby/object:VR_ENV
2
+ vr_yaml_file: ".vr_settings.yaml"
2
3
  width: 1125
3
4
  height: 688
4
5
  panel_pos: 327
6
+ notebook_panel_position: 400
5
7
  run_command_line: ruby main.rb
6
8
  open_files:
7
9
  - "/home/eric/vrp/vr3/examples/all_widgets/bin/AllWidgets.rb"
@@ -10,9 +12,7 @@ open_folders:
10
12
  - "/home/eric/vrp/vr3/examples/all_widgets"
11
13
  - "/home/eric/vrp/vr3/examples/all_widgets/bin"
12
14
  current_file: "/home/eric/vrp/vr3/examples/all_widgets/bin/AllWidgets.rb"
13
- rdoc_command_line: rdoc -x README
14
- vr_yaml_file: ".vr_settings.yaml"
15
- notebook_panel_position: 400
16
15
  current_line: 35
17
- settings_file_version: 1
16
+ rdoc_command_line: rdoc -x README
18
17
  builder: !ruby/object:Gtk::Builder {}
18
+ settings_file_version: 1
@@ -0,0 +1,24 @@
1
+ --- !ruby/object:VR_ENV
2
+ width: 1264
3
+ height: 727
4
+ panel_pos: 267
5
+ run_command_line: ruby main.rb
6
+ open_files:
7
+ - "/home/eric/vrp/vr3/examples/settings_file/main.rb"
8
+ - "/home/eric/vrp/vr3/examples/settings_file/bin/SavableSettings.rb"
9
+ - "/home/eric/vrp/vr3/examples/settings_file/bin/MainApp.rb"
10
+ open_folders:
11
+ - "/home/eric/vrp/vr3/examples/settings_file"
12
+ - "/home/eric/vrp/vr3/examples/settings_file/bin"
13
+ - "/home/eric/vrp/vr3/examples/settings_file/bin/glade"
14
+ current_file: "/home/eric/vrp/vr3/examples/settings_file/bin/SavableSettings.rb"
15
+ rdoc_command_line: rdoc -x README
16
+ vr_yaml_file: ".vr_settings.yaml"
17
+ notebook_panel_position: 444
18
+ current_line: 24
19
+ filename: ".vr_settings.yaml"
20
+ backup_path: "/home/eric"
21
+ browser: firefox
22
+ font_name: Monospace 10
23
+ glade_path: glade-3
24
+ tab_spaces: 2
@@ -1,15 +1,20 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!-- Generated with glade 3.18.3 -->
2
+ <!-- Generated with glade 3.16.1 -->
3
3
  <interface>
4
4
  <requires lib="gtk+" version="3.0"/>
5
- <object class="GtkApplicationWindow" id="window1">
5
+ <object class="GtkWindow" id="window1">
6
6
  <property name="can_focus">False</property>
7
+ <property name="window_position">center</property>
7
8
  <child>
8
9
  <object class="GtkButtonBox" id="buttonbox1">
9
10
  <property name="visible">True</property>
10
11
  <property name="can_focus">False</property>
11
12
  <property name="halign">center</property>
12
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>
13
18
  <property name="orientation">vertical</property>
14
19
  <property name="layout_style">start</property>
15
20
  <child>
@@ -1,18 +1,21 @@
1
1
  --- !ruby/object:VR_ENV
2
- width: 1046
2
+ vr_yaml_file: ".vr_settings.yaml"
3
+ width: 1364
3
4
  height: 691
4
- panel_pos: 360
5
+ panel_pos: 264
6
+ notebook_panel_position: 400
5
7
  run_command_line: ruby main.rb
6
8
  open_files:
7
- - "/home/eric/vrp/vr3/examples/active_record2/bin/Employee.rb"
8
- - "/home/eric/vrp/vr3/vrlib/vrlib.gemspec"
9
+ - "/home/eric/vrp/vr3/vrlib/Untitled"
9
10
  open_folders:
10
11
  - "/home/eric/vrp/vr3/vrlib"
11
- current_file: "/home/eric/vrp/vr3/vrlib/vrlib.gemspec"
12
- rdoc_command_line: rdoc -x README
13
- vr_yaml_file: ".vr_settings.yaml"
14
- notebook_panel_position: 400
15
- current_line: 19
12
+ - "/home/eric/vrp/vr3/vrlib/lib"
13
+ - "/home/eric/vrp/vr3/vrlib/lib/treeview"
14
+ - "/home/eric/vrp/vr3/vrlib/site"
15
+ current_file: "/home/eric/vrp/vr3/vrlib/Untitled"
16
+ current_line: 1
17
+ rdoc_command_line: rdoc -x /*.glade -x /*.css -x /*.gemspec -x /*.yaml
16
18
  builder: !ruby/object:Gtk::Builder {}
17
- filename: ".vr_settings.yaml"
19
+ top_level_window: false
18
20
  settings_file_version: 1
21
+ filename: ".vr_settings.yaml"
@@ -138,15 +138,23 @@ end
138
138
  file_name = File.split(caller__FILE__)[0] + '/glade/' + class_name(self) + ".glade"
139
139
  @builder = Gtk::Builder.new
140
140
  @builder << file_name
141
- @builder.connect_signals{ |handle| method(handle) }
141
+ @builder.connect_signals{ |handle| method(handle) }
142
142
  # parse_signals() should be called after before_show()
143
143
  end
144
144
 
145
145
  def class_name(obj) # :nodoc:
146
146
  /.*\b(\w+)$/.match(obj.class.name)[1]
147
147
  end
148
-
149
- def parse_signals() # :nodoc:
148
+
149
+ # The parse_signals() method is what connects gtk's signals to your methods. For example,
150
+ # when you place a button called "button1" in your glade form, and declare a method called
151
+ # "button1__clicked", they aren't connected to each other. Clicking on the button does nothing
152
+ # and the method never gets called. After running parse_signals(), the "clicked" signal is
153
+ # connected to the method named "button1__clicked" so when the user clicks the button, the method is called.
154
+ #
155
+ # Remember that it will enforce the naming convention: gladename__signal. No arguments.
156
+
157
+ def parse_signals()
150
158
  meths = self.class.instance_methods()
151
159
  meths.each do |meth|
152
160
  meth = meth.to_s #bug fix ruby 1.9 gives stmbol
@@ -176,7 +184,7 @@ end
176
184
  # So, to set all the values of a form, simply call the set_glade_all() method instead.
177
185
 
178
186
  def set_glade_all(obj = self)
179
- set_glade_active_record(obj)
187
+ set_glade_active_record(obj)
180
188
  set_glade_variables(obj)
181
189
  # set_glade_hash(obj) if obj.is_a?(Hash) #only needed for Hash subclass. needed?
182
190
  end
@@ -191,7 +199,7 @@ end
191
199
  # So, to retreive all the values of a form back into your ActiveRecord object and instance variables, simply call the set_glade_all() method instead.
192
200
 
193
201
  def get_glade_all(obj = self)
194
- get_glade_active_record(obj)
202
+ get_glade_active_record(obj)
195
203
  get_glade_variables(obj)
196
204
  end
197
205
 
@@ -263,7 +271,6 @@ end
263
271
  end
264
272
 
265
273
 
266
-
267
274
  def fill_control(glade_name, val) # :nodoc:
268
275
  control = @builder[glade_name]
269
276
  control_name = glade_name.split(".")[1]
@@ -285,32 +292,6 @@ end
285
292
  end
286
293
  end
287
294
 
288
-
289
- #
290
- # def fill_control(glade_name, val) # :nodoc:
291
- # return unless glade_name and val
292
- #puts glade_name + val.to_s
293
- # control = @builder[glade_name]
294
- #puts control.class
295
- # control_name = glade_name.split(".")[1]
296
- # control ||= @builder[control_name] unless control_name.nil?
297
- # return if control.nil?
298
- # case control.class
299
- # when Gtk::Window then control.title = val
300
- # when Gtk::CheckButton then control.active = val
301
- # when Gtk::TextView then control.buffer.text = val.to_s
302
- # when Gtk::Entry then control.text = val.to_s
303
- # when Gtk::FontButton then control.font_name = val.to_s
304
- # when Gtk::LinkButton then control.uri = control.label = val.to_s
305
- # when Gtk::Label, Gtk::Button then control.label = val.to_s
306
- # when Gtk::Image then control.file = val.to_s
307
- # when Gtk::SpinButton then control.value = val.to_f
308
- # when Gtk::ProgressBar then control.fraction = val.to_f
309
- # when Gtk::Calendar then control.select_month(val.month, val.year) ; control.select_day(val.day) ; control.mark_day(val.day)
310
- # when Gtk::Adjustment then control.value = val.to_f
311
- # when Gtk::ScrolledWindow, Gtk::Frame, Gtk::Box then control.add(val)
312
- # end
313
- # end
314
295
  #
315
296
  # Populates the instance variables from the glade form.
316
297
  # This works for Gtk:Button, Gtk::Entry, Gtk::Label and Gtk::Checkbutton.
@@ -396,18 +377,14 @@ end
396
377
  load_glade()
397
378
  if parent then
398
379
  @builder[:window1].transient_for = parent.builder[:window1]
399
- # @builder[:window1].modal = true
400
380
  end
401
381
  before_show() if respond_to? :before_show
402
382
  parse_signals()
403
- set_glade_all()
404
- @builder[:window1].show #show_all can't hide widgets in before_show
383
+ set_glade_all()
384
+ @builder[:window1].show #show_all can't hide widgets in before_show
405
385
  @top_level_window = Gtk.main_level == 0 ? true : false
406
386
  Gtk.main if @top_level_window or @builder[:window1].modal? #need new Gtk.main for blocking!
407
387
  end
408
-
409
-
410
-
411
388
 
412
389
  def window1__destroy(*args)
413
390
  Gtk.main_quit if @top_level_window or @builder["window1"].modal?
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
4
+ version: 3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Cunningham
@@ -17,14 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 3.0.0
20
+ version: 3.0.8
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 3.0.0
27
+ version: 3.0.8
28
+ - !ruby/object:Gem::Dependency
29
+ name: require_all
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '1.2'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '1.2'
28
42
  description: |-
29
43
  Visualruby is a complete IDE for making graphical user interfaces with ruby. It utilizes glade interface designer to create windows, and uses a library of GUI helpers to make coding GTK+ programs easy. The IDE really helps you organize your files and your thoughts because it names your ruby files and glade files by a naming convention. You files take on the names MyClass.rb, and MyClass.glade. Then you can easily edit the GUI (glade file) by right clicking on your class's file.
30
44
  It also creates .gemspec files for you, then you can right-click on the .gemspec file to install it, or upload it to rubygems.org. You can also yank your gems with one click.
@@ -83,6 +97,7 @@ files:
83
97
  - "./examples/active_record2/bin/glade/Paycheck.glade"
84
98
  - "./examples/active_record2/db/development.sqlite3"
85
99
  - "./examples/active_record2/main.rb"
100
+ - "./examples/alert_box/.vr_settings.yaml"
86
101
  - "./examples/alert_box/bin/AlertBoxDemo.rb"
87
102
  - "./examples/alert_box/bin/glade/AlertBoxDemo.glade"
88
103
  - "./examples/alert_box/main.rb"
@@ -135,6 +150,7 @@ files:
135
150
  - "./examples/listview_objects/bin/glade/DataObject.glade"
136
151
  - "./examples/listview_objects/bin/glade/ListViewObjectsGUI.glade"
137
152
  - "./examples/listview_objects/main.rb"
153
+ - "./examples/settings_file/.vr_settings.yaml"
138
154
  - "./examples/settings_file/bin/MainApp.rb"
139
155
  - "./examples/settings_file/bin/SavableSettings.rb"
140
156
  - "./examples/settings_file/bin/glade/MainApp.glade"
@@ -167,30 +183,6 @@ files:
167
183
  - "./skeleton/project/main.rb"
168
184
  - "./vr"
169
185
  - "./vrlib/.vr_settings.yaml"
170
- - "./vrlib/doc/images/add.png"
171
- - "./vrlib/doc/images/arrow_up.png"
172
- - "./vrlib/doc/images/brick.png"
173
- - "./vrlib/doc/images/brick_link.png"
174
- - "./vrlib/doc/images/bug.png"
175
- - "./vrlib/doc/images/bullet_black.png"
176
- - "./vrlib/doc/images/bullet_toggle_minus.png"
177
- - "./vrlib/doc/images/bullet_toggle_plus.png"
178
- - "./vrlib/doc/images/date.png"
179
- - "./vrlib/doc/images/delete.png"
180
- - "./vrlib/doc/images/find.png"
181
- - "./vrlib/doc/images/macFFBgHack.png"
182
- - "./vrlib/doc/images/package.png"
183
- - "./vrlib/doc/images/page_green.png"
184
- - "./vrlib/doc/images/page_white_text.png"
185
- - "./vrlib/doc/images/page_white_width.png"
186
- - "./vrlib/doc/images/plugin.png"
187
- - "./vrlib/doc/images/ruby.png"
188
- - "./vrlib/doc/images/tag_blue.png"
189
- - "./vrlib/doc/images/tag_green.png"
190
- - "./vrlib/doc/images/transparent.png"
191
- - "./vrlib/doc/images/wrench.png"
192
- - "./vrlib/doc/images/wrench_orange.png"
193
- - "./vrlib/doc/images/zoom.png"
194
186
  - "./vrlib/lib/Alert.rb"
195
187
  - "./vrlib/lib/DragDrop.rb"
196
188
  - "./vrlib/lib/GladeGUI.rb"
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file