Added roles to some of the more often used windows.

This should help WMs like ion "do their thing" easier.
This commit is contained in:
Travis Shirk 2006-02-12 21:04:15 +00:00
parent 70191a1959
commit f7d4bd7913
2 changed files with 13 additions and 0 deletions

View File

@ -14,6 +14,7 @@
<property name="default_height">400</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="role">roster</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
@ -414,6 +415,7 @@
<property name="default_height">150</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="role">accounts</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
@ -2670,6 +2672,7 @@
<property name="default_height">420</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="role">Service Discovery</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
@ -3271,6 +3274,7 @@ Agent JID - node</property>
<property name="modal">False</property>
<property name="resizable">False</property>
<property name="destroy_with_parent">False</property>
<property name="role">preferences</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
@ -9131,6 +9135,7 @@ Custom</property>
<property name="default_height">350</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="role">history</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
@ -11674,6 +11679,7 @@ Static</property>
<property name="default_height">540</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="role">ace</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>

View File

@ -687,12 +687,17 @@ class MessageWindowMgr:
key = None
win_acct = None
win_type = None
win_role = 'messages'
key = self._mode_to_key(contact, acct, type)
if self.mode == self.ONE_MSG_WINDOW_PERACCT:
win_acct = acct
win_role = acct
elif self.mode == self.ONE_MSG_WINDOW_PERTYPE:
win_type = type
win_role = type
elif self.mode == self.ONE_MSG_WINDOW_NEVER:
win_role = contact.jid
win = None
try:
@ -700,6 +705,8 @@ class MessageWindowMgr:
except KeyError:
win = self._new_window(win_acct, win_type)
win.window.set_role(win_role)
# Position and size window based on saved state and window mode
if not self.one_window_opened(contact, acct, type):
self._position_window(win, acct, type)