gtk2mp3 0.5.2 → 0.6.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.
Files changed (3) hide show
  1. data/lib/gtk2mp3.rb +22 -2
  2. data/lib/gtk2mp3/appconfig.rb +1 -0
  3. metadata +6 -21
@@ -82,6 +82,21 @@ module Gtk2MP3 # Gtk2MP3 defined
82
82
  Gtk2AppLib::Widgets::Label.new(*spacer) # Spacer
83
83
  Gtk2AppLib::Widgets::Button.new(*Configuration::STOP+[hbox]){ self.stop_song }
84
84
  end
85
+ if Configuration::EDIT then
86
+ Gtk2AppLib::Widgets::Label.new(*spacer) # Spacer
87
+ Gtk2AppLib::Widgets::Button.new(*Configuration::EDIT+[hbox]) do
88
+ self.stop_song
89
+ filename = self.current
90
+ copy = File.join( Gtk2AppLib::USERDIR, File.basename(filename) )
91
+ if system( "xterm -e cutmp3 -i #{filename} -O #{copy}" )
92
+ if File.exist?(copy)
93
+ File.rename( copy, filename ) # replace with edited file
94
+ end
95
+ end
96
+ @continue = true
97
+ self.play_current
98
+ end
99
+ end
85
100
  if Configuration::DELETE then
86
101
  Gtk2AppLib::Widgets::Label.new(*Configuration::SPACER3+[hbox]) # Spacer
87
102
  Gtk2AppLib::Widgets.define_composite(:CheckButton,:Button)
@@ -93,6 +108,7 @@ module Gtk2MP3 # Gtk2MP3 defined
93
108
  end
94
109
  }
95
110
  end
111
+
96
112
  Gtk2AppLib::Widgets::Label.new(*Configuration::SPACER4+[hbox]) # Spacer
97
113
 
98
114
  self.load_song
@@ -121,11 +137,15 @@ module Gtk2MP3 # Gtk2MP3 defined
121
137
  end
122
138
  end
123
139
 
140
+ def play_current
141
+ @pipe.puts "#{Configuration::C_LOAD} #{@current}"
142
+ @time = Time.now
143
+ end
144
+
124
145
  def load_song
125
146
  self.random_song
126
147
  @info.text = File.basename(@current,MP3) # File defined
127
- @pipe.puts "#{Configuration::C_LOAD} #{@current}"
128
- @time = Time.now
148
+ self.play_current
129
149
  end
130
150
 
131
151
  def demote
@@ -39,6 +39,7 @@ module Configuration
39
39
  PAUSE = ['Pause', options, clicked].freeze # this one can be set to nil
40
40
  STOP = ['Stop', options, clicked].freeze # this one can be set to nil
41
41
  DELETE = ['Delete', options, clicked].freeze # this one can be set to nil
42
+ EDIT = (Gtk2AppLib::Configuration::X && Gtk2AppLib.which([['cutmp3', ' ']]))? ['Edit', options, clicked].freeze : nil # this one can be set to nil
42
43
 
43
44
  SELECT_A_FILE = [['Select a file', Gtk::FileChooser::ACTION_OPEN],Gtk2AppLib::HNIL].freeze
44
45
 
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtk2mp3
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
5
4
  prerelease:
6
- segments:
7
- - 0
8
- - 5
9
- - 2
10
- version: 0.5.2
5
+ version: 0.6.0
11
6
  platform: ruby
12
7
  authors:
13
8
  - carlosjhr64@gmail.com
@@ -15,7 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-07-16 00:00:00 Z
13
+ date: 2012-01-23 00:00:00 Z
19
14
  dependencies:
20
15
  - !ruby/object:Gem::Dependency
21
16
  name: gtk2applib
@@ -25,10 +20,6 @@ dependencies:
25
20
  requirements:
26
21
  - - ~>
27
22
  - !ruby/object:Gem::Version
28
- hash: 49
29
- segments:
30
- - 15
31
- - 3
32
23
  version: "15.3"
33
24
  type: :runtime
34
25
  version_requirements: *id001
@@ -41,12 +32,12 @@ extensions: []
41
32
  extra_rdoc_files: []
42
33
 
43
34
  files:
44
- - ./lib/gtk2mp3/playlist.rb
45
- - ./lib/gtk2mp3/couple.rb
46
35
  - ./lib/gtk2mp3/appconfig.rb
36
+ - ./lib/gtk2mp3/couple.rb
37
+ - ./lib/gtk2mp3/playlist.rb
47
38
  - ./lib/gtk2mp3.rb
48
- - ./pngs/logo.png
49
39
  - ./pngs/icon.png
40
+ - ./pngs/logo.png
50
41
  - ./README.txt
51
42
  - bin/gtk2mp3
52
43
  homepage: https://sites.google.com/site/gtk2applib/home/gtk2applib-applications/gtk2mp3
@@ -62,23 +53,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
62
53
  requirements:
63
54
  - - ">="
64
55
  - !ruby/object:Gem::Version
65
- hash: 3
66
- segments:
67
- - 0
68
56
  version: "0"
69
57
  required_rubygems_version: !ruby/object:Gem::Requirement
70
58
  none: false
71
59
  requirements:
72
60
  - - ">="
73
61
  - !ruby/object:Gem::Version
74
- hash: 3
75
- segments:
76
- - 0
77
62
  version: "0"
78
63
  requirements:
79
64
  - mpg123
80
65
  rubyforge_project:
81
- rubygems_version: 1.8.4
66
+ rubygems_version: 1.8.10
82
67
  signing_key:
83
68
  specification_version: 3
84
69
  summary: Gtk2MP3