Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Convert all identifiers and messages from "Play" to "Leisure".

  • Loading branch information...
commit c0ddf3cd7376487ebb383a9ea503409e4879d112 1 parent c6c4706
Stephan Sokolow authored
Showing with 11 additions and 12 deletions.
  1. +5 −5 timeclock.glade
  2. +6 −7 timeclock.py
View
10 timeclock.glade
@@ -35,7 +35,7 @@
</packing>
</child>
<child>
- <widget class="GtkRadioButton" id="btn_playMode">
+ <widget class="GtkRadioButton" id="btn_leisureMode">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Leisure</property>
@@ -100,7 +100,7 @@
</packing>
</child>
<child>
- <widget class="GtkProgressBar" id="progress_playMode">
+ <widget class="GtkProgressBar" id="progress_leisureMode">
<property name="visible">True</property>
<property name="orientation">GTK_PROGRESS_RIGHT_TO_LEFT</property>
</widget>
@@ -243,7 +243,7 @@
</packing>
</child>
<child>
- <widget class="GtkSpinButton" id="spinBtn_playMode">
+ <widget class="GtkSpinButton" id="spinBtn_leisureMode">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="xalign">1</property>
@@ -279,13 +279,13 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="lbl_playMode">
+ <widget class="GtkLabel" id="lbl_leisureMode">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">_Leisure:</property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">spinBtn_playMode</property>
+ <property name="mnemonic_widget">spinBtn_leisureMode</property>
</widget>
<packing>
<property name="top_attach">2</property>
View
13 timeclock.py
@@ -4,11 +4,10 @@
A simple application to help lazy procrastinators (me) to manage their time.
@todo: Planned improvements:
- - Change the notification messages so "Play" becomes "Leisure".
- Clicking the preferences button while the dialog is shown should do nothing.
- Should I offer preferences options for remembering window position and things
like "always on top" and "on all desktops"?
- - Have the system complain if overhead + work + play + sleep (8 hours) > 24
+ - Have the system complain if overhead + work + leisure + sleep (8 hours) > 24
and enforce minimums of 1 hour for leisure and overhead.
- Rework the design to minimize dependence on GTK+ (in case I switch to Qt for
Phonon)
@@ -36,13 +35,13 @@
__license__ = "GNU GPL 2.0 or later"
# Mode constants.
-SLEEP, OVERHEAD, WORK, PLAY = range(4)
-MODE_NAMES = ("sleep", "overhead", "work", "play")
+SLEEP, OVERHEAD, WORK, LEISURE = range(4)
+MODE_NAMES = ("sleep", "overhead", "work", "leisure")
default_modes = {
OVERHEAD : int(3600 * 3.5),
WORK : 3600 * 6,
- PLAY : int(3600 * 5.5),
+ LEISURE : int(3600 * 5.5),
}
import logging, os, signal, sys, time, pickle
@@ -152,7 +151,7 @@ def __init__(self):
self.update_progressBars()
# Connect signals
- dic = { "on_mode_toggled" : self.playmode_changed,
+ dic = { "on_mode_toggled" : self.mode_changed,
"on_reset_clicked" : self.reset_clicked,
"on_prefs_clicked" : self.prefs_clicked,
"on_prefs_commit" : self.prefs_commit,
@@ -195,7 +194,7 @@ def update_progressBars(self):
pbar.set_text(time.strftime('-%H:%M:%S', time.gmtime(abs(remaining))))
pbar.set_fraction(max(float(remaining) / self.total[widget.mode], 0))
- def playmode_changed(self, widget):
+ def mode_changed(self, widget):
"""Callback for clicking the timer-selection radio buttons"""
if widget.get_active():
self.selectedBtn = widget
Please sign in to comment.
Something went wrong with that request. Please try again.