daily pastebin goal
15%
SHARE
TWEET

gnome-shell-extension-settings-center 3.10 quickfix

Peaceseeker Oct 9th, 2013 120 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- a/extension.js      2013-10-09 17:30:45.708060585 +0100
  2. +++ b/extension.js"     2013-10-09 17:47:35.788517411 +0100
  3. @@ -28,16 +28,19 @@
  4.          break;
  5.          case"8": age = "new2";
  6.          break;
  7. +        case"10": age = "new3";
  8. +        break;
  9.          default: throw new Error("Strange version number (extension.js:31).");
  10.      }
  11.  
  12. -    if (age=="old") userMenu = Main.panel._statusArea.userMenu;
  13. -    else            userMenu = Main.panel.statusArea.userMenu;
  14. +    if (age=="old")      userMenu = Main.panel._statusArea.userMenu;
  15. +    else if (age=="new") userMenu = Main.panel.statusArea.userMenu;
  16. +    else                 userMenu = Main.panel.statusArea.aggregateMenu
  17.  
  18.      return new SettingsCenter(extensionMeta, schema);
  19.  }
  20.  
  21. -let new3;
  22. +let new4;
  23.  
  24.  function SettingsCenter(extensionMeta, schema)
  25.  {
  26. @@ -101,9 +104,10 @@
  27.  
  28.          let index = null;
  29.          let menuItems = userMenu.menu._getMenuItems();
  30. -       //Find System Settings menu position, "Settings" on > 3.8
  31. -        if (age=="new2") new3 = "Settings";
  32. -        else             new3 = "System Settings";
  33. +       //Find System Settings menu position, "Settings" on > 3.8 and 3.10
  34. +        if (age=="new2")      new4 = "Settings";
  35. +        else if (age=="new3") new4 = "System Settings";
  36. +        else                  new4 = "System Settings";
  37.          for (let i = 0; i < menuItems.length; i++)
  38.          {    
  39.             if (
  40. @@ -111,7 +115,7 @@
  41.                     && typeof (menuItems[i]._children[0]) == "object"
  42.                     && typeof (menuItems[i]._children[0].actor) == "object"
  43.                     && typeof (menuItems[i]._children[0].actor.get_text) == "function"
  44. -                   && menuItems[i]._children[0].actor.get_text() == _(new3))
  45. +                   && menuItems[i]._children[0].actor.get_text() == _(new4))
  46.             {
  47.                  index = i;
  48.                  break;
  49. @@ -141,7 +145,7 @@
  50.             {
  51.                 menuItems[index].destroy();
  52.                
  53. -               let item = new PopupMenu.PopupMenuItem(_(new3));
  54. +               let item = new PopupMenu.PopupMenuItem(_(new4));
  55.                 item.connect("activate", Lang.bind(this, this.onPreferencesActivate));
  56.                 this.settingsCenterMenu.menu.addMenuItem(item, i++);
  57.             }
  58. @@ -192,7 +196,7 @@
  59.         //Add original menu if necessary
  60.         if (this.replaceMenu)
  61.         {
  62. -            let item = new PopupMenu.PopupMenuItem(_(new3));
  63. +            let item = new PopupMenu.PopupMenuItem(_(new4));
  64.              item.connect("activate", Lang.bind(this, this.onPreferencesActivate));
  65.             userMenu.menu.addMenuItem(item, index);
  66.         }
  67.  
  68. --- a/metadata.json     2013-04-24 22:42:10.000000000 +0100
  69. +++ b/metadata.json"    2013-10-09 17:47:43.938467197 +0100
  70. @@ -7,9 +7,10 @@
  71.      "3.4",
  72.      "3.6",
  73.      "3.5.4",
  74. -    "3.8"
  75. +    "3.8",
  76. +    "3.10"
  77.    ],
  78.    "url": "https://github.com/l300lvl/settings-center-extension",
  79.    "uuid": "SettingsCenter@xesnet.fr",
  80.    "version": 6
  81. -}
  82. \ No newline at end of file
  83. +}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top