Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions applet.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const Applet = imports.ui.applet;
const Mainloop = imports.mainloop;
const GMenu = imports.gi.GMenu;
const CMenu = imports.gi.CMenu;
const Lang = imports.lang;
const Cinnamon = imports.gi.Cinnamon;
const St = imports.gi.St;
Expand Down Expand Up @@ -604,9 +604,8 @@ TextBoxItem.prototype = {
this.actor.set_style_class_name('menu-category-button');
this.actor.add_style_class_name('menu-text-item-button');
this.actor.connect('leave-event', Lang.bind(this, this._onLeaveEvent));
this.removeActor(this.label);
this.removeActor(this._triangle);
this._triangle = new St.Label();
this.label.destroy();
this._triangle.destroy();
this.label_text = label;

this.label_icon = new St.Icon({icon_name: this.icon, icon_size: 18, icon_type: St.IconType.FULLCOLOR,});
Expand Down Expand Up @@ -706,19 +705,22 @@ AllProgramsItem.prototype = {
this.actor.set_style_class_name('');
this.box = new St.BoxLayout({ style_class: 'menu-category-button' });
this.parent = parent;
this.removeActor(this.label);
this.removeActor(this._triangle);
this._triangle = new St.Label();

this._triangle.destroy();
this.label.destroy();

this.label = new St.Label({
text: " " + label
text: " " + label,
y_align: Clutter.ActorAlign.CENTER
});
this.icon = new St.Icon({
style_class: 'popup-menu-icon',
icon_type: St.IconType.FULLCOLOR,
icon_name: icon,
icon_size: ICON_SIZE
icon_size: ICON_SIZE,
y_align: Clutter.ActorAlign.CENTER
});
this.box.add_actor(this.icon);
this.box.add_actor(this.icon);
this.box.add_actor(this.label);
this.addActor(this.box);
},
Expand Down Expand Up @@ -1807,8 +1809,8 @@ MyApplet.prototype = {

let iter = root.iter();
let nextType;
while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
if (nextType == GMenu.TreeItemType.DIRECTORY) {
while ((nextType = iter.next()) != CMenu.TreeItemType.INVALID) {
if (nextType == CMenu.TreeItemType.DIRECTORY) {
let dir = iter.get_directory();
if (dir.get_is_nodisplay())
continue;
Expand Down Expand Up @@ -2025,8 +2027,8 @@ MyApplet.prototype = {
var dupe = false;
var nextType;
if (!top_dir) top_dir = dir;
while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
if (nextType == GMenu.TreeItemType.ENTRY) {
while ((nextType = iter.next()) != CMenu.TreeItemType.INVALID) {
if (nextType == CMenu.TreeItemType.ENTRY) {
var entry = iter.get_entry();
if (!entry.get_app_info().get_nodisplay()) {
var app = appsys.lookup_app_by_tree_entry(entry);
Expand All @@ -2048,7 +2050,7 @@ MyApplet.prototype = {
this.applicationsByCategory[dir.get_menu_id()].push(app.get_name());
}
}
} else if (nextType == GMenu.TreeItemType.DIRECTORY) {
} else if (nextType == CMenu.TreeItemType.DIRECTORY) {
let subdir = iter.get_directory();
this.applicationsByCategory[subdir.get_menu_id()] = new Array();
this._loadCategory(subdir, top_dir);
Expand Down
2 changes: 1 addition & 1 deletion settings-schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"menu-icon" : {
"type" : "iconfilechooser",
"default" : "/usr/share/cinnamon/theme/menu.png",
"default" : "/usr/share/cinnamon/theme/menu.svg",
"description": "Icon",
"tooltip": "Select an icon to show in the panel."
},
Expand Down