lib/alexandria/ui/listview.rb in alexandria-book-collection-manager-0.6.9.pre1 vs lib/alexandria/ui/listview.rb in alexandria-book-collection-manager-0.6.9
- old
+ new
@@ -1,9 +1,9 @@
# Copyright (C) 2004-2006 Laurent Sansonetti
# Copyright (C) 2008 Joseph Method
# Copyright (C) 2010 Cathal Mc Ginley
-# Modifications Copyright (C) 2011 Matijs van Zuijlen
+# Copyright (C) 2011 Matijs van Zuijlen
#
# Alexandria is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License aso
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
@@ -67,11 +67,12 @@
column.pack_start(renderer, true)
column.set_cell_data_func(renderer) do |_col, cell, _model, iter|
iter = @listview_model.convert_iter_to_child_iter(iter)
iter = @filtered_model.convert_iter_to_child_iter(iter)
- cell.text, cell.editable = iter[Columns::TITLE], false # true
+ cell.text = iter[Columns::TITLE]
+ cell.editable = false # true
end
column.sort_column_id = Columns::TITLE
column.resizable = true
@listview.append_column(column)
@@ -220,11 +221,10 @@
end
rescue => e
log.error { "toggle failed for path #{path} #{e}\n" + e.backtrace.join("\n") }
end
-
end
column = Gtk::TreeViewColumn.new(title, renderer, text: iterid)
column.widget = Gtk::Label.new(title).show
column.sort_column_id = iterid
column.resizable = true
@@ -292,10 +292,10 @@
# preference value stored.
def setup_listview_columns_width
log.debug { "setup_listview_columns_width #{@prefs.cols_width}" }
if @prefs.cols_width
cols_width = YAML.load(@prefs.cols_width)
- log.debug { "cols_width: #{cols_width.inspect }" }
+ log.debug { "cols_width: #{cols_width.inspect}" }
@listview.columns.each do |c|
if cols_width.key?(c.title)
log.debug { "#{c.title} : #{cols_width[c.title]}" }
c.sizing = Gtk::TreeViewColumn::FIXED
c.fixed_width = cols_width[c.title]