Codebase list gnome-shell-extensions / debian/3.18.1-1kali1
Refresh patch apps-menu-with-multiple-levels.patch Sophie Brun 8 years ago
2 changed file(s) with 25 addition(s) and 30 deletion(s). Raw diff Collapse all Expand all
00 gnome-shell-extensions (3.18.1-1kali1) kali-dev; urgency=medium
11
22 * Import new version from debian
3 * Refresh patch apps-menu-with-multiple-levels.patch
34
45 -- Sophie Brun <[email protected]> Fri, 23 Oct 2015 08:58:04 +0200
56
44
55 --- a/extensions/apps-menu/extension.js
66 +++ b/extensions/apps-menu/extension.js
7 @@ -93,10 +93,9 @@ const ApplicationMenuItem = new Lang.Cla
7 @@ -92,10 +92,9 @@ const ApplicationMenuItem = new Lang.Cla
88
99 const CategoryMenuItem = new Lang.Class({
1010 Name: 'CategoryMenuItem',
1616 this._category = category;
1717 this._button = button;
1818
19 @@ -109,13 +108,126 @@ const CategoryMenuItem = new Lang.Class(
19 @@ -108,8 +107,121 @@ const CategoryMenuItem = new Lang.Class(
2020 else
2121 name = _("Favorites");
2222
2525 + this.parent(name);
2626 +
2727 + //this.actor.connect('motion-event', Lang.bind(this, this._onMotionEvent));
28 },
29
30 activate: function(event) {
31 this._button.selectCategory(this._category, this);
32 - this._button.scrollToCatButton(this);
28 + },
29 +
30 + activate: function(event) {
31 + this._button.selectCategory(this._category, this);
3332 + //this._button.scrollToCatButton(this);
3433 + // we don't chain up here so that clicking on a category doesn't
3534 + // close the menu
138137 + this.parent(name, false);
139138 +
140139 + //this.actor.connect('motion-event', Lang.bind(this, this._onMotionEvent));
141 + },
142 +
143 + activate: function(event) {
144 + this._button.selectCategory(this._category, this);
145 + //this._button.scrollToCatButton(this);
146 this.parent(event);
147 },
148
149 @@ -197,12 +309,29 @@ const CategoryMenuItem = new Lang.Class(
140 },
141
142 activate: function(event) {
143 @@ -201,12 +313,29 @@ const CategoryMenuItem = new Lang.Class(
150144 setActive: function(active, params) {
151145 if (active) {
152146 this._button.selectCategory(this._category, this);
174168 + },
175169 +});
176170 +
177 const HotCorner = new Lang.Class({
178 Name: 'HotCorner',
179 Extends: Layout.HotCorner,
180 @@ -305,7 +434,7 @@ const ApplicationsButton = new Lang.Clas
171 const ApplicationsMenu = new Lang.Class({
172 Name: 'ApplicationsMenu',
173 Extends: PopupMenu.PopupMenu,
174 @@ -292,7 +421,7 @@ const ApplicationsButton = new Lang.Clas
181175 this._installedChangedId = appSys.connect('installed-changed', Lang.bind(this, function() {
182176 if (this.menu.isOpen) {
183177 this._redisplay();
186180 } else {
187181 this.reloadFlag = true;
188182 }
189 @@ -384,7 +513,8 @@ const ApplicationsButton = new Lang.Clas
183 @@ -371,7 +500,8 @@ const ApplicationsButton = new Lang.Clas
190184 this._redisplay();
191185 this.reloadFlag = false;
192186 }
196190 }
197191 this.parent(menu, open);
198192 },
199 @@ -400,11 +530,11 @@ const ApplicationsButton = new Lang.Clas
193 @@ -387,11 +517,11 @@ const ApplicationsButton = new Lang.Clas
200194
201195 _redisplay: function() {
202196 this.applicationsBox.destroy_all_children();
210204 let iter = dir.iter();
211205 let nextType;
212206 while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
213 @@ -414,12 +544,21 @@ const ApplicationsButton = new Lang.Clas
214 let app = appSys.lookup_app(entry.get_desktop_file_id());
207 @@ -407,12 +537,21 @@ const ApplicationsButton = new Lang.Clas
208 let app = appSys.lookup_app(id);
215209 if (appInfo.should_show()) {
216210 let menu_id = dir.get_menu_id();
217211 - this.applicationsByCategory[categoryId].push(app);
235229 }
236230 }
237231 },
238 @@ -440,8 +579,8 @@ const ApplicationsButton = new Lang.Clas
232 @@ -433,8 +572,8 @@ const ApplicationsButton = new Lang.Clas
239233 },
240234
241235 scrollToCatButton: function(button) {
246240 let currentScrollValue = catsScrollBoxAdj.get_value();
247241 let boxHeight = catsScrollBoxAlloc.y2 - catsScrollBoxAlloc.y1;
248242 let buttonAlloc = button.actor.get_allocation_box();
249 @@ -455,10 +594,16 @@ const ApplicationsButton = new Lang.Clas
243 @@ -448,10 +587,16 @@ const ApplicationsButton = new Lang.Clas
250244 },
251245
252246 _createLayout: function() {
265259 this.applicationsScrollBox = new St.ScrollView({ x_fill: true, y_fill: false,
266260 y_align: St.Align.START,
267261 style_class: 'apps-menu vfade' });
268 @@ -470,41 +615,55 @@ const ApplicationsButton = new Lang.Clas
262 @@ -463,41 +608,55 @@ const ApplicationsButton = new Lang.Clas
269263 vscroll.connect('scroll-stop', Lang.bind(this, function() {
270264 this.menu.passEvents = false;
271265 }));
346340
347341 //Load categories
348342 this.applicationsByCategory = {};
349 @@ -512,7 +671,7 @@ const ApplicationsButton = new Lang.Clas
343 @@ -505,7 +664,7 @@ const ApplicationsButton = new Lang.Clas
350344 tree.load_sync();
351345 let root = tree.get_root_directory();
352346 let categoryMenuItem = new CategoryMenuItem(this, null);
355349 let iter = root.iter();
356350 let nextType;
357351 while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
358 @@ -521,10 +680,12 @@ const ApplicationsButton = new Lang.Clas
352 @@ -514,10 +673,12 @@ const ApplicationsButton = new Lang.Clas
359353 if (!dir.get_is_nodisplay()) {
360354 let categoryId = dir.get_menu_id();
361355 this.applicationsByCategory[categoryId] = [];
372366 }
373367 }
374368 }
375 @@ -533,8 +694,9 @@ const ApplicationsButton = new Lang.Clas
369 @@ -526,8 +687,9 @@ const ApplicationsButton = new Lang.Clas
376370 //Load applications
377371 this._displayButtons(this._listApplications(null));
378372