From 0061d5aa23f4e76b5f8c179a3799a09cde87c81f Mon Sep 17 00:00:00 2001 From: Swee Date: Mon, 9 Sep 2024 16:47:18 -0700 Subject: [PATCH] slightly simplify --- sweecrypt-gtk.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sweecrypt-gtk.py b/sweecrypt-gtk.py index c57a1e4..b55de73 100644 --- a/sweecrypt-gtk.py +++ b/sweecrypt-gtk.py @@ -1,8 +1,6 @@ -import gi +import gi, os, sys, sweecrypt as sc gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GdkPixbuf, Gdk -import os, sys -from sweecrypt import encrypt, decrypt UI_FILE = os.path.dirname(os.path.realpath(__file__)) + "/sweecrypt-gtk.ui" class GUI: def __init__(self): @@ -25,10 +23,10 @@ class GUI: encode = self.builder.get_object('encode').get_property("active") inputted = self.builder.get_object('text').get_property("text") if encode: - self.builder.get_object('text').set_property("text", encrypt(inputted)) + self.builder.get_object('text').set_property("text", sc.encrypt(inputted)) self.builder.get_object('encode').set_property("active", False) else: - self.builder.get_object('text').set_property("text", decrypt(inputted)) + self.builder.get_object('text').set_property("text", sc.decrypt(inputted)) self.builder.get_object('decode').set_property("active", False) def main(): app = GUI()