changeset 64f5c1467c42 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=64f5c1467c42 description: Set parent window for ProfileWindow. See #7184.
diffstat:
data/gui/profile_window.ui | 1 + src/config.py | 7 ++++++- src/profile_window.py | 5 +++-- 3 files changed, 10 insertions(+), 3 deletions(-)
diffs (52 lines):
diff -r fb38c55406b3 -r 64f5c1467c42 data/gui/profile_window.ui --- a/data/gui/profile_window.ui Thu Jul 05 23:23:56 2012 +0400 +++ b/data/gui/profile_window.ui Thu Jul 05 23:53:51 2012 +0400 @@ -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 -r fb38c55406b3 -r 64f5c1467c42 src/config.py --- a/src/config.py Thu Jul 05 23:23:56 2012 +0400 +++ b/src/config.py Thu Jul 05 23:53:51 2012 +0400 @@ -45,6 +45,7 @@ import message_control import chat_control import dataforms_widget +import profile_window
try: import gtkspell @@ -2455,7 +2456,11 @@ _("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 -r fb38c55406b3 -r 64f5c1467c42 src/profile_window.py --- a/src/profile_window.py Thu Jul 05 23:23:56 2012 +0400 +++ b/src/profile_window.py Thu Jul 05 23:53:51 2012 +0400 @@ -42,10 +42,11 @@ 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')