parent
936b99cc3e
commit
9ed43cf6d1
|
@ -32,6 +32,7 @@ import os
|
|||
import struct
|
||||
import sha
|
||||
import time
|
||||
from dialogs import BindPortError
|
||||
|
||||
from errno import EWOULDBLOCK
|
||||
from errno import ENOBUFS
|
||||
|
@ -84,12 +85,9 @@ class SocksQueue:
|
|||
self.listener.bind()
|
||||
if self.listener.started is False:
|
||||
self.listener = None
|
||||
import sys
|
||||
print >> sys.stderr, '================================================='
|
||||
print >> sys.stderr, 'Unable to bind to port %s.' % port
|
||||
print >> sys.stderr, 'Maybe you have another running instance of Gajim.'
|
||||
print >> sys.stderr, 'File Transfer will be canceled.'
|
||||
print >> sys.stderr, '================================================='
|
||||
# We cannot bind port, call error
|
||||
# dialog from dialogs.py and fail
|
||||
BindPortError(port)
|
||||
return None
|
||||
self.connected += 1
|
||||
return self.listener
|
||||
|
|
|
@ -731,6 +731,12 @@ class FileChooserDialog(gtk.FileChooserDialog):
|
|||
def just_destroy(self, widget):
|
||||
self.destroy()
|
||||
|
||||
class BindPortError(HigDialog):
|
||||
def __init__(self, port):
|
||||
ErrorDialog(_('Unable to bind to port %s.' % port),
|
||||
_('Maybe you have another running instance of Gajim. '
|
||||
'File Transfer will be canceled.'))
|
||||
|
||||
class ConfirmationDialog(HigDialog):
|
||||
'''HIG compliant confirmation dialog.'''
|
||||
def __init__(self, pritext, sectext='', on_response_ok = None,
|
||||
|
|
Loading…
Reference in New Issue