From kfm-devel Sat Jan 16 12:47:29 2010 From: Jonathan Marten Date: Sat, 16 Jan 2010 12:47:29 +0000 To: kfm-devel Subject: Konqueror auto-saving window size Message-Id: X-MARC-Message: https://marc.info/?l=kfm-devel&m=126364608226411 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@keelhaul.demon.co.uk