Philipp Hörist pushed to branch master at gajim / gajim


Commits:
e91d79aa by Philipp Hörist at 2025-02-11T23:24:47+01:00
refactor: Remove dead code related to jingle

- - - - -


2 changed files:

- gajim/gtk/application.py
- gajim/gui_interface.py


Changes:

=====================================
gajim/gtk/application.py
=====================================
@@ -246,7 +246,6 @@ def _startup(self) -> None:
         from gajim.gui_interface import Interface
 
         self.interface = Interface()
-        self.interface.run(self)
 
         from gajim.gtk.status_icon import StatusIcon
 


=====================================
gajim/gui_interface.py
=====================================
@@ -26,12 +26,9 @@
 from typing import Any
 
 import logging
-import sys
 import time
 from threading import Thread
 
-from gi.repository import GLib
-from gi.repository import Gtk
 from nbxmpp import Hashes2
 from nbxmpp import idlequeue
 from nbxmpp import JID
@@ -168,45 +165,3 @@ def __compare_hashes(account: str, file_props: FileProp) 
-> None:
         )
         if session:
             session.end_session()
-
-    def process_connections(self) -> bool:
-        """
-        Called each foo (200) milliseconds. Check for idlequeue timeouts
-        """
-        try:
-            app.idlequeue.process()
-        except Exception:
-            # Otherwise, an exception will stop our loop
-
-            if sys.platform == "win32":
-                # On Windows process() calls select.select(), so we need this
-                # executed as often as possible.
-                # Adding it directly with GLib.idle_add() causes Gajim to use
-                # too much CPU time. That's why its added with 1ms timeout.
-                # On Linux only alarms are checked in process(), so we use
-                # a bigger timeout
-                timeout, in_seconds = 1, None
-            else:
-                timeout, in_seconds = app.idlequeue.PROCESS_TIMEOUT
-
-            if in_seconds:
-                GLib.timeout_add_seconds(timeout, self.process_connections)
-            else:
-                GLib.timeout_add(timeout, self.process_connections)
-            raise
-        return True  # renew timeout (loop for ever)
-
-    def run(self, _application: Gtk.Application) -> None:
-        # TODO Jingle FT
-        # get instances for windows/dialogs that will show_all()/hide()
-        # self.instances['file_transfers'] = FileTransfersWindow()
-
-        if sys.platform == "win32":
-            timeout, in_seconds = 20, None
-        else:
-            timeout, in_seconds = app.idlequeue.PROCESS_TIMEOUT
-
-        if in_seconds:
-            GLib.timeout_add_seconds(timeout, self.process_connections)
-        else:
-            GLib.timeout_add(timeout, self.process_connections)



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/e91d79aa02e79f04e6f7a22fd6573371ca891296

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/e91d79aa02e79f04e6f7a22fd6573371ca891296
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to