do show_all implicitly everywhere [glade windows visible=False]. I did this so when show_all() it will be shown then [after connect and stuff], and not when being parsed
This commit is contained in:
parent
3288d67b75
commit
9e3e5a2acc
|
@ -1000,7 +1000,7 @@ class Account_modification_window:
|
|||
"""Class for account informations"""
|
||||
def on_account_modification_window_destroy(self, widget):
|
||||
"""close window"""
|
||||
del self.plugin.windows['account_modification_window']
|
||||
del self.plugin.windows['account_modification']
|
||||
|
||||
def on_close_button_clicked(self, widget):
|
||||
"""When Close button is clicked"""
|
||||
|
@ -1179,8 +1179,8 @@ class Account_modification_window:
|
|||
if save_password:
|
||||
self.plugin.send('PASSPHRASE', name, password)
|
||||
#refresh accounts window
|
||||
if self.plugin.windows.has_key('accounts_window'):
|
||||
self.plugin.windows['accounts_window'].init_accounts()
|
||||
if self.plugin.windows.has_key('accounts'):
|
||||
self.plugin.windows['accounts'].init_accounts()
|
||||
#refresh roster
|
||||
self.plugin.roster.draw_roster()
|
||||
widget.get_toplevel().destroy()
|
||||
|
@ -1363,6 +1363,7 @@ class Account_modification_window:
|
|||
self.init_account(infos)
|
||||
self.xml.get_widget('new_account_checkbutton').set_sensitive(False)
|
||||
self.xml.get_widget('save_button').grab_focus()
|
||||
self.window.show_all()
|
||||
|
||||
class Accounts_window:
|
||||
"""Class for accounts window: lists of accounts"""
|
||||
|
@ -1391,10 +1392,10 @@ class Accounts_window:
|
|||
def on_new_button_clicked(self, widget):
|
||||
"""When new button is clicked : open an account information window"""
|
||||
if not self.plugin.windows.has_key('account_modification_window'):
|
||||
self.plugin.windows['account_modification_window'] = \
|
||||
self.plugin.windows['account_modification'] = \
|
||||
Account_modification_window(self.plugin, {}) #find out what's wrong
|
||||
else:
|
||||
self.plugin.windows['account_modification_window'].window.present()
|
||||
self.plugin.windows['account_modification'].window.present()
|
||||
|
||||
def on_delete_button_clicked(self, widget):
|
||||
"""When delete button is clicked :
|
||||
|
@ -1428,10 +1429,10 @@ class Accounts_window:
|
|||
infos['accname'] = account
|
||||
infos['jid'] = self.plugin.accounts[account]['name'] + \
|
||||
'@' + self.plugin.accounts[account]['hostname']
|
||||
self.plugin.windows['account_modification_window'] = \
|
||||
self.plugin.windows['account_modification'] = \
|
||||
Account_modification_window(self.plugin, infos) # may it messes with this one
|
||||
else:
|
||||
self.plugin.windows['account_modification_window'].window.present()
|
||||
self.plugin.windows['account_modification'].window.present()
|
||||
|
||||
def on_sync_with_global_status_checkbutton_toggled(self, widget):
|
||||
if widget.get_active():
|
||||
|
@ -1458,6 +1459,7 @@ class Accounts_window:
|
|||
renderer, text=1)
|
||||
self.xml.signal_autoconnect(self)
|
||||
self.init_accounts()
|
||||
self.window.show_all()
|
||||
|
||||
class Service_registration_window:
|
||||
"""Class for Service registration window:
|
||||
|
@ -1508,6 +1510,7 @@ class Service_registration_window:
|
|||
self.entries = {}
|
||||
self.draw_table()
|
||||
self.xml.signal_autoconnect(self)
|
||||
self.window.show_all()
|
||||
|
||||
|
||||
class Service_discovery_window:
|
||||
|
@ -1515,7 +1518,7 @@ class Service_discovery_window:
|
|||
to know the services on the selected server"""
|
||||
def on_service_discovery_window_destroy(self, widget):
|
||||
"""close window"""
|
||||
del self.plugin.windows[self.account]['browser']
|
||||
del self.plugin.windows[self.account]['disco']
|
||||
|
||||
def on_close_button_clicked(self, widget):
|
||||
"""When Close button is clicked"""
|
||||
|
@ -1769,3 +1772,4 @@ class Service_discovery_window:
|
|||
self.join_button.set_sensitive(False)
|
||||
xml.signal_autoconnect(self)
|
||||
self.browse(server_address)
|
||||
self.window.show_all()
|
||||
|
|
|
@ -30,7 +30,6 @@ import gtkgui
|
|||
|
||||
GTKGUI_GLADE='plugins/gtkgui/gtkgui.glade'
|
||||
|
||||
|
||||
class vcard_information_window:
|
||||
"""Class for user's information window"""
|
||||
def on_user_information_window_destroy(self, widget=None):
|
||||
|
@ -224,6 +223,7 @@ class vcard_information_window:
|
|||
self.fill_jabber_page()
|
||||
|
||||
self.xml.signal_autoconnect(self)
|
||||
self.window.show_all()
|
||||
|
||||
class Edit_groups_dialog:
|
||||
"""Class for the edit group dialog window"""
|
||||
|
@ -239,6 +239,7 @@ class Edit_groups_dialog:
|
|||
self.xml.get_widget('jid_label').set_markup(\
|
||||
_('JID: <i>%s</i>') % user.jid)
|
||||
self.xml.signal_autoconnect(self)
|
||||
self.dialog.show_all()
|
||||
self.init_list()
|
||||
|
||||
def run(self):
|
||||
|
@ -331,6 +332,7 @@ class Passphrase_dialog:
|
|||
self.xml.get_widget('message_label').set_text(labeltext)
|
||||
self.xml.get_widget('save_passphrase_checkbutton').set_label(checkbuttontext)
|
||||
self.xml.signal_autoconnect(self)
|
||||
self.window.show_all()
|
||||
|
||||
class choose_gpg_key_dialog:
|
||||
"""Class for GPG key dialog"""
|
||||
|
@ -366,6 +368,8 @@ class choose_gpg_key_dialog:
|
|||
self.keys_treeview.insert_column_with_attributes(-1, _('User name'), \
|
||||
renderer, text=1)
|
||||
|
||||
self.window.show_all()
|
||||
|
||||
class Change_status_message_dialog:
|
||||
"""Class for Away message dialog"""
|
||||
def run(self):
|
||||
|
@ -420,6 +424,7 @@ class Change_status_message_dialog:
|
|||
for val in self.values.keys():
|
||||
message_comboboxentry.append_text(val)
|
||||
self.xml.signal_autoconnect(self)
|
||||
self.window.show_all()
|
||||
|
||||
class Add_new_contact_window:
|
||||
"""Class for Add_new_contact_window"""
|
||||
|
@ -540,6 +545,7 @@ class Add_new_contact_window:
|
|||
self.group_comboboxentry.append_text(g)
|
||||
|
||||
self.xml.signal_autoconnect(self)
|
||||
self.window.show_all()
|
||||
|
||||
class About_dialog:
|
||||
"""Class for about dialog"""
|
||||
|
@ -564,7 +570,7 @@ class About_dialog:
|
|||
dlg.set_logo(gtk.gdk.pixbuf_new_from_file('plugins/gtkgui/pixmaps/logo.png'))
|
||||
dlg.set_translator_credits(_('translator_credits'))
|
||||
|
||||
rep = dlg.run()
|
||||
rep = dlg.run() # this run doesn't crash threads.. interesting..
|
||||
dlg.destroy()
|
||||
|
||||
class Confirmation_dialog:
|
||||
|
@ -643,6 +649,7 @@ class subscription_request_window:
|
|||
_('Subscription request from %s') % self.jid)
|
||||
xml.get_widget('message_textview').get_buffer().set_text(text)
|
||||
xml.signal_autoconnect(self)
|
||||
self.window.show_all()
|
||||
|
||||
class Join_groupchat_window:
|
||||
def on_join_groupchat_window_destroy(self, widget):
|
||||
|
@ -680,6 +687,7 @@ class Join_groupchat_window:
|
|||
set_text(self.plugin.nicks[self.account])
|
||||
self.xml.signal_autoconnect(self)
|
||||
self.plugin.windows['join_gc'] = self # now add us to open windows
|
||||
self.window.show_all()
|
||||
|
||||
class New_message_dialog:
|
||||
def on_delete_event(self, widget, event):
|
||||
|
@ -733,6 +741,7 @@ class New_message_dialog:
|
|||
self.window.set_title(title)
|
||||
|
||||
self.xml.signal_autoconnect(self)
|
||||
self.window.show_all()
|
||||
|
||||
class Change_password_dialog:
|
||||
def run(self):
|
||||
|
@ -766,4 +775,5 @@ class Change_password_dialog:
|
|||
self.dialog = self.xml.get_widget('change_password_dialog')
|
||||
self.password1_entry = self.xml.get_widget('password1_entry')
|
||||
self.password2_entry = self.xml.get_widget('password2_entry')
|
||||
self.password1_entry.set_activates_default(True)
|
||||
|
||||
self.window.show_all()
|
||||
|
|
|
@ -314,7 +314,6 @@
|
|||
<property name="border_width">4</property>
|
||||
<property name="width_request">420</property>
|
||||
<property name="height_request">160</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Accounts</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
|
@ -512,7 +511,6 @@
|
|||
<property name="border_width">4</property>
|
||||
<property name="width_request">440</property>
|
||||
<property name="height_request">270</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Account Modification</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
|
@ -1671,7 +1669,6 @@
|
|||
<property name="border_width">4</property>
|
||||
<property name="width_request">317</property>
|
||||
<property name="height_request">277</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Add New Contact</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
|
@ -2114,7 +2111,6 @@
|
|||
<property name="border_width">4</property>
|
||||
<property name="width_request">400</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Subscription request</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
|
@ -2381,7 +2377,6 @@
|
|||
<property name="border_width">4</property>
|
||||
<property name="width_request">400</property>
|
||||
<property name="height_request">250</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Service Discovery</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
|
@ -2645,7 +2640,6 @@
|
|||
<property name="border_width">4</property>
|
||||
<property name="width_request">300</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Register to</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
|
@ -5853,7 +5847,6 @@ Custom</property>
|
|||
|
||||
<widget class="GtkWindow" id="vcard_information_window">
|
||||
<property name="border_width">4</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Information</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
|
@ -7310,7 +7303,6 @@ Custom</property>
|
|||
|
||||
<widget class="GtkWindow" id="history_window">
|
||||
<property name="border_width">4</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Log</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
|
@ -7639,7 +7631,6 @@ Custom</property>
|
|||
</widget>
|
||||
|
||||
<widget class="GtkWindow" id="groupchat_window">
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Groupchat</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
|
@ -7926,7 +7917,6 @@ Custom</property>
|
|||
|
||||
<widget class="GtkWindow" id="join_groupchat_window">
|
||||
<property name="border_width">4</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Join Groupchat</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
|
@ -8313,7 +8303,6 @@ Custom</property>
|
|||
|
||||
<widget class="GtkDialog" id="passphrase_dialog">
|
||||
<property name="border_width">4</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Passphrase</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
|
@ -8456,7 +8445,6 @@ Custom</property>
|
|||
|
||||
<widget class="GtkDialog" id="choose_gpg_key_dialog">
|
||||
<property name="border_width">4</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Passphrase</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
|
@ -8595,7 +8583,6 @@ Custom</property>
|
|||
<property name="border_width">4</property>
|
||||
<property name="width_request">303</property>
|
||||
<property name="height_request">225</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
|
@ -8763,7 +8750,6 @@ Custom</property>
|
|||
</widget>
|
||||
|
||||
<widget class="GtkWindow" id="tabbed_chat_window">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="title" translatable="yes">Chat</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
|
@ -9147,7 +9133,6 @@ Custom</property>
|
|||
<widget class="GtkDialog" id="edit_groups_dialog">
|
||||
<property name="border_width">4</property>
|
||||
<property name="height_request">260</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Edit Groups</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
|
@ -9330,7 +9315,6 @@ Custom</property>
|
|||
<property name="border_width">4</property>
|
||||
<property name="width_request">316</property>
|
||||
<property name="height_request">183</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Change Password</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
|
@ -9499,7 +9483,7 @@ Custom</property>
|
|||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char">*</property>
|
||||
<property name="activates_default">False</property>
|
||||
<property name="activates_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -9529,7 +9513,6 @@ Custom</property>
|
|||
<property name="border_width">4</property>
|
||||
<property name="width_request">460</property>
|
||||
<property name="height_request">160</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
|
@ -9867,4 +9850,23 @@ send a chat message to</property>
|
|||
</child>
|
||||
</widget>
|
||||
|
||||
<widget class="GtkWindow" id="popup_window">
|
||||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="decorated">False</property>
|
||||
<property name="skip_taskbar_hint">True</property>
|
||||
<property name="skip_pager_hint">True</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||
<property name="gravity">GDK_GRAVITY_SOUTH_EAST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
</glade-interface>
|
||||
|
|
|
@ -486,8 +486,8 @@ class plugin:
|
|||
#('ACC_OK', account, (hostname, login, pasword, name, resource, prio,
|
||||
#use_proxy, proxyhost, proxyport))
|
||||
name = array[3]
|
||||
if self.windows['account_modification_window']:
|
||||
self.windows['account_modification_window'].account_is_ok(array[1])
|
||||
if self.windows['account_modification']:
|
||||
self.windows['account_modification'].account_is_ok(array[1])
|
||||
else:
|
||||
self.accounts[name] = {'name': array[1], \
|
||||
'hostname': array[0],\
|
||||
|
@ -505,8 +505,8 @@ class plugin:
|
|||
self.roster.groups[name] = {}
|
||||
self.roster.contacts[name] = {}
|
||||
self.sleeper_state[name] = 0
|
||||
if self.windows.has_key('accounts_window'):
|
||||
self.windows['accounts_window'].init_accounts()
|
||||
if self.windows.has_key('accounts'):
|
||||
self.windows['accounts'].init_accounts()
|
||||
self.roster.draw_roster()
|
||||
|
||||
def handle_event_quit(self, p1, p2):
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -513,7 +513,7 @@ class Roster_window:
|
|||
infos['accname'] = account
|
||||
infos['jid'] = self.plugin.accounts[account]["name"] + \
|
||||
'@' + self.plugin.accounts[account]["hostname"]
|
||||
self.plugin.windows['account_modification_window'] = \
|
||||
self.plugin.windows['account_modification'] = \
|
||||
Account_modification_window(self.plugin, infos)
|
||||
|
||||
def mk_menu_account(self, event, iter):
|
||||
|
@ -1075,8 +1075,10 @@ class Roster_window:
|
|||
def on_service_disco_menuitem_activate(self, widget, account):
|
||||
"""When Service Discovery is selected:
|
||||
Call browse class"""
|
||||
if not self.plugin.windows[account].has_key('browser'):
|
||||
self.plugin.windows[account]['browser'] = \
|
||||
if self.plugin.windows[account].has_key('disco'):
|
||||
self.plugin.windows[account]['disco'].present()
|
||||
else:
|
||||
self.plugin.windows[account]['disco'] = \
|
||||
Service_discovery_window(self.plugin, account)
|
||||
|
||||
def mkpixbufs(self):
|
||||
|
@ -1379,5 +1381,5 @@ class Roster_window:
|
|||
self.hidden_lines = self.plugin.config['hiddenlines'].split('\t')
|
||||
self.draw_roster()
|
||||
if len(self.plugin.accounts) == 0: # if no account
|
||||
self.plugin.windows['account_modification_window'] = \
|
||||
self.plugin.windows['account_modification'] = \
|
||||
Account_modification_window(self.plugin, {})
|
||||
|
|
Loading…
Reference in New Issue