*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <config.h>
static void
ev_print_operation_print_status_changed (EvPrintOperationPrint *print)
{
-#ifdef HAVE_GTK_PRINT_OPERATION_GET_N_PAGES_TO_PRINT
GtkPrintStatus status;
status = gtk_print_operation_get_status (print->op);
if (status == GTK_PRINT_STATUS_GENERATING_DATA)
print->n_pages_to_print = gtk_print_operation_get_n_pages_to_print (print->op);
-#endif
}
static void
EvPrintOperation *op = EV_PRINT_OPERATION (print);
gtk_print_operation_draw_page_finish (print->op);
-#ifdef HAVE_GTK_PRINT_OPERATION_GET_N_PAGES_TO_PRINT
+
print->total++;
ev_print_operation_update_status (op, print->total,
print->n_pages_to_print,
print->total / (gdouble)print->n_pages_to_print);
-#endif
ev_job_print_set_cairo (job, NULL);
}
gboolean use_source_size;
settings = gtk_print_operation_get_print_settings (print->op);
- page_scale = gtk_print_settings_get_int_with_default (settings, EV_PRINT_SETTING_PAGE_SCALE, 0);
+ page_scale = gtk_print_settings_get_int_with_default (settings, EV_PRINT_SETTING_PAGE_SCALE, 1);
autorotate = gtk_print_settings_has_key (settings, EV_PRINT_SETTING_AUTOROTATE) ?
gtk_print_settings_get_bool (settings, EV_PRINT_SETTING_AUTOROTATE) :
TRUE;
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0);
gtk_widget_show (label);
- print->scale_combo = gtk_combo_box_new_text ();
- gtk_combo_box_append_text (GTK_COMBO_BOX (print->scale_combo), _("None"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (print->scale_combo), _("Shrink to Printable Area"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (print->scale_combo), _("Fit to Printable Area"));
+ print->scale_combo = gtk_combo_box_text_new ();
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (print->scale_combo), _("None"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (print->scale_combo), _("Shrink to Printable Area"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (print->scale_combo), _("Fit to Printable Area"));
gtk_combo_box_set_active (GTK_COMBO_BOX (print->scale_combo), page_scale);
gtk_widget_set_tooltip_text (print->scale_combo,
_("Scale document pages to fit the selected printer page. Select from one of the following:\n"