diff src/layout_image.c @ 993:aed46ba2eb9b

removed unused code
author nadvornik
date Mon, 25 Aug 2008 16:58:27 +0000
parents 1698baa37871
children 6ca2c5fd7b13
line wrap: on
line diff
--- a/src/layout_image.c	Sun Aug 24 14:40:18 2008 +0000
+++ b/src/layout_image.c	Mon Aug 25 16:58:27 2008 +0000
@@ -55,264 +55,6 @@
  * full screen
  *----------------------------------------------------------------------------
  */
-#if 0
-static void layout_image_fullscreen_menu_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data)
-{
-	LayoutWindow *lw = data;
-
-	if (!lw->full_screen) return;
-
-	gdk_window_get_origin(lw->full_screen->imd->pr->window, x, y);
-	popup_menu_position_clamp(menu, x, y, 0);
-}
-
-static void layout_image_full_screen_menu_popup(LayoutWindow *lw)
-{
-	GtkWidget *menu;
-
-	menu = layout_image_pop_menu(lw);
-	gtk_menu_popup(GTK_MENU(menu), NULL, NULL, layout_image_fullscreen_menu_pos_cb, lw, 0, GDK_CURRENT_TIME);
-}
-
-/* this is handled by layout_key_press_cb */
-
-
-static gint layout_image_full_screen_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
-{
-	LayoutWindow *lw = data;
-	gint stop_signal;
-	gint x = 0;
-	gint y = 0;
-
-	stop_signal = TRUE;
-	switch (event->keyval)
-		{
-		case GDK_Left: case GDK_KP_Left:
-			x -= 1;
-			break;
-		case GDK_Right: case GDK_KP_Right:
-			x += 1;
-			break;
-		case GDK_Up: case GDK_KP_Up:
-			y -= 1;
-			break;
-		case GDK_Down: case GDK_KP_Down:
-			y += 1;
-			break;
-		default:
-			stop_signal = FALSE;
-			break;
-		}
-
-	if (x != 0 || y!= 0)
-		{
-		if (event->state & GDK_SHIFT_MASK)
-			{
-			x *= 3;
-			y *= 3;
-			}
-
-		keyboard_scroll_calc(&x, &y, event);
-		layout_image_scroll(lw, x, y);
-		}
-
-	if (stop_signal) return stop_signal;
-
-	if (event->state & GDK_CONTROL_MASK)
-		{
-		gint n = -1;
-
-		stop_signal = TRUE;
-		switch (event->keyval)
-			{
-			case '1':
-				n = 0;
-				break;
-			case '2':
-				n = 1;
-				break;
-			case '3':
-				n = 2;
-				break;
-			case '4':
-				n = 3;
-				break;
-			case '5':
-				n = 4;
-				break;
-			case '6':
-				n = 5;
-				break;
-			case '7':
-				n = 6;
-				break;
-			case '8':
-				n = 7;
-				break;
-			case '9':
-				n = 8;
-				break;
-			case '0':
-				n = 9;
-				break;
-			case 'C': case 'c':
-				file_util_copy(layout_image_get_fd(lw), NULL, NULL, widget);
-				break;
-			case 'M': case 'm':
-				file_util_move(layout_image_get_fd(lw), NULL, NULL, widget);
-				break;
-			case 'R': case 'r':
-				file_util_rename(layout_image_get_fd(lw), NULL, widget);
-				break;
-			case 'D': case 'd':
-				file_util_delete(layout_image_get_fd(lw), NULL, widget);
-				break;
-			case 'P': case 'p':
-				info_window_new(layout_image_get_fd(lw), NULL, NULL);
-				break;
-			case 'Q': case 'q':
-				exit_program();
-				return FALSE;
-				break;
-			default:
-				stop_signal = FALSE;
-				break;
-			}
-		if (n != -1)
-			{
-			if (!editor_window_flag_set(n))
-				{
-				layout_image_full_screen_stop(lw);
-				}
-			file_util_start_editor_from_file(n, layout_image_get_fd(lw), lw->widget);
-			}
-		}
-	else if (event->state & GDK_SHIFT_MASK)
-		{
-		stop_signal = TRUE;
-		switch (event->keyval)
-			{
-			case 'R': case 'r':
-				layout_image_alter(lw, ALTER_ROTATE_180);
-				break;
-			case 'M': case 'm':
-				layout_image_alter(lw, ALTER_MIRROR);
-				break;
-			case 'F': case 'f':
-				layout_image_alter(lw, ALTER_FLIP);
-				break;
-			case 'G': case 'g':
-				layout_image_alter(lw, ALTER_DESATURATE);
-				break;
-			default:
-				stop_signal = FALSE;
-				break;
-			}
-		}
-	else
-		{
-		stop_signal = TRUE;
-		switch (event->keyval)
-			{
-			case '+': case '=': case GDK_KP_Add:
-				layout_image_zoom_adjust(lw, get_zoom_increment());
-				break;
-			case '-': case GDK_KP_Subtract:
-				layout_image_zoom_adjust(lw, -get_zoom_increment());
-				break;
-			case 'X': case 'x': case GDK_KP_Multiply:
-				layout_image_zoom_set(lw, 0.0);
-				break;
-			case 'Z': case 'z': case GDK_KP_Divide:
-			case '1':
-				layout_image_zoom_set(lw, 1.0);
-				break;
-			case '2':
-				layout_image_zoom_set(lw, 2.0);
-				break;
-			case '3':
-				layout_image_zoom_set(lw, 3.0);
-				break;
-			case '4':
-				layout_image_zoom_set(lw, 4.0);
-				break;
-			case '7':
-				layout_image_zoom_set(lw, -4.0);
-				break;
-			case '8':
-				layout_image_zoom_set(lw, -3.0);
-				break;
-			case '9':
-				layout_image_zoom_set(lw, -2.0);
-				break;
-			case 'W': case 'w':
-				layout_image_zoom_set_fill_geometry(lw, FALSE);
-				break;
-			case 'H': case 'h':
-				layout_image_zoom_set_fill_geometry(lw, TRUE);
-				break;
-			case GDK_Page_Up: case GDK_KP_Page_Up:
-			case GDK_BackSpace:
-			case 'B': case 'b':
-				layout_image_prev(lw);
-				break;
-			case GDK_Page_Down: case GDK_KP_Page_Down:
-			case GDK_space:
-			case 'N': case 'n':
-				layout_image_next(lw);
-				break;
-			case GDK_Home: case GDK_KP_Home:
-				layout_image_first(lw);
-				break;
-			case GDK_End: case GDK_KP_End:
-				layout_image_last(lw);
-				break;
-			case ']':
-				layout_image_alter(lw, ALTER_ROTATE_90);
-				break;
-			case '[':
-				layout_image_alter(lw, ALTER_ROTATE_90_CC);
-				break;
-			case GDK_Delete: case GDK_KP_Delete:
-				if (enable_delete_key)
-					{
-					file_util_delete(layout_image_get_fd(lw), NULL, widget);
-					}
-				break;
-			case GDK_Escape:
-				layout_image_full_screen_stop(lw);
-				break;
-			case 'R': case 'r':
-				layout_refresh(lw);
-				break;
-			case 'S': case 's':
-				layout_image_slideshow_toggle(lw);
-				break;
-			case 'P': case 'p':
-				layout_image_slideshow_pause_toggle(lw);
-				break;
-			case 'F': case 'f':
-			case 'V': case 'v':
-			case GDK_F11:
-				layout_image_full_screen_stop(lw);
-				break;
-			case GDK_Menu:
-			case GDK_F10:
-				layout_image_full_screen_menu_popup(lw);
-				break;
-			case 'I': case 'i':
-				layout_image_overlay_toggle(lw);
-				break;
-			default:
-				stop_signal = FALSE;
-				break;
-			}
-		}
-
-	return stop_signal;
-}
-
-#endif
 
 static void layout_image_full_screen_stop_func(FullScreenData *fs, gpointer data)
 {