Gtk+2.0 define signal callback function,but it doesn't be called



code:
      char *signals[] = {
      "button_press_event",
      "button_release_event",
      "motion_notify_event",
      "key_press_event"         
   };
 
for (i = 0; i < sizeof (signals) / sizeof (signals[0]); i++) {
   gtk_signal_connect_object
         (GTK_OBJECT (GTK_SCROLLED_WINDOW(scrolled)->vscrollbar),
          signals[i],  GTK_SIGNAL_FUNC (Dw_gtk_scrolled_window_changed1),
          GTK_OBJECT (scrolled));
      gtk_signal_connect_object_after
         (GTK_OBJECT (GTK_SCROLLED_WINDOW(scrolled)->vscrollbar),
          signals[i],  GTK_SIGNAL_FUNC (Dw_gtk_scrolled_window_changed2),
          GTK_OBJECT (scrolled));
 }
 
i use gdb,set breakpoint a function Dw_gtk_scrolled_window_changed1,Dw_gtk_scrolled_window_changed2,
when i click the mouse on the gtk widget area,it only breaks at Dw_gtk_scrolled_window_changed1,but
never break at Dw_gtk_scrolled_window_changed2,i'm confused.
 
any wrong gtk_signal_connect_object_after()?  all code above is from dillo 0.6.4,it's wrote in gtk1.2,
now i want to port it to gtk 2.0.
 
Anyone can help,thanks


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