From e6fe296b92569e93fe08a604d1b0ff36ca64a501 Mon Sep 17 00:00:00 2001 From: itdominator <1itdominator@gmail.com> Date: Sat, 27 Nov 2021 01:59:20 -0600 Subject: [PATCH] small cleanups --- .../PyFM/new/pyfm/shellfm/windows/WindowController.py | 2 +- .../PyFM/new/pyfm/shellfm/windows/view/View.py | 2 +- .../PyFM/new/pyfm/shellfm/windows/view/icons/Icon.py | 9 ++------- .../PyFM/new/pyfm/shellfm/windows/view/utils/Settings.py | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/versions/pyfm-0.0.1/PyFM/new/pyfm/shellfm/windows/WindowController.py b/src/versions/pyfm-0.0.1/PyFM/new/pyfm/shellfm/windows/WindowController.py index ac42458..f1c8e26 100644 --- a/src/versions/pyfm-0.0.1/PyFM/new/pyfm/shellfm/windows/WindowController.py +++ b/src/versions/pyfm-0.0.1/PyFM/new/pyfm/shellfm/windows/WindowController.py @@ -17,7 +17,7 @@ def threaded(fn): class WindowController: def __init__(self): USER_HOME = path.expanduser('~') - CONFIG_PATH = USER_HOME + "/.config/pyfm" + CONFIG_PATH = USER_HOME + "/.config/pyfm" self.session_file = CONFIG_PATH + "/session.json" self._event_sleep_time = 1 diff --git a/src/versions/pyfm-0.0.1/PyFM/new/pyfm/shellfm/windows/view/View.py b/src/versions/pyfm-0.0.1/PyFM/new/pyfm/shellfm/windows/view/View.py index 22e6467..719c423 100644 --- a/src/versions/pyfm-0.0.1/PyFM/new/pyfm/shellfm/windows/view/View.py +++ b/src/versions/pyfm-0.0.1/PyFM/new/pyfm/shellfm/windows/view/View.py @@ -18,7 +18,7 @@ from . import Path class View(Settings, FileHandler, Launcher, Icon, Path): def __init__(self): - self. logger = None + self. logger = None self.id_length = 10 self.id = "" diff --git a/src/versions/pyfm-0.0.1/PyFM/new/pyfm/shellfm/windows/view/icons/Icon.py b/src/versions/pyfm-0.0.1/PyFM/new/pyfm/shellfm/windows/view/icons/Icon.py index e7ea4ef..f551ee6 100644 --- a/src/versions/pyfm-0.0.1/PyFM/new/pyfm/shellfm/windows/view/icons/Icon.py +++ b/src/versions/pyfm-0.0.1/PyFM/new/pyfm/shellfm/windows/view/icons/Icon.py @@ -3,17 +3,12 @@ import os, subprocess, threading, hashlib from os.path import isfile # Gtk imports -import gi -gi.require_version('Gtk', '3.0') - -# from gi.repository import Gtk from gi.repository import GdkPixbuf # Application imports from .mixins import * - def threaded(fn): def wrapper(*args, **kwargs): threading.Thread(target=fn, args=args, kwargs=kwargs).start() @@ -61,9 +56,9 @@ class Icon(DesktopIconMixin, VideoIconMixin): def create_scaled_image(self, path, wxh): try: - pixbuf = GdkPixbuf.Pixbuf.new_from_file(path)#.get_pixbuf() + pixbuf = GdkPixbuf.Pixbuf.new_from_file(path) scaled_pixbuf = pixbuf.scale_simple(wxh[0], wxh[1], 2) # 2 = BILINEAR and is best by default - return scaled_pixbuf # Gtk.Image.new_from_pixbuf(scaled_pixbuf) + return scaled_pixbuf except Exception as e: print("Image Scaling Issue:") print( repr(e) ) diff --git a/src/versions/pyfm-0.0.1/PyFM/new/pyfm/shellfm/windows/view/utils/Settings.py b/src/versions/pyfm-0.0.1/PyFM/new/pyfm/shellfm/windows/view/utils/Settings.py index b515e37..7dac2b9 100644 --- a/src/versions/pyfm-0.0.1/PyFM/new/pyfm/shellfm/windows/view/utils/Settings.py +++ b/src/versions/pyfm-0.0.1/PyFM/new/pyfm/shellfm/windows/view/utils/Settings.py @@ -80,7 +80,7 @@ class Settings: fpdf = ('.pdf') - # Dire structure check + # Dir structure check if path.isdir(REMUX_FOLDER) == False: os.mkdir(REMUX_FOLDER)