develop #14

Merged
itdominator merged 28 commits from develop into master 2025-12-28 04:37:29 +00:00
32 changed files with 416 additions and 287 deletions
Showing only changes of commit 02c31719d1 - Show all commits

View File

@@ -184,11 +184,11 @@ class Plugin(PluginBase):
response = requests.post(self.vqd_link, headers=self.vqd_headers, data=self.vqd_data, timeout=2) response = requests.post(self.vqd_link, headers=self.vqd_headers, data=self.vqd_data, timeout=2)
if response.status_code == 200: if response.status_code == 200:
data = response.content data = response.content
vqd_start_index = data.index(b"vqd='") + 5 vqd_start_index = data.index(b"vqd=\"") + 5
vqd_end_index = data.index(b"'", vqd_start_index) vqd_end_index = data.index(b"\"", vqd_start_index)
self._vqd_attrib = data[vqd_start_index:vqd_end_index].decode("utf-8") self._vqd_attrib = data[vqd_start_index:vqd_end_index].decode("utf-8")
print(f"Translation VQD: {self._vqd_attrib}") print(f"Translation VQD: {self._vqd_attrib}")
else: else:
msg = f"Could not get VQS attribute... Response Code: {response.status_code}" msg = f"Could not get VQS attribute... Response Code: {response.status_code}"
self._translate_to_buffer.set_text(msg) self._translate_to_buffer.set_text(msg)

View File

@@ -75,7 +75,11 @@ class IconGridWidget(Gtk.IconView):
return self.get_model() return self.get_model()
def clear_and_set_new_store(self): def clear_and_set_new_store(self):
store = self.get_model()
if store:
store.run_dispose()
self.set_model(None) self.set_model(None)
store = Gtk.ListStore(GdkPixbuf.Pixbuf or GdkPixbuf.PixbufAnimation or None, str or None) store = Gtk.ListStore(GdkPixbuf.Pixbuf or GdkPixbuf.PixbufAnimation or None, str or None)
# store = Gtk.ListStore(Gtk.DirectoryList) # store = Gtk.ListStore(Gtk.DirectoryList)
self.set_model(store) self.set_model(store)