diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 70191f9..0000000 --- a/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.idea/* -.virt_env/* -todo.db -commands.sql -.out/* -.flatpak-builder/* diff --git a/com.ione15.ion_todo_planner.desktop b/TODO.desktop similarity index 100% rename from com.ione15.ion_todo_planner.desktop rename to TODO.desktop diff --git a/commands.sql b/commands.sql new file mode 100644 index 0000000..a5c7442 --- /dev/null +++ b/commands.sql @@ -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); diff --git a/flatpak-mainfest.json b/flatpak-mainfest.json deleted file mode 100644 index 970c0d1..0000000 --- a/flatpak-mainfest.json +++ /dev/null @@ -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" - ] - } - ] -} diff --git a/main.py b/main.py index 411d1e9..78c78d9 100755 --- a/main.py +++ b/main.py @@ -18,7 +18,6 @@ from datetime import datetime import time import tkinter as tk from collections import OrderedDict -print("alive") con = sqlite3.connect("todo.db") 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.pack() priority_label = tk.Label(priority_selection_frame, text="Priority:") - priority_label.pack(side=tk.LEFT, padx=25, pady=25) - priority_selection = tk.Scale(priority_selection_frame, from_=1, to=3, orient=tk.HORIZONTAL, width=20) + priority_label.pack(side=tk.LEFT, padx=15, pady=15) + priority_selection = tk.Scale(priority_selection_frame, from_=1, to=5, orient=tk.HORIZONTAL, width=20) priority_selection.pack() input_confirm = tk.Button(input_field, text="Confirm", @@ -78,7 +77,6 @@ def remove_item(): selected_task_id = list(tasklist.keys())[selected_index] listbox.delete(selected_index) cur.execute("DELETE FROM todo WHERE ID = %s" % selected_task_id) - print("DELETE FROM todo WHERE ID = %s" % selected_task_id) con.commit() update_list() diff --git a/todo.db b/todo.db new file mode 100644 index 0000000..8c6e478 Binary files /dev/null and b/todo.db differ