Set parent window for ProfileWindow. See #7184.
This commit is contained in:
parent
5872658167
commit
f92b8e46d4
3 changed files with 10 additions and 3 deletions
|
@ -4,6 +4,7 @@
|
||||||
<!-- interface-naming-policy toplevel-contextual -->
|
<!-- interface-naming-policy toplevel-contextual -->
|
||||||
<object class="GtkWindow" id="profile_window">
|
<object class="GtkWindow" id="profile_window">
|
||||||
<property name="title" translatable="yes">Personal Information</property>
|
<property name="title" translatable="yes">Personal Information</property>
|
||||||
|
<property name="window_position">center-on-parent</property>
|
||||||
<property name="type_hint">dialog</property>
|
<property name="type_hint">dialog</property>
|
||||||
<signal name="destroy" handler="on_profile_window_destroy"/>
|
<signal name="destroy" handler="on_profile_window_destroy"/>
|
||||||
<signal name="key_press_event" handler="on_profile_window_key_press_event"/>
|
<signal name="key_press_event" handler="on_profile_window_key_press_event"/>
|
||||||
|
|
|
@ -45,6 +45,7 @@ import cell_renderer_image
|
||||||
import message_control
|
import message_control
|
||||||
import chat_control
|
import chat_control
|
||||||
import dataforms_widget
|
import dataforms_widget
|
||||||
|
import profile_window
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import gtkspell
|
import gtkspell
|
||||||
|
@ -2454,7 +2455,11 @@ class AccountsWindow:
|
||||||
_("Your server can't save your personal information."))
|
_("Your server can't save your personal information."))
|
||||||
return
|
return
|
||||||
|
|
||||||
gajim.interface.edit_own_details(self.current_account)
|
jid = gajim.get_jid_from_account(self.current_account)
|
||||||
|
if 'profile' not in gajim.interface.instances[self.current_account]:
|
||||||
|
gajim.interface.instances[self.current_account]['profile'] = \
|
||||||
|
profile_window.ProfileWindow(self.current_account, self.window)
|
||||||
|
gajim.connections[self.current_account].request_vcard(jid)
|
||||||
|
|
||||||
def on_checkbutton_toggled(self, widget, config_name,
|
def on_checkbutton_toggled(self, widget, config_name,
|
||||||
change_sensitivity_widgets = None, account = None):
|
change_sensitivity_widgets = None, account = None):
|
||||||
|
|
|
@ -42,10 +42,11 @@ class ProfileWindow:
|
||||||
Class for our information window
|
Class for our information window
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, account):
|
def __init__(self, account, transient_for=None):
|
||||||
self.xml = gtkgui_helpers.get_gtk_builder('profile_window.ui')
|
self.xml = gtkgui_helpers.get_gtk_builder('profile_window.ui')
|
||||||
self.window = self.xml.get_object('profile_window')
|
self.window = self.xml.get_object('profile_window')
|
||||||
self.window.set_transient_for(gajim.interface.roster.window)
|
if not transient_for:
|
||||||
|
self.window.set_transient_for(gajim.interface.roster.window)
|
||||||
self.progressbar = self.xml.get_object('progressbar')
|
self.progressbar = self.xml.get_object('progressbar')
|
||||||
self.statusbar = self.xml.get_object('statusbar')
|
self.statusbar = self.xml.get_object('statusbar')
|
||||||
self.context_id = self.statusbar.get_context_id('profile')
|
self.context_id = self.statusbar.get_context_id('profile')
|
||||||
|
|
Loading…
Add table
Reference in a new issue