[gtkmm] error on signal_size_allocate().connect(sigc::mem_fun(*this, &TextWidget::onResize))



I apologize for the lengthy subject, but I'm not exactly sure what the 
problem is. I'm updating a gtkmm based project (lostirc) to work with 
gtkmm 2.4. I'm stuck on one last problem. I am not subscribed to this 
list, so please keep me cc'ed in any replies.

The problem occurs in a class:

    class TextWidget : public Gtk::ScrolledWindow


The offending line is:

    get_vscrollbar()->signal_size_allocate()
       .connect(sigc::mem_fun(*this, &TextWidget::onResize));


The onResize method:

    void TextWidget::onResize(GtkAllocation *alloc)
    {
        _textview.scroll_to_mark(pos, 0.0);
    }


And the error:

/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h: In member 
function `
   typename sigc::adaptor_functor<T_functor>::deduce_result_type<T_arg1, 
void, 
   void, void, void, void, void>::type 
   sigc::adaptor_functor<T_functor>::operator()(T_arg1) const [with T_arg1 
= 
   Gtk::Allocation&, T_functor = sigc::bound_mem_functor1<void, 
TextWidget, 
   GtkAllocation*>]':
/usr/include/sigc++-2.0/sigc++/functors/slot.h:122:   instantiated from 
`static T_return sigc::internal::slot_call1<T_functor, T_return, 
T_arg1>::call_it(sigc::internal::slot_rep*, typename 
sigc::type_trait<T_arg3>::take) [with T_functor = 
sigc::bound_mem_functor1<void, TextWidget, GtkAllocation*>, T_return = 
void, T_arg1 = Gtk::Allocation&]'
/usr/include/sigc++-2.0/sigc++/functors/slot.h:130:   instantiated from 
`static void*(* sigc::internal::slot_call1<T_functor, T_return, 
T_arg1>::address())(void*) [with T_functor = 
sigc::bound_mem_functor1<void, TextWidget, GtkAllocation*>, T_return = 
void, T_arg1 = Gtk::Allocation&]'
/usr/include/sigc++-2.0/sigc++/functors/slot.h:510:   instantiated from 
`sigc::slot1<T_return, T_arg1>::slot1(const T_functor&) [with T_functor = 
sigc::bound_mem_functor1<void, TextWidget, GtkAllocation*>, T_return = 
void, T_arg1 = Gtk::Allocation&]'
/usr/include/sigc++-2.0/sigc++/functors/slot.h:1115:   instantiated from 
`sigc::slot<T_return, T_arg1, sigc::nil, sigc::nil, sigc::nil, sigc::nil, 
sigc::nil, sigc::nil>::slot(const T_functor&) [with T_functor = 
sigc::bound_mem_functor1<void, TextWidget, GtkAllocation*>, T_return = 
void, T_arg1 = Gtk::Allocation&]'
TextWidget.cpp:43:   instantiated from here
/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:87: error: no 
match for 
   call to `(sigc::bound_mem_functor1<void, TextWidget, GtkAllocation*>) (
   Gdk::Rectangle&)'
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1838: error: candidates 
are: 
   T_return sigc::bound_mem_functor1<T_return, T_obj, 
   T_arg1>::operator()(typename sigc::type_trait<T_arg3>::take) const 
[with 
   T_return = void, T_obj = TextWidget, T_arg1 = GtkAllocation*]
/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:87: error: 
return-statement
   with a value, in function declared with a void return type
make[3]: *** [TextWidget.o] Error 1



Thanks for any help.

-casey



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