Example #1
0
def run_gtk1(config):
    # Put these off until after we parse options, so we know what reactor
    # to install.
    from twisted.internet import gtkreactor
    gtkreactor.install()
    from twisted.spread.ui import gtkutil

    # Put this off until after we parse options, or else gnome eats them.
    # (http://www.daa.com.au/pipermail/pygtk/2002-December/004051.html)
    sys.argv[:] = ['manhole']
    from twisted.manhole.ui import gtkmanhole

    i = gtkmanhole.Interaction()
    lw = gtkutil.Login(i.connected,
                       i.client,
                       initialUser=config.opts['user'],
                       initialPassword=config.opts['password'],
                       initialService=config.opts['service'],
                       initialHostname=config.opts['host'],
                       initialPortno=config.opts['port'],
                       initialPerspective=config.opts['perspective'])

    i.loginWindow = lw

    lw.show_all()
Example #2
0
def run_gtk1(config):
    # Put these off until after we parse options, so we know what reactor
    # to install.
    from twisted.internet import gtkreactor
    gtkreactor.install()
    from twisted.spread.ui import gtkutil

    # Put this off until after we parse options, or else gnome eats them.
    # (http://www.daa.com.au/pipermail/pygtk/2002-December/004051.html)
    sys.argv[:] = ['manhole']
    from twisted.manhole.ui import gtkmanhole

    i = gtkmanhole.Interaction()
    lw = gtkutil.Login(i.connected,
                       i.client,
                       initialUser=config.opts['user'],
                       initialPassword=config.opts['password'],
                       initialService=config.opts['service'],
                       initialHostname=config.opts['host'],
                       initialPortno=config.opts['port'],
                       initialPerspective=config.opts['perspective'])

    i.loginWindow = lw

    lw.show_all()
Example #3
0
File: im.py Project: fxia22/ASM_xf
def run():
    if os.name == 'java':
        from twisted.internet import javareactor
        javareactor.install()
        from twisted.im.jyaccount import AccountManagementGUI
        AccountManagementGUI()
    else:
        from twisted.internet import gtkreactor
        gtkreactor.install()
        from twisted.im.gtkaccount import AccountManager
        AccountManager()

    from twisted.internet import reactor
    reactor.run()
Example #4
0
def run():
    if os.name == 'java':
        from twisted.internet import javareactor
        javareactor.install()
        from twisted.words.im.jyaccount import AccountManagementGUI
        AccountManagementGUI()
    else:
        from twisted.internet import gtkreactor
        gtkreactor.install()
        from twisted.words.im.gtkaccount import AccountManager
        AccountManager()

    from twisted.internet import reactor
    reactor.run()
Example #5
0
def run_gtk1(config):
    from twisted.internet import gtkreactor
    gtkreactor.install()
    from twisted.spread.ui import gtkutil
    sys.argv[:] = ['manhole']
    from twisted.manhole.ui import gtkmanhole
    i = gtkmanhole.Interaction()
    lw = gtkutil.Login(i.connected,
                       i.client,
                       initialUser=config.opts['user'],
                       initialPassword=config.opts['password'],
                       initialService=config.opts['service'],
                       initialHostname=config.opts['host'],
                       initialPortno=config.opts['port'],
                       initialPerspective=config.opts['perspective'])
    i.loginWindow = lw
    lw.show_all()
Example #6
0
# pygsear is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# pygsear is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pygsear; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

from twisted.internet import gtkreactor
gtkreactor.install()

import gtk

from twisted.internet import reactor

import pygsear
import pygsear.Game

class PygameGtkWindow(gtk.GtkWindow):
    def __init__(self):
        w = gtk.GtkWindow(gtk.WINDOW_TOPLEVEL)
        w.set_default_size(250, 400)
        w.connect('destroy', self.quit)

        vb = gtk.GtkVBox()
Example #7
0
def install_gtk(app): # not tested
    del sys.modules['twisted.internet.reactor']
    from twisted.internet import gtkreactor
    gtkreactor.install()
    from twisted.internet import reactor