Well apart from the obvious, "you could put some of this in a base class and 
forget about it", how about:

void FormCredits::build()
{
         dialog_.reset(dialog());

         ok()->clicked.connect(SigC::slot(this, &FormCredits::OKClicked));
         std::stringstream ss;
-         controller().getCredits(ss).str();
-        
         text()->insert(controller().getCredits(ss).str());
}

Angus



On Thursday 29 March 2001 09:19, Baruch Even wrote:
> * Michael A. Koziarski <[EMAIL PROTECTED]> [010329 10:14]:
> > I've rewritten the credits dialog.  In order to get the program to 
> > compile I also had to hack configure.in.
> 
> Did you update from cvs?
> configure.in was patched already to link libglade for gnome.
> 
> > I haven't formatted the info yet (too busy for a few days) but the raw 
> > contributors is in there.  All comments greatly appreciated as I'm still 
> > learning the source etc.
> 
> Here follows:
> 
> [FormCredits.C]
> > 
> > void FormCredits::build()
> > {
> >     dialog_.reset(dialog());
> 
> We do not need to handle the dialog, keep dialog_ as a Gnome::Dialog *
> and not as a smart pointer, this approach (which I've led at first) will
> cause a crash when lyx is exiting.
> 
> Should be writtend as:
> dialog_ = dialog(); // This is to make sure the dialog is instantiated.
> 
> [FormCredits.h]
> > 
> >     // Hold the dialog.
> >     boost::shared_ptr<Gnome::Dialog> dialog_;
> 
> This should be;
> Gnome::Dialog * dialog_;
> 
> -- 
> Baruch Even
> http://baruch.ev-en.org/

Reply via email to