Skip to content

Commit cca84ac

Browse files
authored
Merge pull request #584 from slgobinath/master
Release Safe Eyes 2.1.9
2 parents 5cd9b8a + d435990 commit cca84ac

File tree

8 files changed

+23
-49
lines changed

8 files changed

+23
-49
lines changed

.github/FUNDING.yml

-12
This file was deleted.

README.md

+6-14
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
[![Flathub](https://img.shields.io/flathub/v/io.github.slgobinath.SafeEyes)](https://flathub.org/apps/details/io.github.slgobinath.SafeEyes)
88
[![Translation status](https://hosted.weblate.org/widgets/safe-eyes/-/translations/svg-badge.svg)](https://hosted.weblate.org/engage/safe-eyes/?utm_source=widget)
99
[![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)
10-
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/slgobinath)
1110

1211
Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder.
1312

@@ -41,7 +40,7 @@ Safe Eyes is available in Ubuntu PPA, Arch AUR, Gentoo and Python PyPI. You can
4140
### Ubuntu, Linux Mint and other Ubuntu Derivatives
4241

4342
```bash
44-
sudo add-apt-repository ppa:slgobinath/safeeyes
43+
sudo add-apt-repository ppa:safeeyes-team/safeeyes
4544
sudo apt update
4645
sudo apt install safeeyes
4746
```
@@ -121,11 +120,11 @@ python3 -m safeeyes
121120
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.
122121

123122

124-
### Install in Virtual Environment
123+
### Install in a virtual environment
125124

126-
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.
125+
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.
127126

128-
1. Install the necessary dependencies
127+
1. Install the necessary dependencies for CentOS 7
129128

130129
```bash
131130
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
137136
mkdir ~/safeeyes
138137
cd ~/safeeyes/
139138
140-
pip3 install virtualenv --user
141-
virtualenv --no-site-packages venv
139+
python3 -m venv venv
142140
source venv/bin/activate
143141
pip3 install dbus-python safeeyes
144142
```
145143

146-
3. Start Safe Eyes from terminal
144+
3. Start Safe Eyes from the terminal
147145

148146
```bash
149147
cd ~/safeeyes & source venv/bin/activate
@@ -187,9 +185,3 @@ Thirdparty plugins are available at another GitHub repository: [safeeyes-plugins
187185
## License
188186

189187
GNU General Public License v3
190-
191-
## IDE Support
192-
193-
<p align="center">Thanks to JetBrains for offering IDE support to develop this Open Source project.</p>
194-
195-
<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>

debian/changelog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
safeeyes (2.1.9) noble; urgency=medium
2+
3+
* Fix crash in smartpause
4+
5+
-- Gobinath Loganathan <[email protected]> Tue, 18 Jun 2024 20:25:00 -0400
6+
17
safeeyes (2.1.8) noble; urgency=medium
28

39
* Support Python 3.12

safeeyes/glade/about_dialog.glade

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ along with this program. If not, see &lt;https://www.gnu.org/licenses/&gt;.</pr
7171
<property name="valign">center</property>
7272
<property name="margin_top">10</property>
7373
<property name="margin_bottom">10</property>
74-
<property name="label" translatable="yes">Safe Eyes 2.1.8</property>
74+
<property name="label" translatable="yes">Safe Eyes 2.1.9</property>
7575
<property name="justify">center</property>
7676
<attributes>
7777
<attribute name="style" value="normal"/>

safeeyes/platform/io.github.slgobinath.SafeEyes.metainfo.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<url type="homepage">https://slgobinath.github.io/SafeEyes/</url>
4848

4949
<releases>
50-
<release version="2.1.8" date="2023-06-04" />
50+
<release version="2.1.9" date="2023-06-04" />
5151
</releases>
5252

5353
<content_rating type="oars-1.1" />

safeeyes/safeeyes.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
gi.require_version('Gtk', '3.0')
4141
from gi.repository import Gtk
4242

43-
SAFE_EYES_VERSION = "2.1.8"
43+
SAFE_EYES_VERSION = "2.1.9"
4444

4545

4646
class SafeEyes:
@@ -71,8 +71,8 @@ def __init__(self, system_locale, config):
7171
self.show_about)
7272
self.context['api']['enable_safeeyes'] = lambda next_break_time=-1, reset_breaks=False: \
7373
utility.execute_main_thread(self.enable_safeeyes, next_break_time, reset_breaks)
74-
self.context['api']['disable_safeeyes'] = lambda status: utility.execute_main_thread(
75-
self.disable_safeeyes, status)
74+
self.context['api']['disable_safeeyes'] = lambda status=None, is_resting=False: utility.execute_main_thread(
75+
self.disable_safeeyes, status, is_resting)
7676
self.context['api']['status'] = self.status
7777
self.context['api']['quit'] = lambda: utility.execute_main_thread(
7878
self.quit)

safeeyes/utility.py

+4-16
Original file line numberDiff line numberDiff line change
@@ -94,28 +94,16 @@ def start_thread(target_function, **args):
9494
thread.start()
9595

9696

97-
# def execute_main_thread(target_function, args=None):
97+
# def execute_main_thread(target_function, *args, **kwargs):
9898
# """
99-
# Execute the given function in main thread.
99+
# Execute the given function in main thread, forwarding positional and keyword arguments.
100100
# """
101-
# if args:
102-
# GLib.idle_add(lambda: target_function(args))
103-
# else:
104-
# GLib.idle_add(target_function)
105101

106-
def execute_main_thread(target_function, arg1=None, arg2=None):
102+
def execute_main_thread(target_function, *args, **kwargs):
107103
"""
108104
Execute the given function in main thread.
109105
"""
110-
if arg1 is not None and arg2 is not None:
111-
GLib.idle_add(lambda: target_function(arg1, arg2))
112-
elif arg1 is not None:
113-
GLib.idle_add(lambda: target_function(arg1))
114-
elif arg2 is not None:
115-
GLib.idle_add(lambda: target_function(arg2))
116-
else:
117-
GLib.idle_add(target_function)
118-
106+
GLib.idle_add(lambda: target_function(*args, **kwargs))
119107

120108
def system_locale(category=locale.LC_MESSAGES):
121109
"""

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ def __package_data():
7878

7979
setuptools.setup(
8080
name="safeeyes",
81-
version="2.1.8",
81+
version="2.1.9",
8282
description="Protect your eyes from eye strain using this continuous breaks reminder.",
8383
long_description=long_description,
8484
long_description_content_type="text/markdown",
8585
author="Gobinath Loganathan",
8686
author_email="[email protected]",
8787
url="https://github.com/slgobinath/SafeEyes",
88-
download_url="https://github.com/slgobinath/SafeEyes/archive/v2.1.8.tar.gz",
88+
download_url="https://github.com/slgobinath/SafeEyes/archive/v2.1.9.tar.gz",
8989
packages=setuptools.find_packages(),
9090
package_data={'safeeyes': __package_data()},
9191
data_files=__data_files(),

0 commit comments

Comments
 (0)