Merge pull request #584 from slgobinath/master

Release Safe Eyes 2.1.9
This commit is contained in:
Gobinath 2024-06-18 20:27:50 -04:00 committed by GitHub
commit cca84acde1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 23 additions and 49 deletions

12
.github/FUNDING.yml vendored
View File

@ -1,12 +0,0 @@
# These are supported funding model platforms
github: slgobinath
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: 'https://www.paypal.com/paypalme/slgobinath'

View File

@ -7,7 +7,6 @@
[![Flathub](https://img.shields.io/flathub/v/io.github.slgobinath.SafeEyes)](https://flathub.org/apps/details/io.github.slgobinath.SafeEyes) [![Flathub](https://img.shields.io/flathub/v/io.github.slgobinath.SafeEyes)](https://flathub.org/apps/details/io.github.slgobinath.SafeEyes)
[![Translation status](https://hosted.weblate.org/widgets/safe-eyes/-/translations/svg-badge.svg)](https://hosted.weblate.org/engage/safe-eyes/?utm_source=widget) [![Translation status](https://hosted.weblate.org/widgets/safe-eyes/-/translations/svg-badge.svg)](https://hosted.weblate.org/engage/safe-eyes/?utm_source=widget)
[![Awesome Humane Tech](https://raw.githubusercontent.com/humanetech-community/awesome-humane-tech/main/humane-tech-badge.svg?sanitize=true)](https://github.com/humanetech-community/awesome-humane-tech) [![Awesome Humane Tech](https://raw.githubusercontent.com/humanetech-community/awesome-humane-tech/main/humane-tech-badge.svg?sanitize=true)](https://github.com/humanetech-community/awesome-humane-tech)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/slgobinath)
Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder. Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder.
@ -41,7 +40,7 @@ Safe Eyes is available in Ubuntu PPA, Arch AUR, Gentoo and Python PyPI. You can
### Ubuntu, Linux Mint and other Ubuntu Derivatives ### Ubuntu, Linux Mint and other Ubuntu Derivatives
```bash ```bash
sudo add-apt-repository ppa:slgobinath/safeeyes sudo add-apt-repository ppa:safeeyes-team/safeeyes
sudo apt update sudo apt update
sudo apt install safeeyes sudo apt install safeeyes
``` ```
@ -121,11 +120,11 @@ python3 -m safeeyes
Safe Eyes installers install the required icons to `/usr/share/icons/hicolor`. When you run Safe Eyes from source without, some icons may not appear. Safe Eyes installers install the required icons to `/usr/share/icons/hicolor`. When you run Safe Eyes from source without, some icons may not appear.
### Install in Virtual Environment ### Install in a virtual environment
Some Linux systems like Cent OS do not have matching dependencies available in their repository. In such systems, you can install and use Safe Eyes in a Python Virtual Environment. The following instruction was tested on Cent OS 7. Some Linux systems like CentOS do not have matching dependencies available in their repository. In such systems, you can install and use Safe Eyes in a Python virtual environment.
1. Install the necessary dependencies 1. Install the necessary dependencies for CentOS 7
```bash ```bash
sudo yum install python3-devel dbus dbus-devel cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel pangomm pangomm-devel gobject-introspection-devel cairo-gobject-devel sudo yum install python3-devel dbus dbus-devel cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel pangomm pangomm-devel gobject-introspection-devel cairo-gobject-devel
@ -137,13 +136,12 @@ Some Linux systems like Cent OS do not have matching dependencies available in t
mkdir ~/safeeyes mkdir ~/safeeyes
cd ~/safeeyes/ cd ~/safeeyes/
pip3 install virtualenv --user python3 -m venv venv
virtualenv --no-site-packages venv
source venv/bin/activate source venv/bin/activate
pip3 install dbus-python safeeyes pip3 install dbus-python safeeyes
``` ```
3. Start Safe Eyes from terminal 3. Start Safe Eyes from the terminal
```bash ```bash
cd ~/safeeyes & source venv/bin/activate cd ~/safeeyes & source venv/bin/activate
@ -187,9 +185,3 @@ Thirdparty plugins are available at another GitHub repository: [safeeyes-plugins
## License ## License
GNU General Public License v3 GNU General Public License v3
## IDE Support
<p align="center">Thanks to JetBrains for offering IDE support to develop this Open Source project.</p>
<p align="center"><a href="https://www.jetbrains.com/?from=SafeEyes"><img src="https://raw.githubusercontent.com/JetBrains/logos/master/web/jetbrains/jetbrains.svg?sanitize=true" width="64" align="center"></a></p>

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
safeeyes (2.1.9) noble; urgency=medium
* Fix crash in smartpause
-- Gobinath Loganathan <slgobinath@gmail.com> Tue, 18 Jun 2024 20:25:00 -0400
safeeyes (2.1.8) noble; urgency=medium safeeyes (2.1.8) noble; urgency=medium
* Support Python 3.12 * Support Python 3.12

View File

@ -71,7 +71,7 @@ along with this program. If not, see &lt;https://www.gnu.org/licenses/&gt;.</pr
<property name="valign">center</property> <property name="valign">center</property>
<property name="margin_top">10</property> <property name="margin_top">10</property>
<property name="margin_bottom">10</property> <property name="margin_bottom">10</property>
<property name="label" translatable="yes">Safe Eyes 2.1.8</property> <property name="label" translatable="yes">Safe Eyes 2.1.9</property>
<property name="justify">center</property> <property name="justify">center</property>
<attributes> <attributes>
<attribute name="style" value="normal"/> <attribute name="style" value="normal"/>

View File

@ -47,7 +47,7 @@
<url type="homepage">https://slgobinath.github.io/SafeEyes/</url> <url type="homepage">https://slgobinath.github.io/SafeEyes/</url>
<releases> <releases>
<release version="2.1.8" date="2023-06-04" /> <release version="2.1.9" date="2023-06-04" />
</releases> </releases>
<content_rating type="oars-1.1" /> <content_rating type="oars-1.1" />

View File

@ -40,7 +40,7 @@ from safeeyes.ui.settings_dialog import SettingsDialog
gi.require_version('Gtk', '3.0') gi.require_version('Gtk', '3.0')
from gi.repository import Gtk from gi.repository import Gtk
SAFE_EYES_VERSION = "2.1.8" SAFE_EYES_VERSION = "2.1.9"
class SafeEyes: class SafeEyes:
@ -71,8 +71,8 @@ class SafeEyes:
self.show_about) self.show_about)
self.context['api']['enable_safeeyes'] = lambda next_break_time=-1, reset_breaks=False: \ self.context['api']['enable_safeeyes'] = lambda next_break_time=-1, reset_breaks=False: \
utility.execute_main_thread(self.enable_safeeyes, next_break_time, reset_breaks) utility.execute_main_thread(self.enable_safeeyes, next_break_time, reset_breaks)
self.context['api']['disable_safeeyes'] = lambda status: utility.execute_main_thread( self.context['api']['disable_safeeyes'] = lambda status=None, is_resting=False: utility.execute_main_thread(
self.disable_safeeyes, status) self.disable_safeeyes, status, is_resting)
self.context['api']['status'] = self.status self.context['api']['status'] = self.status
self.context['api']['quit'] = lambda: utility.execute_main_thread( self.context['api']['quit'] = lambda: utility.execute_main_thread(
self.quit) self.quit)

View File

@ -94,28 +94,16 @@ def start_thread(target_function, **args):
thread.start() thread.start()
# def execute_main_thread(target_function, args=None): # def execute_main_thread(target_function, *args, **kwargs):
# """ # """
# Execute the given function in main thread. # Execute the given function in main thread, forwarding positional and keyword arguments.
# """ # """
# if args:
# GLib.idle_add(lambda: target_function(args))
# else:
# GLib.idle_add(target_function)
def execute_main_thread(target_function, arg1=None, arg2=None): def execute_main_thread(target_function, *args, **kwargs):
""" """
Execute the given function in main thread. Execute the given function in main thread.
""" """
if arg1 is not None and arg2 is not None: GLib.idle_add(lambda: target_function(*args, **kwargs))
GLib.idle_add(lambda: target_function(arg1, arg2))
elif arg1 is not None:
GLib.idle_add(lambda: target_function(arg1))
elif arg2 is not None:
GLib.idle_add(lambda: target_function(arg2))
else:
GLib.idle_add(target_function)
def system_locale(category=locale.LC_MESSAGES): def system_locale(category=locale.LC_MESSAGES):
""" """

View File

@ -78,14 +78,14 @@ def __package_data():
setuptools.setup( setuptools.setup(
name="safeeyes", name="safeeyes",
version="2.1.8", version="2.1.9",
description="Protect your eyes from eye strain using this continuous breaks reminder.", description="Protect your eyes from eye strain using this continuous breaks reminder.",
long_description=long_description, long_description=long_description,
long_description_content_type="text/markdown", long_description_content_type="text/markdown",
author="Gobinath Loganathan", author="Gobinath Loganathan",
author_email="slgobinath@gmail.com", author_email="slgobinath@gmail.com",
url="https://github.com/slgobinath/SafeEyes", url="https://github.com/slgobinath/SafeEyes",
download_url="https://github.com/slgobinath/SafeEyes/archive/v2.1.8.tar.gz", download_url="https://github.com/slgobinath/SafeEyes/archive/v2.1.9.tar.gz",
packages=setuptools.find_packages(), packages=setuptools.find_packages(),
package_data={'safeeyes': __package_data()}, package_data={'safeeyes': __package_data()},
data_files=__data_files(), data_files=__data_files(),