gedit r6068 - branches/printing/gedit



Author: pborelli
Date: Sat Jan 12 14:59:06 2008
New Revision: 6068
URL: http://svn.gnome.org/viewvc/gedit?rev=6068&view=rev

Log:
we need the view as a property


Modified:
   branches/printing/gedit/gedit-print-job.c

Modified: branches/printing/gedit/gedit-print-job.c
==============================================================================
--- branches/printing/gedit/gedit-print-job.c	(original)
+++ branches/printing/gedit/gedit-print-job.c	Sat Jan 12 14:59:06 2008
@@ -52,6 +52,7 @@
 
 struct _GeditPrintJobPrivate
 {
+	GeditView         *view;
 	GeditDocument     *doc;
 	GtkPrintOperation *operation;	
 };
@@ -59,7 +60,7 @@
 enum
 {
 	PROP_0,
-	PROP_DOCUMENT,
+	PROP_VIEW,
 };
 
 enum 
@@ -83,6 +84,9 @@
 
 	switch (prop_id)
 	{
+		case PROP_VIEW:
+			g_value_set_object (value, compositor->priv->view);
+			break;
 		default:
 			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 			break;
@@ -99,6 +103,9 @@
 
 	switch (prop_id)
 	{
+		case PROP_VIEW:
+			gedit_print_job_set_view (job, g_value_get_object (value));
+			break;
 		default:
 			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 			break;
@@ -126,11 +133,11 @@
 
 	g_object_class_install_property (object_class,
 					 PROP_DOCUMENT,
-					 g_param_spec_object ("document",
-							      "Gedit Document",
-							      "Gedit Document to print",
+					 g_param_spec_object ("view",
+							      "Gedit View",
+							      "Gedit View to print",
 							      GEDIT_TYPE_DOCUMENT,
-							      G_PARAM_READWRITE));
+							      G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
 	print_job_signals[PRINTING] =
 		g_signal_new ("printing",



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]