[Rawstudio-commit] r2228 - trunk/src

Anders Kvist anders at kvistmail.dk
Wed Feb 25 10:44:30 CET 2009


Author: akv
Date: 2009-02-25 10:44:29 +0100 (Wed, 25 Feb 2009)
New Revision: 2228

Modified:
   trunk/src/rs-actions.c
   trunk/src/rs-preview-widget.c
Log:
Fixed building on Ubuntu Feisty. New lights out mode requires GTK 2.12.

Modified: trunk/src/rs-actions.c
===================================================================
--- trunk/src/rs-actions.c	2009-02-25 00:49:07 UTC (rev 2227)
+++ trunk/src/rs-actions.c	2009-02-25 09:44:29 UTC (rev 2228)
@@ -613,10 +613,12 @@
 	rs_preview_widget_set_split(RS_PREVIEW_WIDGET(rs->preview), gtk_toggle_action_get_active(toggleaction));
 }
 
+#if GTK_CHECK_VERSION(2,12,0)
 TOGGLEACTION(lightsout)
 {
 	rs_preview_widget_set_lightsout(RS_PREVIEW_WIDGET(rs->preview), gtk_toggle_action_get_active(toggleaction));
 }
+#endif
 
 ACTION(add_to_batch)
 {
@@ -855,7 +857,9 @@
 	{ "Fullscreen", GTK_STOCK_FULLSCREEN, _("_Fullscreen"), "F11", NULL, ACTION_CB(fullscreen), FALSE },
 	{ "ExposureMask", NULL, _("_Exposure mask"), "<control>E", NULL, ACTION_CB(exposure_mask), FALSE },
 	{ "Split", NULL, _("_Split"), NULL, NULL, ACTION_CB(split), FALSE },
+#if GTK_CHECK_VERSION(2,12,0)
 	{ "Lightsout", NULL, _("_Lights out"), "F12", NULL, ACTION_CB(lightsout), FALSE },
+#endif
 	};
 	static guint n_toggleentries = G_N_ELEMENTS (toggleentries);
 

Modified: trunk/src/rs-preview-widget.c
===================================================================
--- trunk/src/rs-preview-widget.c	2009-02-25 00:49:07 UTC (rev 2227)
+++ trunk/src/rs-preview-widget.c	2009-02-25 09:44:29 UTC (rev 2228)
@@ -151,7 +151,9 @@
 	RSColorTransform *rct[MAX_VIEWS];
 	gint dirty[MAX_VIEWS]; /* Dirty flag, used for multiple things */
 
+#if GTK_CHECK_VERSION(2,12,0)
 	GtkWidget *lightsout_window;
+#endif
 	gboolean prev_inside_image; /* For motion and leave function*/
 };
 
@@ -330,7 +332,9 @@
 	g_signal_connect(G_OBJECT(preview), "realize", G_CALLBACK(realize), NULL);
 	g_signal_connect(G_OBJECT(preview->canvas), "scroll_event", G_CALLBACK (scroll), preview);
 
+#if GTK_CHECK_VERSION(2,12,0)
 	preview->lightsout_window = NULL;
+#endif
 	preview->prev_inside_image = FALSE;
 }
 
@@ -521,6 +525,7 @@
 	redraw(preview, &rect);
 }
 
+#if GTK_CHECK_VERSION(2,12,0)
 static gboolean
 lightsout_window_on_expose(GtkWidget *widget, GdkEventExpose *do_not_use_this, RSPreviewWidget *preview)
 {
@@ -558,7 +563,9 @@
 
 	return FALSE;
 }
+#endif
 
+#if GTK_CHECK_VERSION(2,12,0)
 /**
  * Enables or disables lights out mode
  * @param preview A RSPreviewWidget
@@ -638,6 +645,7 @@
 		preview->lightsout_window = NULL;
 	}
 }
+#endif
 
 /**
  * Sets the active snapshot of a RSPreviewWidget




More information about the Rawstudio-commit mailing list