Advertisement
Guest User

Untitled

a guest
Jun 20th, 2015
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. diff --git a/pixel-saver@deadalnix.me/buttons.js b/pixel-saver@deadalnix.me/buttons.js
  2. index ae52df9..94773c8 100644
  3. --- a/pixel-saver@deadalnix.me/buttons.js
  4. +++ b/pixel-saver@deadalnix.me/buttons.js
  5. @@ -1,5 +1,6 @@
  6. const GLib = imports.gi.GLib;
  7. const Gio = imports.gi.Gio;
  8. +const Gtk = imports.gi.Gtk;
  9. const Main = imports.ui.main;
  10. const Mainloop = imports.mainloop;
  11. const Meta = imports.gi.Meta;
  12. @@ -155,7 +156,7 @@ function close() {
  13. */
  14. let activeCSS = false;
  15. function loadTheme() {
  16. - let theme = Meta.prefs_get_theme(),
  17. + let theme = Gtk.Settings.get_default().gtk_theme_name,
  18. cssPath = GLib.build_filenamev([extensionPath, 'themes', theme, 'style.css']);
  19.  
  20. LOG('Load theme ' + theme);
  21. @@ -171,7 +172,8 @@ function loadTheme() {
  22. unloadTheme();
  23.  
  24. // load the new style
  25. - St.ThemeContext.get_for_stage(global.stage).get_theme().load_stylesheet(cssPath);
  26. + cssGFile = Gio.file_new_for_path(cssPath);
  27. + St.ThemeContext.get_for_stage(global.stage).get_theme().load_stylesheet(cssGFile);
  28.  
  29. // Force style update.
  30. for (let i = 0; i < actors.length; ++i) {
  31. @@ -185,7 +187,8 @@ function unloadTheme() {
  32. if(activeCSS) {
  33. LOG('Unload ' + activeCSS);
  34.  
  35. - St.ThemeContext.get_for_stage(global.stage).get_theme().unload_stylesheet(activeCSS);
  36. + activeCssGFile = Gio.file_new_for_path(activeCSS);
  37. + St.ThemeContext.get_for_stage(global.stage).get_theme().unload_stylesheet(activeCssGFile);
  38. activeCSS = false;
  39. }
  40. }
  41. diff --git a/pixel-saver@deadalnix.me/metadata.json b/pixel-saver@deadalnix.me/metadata.json
  42. index e9bcac3..51b87d5 100644
  43. --- a/pixel-saver@deadalnix.me/metadata.json
  44. +++ b/pixel-saver@deadalnix.me/metadata.json
  45. @@ -1 +1 @@
  46. -{"shell-version": ["3.12", "3.14"], "uuid": "pixel-saver@deadalnix.me", "name": "Pixel Saver", "description": "Pixel Saver is designed to save pixel by fusing activity bar and title bar in a natural way"}
  47. +{"shell-version": ["3.12", "3.14", "3.16"], "uuid": "pixel-saver@deadalnix.me", "name": "Pixel Saver", "description": "Pixel Saver is designed to save pixel by fusing activity bar and title bar in a natural way"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement