[Rawstudio-commit] r980 - trunk/src

Anders Brander anders at brander.dk
Sat Dec 30 13:46:30 CET 2006


Author: abrander
Date: 2006-12-30 13:46:29 +0100 (Sat, 30 Dec 2006)
New Revision: 980

Modified:
   trunk/src/drawingarea.c
Log:
Added unstraighten.

Modified: trunk/src/drawingarea.c
===================================================================
--- trunk/src/drawingarea.c	2006-12-30 11:35:47 UTC (rev 979)
+++ trunk/src/drawingarea.c	2006-12-30 12:46:29 UTC (rev 980)
@@ -399,6 +399,14 @@
 	return;
 }
 
+static void
+gui_drawingarea_popup_unstraighten(GtkMenuItem *menuitem, RS_BLOB *rs)
+{
+	rs->photo->angle = 0.0;
+	update_preview(rs, FALSE, TRUE);
+	return;
+}
+
 gboolean
 gui_drawingarea_straighten_motion_callback(GtkWidget *widget, GdkEventMotion *event, RS_BLOB *rs)
 {
@@ -491,6 +499,13 @@
 			gtk_widget_show (i);
 			gtk_menu_attach (GTK_MENU (menu), i, 0, 1, n, n+1); n++;
 			g_signal_connect (i, "activate", G_CALLBACK (gui_drawingarea_popup_straighten), rs);
+			if (rs->photo->angle != 0.0)
+			{
+				i = gtk_menu_item_new_with_label (_("Unstraighten"));
+				gtk_widget_show (i);
+				gtk_menu_attach (GTK_MENU (menu), i, 0, 1, n, n+1); n++;
+				g_signal_connect (i, "activate", G_CALLBACK (gui_drawingarea_popup_unstraighten), rs);
+			}
 
 			gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME);
 		}




More information about the Rawstudio-commit mailing list