InformationDialog doesn't use run() anymore

This commit is contained in:
Yann Leboulanger 2005-08-14 16:12:36 +00:00
parent db97d20aec
commit 93293dfdc5
4 changed files with 25 additions and 17 deletions

View File

@ -392,7 +392,7 @@ class AboutDialog:
def __init__(self):
if gtk.pygtk_version < (2, 6, 0) or gtk.gtk_version < (2, 6, 0):
InformationDialog(_('Gajim - a GTK+ Jabber client'),
_('Version %s') % gajim.version).get_response()
_('Version %s') % gajim.version)
return
dlg = gtk.AboutDialog()
@ -512,7 +512,15 @@ class InformationDialog(HigDialog):
HigDialog.__init__(
self, None, pritext, sectext, gtk.STOCK_DIALOG_INFO,
[ [ gtk.STOCK_OK, gtk.RESPONSE_OK ] ]
)
)
hbox = self.action_area
ok_button = hbox.get_children()[0]
ok_button.connect('clicked', self.on_ok_button_clicked)
self.show_all()
def on_ok_button_clicked(self, widget):
self.destroy()
class BaseTooltip:
''' Base Tooltip . Usage:
tooltip = BaseTooltip()
@ -1653,14 +1661,14 @@ class FileTransfersWindow:
def show_request_error(self, file_props):
self.window.present()
self.window.window.focus()
InformationDialog(_('File transfer canceled'), _('Connection with peer cannot be established.')).get_response()
InformationDialog(_('File transfer canceled'), _('Connection with peer cannot be established.'))
self.tree.get_selection().unselect_all()
def show_send_error(self, file_props):
self.window.present()
self.window.window.focus()
InformationDialog(_('File transfer canceled'),
_('Connection with peer cannot be established.')).get_response()
_('Connection with peer cannot be established.'))
self.tree.get_selection().unselect_all()
def show_stopped(self, jid, file_props):

View File

@ -145,7 +145,7 @@ class Interface:
def handle_event_information(self, unused, data):
#('INFORMATION', account, (title_text, section_text))
dialogs.InformationDialog(data[0], data[1]).get_response()
dialogs.InformationDialog(data[0], data[1])
def handle_event_http_auth(self, account, data):
#('HTTP_AUTH', account, (method, url, iq_obj))
@ -500,13 +500,13 @@ class Interface:
self.roster.add_contact_to_roster(jid, account)
dialogs.InformationDialog(_('Authorization accepted'),
_('The contact "%s" has authorized you to see his status.')
% jid).get_response()
% jid)
if self.remote and self.remote.is_enabled():
self.remote.raise_signal('Subscribed', (account, array))
def handle_event_unsubscribed(self, account, jid):
dialogs.InformationDialog(_('Contact "%s" removed subscription from you') % jid,
_('You will always see him as offline.')).get_response()
_('You will always see him as offline.'))
if self.remote and self.remote.is_enabled():
self.remote.raise_signal('Unsubscribed', (account, jid))
@ -540,7 +540,7 @@ class Interface:
#('ACC_OK', account, (name, config))
name = array[0]
dialogs.InformationDialog(_('Account registration successful'),
_('The account "%s" has been registered with the Jabber server.') % name).get_response()
_('The account "%s" has been registered with the Jabber server.') % name)
gajim.config.add_per('accounts', name)
for opt in array[1]:
gajim.config.set_per('accounts', name, opt, array[1][opt])

View File

@ -438,12 +438,12 @@ class GroupchatWindow(chat.Chat):
room_jid = self.get_active_jid()
bm = {
'name': room_jid,
'jid': room_jid,
'autojoin': '0',
'password': '',
'nick': self.nicks[room_jid]
}
'jid': room_jid,
'autojoin': '0',
'password': '',
'nick': self.nicks[room_jid]
}
for bookmark in gajim.connections[self.account].bookmarks:
if bookmark['jid'] == bm['jid']:
dialogs.ErrorDialog(
@ -458,7 +458,7 @@ class GroupchatWindow(chat.Chat):
dialogs.InformationDialog(
_('Bookmark has been added successfully'),
_('You can manage your bookmarks via Actions menu in your roster.')).get_response()
_('You can manage your bookmarks via Actions menu in your roster.'))
def on_message_textview_key_press_event(self, widget, event):
"""When a key is pressed:

View File

@ -1018,7 +1018,7 @@ class RosterWindow:
'''Authorize a user (by re-sending auth menuitem)'''
gajim.connections[account].send_authorization(jid)
dialogs.InformationDialog(_('Authorization has been sent'),
_('Now "%s" will know your status.') %jid).get_response()
_('Now "%s" will know your status.') %jid)
def req_sub(self, widget, jid, txt, account, group=None, pseudo=None):
'''Request subscription to a user'''
@ -1041,7 +1041,7 @@ class RosterWindow:
user1 = gajim.contacts[account][jid][0]
if not _('not in the roster') in user1.groups:
dialogs.InformationDialog(_('Subscription request has been sent'),
_('If "%s" accepts this request you will know his status.') %jid).get_response()
_('If "%s" accepts this request you will know his status.') %jid)
return
user1.groups = [group]
user1.name = pseudo