comparison src/info.c @ 868:db6977f8b0f1

Reduce number of parameters (mostly unused), just pass the event pointer.
author zas_
date Sat, 28 Jun 2008 07:43:37 +0000
parents 339db85846da
children 1698baa37871
comparison
equal deleted inserted replaced
867:5169bd198d5a 868:db6977f8b0f1
763 763
764 gtk_widget_set_sensitive(id->button_next, (work->next != NULL)); 764 gtk_widget_set_sensitive(id->button_next, (work->next != NULL));
765 gtk_widget_set_sensitive(id->button_back, TRUE); 765 gtk_widget_set_sensitive(id->button_back, TRUE);
766 } 766 }
767 767
768 static void info_window_image_button_cb(ImageWindow *imd, gint button, guint32 time, 768 static void info_window_image_button_cb(ImageWindow *imd, GdkEventButton *event, gpointer data)
769 gdouble x, gdouble y, guint state, gpointer data) 769 {
770 { 770 if (event->button == MOUSE_BUTTON_LEFT)
771 if (button == MOUSE_BUTTON_LEFT)
772 { 771 {
773 info_window_next_cb(NULL, data); 772 info_window_next_cb(NULL, data);
774 } 773 }
775 else if (button == MOUSE_BUTTON_MIDDLE || button == MOUSE_BUTTON_RIGHT) 774 else if (event->button == MOUSE_BUTTON_MIDDLE || event->button == MOUSE_BUTTON_RIGHT)
776 { 775 {
777 info_window_back_cb(NULL, data); 776 info_window_back_cb(NULL, data);
778 } 777 }
779 } 778 }
780 779
781 static void info_window_image_scroll_cb(ImageWindow *imd, GdkScrollDirection direction, guint32 time, 780 static void info_window_image_scroll_cb(ImageWindow *imd, GdkEventScroll *event, gpointer data)
782 gdouble x, gdouble y, guint state, gpointer data) 781 {
783 { 782 if (event->direction == GDK_SCROLL_UP)
784 if (direction == GDK_SCROLL_UP)
785 { 783 {
786 info_window_back_cb(NULL, data); 784 info_window_back_cb(NULL, data);
787 } 785 }
788 else if (direction == GDK_SCROLL_DOWN) 786 else if (event->direction == GDK_SCROLL_DOWN)
789 { 787 {
790 info_window_next_cb(NULL, data); 788 info_window_next_cb(NULL, data);
791 } 789 }
792 } 790 }
793 791