Last changes before Rewrite to Godot
This commit is contained in:
parent
a1d03973c6
commit
15d0e38098
6 changed files with 5 additions and 72 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -1,6 +0,0 @@
|
||||||
.idea/*
|
|
||||||
.virt_env/*
|
|
||||||
todo.db
|
|
||||||
commands.sql
|
|
||||||
.out/*
|
|
||||||
.flatpak-builder/*
|
|
3
commands.sql
Normal file
3
commands.sql
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
INSERT INTO "main"."todo"("ID","TODO","CREATION_DATE","DUE_DATE","PRIO","IMP") VALUES (NULL,'example task 1','1711654181','1711654241',1,0);
|
||||||
|
INSERT INTO "main"."todo"("ID","TODO","CREATION_DATE","DUE_DATE","PRIO","IMP") VALUES (NULL,'example task 2','1711654181','1711654241',1,0);
|
||||||
|
INSERT INTO "main"."todo"("ID","TODO","CREATION_DATE","DUE_DATE","PRIO","IMP") VALUES (NULL,'example task 3','1711654181','1711654241',1,0);
|
|
@ -1,62 +0,0 @@
|
||||||
{
|
|
||||||
"id": "com.ione15.ion_todo_planner",
|
|
||||||
"runtime": "org.freedesktop.Platform",
|
|
||||||
"runtime-version": "23.08",
|
|
||||||
"sdk": "org.freedesktop.Sdk",
|
|
||||||
"name": "com.ione15.ion_todo_planner",
|
|
||||||
"buildsystem": "simple",
|
|
||||||
"command": "main.py",
|
|
||||||
"build-commands": [
|
|
||||||
"pip3 install --prefix=${FLATPAK_DEST} ."
|
|
||||||
],
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/iwalton3/tkinter-standalone",
|
|
||||||
"commit": "d9cb97c5bd4f814c73678366e0e48220776b6ad3"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"modules": [
|
|
||||||
{
|
|
||||||
"name": "main",
|
|
||||||
"buildsystem": "simple",
|
|
||||||
"build-commands": [
|
|
||||||
"install -D main.py /app/bin/main.py"
|
|
||||||
],
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"path": "main.py"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "tcl8.6",
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "archive",
|
|
||||||
"url": "https://prdownloads.sourceforge.net/tcl/tcl8.6.12-src.tar.gz",
|
|
||||||
"sha256": "26c995dd0f167e48b11961d891ee555f680c175f7173ff8cb829f4ebcde4c1a6"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"subdir": "unix",
|
|
||||||
"post-install": [
|
|
||||||
"chmod +w ${FLATPAK_DEST}/lib/libtcl8.6.so"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "tk8.6",
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "archive",
|
|
||||||
"url": "https://prdownloads.sourceforge.net/tcl/tk8.6.12-src.tar.gz",
|
|
||||||
"sha256": "12395c1f3fcb6bed2938689f797ea3cdf41ed5cb6c4766eec8ac949560310630"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"subdir": "unix",
|
|
||||||
"post-install": [
|
|
||||||
"chmod +w ${FLATPAK_DEST}/lib/libtk8.6.so"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
6
main.py
6
main.py
|
@ -18,7 +18,6 @@ from datetime import datetime
|
||||||
import time
|
import time
|
||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
print("alive")
|
|
||||||
|
|
||||||
con = sqlite3.connect("todo.db")
|
con = sqlite3.connect("todo.db")
|
||||||
cur = con.cursor()
|
cur = con.cursor()
|
||||||
|
@ -50,8 +49,8 @@ def add_item_dialog():
|
||||||
priority_selection_frame = tk.Frame(input_field) # container for prio and scale
|
priority_selection_frame = tk.Frame(input_field) # container for prio and scale
|
||||||
priority_selection_frame.pack()
|
priority_selection_frame.pack()
|
||||||
priority_label = tk.Label(priority_selection_frame, text="Priority:")
|
priority_label = tk.Label(priority_selection_frame, text="Priority:")
|
||||||
priority_label.pack(side=tk.LEFT, padx=25, pady=25)
|
priority_label.pack(side=tk.LEFT, padx=15, pady=15)
|
||||||
priority_selection = tk.Scale(priority_selection_frame, from_=1, to=3, orient=tk.HORIZONTAL, width=20)
|
priority_selection = tk.Scale(priority_selection_frame, from_=1, to=5, orient=tk.HORIZONTAL, width=20)
|
||||||
priority_selection.pack()
|
priority_selection.pack()
|
||||||
|
|
||||||
input_confirm = tk.Button(input_field, text="Confirm",
|
input_confirm = tk.Button(input_field, text="Confirm",
|
||||||
|
@ -78,7 +77,6 @@ def remove_item():
|
||||||
selected_task_id = list(tasklist.keys())[selected_index]
|
selected_task_id = list(tasklist.keys())[selected_index]
|
||||||
listbox.delete(selected_index)
|
listbox.delete(selected_index)
|
||||||
cur.execute("DELETE FROM todo WHERE ID = %s" % selected_task_id)
|
cur.execute("DELETE FROM todo WHERE ID = %s" % selected_task_id)
|
||||||
print("DELETE FROM todo WHERE ID = %s" % selected_task_id)
|
|
||||||
con.commit()
|
con.commit()
|
||||||
update_list()
|
update_list()
|
||||||
|
|
||||||
|
|
BIN
todo.db
Normal file
BIN
todo.db
Normal file
Binary file not shown.
Reference in a new issue