[Freeciv-Dev] Patch for messages window font problem
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I am attaching a patch for the problem I reported before, namely inability
to change font for the messages window. What this does - it uses the
default style of the messages list (if available) and modifies it instead
of creating a new one. Just in case I am submitting two copies, one below,
another attached.
Some other things I noticed:
The makefile copies the default resource file somewhere, in my case
/usr/local/share/freeciv/freeciv.rc. It is never used, though. Instead the
code checks whether there is a $HOME/freeciv.rc file, and reads that. If
it's not there it falls back on pre-compiled resources. I'll check if I
can change that. Should I?
Currently, freeciv.rc does not seem to control much. The only way I could
change relevant fonts, is by putting a line
widget "*" style "whatever"
where "whatever" defines the relevant font. The explicitly defined
"widget" lines do not seem to matter all that much. The only one that was
working properly was help_text, I think.
Dmitriy
--- messagewin.c.orig Tue Aug 8 18:20:22 2000
+++ messagewin.c Tue Aug 8 20:33:17 2000
@@ -178,7 +178,11 @@
gtk_signal_connect(GTK_OBJECT(meswin_popcity_command), "clicked",
GTK_SIGNAL_FUNC(meswin_popcity_callback), NULL);
- meswin_visited_style = gtk_style_new ();
+ if (gtk_rc_get_style(meswin_list)!=NULL)
+ meswin_visited_style = gtk_style_copy(gtk_rc_get_style(meswin_list));
+ else
+ meswin_visited_style = gtk_style_new();
+
meswin_visited_style->fg[GTK_STATE_NORMAL]=
*colors_standard[COLOR_STD_RACE8];
meswin_visited_style->fg[GTK_STATE_SELECTED]=
@@ -186,7 +190,7 @@
meswin_visited_style->bg[GTK_STATE_SELECTED]=
*colors_standard[COLOR_STD_RACE13];
- meswin_not_visited_style = gtk_style_new ();
+ meswin_not_visited_style = gtk_style_copy(meswin_visited_style);
meswin_not_visited_style->fg[GTK_STATE_NORMAL]=
*colors_standard[COLOR_STD_OCEAN];
meswin_not_visited_style->fg[GTK_STATE_SELECTED]=
patch
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Patch for messages window font problem,
Dmitriy Genzel <=
|
|