alex wrote: > The table in core/bitzi.c is for enumerating the fixed XML tag into and > enum. If the the other table needs to a) provide translations, and b) > isn't in core I'm afraid some duplication will be required.
I see. Just leave it as is then. > > - There's a bug in bitzi_heartbeat(). > There is? What exactly? Well, if you meant "while (0)" you should just write that. If you didn't, I'd think it's a bug. > > - Use G_FREE_NULL() instead of g_free() even if it might look ridiculous > > in straight-forward code. It's better to laugh now than crying later. > Why? g_free handles being passed NULL anyway. So does free() but that's not quite the point. Just look what the macro does. > > - Writing "No data yet" into the treestore might look nice from a user > > perspective but you should keep in mind that GTK+ will g_strdup() this > > string and will not use atoms. Thus you waste a couple of memory and > Ok, will do. Maybe it will be worth resurrecting some of the colour > change bits from the original patch? Sure. It would probably look nice too use a mildly colored background for the bitzi column depending on the available bitzi information. > > - You don't need g_strdup_printf() for "%s", "blah %s" or "blah". Just > > use g_strdup() which is faster and safer. > safer? Its only a g_strdup_printf for consistency with the other legs of > the code (IIRC it printed a little more details while I was testing). Every removed *printf() decreases the probability of having a format string bug. > > - Not horribly important, but I mention it anyway: It looks like bitzi_rq > > should rather be a hashlist_t instead of a GSList as you make use of > > g_slist_append() which is O(n). > Its ordered and short (well as long as you don't select 1000 files at a > time, I may have to limit it) so I wasn't too worried. Well, but you have to expect that a user would just do that and the complete operation is even O(n^2) and as long as GTKG is a single process every GUI operation steals CPU time from the core i.e., blocks it. Of course, this little piece won't have any dramatic effects but: > A penny saved is a penny to squander. -- Ambrose Bierce -- Christian
pgpzMDlOJ3LpI.pgp
Description: PGP signature
