[Gossip-dev] Saving window size/position and group

CJ van den Berg cj at vdbonline.com
Thu May 11 15:00:07 CEST 2006


On Thu, May 11, 2006 at 02:43:15PM +0200, Mikael Hallendal wrote:
> Michael Gratton skrev:
> > Probably the same size it was when the user last closed it.
> 
> However, that doesn't work very well when taking multiple chat windows
> into account. Ie. I might have one window with work related chats in and
> another with private discussions. These windows might have different
> sizes, which one would you save?

How about this suggestion?

For each JID you save the x,y,w,h of the chat window, *plus* a unique ID.
All JIDs that share a chat window get the same unique ID. If you detach a
JID from a window it gets a new, randomly generated unique ID. If you
attach... etc.

When you need to open a new chat for a JID you lookup it's saved unique Id.
If there is already a window open with that ID you add the new JID as a tab.
If not you create an new window with the saved x,y,w,h.

This way you get properly saved window positions _and_ tab grouping.

-- 
CJ van den Berg

mailto:cj at vdbonline.com
  xmpp:cj at vdbonline.com


More information about the Gossip-dev mailing list