* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <unistd.h>
static void
gtk_print_backend_papi_register_type (GTypeModule *module)
{
- static const GTypeInfo print_backend_papi_info =
+ const GTypeInfo print_backend_papi_info =
{
sizeof (GtkPrintBackendPapiClass),
NULL, /* base_init */
surface = cairo_ps_surface_create_for_stream (_cairo_write, cache_io, width, height);
- /* TODO: DPI from settings object? */
- cairo_surface_set_fallback_resolution (surface, 300, 300);
+ cairo_surface_set_fallback_resolution (surface,
+ 2.0 * gtk_print_settings_get_printer_lpi (settings),
+ 2.0 * gtk_print_settings_get_printer_lpi (settings));
return surface;
}
gtk_printer_set_is_default (printer, TRUE);
}
- gtk_printer_set_icon_name (printer, "gtk-print");
+ gtk_printer_set_icon_name (printer, "printer");
gtk_print_backend_add_printer (backend, printer);
gtk_printer_set_is_active (printer, TRUE);
papi_printer = GTK_PRINTER_PAPI (printer);
if (papiServiceCreate (&service, NULL, NULL, NULL, NULL, PAPI_ENCRYPT_NEVER,
NULL) != PAPI_OK)
- return FALSE;
+ return G_SOURCE_REMOVE;
if (papiPrinterQuery (service, papi_printer->printer_name, NULL, NULL,
¤t_printer) != PAPI_OK)
papiServiceDestroy (service);
gtk_printer_set_has_details (printer, TRUE);
- return FALSE;
+ return G_SOURCE_REMOVE;
}
static void