Cleanup
This commit is contained in:
parent
79953bb1ef
commit
79063e41cd
|
@ -26,7 +26,7 @@ class WindowController:
|
||||||
self._windows = []
|
self._windows = []
|
||||||
|
|
||||||
|
|
||||||
def set__wid_and_tid(self, wid, tid):
|
def set_wid_and_tid(self, wid, tid):
|
||||||
self._active_window_id = str(wid)
|
self._active_window_id = str(wid)
|
||||||
self._active_tab_id = str(tid)
|
self._active_tab_id = str(tid)
|
||||||
|
|
||||||
|
|
|
@ -59,12 +59,12 @@ class Icon(DesktopIconMixin, VideoIconMixin):
|
||||||
|
|
||||||
def create_scaled_image(self, path, wxh):
|
def create_scaled_image(self, path, wxh):
|
||||||
try:
|
try:
|
||||||
if path.lower().endswith(".gif"):
|
if path.lower().endswith(".gif"):
|
||||||
return GdkPixbuf.PixbufAnimation.new_from_file(path) \
|
return GdkPixbuf.PixbufAnimation.new_from_file(path) \
|
||||||
.get_static_image() \
|
.get_static_image() \
|
||||||
.scale_simple(wxh[0], wxh[1], GdkPixbuf.InterpType.BILINEAR)
|
.scale_simple(wxh[0], wxh[1], GdkPixbuf.InterpType.BILINEAR)
|
||||||
else:
|
else:
|
||||||
return GdkPixbuf.Pixbuf.new_from_file_at_scale(path, wxh[0], wxh[1], True)
|
return GdkPixbuf.Pixbuf.new_from_file_at_scale(path, wxh[0], wxh[1], True)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Image Scaling Issue:")
|
print("Image Scaling Issue:")
|
||||||
print( repr(e) )
|
print( repr(e) )
|
||||||
|
|
|
@ -30,16 +30,16 @@ class Window:
|
||||||
def pop_tab(self):
|
def pop_tab(self):
|
||||||
self._tabs.pop()
|
self._tabs.pop()
|
||||||
|
|
||||||
def delete_tab_by_id(self, vid):
|
def delete_tab_by_id(self, tid):
|
||||||
for tab in self._tabs:
|
for tab in self._tabs:
|
||||||
if tab.get_id() == vid:
|
if tab.get_id() == tid:
|
||||||
self._tabs.remove(tab)
|
self._tabs.remove(tab)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
def get_tab_by_id(self, vid):
|
def get_tab_by_id(self, tid):
|
||||||
for tab in self._tabs:
|
for tab in self._tabs:
|
||||||
if tab.get_id() == vid:
|
if tab.get_id() == tid:
|
||||||
return tab
|
return tab
|
||||||
|
|
||||||
def get_tab_by_index(self, index):
|
def get_tab_by_index(self, index):
|
||||||
|
|
Loading…
Reference in New Issue