use window.set_transient_for(parent) for some windows. Fixes #1024

This commit is contained in:
Yann Leboulanger 2006-07-17 20:27:30 +00:00
parent 80bd370216
commit 196062bbc2
5 changed files with 19 additions and 0 deletions

View File

@ -46,6 +46,7 @@ class AdvancedConfigurationWindow:
def __init__(self): def __init__(self):
self.xml = gtkgui_helpers.get_glade('advanced_configuration_window.glade') self.xml = gtkgui_helpers.get_glade('advanced_configuration_window.glade')
self.window = self.xml.get_widget('advanced_configuration_window') self.window = self.xml.get_widget('advanced_configuration_window')
self.window.set_transient_for(gajim.interface.instances['preferences'])
self.entry = self.xml.get_widget('advanced_entry') self.entry = self.xml.get_widget('advanced_entry')
self.desc_label = self.xml.get_widget('advanced_desc_label') self.desc_label = self.xml.get_widget('advanced_desc_label')
self.restart_label = self.xml.get_widget('restart_label') self.restart_label = self.xml.get_widget('restart_label')

View File

@ -53,6 +53,7 @@ class PreferencesWindow:
'''Initialize Preferences window''' '''Initialize Preferences window'''
self.xml = gtkgui_helpers.get_glade('preferences_window.glade') self.xml = gtkgui_helpers.get_glade('preferences_window.glade')
self.window = self.xml.get_widget('preferences_window') self.window = self.xml.get_widget('preferences_window')
self.window.set_transient_for(gajim.interface.roster.window)
self.iconset_combobox = self.xml.get_widget('iconset_combobox') self.iconset_combobox = self.xml.get_widget('iconset_combobox')
self.notify_on_new_message_radiobutton = self.xml.get_widget( self.notify_on_new_message_radiobutton = self.xml.get_widget(
'notify_on_new_message_radiobutton') 'notify_on_new_message_radiobutton')
@ -1005,6 +1006,7 @@ class AccountModificationWindow:
def __init__(self, account): def __init__(self, account):
self.xml = gtkgui_helpers.get_glade('account_modification_window.glade') self.xml = gtkgui_helpers.get_glade('account_modification_window.glade')
self.window = self.xml.get_widget('account_modification_window') self.window = self.xml.get_widget('account_modification_window')
self.window.set_transient_for(gajim.interface.roster.window)
self.account = account self.account = account
# init proxy list # init proxy list
@ -1492,6 +1494,7 @@ class ManageProxiesWindow:
def __init__(self): def __init__(self):
self.xml = gtkgui_helpers.get_glade('manage_proxies_window.glade') self.xml = gtkgui_helpers.get_glade('manage_proxies_window.glade')
self.window = self.xml.get_widget('manage_proxies_window') self.window = self.xml.get_widget('manage_proxies_window')
self.window.set_transient_for(gajim.interface.roster.window)
self.proxies_treeview = self.xml.get_widget('proxies_treeview') self.proxies_treeview = self.xml.get_widget('proxies_treeview')
self.proxyname_entry = self.xml.get_widget('proxyname_entry') self.proxyname_entry = self.xml.get_widget('proxyname_entry')
self.init_list() self.init_list()
@ -1656,6 +1659,7 @@ class AccountsWindow:
def __init__(self): def __init__(self):
self.xml = gtkgui_helpers.get_glade('accounts_window.glade') self.xml = gtkgui_helpers.get_glade('accounts_window.glade')
self.window = self.xml.get_widget('accounts_window') self.window = self.xml.get_widget('accounts_window')
self.window.set_transient_for(gajim.interface.roster.window)
self.accounts_treeview = self.xml.get_widget('accounts_treeview') self.accounts_treeview = self.xml.get_widget('accounts_treeview')
self.modify_button = self.xml.get_widget('modify_button') self.modify_button = self.xml.get_widget('modify_button')
self.remove_button = self.xml.get_widget('remove_button') self.remove_button = self.xml.get_widget('remove_button')
@ -1758,6 +1762,7 @@ class DataFormWindow:
self.config = config self.config = config
self.xml = gtkgui_helpers.get_glade('data_form_window.glade') self.xml = gtkgui_helpers.get_glade('data_form_window.glade')
self.window = self.xml.get_widget('data_form_window') self.window = self.xml.get_widget('data_form_window')
self.window.set_transient_for(gajim.interface.roster.window)
self.config_vbox = self.xml.get_widget('config_vbox') self.config_vbox = self.xml.get_widget('config_vbox')
if config: if config:
self.fill_vbox() self.fill_vbox()
@ -1907,6 +1912,7 @@ class ServiceRegistrationWindow(DataFormWindow):
else: else:
self.xml = gtkgui_helpers.get_glade('service_registration_window.glade') self.xml = gtkgui_helpers.get_glade('service_registration_window.glade')
self.window = self.xml.get_widget('service_registration_window') self.window = self.xml.get_widget('service_registration_window')
self.window.set_transient_for(gajim.interface.roster.window)
if infos.has_key('registered'): if infos.has_key('registered'):
self.window.set_title(_('Edit %s' % service)) self.window.set_title(_('Edit %s' % service))
else: else:
@ -2161,6 +2167,7 @@ class RemoveAccountWindow:
self.account = account self.account = account
xml = gtkgui_helpers.get_glade('remove_account_window.glade') xml = gtkgui_helpers.get_glade('remove_account_window.glade')
self.window = xml.get_widget('remove_account_window') self.window = xml.get_widget('remove_account_window')
self.window.set_transient_for(gajim.interface.roster.window)
self.remove_and_unregister_radiobutton = xml.get_widget( self.remove_and_unregister_radiobutton = xml.get_widget(
'remove_and_unregister_radiobutton') 'remove_and_unregister_radiobutton')
self.window.set_title(_('Removing %s account') % self.account) self.window.set_title(_('Removing %s account') % self.account)
@ -2240,6 +2247,7 @@ class ManageBookmarksWindow:
def __init__(self): def __init__(self):
self.xml = gtkgui_helpers.get_glade('manage_bookmarks_window.glade') self.xml = gtkgui_helpers.get_glade('manage_bookmarks_window.glade')
self.window = self.xml.get_widget('manage_bookmarks_window') self.window = self.xml.get_widget('manage_bookmarks_window')
self.window.set_transient_for(gajim.interface.roster.window)
#Account-JID, RoomName, Room-JID, Autojoin, Passowrd, Nick, Show_Status #Account-JID, RoomName, Room-JID, Autojoin, Passowrd, Nick, Show_Status
self.treestore = gtk.TreeStore(str, str, str, bool, str, str, str) self.treestore = gtk.TreeStore(str, str, str, bool, str, str, str)
@ -2535,6 +2543,7 @@ class AccountCreationWizardWindow:
def __init__(self): def __init__(self):
self.xml = gtkgui_helpers.get_glade('account_creation_wizard_window.glade') self.xml = gtkgui_helpers.get_glade('account_creation_wizard_window.glade')
self.window = self.xml.get_widget('account_creation_wizard_window') self.window = self.xml.get_widget('account_creation_wizard_window')
self.window.set_transient_for(gajim.interface.roster.window)
# Connect events from comboboxentry.child # Connect events from comboboxentry.child
server_comboboxentry = self.xml.get_widget('server_comboboxentry') server_comboboxentry = self.xml.get_widget('server_comboboxentry')

