プロジェクト

全般

プロフィール

バグ #1225 » userless_message.patch

topic/1219-quoted-tweetのcheckout後に当てる - cob odo, 2018-05-05 16:59

差分を表示:

core/mui/cairo_miracle_painter.rb
textselector_unselect end
def iob_icon_pixbuf
[ ["reply.png".freeze, message.user.verified? ? "verified.png" : "etc.png"],
[if message.user.protected?; then "protected.png".freeze else "retweet.png".freeze end,
[ ["reply.png".freeze, (message.respond_to?(:user) && message.user.verified?) ? "verified.png" : "etc.png"],
[if message.respond_to?(:user) && message.user.protected?; then "protected.png".freeze else "retweet.png".freeze end,
message.favorite? ? "unfav.png".freeze : "fav.png".freeze] ] end
def iob_icon_pixbuf_off
world, = Plugin.filtering(:world_current, nil)
[ [(UserConfig[:show_replied_icon] and message.mentioned_by_me? and "reply.png".freeze),
UserConfig[:show_verified_icon] && message.user.verified? && "verified.png"],
[ if UserConfig[:show_protected_icon] and message.user.protected?
UserConfig[:show_verified_icon] && message.respond_to?(:user) && message.user.verified? && "verified.png"],
[ if UserConfig[:show_protected_icon] and message.respond_to?(:user) and message.user.protected?
"protected.png".freeze
elsif Plugin[:miracle_painter].shared?(message, world)
"retweet.png".freeze end,
......
layout end
def header_left_markup
user = message.user
if user.respond_to?(:idname)
Pango.parse_markup("<b>#{Pango.escape(user.idname)}</b> #{Pango.escape(user.name || '')}")
if message.respond_to?(:user)
user = message.user
if user.respond_to?(:idname)
Pango.parse_markup("<b>#{Pango.escape(user.idname)}</b> #{Pango.escape(user.name || '')}")
else
Pango.parse_markup(Pango.escape(user.name || ''))
end
else
Pango.parse_markup(Pango.escape(user.name || ''))
Pango.parse_markup(Pango.escape(''))
end
end
......
# アイコンのpixbufを返す
def main_icon
@main_icon ||= message.user.icon.load_pixbuf(width: icon_width, height: icon_height){|pixbuf|
@main_icon ||= message.icon.load_pixbuf(width: icon_width, height: icon_height){|pixbuf|
@main_icon = pixbuf
on_modify
}
core/mui/cairo_sub_parts_message_base.rb
# [Pango::FontDescription] フォント情報
# [Pango::Attribute] マークアップ情報
def header_left_content(message)
user = message.user
if message.user[:idname]
attr_list, text = Pango.parse_markup("<b>#{Pango.escape(user.idname)}</b> #{Pango.escape(user.name || '')}")
if message.respond_to?(:user)
user = message.user
if message.user[:idname]
attr_list, text = Pango.parse_markup("<b>#{Pango.escape(user.idname)}</b> #{Pango.escape(user.name || '')}")
else
attr_list, text = Pango.parse_markup(Pango.escape(user.name || ''))
end
else
attr_list, text = Pango.parse_markup(Pango.escape(user.name || ''))
attr_list, text = Pango.parse_markup(Pango.escape(''))
end
return text, header_left_font(message), attr_list
end
......
context.paint end end
def main_icon(message)
message.user.icon.load_pixbuf(width: icon_size.width, height: icon_size.width){ helper.on_modify }
message.icon.load_pixbuf(width: icon_size.width, height: icon_size.width){ helper.on_modify }
end
# 表示する際に本文に適用すべき装飾オブジェクトを作成する
    (1-1/1)