[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: [Fwd: KFM Url completion patch...]
From: Stephan Kulow <coolo () kde ! org>
Date: 1999-01-27 10:19:40
[Download RAW message or body]
Hi!
What do you think? I guess kfm is becoming more and
more a webbrowser than a file manager, but would it
work currently to type into it "homeworks" and it changes
to homeworks? I wouldn't want to see it going to http://homeworks
then.
Greetings, Stephan
--
As long as Linux remains a religion of freeware fanatics,
Microsoft have nothing to worry about.
By Michael Surkan, PC Week Online
[Attachment #3 (message/rfc822)]
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
Please find attached a patch for kde1.1pre2 which makes the URL completion
just a little bit smarter. The old url completion code makes the
assumption only that if I put a www. on the front, I want to go to a web
page via httpd. This patch instead assumes that if you don't have a / on
the front, or (and this is a key part) there is no ":" in the url, that in
fact we are typing a web site and so prepends http:// to the front.
Note: I originally wrote this patch for kde1.1pre1 but hadn't sent it in.
In order to make this diff, I hand pasted the code into the kde1.1pre2
kfmgui code and then did a diff. Please let me know if you have any
questions or problems with this code.
Jiva DeVoe
["kfmgui.diff" (TEXT/PLAIN)]
--- kfmgui.cpp Fri Jan 22 07:02:24 1999
+++ kfmnew.cpp Tue Jan 26 22:45:45 1999
@@ -749,6 +749,11 @@
else if (url.find("ftp.") == 0)
url.prepend("ftp://");
+ // if the url does not begin with a / and it has no : in it (indicating \
it's not a proper URL, + // then make it a proper URL by appending an \
http:// to the front of it. (Jiva 01/26/98) + else if(!(url.find("/")==0) \
&& (url.find(":") < 0)) + url.prepend("http://");
+
KURL u( url.data() );
if ( u.isMalformed() )
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic