From: Stefan S. <ma...@ss...> - 2015-09-23 13:53:00
|
On Wed, 2015-09-23 at 14:38 +0200, Stefan Salewski wrote: > Will investigate it, maybe I can avoid > CellLayoutDataFunc. The good news first: I can launch my program again with 3.05 after a few fixes. But this is what is logged at the console: http://ssalewski.de/tmp/msg.txt The deprecated warnings are not a problem for me, I had that already when I port the application from gtk2 to gtk3. That is easy to fix. But all the other messages? No idea currently. For my current fixes: class ColBox < Gtk::ComboBox attr_accessor :lock Col_Name, Col_Pixbuf, Col_Full_Name = 0, 1, 2 def initialize store = Gtk::ListStore.new(String, Gdk::Pixbuf, String) Pet_Config::get_default_config.get_colors(Pet_Config::SCR_S).each{|sym, b, c| next unless s = Pet_Config::Color_Name[sym] # some colors may have no name/index, i.e. pin hot end color iter = store.append iter[Col_Name] = "(#{s})" iter[Col_Pixbuf] = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB, true, 8, 12, 12) # (colorspace, has_alpha, bits_per_sample, width, height) iter[Col_Full_Name] = sym.to_s } super(:model => store) self.margin = 0 self.id_column = Col_Full_Name renderer = Gtk::CellRendererPixbuf.new self.pack_start(renderer, false) self.add_attribute(renderer, "pixbuf", Col_Pixbuf) # self.set_cell_data_func(renderer) do |w, renderer, model, iter| # Gtk::ComboBox, Gtk::CellRendererPixbuf, Gtk::ListStore, Gtk::TreeIter # r, g, b, a = Pet_Config::get_default_config.get_conf(Pet_Config::SCR_S)[iter[Col_Full_Name].to_sym] # renderer.pixbuf.fill!((r * 255).round * 16777216 + (g * 255).round * 65536 + (b * 255).round * 256 + (a * 255).round) # end That is a problem when set_cell_data_func is not available :-( And here: class Properties_Widget < Gtk::Notebook attr_accessor :main_window # ask for redraw of object if property is changed def initialize(main_window) super() @main_window = main_window @grid_sensitive_spin_button_list = Array.new self.enable_popup = true self.add(w = Box_Widget.new(self))#, :tab_label => 'Box') self.set_tab_reorderable(w, true) So I am not allowed to set the tab_label this way any more. What is the strategy to find out how to do it now? In the last years, I did it mostly by guessing, which can take really much time. That is indeed much more trouble than expected. But what can we do? GTK 3.16 is what people will use on Linux in these days, and that gives crashes with ruby-gnome2.2.5. Best regards, Stefan Salewski |