small cleanups
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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          = ""
 | 
			
		||||
 
 | 
			
		||||
@@ -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) )
 | 
			
		||||
 
 | 
			
		||||
@@ -80,7 +80,7 @@ class Settings:
 | 
			
		||||
    fpdf    = ('.pdf')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    # Dire structure check
 | 
			
		||||
    # Dir structure check
 | 
			
		||||
    if path.isdir(REMUX_FOLDER) == False:
 | 
			
		||||
        os.mkdir(REMUX_FOLDER)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user