gtk2mp3 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.txt CHANGED
@@ -3,3 +3,5 @@
3
3
  a "Next!" button gui for mpg123
4
4
  == FEATURES:
5
5
  pause and a trigger safe delete button (via checkbutton).
6
+ == SINOPSIS:
7
+ gtk2mp3 </path-to/mp3s>
data/bin/gtk2mp3 CHANGED
@@ -1,6 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'rubygems'
3
3
  gem 'gtk2applib', '~> 9.2'
4
+ $help = <<EOT
5
+
6
+ You can also give it the default mp3 directory via command line...
7
+ \t#{$0} /path-to/mp3s
8
+
9
+ EOT
4
10
  require 'gtk2applib'
5
11
  include Gtk2AppLib
6
12
  include Configuration
@@ -12,7 +18,7 @@ program = Program.new( {
12
18
  'website' => 'http://ruby-gnome-apps.blogspot.com/search/label/MP3',
13
19
  'website-label' => 'Ruby-Gnome MP3',
14
20
  'license' => 'GPL',
15
- 'copyright' => '2010-10-07 17:34:04',
21
+ 'copyright' => '2010-10-08 06:20:21',
16
22
  } )
17
23
 
18
24
  IO.popen(PLAYER,'w+') do |pipe|
@@ -1,12 +1,16 @@
1
1
  module Gtk2AppLib
2
2
  module Configuration
3
- directory = nil # '/path/to/mp3s' # give it a good default, dude!
3
+ # Where is your MP3 directory?
4
4
  dialog = Gtk::FileChooserDialog.new("Choose Mp3 Directory", nil, Gtk::FileChooser::ACTION_SELECT_FOLDER, nil,
5
- [Gtk::Stock::CANCEL, Gtk::Dialog::RESPONSE_CANCEL],
6
- [Gtk::Stock::OPEN, Gtk::Dialog::RESPONSE_ACCEPT])
7
- dialog.filename = directory if directory
5
+ [Gtk::Stock::CANCEL, Gtk::Dialog::RESPONSE_CANCEL], [Gtk::Stock::OPEN, Gtk::Dialog::RESPONSE_ACCEPT])
6
+ directory = (ARGV.shift) || nil # '/path/to/mp3s' # give it a good default, dude!
7
+ if directory && File.exist?(directory) && File.directory?(directory) then
8
+ dialog.filename = directory
9
+ end
8
10
  if dialog.run == Gtk::Dialog::RESPONSE_ACCEPT
9
11
  directory = dialog.filename
12
+ else
13
+ exit
10
14
  end
11
15
  dialog.destroy
12
16
  DIRECTORY = directory
@@ -35,7 +39,7 @@ module Configuration
35
39
  C_PAUSE = 'P'
36
40
  C_SILENCE = 'SILENCE'
37
41
  C_LOAD = 'L'
38
- C_QUIT = 'Q'
42
+ C_QUIT = 'Q'
39
43
 
40
44
  ### Unused ####
41
45
  # C_LOADPAUSED = 'LP'
File without changes
File without changes
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtk2mp3
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
+ - 1
8
9
  - 0
9
- - 0
10
- version: 0.0.0
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - carlosjhr64@gmail.com
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-07 00:00:00 -07:00
18
+ date: 2010-10-08 00:00:00 -07:00
19
19
  default_executable: gtk2mp3
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency