forked from e16/e16
1
0
Fork 0

Remove theme config stuff in font alias files.

SVN revision: 46172
This commit is contained in:
Kim Woelders 2010-02-14 19:04:09 +00:00
parent 84cedde03c
commit c692f63aae
3 changed files with 19 additions and 24 deletions

View File

@ -1,7 +1,4 @@
/* Pango font example */
#include <definitions>
__E_CFG_VERSION 1
__FONTS __BGN
# Default Pango font configuration
font-default "pango:sans bold 8"
@ -29,5 +26,3 @@ font-menu "pango:sans 8"
font-pager "pango:sans bold 8"
font-tooltip "pango:sans bold 8"
__END

View File

@ -1,7 +1,4 @@
/* Xft font example */
#include <definitions>
__E_CFG_VERSION 1
__FONTS __BGN
# Default Xft font configuration
font-default "xft:sans-8:bold"
@ -29,5 +26,3 @@ font-menu "xft:sans-8"
font-pager "xft:sans-8:bold"
font-tooltip "xft:sans-8:bold"
__END

View File

@ -22,6 +22,7 @@
*/
#include "E.h"
#include "e16-ecore_list.h"
#include "parse.h"
typedef struct {
char *name;
@ -89,23 +90,27 @@ static int
_FontConfigLoad(FILE * fs)
{
int err = 0;
char s[FILEPATH_LEN_MAX];
char s1[128], *p2;
int i2;
char s[FILEPATH_LEN_MAX], *ss, *name, *font;
int len;
while (GetLine(s, sizeof(s), fs))
for (;;)
{
s1[0] = '\0';
i2 = 0;
sscanf(s, "%120s %n", s1, &i2);
if (i2 <= 0)
ss = fgets(s, sizeof(s), fs);
if (!ss)
break;
len = strcspn(s, "#\r\n");
if (len <= 0)
continue;
p2 = s + i2;
if (!p2[0])
name = font = NULL;
parse(s, "%S%S", &name, &font);
if (!name || !font)
continue;
if (strncmp(s, "font-", 5))
if (strncmp(name, "font-", 5))
continue;
FontAliasCreate(s1, p2);
FontAliasCreate(name, font);
}
return err;