}
}
+static void button4_cb(ImageWindow *imd, GdkEventButton *bevent, gpointer data)
+{
+ if (mousewheel_scrolls)
+ image_area_scroll(imd, 0, -MOUSEWHEEL_SCROLL_SIZE);
+ else
+ file_prev_image();
+}
+
+static void button5_cb(ImageWindow *imd, GdkEventButton *bevent, gpointer data)
+{
+ if (mousewheel_scrolls)
+ image_area_scroll(imd, 0, MOUSEWHEEL_SCROLL_SIZE);
+ else
+ file_next_image();
+}
+
/*
*----------------------------------------------------------------------------
* full screen functions
image_area_set_image(full_screen_image, image_get_path(), image_area_get_zoom(normal_image));
-/*
- if (!GTK_WIDGET_REALIZED(window)) gtk_widget_realize(window);
- gdk_window_set_override_redirect(window->window, TRUE);
-*/
gtk_widget_show(window);
gdk_keyboard_grab(window->window, TRUE, GDK_CURRENT_TIME);
- /* hide normal window */
+ /* hide normal window
+ * FIXME: properly restore this window on show
+ */
gtk_widget_hide(mainwindow);
image_area_set_image(normal_image, NULL, image_area_get_zoom(normal_image));
image_area_set_button(full_screen_image, 1, button1_cb, NULL);
image_area_set_button(full_screen_image, 2, button2_cb, NULL);
image_area_set_button(full_screen_image, 3, button3_cb, NULL);
+ /* for wheel mice */
+ image_area_set_button(full_screen_image, 4, button4_cb, NULL);
+ image_area_set_button(full_screen_image, 5, button5_cb, NULL);
main_image = full_screen_image;
}
full_screen_image = NULL;
gtk_widget_show(mainwindow);
+
}
void full_screen_toggle()
image_area_set_button(main_image, 1, button1_cb, NULL);
image_area_set_button(main_image, 2, button2_cb, NULL);
image_area_set_button(main_image, 3, button3_cb, NULL);
+ /* for wheel mice */
+ image_area_set_button(main_image, 4, button4_cb, NULL);
+ image_area_set_button(main_image, 5, button5_cb, NULL);
return main_image->eventbox;
}