nowfocus 0.5.4__tar.gz → 0.5.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nowfocus-0.5.4/src/nowfocus.egg-info → nowfocus-0.5.6}/PKG-INFO +1 -1
- {nowfocus-0.5.4 → nowfocus-0.5.6}/pyproject.toml +1 -1
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/__main__.py +2 -2
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/task_window.py +5 -9
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/utils.py +8 -7
- {nowfocus-0.5.4 → nowfocus-0.5.6/src/nowfocus.egg-info}/PKG-INFO +1 -1
- {nowfocus-0.5.4 → nowfocus-0.5.6}/LICENSE +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/README.md +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/setup.cfg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/__init__.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/conf.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/connectors/activitywatch.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/connectors/caldav.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/connectors/csv.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/connectors/psc_timetracker.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/connectors/taskwarrior.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/connectors/timewarrior.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/connectors/todo_template.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/connectors/todotxt.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/connectors/trello.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/connectors/txt.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/connectors/vikunja.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/desktop-extras/nowfocus.desktop +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/desktop-extras/nowfocus.png +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/desktop-extras/nowfocus.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/example-todo.txt +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/cancel.png +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/cancel.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/edit.png +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/edit.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/icon-0.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/icon-1.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/icon-2.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/icon-3.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/icon-4.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/icon-5.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/icon-6.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/icon-7.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/icon-8.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/icon-9.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/icon-red.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/icon.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/mark-done.png +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/mark-done.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/pause.png +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/pause.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/settings.png +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/icon/settings.svg +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/install.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/new_task_dialog.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/session_edit_dialog.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/session_options.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/sessions.csv +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/settings.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/sound/bell-xylophone-g.mp3 +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/sound/dinner-bell.mp3 +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/sound/xylophone-chord.mp3 +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/styles.css +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/user_idle_time.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus/version_migrator.py +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus.egg-info/SOURCES.txt +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus.egg-info/dependency_links.txt +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus.egg-info/entry_points.txt +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus.egg-info/requires.txt +0 -0
- {nowfocus-0.5.4 → nowfocus-0.5.6}/src/nowfocus.egg-info/top_level.txt +0 -0
|
@@ -97,10 +97,10 @@ class Application(Gtk.Application):
|
|
|
97
97
|
self.open_task_window()
|
|
98
98
|
|
|
99
99
|
# Testing
|
|
100
|
-
#
|
|
100
|
+
# TODO: enable these automatically with dbg system
|
|
101
101
|
# self.open_session_options_dialog('test_param')
|
|
102
102
|
# self.open_settings_window() #for testing
|
|
103
|
-
self.open_new_task_dialog() #for testing
|
|
103
|
+
# self.open_new_task_dialog() #for testing
|
|
104
104
|
# self.print_time_totals()
|
|
105
105
|
# self.new_task_dialog()
|
|
106
106
|
|
|
@@ -399,15 +399,10 @@ class TaskWindow(Gtk.Window):
|
|
|
399
399
|
self.r_sidebar.pack_start(self.sessions_scrolledwindow, True, True, 0)
|
|
400
400
|
|
|
401
401
|
self.sessions_box = Gtk.VBox(spacing=5)
|
|
402
|
-
# self.sessions_box.get_style_context().add_class("subtle")
|
|
403
402
|
self.sessions_scrolledwindow.add(self.sessions_box)
|
|
404
403
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
# self.r_sidebar.connect("enter-notify-event",self.test)
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
self.l_sidebar.add(choose_from_lists(self.select_list_callback, 'None', None, False, show_todolist_headers=False))
|
|
404
|
+
self.l_sidebar.add(choose_from_lists(
|
|
405
|
+
self.select_list_callback, 'None', None, accepts_tasks=False, show_todolist_headers=True, truncate_labels_to_chars=20))
|
|
411
406
|
|
|
412
407
|
self.SessionEditDialog = SessionEditDialog # passed to show_sessions via self
|
|
413
408
|
sidebar_sessions = get_sessions(use_sessions_timeframe_setting=False)
|
|
@@ -489,10 +484,11 @@ class TaskWindow(Gtk.Window):
|
|
|
489
484
|
|
|
490
485
|
label = Gtk.Label()
|
|
491
486
|
|
|
487
|
+
if len(t['extended_label']) > 100:
|
|
488
|
+
t['extended_label'] = t['extended_label'][:100]+"…"
|
|
489
|
+
|
|
492
490
|
extended_label = GLib.markup_escape_text(t['extended_label'])
|
|
493
491
|
|
|
494
|
-
if len(extended_label) > 100:
|
|
495
|
-
extended_label = extended_label[:100]+"..."
|
|
496
492
|
|
|
497
493
|
if len(self.search_term) > 1:
|
|
498
494
|
|
|
@@ -1157,7 +1157,7 @@ def get_most_recent_list(session = None):
|
|
|
1157
1157
|
return last_session[0]['parent_id']
|
|
1158
1158
|
|
|
1159
1159
|
|
|
1160
|
-
def choose_from_lists(callback, selected_list_id = None, session = None, accepts_tasks = True,
|
|
1160
|
+
def choose_from_lists(callback, selected_list_id = None, session = None, accepts_tasks = True, show_todolist_headers = True, truncate_labels_to_chars = 100):
|
|
1161
1161
|
''' Returns a Gtk.ScrolledWindow widget with radio buttons'''
|
|
1162
1162
|
|
|
1163
1163
|
# TODO: consider using TreeView https://lazka.github.io/pgi-docs/Gtk-3.0/classes/TreeView.html#Gtk.TreeView
|
|
@@ -1177,12 +1177,12 @@ def choose_from_lists(callback, selected_list_id = None, session = None, accepts
|
|
|
1177
1177
|
|
|
1178
1178
|
todolist = None
|
|
1179
1179
|
|
|
1180
|
-
|
|
1180
|
+
conditions = " "
|
|
1181
1181
|
|
|
1182
|
-
if skip_top_level_lists:
|
|
1183
|
-
|
|
1182
|
+
# if skip_top_level_lists:
|
|
1183
|
+
# conditions += " AND parent_label IS NOT NULL "
|
|
1184
1184
|
|
|
1185
|
-
lists = db_query("SELECT lists.*, (SELECT start_time FROM sessions WHERE todolist = lists.todolist ORDER BY start_time DESC LIMIT 1 ) as last_session_on_todo FROM lists "+
|
|
1185
|
+
lists = db_query("SELECT lists.*, (SELECT start_time FROM sessions WHERE todolist = lists.todolist ORDER BY start_time DESC LIMIT 1 ) as last_session_on_todo FROM lists WHERE status = '1' "+conditions+" ORDER BY last_session_on_todo DESC, CASE WHEN parent_id IS NULL THEN 1 ELSE 2 END, extended_label ASC ", None, 'id')
|
|
1186
1186
|
|
|
1187
1187
|
r_button = None
|
|
1188
1188
|
todolist_id = None
|
|
@@ -1190,9 +1190,10 @@ def choose_from_lists(callback, selected_list_id = None, session = None, accepts
|
|
|
1190
1190
|
for id, l in lists.items():
|
|
1191
1191
|
try:
|
|
1192
1192
|
l['data'] = json.loads(l['data'])
|
|
1193
|
+
if len(l['label']) > truncate_labels_to_chars:
|
|
1194
|
+
l['label'] = l['label'][:truncate_labels_to_chars] + '…'
|
|
1193
1195
|
|
|
1194
|
-
|
|
1195
|
-
label = f'{" · " * indent}' + GLib.markup_escape_text(l['label'])
|
|
1196
|
+
label = f'{" · " * l['extended_label'].count(' > ')}' + GLib.markup_escape_text(l['label'])
|
|
1196
1197
|
|
|
1197
1198
|
if todolist_id != l['todolist']:
|
|
1198
1199
|
todolist_id = l['todolist']
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|