From 9a8eb2fa6d83d169fe974c4360b7d5dce9222723 Mon Sep 17 00:00:00 2001 From: Wolfgang Rumpler Date: Sat, 7 Oct 2017 14:45:38 +0200 Subject: [PATCH] Add disable preview option --- randomwallpaper@iflow.space/prefs.js | 4 + .../schemas/gschemas.compiled | Bin 2328 -> 2368 bytes ...ns.space.iflow.randomwallpaper.gschema.xml | 6 + randomwallpaper@iflow.space/settings.ui | 231 ++++++++++++++---- .../wallpaperController.js | 16 +- 5 files changed, 202 insertions(+), 55 deletions(-) diff --git a/randomwallpaper@iflow.space/prefs.js b/randomwallpaper@iflow.space/prefs.js index eb71770..e3b36d3 100644 --- a/randomwallpaper@iflow.space/prefs.js +++ b/randomwallpaper@iflow.space/prefs.js @@ -124,6 +124,10 @@ const RandomWallpaperSettings = new Lang.Class({ this._builder.get_object('change-lock-screen'), 'active', Gio.SettingsBindFlags.DEFAULT); + this._settings.bind('disable-hover-preview', + this._builder.get_object('disable-hover-preview'), + 'active', + Gio.SettingsBindFlags.DEFAULT); }, _toggleAfSliders: function () { diff --git a/randomwallpaper@iflow.space/schemas/gschemas.compiled b/randomwallpaper@iflow.space/schemas/gschemas.compiled index b0ca0b1513b2c6d1fbe78047ea85a8a1454fc1d5..a9c89ee8ab8e34b5b83fb21a715a9b448cf697a5 100644 GIT binary patch delta 926 zcmYjQO=uHA7@gE?k~Y?aNQeaw>OppCS5OeKMoIiBwI~)vDaF4u8MBLNHtcR9MQuEJ zsfWr67EfM!(1=pJNC+hfb zxCZf$kBgd4vh@9boVB!A)A!+YmnwZUD8;@J{;FA^1%)PVuR6RijTGgTDj3 z3#fg39HURIh-^)$5GR1v-PtI6N39@X6g&rPuFv`j)Cu@c!R)(XI<95Uc%9(TwSwv7 zrb<#bteUj-iY;rVyd{J>rRA!wrQeWl-oS5SjxXEHmi7P~sO7hrSHPCz9=pZ$k}MZp z!y8t1M;)tb=OxyJ@Gb?%k58NBsw*8`mU0zG7W@T#R8un$=|Hle{l`y{Ra2c&O;gjf zeU%)_X2K^2j9j@W^^%ppsXKXF%Cet;oj!bV$a|&4yf@1JI^R|lXK#ZKV2>~7>gV|~ zsN?Jv_$&~xqa*aGd*M%juK?ZNQnR-PxB)!b^Ya(usd=d_@LM2x;jrHlYFyrB@fqSP z@L+9lnhDhXNcax^0eo9{@B7reqzHogf$nRf=4*vo>!VDdZibIdQNVb8W5KX((=`2Mb=1G8clI{H zW*obReg-S-B5D*D=gnCDJAFc(E>3${|Bp7-mbG24;4B2eek0PKI5aXjD?jID#lNec zNYC5(l4rRYD>q$qt=WU4gRfzmD=*LbTPor2s52G*^Elp62gh*ttL4fSmO|YD|2X&* zpgHkT`qZuP2f%|s*lTL`dKi2Mcyx0AFXO4%yDIoG(0z3%cq%n|HzlhOZ-INeee+D9 zK7xc#;0@qgbtCYpIW6D8KY(y5s5uqeU=FKexrJQGvkUp)PrTWWKG80$VWSPnHSh-@ ZteTot*TJ2b-SALq9@+)&@i$xM{sDGkro;dM diff --git a/randomwallpaper@iflow.space/schemas/org.gnome.shell.extensions.space.iflow.randomwallpaper.gschema.xml b/randomwallpaper@iflow.space/schemas/org.gnome.shell.extensions.space.iflow.randomwallpaper.gschema.xml index a1e53e8..1f33f2d 100644 --- a/randomwallpaper@iflow.space/schemas/org.gnome.shell.extensions.space.iflow.randomwallpaper.gschema.xml +++ b/randomwallpaper@iflow.space/schemas/org.gnome.shell.extensions.space.iflow.randomwallpaper.gschema.xml @@ -61,6 +61,12 @@ Weather the gnome lock screen should also be set to the new wallpaper. + + false + Disable hover preview + Disables the preview of the background while hovering the history list + + - + @@ -45,23 +45,23 @@ 1 10 - + + 400 600 True True - in - 300 - True - True - + True - False - none + True + in + True + True - + True - True + False + none True @@ -314,18 +314,135 @@ 1 + + + True + False + 0 + in + + + True + False + 15 + 15 + 15 + 15 + + + True + False + 10 + 2 + + + True + False + True + True + + + True + False + start + Disable hover preview + + + 0 + 0 + + + + + True + False + True + Disable the desktop preview of the background while hovering the history items. Try enabeling if you encounter crashes or laggs of the gnome shell while using the extension. + True + True + 1 + 0 + + + + 0 + 1 + + + + + 0 + 0 + + + + + True + False + vertical + + + True + True + end + start + + + False + True + 0 + + + + + 1 + 0 + + + + + + + + + + + + False + True + 2 + + - - - True - False - General - - - False - - + + + + + + + True + False + General + + + False + + + + + True + True + in + True + True + + + True + False + none True @@ -426,21 +543,37 @@ - - 1 - - - - - True - False - History - - - 1 - False - + + + + + 1 + + + + + True + False + History + + + 1 + False + + + + + True + True + in + True + True + + + True + False + none True @@ -636,24 +769,24 @@ - - 2 - - - - - True - False - Auto-Fetching - - - 2 - False - + + 2 + + + + + True + False + Auto-Fetching + + + 2 + False + diff --git a/randomwallpaper@iflow.space/wallpaperController.js b/randomwallpaper@iflow.space/wallpaperController.js index a453c4b..15b9289 100644 --- a/randomwallpaper@iflow.space/wallpaperController.js +++ b/randomwallpaper@iflow.space/wallpaperController.js @@ -241,7 +241,7 @@ let WallpaperController = new Lang.Class({ }); }, - _backgroundTimout: function (delay) { + _backgroundTimeout: function (delay) { if (this.timeout) { return; } @@ -261,15 +261,19 @@ let WallpaperController = new Lang.Class({ }, previewWallpaper: function (historyid, delay) { - this.previewId = historyid; - this._resetWallpaper = false; + if (!this._settings.get('disable-hover-preview', 'boolean')) { + this.previewId = historyid; + this._resetWallpaper = false; - this._backgroundTimout(delay); + this._backgroundTimeout(delay); + } }, resetWallpaper: function () { - this._resetWallpaper = true; - this._backgroundTimout(); + if (!this._settings.get('disable-hover-preview', 'boolean')) { + this._resetWallpaper = true; + this._backgroundTimeout(); + } }, getHistoryController: function () {