In a fresh profile, that "url.get()" call yields something like "file:///your/working/directory/mozilla.ps". (and yet that value is lost at some point -- we still run into this bug)
I've tried replacing the "url.get()" token there with some hard-coded string constants, and I've learned the following -- it looks like we hit this bug whenever we pass in a string that contains a colon character. When I exclude the colon, then the print dialog ends up using the correct filename (albeit with no path information).
e.g. "/random/directory/foo.ps" and "file///random/directory/foo.ps" both end up presenting print dialogs that offer to save "foo.ps" in the current working directory. And if I add a colon (yielding "file:///random/directory/foo.ps"), then the print dialog buggily reverts to naming the file ".ps".
I'm not sure how to debug this further -- I haven't hooked up GDB to step through the GTK library's code before, and I'm not immediately sure what I'd need to do for that.
Here's the line of Mozilla code that comes into play here:
> 460 gtk_print_ settings_ set(mPrintSetti ngs, GTK_PRINT_ SETTINGS_ OUTPUT_ URI, url.get()); mxr.mozilla. org/mozilla- central/ source/ widget/ src/gtk2/ nsPrintSettings GTK.cpp# 460
http://
In a fresh profile, that "url.get()" call yields something like "file:/ //your/ working/ directory/ mozilla. ps". (and yet that value is lost at some point -- we still run into this bug)
I've tried replacing the "url.get()" token there with some hard-coded string constants, and I've learned the following -- it looks like we hit this bug whenever we pass in a string that contains a colon character. When I exclude the colon, then the print dialog ends up using the correct filename (albeit with no path information).
e.g. "/random/ directory/ foo.ps" and "file// /random/ directory/ foo.ps" both end up presenting print dialogs that offer to save "foo.ps" in the current working directory. And if I add a colon (yielding "file:/ //random/ directory/ foo.ps" ), then the print dialog buggily reverts to naming the file ".ps".
I'm not sure how to debug this further -- I haven't hooked up GDB to step through the GTK library's code before, and I'm not immediately sure what I'd need to do for that.