Skip to content

Commit f2edcb7

Browse files
authored
Direct v1.6.2: System section: Add Quit and Logout buttons (#8166)
1 parent 57c2e30 commit f2edcb7

File tree

22 files changed

+519
-345
lines changed

22 files changed

+519
-345
lines changed

Direct@claudiux/files/Direct@claudiux/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### v1.6.2~20260107
2+
* System section: Add Quit and Logout buttons.
3+
14
### v1.6.1~20251223
25
* "Text size" becomes "Text width".
36
* Changes the method to open the menu.

Direct@claudiux/files/Direct@claudiux/applet.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const Gtk = imports.gi.Gtk;
44
const Clutter = imports.gi.Clutter;
55
const Pango = imports.gi.Pango;
66
const St = imports.gi.St;
7+
const GnomeSession = imports.misc.gnomeSession;
78
const {SignalManager} = imports.misc.signalManager;
89
const windowTracker = imports.gi.Cinnamon.WindowTracker.get_default();
910

@@ -258,6 +259,7 @@ class DirectApplet extends Applet.TextIconApplet {
258259
this.setAllowedLayout(Applet.AllowedLayout.BOTH);
259260
this.on_orientation_changed(orientation);
260261

262+
this.sessionManager = new GnomeSession.SessionManager();
261263
this.signals = new SignalManager(null);
262264
this.appSystem = Cinnamon.AppSystem.get_default();
263265
this.appFavorites = getAppFavorites();
@@ -892,6 +894,23 @@ class DirectApplet extends Applet.TextIconApplet {
892894
}));
893895
}
894896
}
897+
898+
//system items
899+
this.systemSection.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
900+
let logoutItem = new PopupMenu.PopupIconMenuItem(_("Logout"), "system-log-out", St.IconType.SYMBOLIC);
901+
logoutItem._icon.set_icon_size(this.iconSize);
902+
this.systemSection.addMenuItem(logoutItem);
903+
logoutItem.connect("activate", Lang.bind(this, function() {
904+
this.menu.close();
905+
this.sessionManager.LogoutRemote(0);
906+
}));
907+
let quitItem = new PopupMenu.PopupIconMenuItem(_("Quit"), "system-shutdown", St.IconType.SYMBOLIC);
908+
quitItem._icon.set_icon_size(this.iconSize);
909+
this.systemSection.addMenuItem(quitItem);
910+
quitItem.connect("activate", Lang.bind(this, function() {
911+
this.menu.close();
912+
this.sessionManager.ShutdownRemote();
913+
}));
895914
}
896915

897916
buildCustomSection() {

Direct@claudiux/files/Direct@claudiux/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Provides direct and easy access to your Directories, Favorites, Recent documents and System locations",
55
"comments": "The Direct@claudiux applet is a fork from the placesCenter@scollins applet, with improvements.",
66
"website": "https://github.com/linuxmint/cinnamon-spices-applets",
7-
"version": "1.6.1",
7+
"version": "1.6.2",
88
"max-instances": -1,
99
"author": "claudiux"
1010
}

Direct@claudiux/files/Direct@claudiux/po/Direct@claudiux.pot

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
#, fuzzy
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: Direct@claudiux 1.6.1\n"
8+
"Project-Id-Version: Direct@claudiux 1.6.2\n"
99
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/"
1010
"issues\n"
11-
"POT-Creation-Date: 2025-12-23 15:47+0100\n"
11+
"POT-Creation-Date: 2026-01-07 23:43+0100\n"
1212
"PO-Revision-Date: \n"
1313
"Last-Translator: \n"
1414
"Language-Team: \n"
@@ -17,69 +17,77 @@ msgstr ""
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919

20-
#. applet.js:45 applet.js:652
20+
#. applet.js:46 applet.js:654
2121
msgid "SYSTEM"
2222
msgstr ""
2323

24-
#. applet.js:45 applet.js:692
24+
#. applet.js:46 applet.js:694
2525
msgid "FAVORITES"
2626
msgstr ""
2727

28-
#. applet.js:45 applet.js:723
28+
#. applet.js:46 applet.js:725
2929
msgid "APPLICATIONS"
3030
msgstr ""
3131

32-
#. applet.js:45 applet.js:754
32+
#. applet.js:46 applet.js:756
3333
msgid "RECENT DOCUMENTS"
3434
msgstr ""
3535

36-
#. applet.js:45 applet.js:798
36+
#. applet.js:46 applet.js:800
3737
msgid "CUSTOM"
3838
msgstr ""
3939

