A Qua, 2003-07-09 �s 00:02, Erik Rivera Morales escreveu:
> Hello!!, I'm checking the examples in C and need the function
> "gnome_print_dialog_construct_range_page" of libgnomeprintui, 
> 
> but not found this method or function in the gnomeprint module and
> reviewed the source of gnome-python/gnomeprint the file printui.defs and
> printui.override and I did not find the method.
> 
> how to suport this method in the gnomeprint? 
> I must modify the file printui.defs and compile?

  I overlooked those functions. Sorry about that! Just checked in to CVS
the patch in attachment.  The example has been improved to use that
method too.

> 
> Thanks again!
> 
> 
> 
> El lun, 07 de 07 de 2003 a las 11:02, Gustavo J. A. M. Carneiro
> escribi�: 
> >   I don't know the answer to your problem, but here are examples:
> > 
> > http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&dir=gnome-python/gnome-python/examples/gnomeprint
> > http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&dir=libgnomeprintui/examples
> >        
> > 
> > 
> > A S?, 2003-07-05 �s 01:41, Erik Rivera Morales escreveu:
> > > Hello!!
> > > 
> > > hello!  I'm working with gnomeprint and I already can print!! :-) but I
> > > have a question, as control the range of print?
> > > 
> > > insert the tab of range to print, this form:
> > > gnomeprint.ui.Dialog(myjob, title, DIALOG_RANGE)
> > > 
> > > but do not show the rank of pages
> > > 
> > > how I do? any idea?? or some example of code!!
> > > 
> > > thanks
> > > 
> > > 
> > > _______________________________________________
> > > pygtk mailing list   [EMAIL PROTECTED]
> > > http://www.daa.com.au/mailman/listinfo/pygtk
> > > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
Gustavo Jo�o Alves Marques Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>

? examples/gnomeprint/output.pdf
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-python/gnome-python/ChangeLog,v
retrieving revision 1.133
diff -u -p -r1.133 ChangeLog
--- ChangeLog	29 Apr 2003 23:35:30 -0000	1.133
+++ ChangeLog	9 Jul 2003 12:42:24 -0000
@@ -1,3 +1,9 @@
+2003-07-09  Gustavo J. A. M. Carneiro  <[EMAIL PROTECTED]>
+
+	* gnomeprint/printui.defs (construct_range_custom)
+	(construct_range_any, construct_range_page): Wrap these methods of
+	GnomePrintDialog.
+
 2003-04-29  Johan Dahlin  <[EMAIL PROTECTED]>
 
 	* gnome/vfsmodule.c: Add exceptions
Index: examples/gnomeprint/test-print.py
===================================================================
RCS file: /cvs/gnome/gnome-python/gnome-python/examples/gnomeprint/test-print.py,v
retrieving revision 1.1
diff -u -p -r1.1 test-print.py
--- examples/gnomeprint/test-print.py	13 Feb 2003 14:49:01 -0000	1.1
+++ examples/gnomeprint/test-print.py	9 Jul 2003 12:42:24 -0000
@@ -49,7 +49,17 @@ def print_dialog_response(dialog, resp, 
 
 def show_print_dialog():
     job = gnomeprint.Job(gnomeprint.config_default())
-    dialog = gnomeprint.ui.Dialog(job, "Print...", 0)
+    dialog = gnomeprint.ui.Dialog(job, "Print...",
+				  gnomeprint.ui.DIALOG_RANGE|
+				  gnomeprint.ui.DIALOG_COPIES)
+    flags = (gnomeprint.ui.RANGE_CURRENT
+	     |gnomeprint.ui.RANGE_ALL
+	     |gnomeprint.ui.RANGE_RANGE
+	     |gnomeprint.ui.RANGE_SELECTION)
+    # FIXME: the current and range strings should be translated in a
+    # "real" application    
+    dialog.construct_range_page(flags, 1, 1, "_Current", "_Range")
+
     dialog.connect('response', print_dialog_response, job)
     dialog.show()
     return dialog
Index: gnomeprint/printui.defs
===================================================================
RCS file: /cvs/gnome/gnome-python/gnome-python/gnomeprint/printui.defs,v
retrieving revision 1.1
diff -u -p -r1.1 printui.defs
--- gnomeprint/printui.defs	14 Jan 2003 21:45:24 -0000	1.1
+++ gnomeprint/printui.defs	9 Jul 2003 12:42:24 -0000
@@ -90,6 +90,38 @@
   (return-type "gint")
 )
 
+
+(define-method construct_range_custom
+  (of-object "GnomePrintDialog")
+  (c-name "gnome_print_dialog_construct_range_custom")
+  (parameters
+   '("GtkWidget*" "custom"))
+  (return-type "none")
+)
+
+(define-method construct_range_any
+  (of-object "GnomePrintDialog")
+  (c-name "gnome_print_dialog_construct_range_any")
+  (parameters
+   '("gint" 	    "flags")
+   '("GtkWidget*"   "rage_widget")
+   '("const-gchar*" "currentlabel")
+   '("const-gchar*" "rangelabel"))
+  (return-type "none")
+)
+
+(define-method construct_range_page
+  (of-object "GnomePrintDialog")
+  (c-name "gnome_print_dialog_construct_range_page")
+  (parameters
+   '("gint" 	    "flags")
+   '("gint"         "start")
+   '("gint"         "end")
+   '("const-gchar*" "currentlabel")
+   '("const-gchar*" "rangelabel"))
+  (return-type "none")
+)
+
 ;; gnome-print-preview.h
 
 (define-function gnome_print_preview_new
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to