204 | 204 |
let iter = dir.iter();
|
205 | 205 |
let nextType;
|
206 | 206 |
while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
|
207 | |
@@ -404,12 +534,23 @@ const ApplicationsButton = new Lang.Clas
|
208 | |
continue;
|
209 | |
}
|
|
207 |
@@ -406,12 +536,24 @@ const ApplicationsButton = new Lang.Clas
|
210 | 208 |
let app = appSys.lookup_app(id);
|
|
209 |
if (!app)
|
|
210 |
app = new Shell.App({ app_info: entry.get_app_info() });
|
211 | 211 |
- if (app.get_app_info().should_show())
|
212 | 212 |
- this.applicationsByCategory[categoryId].push(app);
|
213 | 213 |
+ if (app.get_app_info().should_show()) {
|
214 | 214 |
+ let menu_id = dir.get_menu_id();
|
215 | 215 |
+ this.applicationsByCategory[menu_id].push(app);
|
216 | |
+ }
|
|
216 |
+ }
|
217 | 217 |
} else if (nextType == GMenu.TreeItemType.DIRECTORY) {
|
218 | 218 |
let subdir = iter.get_directory();
|
219 | 219 |
- if (!subdir.get_is_nodisplay())
|
|
229 | 229 |
+ parentCategory.menu.addMenuItem(categoryMenuItem);
|
230 | 230 |
+ }
|
231 | 231 |
+ }
|
|
232 |
+
|
232 | 233 |
}
|
233 | 234 |
}
|
234 | 235 |
},
|
235 | |
@@ -430,8 +571,8 @@ const ApplicationsButton = new Lang.Clas
|
|
236 |
@@ -432,8 +574,8 @@ const ApplicationsButton = new Lang.Clas
|
236 | 237 |
},
|
237 | 238 |
|
238 | 239 |
scrollToCatButton: function(button) {
|
|
243 | 244 |
let currentScrollValue = catsScrollBoxAdj.get_value();
|
244 | 245 |
let boxHeight = catsScrollBoxAlloc.y2 - catsScrollBoxAlloc.y1;
|
245 | 246 |
let buttonAlloc = button.actor.get_allocation_box();
|
246 | |
@@ -445,10 +586,16 @@ const ApplicationsButton = new Lang.Clas
|
|
247 |
@@ -447,10 +589,16 @@ const ApplicationsButton = new Lang.Clas
|
247 | 248 |
},
|
248 | 249 |
|
249 | 250 |
_createLayout: function() {
|
|
262 | 263 |
this.applicationsScrollBox = new St.ScrollView({ x_fill: true, y_fill: false,
|
263 | 264 |
y_align: St.Align.START,
|
264 | 265 |
style_class: 'apps-menu vfade' });
|
265 | |
@@ -460,41 +607,55 @@ const ApplicationsButton = new Lang.Clas
|
|
266 |
@@ -462,41 +610,55 @@ const ApplicationsButton = new Lang.Clas
|
266 | 267 |
vscroll.connect('scroll-stop', Lang.bind(this, function() {
|
267 | 268 |
this.menu.passEvents = false;
|
268 | 269 |
}));
|
|
343 | 344 |
|
344 | 345 |
//Load categories
|
345 | 346 |
this.applicationsByCategory = {};
|
346 | |
@@ -502,7 +663,7 @@ const ApplicationsButton = new Lang.Clas
|
|
347 |
@@ -504,7 +666,7 @@ const ApplicationsButton = new Lang.Clas
|
347 | 348 |
tree.load_sync();
|
348 | 349 |
let root = tree.get_root_directory();
|
349 | 350 |
let categoryMenuItem = new CategoryMenuItem(this, null);
|
|
352 | 353 |
let iter = root.iter();
|
353 | 354 |
let nextType;
|
354 | 355 |
while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
|
355 | |
@@ -511,10 +672,12 @@ const ApplicationsButton = new Lang.Clas
|
|
356 |
@@ -513,10 +675,12 @@ const ApplicationsButton = new Lang.Clas
|
356 | 357 |
if (!dir.get_is_nodisplay()) {
|
357 | 358 |
let categoryId = dir.get_menu_id();
|
358 | 359 |
this.applicationsByCategory[categoryId] = [];
|
|
369 | 370 |
}
|
370 | 371 |
}
|
371 | 372 |
}
|
372 | |
@@ -523,8 +686,9 @@ const ApplicationsButton = new Lang.Clas
|
|
373 |
@@ -525,8 +689,9 @@ const ApplicationsButton = new Lang.Clas
|
373 | 374 |
//Load applications
|
374 | 375 |
this._displayButtons(this._listApplications(null));
|
375 | 376 |
|