Closed
Bug 256881
Opened 20 years ago
Closed 6 years ago
gtkmozembed printing
Categories
(Core Graveyard :: Embedding: GTK Widget, enhancement)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: toddf, Assigned: mpgritti)
References
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 It would be very nice if gtkmozembed provided an interface to print the contents of the renderered website. It would be very nice if gtkmozembed provided an interface such as the following: GtkWidget *gtk_moz_embed_get_print_dialog(void); Then another GtkWidget could be defined a GtkMozEmbedPrintDialog. This Widget would supply getters and setters for all the supported print options. And would provide a very simple function: void gtk_moz_embed_print_dialog_print( GtkMozEmbedPrintDialog *dialog ); To deal with print preview the print dialog can provide another mozembed widget: GtkMozEmbedPrintPreview That might have the some functions such as: gtk_moz_embed_print_preview_set_orientation( GtkMozEmbedPrintPreview *pp, GTK_MOZ_EMBED_ORIENTATION ); I hope to get some more feed back and ideas about how this should work and would like to start putting these objects together. Reproducible: Always Steps to Reproduce:
Comment 1•20 years ago
|
||
Do you want something like in Bug 94583? That patch there hasn't been checked in source yet, but maybe you want to test the patch there if it still works (if you compile yourself). The patch still applys on current source, i've tested it. If it works, give feedback, so we know it still works.
Reporter | ||
Comment 2•20 years ago
|
||
(In reply to comment #1) > Do you want something like in Bug 94583? That patch there hasn't been checked in > source yet, but maybe you want to test the patch there if it still works (if you > compile yourself). The patch still applys on current source, i've tested it. If > it works, give feedback, so we know it still works. Just applied the patch didn't compile on first try the errors are: In file included from TestGtkEmbed.cpp:32: ../../../../dist/include/gtkembedmoz/gtkmozembed_internal.h:25:27: nsIWebBrowser.h: No such file or directory In file included from TestGtkEmbed.cpp:32: ../../../../dist/include/gtkembedmoz/gtkmozembed_internal.h:34: error: type specifier omitted for parameter `nsIWebBrowser' ../../../../dist/include/gtkembedmoz/gtkmozembed_internal.h:34: error: syntax error before `*' token TestGtkEmbed.cpp:35:32: nsIWebBrowserPrint.h: No such file or directory TestGtkEmbed.cpp: In function `void menu_print_cb(GtkMenuItem*, TestGtkBrowser*)': TestGtkEmbed.cpp:635: error: `nsIWebBrowser' undeclared (first use this function) TestGtkEmbed.cpp:635: error: (Each undeclared identifier is reported only once for each function it appears in.) TestGtkEmbed.cpp:635: error: template argument 1 is invalid TestGtkEmbed.cpp:635: error: ISO C++ forbids declaration of `browser' with no type TestGtkEmbed.cpp:636: error: no matching function for call to `getter_AddRefs( int&)' TestGtkEmbed.cpp:639: error: base operand of `->' is not a pointer TestGtkEmbed.cpp:641: error: `nsIWebBrowserPrint' undeclared (first use this function) TestGtkEmbed.cpp:641: error: template argument 1 is invalid TestGtkEmbed.cpp:641: error: no matching function for call to ` do_QueryInterface(int&)' ../../../../dist/include/xpcom/nsCOMPtr.h:379: error: candidates are: nsQueryInterface do_QueryInterface(nsISupports*) <near match> ../../../../dist/include/xpcom/nsCOMPtr.h:386: error: nsQueryInterfaceWithError do_QueryInterface(nsISupports*, nsresult*) TestGtkEmbed.cpp:641: error: ISO C++ forbids declaration of `browserPrint' with no type TestGtkEmbed.cpp:643: error: base operand of `->' is not a pointer gmake[2]: *** [TestGtkEmbed.o] Error 1 gmake[2]: Leaving directory `/home/taf2/mozilla/embedding/browser/gtk/tests' gmake[1]: *** [libs] Error 2 gmake[1]: Leaving directory `/home/taf2/mozilla/embedding/browser/gtk' make: *** [all] Error 2
Comment 3•20 years ago
|
||
Ok, that patch bitrotted then. Someone needs to create a new one...
Depends on: 94583
Reporter | ||
Comment 4•20 years ago
|
||
(In reply to comment #3) > Ok, that patch bitrotted then. Someone needs to create a new one... Yeah, because even with the header problems it's biggest issue is the change in printing interfaces: error: no matching function for call to ` nsDerivedSafe<nsIWebBrowserPrint>::Print(nsCOMPtr<nsIDOMWindow>&, int, int)' /home/taf2/mozilla/dist/include/webbrwsr/nsIWebBrowserPrint.h:140: error: candidates are: virtual nsresult nsIWebBrowserPrint::Print(nsIPrintSettings*, nsIWebProgressListener*)
Comment 5•20 years ago
|
||
If you plan to work on this, you can crawl through the source on http://lxr.mozilla.org/seamonkey/ and also search in it. Maybe you can also look in the other embedding examples how printing works there now.
Reporter | ||
Comment 7•20 years ago
|
||
(In reply to comment #6) > I posted a new patch for bug 94583, you can try it out. The patch worked for me.
Reporter | ||
Comment 8•20 years ago
|
||
(In reply to comment #7) > (In reply to comment #6) > > I posted a new patch for bug 94583, you can try it out. > > The patch worked for me. The patch did not work for windows though in combination with patches from Bug 256560
Comment 9•20 years ago
|
||
how do galeon/epiphany deal with this?
Comment 10•20 years ago
|
||
We let mozilla handle everything. I think epiphany is still along the same lines. We show our dialog, collect all the relevant information and then populate mozilla's nsIPrintSettings structure and call print or print preview through nsIWebBrowserPrint. I don't think things will really change until the supposedly planned libgnomeprint support appears.
Assignee | ||
Comment 11•19 years ago
|
||
This make sense to me. I think we need 1 A simple print API that would show the print dialog. We _probably_ dont need a way to pass paramaters. 2 A gnome implementation of the printing prompt servince (something like epiphany one) Needs some thinking but a lot can be stolen from epiphany.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 12•19 years ago
|
||
This make sense to me. I think we need 1 A simple print API that would show the print dialog. We _probably_ dont need a way to pass paramaters. 2 A gnome implementation of the printing prompt servince (something like epiphany one) Needs some thinking but a lot can be stolen from epiphany.
Assignee: blizzard → mpgritti
Updated•15 years ago
|
QA Contact: pavlov → gtk-widget
Updated•12 years ago
|
Product: Core → Core Graveyard
Comment 13•6 years ago
|
||
Embedding: GTK Widget isn't a thing, closing.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•