From 7c5e86e8dc783712392bd4c84f158364caf67aaa Mon Sep 17 00:00:00 2001 From: Tobias Date: Sat, 23 Dec 2023 14:02:31 +0100 Subject: [PATCH] Bind settings window to Cinnamon Spiced pref button --- .../5.4/extension.js | 135 +- .../5.4/icons/icon.png | Bin 0 -> 9361 bytes .../5.4/preferences/enums/PreferenceEnums.py | 54 +- .../5.4/preferences/preferences.glade | 108 +- .../5.4/preferences/preferences.py | 245 +- .../scripts/cinnamon_pref_handler.py | 17 +- .../5.4/preferences/scripts/location.py | 3 + .../5.4/scripts/communication.js | 28 - .../5.4/settings-schema.json | 319 +- cinnamon-dynamic-wallpaper@TobiZog/icon.png | 1 + .../metadata.json | 1 + ...obizog.cinnamonDynamicWallpaper.Source.svg | 3326 +++++++++++++++++ 12 files changed, 3603 insertions(+), 634 deletions(-) create mode 100644 cinnamon-dynamic-wallpaper@TobiZog/5.4/icons/icon.png mode change 100644 => 100755 cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences/preferences.py create mode 100644 cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences/scripts/location.py create mode 120000 cinnamon-dynamic-wallpaper@TobiZog/icon.png create mode 100644 res/de.tobizog.cinnamonDynamicWallpaper.Source.svg diff --git a/cinnamon-dynamic-wallpaper@TobiZog/5.4/extension.js b/cinnamon-dynamic-wallpaper@TobiZog/5.4/extension.js index 66cac84..ff4d975 100644 --- a/cinnamon-dynamic-wallpaper@TobiZog/5.4/extension.js +++ b/cinnamon-dynamic-wallpaper@TobiZog/5.4/extension.js @@ -15,9 +15,9 @@ const Lang = imports.lang; const { find_program_in_path } = imports.gi.GLib; const Gio = imports.gi.Gio; -let suntimes = require('./scripts/suntimes') -let location = require('./scripts/location') -let communication = require('./scripts/communication') +// let suntimes = require('./scripts/suntimes') +// let location = require('./scripts/location') +// let communication = require('./scripts/communication') /******************** Constants ********************/ @@ -64,44 +64,38 @@ CinnamonDynamicWallpaperExtension.prototype = { /** Configuration */ // Image set - this.bindSettings("sw_image_stretch", "imageStretch", this.settingsUpdated) + // this.bindSettings("sw_image_stretch", "imageStretch", this.settingsUpdated) - // Location estimation - this.bindSettings("sw_auto_location", "autolocation", this.settingsUpdated) - this.bindSettings("sc_location_refresh_time", "locationRefreshTime", this.settingsUpdated) - this.bindSettings("etr_last_update", "etrLastUpdate") - this.bindSettings("etr_latitude", "latitude", this.settingsUpdated) - this.bindSettings("etr_longitude", "longitude", this.settingsUpdated) - - // Time periods - this.bindSettings("tv_times", "tvTimes") - - - /** Debugging */ - // Logs - this.bindSettings("tv_logs", "tvLogs") + // // Location estimation + // this.bindSettings("sw_auto_location", "autolocation", this.settingsUpdated) + // this.bindSettings("sc_location_refresh_time", "locationRefreshTime", this.settingsUpdated) + // this.bindSettings("etr_last_update", "etrLastUpdate") + // this.bindSettings("etr_latitude", "latitude", this.settingsUpdated) + // this.bindSettings("etr_longitude", "longitude", this.settingsUpdated) + // // Time periods + // this.bindSettings("tv_times", "tvTimes") // Image Configurator - this.bindSettings("etr_img_morning_twilight", "img_morning_twilight", this.settingsUpdated) - this.bindSettings("etr_img_sunrise", "img_sunrise", this.settingsUpdated) - this.bindSettings("etr_img_morning", "img_morning", this.settingsUpdated) - this.bindSettings("etr_img_noon", "img_noon", this.settingsUpdated) - this.bindSettings("etr_img_afternoon", "img_afternoon", this.settingsUpdated) - this.bindSettings("etr_img_evening", "img_evening", this.settingsUpdated) - this.bindSettings("etr_img_sunset", "img_sunset", this.settingsUpdated) - this.bindSettings("etr_img_night_twilight", "img_night_twilight", this.settingsUpdated) - this.bindSettings("etr_img_night", "img_night", this.settingsUpdated) + // this.bindSettings("etr_img_morning_twilight", "img_morning_twilight", this.settingsUpdated) + // this.bindSettings("etr_img_sunrise", "img_sunrise", this.settingsUpdated) + // this.bindSettings("etr_img_morning", "img_morning", this.settingsUpdated) + // this.bindSettings("etr_img_noon", "img_noon", this.settingsUpdated) + // this.bindSettings("etr_img_afternoon", "img_afternoon", this.settingsUpdated) + // this.bindSettings("etr_img_evening", "img_evening", this.settingsUpdated) + // this.bindSettings("etr_img_sunset", "img_sunset", this.settingsUpdated) + // this.bindSettings("etr_img_night_twilight", "img_night_twilight", this.settingsUpdated) + // this.bindSettings("etr_img_night", "img_night", this.settingsUpdated) - this.bindSettings("etr_morning_twilight_times", "img_morning_twilight_times") - this.bindSettings("etr_sunrise_times", "img_sunrise_times") - this.bindSettings("etr_morning_times", "img_morning_times") - this.bindSettings("etr_noon_times", "img_noon_times") - this.bindSettings("etr_afternoon_times", "img_afternoon_times") - this.bindSettings("etr_evening_times", "img_evening_times") - this.bindSettings("etr_sunset_times", "img_sunset_times") - this.bindSettings("etr_night_twilight_times", "img_night_twilight_times") - this.bindSettings("etr_night_times", "img_night_times") + // this.bindSettings("etr_morning_twilight_times", "img_morning_twilight_times") + // this.bindSettings("etr_sunrise_times", "img_sunrise_times") + // this.bindSettings("etr_morning_times", "img_morning_times") + // this.bindSettings("etr_noon_times", "img_noon_times") + // this.bindSettings("etr_afternoon_times", "img_afternoon_times") + // this.bindSettings("etr_evening_times", "img_evening_times") + // this.bindSettings("etr_sunset_times", "img_sunset_times") + // this.bindSettings("etr_night_twilight_times", "img_night_twilight_times") + // this.bindSettings("etr_night_times", "img_night_times") // Check for the first startup @@ -126,10 +120,8 @@ CinnamonDynamicWallpaperExtension.prototype = { } } - this.writeToLogs("Initialization completed") - // Set image initial at desktop wallpaper - this.setImageToTime() + //this.setImageToTime() // Start the main loop, checks in fixed time periods the this._loop() @@ -158,7 +150,7 @@ CinnamonDynamicWallpaperExtension.prototype = { */ _loop: function () { if (looping) { - this.setImageToTime() + //this.setImageToTime() // Update the location, if the user choose "autoLocation" and the timer has expired if ((lastLocationUpdate == -1 || @@ -171,60 +163,10 @@ CinnamonDynamicWallpaperExtension.prototype = { // Refresh every 60 seconds Mainloop.timeout_add_seconds(60, Lang.bind(this, this._loop)); - this.writeToLogs("Main loop runs...") } }, - /******************** Settings handling ********************/ - - /** - * Handles changes in settings - */ - settingsUpdated: function() { - lastDayTime = suntimes.DAYPERIOD.NONE - - this.updateLocation() - this.setImageToTime() - }, - - /** - * Callback for settings-schema - * Opens the external image configurator window - */ - openImageConfigurator: function () { - Util.spawnCommandLine("/usr/bin/env python3 " + - DIRECTORY.path + "/image-configurator/image-configurator.py"); - }, - - - /** - * Callback for settings-schema - * Opens the browser and navigates to the URL of the respository - */ - openRepoWebsite: function () { - Util.spawnCommandLine("xdg-open https://github.com/TobiZog/cinnamon-dynamic-wallpaper"); - }, - - - /** - * Callback for settings-schema - * Opens the browser and navigates to the URL of the Cinnamon Spices extension - */ - openSpicesWebsite: function () { - Util.spawnCommandLine("xdg-open https://cinnamon-spices.linuxmint.com/extensions/view/97") - }, - - - /** - * 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") - }, - - /******************** Other functions ********************/ /** @@ -246,8 +188,6 @@ CinnamonDynamicWallpaperExtension.prototype = { Gio.Settings.sync(); gSetting.apply(); - - this.writeToLogs("Set new image: " + imageURI) }, @@ -321,18 +261,7 @@ CinnamonDynamicWallpaperExtension.prototype = { this.etrLastUpdate = lastLocationUpdate.getHours() + ":" + lastLocationUpdate.getMinutes() } - - this.writeToLogs("Location updated") }, - - /** - * Adding text to the logs - * - * @param {string} msg New message string - */ - writeToLogs: function(msg) { - this.tvLogs = communication.createLogs(this.tvLogs, msg) - } } diff --git a/cinnamon-dynamic-wallpaper@TobiZog/5.4/icons/icon.png b/cinnamon-dynamic-wallpaper@TobiZog/5.4/icons/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7d1c2f06504c81faec8cec73aef5fcb31c4657d1 GIT binary patch literal 9361 zcmb_?Wmr^U^Y_`Md+DVlrMr=Ckv3SGrKLeqsig#@RHOwIL_t7OKyqOzk*)>lmM&>n z{_FGM|K)wI_j*6PAND$X%{?>c%*=1*+-K&FH!{#BBW5H90Dw&AzQ#iU0Ac@v07881 z#qw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_bIUoG4SygQ`{TrXXE&?dmN2!sT9F`BOmQ zbjm&rmO|W zQXkk37k~yLXOvShIueimxe+DRftjX69Za(D9$NuBG=evm1=IU{$6&&8{qyf;lwntT zRgLmY+UCwsH2raaz!FPX-EC-3e)*7Yo#4g2plXlrN^PmTfo29=&#jlm^ZZy?7N!R4 zCgyenF=qz`eSBADcdwY5tOi&2oqq+!h)rH9By>eH*OO@CO*d4!^KysyLz{)=uQ6=k zh)Ln&-*M0vj4mBPjC(}4GfS0)yZJbYpf~q%N1oEWx&P_J=9j%rLAQE= z6?ZBTT>_p{4Fg?5(Lbs&4J9G21r8g8kON9MD{-rRoUaRG7<(r50e6!f$p2z*5&e`t zJQS0%F7jZ5Zj1^z-WZ|~jhO3*koeCThT4IRz#+}-FDW`RAwb}qKiVgi%L-?aM#Tyg zU2Er_1E=~He7+>t>gRQ@oH{b(s%c@4j)Bt<;P%p;jU5z400 ../icon.svg center - + True @@ -76,7 +76,7 @@ True True True - + True @@ -126,7 +126,7 @@ True True True - + True @@ -176,7 +176,7 @@ True True True - + True @@ -979,7 +979,7 @@ True True True - + True @@ -1031,7 +1031,7 @@ True True True - + True @@ -1081,7 +1081,7 @@ True True True - + True @@ -1191,47 +1191,7 @@ True True adjustment1 - - - False - True - 1 - - - - - - - - - True - True - - - True - False - 8 - 8 - 8 - 8 - True - - - True - False - start - Latitude - - - False - True - 0 - - - - - True - True + False @@ -1273,6 +1233,50 @@ True True + + + + False + True + 1 + + + + + + + + + True + True + + + True + False + 8 + 8 + 8 + 8 + True + + + True + False + start + Latitude + + + False + True + 0 + + + + + True + True + number + False @@ -2380,7 +2384,7 @@ 12 12 12 - + @@ -2448,7 +2452,7 @@ 12 12 12 - + @@ -2518,7 +2522,7 @@ 12 12 12 - + @@ -2561,7 +2565,7 @@ False True True - + diff --git a/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences/preferences.py b/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences/preferences.py old mode 100644 new mode 100755 index 5542f38..9d153d7 --- a/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences/preferences.py +++ b/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences/preferences.py @@ -5,6 +5,7 @@ import gi, os, subprocess from scripts.time_bar import create_bar_chart from scripts.cinnamon_pref_handler import * from scripts.suntimes import * +from scripts.location import * from enums.PreferenceEnums import PrefenceEnums from enums.ImageSourceEnum import ImageSourceEnum from enums.PeriodSourceEnum import PeriodSourceEnum @@ -17,6 +18,8 @@ from gi.repository import Gtk, GdkPixbuf GLADE_URI = os.path.dirname(os.path.abspath(__file__)) + "/preferences.glade" + + class Preferences: """ Preference window class """ @@ -28,21 +31,55 @@ class Preferences: self.builder.add_from_file(GLADE_URI) self.builder.connect_signals(self) - self.suntimes = Suntimes(48.1663, 11.5683) + # Load all settings from file + self.settings_dict = { + PrefenceEnums.EXPAND_OVER_ALL_DISPLAY: read_str_from_preferences(PrefenceEnums.EXPAND_OVER_ALL_DISPLAY), + PrefenceEnums.SHOW_ON_LOCK_SCREEN: read_str_from_preferences(PrefenceEnums.SHOW_ON_LOCK_SCREEN), + PrefenceEnums.IMAGE_SOURCE: read_str_from_preferences(PrefenceEnums.IMAGE_SOURCE), + PrefenceEnums.SELECTED_IMAGE_SET: read_str_from_preferences(PrefenceEnums.SELECTED_IMAGE_SET), + PrefenceEnums.PERIOD_0_IMAGE: read_str_from_preferences(PrefenceEnums.PERIOD_0_IMAGE), + PrefenceEnums.PERIOD_1_IMAGE: read_str_from_preferences(PrefenceEnums.PERIOD_1_IMAGE), + PrefenceEnums.PERIOD_2_IMAGE: read_str_from_preferences(PrefenceEnums.PERIOD_2_IMAGE), + PrefenceEnums.PERIOD_3_IMAGE: read_str_from_preferences(PrefenceEnums.PERIOD_3_IMAGE), + PrefenceEnums.PERIOD_4_IMAGE: read_str_from_preferences(PrefenceEnums.PERIOD_4_IMAGE), + PrefenceEnums.PERIOD_5_IMAGE: read_str_from_preferences(PrefenceEnums.PERIOD_5_IMAGE), + PrefenceEnums.PERIOD_6_IMAGE: read_str_from_preferences(PrefenceEnums.PERIOD_6_IMAGE), + PrefenceEnums.PERIOD_7_IMAGE: read_str_from_preferences(PrefenceEnums.PERIOD_7_IMAGE), + PrefenceEnums.PERIOD_8_IMAGE: read_str_from_preferences(PrefenceEnums.PERIOD_8_IMAGE), + PrefenceEnums.PERIOD_9_IMAGE: read_str_from_preferences(PrefenceEnums.PERIOD_9_IMAGE), + PrefenceEnums.PERIOD_SOURCE: read_str_from_preferences(PrefenceEnums.PERIOD_SOURCE), + PrefenceEnums.LOCATION_REFRESH_INTERVALS: read_int_from_preferences(PrefenceEnums.LOCATION_REFRESH_INTERVALS), + PrefenceEnums.LATITUDE: read_float_from_preferences(PrefenceEnums.LATITUDE), + PrefenceEnums.LONGITUDE: read_float_from_preferences(PrefenceEnums.LONGITUDE), + PrefenceEnums.PERIOD_0_STARTTIME: read_str_from_preferences(PrefenceEnums.PERIOD_0_STARTTIME), + PrefenceEnums.PERIOD_1_STARTTIME: read_str_from_preferences(PrefenceEnums.PERIOD_1_STARTTIME), + PrefenceEnums.PERIOD_2_STARTTIME: read_str_from_preferences(PrefenceEnums.PERIOD_2_STARTTIME), + PrefenceEnums.PERIOD_3_STARTTIME: read_str_from_preferences(PrefenceEnums.PERIOD_3_STARTTIME), + PrefenceEnums.PERIOD_4_STARTTIME: read_str_from_preferences(PrefenceEnums.PERIOD_4_STARTTIME), + PrefenceEnums.PERIOD_5_STARTTIME: read_str_from_preferences(PrefenceEnums.PERIOD_5_STARTTIME), + PrefenceEnums.PERIOD_6_STARTTIME: read_str_from_preferences(PrefenceEnums.PERIOD_6_STARTTIME), + PrefenceEnums.PERIOD_7_STARTTIME: read_str_from_preferences(PrefenceEnums.PERIOD_7_STARTTIME), + PrefenceEnums.PERIOD_8_STARTTIME: read_str_from_preferences(PrefenceEnums.PERIOD_8_STARTTIME), + PrefenceEnums.PERIOD_9_STARTTIME: read_str_from_preferences(PrefenceEnums.PERIOD_9_STARTTIME), + } + + + # Suntimes object + self.suntimes = Suntimes(self.settings_dict[PrefenceEnums.LATITUDE], self.settings_dict[PrefenceEnums.LONGITUDE]) ########## UI objects ########## ## Image Configuration - self.tbImageSet = self.builder.get_object("tb_image_set") - self.tbHeicFile = self.builder.get_object("tb_heic_file") - self.tbSourceFolder = self.builder.get_object("tb_source_folder") - self.lbrImageSet = self.builder.get_object("lbr_image_set") - self.lbrHeicFile = self.builder.get_object("lbr_heic_file") - self.lbrSourceFolder = self.builder.get_object("lbr_source_folder") - self.imgBar = self.builder.get_object("img_bar") - self.swExpandOverAllDisplays = self.builder.get_object("sw_expand_over_all_displays") - self.swShowOnLockScreen = self.builder.get_object("sw_show_on_lock_screen") + self.tb_image_set = self.builder.get_object("tb_image_set") + self.tb_heic_file = self.builder.get_object("tb_heic_file") + self.tb_source_folder = self.builder.get_object("tb_source_folder") + self.lbr_image_set = self.builder.get_object("lbr_image_set") + self.lbr_heic_file = self.builder.get_object("lbr_heic_file") + self.lbr_source_folder = self.builder.get_object("lbr_source_folder") + self.img_bar = self.builder.get_object("img_bar") + self.sw_expand_over_all_displays = self.builder.get_object("sw_expand_over_all_displays") + self.sw_show_on_lock_screen = self.builder.get_object("sw_show_on_lock_screen") self.etr_periods = [ self.builder.get_object("etr_period_1"), self.builder.get_object("etr_period_2"), self.builder.get_object("etr_period_3"), self.builder.get_object("etr_period_4"), @@ -52,16 +89,16 @@ class Preferences: ] ## Location & Times - self.tbNetworkLocation = self.builder.get_object("tb_network_location") - self.tbCustomLocation = self.builder.get_object("tb_custom_location") - self.tbTimePeriods = self.builder.get_object("tb_time_periods") - self.lbrNetworkLocation = self.builder.get_object("lbr_network_location") - self.spbNetworkLocationRefreshTime = self.builder.get_object("spb_network_location_refresh_time") - self.lbrCustomLocationLongitude = self.builder.get_object("lbr_custom_location_longitude") - self.lbrCustomLocationLatitude = self.builder.get_object("lbr_custom_location_latitude") - self.lbrTimePeriods = self.builder.get_object("lbr_time_periods") - self.etrLongitude = self.builder.get_object("etr_longitude") - self.etrLatitude = self.builder.get_object("etr_latitude") + self.tb_network_location = self.builder.get_object("tb_network_location") + self.tb_custom_location = self.builder.get_object("tb_custom_location") + self.tb_time_periods = self.builder.get_object("tb_time_periods") + self.lbr_network_location = self.builder.get_object("lbr_network_location") + self.spb_network_location_refresh_time = self.builder.get_object("spb_network_location_refresh_time") + self.lbr_custom_location_longitude = self.builder.get_object("lbr_custom_location_longitude") + self.lbr_custom_location_latitude = self.builder.get_object("lbr_custom_location_latitude") + self.lbr_time_periods = self.builder.get_object("lbr_time_periods") + self.etr_longitude = self.builder.get_object("etr_longitude") + self.etr_latitude = self.builder.get_object("etr_latitude") def show(self): @@ -72,27 +109,27 @@ class Preferences: # Load from preferences - if read_str_from_preferences(PrefenceEnums.IMAGESOURCE) == ImageSourceEnum.IMAGESET: - self.tbImageSet.set_active(True) - elif read_str_from_preferences(PrefenceEnums.IMAGESOURCE) == ImageSourceEnum.HEICFILE: - self.tbHeicFile.set_active(True) - elif read_str_from_preferences(PrefenceEnums.IMAGESOURCE) == ImageSourceEnum.SOURCEFOLDER: - self.tbSourceFolder.set_active(True) + if self.settings_dict[PrefenceEnums.IMAGE_SOURCE] == ImageSourceEnum.IMAGESET: + self.tb_image_set.set_active(True) + elif self.settings_dict[PrefenceEnums.IMAGE_SOURCE] == ImageSourceEnum.HEICFILE: + self.tb_heic_file.set_active(True) + elif self.settings_dict[PrefenceEnums.IMAGE_SOURCE] == ImageSourceEnum.SOURCEFOLDER: + self.tb_source_folder.set_active(True) - self.swExpandOverAllDisplays.set_active(read_str_from_preferences(PrefenceEnums.EXPANDOVERALLDISPLAY)) - self.swShowOnLockScreen.set_active(read_str_from_preferences(PrefenceEnums.SHOWONLOCKSCREEN)) + self.sw_expand_over_all_displays.set_active(self.settings_dict[PrefenceEnums.EXPAND_OVER_ALL_DISPLAY]) + self.sw_show_on_lock_screen.set_active(self.settings_dict[PrefenceEnums.SHOW_ON_LOCK_SCREEN]) - if read_str_from_preferences(PrefenceEnums.PERIODSOURCE) == PeriodSourceEnum.NETWORKLOCATION: - self.tbNetworkLocation.set_active(True) - elif read_str_from_preferences(PrefenceEnums.PERIODSOURCE) == PeriodSourceEnum.CUSTOMLOCATION: - self.tbCustomLocation.set_active(True) - elif read_str_from_preferences(PrefenceEnums.PERIODSOURCE) == PeriodSourceEnum.CUSTOMTIMEPERIODS: - self.tbTimePeriods.set_active(True) + if self.settings_dict[PrefenceEnums.PERIOD_SOURCE] == PeriodSourceEnum.NETWORKLOCATION: + self.tb_network_location.set_active(True) + elif self.settings_dict[PrefenceEnums.PERIOD_SOURCE] == PeriodSourceEnum.CUSTOMLOCATION: + self.tb_custom_location.set_active(True) + elif self.settings_dict[PrefenceEnums.PERIOD_SOURCE] == PeriodSourceEnum.CUSTOMTIMEPERIODS: + self.tb_time_periods.set_active(True) - self.spbNetworkLocationRefreshTime.set_value(read_int_from_preferences(PrefenceEnums.LOCATIONREFRESHINTERVALS)) - self.etrLatitude.set_text(read_str_from_preferences(PrefenceEnums.LATITUDE)) - self.etrLongitude.set_text(read_str_from_preferences(PrefenceEnums.LONGITUDE)) + self.spb_network_location_refresh_time.set_value(read_int_from_preferences(PrefenceEnums.LOCATION_REFRESH_INTERVALS)) + self.etr_latitude.set_text(str(self.settings_dict[PrefenceEnums.LATITUDE])) + self.etr_longitude.set_text(str(self.settings_dict[PrefenceEnums.LONGITUDE])) ########## Time diagram ########## @@ -113,14 +150,14 @@ class Preferences: # Load to the view pixbuf = GdkPixbuf.Pixbuf.new_from_file("time_bar.svg") - self.imgBar.set_from_pixbuf(pixbuf) + self.img_bar.set_from_pixbuf(pixbuf) # Show the main window Gtk.main() - def onDestroy(self, *args): + def on_destroy(self, *args): """ Lifecycle handler when window will be destroyed """ Gtk.main_quit() @@ -130,105 +167,101 @@ class Preferences: ## Image Configuration - def onToggleButtonImageSetClicked(self, button): + def on_toggle_button_image_set_clicked(self, button): if button.get_active(): - self.tbHeicFile.set_active(False) - self.tbSourceFolder.set_active(False) + self.settings_dict[PrefenceEnums.IMAGE_SOURCE] = ImageSourceEnum.IMAGESET + self.tb_heic_file.set_active(False) + self.tb_source_folder.set_active(False) - self.lbrImageSet.set_visible(True) - self.lbrHeicFile.set_visible(False) - self.lbrSourceFolder.set_visible(False) + self.lbr_image_set.set_visible(True) + self.lbr_heic_file.set_visible(False) + self.lbr_source_folder.set_visible(False) - def onToggleButtonHeicFileClicked(self, button): + def on_toggle_button_heic_file_clicked(self, button): if button.get_active(): - self.tbImageSet.set_active(False) - self.tbSourceFolder.set_active(False) + self.settings_dict[PrefenceEnums.IMAGE_SOURCE] = ImageSourceEnum.HEICFILE + self.tb_image_set.set_active(False) + self.tb_source_folder.set_active(False) - self.lbrImageSet.set_visible(False) - self.lbrHeicFile.set_visible(True) - self.lbrSourceFolder.set_visible(False) + self.lbr_image_set.set_visible(False) + self.lbr_heic_file.set_visible(True) + self.lbr_source_folder.set_visible(False) - def onToggleButtonSourceFolderClicked(self, button): + def on_toggle_button_source_folder_clicked(self, button): if button.get_active(): - self.tbImageSet.set_active(False) - self.tbHeicFile.set_active(False) + self.settings_dict[PrefenceEnums.IMAGE_SOURCE] = ImageSourceEnum.SOURCEFOLDER + self.tb_image_set.set_active(False) + self.tb_heic_file.set_active(False) - self.lbrImageSet.set_visible(False) - self.lbrHeicFile.set_visible(False) - self.lbrSourceFolder.set_visible(True) + self.lbr_image_set.set_visible(False) + self.lbr_heic_file.set_visible(False) + self.lbr_source_folder.set_visible(True) ## Location & Times - def onToggleButtonNetworkLocationClicked(self, button): + def on_toggle_button_network_location_clicked(self, button): if button.get_active(): - self.tbCustomLocation.set_active(False) - self.tbTimePeriods.set_active(False) + self.settings_dict[PrefenceEnums.PERIOD_SOURCE] = PeriodSourceEnum.NETWORKLOCATION + self.tb_custom_location.set_active(False) + self.tb_time_periods.set_active(False) - self.lbrNetworkLocation.set_visible(True) - self.lbrCustomLocationLongitude.set_visible(False) - self.lbrCustomLocationLatitude.set_visible(False) - self.lbrTimePeriods.set_visible(False) + self.lbr_network_location.set_visible(True) + self.lbr_custom_location_longitude.set_visible(False) + self.lbr_custom_location_latitude.set_visible(False) + self.lbr_time_periods.set_visible(False) - def onToggleButtonCustomLocationClicked(self, button): + def on_toggle_button_custom_location_clicked(self, button): if button.get_active(): - self.tbNetworkLocation.set_active(False) - self.tbTimePeriods.set_active(False) + self.settings_dict[PrefenceEnums.PERIOD_SOURCE] = PeriodSourceEnum.CUSTOMLOCATION + self.tb_network_location.set_active(False) + self.tb_time_periods.set_active(False) - self.lbrNetworkLocation.set_visible(False) - self.lbrCustomLocationLongitude.set_visible(True) - self.lbrCustomLocationLatitude.set_visible(True) - self.lbrTimePeriods.set_visible(False) + self.lbr_network_location.set_visible(False) + self.lbr_custom_location_longitude.set_visible(True) + self.lbr_custom_location_latitude.set_visible(True) + self.lbr_time_periods.set_visible(False) - def onToggleButtonTimePeriodsClicked(self, button): + def on_toggle_button_time_periods_clicked(self, button): if button.get_active(): - self.tbNetworkLocation.set_active(False) - self.tbCustomLocation.set_active(False) + self.settings_dict[PrefenceEnums.PERIOD_SOURCE] = PeriodSourceEnum.CUSTOMTIMEPERIODS + self.tb_network_location.set_active(False) + self.tb_custom_location.set_active(False) - self.lbrNetworkLocation.set_visible(False) - self.lbrCustomLocationLongitude.set_visible(False) - self.lbrCustomLocationLatitude.set_visible(False) - self.lbrTimePeriods.set_visible(True) + self.lbr_network_location.set_visible(False) + self.lbr_custom_location_longitude.set_visible(False) + self.lbr_custom_location_latitude.set_visible(False) + self.lbr_time_periods.set_visible(True) + + def on_spb_network_location_refresh_time_changed(self, spin_button): + self.settings_dict[PrefenceEnums.LOCATION_REFRESH_INTERVALS] = spin_button.get_value() + + def on_etr_longitude_changed(self, entry): + self.settings_dict[PrefenceEnums.LONGITUDE] = entry.get_text() + + def on_etr_latitude_changed(self, entry): + self.settings_dict[PrefenceEnums.LATITUDE] = entry.get_text() # About - def onCinnamonSpicesWebsiteButtonClicked(self, button): + def on_cinnamon_spices_website_button_clicked(self, button): subprocess.Popen(["xdg-open", "https://cinnamon-spices.linuxmint.com/extensions/view/97"]) - def onGithubWebsiteButtonClicked(self, button): + def on_github_website_button_clicked(self, button): subprocess.Popen(["xdg-open", "https://github.com/TobiZog/cinnamon-dynamic-wallpaper"]) - def onCreateIssueButtonClicked(self, button): + def on_create_issue_button_clicked(self, button): subprocess.Popen(["xdg-open", "https://github.com/TobiZog/cinnamon-dynamic-wallpaper/issues/new"]) - def onApply(self, *args): - # todo: Store all values to settings - if self.tbImageSet.get_active(): - write_to_preferences(PrefenceEnums.IMAGESOURCE, ImageSourceEnum.IMAGESET) - elif self.tbHeicFile.get_active(): - write_to_preferences(PrefenceEnums.IMAGESOURCE, ImageSourceEnum.HEICFILE) - elif self.tbSourceFolder.get_active(): - write_to_preferences(PrefenceEnums.IMAGESOURCE, ImageSourceEnum.SOURCEFOLDER) + def on_apply(self, *args): + # Store all values to the JSON file + for item in self.settings_dict: + write_to_preferences(item, self.settings_dict[item]) - write_to_preferences(PrefenceEnums.EXPANDOVERALLDISPLAY, self.swExpandOverAllDisplays.get_active()) - write_to_preferences(PrefenceEnums.SHOWONLOCKSCREEN, self.swShowOnLockScreen.get_active()) - - - write_to_preferences(PrefenceEnums.LOCATIONREFRESHINTERVALS, self.spbNetworkLocationRefreshTime.get_value()) - write_to_preferences(PrefenceEnums.LATITUDE, self.etrLatitude.get_text()) - write_to_preferences(PrefenceEnums.LONGITUDE, self.etrLongitude.get_text()) - - if self.tbNetworkLocation.get_active(): - write_to_preferences(PrefenceEnums.PERIODSOURCE, PeriodSourceEnum.NETWORKLOCATION) - elif self.tbCustomLocation.get_active(): - write_to_preferences(PrefenceEnums.PERIODSOURCE, PeriodSourceEnum.CUSTOMLOCATION) - elif self.tbTimePeriods.get_active(): - write_to_preferences(PrefenceEnums.PERIODSOURCE, PeriodSourceEnum.CUSTOMTIMEPERIODS) - - - self.onDestroy() + # Close the window + self.on_destroy() if __name__ == "__main__": diff --git a/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences/scripts/cinnamon_pref_handler.py b/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences/scripts/cinnamon_pref_handler.py index 4fef680..9872f35 100644 --- a/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences/scripts/cinnamon_pref_handler.py +++ b/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences/scripts/cinnamon_pref_handler.py @@ -39,8 +39,11 @@ def read_str_from_preferences(parameter: PrefenceEnums) -> str: Returns: str: Value of the parameter """ - with open(pref_location, "r") as pref_file: - pref_data = json.load(pref_file) + try: + with open(pref_location, "r") as pref_file: + pref_data = json.load(pref_file) + except: + return "" if parameter in pref_data: return pref_data[parameter]["value"] @@ -53,4 +56,12 @@ def read_int_from_preferences(parameter: PrefenceEnums) -> int: if value == "": return 0 else: - return int(value) \ No newline at end of file + return int(value) + +def read_float_from_preferences(parameter: PrefenceEnums) -> float: + value = read_str_from_preferences(parameter) + + if value == "": + return 0.0 + else: + return float(value) \ No newline at end of file diff --git a/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences/scripts/location.py b/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences/scripts/location.py new file mode 100644 index 0000000..3938582 --- /dev/null +++ b/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences/scripts/location.py @@ -0,0 +1,3 @@ +def get_location_by_network() -> list: + #todo + return [] \ No newline at end of file diff --git a/cinnamon-dynamic-wallpaper@TobiZog/5.4/scripts/communication.js b/cinnamon-dynamic-wallpaper@TobiZog/5.4/scripts/communication.js index 5fb644a..ba30630 100644 --- a/cinnamon-dynamic-wallpaper@TobiZog/5.4/scripts/communication.js +++ b/cinnamon-dynamic-wallpaper@TobiZog/5.4/scripts/communication.js @@ -53,32 +53,4 @@ function showNotification(title, text, showOpenSettings = false) { // Display it source.notify(notification); -} - - -/** - * Adding a message to the logs - * - * @param {string} logMsg New log message to add - */ -function createLogs(tvLogs, logMsg) { - /** - * Pad a number with leading zeros - * - * @param {number} num Number to format - * @param {number} size Final string length - * - * @returns String with defined length - */ - function pad(num, size) { - var s = "00" + num - return s.substring(s.length - size) - } - - // Estimate date and time - let date = new Date() - let formattedDate = pad(date.getHours(), 2) + ":" + pad(date.getMinutes(), 2) + ":" + pad(date.getSeconds(), 2) - - // Add the the logs - return formattedDate + "\t" + logMsg + "\n" + tvLogs } \ No newline at end of file diff --git a/cinnamon-dynamic-wallpaper@TobiZog/5.4/settings-schema.json b/cinnamon-dynamic-wallpaper@TobiZog/5.4/settings-schema.json index 1d16f1e..dc44394 100644 --- a/cinnamon-dynamic-wallpaper@TobiZog/5.4/settings-schema.json +++ b/cinnamon-dynamic-wallpaper@TobiZog/5.4/settings-schema.json @@ -1,317 +1,6 @@ { - "layout": { - "type": "layout", - "pages": [ - "pg_config", - "pg_logs", - "pg_about" - ], - - - - "pg_config": { - "type": "page", - "title": "Configuration", - "sections": [ - "sec_image_configuration", - "sec_location", - "sec_times" - ] - }, - "pg_logs": { - "type": "page", - "title": "Debugging", - "sections": [ - "sec_logs", - "sec_report_issue" - ] - }, - "pg_about": { - "type": "page", - "title": "About", - "sections": [ - "sec_project", - "sec_github" - ] - }, - - - - "sec_image_configuration": { - "type": "section", - "title": "Image set", - "keys": [ - "lb_image_configuration", - "btn_config_images", - "sw_image_stretch" - ] - }, - "sec_location": { - "type": "section", - "title": "Location estimation", - "keys": [ - "sw_auto_location", - "sc_location_refresh_time", - "etr_last_update", - "etr_latitude", - "etr_longitude" - ] - }, - "sec_times": { - "type": "section", - "title": "Time periods", - "keys": [ - "tv_times" - ] - }, - - - "sec_logs": { - "type": "section", - "title": "Logs", - "keys": [ - "tv_log_description", - "tv_logs" - ] - }, - "sec_report_issue": { - "type": "section", - "title": "Report an issue", - "keys": [ - "lb_report_issue", - "btn_report_issue" - ] - }, - - - "sec_project": { - "type": "section", - "title": "About the project", - "keys": [ - "lb_about", - "lb_author", - "lb_spices", - "btn_spices" - ] - }, - "sec_github": { - "type": "section", - "title": "Source Code on GitHub", - "keys": [ - "lb_repository", - "btn_open_repository" - ] - } - }, - - - - "lb_image_configuration": { - "type": "label", - "description": "Choose an included image set or import a heic-file with the Image Configurator" - }, - "btn_config_images": { - "type": "button", - "description": "Image Configurator", - "callback": "openImageConfigurator" - }, - "sw_image_stretch": { - "type": "switch", - "description": "Expand image over all displays", - "default": false - }, - - "sw_auto_location": { - "type": "switch", - "default": true, - "description": "Estimate coordinates via network" - }, - "sc_location_refresh_time": { - "type": "scale", - "default": 15, - "min": 5, - "max": 60, - "step": 5, - "description": "Interval time to refresh the location via network (min)", - "dependency": "sw_auto_location" - }, - "etr_last_update": { - "type": "entry", - "description": "Last location update", - "default": "", - "dependency": "sw_auto_location" - }, - "etr_latitude": { - "type": "entry", - "default": "", - "description": "Latitude", - "dependency": "!sw_auto_location" - }, - "etr_longitude": { - "type": "entry", - "default": "", - "description": "Longitude", - "dependency": "!sw_auto_location" - }, - - "tv_times": { - "type": "textview", - "description": "Time sections today", - "default": "" - }, - - - "tv_log_description": { - "type": "label", - "description": "Logs contains informations about time, date and successful or failed operations of the extension.", - "default": "" - }, - "tv_logs": { - "type": "textview", - "description": "See all logs", - "default": "" - }, - - "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. If you find an error message in the logs above, add it to the issue report." - }, - "btn_report_issue": { - "type": "button", - "description": "Submit an Issue", - "callback": "openIssueWebsite" - }, - - - "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." - }, - "lb_author": { - "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" - }, - "btn_open_repository": { - "type": "button", - "description": "Open the Repository", - "callback": "openRepoWebsite" - }, - - - - - "etr_choosen_image_set": { - "type": "entry", - "default": "lakeside", - "description": "" - }, - "etr_img_morning_twilight": { - "type": "entry", - "default": "1.jpg", - "description": "" - }, - "etr_img_sunrise": { - "type": "entry", - "default": "2.jpg", - "description": "" - }, - "etr_img_morning": { - "type": "entry", - "default": "3.jpg", - "description": "" - }, - "etr_img_noon": { - "type": "entry", - "default": "4.jpg", - "description": "" - }, - "etr_img_afternoon": { - "type": "entry", - "default": "5.jpg", - "description": "" - }, - "etr_img_evening": { - "type": "entry", - "default": "6.jpg", - "description": "" - }, - "etr_img_sunset": { - "type": "entry", - "default": "7.jpg", - "description": "" - }, - "etr_img_night_twilight": { - "type": "entry", - "default": "8.jpg", - "description": "" - }, - "etr_img_night": { - "type": "entry", - "default": "9.jpg", - "description": "" - }, - "first_start": { - "type": "generic", - "default": true - }, - - "etr_morning_twilight_times": { - "type": "entry", - "default": "", - "description": "" - }, - "etr_sunrise_times": { - "type": "entry", - "default": "", - "description": "" - }, - "etr_morning_times": { - "type": "entry", - "default": "", - "description": "" - }, - "etr_noon_times": { - "type": "entry", - "default": "", - "description": "" - }, - "etr_afternoon_times": { - "type": "entry", - "default": "", - "description": "" - }, - "etr_evening_times": { - "type": "entry", - "default": "", - "description": "" - }, - "etr_sunset_times": { - "type": "entry", - "default": "", - "description": "" - }, - "etr_night_twilight_times": { - "type": "entry", - "default": "", - "description": "" - }, - "etr_night_times": { - "type": "entry", - "default": "", - "description": "" - } + "first_start": { + "type": "generic", + "default": true + } } \ No newline at end of file diff --git a/cinnamon-dynamic-wallpaper@TobiZog/icon.png b/cinnamon-dynamic-wallpaper@TobiZog/icon.png new file mode 120000 index 0000000..3c8c923 --- /dev/null +++ b/cinnamon-dynamic-wallpaper@TobiZog/icon.png @@ -0,0 +1 @@ +5.4/icons/icon.png \ No newline at end of file diff --git a/cinnamon-dynamic-wallpaper@TobiZog/metadata.json b/cinnamon-dynamic-wallpaper@TobiZog/metadata.json index d547f70..b5b1564 100644 --- a/cinnamon-dynamic-wallpaper@TobiZog/metadata.json +++ b/cinnamon-dynamic-wallpaper@TobiZog/metadata.json @@ -1,4 +1,5 @@ { + "external-configuration-app": "preferences/preferences.py", "uuid": "cinnamon-dynamic-wallpaper@TobiZog", "name": "Cinnamon Dynamic Wallpaper", "description": "Cinnamon extension for dynamic desktop backgrounds based on time and location", diff --git a/res/de.tobizog.cinnamonDynamicWallpaper.Source.svg b/res/de.tobizog.cinnamonDynamicWallpaper.Source.svg new file mode 100644 index 0000000..df2ee6c --- /dev/null +++ b/res/de.tobizog.cinnamonDynamicWallpaper.Source.svg @@ -0,0 +1,3326 @@ + + + + + Adwaita Icon Template + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + GNOME Design Team + + + + + Adwaita Icon Template + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Hicolor + Symbolic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + battery is full and there is no a/c connected. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +