Fixing translate plugin; attempted dispose call
This commit is contained in:
parent
d65ea8dec8
commit
02c31719d1
|
@ -184,8 +184,8 @@ class Plugin(PluginBase):
|
|||
response = requests.post(self.vqd_link, headers=self.vqd_headers, data=self.vqd_data, timeout=2)
|
||||
if response.status_code == 200:
|
||||
data = response.content
|
||||
vqd_start_index = data.index(b"vqd='") + 5
|
||||
vqd_end_index = data.index(b"'", vqd_start_index)
|
||||
vqd_start_index = data.index(b"vqd=\"") + 5
|
||||
vqd_end_index = data.index(b"\"", vqd_start_index)
|
||||
self._vqd_attrib = data[vqd_start_index:vqd_end_index].decode("utf-8")
|
||||
|
||||
print(f"Translation VQD: {self._vqd_attrib}")
|
||||
|
|
|
@ -75,6 +75,10 @@ class IconGridWidget(Gtk.IconView):
|
|||
return self.get_model()
|
||||
|
||||
def clear_and_set_new_store(self):
|
||||
store = self.get_model()
|
||||
if store:
|
||||
store.run_dispose()
|
||||
|
||||
self.set_model(None)
|
||||
store = Gtk.ListStore(GdkPixbuf.Pixbuf or GdkPixbuf.PixbufAnimation or None, str or None)
|
||||
# store = Gtk.ListStore(Gtk.DirectoryList)
|
||||
|
|
Loading…
Reference in New Issue