Bug 319854 - second window search settings are not restored
Summary: second window search settings are not restored
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: search (show other bugs)
Version: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-15 02:59 UTC by edA-qa mort-ora-y
Modified: 2013-07-16 15:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description edA-qa mort-ora-y 2013-05-15 02:59:37 UTC
The search settings fields in a second window are not being properly restored when that window is recreated.

This may be related to bug 319761. This series of issues relating to search settings becomes frustrating for a user as it appears the settings are continually lost. Since a user will eventually close windows in a different order it all but guarantees search settings are eventually lost.

Reproducible: Always

Steps to Reproduce:
1. Open Kate
2. Open Search, enter a path/filter and perform a search
3. Open new window (I'd expect the existing search settings to be taken here, but perhaps this is a different issue)
4. Open search, enter a path/filter and perform a search
5. Close second window
6. Open new window
7. Open search and all settings are blank again


Expected Results:  
Perhaps it'd be best if the search components just shared their state between all windows. I can't think of a good use-case where you'd want to have distinct settings per window. That is, the current settings are different, but the history in the dropdowns (path, filters, etc.) is the same.

NOTE: It appears that old configuration date in the katerc files relating to search may affect the default state in new windows. I removed any mention of search from the share/config/katerc files.
Comment 1 Kåre Särs 2013-05-15 06:55:05 UTC
Hmm.. I don't usually use the View->New Window, so I had not noticed this behaviour... I Have to investigate this...
Comment 2 Kåre Särs 2013-05-17 18:26:19 UTC
I thought I could do something in the plugin, but this is a session config problem. 

At least for the search plugin, the new window gets readSessionConfig() for the default session in stead of the session of the "parent" MainWindow. The groupPrefix contains an incremented MainWindow number. All this means that we do not get the config of the wanted session.

On the closing window front, writeSessionConfig() is not called at all for the second window...

I'm not sure how this should be fixed...
Comment 3 Kåre Särs 2013-07-16 15:35:09 UTC
Git commit efb1b383250f032fa85bb655a14530c6b2193bb7 by Kåre Särs.
Committed on 16/07/2013 at 15:26.
Pushed by sars into branch 'master'.

Fix Session config for plugins in new MainWindows
REVIEW: 110731

M  +1    -1    kate/app/katemainwindow.cpp
M  +1    -2    kate/app/katepluginmanager.cpp

http://commits.kde.org/kate/efb1b383250f032fa85bb655a14530c6b2193bb7