Advertisement
gusibsd

patch-js_ui_panel.js

Jul 24th, 2014
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1. --- js/ui/panel.js.orig 2014-05-14 08:28:08.000000000 +0000
  2. +++ js/ui/panel.js 2014-07-24 09:09:07.514520273 +0000
  3. @@ -495,27 +495,37 @@
  4.  
  5. if (this._targetApp == null) {
  6. menu = null;
  7. - } else if (this._targetApp.action_group && this._targetApp.menu) {
  8. - if (this.menu instanceof RemoteMenu.RemoteMenu &&
  9. - this.menu.actionGroup == this._targetApp.action_group)
  10. - return;
  11. -
  12. - menu = new RemoteMenu.RemoteMenu(this.actor, this._targetApp.menu, this._targetApp.action_group);
  13. - menu.connect('activate', Lang.bind(this, function() {
  14. - let win = this._targetApp.get_windows()[0];
  15. - win.check_alive(global.get_current_time());
  16. - }));
  17. -
  18. - } else {
  19. - if (this.menu && this.menu.isDummyQuitMenu)
  20. - return;
  21. + }
  22. + else {
  23. + print("Begin 1");
  24. + print("this._targetApp.action_group"+this._targetApp.action_group);
  25. + print("this._targetApp.menu"+this._targetApp.menu);
  26. + print("End 1");
  27. + if (this._targetApp.action_group && this._targetApp.menu) {
  28. +
  29. + if (this.menu instanceof RemoteMenu.RemoteMenu &&
  30. + this.menu.actionGroup == this._targetApp.action_group){
  31. + return;
  32. + }
  33. +
  34. + menu = new RemoteMenu.RemoteMenu(this.actor, this._targetApp.menu, this._targetApp.action_group);
  35. + menu.connect('activate', Lang.bind(this, function() {
  36. + let win = this._targetApp.get_windows()[0];
  37. + win.check_alive(global.get_current_time());
  38. + }));
  39.  
  40. - // fallback to older menu
  41. - menu = new PopupMenu.PopupMenu(this.actor, 0.0, St.Side.TOP, 0);
  42. - menu.isDummyQuitMenu = true;
  43. - menu.addAction(_("Quit"), Lang.bind(this, function() {
  44. - this._targetApp.request_quit();
  45. - }));
  46. + }
  47. + else {
  48. + if (this.menu && this.menu.isDummyQuitMenu)
  49. + return;
  50. +
  51. + // fallback to older menu
  52. + menu = new PopupMenu.PopupMenu(this.actor, 0.0, St.Side.TOP, 0);
  53. + menu.isDummyQuitMenu = true;
  54. + menu.addAction(_("Quit"), Lang.bind(this, function() {
  55. + this._targetApp.request_quit();
  56. + }));
  57. + }
  58. }
  59.  
  60. this.setMenu(menu);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement