Commit 53916d2f authored by Dawit Alemayehu's avatar Dawit Alemayehu
Browse files

- Make Home URL configurable per profile. The UI changes will be commited soon.

svn path=/trunk/kdebase/konqueror/; revision=348158
parent c5873553
......@@ -433,6 +433,7 @@ void KonqMainWindow::openFilteredURL( const QString & _url, bool inNewTab )
KURL filteredURL ( KonqMisc::konqFilteredURL( this, url, m_currentDir ) );
kdDebug(1202) << "_url " << _url << " filtered into " << filteredURL.prettyURL() << endl;
if ( filteredURL.isEmpty() ) // initially empty, or error (e.g. ~unknown_user)
return;
......@@ -547,7 +548,8 @@ void KonqMainWindow::openURL( KonqView *_view, const KURL &_url,
}
kdDebug(1202) << "trying openView for " << url << " (serviceType " << serviceType << ")" << endl;
if ( ( !serviceType.isEmpty() && serviceType != "application/octet-stream") || url.url() == "about:konqueror" || url.url() == "about:plugins")
if ( ( !serviceType.isEmpty() && serviceType != "application/octet-stream") ||
url.url() == "about:konqueror" || url.url() == "about:plugins" )
{
KService::Ptr offer = KServiceTypeProfile::preferredService(serviceType, "Application");
// If the associated app is konqueror itself, then make sure we try to embed before bailing out.
......@@ -1729,7 +1731,12 @@ void KonqMainWindow::slotReloadPopup()
void KonqMainWindow::slotHome()
{
openURL( 0L, KURL( KonqMisc::konqFilteredURL( this, KonqFMSettings::settings()->homeURL() ) ) );
QString homeURL = m_pViewManager->profileHomeURL();
if (homeURL.isEmpty())
homeURL = KonqFMSettings::settings()->homeURL();
openURL( 0L, KURL( KonqMisc::konqFilteredURL( this, homeURL ) ) );
}
void KonqMainWindow::slotGoApplications()
......
......@@ -1143,6 +1143,8 @@ void KonqViewManager::loadViewProfile( KConfig &cfg, const QString & filename,
m_currentProfile = filename;
m_currentProfileText = cfg.readPathEntry("Name",filename);
m_profileHomeURL = cfg.readEntry("HomeURL", QString::null);
m_pMainWindow->currentProfileChanged();
KURL defaultURL;
if ( m_pMainWindow->currentView() )
......@@ -1667,7 +1669,6 @@ void KonqViewManager::slotProfileActivated( int id )
break;
}
}
}
void KonqViewManager::slotProfileListAboutToShow()
......
......@@ -274,7 +274,10 @@ public:
#endif
void setLoading( KonqView *view, bool loading );
void showHTML(bool b);
void showHTML(bool b);
QString profileHomeURL() const { return m_profileHomeURL; }
protected slots:
void emitActivePartChanged();
......@@ -347,6 +350,7 @@ private:
bool m_bLoadingProfile;
QString m_currentProfile;
QString m_currentProfileText;
QString m_profileHomeURL;
QMap<QString, QString> m_mapProfileNames;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment