diff --git a/debian/changelog b/debian/changelog index 0fe0e9a..e1256db 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,6 @@ -safeeyes (1.2.2-1) xenial; urgency=low +safeeyes (2.0.0-1) xenial; urgency=low + + * Completely rededesigned architecture * Show next break time in tray icon in supported environments diff --git a/debian/control b/debian/control index 869a356..609e15a 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Homepage: https://github.com/slgobinath/SafeEyes/ Package: safeeyes Architecture: all -Depends: ${misc:Depends}, ${python3:Depends}, gir1.2-appindicator3-0.1, python3 (>= 3.4.0), python3-xlib, python3-dbus, gir1.2-notify-0.7, python3-babel, x11-utils, xprintidle, python3-pyaudio, python3-psutil +Depends: ${misc:Depends}, ${python3:Depends}, gir1.2-appindicator3-0.1, python3 (>= 3.4.0), python3-xlib, python3-dbus, gir1.2-notify-0.7, python3-babel, x11-utils, xprintidle, alsa-utils, python3-psutil Description: Safe Eyes Safe Eyes is a simple tool to remind you to take periodic breaks for your eyes. This is essential for anyone spending more time on the computer to avoid eye strain and other physical problems. . diff --git a/safeeyes/Utility.py b/safeeyes/Utility.py index 16f085b..83fd998 100644 --- a/safeeyes/Utility.py +++ b/safeeyes/Utility.py @@ -387,7 +387,7 @@ def __update_plugin_config(plugin, plugin_config, config): if plugin_config is None: config['plugins'].remove(plugin) else: - if LooseVersion(plugin['version']) < LooseVersion(plugin_config['meta']['version']): + if LooseVersion(plugin.get('version', '0.0.0')) != LooseVersion(plugin_config['meta']['version']): # Update the configuration plugin['version'] = plugin_config['meta']['version'] setting_ids = [] diff --git a/safeeyes/plugins/screensaver/config.json b/safeeyes/plugins/screensaver/config.json index 13185b4..0912960 100644 --- a/safeeyes/plugins/screensaver/config.json +++ b/safeeyes/plugins/screensaver/config.json @@ -22,7 +22,9 @@ "id": "min_seconds", "label": "Minimum seconds to skip without screensaver", "type": "INT", - "default": 3 + "default": 3, + "max": 60, + "min": 0 } ], "break_override_allowed": true diff --git a/safeeyes/plugins/smartpause/config.json b/safeeyes/plugins/smartpause/config.json index 42fc5a7..e20f967 100644 --- a/safeeyes/plugins/smartpause/config.json +++ b/safeeyes/plugins/smartpause/config.json @@ -16,7 +16,9 @@ "id": "idle_time", "label": "Minimum idle time to pause Safe Eyes", "type": "INT", - "default": 3 + "default": 3, + "max": 60, + "min": 1 } ] } \ No newline at end of file diff --git a/safeeyes/settings.py b/safeeyes/settings.py index 3aaf94f..6a0a37a 100644 --- a/safeeyes/settings.py +++ b/safeeyes/settings.py @@ -268,19 +268,20 @@ class PluginSettingsDialog(object): self.window.set_title(_('Plugin Settings')) for setting in config.get('settings'): if setting['type'].upper() == 'INT': - box_settings.pack_start(self.__load_int_item(setting['label'], setting['id'], setting['safeeyes_config']), False, False, 0) + box_settings.pack_start(self.__load_int_item(setting['label'], setting['id'], setting['safeeyes_config'], setting.get('min', 0), setting.get('max', 120)), False, False, 0) elif setting['type'].upper() == 'TEXT': box_settings.pack_start(self.__load_text_item(setting['label'], setting['id'], setting['safeeyes_config']), False, False, 0) elif setting['type'].upper() == 'BOOL': box_settings.pack_start(self.__load_bool_item(setting['label'], setting['id'], setting['safeeyes_config']), False, False, 0) - def __load_int_item(self, name, key, settings): + def __load_int_item(self, name, key, settings, min_value, max_value): """ Load the UI control for int property. """ builder = Utility.create_gtk_builder(SETTINGS_ITEM_INT_GLADE) builder.get_object('lbl_name').set_label(_(name)) spin_value = builder.get_object('spin_value') + spin_value.set_range(min_value, max_value) spin_value.set_value(settings[key]) box = builder.get_object('box') box.set_visible(True)