Bug 139009 - sort the session names just like "recent files"
Summary: sort the session names just like "recent files"
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Unclassified
Component: sessions (show other bugs)
Version: unspecified
Platform: openSUSE RPMs Linux
: NOR wishlist with 1 vote (vote)
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 130631 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-19 14:33 UTC by Maciej Pilichowski
Modified: 2014-01-04 13:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Pilichowski 2006-12-19 14:33:01 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    SuSE RPMs

When you open the session its name should go up to the top, because it is the last used session.
Comment 1 Thomas Friedrichsmeier 2007-12-13 01:10:35 UTC
See also bug #130631 for a related wish.
Comment 2 Dominik Haumann 2010-02-21 00:22:26 UTC
*** Bug 130631 has been marked as a duplicate of this bug. ***
Comment 3 Michal Humpula 2014-01-04 13:11:43 UTC
Git commit 96164b9450b494c6cfd3db52796a1befd2b747d1 by Michal Humpula.
Committed on 02/01/2014 at 22:09.
Pushed by michalhumpula into branch 'frameworks'.

break down the katession.h/.cpp files

Changes:

One class per file. Code is now testable (almost) independently from
the app, so adding bunch of unit tests.

KateSession
 * simple container
 * remove read/writeConfig() in favour of config()
 * move rename method to manager
 * decouple name from filename (manager does the coupling now)
 * hide constructor in favour of factories returning KateSession::Ptr
 * not dependent on KateSessionManager anymore
 * add sorting functions
 * add timestamp (last time the session was saved)

KateSessionManager
 * add activeSession(QString, bool, bool, bool)
 * add activeAnonymousSession()
 * change internal storage from QList to QHash (faster lookups)
 * remove sorting from sessionList() to callers
 * use KDirWatch to monitor session dir (this removes the constant
   updates of m_sessions)

KateSessionsAction
 * add possibility to depency-inject the KateSessionManager
 * sort by modification time (desc)
 * limit to ten items
 * disable action, when there are no sessions

KateSessionChooser
 * guarantee that selectedSession() will be valid, when result is resultOpen or
   resultCopy. This simplifies the KateSessionManager workflow.
Related: bug 319397
FIXED-IN: 5.0

M  +4    -0    autotests/CMakeLists.txt
A  +21   -0    autotests/kate/CMakeLists.txt
A  +169  -0    autotests/kate/session_manager_test.cpp     [License: LGPL (v2)]
A  +53   -0    autotests/kate/session_manager_test.h     [License: LGPL (v2)]
A  +150  -0    autotests/kate/session_test.cpp     [License: LGPL (v2)]
A  +48   -0    autotests/kate/session_test.h     [License: LGPL (v2)]
A  +99   -0    autotests/kate/sessions_action_test.cpp     [License: LGPL (v2)]
A  +46   -0    autotests/kate/sessions_action_test.h     [License: LGPL (v2)]
M  +18   -1    kate/app/CMakeLists.txt
M  +7    -7    kate/app/kateapp.cpp
M  +3    -2    kate/app/kateapp.h
M  +3    -5    kate/app/kateappadaptor.cpp
M  +2    -2    kate/app/kateconfigdialog.cpp
M  +6    -4    kate/app/katemainwindow.cpp
D  +0    -1059 kate/app/katesession.cpp
D  +0    -446  kate/app/katesession.h
M  +3    -3    kate/app/kateviewspace.cpp
A  +129  -0    kate/app/session/katesession.cpp     [License: LGPL (v2)]
A  +127  -0    kate/app/session/katesession.h     [License: LGPL (v2)]
A  +165  -0    kate/app/session/katesessionchooser.cpp     [License: LGPL (v2)]
A  +69   -0    kate/app/session/katesessionchooser.h     [License: LGPL (v2)]
A  +43   -0    kate/app/session/katesessionchooseritem.h     [License: LGPL (v2)]
A  +180  -0    kate/app/session/katesessionmanagedialog.cpp     [License: LGPL (v2)]
A  +77   -0    kate/app/session/katesessionmanagedialog.h     [License: LGPL (v2)]
A  +519  -0    kate/app/session/katesessionmanager.cpp     [License: LGPL (v2)]
A  +210  -0    kate/app/session/katesessionmanager.h     [License: LGPL (v2)]
A  +115  -0    kate/app/session/katesessionopendialog.cpp     [License: LGPL (v2)]
A  +61   -0    kate/app/session/katesessionopendialog.h     [License: LGPL (v2)]
A  +74   -0    kate/app/session/katesessionsaction.cpp     [License: LGPL (v2)]
A  +50   -0    kate/app/session/katesessionsaction.h     [License: LGPL (v2)]

http://commits.kde.org/kate/96164b9450b494c6cfd3db52796a1befd2b747d1