aboutsummaryrefslogtreecommitdiff
path: root/src/gui/tasks/table
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/tasks/table')
-rw-r--r--src/gui/tasks/table/menu.py4
-rw-r--r--src/gui/tasks/table/widget.py10
2 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/tasks/table/menu.py b/src/gui/tasks/table/menu.py
index 5404d6c..db89551 100644
--- a/src/gui/tasks/table/menu.py
+++ b/src/gui/tasks/table/menu.py
@@ -12,11 +12,11 @@ def open(table, update_task_signal, position):
menu = QtWidgets.QMenu(table)
if len(rows) == 1:
- modify_action = menu.addAction(gui.icon.dialog_open(menu.style()), 'modify')
+ modify_action = menu.addAction(gui.icon.dialog_open(menu.style()), "modify")
else:
modify_action = QtWidgets.QAction(menu)
- delete_action = menu.addAction(gui.icon.trash(menu.style()), 'delete')
+ delete_action = menu.addAction(gui.icon.trash(menu.style()), "delete")
action = menu.exec_(table.mapToGlobal(position + QtCore.QPoint(15, 20)))
if action == modify_action and len(rows) == 1:
diff --git a/src/gui/tasks/table/widget.py b/src/gui/tasks/table/widget.py
index 82c0456..fe8ea2e 100644
--- a/src/gui/tasks/table/widget.py
+++ b/src/gui/tasks/table/widget.py
@@ -88,7 +88,7 @@ class Widget(QtWidgets.QTableWidget):
self._sort_is_ascending = True
self._sort_column = column
self.sort()
- self._header_model.setItem(column, QtGui.QStandardItem('Hey!'))
+ # self._header_model.setItem(column, QtGui.QStandardItem("Hey!"))
self.update_view()
def sort(self):
@@ -214,13 +214,13 @@ def item(text: str):
def age_since(timestamp):
diff = int(time.time()) - timestamp
if diff >= 60 * 60 * 24:
- return '' + str(math.floor(diff / 60 / 60 / 24)) + 'd'
+ return "" + str(math.floor(diff / 60 / 60 / 24)) + "d"
elif diff >= 60 * 60:
- return '' + str(math.floor(diff / 60 / 60)) + 'h'
+ return "" + str(math.floor(diff / 60 / 60)) + "h"
elif diff >= 60:
- return '' + str(math.floor(diff / 60)) + 'm'
+ return "" + str(math.floor(diff / 60)) + "m"
else:
- return '1m'
+ return "1m"
def colored_label(parent, text: str, color: QtGui.QColor):
label = QtWidgets.QLabel(text)