green_shoes 1.1.362 → 1.1.363

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/shoes/ruby.rb +10 -9
  3. metadata +10 -5
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.362
1
+ 1.1.363
@@ -62,23 +62,23 @@ class Object
62
62
  ret
63
63
  end
64
64
 
65
- def ask_open_file
66
- dialog_chooser "Open File...", Gtk::FileChooser::ACTION_OPEN, Gtk::Stock::OPEN
65
+ def ask_open_file path = nil
66
+ dialog_chooser "Open File...", Gtk::FileChooser::ACTION_OPEN, Gtk::Stock::OPEN, path
67
67
  end
68
68
 
69
- def ask_save_file
70
- dialog_chooser "Save File...", Gtk::FileChooser::ACTION_SAVE, Gtk::Stock::SAVE
69
+ def ask_save_file path = nil
70
+ dialog_chooser "Save File...", Gtk::FileChooser::ACTION_SAVE, Gtk::Stock::SAVE, path
71
71
  end
72
72
 
73
- def ask_open_folder
74
- dialog_chooser "Open Folder...", Gtk::FileChooser::ACTION_SELECT_FOLDER, Gtk::Stock::OPEN
73
+ def ask_open_folder path = nil
74
+ dialog_chooser "Open Folder...", Gtk::FileChooser::ACTION_SELECT_FOLDER, Gtk::Stock::OPEN, path
75
75
  end
76
76
 
77
- def ask_save_folder
78
- dialog_chooser "Save Folder...", Gtk::FileChooser::ACTION_CREATE_FOLDER, Gtk::Stock::SAVE
77
+ def ask_save_folder path = nil
78
+ dialog_chooser "Save Folder...", Gtk::FileChooser::ACTION_CREATE_FOLDER, Gtk::Stock::SAVE, path
79
79
  end
80
80
 
81
- def dialog_chooser title, action, button
81
+ def dialog_chooser title, action, button, path
82
82
  $dde = true
83
83
  dialog = Gtk::FileChooserDialog.new(
84
84
  title,
@@ -88,6 +88,7 @@ class Object
88
88
  [Gtk::Stock::CANCEL, Gtk::Dialog::RESPONSE_CANCEL],
89
89
  [button, Gtk::Dialog::RESPONSE_ACCEPT]
90
90
  )
91
+ dialog.current_folder = path if path
91
92
  ret = dialog.run == Gtk::Dialog::RESPONSE_ACCEPT ? dialog.filename : nil
92
93
  dialog.destroy
93
94
  ret
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: green_shoes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.362
4
+ version: 1.1.363
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-24 00:00:00.000000000 Z
12
+ date: 2012-08-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gtk2
16
- requirement: &17620452 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,12 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *17620452
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  description: Green Shoes is one of colorful Shoes, written in pure Ruby with Ruby/GTK2.
26
31
  email: ashbbb@gmail.com
27
32
  executables:
@@ -331,7 +336,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
331
336
  version: '0'
332
337
  requirements: []
333
338
  rubyforge_project:
334
- rubygems_version: 1.8.16
339
+ rubygems_version: 1.8.23
335
340
  signing_key:
336
341
  specification_version: 3
337
342
  summary: Green Shoes