Bringing to latest changes #3

Merged
itdominator merged 41 commits from develop into master 2022-07-16 19:14:30 +00:00
3 changed files with 12 additions and 21 deletions
Showing only changes of commit 1fc1609b0a - Show all commits

View File

@ -19,7 +19,7 @@ def threaded(fn):
class WidgetMixin: class GridMixin:
"""docstring for WidgetMixin""" """docstring for WidgetMixin"""
def load_store(self, tab, store, save_state=False): def load_store(self, tab, store, save_state=False):
@ -27,14 +27,8 @@ class WidgetMixin:
dir = tab.get_current_directory() dir = tab.get_current_directory()
files = tab.get_files() 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): for i, file in enumerate(files):
store.append([None, file[0]])
self.create_icon(i, tab, store, dir, file[0]) self.create_icon(i, tab, store, dir, file[0])
# NOTE: Not likely called often from here but it could be useful # NOTE: Not likely called often from here but it could be useful
@ -53,9 +47,6 @@ class WidgetMixin:
if not icon: if not icon:
icon = self.get_system_thumbnail(fpath, tab.SYS_ICON_WH[0]) icon = self.get_system_thumbnail(fpath, tab.SYS_ICON_WH[0])
if not icon: if not icon:
if fpath.endswith(".gif"):
icon = GdkPixbuf.PixbufAnimation.get_static_image(fpath)
else:
icon = GdkPixbuf.Pixbuf.new_from_file(tab.DEFAULT_ICON) icon = GdkPixbuf.Pixbuf.new_from_file(tab.DEFAULT_ICON)
store.set_value(itr, 0, icon) store.set_value(itr, 0, icon)

View File

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