Gtk::Image and mouse click



Hi all,

I know that I wrote following problem before a 2 months but unfortunatelly
I've upgraded my PC from FC5 to FC6 and now it does not work again.
I have installed following packages:
gtkmm24-docs-2.10.2-1.fc6
glibmm24-devel-2.12.2-1
libglademm24-devel-2.6.3-2.fc6
glibmm24-2.12.2-1
gtkmm24-devel-2.10.2-1.fc6
libglademm24-2.6.3-2.fc6
gtkmm24-2.10.2-1.fc
libsigc++-1.2.7-4.fc6
libsigc++20-2.0.17-2
libsigc++-devel-1.2.7-4.fc6
libsigc++20-devel-2.0.17-2

and in my program I wrote followinng code:
Gdk::EventMask events = image2.get_events();
events |= Gdk::BUTTON_PRESS_MASK;
image2.set_events(events);
image2.signal_button_press_event().connect(sigc::mem_fun(*this, &MainWindow::on_image2_button_press));

and function look like this:
void MainWindow::on_image2_button_press(GdkEvent * event)
{
Log("Procedure for button press");
int x=0;
int y=0;
image2.get_pointer(x,y);
sprintf(message,"X coor: %d, Y coor: %d",x,y);
Log(message);
imageOperation->getObject(x,y);

Log("End procedure for button press");
}

Makefile is following:
DBG=-ggdb
OPT=$(DBG)# -Wall -pedantic
LIB=`pkg-config gtkmm-2.4 --libs`
GTKFLAGS=`pkg-config gtkmm-2.4 --cflags`
CXX=g++

all:vsfmr

vsfmr: vsfmr.o MainWindow.o ImageOperation.o LogFile.o
$(CXX) -o vsfmr $(OPT) $(GTKFLAGS) $(LIB) vsfmr.o MainWindow.o ImageOperation.o LogFile.o

vsfmr.o: vsfmr.cpp MainWindow.h
$(CXX) -c $(OPT) $(GTKFLAGS) $(LIB) vsfmr.cpp

MainWindow.o: MainWindow.cpp MainWindow.h ImageOperation.h LogFile.h
$(CXX) -c $(OPT) $(GTKFLAGS) $(LIB) MainWindow.cpp

ImageOperation.o: ImageOperation.cpp ImageOperation.h LogFile.h
$(CXX) -c $(OPT) $(GTKFLAGS) $(LIB) ImageOperation.cpp

LogFile.o: LogFile.cpp LogFile.h
$(CXX) -c $(OPT) $(GTKFLAGS) $(LIB) LogFile.cpp

clean:
$(RM) vsfmr
$(RM) -f *.o


and after make -f Makefile I receive
follwoing error:

g++ -c -ggdb `pkg-config gtkmm-2.4 --cflags` `pkg-config gtkmm-2.4 --libs` MainWindow.cpp /usr/include/sigc++-2.0/sigc++/functors/slot.h: In static member function ‘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, MainWindow, GdkEvent*>, T_return = bool, T_arg1 = GdkEventButton*]’: /usr/include/sigc++-2.0/sigc++/functors/slot.h:144: instantiated from ‘static void* (* sigc::internal::slot_call1<T_functor, T_return, T_arg1>::address())(void*) [with T_functor = sigc::bound_mem_functor1<void, MainWindow, GdkEvent*>, T_return = bool, T_arg1 = GdkEventButton*]’ /usr/include/sigc++-2.0/sigc++/functors/slot.h:529: instantiated from ‘sigc::slot1<T_return, T_arg1>::slot1(const T_functor&) [with T_functor = sigc::bound_mem_functor1<void, MainWindow, GdkEvent*>, T_return = bool, T_arg1 = GdkEventButton*]’ /usr/include/sigc++-2.0/sigc++/functors/slot.h:1157: 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, MainWindow, GdkEvent*>, T_return = bool, T_arg1 = GdkEventButton*]’
MainWindow.cpp:201: instantiated from here
/usr/include/sigc++-2.0/sigc++/functors/slot.h:137: error: void value not ignored as it ought to be /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 = GdkEventButton* const&, T_functor = sigc::bound_mem_functor1<void, MainWindow, GdkEvent*>]’: /usr/include/sigc++-2.0/sigc++/functors/slot.h:137: 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, MainWindow, GdkEvent*>, T_return = bool, T_arg1 = GdkEventButton*]’ /usr/include/sigc++-2.0/sigc++/functors/slot.h:144: instantiated from ‘static void* (* sigc::internal::slot_call1<T_functor, T_return, T_arg1>::address())(void*) [with T_functor = sigc::bound_mem_functor1<void, MainWindow, GdkEvent*>, T_return = bool, T_arg1 = GdkEventButton*]’ /usr/include/sigc++-2.0/sigc++/functors/slot.h:529: instantiated from ‘sigc::slot1<T_return, T_arg1>::slot1(const T_functor&) [with T_functor = sigc::bound_mem_functor1<void, MainWindow, GdkEvent*>, T_return = bool, T_arg1 = GdkEventButton*]’ /usr/include/sigc++-2.0/sigc++/functors/slot.h:1157: 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, MainWindow, GdkEvent*>, T_return = bool, T_arg1 = GdkEventButton*]’
MainWindow.cpp:201: instantiated from here
/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:84: error: no match for call to ‘(sigc::bound_mem_functor1<void, MainWindow, GdkEvent*>) (GdkEventButton* const&)’ /usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1850: note: 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 = MainWindow, T_arg1 = GdkEvent*] /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:84: error: return-statement with a value, in function returning 'void'
make: *** [MainWindow.o] Error 1

Do you now where I can have a problem?
How can I solve it?

thanx for your help
regards

--
Petr Hráček, PSE ECT PSS27
ANFDATA spol. s r.o.
a SIEMENS Company
MediaHall, Bidlaky 20, 639 00 Brno, Czech Republic
Tel. +420 533 337 267
Fax. +420 533 337 252
mailto: petr hracek siemens com





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