機能 #597 » wrap-around.patch
core/plugin/command/command.rb | ||
---|---|---|
230 | 230 |
type_strict widget => Plugin::GUI::HierarchyChild |
231 | 231 |
children = widget.parent.children.select{ |w| w.is_a? widget.class } |
232 | 232 |
index = children.index(widget) |
233 |
if distance > 0 ? (children.size <= (index+distance)) : (0 > (index+distance)) |
|
234 |
notice "terminate #{widget}" |
|
235 |
yield(widget, distance) if block_given? |
|
236 |
else |
|
237 |
term = children[index + distance] |
|
238 |
term = term.active_chain.last if term.respond_to? :active_chain |
|
239 |
term.active! if term |
|
240 |
notice "activate #{term} #{widget.class} #{term.class}" |
|
241 |
src_tl = widget.active_chain.last |
|
242 |
if widget.is_a?(Plugin::GUI::Pane) and src_tl.is_a?(Plugin::GUI::Timeline) and term.is_a?(Plugin::GUI::Timeline) |
|
243 |
slide_timeline_focus(src_tl, term) end end end |
|
233 |
term = children[(index + distance) % children.size] |
|
234 |
term = term.active_chain.last if term.respond_to? :active_chain |
|
235 |
term.active! if term |
|
236 |
notice "activate #{term} #{widget.class} #{term.class}" |
|
237 |
src_tl = widget.active_chain.last |
|
238 |
if widget.is_a?(Plugin::GUI::Pane) and src_tl.is_a?(Plugin::GUI::Timeline) and term.is_a?(Plugin::GUI::Timeline) |
|
239 |
slide_timeline_focus(src_tl, term) end end |
|
244 | 240 | |
245 | 241 |
# タイムライン _src_ で選択されているディスプレイ上のy座標が同じ _dest_ のツイートに |
246 | 242 |
# フォーカスを移動する |