Skip to content

Commit

Permalink
remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
glyph committed Nov 2, 2022
1 parent 56155a5 commit cef1945
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions src/twisted/internet/gtk2reactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,6 @@ class Gtk2Reactor(_glibbase.GlibReactorBase):
PyGTK+ 2 event loop reactor.
"""

_POLL_DISCONNECTED = gobject.IO_HUP | gobject.IO_ERR | gobject.IO_NVAL
_POLL_IN = gobject.IO_IN
_POLL_OUT = gobject.IO_OUT

# glib's iochannel sources won't tell us about any events that we haven't
# asked for, even if those events aren't sensible inputs to the poll()
# call.
INFLAGS = _POLL_IN | _POLL_DISCONNECTED
OUTFLAGS = _POLL_OUT | _POLL_DISCONNECTED

def __init__(self, useGtk=True):
_gtk = None
if useGtk is True:
Expand All @@ -89,19 +79,7 @@ def __init__(self, useGtk=True):
_glibbase.GlibReactorBase.__init__(self, gobject, _gtk, useGtk=useGtk)


class PortableGtkReactor(_glibbase.PortableGlibReactorBase):
"""
Reactor that works on Windows.
Sockets aren't supported by GTK+'s input_add on Win32.
"""

def __init__(self, useGtk=True):
_gtk = None
if useGtk is True:
import gtk as _gtk

_glibbase.PortableGlibReactorBase.__init__(self, gobject, _gtk, useGtk=useGtk)
PortableGtkReactor = Gtk2Reactor


def install(useGtk=True):
Expand Down

0 comments on commit cef1945

Please sign in to comment.