View File

@ -47,6 +47,7 @@ class EditGroupsDialog:
def __init__(self, user, account): def __init__(self, user, account):
self.xml = gtkgui_helpers.get_glade('edit_groups_dialog.glade') self.xml = gtkgui_helpers.get_glade('edit_groups_dialog.glade')
self.dialog = self.xml.get_widget('edit_groups_dialog') self.dialog = self.xml.get_widget('edit_groups_dialog')
self.dialog.set_transient_for(gajim.interface.roster.window)
self.account = account self.account = account
self.user = user self.user = user
self.changes_made = False self.changes_made = False
@ -218,6 +219,7 @@ class ChooseGPGKeyDialog:
#list : {keyID: userName, ...} #list : {keyID: userName, ...}
xml = gtkgui_helpers.get_glade('choose_gpg_key_dialog.glade') xml = gtkgui_helpers.get_glade('choose_gpg_key_dialog.glade')
self.window = xml.get_widget('choose_gpg_key_dialog') self.window = xml.get_widget('choose_gpg_key_dialog')
self.window.set_transient_for(gajim.interface.roster.window)
self.window.set_title(title_text) self.window.set_title(title_text)
self.keys_treeview = xml.get_widget('keys_treeview') self.keys_treeview = xml.get_widget('keys_treeview')
prompt_label = xml.get_widget('prompt_label') prompt_label = xml.get_widget('prompt_label')
@ -261,6 +263,7 @@ class ChangeStatusMessageDialog:
self.show = show self.show = show
self.xml = gtkgui_helpers.get_glade('change_status_message_dialog.glade') self.xml = gtkgui_helpers.get_glade('change_status_message_dialog.glade')
self.window = self.xml.get_widget('change_status_message_dialog') self.window = self.xml.get_widget('change_status_message_dialog')
self.window.set_transient_for(gajim.interface.roster.window)
if show: if show:
uf_show = helpers.get_uf_show(show) uf_show = helpers.get_uf_show(show)
title_text = _('%s Status Message') % uf_show title_text = _('%s Status Message') % uf_show
@ -381,6 +384,7 @@ class AddNewContactWindow:
self.account_hbox = self.xml.get_widget('account_hbox') self.account_hbox = self.xml.get_widget('account_hbox')
self.account_label = self.xml.get_widget('account_label') self.account_label = self.xml.get_widget('account_label')
self.window = self.xml.get_widget('add_new_contact_window') self.window = self.xml.get_widget('add_new_contact_window')
self.window.set_transient_for(gajim.interface.roster.window)
self.uid_entry = self.xml.get_widget('uid_entry') self.uid_entry = self.xml.get_widget('uid_entry')
self.protocol_combobox = self.xml.get_widget('protocol_combobox') self.protocol_combobox = self.xml.get_widget('protocol_combobox')
self.protocol_hbox = self.xml.get_widget('protocol_hbox') self.protocol_hbox = self.xml.get_widget('protocol_hbox')
@ -565,6 +569,7 @@ class AboutDialog:
'''Class for about dialog''' '''Class for about dialog'''
def __init__(self): def __init__(self):
dlg = gtk.AboutDialog() dlg = gtk.AboutDialog()
dlg.set_transient_for(gajim.interface.roster.window)
dlg.set_name('Gajim') dlg.set_name('Gajim')
dlg.set_version(gajim.version) dlg.set_version(gajim.version)
s = u'Copyright © 2003-2006 Gajim Team' s = u'Copyright © 2003-2006 Gajim Team'
@ -874,6 +879,7 @@ class SubscriptionRequestWindow:
def __init__(self, jid, text, account, user_nick = None): def __init__(self, jid, text, account, user_nick = None):
xml = gtkgui_helpers.get_glade('subscription_request_window.glade') xml = gtkgui_helpers.get_glade('subscription_request_window.glade')
self.window = xml.get_widget('subscription_request_window') self.window = xml.get_widget('subscription_request_window')
self.window.set_transient_for(gajim.interface.roster.window)
self.jid = jid self.jid = jid
self.account = account self.account = account
self.user_nick = user_nick self.user_nick = user_nick
@ -930,6 +936,7 @@ _('You can not join a group chat unless you are connected.'))
self.xml = gtkgui_helpers.get_glade('join_groupchat_window.glade') self.xml = gtkgui_helpers.get_glade('join_groupchat_window.glade')
self.window = self.xml.get_widget('join_groupchat_window') self.window = self.xml.get_widget('join_groupchat_window')
self.window.set_transient_for(gajim.interface.roster.window)
self.xml.get_widget('server_entry').set_text(server) self.xml.get_widget('server_entry').set_text(server)
self.xml.get_widget('room_entry').set_text(room) self.xml.get_widget('room_entry').set_text(room)
self.xml.get_widget('nickname_entry').set_text(nick) self.xml.get_widget('nickname_entry').set_text(nick)

