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

CJ van den Berg cj at vdbonline.com
Mon May 15 14:35:50 CEST 2006


On Sun, May 14, 2006 at 03:00:41PM +0100, Martyn Russell wrote:
> 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.

Thanks!  It's an improvement.

I still think it would be a very useful to gossip remember tab groupings
though. The way it is now is a little confusing because the position of the
tab group window is dependant on which contact you happen to click on first.
Wouldn't it be better to at least save the same coordinates for all contacts
in a tab group?

On a side note, chat windows for contacts with no previously stored window
coordinates are always opened in the top left corner of the screen.
Apparently overriding the window manager's placing rules. That's a little
unexpected.

-- 
CJ van den Berg

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


More information about the Gossip-dev mailing list