Piggy 0.5.1.2 → 0.5.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ Changes in 0.5.1-3
2
+ - Bugfix: find LOCALAPPDATA and MYPICTURES
3
+ -> in mingw build
4
+ -> without win::dir
5
+ - require gem fxruby in gemspec
6
+
1
7
  Changes in 0.5.1-2
2
8
  - Save/load album list with comment and rotations
3
9
  - Separate width option for widescreen images
@@ -14,6 +20,7 @@ Changes in 0.5.1-1
14
20
  - New style: snowman
15
21
  - New style: candle
16
22
  - New style: snow
23
+
17
24
  Changes in 0.5.1-0
18
25
  - Sort by time of photo creation before generation
19
26
  (includes workaround for missing time information)
@@ -4,7 +4,7 @@
4
4
  # Provide release information for Piggy.
5
5
  module PiggyVersion
6
6
  def PiggyVersion.version_string
7
- '0.5.1-2'
7
+ '0.5.1-3'
8
8
  end
9
9
  def PiggyVersion.copyright_string
10
10
  'Copyright (C) 2010 Sascha D�rdelmann'
@@ -129,61 +129,75 @@ class WinShell < ShellInterface
129
129
  include Singleton
130
130
  end
131
131
 
132
- if RUBY_PLATFORM =~ /win32/
132
+ if RUBY_PLATFORM =~ /win32/ or RUBY_PLATFORM =~ /mingw32/
133
133
  require 'win32ole'
134
- require 'win32/dir'
135
-
134
+
136
135
  class WinShell < ShellInterface
137
136
 
138
137
  def initialize
139
138
  @shell = WIN32OLE.new('Shell.application')
140
- @os_paths = {
141
- "ALTSTARTUP" => Dir::ALTSTARTUP,
142
- "APPDATA" => Dir::APPDATA,
143
- "COMMONALTSTARTUP" => Dir::COMMON_ALTSTARTUP,
144
- "COMMONAPPDATA" => Dir::COMMON_APPDATA,
145
- "COMMONDESKTOPDIR" => Dir::COMMON_DESKTOPDIRECTORY,
146
- "COMMONFAVORITES" => Dir::COMMON_FAVORITES,
147
- "COMMONPROGRAMS" => Dir::COMMON_PROGRAMS,
148
- "COMMONSTARTMENU" => Dir::COMMON_STARTMENU,
149
- "COMMONSTARTUP" =>Dir::COMMON_STARTUP,
150
- "COOKIES" => Dir::COOKIES,
151
- "DESKTOP" => Dir::DESKTOP,
152
- "DESKTOPDIRECTORY" => Dir::DESKTOPDIRECTORY,
153
- "FAVORITES" => Dir::FAVORITES,
154
- "FONTS" => Dir::FONTS,
155
- "HISTORY" => Dir::HISTORY,
156
- "INTERNETCACHE" => Dir::INTERNET_CACHE,
157
- "LOCALAPPDATA" => Dir::LOCAL_APPDATA,
158
- "MYPICTURES" => Dir::MYPICTURES,
159
- "NETHOOD" => Dir::NETHOOD,
160
- "PERSONAL" => Dir::PERSONAL,
161
- "PRINTHOOD" => Dir::PRINTHOOD,
162
- "PROFILE" => Dir::PROFILE,
163
- "PROGRAMFILES" => Dir::PROGRAM_FILES,
164
- "PROGRAMS" => Dir::PROGRAMS,
165
- "RECENT" => Dir::RECENT,
166
- "SENDTO" => Dir::SENDTO,
167
- "STARTMENU" => Dir::STARTMENU,
168
- "STARTUP" => Dir::STARTUP,
169
- "SYSTEM" => Dir::SYSTEM,
170
- "TEMPLATES" => Dir::TEMPLATES,
171
- "WINDOWS" => Dir::WINDOWS
172
- }
139
+ begin
140
+ require 'win32/dir'
141
+ @os_paths = {
142
+ "ALTSTARTUP" => Dir::ALTSTARTUP,
143
+ "APPDATA" => Dir::APPDATA,
144
+ "COMMONALTSTARTUP" => Dir::COMMON_ALTSTARTUP,
145
+ "COMMONAPPDATA" => Dir::COMMON_APPDATA,
146
+ "COMMONDESKTOPDIR" => Dir::COMMON_DESKTOPDIRECTORY,
147
+ "COMMONFAVORITES" => Dir::COMMON_FAVORITES,
148
+ "COMMONPROGRAMS" => Dir::COMMON_PROGRAMS,
149
+ "COMMONSTARTMENU" => Dir::COMMON_STARTMENU,
150
+ "COMMONSTARTUP" =>Dir::COMMON_STARTUP,
151
+ "COOKIES" => Dir::COOKIES,
152
+ "DESKTOP" => Dir::DESKTOP,
153
+ "DESKTOPDIRECTORY" => Dir::DESKTOPDIRECTORY,
154
+ "FAVORITES" => Dir::FAVORITES,
155
+ "FONTS" => Dir::FONTS,
156
+ "HISTORY" => Dir::HISTORY,
157
+ "INTERNETCACHE" => Dir::INTERNET_CACHE,
158
+ "LOCALAPPDATA" => Dir::LOCAL_APPDATA,
159
+ "MYPICTURES" => Dir::MYPICTURES,
160
+ "NETHOOD" => Dir::NETHOOD,
161
+ "PERSONAL" => Dir::PERSONAL,
162
+ "PRINTHOOD" => Dir::PRINTHOOD,
163
+ "PROFILE" => Dir::PROFILE,
164
+ "PROGRAMFILES" => Dir::PROGRAM_FILES,
165
+ "PROGRAMS" => Dir::PROGRAMS,
166
+ "RECENT" => Dir::RECENT,
167
+ "SENDTO" => Dir::SENDTO,
168
+ "STARTMENU" => Dir::STARTMENU,
169
+ "STARTUP" => Dir::STARTUP,
170
+ "SYSTEM" => Dir::SYSTEM,
171
+ "TEMPLATES" => Dir::TEMPLATES,
172
+ "WINDOWS" => Dir::WINDOWS
173
+ }
174
+ rescue LoadError => load_error
175
+ @os_paths = {}
176
+ end
173
177
  super
