[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: PATCH - Image loading for about box
From: Neil Stevens <neil () qualityassistant ! com>
Date: 2001-05-13 21:21:24
[Download RAW message or body]
It seems to me that using the global image loading setting is a good
idea for messages, but it's a bad idea for the About message.
With image loading off, the About message is ugly, defeating its
purpose. Here's a patch to turn on image loading for the About, but
preserve the user's setting for everything else.
--
Neil Stevens
neil@qualityassistant.com
keyserver search.keyserver.net
Fingerprint 86EA ECD4 F258 FB1B D88F 9136 4F49 90F8 CD3E 5C1C
["kmail-imageloading" (text/x-c++)]
Index: kmreaderwin.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmreaderwin.cpp,v
retrieving revision 1.279
diff -u -r1.279 kmreaderwin.cpp
--- kmreaderwin.cpp 2001/05/11 05:37:49 1.279
+++ kmreaderwin.cpp 2001/05/13 21:15:15
@@ -307,6 +307,8 @@
mViewer->enableMetaRefresh(false);
mViewer->widget()->resize(width()-16, height()-110);
mViewer->setURLCursor(KCursor::handCursor());
+ // Save the user's image loading setting
+ mViewerImages = mViewer->autoloadImages();
// Espen 2000-05-14: Getting rid of thick ugly frames
mViewer->view()->setLineWidth(0);
@@ -418,6 +420,8 @@
QString location = locate("data", "kmail/about/main.html");
QString content = kFileToString(location);
mViewer->closeURL();
+ // Override the user's image loading setting for the about page
+ mViewer->setAutoloadImages(true);
mViewer->begin(location);
QTextCodec *codec =
QTextCodec::codecForName(KGlobal::locale()->charset());
if (codec) mViewer->setCharset(codec->name(), true);
@@ -499,6 +503,8 @@
else
{
mViewer->closeURL();
+ // Use the user's image loading setting for messages
+ mViewer->setAutoloadImages(mViewerImages);
mViewer->begin( KURL( "file:/" ) );
mViewer->write("<html><body" +
QString(" bgcolor=\"#%1\"").arg(colorToString(c4)));
Index: kmreaderwin.h
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmreaderwin.h,v
retrieving revision 1.72
diff -u -r1.72 kmreaderwin.h
--- kmreaderwin.h 2001/04/29 20:27:25 1.72
+++ kmreaderwin.h 2001/05/13 21:15:16
@@ -254,6 +254,7 @@
QTextCodec *mCodec;
bool mAutoDetectEncoding;
bool mMsgDisplay;
+ bool mViewerImages;
int fntSize;
QString mBodyFamily;
_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic