[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Fwd: libkcm_style patch
From: Martin Jones <mrjones () bigpond ! net ! au>
Date: 2001-07-29 7:57:16
[Download RAW message or body]
---------- Forwarded Message ----------
Subject: libkcm_style patch
Date: Tue, 24 Jul 2001 18:32:16 +0300
From: Ilya Konstantinov <future@shiny.co.il>
To: donohoe@kde.org, mjones@powerup.com.au, g.t.jansen@stud.tue.nl
Hi,
I've added a feature which helps resolve a bug in Netscape (or is it
Motif?), when using the "use style for non-KDE apps" functionality of
KDE. When the KDE font is an iso10646-1 one, it will try to apply that
font to Netscape's fontLists and cause Netscape to fail to display
menus. This patch adds a FONTLIST_8BIT macro, which'll have a Latin-1
font if the original font was a Unicode one, and updated Netscape.ad
accordingly.
Also, I removed the bogus connects in general.cpp, which were leading
to a non-existant slot.
-------------------------------------------------------
["Attachment: 1" (text/plain)]
Index: krdb.cpp
===================================================================
RCS file: /home/kde/kdebase/kcontrol/display/krdb.cpp,v
retrieving revision 1.7
diff -u -r1.7 krdb.cpp
--- kdebase/kcontrol/display/krdb.cpp 2001/04/06 20:01:37 1.7
+++ kdebase/kcontrol/display/krdb.cpp 2001/07/24 12:14:52
@@ -36,7 +36,7 @@
// -----------------------------------------------------------------------------
-static QString fontString( QFont rFont, FontStyle style )
+static QString fontString( QFont rFont, FontStyle style, bool force8Bit = false )
{
switch(style) {
@@ -52,11 +52,13 @@
case Normal:
break;
}
+
+ if (force8Bit && (rFont.charSet() == QFont::Unicode))
+ rFont.setCharSet(QFont::Latin1);
return rFont.rawName();
}
-
// -----------------------------------------------------------------------------
static void addColorDef(QString& s, const char* n, const QColor& col)
@@ -72,16 +74,15 @@
// -----------------------------------------------------------------------------
-static void addFontDef(QString& s, const char* n, const QFont& f, FontStyle fs)
+static void addFontDef(QString& s, const char* n, const QFont& f, FontStyle fs, bool \
force8Bit = false) {
QString tmp;
- tmp.sprintf("#define %s %s\n", n, fontString(f, fs).latin1());
+ tmp.sprintf("#define %s %s\n", n, fontString(f, fs, force8Bit).latin1());
s += tmp;
}
-
// -----------------------------------------------------------------------------
static void copyFile(QFile& tmp, QString const& filename)
@@ -190,10 +191,15 @@
addFontDef(preproc, "BOLD_FONT" , KGlobalSettings::generalFont(), Bold);
addFontDef(preproc, "ITALIC_FONT" , KGlobalSettings::generalFont(), \
Italic); addFontDef(preproc, "FIXED_FONT" , KGlobalSettings::fixedFont(), \
Fixed);
- // TITLE_FONT...
-
// Fontlist
preproc += "#define FONTLIST FONT,BOLD_FONT=BOLD,ITALIC_FONT=ITALIC\n";
+
+ addFontDef(preproc, "FONT_8BIT" , KGlobalSettings::generalFont(), \
Normal, true); + addFontDef(preproc, "BOLD_FONT_8BIT" , \
KGlobalSettings::generalFont(), Bold, true); + addFontDef(preproc, \
"ITALIC_FONT_8BIT" , KGlobalSettings::generalFont(), Italic, true); + \
addFontDef(preproc, "FIXED_FONT_8BIT" , KGlobalSettings::fixedFont(), Fixed, \
true); + // Fontlist
+ preproc += "#define FONTLIST_8BIT \
FONT_8BIT,BOLD_FONT_8BIT=BOLD,ITALIC_FONT_8BIT=ITALIC\n";
//---------------------------------------------------------------
Index: general.cpp
===================================================================
RCS file: /home/kde/kdebase/kcontrol/display/general.cpp,v
retrieving revision 1.135
diff -u -r1.135 general.cpp
--- kdebase/kcontrol/display/general.cpp 2001/07/01 10:14:42 1.135
+++ kdebase/kcontrol/display/general.cpp 2001/07/24 12:14:55
@@ -428,11 +428,8 @@
QWhatsThis::add( effAnimateCombo, i18n( "If this option is selected, combo boxes \
are animated to grow to their full size.") );
connect( effPlainMenu, SIGNAL( clicked() ), SLOT( slotChangeEffectStyle() ) ) ;
- connect( effPlainMenu, SIGNAL( toggled(bool) ), SLOT( toggleButtonState(bool) ) \
);
connect( effFadeMenu, SIGNAL( clicked() ), SLOT( slotChangeEffectStyle() ) ) ;
- connect(effFadeMenu , SIGNAL( toggled(bool) ), SLOT( toggleButtonState(bool) ) \
);
connect( effAnimateMenu, SIGNAL( clicked() ), SLOT( slotChangeEffectStyle() ) );
- connect(effAnimateMenu , SIGNAL( toggled(bool) ), SLOT( toggleButtonState(bool) \
) );
Index: ad/Netscape.ad
===================================================================
RCS file: /home/kde/kdebase/kcontrol/display/ad/Netscape.ad,v
retrieving revision 1.7
diff -u -r1.7 Netscape.ad
--- kdebase/kcontrol/display/ad/Netscape.ad 1999/10/29 15:51:50 1.7
+++ kdebase/kcontrol/display/ad/Netscape.ad 2001/07/24 12:14:55
@@ -12,7 +12,6 @@
Netscape*urlText*background: WINDOW_BACKGROUND
Netscape*XmLGrid.foreground: WINDOW_FOREGROUND
Netscape*XmLGrid.background: BACKGROUND
-Netscape*XmLGrid*fontList: FONTLIST
Netscape*urlLabel*foreground: WINDOW_FOREGROUND
Netscape*urlLabel*background: WINDOW_BACKGROUND
Netscape*thermo.slider.foreground: SELECT_BACKGROUND
@@ -24,4 +23,4 @@
Netscape*highlightColor: BACKGROUND
Netscape*selectForeground: SELECT_FOREGROUND
Netscape*selectBackground: SELECT_BACKGROUND
-Netscape*banner*folderDropdown*fontList: FONTLIST
+Netscape*fontList: FONTLIST_8BIT
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic