• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

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

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

Ruby GTK3移行後のメインリポジトリ


コミットメタ情報

リビジョン04d6ac5467d1cce249a0a13b3a0f6c42ca3775d1 (tree)
日時2015-04-08 22:59:58
作者Shyouzou Sugitani <shy@user...>
コミッターShyouzou Sugitani

ログメッセージ

assorted fixes(6)

変更サマリ

差分

--- a/lib/ninix/menu.rb
+++ b/lib/ninix/menu.rb
@@ -640,9 +640,9 @@ module Menu
640640 if pixbuf == nil
641641 item = Gtk::MenuItem.new(name)
642642 else
643- image = Gtk::Image.new()
644- image.set_from_pixbuf(pixbuf)
645- image.show()
643+ image = Gtk::Image.new
644+ image.pixbuf = pixbuf
645+ image.show
646646 item = Gtk::ImageMenuItem.new(name)
647647 item.set_image(image)
648648 item.set_always_show_image(true) # XXX
--- a/lib/ninix/metamagic.rb
+++ b/lib/ninix/metamagic.rb
@@ -99,7 +99,7 @@ module MetaMagic
9999 delete_by_myself()
100100 return
101101 else
102- @instance.new(data) # reset
102+ @instance.new_(*data) # reset
103103 menuitem = create_menuitem(data)
104104 if menuitem == nil
105105 delete_by_myself()
--- a/lib/ninix/prefs.rb
+++ b/lib/ninix/prefs.rb
@@ -478,11 +478,11 @@ module Prefs
478478 while listiter != nil
479479 value = model.get_value(listiter, 1)
480480 if value == directory or directory == nil
481- @balloon_treeview.get_selection().select_iter(listiter)
481+ @balloon_treeview.selection.select_iter(listiter)
482482 selected = true
483483 break
484484 end
485- listiter = model.iter_next(listiter)
485+ listiter.next!
486486 end
487487 if not selected
488488 listiter = model.iter_first
--- a/lib/ninix/sakura.rb
+++ b/lib/ninix/sakura.rb
@@ -220,8 +220,8 @@ module Sakura
220220 return @shell_menu
221221 end
222222
223- def new(desc, shiori_dir, use_makoto, surface_set, prefix,
224- shiori_dll, shiori_name) ## FIXME
223+ def new_(desc, shiori_dir, use_makoto, surface_set, prefix,
224+ shiori_dll, shiori_name) ## FIXME
225225 @shiori = nil
226226 @desc = desc
227227 @shiori_dir = shiori_dir
@@ -506,7 +506,7 @@ module Sakura
506506 db, request_handler]
507507 end
508508
509- reset_event = ['OnGhostChanging', 'OnShellChanging', 'OnVanishSelected']
509+ RESET_EVENT = ['OnGhostChanging', 'OnShellChanging', 'OnVanishSelected']
510510
511511 def check_event_queue()
512512 return (not @event_queue.empty?)
@@ -516,7 +516,7 @@ module Sakura
516516 #for key in argdict
517517 # assert ['proc'].include?(key) # trap typo, etc.
518518 #end
519- if @reset_event.include?(event)
519+ if RESET_EVENT.include?(event)
520520 reset_script(true)
521521 end
522522 @event_queue << [event, arglist, argdict]
@@ -1179,13 +1179,13 @@ module Sakura
11791179 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
11801180 boot_event = ['OnBoot', 'OnFirstBoot', 'OnGhostChanged', 'OnShellChanged',
11811181 'OnUpdateComplete']
1182- reset_event = ['OnVanishSelecting', 'OnVanishCancel'] ## FIXME
1182+ RESET_EVENT = ['OnVanishSelecting', 'OnVanishCancel'] ## FIXME
11831183
11841184 def notify_event(event, *arglist, **argdict)
11851185 if @time_critical_session and event.startswith('OnMouse')
11861186 return 0
11871187 end
1188- if @reset_event.include?(event)
1188+ if RESET_EVENT.include?(event)
11891189 reset_script(true)
11901190 end
11911191 #for key in argdict
--- a/lib/ninix_main.rb
+++ b/lib/ninix_main.rb
@@ -885,7 +885,7 @@ module Ninix_Main
885885 def create_ghost(data)
886886 ghost = Sakura::Sakura.new
887887 ghost.set_responsible(self)
888- ghost.new(*data)
888+ ghost.new_(*data)
889889 return ghost
890890 end
891891
@@ -1060,7 +1060,8 @@ module Ninix_Main
10601060
10611061 def create_shell_menuitem(shell_name, shell_key, thumbnail)
10621062 return @__menu.create_meme_menuitem(
1063- shell_name, shell_key, self.select_shell, thumbnail)
1063+ shell_name, shell_key,
1064+ lambda {|key| select_shell(key) }, thumbnail)
10641065 end
10651066
10661067 def create_menuitem(key, baseinfo)
@@ -1081,10 +1082,10 @@ module Ninix_Main
10811082 thumbnail_path = nil
10821083 end
10831084 start_menuitem = @__menu.create_ghost_menuitem(
1084- name, icon_path, key, self.start_sakura_cb, # XXX
1085+ name, icon_path, key, lambda {|key| start_sakura_cb(key) }, # XXX
10851086 thumbnail_path)
10861087 select_menuitem = @__menu.create_ghost_menuitem(
1087- name, icon_path, key, self.select_sakura,
1088+ name, icon_path, key, lambda {|key| select_sakura(key) },
10881089 thumbnail_path)
10891090 menuitem = {
10901091 'Summon' => start_menuitem,
@@ -1388,7 +1389,10 @@ module Ninix_Main
13881389 if sakura.key == key # XXX: needs reloading?
13891390 return
13901391 end
1391- proc = lambda { stop_sakura(sakura, self.start_sakura, key, sakura.key) }
1392+ proc = lambda { stop_sakura(
1393+ sakura,
1394+ lambda {|key, prev| start_sakura(key, prev) },
1395+ key, sakura.key) }
13921396 # def proc(self=self, key=key)
13931397 # stop_sakura(sakura, self.start_sakura, key, sakura.key)
13941398 # end
@@ -1523,7 +1527,7 @@ module Ninix_Main
15231527 end
15241528 else
15251529 holon = Ghost.new(ghost_dir)
1526- holon.set_responsible(self.handle_request)
1530+ holon.set_responsible(self)
15271531 @ghosts[ghost_dir] = holon
15281532 holon.baseinfo = ghost_conf[ghost_dir]
15291533 end
@@ -1553,7 +1557,7 @@ module Ninix_Main
15531557 @balloons[balloon_dir].baseinfo = balloon_conf[balloon_dir]
15541558 else
15551559 meme = BalloonMeme(balloon_dir)
1556- meme.set_responsible(self.handle_request)
1560+ meme.set_responsible(self)
15571561 @balloons[balloon_dir] = meme
15581562 meme.baseinfo = balloon_conf[balloon_dir]
15591563 end
--- a/test/test-sakura.rb
+++ b/test/test-sakura.rb
@@ -11,7 +11,7 @@ module NinixTest
1111 @ghosts = Home.search_ghosts(target=nil, check_shiori=false)
1212 key = @ghosts.keys.sample
1313 @baseinfo = @ghosts[key]
14- @sakura.new(*@baseinfo)
14+ @sakura.new_(*@baseinfo)
1515 end
1616
1717 def update
@@ -31,7 +31,7 @@ module NinixTest
3131 @index = 0
3232 #INIT#OK#@sakura.initialize
3333 #INIT#OK#@sakura.set_responsible(parent)
34- #INIT#OK#@sakura.new(desc, shiori_dir, use_makoto, surface_set, prefix,
34+ #INIT#OK#@sakura.new_(desc, shiori_dir, use_makoto, surface_set, prefix,
3535 ##@sakura.handle_request(event_type, event, *arglist, **argdict)
3636 #OK#@sakura.attach_observer(self)
3737 #OK#@sakura.notify_observer("OBSERVER TEST", args=nil)