Commit c775906e4a1bf45e5c9dc4a810b1ca15d0235d97
- Diff rendering mode:
- inline
- side by side
gtk/gtkprintoperation.c
(55 / 1)
|   | |||
| 72 | 72 | PROP_CUSTOM_TAB_LABEL, | |
| 73 | 73 | PROP_EMBED_PAGE_SETUP, | |
| 74 | 74 | PROP_HAS_SELECTION, | |
| 75 | PROP_SUPPORT_SELECTION | ||
| 75 | PROP_SUPPORT_SELECTION, | ||
| 76 | PROP_N_PAGES_TO_PRINT | ||
| 76 | 77 | }; | |
| 77 | 78 | ||
| 78 | 79 | static guint signals[LAST_SIGNAL] = { 0 }; | |
| … | … | ||
| 402 | 402 | case PROP_SUPPORT_SELECTION: | |
| 403 | 403 | g_value_set_boolean (value, priv->support_selection); | |
| 404 | 404 | break; | |
| 405 | case PROP_N_PAGES_TO_PRINT: | ||
| 406 | g_value_set_int (value, priv->nr_of_pages_to_print); | ||
| 407 | break; | ||
| 405 | 408 | default: | |
| 406 | 409 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | |
| 407 | 410 | break; | |
| … | … | ||
| 1270 | 1270 | P_("TRUE if page setup combos are embedded in GtkPrintDialog"), | |
| 1271 | 1271 | FALSE, | |
| 1272 | 1272 | GTK_PARAM_READWRITE)); | |
| 1273 | /** | ||
| 1274 | * GtkPrintOperation:n-pages-to-print: | ||
| 1275 | * | ||
| 1276 | * The number of pages that will be printed. | ||
| 1277 | * | ||
| 1278 | * Note that this value is set during print preparation phase | ||
| 1279 | * (%GTK_PRINT_STATUS_PREPARING), so this value should never be | ||
| 1280 | * get before the data generation phase (%GTK_PRINT_STATUS_GENERATING_DATA). | ||
| 1281 | * You can connect to the #GtkPrintOperation::status-changed signal | ||
| 1282 | * and call gtk_print_operation_get_n_pages_to_print() when | ||
| 1283 | * print status is %GTK_PRINT_STATUS_GENERATING_DATA. | ||
| 1284 | * This is typically used to track the progress of print operation. | ||
| 1285 | * | ||
| 1286 | * Since: 2.18 | ||
| 1287 | */ | ||
| 1288 | g_object_class_install_property (gobject_class, | ||
| 1289 | PROP_N_PAGES_TO_PRINT, | ||
| 1290 | g_param_spec_int ("n-pages-to-print", | ||
| 1291 | P_("Number of Pages To Print"), | ||
| 1292 | P_("The number of pages that will be printed."), | ||
| 1293 | -1, | ||
| 1294 | G_MAXINT, | ||
| 1295 | -1, | ||
| 1296 | GTK_PARAM_READABLE)); | ||
| 1273 | 1297 | } | |
| 1274 | 1298 | ||
| 1275 | 1299 | /** | |
| … | … | ||
| 3215 | 3215 | g_return_val_if_fail (GTK_IS_PRINT_OPERATION (op), FALSE); | |
| 3216 | 3216 | ||
| 3217 | 3217 | return op->priv->has_selection; | |
| 3218 | } | ||
| 3219 | |||
| 3220 | /** | ||
| 3221 | * gtk_print_operation_get_n_pages_to_print: | ||
| 3222 | * @op: a #GtkPrintOperation | ||
| 3223 | * | ||
| 3224 | * Returns the number of pages that will be printed. | ||
| 3225 | * | ||
| 3226 | * Note that this value is set during print preparation phase | ||
| 3227 | * (%GTK_PRINT_STATUS_PREPARING), so this function should never be | ||
| 3228 | * called before the data generation phase (%GTK_PRINT_STATUS_GENERATING_DATA). | ||
| 3229 | * You can connect to the #GtkPrintOperation::status-changed signal | ||
| 3230 | * and call gtk_print_operation_get_n_pages_to_print() when | ||
| 3231 | * print status is %GTK_PRINT_STATUS_GENERATING_DATA. | ||
| 3232 | * This is typically used to track the progress of print operation. | ||
| 3233 | * | ||
| 3234 | * Returns: the number of pages that will be printed | ||
| 3235 | * | ||
| 3236 | * Since: 2.18 | ||
| 3237 | **/ | ||
| 3238 | gint | ||
| 3239 | gtk_print_operation_get_n_pages_to_print (GtkPrintOperation *op) | ||
| 3240 | { | ||
| 3241 | g_return_if_fail (GTK_IS_PRINT_OPERATION (op)); | ||
| 3242 | |||
| 3243 | return op->priv->nr_of_pages_to_print; | ||
| 3218 | 3244 | } | |
| 3219 | 3245 | ||
| 3220 | 3246 | #define __GTK_PRINT_OPERATION_C__ |
gtk/gtkprintoperation.h
(1 / 0)
|   | |||
| 187 | 187 | void gtk_print_operation_set_embed_page_setup (GtkPrintOperation *op, | |
| 188 | 188 | gboolean embed); | |
| 189 | 189 | gboolean gtk_print_operation_get_embed_page_setup (GtkPrintOperation *op); | |
| 190 | gint gtk_print_operation_get_n_pages_to_print (GtkPrintOperation *op); | ||
| 190 | 191 | ||
| 191 | 192 | GtkPageSetup *gtk_print_run_page_setup_dialog (GtkWindow *parent, | |
| 192 | 193 | GtkPageSetup *page_setup, |

