AW: [gtkmm] Segfault when calling the MenuItem superconstructor.



Hi!

In the method

	MenuItem::add_accel_label

I found the following:

	pLabel->property_xalign() = 0.0;

but property_xalign() returns by value. What sense does it make to
set a value that is only temporary available?

Could somebody also check, if the other stuff inside

	MenuItem::add_accel_label

is correct?

Harald

#######################################################################
class Misc : public Widget
{
...
...
...
  Glib::PropertyProxy<float> property_xalign();

  Glib::PropertyProxy<float> property_yalign();

  Glib::PropertyProxy<int> property_xpad();

  Glib::PropertyProxy<int> property_ypad();

};
#######################################################################

#######################################################################
void MenuItem::add_accel_label(const Glib::ustring& label, bool mnemonic)
{
  AccelLabel* pLabel = manage(new AccelLabel(label, mnemonic));
  //Labels are centered by default, but in menus they should be
left-aligned.
  pLabel->property_xalign() = 0.0; 

  add(*pLabel);
  pLabel->set_accel_widget(*this);
  pLabel->show();
}
#######################################################################

> -----Ursprüngliche Nachricht-----
> Von: Murray Cumming [mailto:murrayc usa net]
> Gesendet: Mittwoch, 28. August 2002 14:45
> An: Hopfes, Harald
> Cc: 'gtkmm-list gnome org'; Kuth, Joachim Dr.; Schwan, 
> Reinhard; Meier,
> Elke
> Betreff: Re: [gtkmm] Segfault when calling the MenuItem
> superconstructor.
> 
> 
> On Wed, 2002-08-28 at 12:33, Hopfes, Harald wrote:
> > Hello!
> > 
> > We use gtkmm in our industrial project and the bug
> > http://bugzilla.gnome.org/show_bug.cgi?id=78578 occurs many times 
> > , we might be urged to migrate back to an older version of gtkmm.
> > 
> > This would cause __very much__ work for us.
> > Is anybody working on this bug?
> 
> Do you experience this only with Gtk::Menu, or with other classes too?
> Have you discovered anything that might help us?
> 
> -- 
> Murray Cumming
> murrayc usa net
> www.murrayc.com
> 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]