Hello all,
I have a strange problem,
I'm developing an aplication using gtk1.2 + Debian 3.0, this program read an
gtk-resource file to setup the fonts, in the recent past it worked, but now it doesn't
work anymore, it load the default gnome (or whatever) fonts.
The only "radical" change that I made in my system was that I installed all fonts by
apt-get install xfonts.
I verified that these fonts in rc file realy exists in my system, I don't know what to
do.
I put some pieces of my code and RC file together to see if have some error that I
can't see.
My RC file (defaults.rc) :
style "fontpadrao"
{
font = "-misc-fixed-bold-r-normal-*-*-140-*-*-c-*-iso8859-1"
}
widget "*GtkWindow*" style "fontpadrao"
style "fontlabel"
{
fg[NORMAL] = {0.0, 0.0, 0.0}
font = "-b&h-lucidasans-medium-r-normal-*-*-560-*-*-p-*-iso8859-1"
}
widget "*label_producao" style "fontlabel"
widget "*label_veloc" style "fontlabel"
widget "*label_pilha" style "fontlabel"
style "fonttempo"
{
font = "-b&h-lucida-bold-r-normal-*-*-140-*-*-p-*-iso8859-1"
}
widget "*label_funcionando" style "fonttempo"
widget "*label_parada" style "fonttempo"
widget "*label_dia_inicio" style "fonttempo"
widget "*label_hora_inicio" style "fonttempo"
The function that I use to load rc file :
/*
***************************************************************************************************
int
carrega_gtk_rc(char *rc_file)
Carrega o arquivo rc (definicoes padroes) in Portuguese, sorry !
***************************************************************************************************
*/
int
carrega_gtk_rc(char *rc_file)
{
char rc_pathfile[256];
set_path_file(rc_file, "/.ihm/", "HOME", (char *)rc_pathfile);
printf("rc_pathfile = %s\n", rc_pathfile);
gtk_rc_parse((char *)rc_pathfile);
return 0;
}
/*
***************************************************************************************************
int
set_path_file(char *arquivo_in, char *prefix, char *envvar, char *arquivo_out)
Monta o caminho para o arquivo arquivo_in no diretorio prefix com caminho raiz dado
pela variavel de
ambiente envvar;
Saida em arquivo_out
***************************************************************************************************
*/
int
set_path_file(char *arquivo_in, char *prefix, char *envvar, char *arquivo_out)
{
char *environ = NULL;
int use_env = 1;
memset(arquivo_out, 0, sizeof(arquivo_out));
if(prefix == NULL)
strcpy(prefix, "");
if(envvar != NULL)
{
if((environ = getenv(envvar)) == NULL)
use_env = 0;
}
else
use_env = 0;
if(!use_env)
strcpy(arquivo_out, prefix);
else
{
strcpy(arquivo_out, environ);
strcat(arquivo_out, prefix);
}
strcat(arquivo_out, arquivo_in);
return 0;
}
and in main function I load this rc file :
.
.
.
gtk_set_locale();
carrega_gtk_rc("defaults.rc");
/*
home = getenv("IHM_PATH");
strncpy((char *)ihm_path, home, strlen(home));
strcat((char *)ihm_path, "/ihm_princ/");
*/
gnome_init ("ihm_princ", VERSION, argc, argv);
.
.
.
--
Flavio Alberto Lopes Soares
[EMAIL PROTECTED]
Linux User n. 257636
MAQPLAS IND�STRIA E COM�RCIO DE M�QUINAS LTDA.
www.maqplas.com.br
[EMAIL PROTECTED]
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list