diff --git a/.gitignore b/.gitignore index d7482e7..1592744 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ *.glade~ *.glade# -extracted_images/ *.txt +*.json +extracted_images/ selected/ __pycache__ time_bar.svg diff --git a/cinnamon-dynamic-wallpaper@TobiZog/5.4/extension.js b/cinnamon-dynamic-wallpaper@TobiZog/5.4/extension.js index 20e5408..d593614 100644 --- a/cinnamon-dynamic-wallpaper@TobiZog/5.4/extension.js +++ b/cinnamon-dynamic-wallpaper@TobiZog/5.4/extension.js @@ -60,7 +60,7 @@ CinnamonDynamicWallpaperExtension.prototype = { this.settings = new Settings.ExtensionSettings(this, uuid); // Check for the first startup - if (!this.settings.getValue("first_start")) { + if (this.settings.getValue("first_start")) { // Welcome notification this.showNotification("Welcome to Cinnamon Dynamic Wallpaper", diff --git a/cinnamon-dynamic-wallpaper@TobiZog/5.4/loop.py b/cinnamon-dynamic-wallpaper@TobiZog/5.4/loop.py index f9ddd43..be452dc 100644 --- a/cinnamon-dynamic-wallpaper@TobiZog/5.4/loop.py +++ b/cinnamon-dynamic-wallpaper@TobiZog/5.4/loop.py @@ -29,7 +29,7 @@ class Loop(): self.start_times = suntimes.day_periods # Position is given by user - elif self.prefs.prefs[PrefenceEnums.PERIOD_SOURCE] == PeriodSourceEnum.CUSTOMLOCATION: + elif self.prefs.period_source == PeriodSourceEnum.CUSTOMLOCATION: suntimes.calc_suntimes(float(self.prefs.latitude_custom), float(self.prefs.longitude_custom)) self.start_times = suntimes.day_periods diff --git a/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences.glade b/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences.glade index e43dc90..f658451 100644 --- a/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences.glade +++ b/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences.glade @@ -2806,6 +2806,20 @@ False stack_main + + 1 + + + + + gtk-ok + True + True + True + True + True + + @@ -2818,6 +2832,9 @@ True + + 1 + diff --git a/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences.py b/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences.py index caa32e2..285668c 100755 --- a/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences.py +++ b/cinnamon-dynamic-wallpaper@TobiZog/5.4/preferences.py @@ -622,6 +622,15 @@ class Preferences: subprocess.Popen(["xdg-open", "https://github.com/TobiZog/cinnamon-dynamic-wallpaper/issues/new"]) + def on_ok(self, *args): + """ Callback for the OK button in the top bar + """ + self.on_apply() + + # Close the window + self.on_destroy() + + def on_apply(self, *args): """ Callback for the Apply button in the top bar """ @@ -632,9 +641,6 @@ class Preferences: loop = Loop() loop.exchange_image() - # Close the window - self.on_destroy() - if __name__ == "__main__": Preferences().show() \ No newline at end of file