gnumeric r16630 - in trunk: . src src/dialogs
- From: jody svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16630 - in trunk: . src src/dialogs
- Date: Tue, 17 Jun 2008 23:57:46 +0000 (UTC)
Author: jody
Date: Tue Jun 17 23:57:46 2008
New Revision: 16630
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16630&view=rev
Log:
* Fix PageSetup on windows.
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/src/dialogs/ChangeLog
trunk/src/dialogs/dialog-printer-setup.c
trunk/src/print-info.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Tue Jun 17 23:57:46 2008
@@ -14,6 +14,7 @@
* Polish win32 installer. [#534231]
* Fix range highlighting while editing.
* Fix highlighting of merged cells. [#127415]
+ * Fix PageSetup on windows.
Morten:
* Fix Excel export problem for strings that need quoting. [#530704]
Modified: trunk/src/dialogs/dialog-printer-setup.c
==============================================================================
--- trunk/src/dialogs/dialog-printer-setup.c (original)
+++ trunk/src/dialogs/dialog-printer-setup.c Tue Jun 17 23:57:46 2008
@@ -2776,7 +2776,8 @@
{
if (page_setup) {
PrinterSetupState *state = data;
- print_info_set_page_setup (state->pi, page_setup);
+ print_info_set_page_setup (state->pi,
+ gtk_page_setup_copy (page_setup));
do_update_page (state);
}
}
Modified: trunk/src/print-info.c
==============================================================================
--- trunk/src/print-info.c (original)
+++ trunk/src/print-info.c Tue Jun 17 23:57:46 2008
@@ -1109,21 +1109,36 @@
return NULL;
}
+/**
+ * print_info_set_page_setup :
+ * @pi : #PrintInformation
+ * @page_setup : #GtkPageSetup
+ *
+ * Absorb a ref to @page_setup.
+ *
+ * WHY WHY WHY
+ * 1) The life cycle in here is a tad odd, the load_defaults does nothing for the
+ * case of an existing page_setup, and seems like it should be ignored for the
+ * case of a new one.
+ *
+ * 2) Why not copy the page_setup in here and make the arg const ?
+ **/
void
print_info_set_page_setup (PrintInformation *pi, GtkPageSetup *page_setup)
{
- double header, footer, left, right;
-
g_return_if_fail (pi != NULL);
+
print_info_load_defaults (pi);
if (pi->page_setup) {
+ double header, footer, left, right;
+ print_info_get_margins (pi,
+ &header, &footer, &left, &right, NULL, NULL);
g_object_unref (pi->page_setup);
- print_info_get_margins (pi, &header, &footer, &left, &right,
- NULL, NULL);
pi->page_setup = page_setup;
print_info_set_margins (pi, header, footer, left, right);
- } else pi->page_setup = page_setup;
+ } else
+ pi->page_setup = page_setup;
}
GtkPageOrientation
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]