40-
#. applet.js:188
40+
#. applet.js:189
4141
msgid "(Right click to open folder)"
4242
msgstr ""
4343

4444
#. metadata.json->name
45-
#. applet.js:315
45+
#. applet.js:317
4646
msgid "Direct"
4747
msgstr ""
4848

49-
#. applet.js:622
49+
#. applet.js:624
5050
msgid "Search Home Folder"
5151
msgstr ""
5252

53-
#. applet.js:629 applet.js:669 applet.js:700 applet.js:731 applet.js:762
54-
#. applet.js:806
53+
#. applet.js:631 applet.js:671 applet.js:702 applet.js:733 applet.js:764
54+
#. applet.js:808
5555
msgid "Configure"
5656
msgstr ""
5757

58-
#. applet.js:662
58+
#. applet.js:664
5959
msgid "Search File System"
6060
msgstr ""
6161

62-
#. applet.js:776
62+
#. applet.js:778
6363
msgid "Clear"
6464
msgstr ""
6565

66-
#. applet.js:783
66+
#. applet.js:785
6767
msgid "Recent"
6868
msgstr ""
6969

70-
#. applet.js:860
70+
#. applet.js:862
7171
msgid "Computer"
7272
msgstr ""
7373

74-
#. applet.js:866
74+
#. applet.js:868
7575
msgid "File System"
7676
msgstr ""
7777

78-
#. applet.js:883
78+
#. applet.js:885
7979
msgid "Network"
8080
msgstr ""
8181

82-
#. applet.js:1196
82+
#. applet.js:900
83+
msgid "Logout"
84+
msgstr ""
85+
86+
#. applet.js:907
87+
msgid "Quit"
88+
msgstr ""
89+
90+
#. applet.js:1215
8391
msgid "Trash"
8492
msgstr ""
8593

Direct@claudiux/files/Direct@claudiux/po/bg.po

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/"
1010
"issues\n"
11-
"POT-Creation-Date: 2025-12-23 15:47+0100\n"
11+
"POT-Creation-Date: 2026-01-07 23:43+0100\n"
1212
"PO-Revision-Date: 2017-12-20 20:20+0200\n"
1313
"Last-Translator: Peyu Yovev <spacy00001@gmail.com>\n"
1414
"Language-Team: \n"
@@ -19,69 +19,77 @@ msgstr ""
1919
"X-Generator: Poedit 1.8.7.1\n"
2020
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
2121

22-
#. applet.js:45 applet.js:652
22+
#. applet.js:46 applet.js:654
2323
msgid "SYSTEM"
2424
msgstr "СИСТЕМА"
2525

26-
#. applet.js:45 applet.js:692
26+
#. applet.js:46 applet.js:694
2727
msgid "FAVORITES"
2828
msgstr ""
2929

30-
#. applet.js:45 applet.js:723
30+
#. applet.js:46 applet.js:725
3131
msgid "APPLICATIONS"
3232
msgstr ""
3333

34-
#. applet.js:45 applet.js:754
34+
#. applet.js:46 applet.js:756
3535
msgid "RECENT DOCUMENTS"
3636
msgstr "ПОСЛЕДНИ ДОКУМЕНТИ"
3737

38-
#. applet.js:45 applet.js:798
38+
#. applet.js:46 applet.js:800
3939
msgid "CUSTOM"
4040
msgstr ""
4141

42-
#. applet.js:188
42+
#. applet.js:189
4343
msgid "(Right click to open folder)"
4444
msgstr ""
4545

4646
#. metadata.json->name
47-
#. applet.js:315
47+
#. applet.js:317
4848
msgid "Direct"
4949
msgstr "Директно"
5050

51-
#. applet.js:622
51+
#. applet.js:624
5252
msgid "Search Home Folder"
5353
msgstr "Търси в домашната папка"
5454

55-
#. applet.js:629 applet.js:669 applet.js:700 applet.js:731 applet.js:762
56-
#. applet.js:806
55+
#. applet.js:631 applet.js:671 applet.js:702 applet.js:733 applet.js:764
56+
#. applet.js:808
5757
msgid "Configure"
5858
msgstr ""
5959

60-
#. applet.js:662
60+
#. applet.js:664
6161
msgid "Search File System"
6262
msgstr "Търси във файловата система"
6363

64-
#. applet.js:776
64+
#. applet.js:778
6565
msgid "Clear"
6666
msgstr "Изчисти"
6767