View File

@ -36,6 +36,7 @@ class GajimThemesWindow:
def __init__(self): def __init__(self):
self.xml = gtkgui_helpers.get_glade('gajim_themes_window.glade') self.xml = gtkgui_helpers.get_glade('gajim_themes_window.glade')
self.window = self.xml.get_widget('gajim_themes_window') self.window = self.xml.get_widget('gajim_themes_window')
self.window.set_transient_for(gajim.interface.roster.window)
self.options = ['account', 'group', 'contact', 'banner'] self.options = ['account', 'group', 'contact', 'banner']
self.options_combobox = self.xml.get_widget('options_combobox') self.options_combobox = self.xml.get_widget('options_combobox')

View File

@ -61,6 +61,7 @@ class VcardWindow:
# the contact variable is the jid if vcard is true # the contact variable is the jid if vcard is true
self.xml = gtkgui_helpers.get_glade('vcard_information_window.glade') self.xml = gtkgui_helpers.get_glade('vcard_information_window.glade')
self.window = self.xml.get_widget('vcard_information_window') self.window = self.xml.get_widget('vcard_information_window')
self.window.set_transient_for(gajim.interface.roster.window)
self.publish_button = self.xml.get_widget('publish_button') self.publish_button = self.xml.get_widget('publish_button')
self.retrieve_button = self.xml.get_widget('retrieve_button') self.retrieve_button = self.xml.get_widget('retrieve_button')