Created
May 8, 2011 13:33
-
-
Save osak/961373 to your computer and use it in GitHub Desktop.
このパッチあてたらmikutter-cairoがうごいた
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: core/mui/cairo_timeline.rb | |
=================================================================== | |
--- core/mui/cairo_timeline.rb (リビジョン 300) | |
+++ core/mui/cairo_timeline.rb (作業コピー) | |
@@ -23,7 +23,7 @@ | |
# } | |
a | |
}, | |
- :kind => :message_id, :widget => :text, :type => Integer, :label => ''}, | |
+ :kind => :message_id, :widget => :text, :type => String, :label => ''}, | |
{:kind => :text, :widget => :text, :type => Message}, | |
{:kind => :text, :widget => :text, :type => Integer} | |
].freeze | |
@@ -48,7 +48,7 @@ | |
raise "id must than 1 but specified #{message[:id].inspect}" if message[:id] <= 0 | |
iter = @tl.model.append | |
if(!any?{ |m| m[:id] == message[:id] }) | |
- iter[0] = message[:id] | |
+ iter[0] = message[:id].to_s | |
iter[1] = message | |
iter[2] = message[:created].to_i | |
end | |
Index: core/mui/cairo_tweetrenderer.rb | |
=================================================================== | |
--- core/mui/cairo_tweetrenderer.rb (リビジョン 300) | |
+++ core/mui/cairo_tweetrenderer.rb (作業コピー) | |
@@ -7,13 +7,14 @@ | |
module Gtk | |
class TweetRenderer < CellRendererPixbuf | |
type_register | |
- install_property(GLib::Param::UInt64.new("message_id", | |
- "message_id", | |
- "showing message", | |
- 0, | |
- 2 ** 64 - 1, | |
- 0, | |
- GLib::Param::READABLE|GLib::Param::WRITABLE)) | |
+ #install_property(GLib::Param::UInt64.new("message_id", | |
+ # "message_id", | |
+ # "showing message", | |
+ # 0, | |
+ # 2 ** 64 - 1, | |
+ # 0, | |
+ #GLib::Param::READABLE|GLib::Param::WRITABLE)) | |
+ install_property(GLib::Param::String.new("message_id", "message_id", "showing message", "hoge", GLib::Param::READABLE|GLib::Param::WRITABLE)) | |
def initialize() | |
super() | |
@@ -77,9 +78,9 @@ | |
attr_reader :message_id, :message | |
def message_id=(id) | |
- type_strict id => Integer | |
- if id > 0 | |
- render_message(Message.findbyid(id)) | |
+ #type_strict id => String | |
+ if id && id.to_i > 0 | |
+ render_message(Message.findbyid(id.to_i)) | |
else | |
self.pixbuf = Gdk::Pixbuf.new(MUI::Skin.get('notfound.png')) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment