Renamed file, cleanup

This commit is contained in:
itdominator 2022-03-13 18:42:00 -05:00
parent 09a85abb79
commit 1fc1609b0a
3 changed files with 12 additions and 21 deletions

View File

@ -19,7 +19,7 @@ def threaded(fn):
class WidgetMixin:
class GridMixin:
"""docstring for WidgetMixin"""
def load_store(self, tab, store, save_state=False):
@ -27,14 +27,8 @@ class WidgetMixin:
dir = tab.get_current_directory()
files = tab.get_files()
# NOTE: We insure all indecies exist before calling threads that update
# icon positions. In addition, adding the name allows us to see
# the "file" during long or heavy number of icon updates.
for file in files:
store.append([None, file[0]])
# Now we update as fast as possible the icons.
for i, file in enumerate(files):
store.append([None, file[0]])
self.create_icon(i, tab, store, dir, file[0])
# NOTE: Not likely called often from here but it could be useful
@ -53,9 +47,6 @@ class WidgetMixin:
if not icon:
icon = self.get_system_thumbnail(fpath, tab.SYS_ICON_WH[0])
if not icon:
if fpath.endswith(".gif"):
icon = GdkPixbuf.PixbufAnimation.get_static_image(fpath)
else:
icon = GdkPixbuf.Pixbuf.new_from_file(tab.DEFAULT_ICON)
store.set_value(itr, 0, icon)

View File

@ -7,12 +7,12 @@ gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
# Application imports
from .widget_mixin import WidgetMixin
from .grid_mixin import GridMixin
class TabMixin(WidgetMixin):
class TabMixin(GridMixin):
"""docstring for TabMixin"""
def create_tab(self, wid=None, tid=None, path=None):