Skip to content
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

Version 46 (legacy GNOME 44) #203

Open
wants to merge 25 commits into
base: gnome-44-legacy
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bf2170d
use shuffle timer when shuffling, click image fix
neffo Apr 1, 2023
be23b33
fetch all new unfetched images
neffo Apr 3, 2023
6619c4a
initial functional version of _downloadAllImages
neffo Apr 7, 2023
4829503
add image dimensions, new filters, uhd checks #202
neffo Apr 9, 2023
99858aa
Update Turkish translation (#204)
May 23, 2023
5c9c561
use array.filter()
neffo Jun 14, 2023
070a397
add random key to schema
neffo Jun 14, 2023
6b6d981
fix broken shuffle mode
neffo Jun 14, 2023
6a45b0e
Merge branch 'version-46' of https://github.com/neffo/bing-wallpaper-…
neffo Jun 14, 2023
484c93e
respond to random mode changes
neffo Jun 22, 2023
a76fc98
fix shuffle timing & support on hour, day, week
neffo Jun 26, 2023
18e3712
add shuffle mode to prefs, handle setting changes
neffo Jun 26, 2023
1e2bd5d
menu thumbnails hidpi now support hidpi
neffo Jun 26, 2023
cecb4c2
fix soup initialisation in prefs #208
neffo Jun 29, 2023
b326c6b
Remove inessential Korean translations
Jul 22, 2023
af0a829
Update Korean translation
Jul 22, 2023
7a4520e
fix signage in shuffle mode
neffo Jul 23, 2023
5f4d683
Fix spelling mistakes and set french apostrophe
ckrommenhoek Jul 28, 2023
e2a6240
add null check, fix restore behaivour
neffo Jul 30, 2023
2de0375
fix typo
neffo Jul 30, 2023
eb8941e
typo: Gnome -> GNOME
Aug 20, 2023
ef80ac9
debug log
neffo Sep 25, 2023
ccc0b05
Merge pull request #212 from sabriunal/typo-gnome
neffo Oct 21, 2023
0b41674
Merge pull request #209 from izotopo/master
neffo Oct 21, 2023
35906ae
Merge pull request #211 from ckrommenhoek/patch-1
neffo Oct 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
270 changes: 270 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,270 @@
---
# SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
# SPDX-FileCopyrightText: 2018 Claudio André <[email protected]>
env:
es2021: true
extends: 'eslint:recommended'
plugins:
- jsdoc
rules:
array-bracket-newline:
- error
- consistent
array-bracket-spacing:
- error
- never
array-callback-return: error
arrow-parens:
- error
- as-needed
arrow-spacing: error
block-scoped-var: error
block-spacing: error
brace-style: error
# Waiting for this to have matured a bit in eslint
# camelcase:
# - error
# - properties: never
# allow: [^vfunc_, ^on_, _instance_init]
comma-dangle:
- error
- arrays: always-multiline
objects: always-multiline
functions: never
comma-spacing:
- error
- before: false
after: true
comma-style:
- error
- last
computed-property-spacing: error
curly:
- error
- multi-or-nest
- consistent
dot-location:
- error
- property
eol-last: error
eqeqeq: error
func-call-spacing: error
func-name-matching: error
func-style:
- error
- declaration
- allowArrowFunctions: true
indent:
- error
- 4
- ignoredNodes:
# Allow not indenting the body of GObject.registerClass, since in the
# future it's intended to be a decorator
- 'CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child'
# Allow dedenting chained member expressions
MemberExpression: 'off'
jsdoc/check-alignment: error
jsdoc/check-param-names: error
jsdoc/check-tag-names: error
jsdoc/check-types: error
jsdoc/implements-on-classes: error
jsdoc/newline-after-description: error
jsdoc/require-jsdoc: error
jsdoc/require-param: error
jsdoc/require-param-description: error
jsdoc/require-param-name: error
jsdoc/require-param-type: error
key-spacing:
- error
- beforeColon: false
afterColon: true
keyword-spacing:
- error
- before: true
after: true
linebreak-style:
- error
- unix
lines-between-class-members:
- error
- always
- exceptAfterSingleLine: true
max-nested-callbacks: error
max-statements-per-line: error
new-parens: error
no-array-constructor: error
no-await-in-loop: error
no-caller: error
no-constant-condition:
- error
- checkLoops: false
no-div-regex: error
no-empty:
- error
- allowEmptyCatch: true
no-extra-bind: error
no-extra-parens:
- error
- all
- conditionalAssign: false
nestedBinaryExpressions: false
returnAssign: false
no-implicit-coercion:
- error
- allow:
- '!!'
no-invalid-this: error
no-iterator: error
no-label-var: error
no-lonely-if: error
no-loop-func: error
no-nested-ternary: error
no-new-object: error
no-new-wrappers: error
no-octal-escape: error
no-proto: error
no-prototype-builtins: 'off'
no-restricted-globals: [error, window]
no-restricted-properties:
- error
- object: imports
property: format
message: Use template strings
- object: pkg
property: initFormat
message: Use template strings
- object: Lang
property: copyProperties
message: Use Object.assign()
- object: Lang
property: bind
message: Use arrow notation or Function.prototype.bind()
- object: Lang
property: Class
message: Use ES6 classes
no-restricted-syntax:
- error
- selector: >-
MethodDefinition[key.name="_init"] >
FunctionExpression[params.length=1] >
BlockStatement[body.length=1]
CallExpression[arguments.length=1][callee.object.type="Super"][callee.property.name="_init"] >
Identifier:first-child
message: _init() that only calls super._init() is unnecessary
- selector: >-
MethodDefinition[key.name="_init"] >
FunctionExpression[params.length=0] >
BlockStatement[body.length=1]
CallExpression[arguments.length=0][callee.object.type="Super"][callee.property.name="_init"]
message: _init() that only calls super._init() is unnecessary
- selector: BinaryExpression[operator="instanceof"][right.name="Array"]
message: Use Array.isArray()
no-return-assign: error
no-return-await: error
no-self-compare: error
no-shadow: error
no-shadow-restricted-names: error
no-spaced-func: error
no-tabs: error
no-template-curly-in-string: error
no-throw-literal: error
no-trailing-spaces: error
no-undef-init: error
no-unneeded-ternary: error
no-unused-expressions: error
no-unused-vars:
- error
# Vars use a suffix _ instead of a prefix because of file-scope private vars
- varsIgnorePattern: (^unused|_$)
argsIgnorePattern: ^(unused|_)
no-useless-call: error
no-useless-computed-key: error
no-useless-concat: error
no-useless-constructor: error
no-useless-rename: error
no-useless-return: error
no-whitespace-before-property: error
no-with: error
nonblock-statement-body-position:
- error
- below
object-curly-newline:
- error
- consistent: true
multiline: true
object-curly-spacing: error
object-shorthand: error
operator-assignment: error
operator-linebreak: error
padded-blocks:
- error
- never
# These may be a bit controversial, we can try them out and enable them later
# prefer-const: error
# prefer-destructuring: error
prefer-numeric-literals: error
prefer-promise-reject-errors: error
prefer-rest-params: error
prefer-spread: error
prefer-template: error
quotes:
- error
- single
- avoidEscape: true
require-await: error
rest-spread-spacing: error
semi:
- error
- always
semi-spacing:
- error
- before: false
after: true
semi-style: error
space-before-blocks: error
space-before-function-paren:
- error
- named: never
# for `function ()` and `async () =>`, preserve space around keywords
anonymous: always
asyncArrow: always
space-in-parens: error
space-infix-ops:
- error
- int32Hint: false
space-unary-ops: error
spaced-comment: error
switch-colon-spacing: error
symbol-description: error
template-curly-spacing: error
template-tag-spacing: error
unicode-bom: error
wrap-iife:
- error
- inside
yield-star-spacing: error
yoda: error
settings:
jsdoc:
mode: typescript
globals:
ARGV: readonly
Debugger: readonly
GIRepositoryGType: readonly
globalThis: readonly
imports: readonly
Intl: readonly
log: readonly
logError: readonly
print: readonly
printerr: readonly
window: readonly
TextEncoder: readonly
TextDecoder: readonly
console: readonly
setTimeout: readonly
setInterval: readonly
clearTimeout: readonly
clearInterval: readonly
parserOptions:
ecmaVersion: 2022
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github: [neffo]
custom: ['https://flattr.com/@neffo']
ko_fi: [michaelcarroll]
20 changes: 11 additions & 9 deletions carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ var Carousel = class Carousel {
}

_create_gallery() {
Utils.randomIntervals.forEach((seconds, i) => {
let item = this._create_random_item(seconds, Utils.randomIntervalsTitle[i]);
Utils.randomIntervals.forEach((x) => {
let item = this._create_random_item(x.value, x.title);
if (Gtk.get_major_version() < 4)
this.flowBox.add(item);
else
Expand Down Expand Up @@ -156,7 +156,8 @@ var Carousel = class Carousel {
deleteButton.connect('clicked', (widget) => {
this.log('Delete requested for '+filename);
Utils.deleteImage(filename);
Utils.cleanupImageList(this.settings);
//Utils.cleanupImageList(this.settings);
Utils.hideImage(this.settings, [image]);
widget.get_parent().get_parent().set_visible(false); // bit of a hack
if (this.callbackfunc)
this.callbackfunc();
Expand All @@ -182,7 +183,7 @@ var Carousel = class Carousel {
return item;
}

_create_random_item(seconds, title) {
_create_random_item(interval, title) {
let buildable = new Gtk.Builder();

// grab appropriate object from UI file
Expand All @@ -195,13 +196,13 @@ var Carousel = class Carousel {

let randomLabel = buildable.get_object('randomLabel');
randomLabel.set_text(title);
let filename = 'random';
let applyButton = buildable.get_object('randomButton');

applyButton.connect('clicked', (widget) => {
this.settings.set_string('selected-image', filename);
this.settings.set_int('random-interval', seconds);
this.log('gallery selected random with interval '+seconds);
this.settings.set_string('random-interval-mode', interval);
//this.settings.set_int('random-interval', seconds);
this.settings.set_boolean('random-mode-enabled', true);
this.log('gallery selected random with interval '+interval+' ('+title+')');
});

let item = buildable.get_object('flowBoxRandom');
Expand All @@ -223,9 +224,10 @@ var Carousel = class Carousel {
let loadButton = buildable.get_object('loadButton');

loadButton.connect('clicked', (widget) => {
this.flowBox.remove(widget.get_parent());
widget.set_label(_("Loading..."));
this.flowBox.set_max_children_per_line(2);
this._create_gallery();
this.flowBox.remove(widget.get_parent());
});

let item = buildable.get_object('flowBoxPlaceholder');
Expand Down
Loading