174
178
  end
175
179
 
176
180
  def path_for_special_folder(name)
177
181
  win32_utils_path = @os_paths[name]
178
- return win32_utils_path ? ruby_path(win32_utils_path) : ""
182
+ return ruby_path(win32_utils_path ? win32_utils_path : path_from_env(name))
183
+ end
184
+
185
+ def path_from_env(name)
186
+ path_in_env = ENV[name]
187
+ return path_in_env if(path_in_env)
188
+ if(name=="MYPICTURES")
189
+ win7 = "#{@home}\\Pictures"
190
+ return win7 if(File.exists?(ruby_path(win7)))
191
+ end
192
+ return @home
179
193
  end
180
194
 
181
195
  # Include virtual paths on vindows
182
196
  def special_folder_listing
183
197
  @special_folder_ids.keys.sort.each do |aFolder|
184
198
  puts "#{aFolder}:"
185
- puts "\t#{path_for_special_folder aFolder}"
186
- puts "\t#{virtual_path_for aFolder}"
199
+ puts "\tPath: #{path_for_special_folder aFolder}"
200
+ puts "\tVirtual path: #{virtual_path_for aFolder}"
187
201
  end
188
202
  end
189
203
 
@@ -283,13 +297,14 @@ end
283
297
 
284
298
  if $0 == __FILE__
285
299
  def example
300
+ puts RUBY_PLATFORM
286
301
  shell = WinShell.instance
302
+ puts shell.class
287
303
  h = "Example 1: WinShell.new.specialFolderListing"
288
304
  h_line = (1..h.size).collect { |c| '*'}
289
305
  puts "#{h_line}\n#{h}\n#{h_line}"
290
306
  shell.special_folder_listing
291
307
  h = "Example 2. Links on Desktop"
292
- h_line = (1..h.size).collect { |c| '*'}
293
308
  puts "#{h_line}\n#{h}\n#{h_line}"
294
309
  desktop_dir = shell.desktop_directory
295
310
  links = Dir[desktop_dir + '/*'].select { |p| shell.link?(File.basename(p)) }
@@ -297,6 +312,11 @@ if $0 == __FILE__
297
312
  link_name = File.basename link_path
298
313
  puts "#{link_name} => \"#{shell.get_link_target link_name, desktop_dir}\""
299
314
  end
315
+ h = "Example 3. Environment"
316
+ puts "#{h_line}\n#{h}\n#{h_line}"
317
+ ENV.each_pair { |key, val|
318
+ puts("#{key}: #{val}")
319
+ }
300
320
  end
301
321
  example
302
322
  end
@@ -200,6 +200,7 @@ class PiggyImageBrowser < Fox::FXMainWindow
200
200
  msg += "Version information:\n"
201
201
  msg += "- Plattform #{RUBY_PLATFORM}\n"
202
202
  msg += "- Ruby #{RUBY_VERSION} (released #{RUBY_RELEASE_DATE})\n"
203
+ msg += "- Platform #{RUBY_PLATFORM}\n"
203
204
  msg += "- FXRuby #{Fox.fxrubyversion}\n"
204
205
  msg += "- FOX Toolkit #{Fox.fxversion}\n"
205
206
  msg += "- BarelyFitz Javascript slideshow 1.16\n"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Piggy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 103
5
- prerelease:
4
+ hash: 101
5
+ prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
9
  - 1
10
- - 2
11
- version: 0.5.1.2
10
+ - 3
11
+ version: 0.5.1.3
12
12
  platform: ruby
13
13
  authors:
14
14
  - Sascha Doerdelmann
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-01-16 00:00:00 +01:00
19
+ date: 2011-01-17 00:00:00 +01:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -47,6 +47,20 @@ dependencies:
47
47
  version: "0"
48
48
  type: :runtime
49
49
  version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
51
+ name: fxruby
52
+ prerelease: false
53
+ requirement: &id003 !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ hash: 3
59
+ segments:
60
+ - 0
61
+ version: "0"
62
+ type: :runtime
63
+ version_requirements: *id003
50
64
  description:
51
65
  email: wsdngatrubyforge@hinterkattentuffel.de
52
66
  executables:
@@ -233,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
247
  requirements: []
234
248
 
235
249
  rubyforge_project:
236
- rubygems_version: 1.4.2
250
+ rubygems_version: 1.3.7
237
251
  signing_key:
238
252
  specification_version: 3
239
253
  summary: (P)ick (i)mages and (g)enerate (g)alleries