* 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 "config.h"
}
else if (type == CAIRO_SURFACE_TYPE_PDF)
{
+ if (!op->priv->manual_orientation)
+ {
+ w = gtk_page_setup_get_paper_width (page_setup, GTK_UNIT_POINTS);
+ h = gtk_page_setup_get_paper_height (page_setup, GTK_UNIT_POINTS);
+ }
cairo_pdf_surface_set_size (op_unix->surface, w, h);
}
}
g_object_ref (op);
if (!op_unix->data_sent)
{
- GDK_THREADS_LEAVE ();
+ gdk_threads_leave ();
g_main_loop_run (op_unix->loop);
- GDK_THREADS_ENTER ();
+ gdk_threads_enter ();
}
g_main_loop_unref (op_unix->loop);
op_unix->loop = NULL;
GtkPageSetup *page_setup,
cairo_surface_t *surface)
{
- GtkPaperSize *paper_size;
gdouble w, h;
- paper_size = gtk_page_setup_get_paper_size (page_setup);
- w = gtk_paper_size_get_width (paper_size, GTK_UNIT_POINTS);
- h = gtk_paper_size_get_height (paper_size, GTK_UNIT_POINTS);
+ w = gtk_page_setup_get_paper_width (page_setup, GTK_UNIT_POINTS);
+ h = gtk_page_setup_get_paper_height (page_setup, GTK_UNIT_POINTS);
cairo_pdf_surface_set_size (surface, w, h);
}
find_printer (printer_name,
(GFunc) found_printer, &rdata);
- GDK_THREADS_LEAVE ();
+ gdk_threads_leave ();
g_main_loop_run (rdata.loop);
- GDK_THREADS_ENTER ();
+ gdk_threads_enter ();
g_main_loop_unref (rdata.loop);
rdata.loop = NULL;
printer_finder_free (finder);
- return FALSE;
+ return G_SOURCE_REMOVE;
}
static void