← Back to team overview

ayatana-commits team mailing list archive

Re: [Merge] lp:~ted/indicator-applet/dynamic-allocation into lp:indicator-applet

 

On Wed, 2009-11-25 at 05:36 +0000, Robert Collins wrote:
> On Wed, 2009-11-25 at 03:35 +0000, Ted Gould wrote:
> > 
> > +       if (entry->image != NULL) {
> > +               gtk_box_pack_start(GTK_BOX(hbox),
> > GTK_WIDGET(entry->image), FALSE, FALSE, 0);
> > +       }
> > +       if (entry->label != NULL) {
> > +               gtk_box_pack_start(GTK_BOX(hbox),
> > GTK_WIDGET(entry->label), FALSE, FALSE, 0);
> > +       } 
> 
> I'd be tempted to have a helper function for this idiom, though its
> right on the lower bound of being useful for that.

The problem is that C doesn't have an easy to use "foreach" type
construct.  So you end up building datatypes to make it reasonable,
which doesn't make the code any shorter :(

> Is this something that can be tested?

Not really.  We'd need a Bonobo test harness.  I'm not up for writing
one, especially with Bonobo being deprecated.

		--Ted


-- 
https://code.launchpad.net/~ted/indicator-applet/dynamic-allocation/+merge/15230
Your team ayatana-commits is subscribed to branch lp:indicator-applet.



Follow ups

References