show error dialog of profile window transient for profile window. see #7185
This commit is contained in:
parent
88ae275e85
commit
e2960728d7
1 changed files with 7 additions and 5 deletions
|
@ -143,7 +143,8 @@ class ProfileWindow:
|
||||||
invalid_file = True
|
invalid_file = True
|
||||||
if invalid_file:
|
if invalid_file:
|
||||||
if True: # keep identation
|
if True: # keep identation
|
||||||
dialogs.ErrorDialog(_('Could not load image'), msg)
|
dialogs.ErrorDialog(_('Could not load image'), msg,
|
||||||
|
transient_for=self.window)
|
||||||
return
|
return
|
||||||
if filesize > 16384:
|
if filesize > 16384:
|
||||||
if scaled_pixbuf:
|
if scaled_pixbuf:
|
||||||
|
@ -159,7 +160,8 @@ class ProfileWindow:
|
||||||
# rescale it
|
# rescale it
|
||||||
pixbuf = gtkgui_helpers.get_scaled_pixbuf(pixbuf, 'vcard')
|
pixbuf = gtkgui_helpers.get_scaled_pixbuf(pixbuf, 'vcard')
|
||||||
except AttributeError: # unknown format
|
except AttributeError: # unknown format
|
||||||
dialogs.ErrorDialog(_('Could not load image'))
|
dialogs.ErrorDialog(_('Could not load image'),
|
||||||
|
transient_for=self.window)
|
||||||
return
|
return
|
||||||
self.dialog.destroy()
|
self.dialog.destroy()
|
||||||
self.dialog = None
|
self.dialog = None
|
||||||
|
@ -232,7 +234,7 @@ class ProfileWindow:
|
||||||
if not widget.is_focus():
|
if not widget.is_focus():
|
||||||
pritext = _('Wrong date format')
|
pritext = _('Wrong date format')
|
||||||
dialogs.ErrorDialog(pritext, _('Format of the date must be '
|
dialogs.ErrorDialog(pritext, _('Format of the date must be '
|
||||||
'YYYY-MM-DD'))
|
'YYYY-MM-DD'), transient_for=self.window)
|
||||||
gobject.idle_add(lambda: widget.grab_focus())
|
gobject.idle_add(lambda: widget.grab_focus())
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -368,7 +370,7 @@ class ProfileWindow:
|
||||||
if gajim.connections[self.account].connected < 2:
|
if gajim.connections[self.account].connected < 2:
|
||||||
dialogs.ErrorDialog(_('You are not connected to the server'),
|
dialogs.ErrorDialog(_('You are not connected to the server'),
|
||||||
_('Without a connection, you can not publish your contact '
|
_('Without a connection, you can not publish your contact '
|
||||||
'information.'))
|
'information.'), transient_for=self.window)
|
||||||
return
|
return
|
||||||
vcard_ = self.make_vcard()
|
vcard_ = self.make_vcard()
|
||||||
nick = ''
|
nick = ''
|
||||||
|
@ -408,7 +410,7 @@ class ProfileWindow:
|
||||||
self.update_progressbar_timeout_id = None
|
self.update_progressbar_timeout_id = None
|
||||||
dialogs.InformationDialog(_('vCard publication failed'),
|
dialogs.InformationDialog(_('vCard publication failed'),
|
||||||
_('There was an error while publishing your personal information, '
|
_('There was an error while publishing your personal information, '
|
||||||
'try again later.'))
|
'try again later.'), transient_for=self.window)
|
||||||
|
|
||||||
def on_cancel_button_clicked(self, widget):
|
def on_cancel_button_clicked(self, widget):
|
||||||
self.window.destroy()
|
self.window.destroy()
|
||||||
|
|
Loading…
Add table
Reference in a new issue