[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: MMB opens in new tab
From: Doug Hanley <hanleyman () adelphia ! net>
Date: 2002-07-14 16:22:19
[Download RAW message or body]
Hi,
I was checking out the webcvs logs and I noticed that there was some sign of a
mmb opens in new tab patch coming soon. I'm not sure if you've already done
this, or if you haven't started yet, but I just wanted to tell you that I
have that feature already in my tree, so I guess I'll just show you what I
have right here:
(this function is called in the beginning of both versions of
slotCreateNewWindow, i'm not sure if thats correct)
void KonqMainWindow::createNewTab( const KURL &url, const KParts::URLArgs
&args )
{
bool unknown = false;
KMimeType::Ptr mimeType = KMimeType::findByURL( url );
QString mimeName = mimeType->name();
QString mimeComment = mimeType->comment();
if (mimeName == "application/octet-stream") {
unknown = true;
mimeName = "text/html";
}
KonqView* newView = 0L;
newView = m_pViewManager->addTab( mimeName, mimeComment );
if (newView == 0L) return;
if (unknown) new KonqRun( this, newView, url );
else openURL( newView, url, args );
static_cast<KonqFrameTabs*>(m_pViewManager->docContainer())->showPage(
newView->frame() );
}
I also changed the popup tab code to something very similar to this, because
it fixes a bug where if you open a link to an image from a webpage in a new
tab, and the image is not a local file, it displays the image as text. The
sollution is kind of hacky though.
Also, I though that the options for tabs should go under a "Tabbed Browsing"
tab in the "Web Browsing->Konqueror Browser", because tabbed browsing is used
almost exclusively for web surfing, so this would seem the most intuitive
choice. I also have some code for that in my tree which I am cleaning up
little.
So, if you've whipped up some code for this already, i would love to see it,
so that way we can kind of pool our resources, and come up with the best
sollution.
Thanks!
-- Doug
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic