Skip to content

Commit

Permalink
Cinnamenu@json: Fix logout button not working with Cinnamon 6.0 (#5135)
Browse files Browse the repository at this point in the history
Fix logout button not working with cinnamon 6.0
  • Loading branch information
fredcw authored Nov 23, 2023
1 parent ec3a068 commit c9cd468
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Cinnamenu@json/files/Cinnamenu@json/5.8/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const St = imports.gi.St;
const Meta = imports.gi.Meta;
const Main = imports.ui.main;
const Util = imports.misc.util;
const GnomeSession = imports.misc.gnomeSession;
const AppletManager = imports.ui.appletManager; //
//const {SessionManager} = imports.misc.gnomeSession;
const {ScreenSaverProxy} = imports.misc.screenSaver;
Expand Down Expand Up @@ -127,6 +128,7 @@ class CinnamenuApplet extends TextIconApplet {
this.apps = new Apps(this.appSystem);
//this.session = new SessionManager();
this.screenSaverProxy = new ScreenSaverProxy();
this.sessionManager = new GnomeSession.SessionManager();

const updateKeybinding = () => {
Main.keybindingManager.addHotKey(
Expand Down
4 changes: 2 additions & 2 deletions Cinnamenu@json/files/Cinnamenu@json/5.8/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,17 +251,17 @@ class Sidebar {
_('Quit'),
_('Shutdown the computer'),
() => {
Util.spawnCommandLine('cinnamon-session-quit --power-off');
this.appThis.menu.close();
this.appThis.sessionManager.ShutdownRemote();
}));
this.items.push(new SidebarButton(
this.appThis, newSidebarIcon('system-log-out'),
null,
_('Logout'),
_('Leave the session'),
() => {
Util.spawnCommandLine('cinnamon-session-quit');
this.appThis.menu.close();
this.appThis.sessionManager.LogoutRemote(0);
}));
this.items.push(new SidebarButton(
this.appThis,
Expand Down
2 changes: 1 addition & 1 deletion Cinnamenu@json/files/Cinnamenu@json/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Cinnamenu",
"description": "A flexible menu with grid or list layout options, file browser and emoji search.",
"max-instances": 2,
"version": "5.4.8",
"version": "5.4.9",
"multiversion": true,
"website": "https://github.com/linuxmint/cinnamon-spices-applets",
"cinnamon-version": [
Expand Down

0 comments on commit c9cd468

Please sign in to comment.