Re: [gtkmm] Gtk::RC



On Thu, 2002-06-20 at 10:18, Andrew E. Makeev wrote:
> There is some trouble with Gtk::RC.
> 
> As described in GTK+ 2.0 gtk_rc_parse (<filename>) is supposed to be
> called before gtk_init (). But using GTKMM you can't do it before
> Gtk::Main(), cuz it fails with:
> 
> (process:17862): GLib-GObject-CRITICAL **:
> gtype.c:1807:g_type_register_static(): initialization assertion failed,
> use g_type_init() prior to this function
> 
> (process:17862): GLib-GObject-CRITICAL **: file gobject.c: line 587
> (g_object_new): assertion `G_TYPE_IS_OBJECT (object_type)' failed
> Segmentation fault (core dumped)
> 
> So, I had to do it such way:
> 
> Gtk::Main(...);
> Gtk::RC rc_style(rcfile);
> Gtk::RC::reparse_all();
> 
> I guess, you should implement Gtk::RC::parse(rcfile) static method to
> allow it to be called before Gtk::Main.

Actually all of the methods are static, so I don't see the purpose of a
constructor. Maybe they should all be functions in the Gtk::RC
namespace.

-- 
Murray Cumming
murrayc usa net
www.murrayc.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]