diff options
Diffstat (limited to 'src/gtkutil.c')
| -rw-r--r-- | src/gtkutil.c | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c index 90683eba7b8..768df342983 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Functions for creating and updating GTK widgets. | 1 | /* Functions for creating and updating GTK widgets. |
| 2 | 2 | ||
| 3 | Copyright (C) 2003-2015 Free Software Foundation, Inc. | 3 | Copyright (C) 2003-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -4084,31 +4084,11 @@ xg_page_setup_dialog (void) | |||
| 4084 | Lisp_Object | 4084 | Lisp_Object |
| 4085 | xg_get_page_setup (void) | 4085 | xg_get_page_setup (void) |
| 4086 | { | 4086 | { |
| 4087 | Lisp_Object result, orientation_symbol; | ||
| 4088 | GtkPageOrientation orientation; | 4087 | GtkPageOrientation orientation; |
| 4088 | Lisp_Object orientation_symbol; | ||
| 4089 | 4089 | ||
| 4090 | if (page_setup == NULL) | 4090 | if (page_setup == NULL) |
| 4091 | page_setup = gtk_page_setup_new (); | 4091 | page_setup = gtk_page_setup_new (); |
| 4092 | result = list4 (Fcons (Qleft_margin, | ||
| 4093 | make_float (gtk_page_setup_get_left_margin (page_setup, | ||
| 4094 | GTK_UNIT_POINTS))), | ||
| 4095 | Fcons (Qright_margin, | ||
| 4096 | make_float (gtk_page_setup_get_right_margin (page_setup, | ||
| 4097 | GTK_UNIT_POINTS))), | ||
| 4098 | Fcons (Qtop_margin, | ||
| 4099 | make_float (gtk_page_setup_get_top_margin (page_setup, | ||
| 4100 | GTK_UNIT_POINTS))), | ||
| 4101 | Fcons (Qbottom_margin, | ||
| 4102 | make_float (gtk_page_setup_get_bottom_margin (page_setup, | ||
| 4103 | GTK_UNIT_POINTS)))); | ||
| 4104 | result = Fcons (Fcons (Qheight, | ||
| 4105 | make_float (gtk_page_setup_get_page_height (page_setup, | ||
| 4106 | GTK_UNIT_POINTS))), | ||
| 4107 | result); | ||
| 4108 | result = Fcons (Fcons (Qwidth, | ||
| 4109 | make_float (gtk_page_setup_get_page_width (page_setup, | ||
| 4110 | GTK_UNIT_POINTS))), | ||
| 4111 | result); | ||
| 4112 | orientation = gtk_page_setup_get_orientation (page_setup); | 4092 | orientation = gtk_page_setup_get_orientation (page_setup); |
| 4113 | if (orientation == GTK_PAGE_ORIENTATION_PORTRAIT) | 4093 | if (orientation == GTK_PAGE_ORIENTATION_PORTRAIT) |
| 4114 | orientation_symbol = Qportrait; | 4094 | orientation_symbol = Qportrait; |
| @@ -4118,9 +4098,24 @@ xg_get_page_setup (void) | |||
| 4118 | orientation_symbol = Qreverse_portrait; | 4098 | orientation_symbol = Qreverse_portrait; |
| 4119 | else if (orientation == GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE) | 4099 | else if (orientation == GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE) |
| 4120 | orientation_symbol = Qreverse_landscape; | 4100 | orientation_symbol = Qreverse_landscape; |
| 4121 | result = Fcons (Fcons (Qorientation, orientation_symbol), result); | ||
| 4122 | 4101 | ||
| 4123 | return result; | 4102 | return listn (CONSTYPE_HEAP, 7, |
| 4103 | Fcons (Qorientation, orientation_symbol), | ||
| 4104 | #define MAKE_FLOAT_PAGE_SETUP(f) make_float (f (page_setup, GTK_UNIT_POINTS)) | ||
| 4105 | Fcons (Qwidth, | ||
| 4106 | MAKE_FLOAT_PAGE_SETUP (gtk_page_setup_get_page_width)), | ||
| 4107 | Fcons (Qheight, | ||
| 4108 | MAKE_FLOAT_PAGE_SETUP (gtk_page_setup_get_page_height)), | ||
| 4109 | Fcons (Qleft_margin, | ||
| 4110 | MAKE_FLOAT_PAGE_SETUP (gtk_page_setup_get_left_margin)), | ||
| 4111 | Fcons (Qright_margin, | ||
| 4112 | MAKE_FLOAT_PAGE_SETUP (gtk_page_setup_get_right_margin)), | ||
| 4113 | Fcons (Qtop_margin, | ||
| 4114 | MAKE_FLOAT_PAGE_SETUP (gtk_page_setup_get_top_margin)), | ||
| 4115 | Fcons (Qbottom_margin, | ||
| 4116 | MAKE_FLOAT_PAGE_SETUP (gtk_page_setup_get_bottom_margin)) | ||
| 4117 | #undef MAKE_FLOAT_PAGE_SETUP | ||
| 4118 | ); | ||
| 4124 | } | 4119 | } |
| 4125 | 4120 | ||
| 4126 | static void | 4121 | static void |