-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bing-wallpaper@starcross.dev: Add force refresh menu. #6718
base: master
Are you sure you want to change the base?
bing-wallpaper@starcross.dev: Add force refresh menu. #6718
Conversation
cc @Starcross |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR, I like this idea! I've left a few comments...
@@ -45,10 +47,19 @@ BingWallpaperApplet.prototype = { | |||
this.wallpaperPath = `${this.wallpaperDir}/BingWallpaper.jpg`; | |||
this.metaDataPath = `${this.wallpaperDir}/meta.json`; | |||
|
|||
let refreshBg = new PopupMenu.PopupIconMenuItem(_("Refresh Now"), "view-refresh", St.IconType.SYMBOLIC); | |||
refreshBg.connect('activate', Lang.bind(this, function() { | |||
this.forceReload = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using a forceReload
flag, I think it may be enough to simply make a call to _downloadMetaData
here.
The only difference this makes to the behaviour I can think of is that the timer will not be reset, but I don't think this matters. The idea of a refresh 'now' could be understood as an additional one anyway.
@@ -140,7 +151,7 @@ BingWallpaperApplet.prototype = { | |||
|
|||
_downloadMetaData: function () { | |||
const process_result = data => { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need these extra line spaces? I appreciate the formatting is not consistent anyway!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually just looks like whitespace was trimmed, possibly by some auto-formatting. GitHub has a feature where you can view diffs with whitespace changes hidden as well. This doesn't seem like a bad thing since it is minor here.
I would like to make this wonderful applet even better.
It seems that once you change the background manually, you can't immediately change it to a bing background. So I would like to add the ability to refresh it immediately.
Please let me know if there is a better way to do this in implementing the feature.