Skip to content

Commit f2403c7

Browse files
committed
Bug fix for issue #40
1 parent 617963c commit f2403c7

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

safeeyes/debian/changelog

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
safeeyes (1.1.1-1) xenial; urgency=medium
1+
safeeyes (1.1.2-1) xenial; urgency=medium
2+
3+
* Bug fix for no breaks after 1st one
24

35
* Add about dialog and language selection to Settings dialog
46

safeeyes/safeeyes/SafeEyesCore.py

+6-12
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ def notify_and_start_break(self):
142142

143143
# Resume
144144
if self.active:
145-
self.start()
145+
# Schedule the break again
146+
thread = threading.Thread(target=self.scheduler_job)
147+
thread.start()
146148

147149
self.skipped = False
148150

@@ -152,19 +154,11 @@ def notify_and_start_break(self):
152154
def is_long_break(self):
153155
return self.break_count == self.no_of_short_breaks_per_long_break - 1
154156

155-
# User skipped the break using Skip button
156-
def skip_break(self):
157-
self.skipped = True
158-
159157
"""
160-
Reschedule the job
158+
User skipped the break using Skip button
161159
"""
162-
def toggle_active_state(self):
163-
if self.active:
164-
self.stop()
165-
166-
else:
167-
self.start()
160+
def skip_break(self):
161+
self.skipped = True
168162

169163
"""
170164
Stop Safe Eyes

safeeyes/safeeyes/safeeyes

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ system_language_directory = os.path.join(bin_directory, "config/lang")
5353

5454
is_active = True
5555
CONFIGURATION_VERSION = 1
56-
SAFE_EYES_VERSION = "1.1.1"
56+
SAFE_EYES_VERSION = "1.1.2"
5757

5858
"""
5959
Listen to tray icon Settings action and send the signal to Settings dialog.

0 commit comments

Comments
 (0)