From 15d0e380981119ab15a41ae47d260024d74cb2ae Mon Sep 17 00:00:00 2001 From: Ione 15 Date: Fri, 29 Mar 2024 13:36:13 +0100 Subject: [PATCH] Last changes before Rewrite to Godot --- .gitignore | 6 -- ...5.ion_todo_planner.desktop => TODO.desktop | 0 commands.sql | 3 + flatpak-mainfest.json | 62 ------------------ main.py | 6 +- todo.db | Bin 0 -> 12288 bytes 6 files changed, 5 insertions(+), 72 deletions(-) delete mode 100644 .gitignore rename com.ione15.ion_todo_planner.desktop => TODO.desktop (100%) create mode 100644 commands.sql delete mode 100644 flatpak-mainfest.json create mode 100644 todo.db 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 0000000000000000000000000000000000000000..8c6e4783ea16e75fd933f5e65f98c51548178cfc GIT binary patch literal 12288 zcmeI#L2DC16bJA(v%AKmv?EFgn#-_IY(RwCdJ@FcEOj+anspN!Jj6)TQd(WqRSKTe zlV`s~(Fi$t@C&3j&-SW#@KR6W!GrU*iO>?7v+^I9c{}^&z1{uY_I9nj5qI=j^!PzL z)^l` z@I8+7@Ryd|zwdZBXG)ifK~vxInlt=0g-qeRJdwMS6}0hiwX^-?(U$qQZ?&JsQL=CG z=eK5g<^TGV>^Z3x$Whaz`s$0CR(I8#izac`HRK zl@fBU`1!?qe`4=B$CZh_50*Tmw(0E1Z_nF>btqbfB*y_009U<00Izz00bZa0SG|g9~5vbAsmNS+ve4>c$Lz! G(&<0i(2(^2 literal 0 HcmV?d00001