diff --git a/sweecrypt-gtk.py b/sweecrypt-gtk.py new file mode 100644 index 0000000..31c414c --- /dev/null +++ b/sweecrypt-gtk.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python +# -*- Mode: Python; coding: utf-8; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- +# +# main.py +# Copyright (C) 2024 Swee +# + +from gi.repository import Gtk, GdkPixbuf, Gdk +import os, sys + + +#Comment the first line and uncomment the second before installing +#or making the tarball (alternatively, use project variables) +UI_FILE = os.path.dirname(os.path.realpath(__file__)) + "/sweecrypt-gtk.ui" +#UI_FILE = "/usr/local/share/sweecrypt_gui/ui/sweecrypt_gui.ui" + + +class GUI: + def __init__(self): + + self.builder = Gtk.Builder() + self.builder.add_from_file(UI_FILE) + self.builder.connect_signals(self) + + window = self.builder.get_object('window') + + + window.show_all() + + def on_window_destroy(self, window): + Gtk.main_quit() + +def main(): + app = GUI() + Gtk.main() + +if __name__ == "__main__": + sys.exit(main()) + diff --git a/sweecrypt-gtk.ui b/sweecrypt-gtk.ui new file mode 100644 index 0000000..13458c9 --- /dev/null +++ b/sweecrypt-gtk.ui @@ -0,0 +1,86 @@ + + + + + + True + False + edit-copy + + + True + False + document-revert + + + True + False + document-properties + + + False + sweecrypt + + + True + False + vertical + + + True + True + True + + + True + True + 0 + + + + + Encode + True + True + True + image1 + True + + + False + True + 1 + + + + + Decode + True + True + True + image2 + + + False + True + 2 + + + + + Start + True + True + True + start + + + False + True + 4 + + + + + +