From: Michael Rasmussen Date: Mon, 8 Apr 2024 21:19:50 +0000 (+0200) Subject: Initial upload X-Git-Url: http://git.datanom.net/lensdatabase.git/commitdiff_plain/365c79d46c3804dd4b3f796bd2fcd4e3ddf1186b?ds=sidebyside Initial upload Signed-off-by: Michael Rasmussen --- 365c79d46c3804dd4b3f796bd2fcd4e3ddf1186b diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e2b7bc7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +.eric6project/ +.eric7project/ +.ropeproject/ +.jedi/ +.directory/ +*.pyc +*.pyo +*.orig +*.bak +*.rej +*~ +cur/ +tmp/ +__pycache__/ +__pypackages__ +*.DS_Store +.pytest_cache/ +venv/ +.venv/ +env/ +.env/ +*.epj diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/icons/245796-200.png b/icons/245796-200.png new file mode 100644 index 0000000..43c0824 Binary files /dev/null and b/icons/245796-200.png differ diff --git a/icons/245796-50.png b/icons/245796-50.png new file mode 100644 index 0000000..15a545d Binary files /dev/null and b/icons/245796-50.png differ diff --git a/lensdatabase.ui b/lensdatabase.ui new file mode 100644 index 0000000..173a05c --- /dev/null +++ b/lensdatabase.ui @@ -0,0 +1,341 @@ + + + + + + False + dialog + Glade + Michael Rasmussen <mir@datanom.net> + icons/245796-200.png + gpl-3-0 + + + False + vertical + 2 + + + False + end + + + False + False + 0 + + + + + + + + + + True + False + window + 500 + 400 + + + + True + False + vertical + + + True + False + + + True + False + _File + True + + + True + False + + + gtk-new + True + False + True + True + + + + + gtk-open + True + False + True + True + + + + + gtk-save + True + False + True + True + + + + + gtk-save-as + True + False + True + True + + + + + True + False + + + + + gtk-quit + True + False + True + True + + + + + + + + + + True + False + _Edit + True + + + True + False + + + gtk-cut + True + False + True + True + + + + + gtk-copy + True + False + True + True + + + + + gtk-paste + True + False + True + True + + + + + gtk-delete + True + False + True + True + + + + + + + + + True + False + _View + True + + + + + True + False + _Help + True + + + True + False + + + gtk-about + True + False + True + True + + + + + + + + + False + True + 0 + + + + + True + False + + + True + False + 20 + vertical + 10 + start + + + gtk-find + True + True + True + True + True + + + True + True + 0 + + + + + gtk-add + True + True + True + True + True + + + True + True + 1 + + + + + True + True + True + + + True + False + Add a new lens manufactorer to database + icons/245796-50.png + + + + + True + True + 2 + + + + + False + False + 5 + 0 + + + + + + + + True + True + 1 + + + + + True + False + + + True + False + 10 + 10 + 10 + 10 + 6 + 6 + vertical + 2 + + + True + True + 0 + + + + + True + False + label + + + True + True + 1 + + + + + True + True + Unsaved changes + + + False + True + 2 + + + + + False + True + 2 + + + + + + diff --git a/lensdb.py b/lensdb.py new file mode 100644 index 0000000..9af5862 --- /dev/null +++ b/lensdb.py @@ -0,0 +1,25 @@ +#!/usr/bin/python + +import gi + +gi.require_version("Gtk", "3.0") +from gi.repository import Gtk + +dirty = False + +class Handler: + def onDestroy(self, *args): + Gtk.main_quit() + def onQuit(self, *args): + if dirty: + """ show warning """ + self.onDestroy(self, args) + +builder = Gtk.Builder() +builder.add_from_file("lensdatabase.ui") +builder.connect_signals(Handler()) + +window = builder.get_object("main_window") +window.show_all() + +Gtk.main()