Konqueror auto-saving window size

Jonathan Marten jjm2 at keelhaul.demon.co.uk
Sat Jan 16 12:47:29 GMT 2010


Konqueror in KDE4 always seems to save the size (and toolbar settings)
of the last window closed to its selected profile - normally
"webbrowsing" for that.  IMHO, and that of bug 200907 submitter, this
is rather annoying - resizing a window to fit a particular web page
doesn't mean that I want all of my browser windows to open at that
size from then on.

This didn't happen in KDE3, the window size was saved (optionally)
when the view profile was explicitly saved but not just if the window
was resized.

So, my 2 questions: (a) was this an intentional design change for
KDE4, and if so can anyone remember what the rationale for it was; (b)
if this is considered undesirable behaviour, is the patch below
acceptable to fix it?

Regards, Jonathan


--------------------------------------------------------------------------
Index: kdebase/apps/konqueror/src/konqviewmanager.cpp
===================================================================
--- kdebase/apps/konqueror/src/konqviewmanager.cpp	(revision 1075199)
+++ kdebase/apps/konqueror/src/konqviewmanager.cpp	(working copy)
@@ -867,7 +867,11 @@
     if  (!profileName.isEmpty())
         profileGroup.writePathEntry("Name", profileName);
 
+    // Save window size just for this operation, reset the setting afterwards.
+    // See also KonqMainWindow::setProfileConfig()
+    m_pMainWindow->setAutoSaveSettings(m_pMainWindow->autoSaveGroup(), true);
     saveViewProfileToGroup(profileGroup, options);
+    m_pMainWindow->setAutoSaveSettings(m_pMainWindow->autoSaveGroup(), false);
 
     _cfg.sync();
 }
Index: kdebase/apps/konqueror/src/konqmainwindow.cpp
===================================================================
--- kdebase/apps/konqueror/src/konqmainwindow.cpp	(revision 1075199)
+++ kdebase/apps/konqueror/src/konqmainwindow.cpp	(working copy)
@@ -4225,8 +4225,10 @@
 
 void KonqMainWindow::setProfileConfig(const KConfigGroup& cfg)
 {
-    // Read toolbar settings and window size from profile, and autosave into that profile from now on
-    setAutoSaveSettings(cfg);
+    // Read toolbar settings and window size from profile, and
+    // autosave into that profile (except for window size) from now on.
+    // See also KonqViewManager::saveViewProfileToFile()
+    setAutoSaveSettings(cfg, false);
     currentProfileChanged();
 }
 
--------------------------------------------------------------------------

-- 
Jonathan Marten                         http://www.keelhaul.demon.co.uk
Twickenham, UK                          jjm2 at keelhaul.demon.co.uk




More information about the kfm-devel mailing list