[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    PATCH - HOME URL and profiles
From:       "Dawit A." <adawit () kde ! org>
Date:       2004-09-18 0:31:09
Message-ID: 200409172031.09950.adawit () kde ! org
[Download RAW message or body]

Hello,

I know this issue has been a point of much discussion as can be seen by a bug 
report with high number of votes and comments (BR# 8333) as well as a recent 
article on the dot that show how to hack around a solution. 

With the attached patch my intention is not to start another long debate, but 
to see if we can easily solve this problem without a need for a hack and 
without breaking the current behavior while at the same time allowing people 
to change what the "HOME" button does per profile. I have actually not coded 
up the GUI changes yet. It is going to be pending the outcome of this 
discussion. I do however have a UI file that shows what the changes to the 
profile config dialog might look like:

http://members.cox.net/kdelists/screenshots/konq-profile-dlg.png
http://members.cox.net/kdelists/uifiles/konq_profiledlg_ui.ui

Any suggestions, comments, feedback, opposition, support, icecream, cake and 
cookies are all welcome...

-- 
Regards,
Dawit A.
"Preach what you practice, practice what you preach"

["home-url.diff" (text/x-diff)]

Index: konq_mainwindow.cc
===================================================================
RCS file: /home/kde/kdebase/konqueror/konq_mainwindow.cc,v
retrieving revision 1.1352
diff -u -p -b -B -w -r1.1352 konq_mainwindow.cc
--- konq_mainwindow.cc	12 Sep 2004 22:02:55 -0000	1.1352
+++ konq_mainwindow.cc	18 Sep 2004 00:08:44 -0000
@@ -433,6 +433,7 @@ void KonqMainWindow::openFilteredURL( co
 
     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 *
   }
 
   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. @@ -1726,7 +1728,19 @@ void KonqMainWindow::slotReloadPopup()
 
 void KonqMainWindow::slotHome()
 {
-  openURL( 0L, KURL( KonqMisc::konqFilteredURL( this, \
KonqFMSettings::settings()->homeURL() ) ) ); +  QString profileName = \
QString::fromLatin1("konqueror/profiles/") + m_pViewManager->currentProfile(); +  \
KSimpleConfig cfg( locate( "data", profileName ), true ); +  cfg.setGroup( "Profile" \
); +  
+  QString homeURL;
+  
+  if ( cfg.readBoolEntry("EnableHomeURL", false) )
+    homeURL = cfg.readEntry("HomeURL", homeURL);
+
+  if (homeURL.isEmpty())
+    homeURL = KonqFMSettings::settings()->homeURL();
+  
+  openURL( 0L, KURL( KonqMisc::konqFilteredURL( this, homeURL ) ) );
 }
 
 void KonqMainWindow::slotGoApplications()



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic