From 8acbb0a1b397202883fa362bd73619b4f4603931 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 14 Apr 2020 15:20:21 +0900 Subject: kicker's kate session menu extension: keep the popup menu open after reloading the sessions list. This improve the user experience. Signed-off-by: Michele Calgaro --- kicker/menuext/kate/katesessionmenu.cpp | 7 ++++++- kicker/menuext/kate/katesessionmenu.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/kicker/menuext/kate/katesessionmenu.cpp b/kicker/menuext/kate/katesessionmenu.cpp index 711d0968d..c2b3712cc 100644 --- a/kicker/menuext/kate/katesessionmenu.cpp +++ b/kicker/menuext/kate/katesessionmenu.cpp @@ -117,7 +117,7 @@ void KateSessionMenu::initialize() // means for updating, to let the user manually update if he/she added new sessions. insertSeparator(); - insertItem( SmallIconSet("reload"), i18n("Reload Session List"), this, TQT_SLOT(reinitialize()) ); + insertItem( SmallIconSet("reload"), i18n("Reload Session List"), this, TQT_SLOT(reloadSessionsList()) ); } void KateSessionMenu::slotExec( int id ) @@ -170,5 +170,10 @@ void KateSessionMenu::slotExec( int id ) kapp->tdeinitExec("kate", args); } +void KateSessionMenu::reloadSessionsList() +{ + reinitialize(); + exec(); +} // kate: space-indent: on; indent-width 2; replace-tabs on; diff --git a/kicker/menuext/kate/katesessionmenu.h b/kicker/menuext/kate/katesessionmenu.h index 3d5519496..2558ad702 100644 --- a/kicker/menuext/kate/katesessionmenu.h +++ b/kicker/menuext/kate/katesessionmenu.h @@ -34,6 +34,7 @@ class KateSessionMenu : public KPanelMenu { protected slots: virtual void slotExec( int id ); + void reloadSessionsList(); private: TQStringList m_sessions; -- cgit v1.2.1