[PATCH] font selection on konq/e cvs

YamaKen konq-e@mail.kde.org
Mon, 02 Dec 2002 11:39:10 +0900 (JST)


----Next_Part(Mon_Dec__2_11:39:10_2002_704)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi developers,
I'm enjoying recent interesting cvs changes on konq/e, but a
problem came with.

Font selection by preferences window is not worked. Once
preferences window is closed (by pressing "OK"), konq/e forgets
selected font. Nothing is affected to displayed html. Default
font (helvetica) is remaining in the "Appearance" tab when open
preferences again.

This caused by miscommunication between konq/e and khtml. Konq/e
saves the font settings to konq-embedrc by Preferences::save(),
but khtml is read font names from khtmlrc *only*, although other
font settings (i.e. font sizes) is overridden by konq-embedrc.

I believed that Preferences::save() should rolled back to save
preferences to khtmlrc. A patch attached this mail worked so.


Tested environment

kdelibs KDE_2_2_BRANCH
kdenox KONQE_1_0_BRANCH
Qtopia 1.5.0
Qt/Embedded 2.3.3
Zaurus SL-5500
i686-linux

Regards,
-------------------------------
YamaKen  yamaken@bp.iij4u.or.jp

----Next_Part(Mon_Dec__2_11:39:10_2002_704)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="preferencesimpl.cc.diff"

Index: preferencesimpl.cc
===================================================================
RCS file: /home/kde/kdenox/konq-embed/src/preferencesimpl.cc,v
retrieving revision 1.11.2.7
diff -u -r1.11.2.7 preferencesimpl.cc
--- preferencesimpl.cc	26 Nov 2002 11:30:25 -0000	1.11.2.7
+++ preferencesimpl.cc	2 Dec 2002 02:32:16 -0000
@@ -163,7 +163,6 @@
 {
     KConfig *global = KGlobal::config();
 
-#if 0
     KConfig khtmlrc( "khtmlrc" );
     khtmlrc.setGroup( "HTML Settings" );
 
@@ -175,20 +174,6 @@
     khtmlrc.writeEntry( "FantasyFont", defaultFont->currentText() );
 
     khtmlrc.writeEntry( "MinimumFontSize", minimumFontSize->value() );
-#else
-    // for some weird reason khtmlrc is not taking precedence
-    // so we modify globals
-    global->setGroup( "HTML Settings" );
-    global->writeEntry( "StandardFont", defaultFont->currentText() );
-/*
-    global->writeEntry( "FixedFont", defaultFont->currentText() );
-    global->writeEntry( "SerifFont", defaultFont->currentText() );
-    global->writeEntry( "SansSerifFont", defaultFont->currentText() );
-    global->writeEntry( "CursiveFont", defaultFont->currentText() );
-    global->writeEntry( "FantasyFont", defaultFont->currentText() );
-*/
-    global->writeEntry( "MinimumFontSize", minimumFontSize->value() );
-#endif
     global->setGroup( "HTML Settings" );
     // we write this property not into khtmlrc but into konq-embedrc
     // because we have a default in ipkg/konq-embedrc.in

----Next_Part(Mon_Dec__2_11:39:10_2002_704)----