Re: Various Patches
Tommi Komulainen <[email protected]>
| Newsgroups | gmane.comp.web.galeon.devel |
|---|---|
| Message-ID | <[email protected]> |
On 2003-06-29 17:37 +0100, Crispin Flowerday <[email protected]> wrote: > Hi, > > Attached are a few patches to fix a couple of things. > > 1) Make the Location bar CTRL+Enter aware, it opens the link in a new > tab or window (depending on preference) Great! I think I might finally get around to commit this one too. You're posting more patches than our patch monkeys (i.e. just me, I guess) can handle. Please don't stop. ;) > 2) Fix the crash dialog so that if you start galeon with : > $ galeon www.slashdot.org > > and you select 'Dont start' it doesn't start Looks good, I just have a few nits about the implementation, see below. > 4) A Patch to fix a few memory leaks and unitialised values. I found all > of these using valgrind. At the moment 11k is lost with just opening 1 > window and closing it. One big culprit is the statusbar, it doesn't seem > to free any of its objects, but I couldn't work out how to get it do > that. (g_object_unref and gtk_widget_destroy complained), but it is > possible I was doing something wrong. Hmm, I think you're supposed to do g_object_ref + gtk_object_sink, and then g_object_unref shouldn't complain. Could be a different problem, though. > Index: src/session.c > =================================================================== > RCS file: /cvs/gnome/galeon/src/session.c,v > retrieving revision 1.153 > diff -u -r1.153 session.c > --- src/session.c 19 Jan 2003 16:19:13 -0000 1.153 > +++ src/session.c 29 Jun 2003 16:17:44 -0000 > @@ -256,7 +256,7 @@ > * > * Return value: return false if no window has been opened > **/ > -gboolean > +SessionResumeRet > session_autoresume (Session *session) > { > char *saved_session; > @@ -292,7 +292,7 @@ > g_free (saved_session); > > /* return false if no window has been opened */ > - return (session->priv->windows != NULL); > + return (session->priv->windows != NULL) ? SESSION_LOADED : SESSION_NONE ; I see you forgot to update the documentation there (don't we all?) > @@ -58,6 +58,14 @@ > void ( *close_window) (Session *session); > }; > > + > +typedef enum { > + SESSION_LOADED, > + SESSION_NONE, > + SESSION_ABORT > +} SessionResumeRet; This should probably be named SessionResumeType, and declared before the structs (we should have an unread copy of code conventions somewhere around here...) ;) Hmm, can you think of a better name for SESSION_NONE, I'm not sure I understand what it means there :-] -- Tommi Komulainen [email protected] GPG 1024D/68388EE6 6FD6 DD79 EB38 BF6F 3533 09C0 04A8 9871 6838 8EE6
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/BIu6BKiYcWg4juYRAg0EAJ4x4rqhd5DWxLT1ycQPirt/ZeThpQCgy6Vm VXEcrp3nRca74ulhOv9yFVk= =6MqG -----END PGP SIGNATURE-----