gui: Add completion status counter
This commit is contained in:
@@ -152,6 +152,12 @@ class MainWindow(ThemedTk):
|
|||||||
self.statusbar, textvariable=self.status_var_left
|
self.statusbar, textvariable=self.status_var_left
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.status_var_right = StringVar()
|
||||||
|
self.status_var_right.set("0/0")
|
||||||
|
self.status_label_right = tk.Label(
|
||||||
|
self.statusbar, textvariable=self.status_var_right
|
||||||
|
)
|
||||||
|
|
||||||
self.columnconfigure(0, weight=1)
|
self.columnconfigure(0, weight=1)
|
||||||
self.rowconfigure(0, weight=1)
|
self.rowconfigure(0, weight=1)
|
||||||
|
|
||||||
@@ -159,7 +165,10 @@ class MainWindow(ThemedTk):
|
|||||||
self.content.grid(column=0, row=0, sticky="NSEW")
|
self.content.grid(column=0, row=0, sticky="NSEW")
|
||||||
|
|
||||||
self.statusbar.grid(row=1, column=0, sticky="ESW")
|
self.statusbar.grid(row=1, column=0, sticky="ESW")
|
||||||
self.status_label_left.grid(row=0, column=0, sticky="E")
|
self.statusbar.columnconfigure(0, weight=1)
|
||||||
|
self.statusbar.columnconfigure(1, weight=1)
|
||||||
|
self.status_label_left.grid(row=0, column=0, sticky="W", padx=10, pady=3)
|
||||||
|
self.status_label_right.grid(row=0, column=1, sticky="E", padx=10, pady=3)
|
||||||
|
|
||||||
self.rowconfigure(0, weight=1)
|
self.rowconfigure(0, weight=1)
|
||||||
self.columnconfigure(0, weight=1)
|
self.columnconfigure(0, weight=1)
|
||||||
@@ -183,6 +192,11 @@ class MainWindow(ThemedTk):
|
|||||||
# Add record count?
|
# Add record count?
|
||||||
# Add saved status?
|
# Add saved status?
|
||||||
|
|
||||||
|
partialn = sum(txn.partial for txn in self.rows.values())
|
||||||
|
totaln = len(self.rows)
|
||||||
|
remainingstr = f"Exportable: {totaln - partialn} / {totaln}"
|
||||||
|
self.status_var_right.set(remainingstr)
|
||||||
|
|
||||||
def row_selected(self, event):
|
def row_selected(self, event):
|
||||||
logger.debug(f"Received RowTree selection event {event!r}")
|
logger.debug(f"Received RowTree selection event {event!r}")
|
||||||
rows = self.rowtree.get_selected_rows()
|
rows = self.rowtree.get_selected_rows()
|
||||||
|
|||||||
Reference in New Issue
Block a user