プロジェクト

全般

プロフィール

バグ #1515 » 0001-mui-deprecated-refs-1515.patch

Izumi Tsutsui, 2021-10-22 23:01

差分を表示:

core/mui/gtk_extension.rb
243 243
class Gtk::TextBuffer < GLib::Object
244 244
  # _idx_ 文字目を表すイテレータと、そこから _size_ 文字後ろを表すイテレータの2要素からなる配列を返す。
245 245
  def get_range(idx, size)
246
    [self.get_iter_at_offset(idx), self.get_iter_at_offset(idx + size)]
246
    [self.get_iter_at(offset: idx), self.get_iter_at(offset: idx + size)]
247 247
  end
248 248
end
249 249

  
core/mui/gtk_inneruserlist.rb
17 17
    append_column ::Gtk::TreeViewColumn.new("", ::Gtk::CellRendererPixbuf.new, pixbuf: COL_ICON)
18 18
    append_column ::Gtk::TreeViewColumn.new("SN", ::Gtk::CellRendererText.new, text: COL_SCREEN_NAME)
19 19
    append_column ::Gtk::TreeViewColumn.new("名前", ::Gtk::CellRendererText.new, text: COL_NAME)
20
    model.set_sort_column_id(COL_ORDER,  Gtk::SORT_DESCENDING)
20
    model.set_sort_column_id(COL_ORDER, Gtk::SortType::DESCENDING)
21 21
  end
22 22

  
23 23
  # Userの配列 _users_ を追加する
core/mui/gtk_userlist.rb
25 25
  def initialize
26 26
    super
27 27
    @listview = Gtk::InnerUserList.new(self)
28
    scrollbar = ::Gtk::VScrollbar.new(@listview.vadjustment)
29
    add Gtk::Box.new(:horizontal, 0).add(@listview).closeup(scrollbar)
28
    scrollbar = ::Gtk::Scrollbar.new(:vertical, @listview.vadjustment)
29
    add Gtk::Box.new(:horizontal, 0).add(@listview).pack_start(scrollbar, expand: false)
30 30
    @listview.ssc(:row_activated, &self.class.row_activated)
31 31
    @listview.ssc(:expose_event){
32 32
      emit_expose_user
    (1-1/1)