diff --git a/data/gui/profile_window.ui b/data/gui/profile_window.ui index 88ba214e4799d19271db273cb88a2b355f6ad106..2fb532e5e9f6f0e6921ba46db4696c8775f26384 100644 --- a/data/gui/profile_window.ui +++ b/data/gui/profile_window.ui @@ -4,6 +4,7 @@ <!-- interface-naming-policy toplevel-contextual --> <object class="GtkWindow" id="profile_window"> <property name="title" translatable="yes">Personal Information</property> + <property name="window_position">center-on-parent</property> <property name="type_hint">dialog</property> <signal name="destroy" handler="on_profile_window_destroy"/> <signal name="key_press_event" handler="on_profile_window_key_press_event"/> diff --git a/src/config.py b/src/config.py index a85e7d80d5d37218c8fc8d402827ddf33bb701ac..cfcfef9c0a6bd54f07b3b913b1bca40b2aa8a600 100644 --- a/src/config.py +++ b/src/config.py @@ -45,6 +45,7 @@ import cell_renderer_image import message_control import chat_control import dataforms_widget +import profile_window try: import gtkspell @@ -2454,7 +2455,11 @@ class AccountsWindow: _("Your server can't save your personal information.")) 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, change_sensitivity_widgets = None, account = None): diff --git a/src/profile_window.py b/src/profile_window.py index ad0dcd148df6d7348bdb851f8514bb326b2f736f..00096ddfea93a6bd940164c7d1a201afb79087a5 100644 --- a/src/profile_window.py +++ b/src/profile_window.py @@ -42,10 +42,11 @@ class ProfileWindow: 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.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.statusbar = self.xml.get_object('statusbar') self.context_id = self.statusbar.get_context_id('profile')