when windows already exist present() them. cancel button and not close in account_modification_window

This commit is contained in:
Nikos Kouremenos 2005-04-17 18:36:09 +00:00
parent e3b478e170
commit 3b9b46b6e8
4 changed files with 9 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 B

After

Width:  |  Height:  |  Size: 629 B

View File

@ -897,8 +897,7 @@ class Account_modification_window:
"""close window"""
del self.plugin.windows['account_modification']
def on_close_button_clicked(self, widget):
"""When Close button is clicked"""
def on_cancel_button_clicked(self, widget):
self.window.destroy()
def on_checkbutton_toggled(self, widget, widgets):

View File

@ -1585,15 +1585,15 @@
<property name="spacing">10</property>
<child>
<widget class="GtkButton" id="close_button">
<widget class="GtkButton" id="cancel_button">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-close</property>
<property name="label">gtk-cancel</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_close_button_clicked" last_modification_time="Mon, 28 Feb 2005 20:32:02 GMT"/>
<signal name="clicked" handler="on_cancel_button_clicked" last_modification_time="Sun, 17 Apr 2005 18:17:10 GMT"/>
</widget>
</child>

View File

@ -530,7 +530,9 @@ class Roster_window:
menu.reposition()
def on_edit_account(self, widget, account):
if not self.plugin.windows.has_key('account_modification_window'):
if self.plugin.windows.has_key('account_modification_window'):
self.plugin.windows['account_modification'].window.present()
else:
self.plugin.windows['account_modification'] = \
config.Account_modification_window(self.plugin, account)
@ -932,7 +934,7 @@ class Roster_window:
def on_accounts_menuitem_activate(self, widget):
if self.plugin.windows.has_key('accounts'):
self.plugin.windows['accounts'].present()
self.plugin.windows['accounts'].window.present()
else:
self.plugin.windows['accounts'] = config.Accounts_window(self.plugin)
@ -1100,7 +1102,7 @@ class Roster_window:
"""When Service Discovery is selected:
Call browse class"""
if self.plugin.windows[account].has_key('disco'):
self.plugin.windows[account]['disco'].present()
self.plugin.windows[account]['disco'].window.present()
else:
self.plugin.windows[account]['disco'] = \
config.Service_discovery_window(self.plugin, account)