Gtk::RC class & rc files problem
- From: "Andrew E. Makeev" <andrew solvo ru>
- To: gtmm-main <gtkmm-main lists sourceforge net>, gtk-list gnome org
- Subject: Gtk::RC class & rc files problem
- Date: Thu, 20 Jun 2002 13:18:30 +0400
Good day,
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.
===========================================================================
This part is more GTK+2.0 specific, because both gtk-demo-s worked same
way
===========================================================================
When I turned off KDE option to apply theme to non KDE apps I got
everything I would except for font that I specified in rcfile (and for
cursor foreground if you've seen GTK+2.0 report about that). Then I had
to change fonts manually for every widget I'd create. Terrible boring!
Probably, I could change default style before creating all widgets, if I
knew how to.
I tried to use my rcfile as .gtkrc.
It won't use fg,bg,font specification, only pixmaps worked.
Where is the problem? Is it WM related? Even if so, how to avoid it on
Linux KDE?
-Andrew
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]