diff --git a/cinnamon-dynamic-wallpaper@TobiZog/5.4/extension.js b/cinnamon-dynamic-wallpaper@TobiZog/5.4/extension.js index 853b98e..c893cb4 100644 --- a/cinnamon-dynamic-wallpaper@TobiZog/5.4/extension.js +++ b/cinnamon-dynamic-wallpaper@TobiZog/5.4/extension.js @@ -237,11 +237,29 @@ CinnamonDynamicWallpaperExtension.prototype = { }, + /** + * Main loop + */ + _loop: function () { + if (looping) { + this.setImageToTime() + + if (lastLocationUpdate < new Date().getTime() - this.locationRefreshTime * 1000) { + this.updateLocation() + lastLocationUpdate = new Date() + } + + // Refresh every 60 seconds + Mainloop.timeout_add_seconds(60, Lang.bind(this, this._loop)); + } + }, + + /******************** UI Callbacks ********************/ /** * Callback for settings-schema - * Opens the external heic-importer window + * Opens the external image configurator window */ openImageConfigurator: function() { Util.spawnCommandLine("/usr/bin/env python3 " + @@ -251,7 +269,7 @@ CinnamonDynamicWallpaperExtension.prototype = { /** * Callback for settings-schema - * Opens the browser and navigate to the URL of the respository + * Opens the browser and navigates to the URL of the respository */ openRepoWebsite: function() { Util.spawnCommandLine("xdg-open https://github.com/TobiZog/cinnamon-dynamic-wallpaper"); @@ -259,20 +277,20 @@ CinnamonDynamicWallpaperExtension.prototype = { /** - * Main loop + * Callback for settings-schema + * Opens the browser and navigates to the URL of the Cinnamon Spices extension */ - _loop: function() { - if(looping) { - this.setImageToTime() + openSpicesWebsite: function() { + Util.spawnCommandLine("xdg-open https://cinnamon-spices.linuxmint.com/extensions/view/97") + }, - if (lastLocationUpdate < new Date().getTime() - this.locationRefreshTime * 1000) { - this.updateLocation() - lastLocationUpdate = new Date() - } - - // Refresh every 60 seconds - Mainloop.timeout_add_seconds(60, Lang.bind(this, this._loop)); - } + + /** + * Callback for settings-schema + * Opens the browser and navigates to the GitHub issue page + */ + openIssueWebsite: function() { + Util.spawnCommandLine("xdg-open https://github.com/TobiZog/cinnamon-dynamic-wallpaper/issues/new") } } diff --git a/cinnamon-dynamic-wallpaper@TobiZog/5.4/settings-schema.json b/cinnamon-dynamic-wallpaper@TobiZog/5.4/settings-schema.json index b5a61d1..7fc3feb 100644 --- a/cinnamon-dynamic-wallpaper@TobiZog/5.4/settings-schema.json +++ b/cinnamon-dynamic-wallpaper@TobiZog/5.4/settings-schema.json @@ -19,9 +19,12 @@ "title": "About", "sections": [ "sec_project", - "sec_github" + "sec_github", + "sec_report_issue" ] }, + + "sec_image_configuration": { "type": "section", "title": "Image set", @@ -52,7 +55,9 @@ "title": "About the project", "keys": [ "lb_about", - "lb_author" + "lb_author", + "lb_spices", + "btn_spices" ] }, "sec_github": { @@ -62,8 +67,18 @@ "lb_repository", "btn_open_repository" ] + }, + "sec_report_issue": { + "type": "section", + "title": "Report an issue", + "keys": [ + "lb_report_issue", + "btn_report_issue" + ] } }, + + "lb_image_configuration": { "type": "label", "description": "Choose an included image set or import a heic-file with the Image Configurator" @@ -104,6 +119,8 @@ "description": "Time sections today", "default": "" }, + + "lb_about": { "type": "label", "description": "Based on a location, this extension calculates the periods of a day and switch the background image of your Cinnamon desktop. The extension offers the choice between a set of predownloaded wallpapers or to select a custom set of images." @@ -112,6 +129,16 @@ "type": "label", "description": "Developed by TobiZog" }, + "lb_spices": { + "type": "label", + "description": "If you want more information or rate the extension, you can visit the site Cinnamon Spices Website." + }, + "btn_spices": { + "type": "button", + "description": "Cinnamon Dynamic Wallpaper at Cinnamon Spices Website", + "callback": "openSpicesWebsite" + }, + "lb_repository": { "type": "label", "description": "This project is Open Source. You can visit the whole source code of this extension on GitHub" @@ -121,6 +148,19 @@ "description": "Open the Repository", "callback": "openRepoWebsite" }, + + "lb_report_issue": { + "type": "label", + "description": "Do you find an issue? Or want a new feature? Go to the GitHub repository and create a new issue." + }, + + "btn_report_issue": { + "type": "button", + "description": "Submit an Issue", + "callback": "openIssueWebsite" + }, + + "etr_choosen_image_set": { "type": "entry", "default": "lakeside",