[gnumeric] work around a gtk bug (#639186)
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] work around a gtk bug (#639186)
- Date: Tue, 11 Jan 2011 01:45:14 +0000 (UTC)
commit 821ce30b3070df3b4497a1126abde82551561a04
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Mon Jan 10 18:44:28 2011 -0700
work around a gtk bug (#639186)
2011-01-10 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/print-info.c (page_setup_set_paper): work around a gtk bug
(#639186)
ChangeLog | 13 +++++++++----
src/print-info.c | 15 +++++++++++++++
2 files changed, 24 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5655dfe..dbf92f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-10 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * src/print-info.c (page_setup_set_paper): work around a gtk bug
+ (#639186)
+
2011-01-09 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/pixmaps/gnm_subscript_16.png: new
@@ -5,10 +10,10 @@
* src/pixmaps/gnm_superscript_16.png: new
* src/pixmaps/gnm_superscript_24.png: new
* src/pixmaps/Makefile.am: add the above files
- * src/wbc-gtk.c (wbc_gtk_setup_icons): set up Gnumeric_Superscript
- and Gnumeric_Subscript icons
- * src/wbc-gtk-actions.c (font_toggle_actions) use Gnumeric_Superscript
- and Gnumeric_Subscript icons
+ * src/wbc-gtk.c (wbc_gtk_setup_icons): set up
+ Gnumeric_Superscript and Gnumeric_Subscript icons
+ * src/wbc-gtk-actions.c (font_toggle_actions) use
+ Gnumeric_Superscript and Gnumeric_Subscript icons
2011-01-09 Andreas J. Guelzow <aguelzow pyrshep ca>
diff --git a/src/print-info.c b/src/print-info.c
index 0e93269..f7275d3 100644
--- a/src/print-info.c
+++ b/src/print-info.c
@@ -1037,6 +1037,21 @@ page_setup_set_paper (GtkPageSetup *page_setup, char const *paper)
paper = GTK_PAPER_NAME_LEGAL;
else if (g_ascii_strncasecmp ("Executive", paper, 9) == 0)
paper = GTK_PAPER_NAME_EXECUTIVE;
+ /* GTK behaves stupid on some string it should recognize:*/
+ else if (g_str_has_prefix (paper, "iso_a3_"))
+ paper = GTK_PAPER_NAME_A3;
+ else if (g_str_has_prefix (paper, "iso_a4_"))
+ paper = GTK_PAPER_NAME_A4;
+ else if (g_str_has_prefix (paper, "iso_a5_"))
+ paper = GTK_PAPER_NAME_A5;
+ else if (g_str_has_prefix (paper, "iso_b5_"))
+ paper = GTK_PAPER_NAME_B5;
+ else if (g_str_has_prefix (paper, "na_letter_"))
+ paper = GTK_PAPER_NAME_LETTER;
+ else if (g_str_has_prefix (paper, "na_legal_"))
+ paper = GTK_PAPER_NAME_LEGAL;
+ else if (g_str_has_prefix (paper, "na_executive_"))
+ paper = GTK_PAPER_NAME_EXECUTIVE;
/* Hack: gtk_paper_size_new warns on bad paper, so shut it up. */
/* http://bugzilla.gnome.org/show_bug.cgi?id=493880 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]