• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

ninix-aya(git://git.osdn.net/gitroot/ninix-aya/ruby-gtk3.git)のfork


コミットメタ情報

リビジョンfebfa59d725357e8823cd331f683a1ab617aae2e (tree)
日時2016-10-16 23:27:05
作者Shyouzou Sugitani <shy@user...>
コミッターShyouzou Sugitani

ログメッセージ

Prepare for Release of 5.0.2

変更サマリ

差分

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
1+Sun October 16 2016 Shyouzou Sugitani <shy@users.osdn.me>
2+ * バージョン5.0.2リリース.
3+ * Ruby-GNOME2 3.0対応の漏れを修正.
4+ * kinoko.rb, ngm.rbのRuby移行時の変更漏れと変更ミスを修正.
5+ * PNR, PNA対応方法を変更.(暫定措置)
6+ (pixelsではなくpixel-bytesプロパティを使用するようにした.)
7+
18 Sat October 15 2016 Shyouzou Sugitani <shy@users.osdn.me>
29 * バージョン5.0.1リリース.
310 * Ruby-GNOME2 3.0対応.
--- a/lib/ninix/kinoko.rb
+++ b/lib/ninix/kinoko.rb
@@ -47,7 +47,7 @@ module Kinoko
4747 'settings' => [['Settings', nil, _('Settings...(_O)'), nil,
4848 '', lambda {|a, b| @parent.handle_request('NOTIFY', 'edit_preferences')}],
4949 '/ui/popup/Settings'],
50- 'skin' => [['Skin', nil, _('Skin(_K)'), nil],
50+ 'skin' => [['Skin', nil, _('Skin(_K)'), nil, '', lambda {|a, b| }],
5151 nil, '/ui/popup/Skin'],
5252 'exit' => [['Exit', nil, _('Exit(_Q)'), nil,
5353 '', lambda {|a, b| @parent.handle_request('NOTIFY', 'close')}],
@@ -133,7 +133,7 @@ module Kinoko
133133 scale = @target.get_surface_scale()
134134 @skin.set_scale(scale)
135135 when 'hide'
136- side = args
136+ side = args[0]
137137 @skin.hide() if side.zero? # sakura side
138138 when 'iconified'
139139 @skin.hide()
@@ -145,7 +145,7 @@ module Kinoko
145145 side, xoffset, yoffset = args
146146 @skin.set_position(:xoffset => xoffset, :yoffset => yoffset) if side.zero? # sakura side
147147 when 'raise'
148- side = args
148+ side = args[0]
149149 @skin.set_position() if side.zero? # sakura side
150150 else
151151 Logging::Logging.debug('OBSERVER(kinoko): ignore - ' + event)
@@ -399,7 +399,7 @@ module Kinoko
399399 end
400400
401401 def create_image_surface(surface_id)
402- unless surface_id.nil? and surface_id != ''
402+ unless surface_id.nil? or surface_id.empty?
403403 surface = get_image_surface(surface_id)
404404 else
405405 surface = Pix.create_surface_from_file(@path)
@@ -409,7 +409,7 @@ module Kinoko
409409
410410 def update_frame_buffer()
411411 new_surface = create_image_surface(@seriko.get_base_id)
412- rasie "assert" if new_surface.nil?
412+ raise "assert" if new_surface.nil?
413413 # draw overlays
414414 for surface_id, x, y, method in @seriko.iter_overlays()
415415 begin
--- a/lib/ninix/nekodorif.rb
+++ b/lib/ninix/nekodorif.rb
@@ -77,7 +77,8 @@ module Nekodorif
7777 'settings' => [['Settings', nil, _('Settings...(_O)'), nil,
7878 '', lambda {|a, b| @parent.handle_request('NOTIFY', 'edit_preferences')}],
7979 '/ui/popup/Settings'],
80- 'katochan' => [['Katochan', nil, _('Katochan(_K)'), nil],
80+ 'katochan' => [['Katochan', nil, _('Katochan(_K)'), nil,
81+ '', lambda {|a, b| }],
8182 '/ui/popup/Katochan'],
8283 'exit' => [['Exit', nil,_('Exit(_Q)'), nil,
8384 '', lambda {|a, b| @parent.handle_request('NOTIFY', 'close')}],
--- a/lib/ninix/ngm.rb
+++ b/lib/ninix/ngm.rb
@@ -404,47 +404,59 @@ module NGM
404404 </menubar>
405405 </ui>"
406406 @entries = [
407- [ 'FileMenu', nil, _('_File') ],
408- [ 'ViewMenu', nil, _('_View') ],
409- [ 'ArchiveMenu', nil, _('_Archive') ],
410- [ 'HelpMenu', nil, _('_Help') ],
411- [ 'Search', nil, # name, stock id
412- _('Search(_F)'), '<control>F', # label, accelerator
413- 'Search', # tooltip
414- lambda {|a, b| open_search_dialog()} ],
415- [ 'Search Forward', nil,
416- _('Search Forward(_S)'), 'F3',
417- nil,
418- lambda {|a, b| search_forward()} ],
419- [ 'Settings', nil,
420- _('Settings(_O)'), nil,
421- nil,
422- lambda {|a, b| @parent.handle_request(
423- 'NOTIFY', 'open_preference_dialog')} ],
424- [ 'DB Network Update', nil,
425- _('DB Network Update(_N)'), nil,
426- nil,
427- lambda {|a, b| network_update()} ],
428- [ 'Close', nil,
429- _('Close(_X)'), nil,
430- nil,
431- lambda {|a, b| close()} ],
432- [ 'Mask', nil,
433- _('Mask(_M)'), nil,
434- nil,
435- lambda {|a, b| @parent.handle_request(
436- 'NOTIFY', 'open_mask_dialog')} ],
437- [ 'Reset to Default', nil,
438- _('Reset to Default(_Y)'), nil,
439- nil,
440- lambda {|a, b| @parent.handle_request(
441- 'NOTIFY', 'reset_to_default')} ],
442- [ 'Show All', nil,
443- _('Show All(_Z)'), nil,
444- nil,
445- lambda {|a, b| @parent.handle_request(
446- 'NOTIFY', 'show_all')} ],
447- ]
407+ [ 'FileMenu', nil,
408+ _('_File'), nil,
409+ '',
410+ lambda {|a, b| } ],
411+ [ 'ViewMenu', nil,
412+ _('_View'), nil,
413+ '',
414+ lambda {|a, b| } ],
415+ [ 'ArchiveMenu', nil,
416+ _('_Archive'), nil,
417+ '',
418+ lambda {|a, b| } ],
419+ [ 'HelpMenu', nil,
420+ _('_Help'), nil,
421+ '',
422+ lambda {|a, b| } ],
423+ [ 'Search', nil, # name, stock id
424+ _('Search(_F)'), '<control>F', # label, accelerator
425+ 'Search', # tooltip
426+ lambda {|a, b| open_search_dialog()} ],
427+ [ 'Search Forward', nil,
428+ _('Search Forward(_S)'), 'F3',
429+ nil,
430+ lambda {|a, b| search_forward()} ],
431+ [ 'Settings', nil,
432+ _('Settings(_O)'), nil,
433+ nil,
434+ lambda {|a, b| @parent.handle_request(
435+ 'NOTIFY', 'open_preference_dialog')} ],
436+ [ 'DB Network Update', nil,
437+ _('DB Network Update(_N)'), nil,
438+ nil,
439+ lambda {|a, b| network_update()} ],
440+ [ 'Close', nil,
441+ _('Close(_X)'), nil,
442+ nil,
443+ lambda {|a, b| close()} ],
444+ [ 'Mask', nil,
445+ _('Mask(_M)'), nil,
446+ nil,
447+ lambda {|a, b| @parent.handle_request(
448+ 'NOTIFY', 'open_mask_dialog')} ],
449+ [ 'Reset to Default', nil,
450+ _('Reset to Default(_Y)'), nil,
451+ nil,
452+ lambda {|a, b| @parent.handle_request(
453+ 'NOTIFY', 'reset_to_default')} ],
454+ [ 'Show All', nil,
455+ _('Show All(_Z)'), nil,
456+ nil,
457+ lambda {|a, b| @parent.handle_request(
458+ 'NOTIFY', 'show_all')} ],
459+ ]
448460 @opened = false
449461 @textview = [nil, nil]
450462 @darea = [nil, nil]
@@ -632,10 +644,11 @@ module NGM
632644 surface = Pix.create_surface_from_file(filename)
633645 rescue
634646 surface = nil
635- end
647+ else
636648 w = surface.width
637649 h = surface.height
638650 darea.set_size_request(w, h)
651+ end
639652 else
640653 surface = nil
641654 end
--- a/lib/ninix/pix.rb
+++ b/lib/ninix/pix.rb
@@ -250,8 +250,8 @@ module Pix
250250 end
251251
252252 def self.surface_new_from_file(path)
253- Cairo::ImageSurface.new(path)
254- end
253+ Cairo::ImageSurface.from_png(path)
254+ end
255255
256256 def self.create_icon_pixbuf(path)
257257 begin
@@ -318,9 +318,6 @@ module Pix
318318 end
319319
320320 def self.create_surface_from_file(path, is_pnr: true, use_pna: false)
321- head = File.dirname(path)
322- basename = File.basename(path, '.*')
323- ext = File.extname(path)
324321 pixbuf = create_pixbuf_from_file(path, :is_pnr => is_pnr, :use_pna => use_pna)
325322 surface = Cairo::ImageSurface.new(Cairo::FORMAT_ARGB32,
326323 pixbuf.width, pixbuf.height)
@@ -344,30 +341,40 @@ module Pix
344341 pixbuf_new_from_file(path)
345342 end
346343 if is_pnr
347- pixels = pixbuf.pixels
344+ pixels = pixbuf.read_pixel_bytes
348345 unless pixbuf.has_alpha?
349- r, g, b = pixels[0, 3]
346+ r, g, b = pixels[0, 3].bytes
350347 pixbuf = pixbuf.add_alpha(true, r, g, b)
351348 else
352349 pix_na = NArray.to_na(pixels, NArray::INT)
353350 rgba = pix_na[0]
354351 pix_na[pix_na.eq rgba] = 0
355- pixbuf.pixels = pix_na.to_s
352+ pixbuf = GdkPixbuf::Pixbuf.new(
353+ :bytes => pix_na.to_s,
354+ :has_alpha => true,
355+ :width => pixbuf.width,
356+ :height => pixbuf.height,
357+ :row_stride => pixbuf.rowstride)
356358 end
357359 end
358360 if use_pna
359361 path = File.join(head, basename + '.pna')
360362 if File.exists?(path)
361363 pna_pixbuf = pixbuf_new_from_file(path)
362- pix_na = NArray.to_na(pixbuf.pixels, NArray::BYTE)
364+ pix_na = NArray.to_na(pixbuf.read_pixel_bytes, NArray::BYTE)
363365 pix_na.reshape!(4, pix_na.size / 4)
364366 unless pna_pixbuf.has_alpha?
365367 pna_pixbuf = pna_pixbuf.add_alpha(false, 0, 0, 0)
366368 end
367- pna_na = NArray.to_na(pna_pixbuf.pixels, NArray::BYTE)
369+ pna_na = NArray.to_na(pna_pixbuf.read_pixel_bytes, NArray::BYTE)
368370 pna_na.reshape!(4, pna_na.size / 4)
369371 pix_na[3, true] = pna_na[0, true]
370- pixbuf.pixels = pix_na.to_s
372+ pixbuf = GdkPixbuf::Pixbuf.new(
373+ :bytes => pix_na.to_s,
374+ :has_alpha => true,
375+ :width => pixbuf.width,
376+ :height => pixbuf.height,
377+ :row_stride => pixbuf.rowstride)
371378 end
372379 end
373380 return pixbuf
--- a/lib/ninix/version.rb
+++ b/lib/ninix/version.rb
@@ -18,7 +18,7 @@ module Version
1818 bindtextdomain("ninix-aya")
1919
2020 def self.NUMBER
21- '5.0.1'
21+ '5.0.2'
2222 end
2323
2424 def self.CODENAME