GNOME Bugzilla – Bug 542971
Port logview to GIO.
Last modified: 2008-12-23 13:46:07 UTC
Please describe the problem:
Here's an attempt at porting the logview part of gnome-utils to GIO.
Steps to reproduce:
Does this happen every time?
Created attachment 114540 [details] [review]
logview gio convertion patch including zlib compressed logfile functionality.
patch to convert logview to GIO and add zlib functionality for reading compressed logfiles. Autofoo magic for zlib missing!
I wonder whether this should be split up into two sepearte patches instead for easier review.
Talked to Andre on IRC and the part he suggested splitting out was the HAVE_ZLIB section. He did not realize gnomevfs provided this part before.
Splitting it would be a regression IMHO. That's why I wrote it in the first place, even though I didn't really want to deal with something non-gio.
I agree that it can definitely be improved to something which is based on top of gio so it can work with remote files and similar. Unfortunately zlib has a file-based API, which makes it non-obvious to me how to use gio for reading and zlib for uncompressing. I also think that most users are probably interested in reading their own logs, so it's not a major deal. Definitely a point to keep in mind for future improvements though.
Hardcode Freeze is on Monday, can we please get a review for this patch?
I don't think we'll get enough time to review this fully before the freeze - let alone commit it.
I'll put it on the top priority queue in order ot have it applied as soon as we branch for 2.25, though.
as a first *very* rough review:
- the coding style is wrong (I know: logview doesn't have an enforced coding style, but there's no need to make it worse by adding yet another way of breaking lines and indenting. pick the GNU coding style instead)
- don't use the #warning pragma - use the autofoo and g_warning() on the console/message dialogs when opening a compressed files. compile-time warnings are absolutely useless.
I'll have somebody else with a better understanding of the streaming API review its usage, though.
(In reply to comment #5)
> I'll put it on the top priority queue in order ot have it applied as soon as we
> branch for 2.25, though.
gnome-utils has a gnome-2-24 branch now. Can this please get reworked and in?
Andreas: Interested in providing an updatd patch?
Cosimo is working on logview (fixing bugs, porting to PolicyKit and GIO). I'd wait for him to comment on this.
I am basically rewriting the app from scratch in a private git branch, and am already using GIO instead of gnome-vfs in my rewrite.
My plan is to get things into trunk in a reasonable timeframe during the 2.25 cycle; if not, I'll review this patch before GNOME 2.26 so that we at least won't depend on gnome-vfs for that release.
My logview rewrite is in trunk now, closing as FIXED.