Codebase list gnome-shell-extensions / 61aa990
Sync with Debian Remaining changes: - apps-menu with multiple levels Raphaël Hertzog 8 years ago
2 changed file(s) with 21 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
0 gnome-shell-extensions (3.18.3-1kali1) kali-dev; urgency=medium
1
2 * Sync with Debian. Remaining changes:
3 - apps-menu with multiple levels
4
5 -- Raphaël Hertzog <[email protected]> Mon, 08 Feb 2016 14:53:52 +0100
6
07 gnome-shell-extensions (3.18.3-1) unstable; urgency=medium
18
29 * New upstream release.
204204 let iter = dir.iter();
205205 let nextType;
206206 while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
207 @@ -407,12 +537,21 @@ const ApplicationsButton = new Lang.Clas
207 @@ -404,12 +534,23 @@ const ApplicationsButton = new Lang.Clas
208 continue;
209 }
208210 let app = appSys.lookup_app(id);
209 if (appInfo.should_show()) {
210 let menu_id = dir.get_menu_id();
211 - if (app.get_app_info().should_show())
211212 - this.applicationsByCategory[categoryId].push(app);
213 + if (app.get_app_info().should_show()) {
214 + let menu_id = dir.get_menu_id();
212215 + this.applicationsByCategory[menu_id].push(app);
213 }
216 + }
214217 } else if (nextType == GMenu.TreeItemType.DIRECTORY) {
215218 let subdir = iter.get_directory();
216219 - if (!subdir.get_is_nodisplay())
225228 + if (this.applicationsByCategory[menu_id].length > 0 || !categoryMenuItem.menu.isEmpty()) {
226229 + parentCategory.menu.addMenuItem(categoryMenuItem);
227230 + }
228 + }
231 + }
229232 }
230233 }
231234 },
232 @@ -433,8 +572,8 @@ const ApplicationsButton = new Lang.Clas
235 @@ -430,8 +571,8 @@ const ApplicationsButton = new Lang.Clas
233236 },
234237
235238 scrollToCatButton: function(button) {
240243 let currentScrollValue = catsScrollBoxAdj.get_value();
241244 let boxHeight = catsScrollBoxAlloc.y2 - catsScrollBoxAlloc.y1;
242245 let buttonAlloc = button.actor.get_allocation_box();
243 @@ -448,10 +587,16 @@ const ApplicationsButton = new Lang.Clas
246 @@ -445,10 +586,16 @@ const ApplicationsButton = new Lang.Clas
244247 },
245248
246249 _createLayout: function() {
259262 this.applicationsScrollBox = new St.ScrollView({ x_fill: true, y_fill: false,
260263 y_align: St.Align.START,
261264 style_class: 'apps-menu vfade' });
262 @@ -463,41 +608,55 @@ const ApplicationsButton = new Lang.Clas
265 @@ -460,41 +607,55 @@ const ApplicationsButton = new Lang.Clas
263266 vscroll.connect('scroll-stop', Lang.bind(this, function() {
264267 this.menu.passEvents = false;
265268 }));
340343
341344 //Load categories
342345 this.applicationsByCategory = {};
343 @@ -505,7 +664,7 @@ const ApplicationsButton = new Lang.Clas
346 @@ -502,7 +663,7 @@ const ApplicationsButton = new Lang.Clas
344347 tree.load_sync();
345348 let root = tree.get_root_directory();
346349 let categoryMenuItem = new CategoryMenuItem(this, null);
349352 let iter = root.iter();
350353 let nextType;
351354 while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
352 @@ -514,10 +673,12 @@ const ApplicationsButton = new Lang.Clas
355 @@ -511,10 +672,12 @@ const ApplicationsButton = new Lang.Clas
353356 if (!dir.get_is_nodisplay()) {
354357 let categoryId = dir.get_menu_id();
355358 this.applicationsByCategory[categoryId] = [];
366369 }
367370 }
368371 }
369 @@ -526,8 +687,9 @@ const ApplicationsButton = new Lang.Clas
372 @@ -523,8 +686,9 @@ const ApplicationsButton = new Lang.Clas
370373 //Load applications
371374 this._displayButtons(this._listApplications(null));
372375