gedit r6060 - branches/printing/gedit
- From: pborelli svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6060 - branches/printing/gedit
- Date: Mon, 7 Jan 2008 09:38:46 +0000 (GMT)
Author: pborelli
Date: Mon Jan 7 09:38:46 2008
New Revision: 6060
URL: http://svn.gnome.org/viewvc/gedit?rev=6060&view=rev
Log:
set number-of-pages label
Modified:
branches/printing/gedit/gedit-print-preview.c
Modified: branches/printing/gedit/gedit-print-preview.c
==============================================================================
--- branches/printing/gedit/gedit-print-preview.c (original)
+++ branches/printing/gedit/gedit-print-preview.c Mon Jan 7 09:38:46 2008
@@ -911,6 +911,21 @@
}
static void
+set_n_pages (GeditPrintPreview *preview,
+ gint n_pages)
+{
+ gchar *str;
+
+ preview->priv->n_pages = n_pages;
+
+ // FIXME: count the visible pages
+
+ str = g_strdup_printf ("%d", n_pages);
+ gtk_label_set_markup (GTK_LABEL (preview->priv->last), str);
+ g_free (str);
+}
+
+static void
preview_ready (GtkPrintOperationPreview *gtk_preview,
GtkPrintContext *context,
GeditPrintPreview *preview)
@@ -918,7 +933,7 @@
gint n_pages;
g_object_get (preview->priv->operation, "n-pages", &n_pages, NULL);
- preview->priv->n_pages = n_pages;
+ set_n_pages (preview, n_pages);
goto_page (preview, 0);
/* figure out the dpi */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]