[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/src prefs.c,1.17,1.18 gtk_eb_html.c,1.5,1.6
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/src prefs.c,1.17,1.18 gtk_eb_html.c,1.5,1.6 |
Date: |
Fri, 17 Jan 2003 15:03:02 -0500 |
Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv22993/src
Modified Files:
prefs.c gtk_eb_html.c
Log Message:
Sorted out fonts strangenesses and bugs
Index: prefs.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/prefs.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- prefs.c 16 Jan 2003 13:59:42 -0000 1.17
+++ prefs.c 17 Jan 2003 20:02:59 -0000 1.18
@@ -232,11 +232,8 @@
static const gint length_contact_window_default = 256;
static const gint width_contact_window_default = 150;
-#ifdef HAVE_LIBXFT
-static const gint font_size_def = 5;
-#else
-static const gint font_size_def = 2;
-#endif
+static const gint font_size_def = 4;
+
static gint length_contact_window_old = 0;
static gint do_login_on_startup = 0;
@@ -627,13 +624,8 @@
static gint do_ignore_unknown = 0;
static gint do_ignore_unknown_old = 0;
-#ifdef HAVE_LIBXFT
-static gint font_size_old = 5;
-static gint font_size = 5;
-#else
-static gint font_size_old = 2;
-static gint font_size = 2;
-#endif
+static gint font_size_old = 4;
+static gint font_size = 4;
static gint do_multi_line = 1;
static gint do_multi_line_old = 1;
@@ -811,11 +803,8 @@
gtk_widget_show(label);
font_size_entry = gtk_entry_new();
-#ifdef HAVE_LIBXFT
- g_snprintf(buff, 10, "%d",
iGetLocalPref("FontSize")==0?5:iGetLocalPref("FontSize"));
-#else
- g_snprintf(buff, 10, "%d",
iGetLocalPref("FontSize")==0?2:iGetLocalPref("FontSize"));
-#endif
+ g_snprintf(buff, 10, "%d",
iGetLocalPref("FontSize")==0?4:iGetLocalPref("FontSize"));
+
gtk_entry_set_text(GTK_ENTRY(font_size_entry), buff);
gtk_box_pack_start(GTK_BOX(hbox), font_size_entry,
FALSE, FALSE, 0);
@@ -866,17 +855,10 @@
fprintf(fp,"do_send_typing_notify=%d\n", do_send_typing_notify);
fprintf(fp,"do_smiley=%d\n", do_smiley);
fprintf(fp,"do_escape_close=%d\n", do_escape_close);
- if (font_size_entry != NULL)
+ if (font_size_entry != NULL) {
ptr = gtk_entry_get_text(GTK_ENTRY(font_size_entry));
- if (!ptr)
-#ifdef HAVE_LIBXFT
- font_size = 5;
-#else
- font_size = 2;
-#endif
- else
font_size = atoi(ptr);
-
+ }
fprintf(fp,"FontSize=%d\n", font_size);
iSetLocalPref("FontSize",font_size);
fprintf(fp,"do_ignore_fore=%d\n", do_ignore_fore);
Index: gtk_eb_html.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/gtk_eb_html.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- gtk_eb_html.c 16 Jan 2003 13:11:01 -0000 1.5
+++ gtk_eb_html.c 17 Jan 2003 20:02:59 -0000 1.6
@@ -61,7 +61,7 @@
#ifndef HAVE_LIBXFT
size = iGetLocalPref("FontSize") + 2 + (size*2);
#else
- size = iGetLocalPref("FontSize") + (size*2);
+ size = iGetLocalPref("FontSize") + 2 + (size*2);
#endif
if (size > 60)
@@ -182,10 +182,12 @@
int size2 = 0;
size2 = _adjust_font_metrics(size);
sprintf(buff, "%d-*-*-*-*-*-*-*", size2);
+ printf("set size to %d\n",size2);
}
else
{
sprintf(buff, "*-%d-*-*-*-*-*-*", (ptsize+
iGetLocalPref("FontSize") -6)*10);
+ printf("set size to %d\n",(ptsize+
iGetLocalPref("FontSize") -6)*10);
}
strcat( font_name, buff );
@@ -249,7 +251,7 @@
}
else
{
- int size2 = ptsize+(iGetLocalPref("FontSize")-6);
+ int size2 = ptsize+(iGetLocalPref("FontSize")-3);
char buff[256] = "";
sprintf(buff, "-%d", size2);
strcat(font_name, buff);
@@ -465,6 +467,7 @@
int i = 0;
#ifndef HAVE_LIBXFT
GdkFont * font = NULL;
+ GdkFont * previousfont = NULL;
#else
XftFont * font = NULL;
#endif
@@ -495,11 +498,12 @@
memcpy(fs->fore, >K_WIDGET (widget)->style->fg[0],
sizeof(GdkColor));
-//#ifdef HAVE_LIBXFT
font = _getfont(fs->font_name, font_bold, font_italic,
fs->font_size, fs->font_ptsize);
-//#endif
-
+#ifndef HAVE_LIBXFT
+ previousfont = _getfont(fs->font_name, font_bold, font_italic,
+ fs->font_size, fs->font_ptsize);
+#endif
/*
* Since the first thing in a split list may or may not be starting
with a
@@ -707,7 +711,7 @@
else
{
#ifndef HAVE_LIBXFT
- font = NULL;
+ font = previousfont;
#endif
}
}
@@ -865,7 +869,7 @@
else
{
#ifndef HAVE_LIBXFT
- font = NULL;
+ font = previousfont;
#endif
}
}
@@ -880,7 +884,7 @@
else
{
#ifndef HAVE_LIBXFT
- font = NULL;
+ font = previousfont;
#endif
}
@@ -920,7 +924,7 @@
else
{
#ifndef HAVE_LIBXFT
- font = NULL;
+ font = previousfont;
#endif
}
}
@@ -935,7 +939,7 @@
else
{
#ifndef HAVE_LIBXFT
- font = NULL;
+ font = previousfont;
#endif
}
}
@@ -950,7 +954,7 @@
else
{
#ifndef HAVE_LIBXFT
- font = NULL;
+ font = previousfont;
#endif
}
}
@@ -1016,7 +1020,7 @@
else
{
#ifndef HAVE_LIBXFT
- font = NULL;
+ font = previousfont;
#endif
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/src prefs.c,1.17,1.18 gtk_eb_html.c,1.5,1.6,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm configure.in,1.143,1.144
- Next by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.147,1.148 configure.in,1.144,1.145
- Previous by thread:
[Ayttm-commits] CVS: ayttm configure.in,1.143,1.144
- Next by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.147,1.148 configure.in,1.144,1.145
- Index(es):