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

Martyn Russell martyn at imendio.com
Sun May 14 16:00:41 CEST 2006


On Thu, 2006-05-11 at 15:00 +0200, CJ van den Berg wrote:
> 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.

Thanks for the suggestion, I personally think this is a little to
complicated and might confuse the user when the window geometry and tab
behaviour is inconsistent.

I have just committed work that simply stores positional coordinates
against contact id. It seems to work reasonably well.

-- 
Regards,
Martyn



More information about the Gossip-dev mailing list