gedit r6104 - branches/printing/gedit



Author: pborelli
Date: Mon Jan 21 14:55:15 2008
New Revision: 6104
URL: http://svn.gnome.org/viewvc/gedit?rev=6104&view=rev

Log:
add the boiler plate for the custom widget


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	Mon Jan 21 14:55:15 2008
@@ -205,6 +205,25 @@
 	g_type_class_add_private (object_class, sizeof (GeditPrintJobPrivate));
 }
 
+static GObject *
+create_custom_widget_cb (GtkPrintOperation *operation, 
+			 GeditPrintJob     *job)
+{
+	GtkWidget *widget;
+
+	widget = gtk_label_new ("Implement me!");
+
+	return G_OBJECT (widget);
+}
+
+static void
+custom_widget_apply_cb (GtkPrintOperation *operation,
+			GtkWidget         *widget,
+			GeditPrintJob     *job)
+{
+	g_print ("custom widget apply");
+}
+
 static void
 create_compositor (GeditPrintJob *job)
 {
@@ -459,8 +478,19 @@
 	gtk_print_operation_set_job_name (priv->operation, job_name);
 	g_free (job_name);
 
+	gtk_print_operation_set_custom_tab_label (priv->operation,
+						  _("Text Editor"));
+
 	gtk_print_operation_set_allow_async (priv->operation, TRUE);
 
+	g_signal_connect (priv->operation,
+			  "create-custom-widget", 
+			  G_CALLBACK (create_custom_widget_cb),
+			  job);
+	g_signal_connect (priv->operation,
+			  "custom-widget-apply", 
+			  G_CALLBACK (custom_widget_apply_cb), 
+			  job);
   	g_signal_connect (priv->operation,
 			  "begin-print", 
 			  G_CALLBACK (begin_print_cb),



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