problem with pidgin

Ethan Blanton elb at pidgin.im
Tue May 6 20:09:36 EDT 2008


Jeff Sadowski spake unto us the following wisdom:
> The problem I see is that fixing it the way you guys have suggested
> would make it worse for me than doing nothing at all. I currently have
> logging turned on so that when I reopen my friends messages I see them
> all.  And I remember what last I read. So I'm not too worried about
> missing them. The only reason you should have to close pidgin in my
> view is if you are in a hurry or shutting down thus extra steps in
> closing I think would be irritating and would be ignored by the os
> shutting down anyways.

If you're only interested in the shutting down case, then I would look
at completing Pidgin's session management code.  Pidgin already
remembers a bare minimum of information, and registers itself with the
session manager.  If you extended this to save open conversations and
window disposition (perhaps even current status) when a session save
is requested, you would get what you want *and* just generally make
Pidgin better and more stateful.  :-)

>  Isn't the point of an IM to be able to be reached? So it should
>  almost always be on. I think if I look at the code I can make it do
>  what I want with only a slight modification. I just need to get the
>  source code and add a procedure to look at tabs and windows open and
>  save that info in a file while shutting down the app. Better yet
>  would be to have a directory in the config directory with files
>  representing the windows that where open on exit. When a tab or
>  window opens it writes a file there with positions on screen and when
>  the tab or window is closed remove the file from the directory. I
>  don't know for sure but I think I could implement something like this
>  without too much work.

The session management protocol has a plan for this ... when the
session manager exits, you get a SaveYourself message, and you
checkpoint then.  (It can also generate a SaveYourself for other
reasons, such as user request.) Part of what you give the session
manager at that point (I don't remember the order, exactly, or how
this works in detail ... there is a rather complete account of it in
the X11 documentation[1]) is a command line which tells how to invoke
the program such that the just-saved session can be restored.
Typically programs accomplish this just as you suggested, by dropping
a state file someplace which can be read back in.

Ethan

[1] ftp://ftp.x.org/pub/R6.4/xc/doc/hardcopy/SM/SMlib.PS.gz

-- 
The laws that forbid the carrying of arms are laws [that have no remedy
for evils].  They disarm only those who are neither inclined nor
determined to commit crimes.
		-- Cesare Beccaria, "On Crimes and Punishments", 1764
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://pidgin.im/pipermail/devel/attachments/20080506/b2e67adb/attachment.sig>


More information about the Devel mailing list