68-
#. applet.js:783
68+
#. applet.js:785
6969
msgid "Recent"
7070
msgstr ""
7171

72-
#. applet.js:860
72+
#. applet.js:862
7373
msgid "Computer"
7474
msgstr "Компютър"
7575

76-
#. applet.js:866
76+
#. applet.js:868
7777
msgid "File System"
7878
msgstr "Файлова система"
7979

80-
#. applet.js:883
80+
#. applet.js:885
8181
msgid "Network"
8282
msgstr "Мрежа"
8383

84-
#. applet.js:1196
84+
#. applet.js:900
85+
msgid "Logout"
86+
msgstr ""
87+
88+
#. applet.js:907
89+
msgid "Quit"
90+
msgstr ""
91+
92+
#. applet.js:1215
8593
msgid "Trash"
8694
msgstr "Кошче"
8795

Direct@claudiux/files/Direct@claudiux/po/ca.po

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: Direct@claudiux 1.0.0\n"
99
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/"
1010
"issues\n"
11-
"POT-Creation-Date: 2025-12-23 15:47+0100\n"
11+
"POT-Creation-Date: 2026-01-07 23:43+0100\n"
1212
"PO-Revision-Date: 2025-10-06 21:22+0200\n"
1313
"Last-Translator: Odyssey <odysseyhyd@gmail.com>\n"
1414
"Language-Team: \n"
@@ -18,69 +18,77 @@ msgstr ""
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"X-Generator: Poedit 3.6\n"
2020

21-
#. applet.js:45 applet.js:652
21+
#. applet.js:46 applet.js:654
2222
msgid "SYSTEM"
2323
msgstr "SISTEMA"
2424

25-
#. applet.js:45 applet.js:692
25+
#. applet.js:46 applet.js:694
2626
msgid "FAVORITES"
2727
msgstr "PREFERITS"
2828

29-
#. applet.js:45 applet.js:723
29+
#. applet.js:46 applet.js:725
3030
msgid "APPLICATIONS"
3131
msgstr ""
3232

33-
#. applet.js:45 applet.js:754
33+
#. applet.js:46 applet.js:756
3434
msgid "RECENT DOCUMENTS"
3535
msgstr "DOCUMENTS RECENTS"
3636

37-
#. applet.js:45 applet.js:798
37+
#. applet.js:46 applet.js:800
3838
msgid "CUSTOM"
3939
msgstr ""
4040

41-
#. applet.js:188
41+
#. applet.js:189
4242
msgid "(Right click to open folder)"
4343
msgstr "(Clic dret per obrir la carpeta)"
4444

4545
#. metadata.json->name
46-
#. applet.js:315
46+
#. applet.js:317
4747
msgid "Direct"
4848
msgstr "Directe"
4949

50-
#. applet.js:622
50+
#. applet.js:624
5151
msgid "Search Home Folder"
5252
msgstr "Buscar al directori Home"
5353

54-
#. applet.js:629 applet.js:669 applet.js:700 applet.js:731 applet.js:762
55-
#. applet.js:806
54+
#. applet.js:631 applet.js:671 applet.js:702 applet.js:733 applet.js:764
55+
#. applet.js:808
5656
msgid "Configure"
5757
msgstr ""
5858

59-
#. applet.js:662
59+
#. applet.js:664
6060
msgid "Search File System"
6161
msgstr "Buscar al sistema de fitxers"
6262

63-
#. applet.js:776
63+
#. applet.js:778
6464
msgid "Clear"
6565
msgstr "Netejar"
6666

67-
#. applet.js:783
67+
#. applet.js:785
6868
msgid "Recent"
6969
msgstr "Recent"
7070

71-
#. applet.js:860
71+
#. applet.js:862
7272
msgid "Computer"
7373
msgstr "Ordinador"
7474

75-
#. applet.js:866
75+
#. applet.js:868
7676
msgid "File System"
7777
msgstr "Sistema de fitxers"
7878

79-
#. applet.js:883
79+
#. applet.js:885
8080
msgid "Network"
8181
msgstr "Xarxa"
8282

83-
#. applet.js:1196
83+
#. applet.js:900
84+
msgid "Logout"
85+
msgstr ""
86+
87+
#. applet.js:907
88+
msgid "Quit"
89+
msgstr ""
90+
91+
#. applet.js:1215
8492
msgid "Trash"
8593
msgstr "Paperera"
8694

0 commit comments

Comments
 (0)