X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkprintunixdialog.c;h=e709d1fbae51ba06557ba5274df63d2d15a819e5;hb=9d0febc9a64a5bfb0fcfc3a88de4757f6c1ff090;hp=2d61cdac31f45cdb8c02c7cd5de422da2ad5966f;hpb=98440ad03190396bd2bef02557f8d41e12dd5795;p=~andy%2Fgtk diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c index 2d61cdac3..e709d1fba 100644 --- a/gtk/gtkprintunixdialog.c +++ b/gtk/gtkprintunixdialog.c @@ -14,9 +14,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ #include "config.h" @@ -48,10 +46,9 @@ #include "gtktogglebutton.h" #include "gtkradiobutton.h" #include "gtkdrawingarea.h" -#include "gtkvbox.h" -#include "gtktable.h" +#include "gtkbox.h" +#include "gtkgrid.h" #include "gtkframe.h" -#include "gtkalignment.h" #include "gtklabel.h" #include "gtkeventbox.h" #include "gtkbuildable.h" @@ -61,6 +58,77 @@ #include "gtkprivate.h" #include "gtktypebuiltins.h" + +/** + * SECTION:gtkprintunixdialog + * @Short_description: A print dialog + * @Title: GtkPrintUnixDialog + * @See_also: #GtkPageSetupUnixDialog, #GtkPrinter, #GtkPrintJob + * + * GtkPrintUnixDialog implements a print dialog for platforms + * which don't provide a native print dialog, like Unix. It can + * be used very much like any other GTK+ dialog, at the cost of + * the portability offered by the + * high-level printing API + * + * In order to print something with #GtkPrintUnixDialog, you need + * to use gtk_print_unix_dialog_get_selected_printer() to obtain + * a #GtkPrinter object and use it to construct a #GtkPrintJob using + * gtk_print_job_new(). + * + * #GtkPrintUnixDialog uses the following response values: + * + * %GTK_RESPONSE_OK + * for the "Print" button + * + * %GTK_RESPONSE_APPLY + * for the "Preview" button + * + * %GTK_RESPONSE_CANCEL + * for the "Cancel" button + * + * + * + * + * + * Printing support was added in GTK+ 2.10. + * + * + * GtkPrintUnixDialog as GtkBuildable + * + * The GtkPrintUnixDialog implementation of the GtkBuildable interface exposes its + * @notebook internal children with the name "notebook". + * + * + * A <structname>GtkPrintUnixDialog</structname> UI definition fragment. + * + * + * + * + * + * Content on notebook tab + * + * + * + * + * Tab label + * + * + * False + * False + * + * + * + * + * + * ]]> + * + * + * + */ + + #define EXAMPLE_PAGE_AREA_SIZE 110 #define RULER_DISTANCE 7.5 #define RULER_RADIUS 2 @@ -76,8 +144,7 @@ static void gtk_print_unix_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gtk_print_unix_dialog_style_set (GtkWidget *widget, - GtkStyle *previous_style); +static void gtk_print_unix_dialog_style_updated (GtkWidget *widget); static void populate_dialog (GtkPrintUnixDialog *dialog); static void unschedule_idle_mark_conflicts (GtkPrintUnixDialog *dialog); static void selected_printer_changed (GtkTreeSelection *selection, @@ -291,7 +358,7 @@ gtk_print_unix_dialog_class_init (GtkPrintUnixDialogClass *class) object_class->set_property = gtk_print_unix_dialog_set_property; object_class->get_property = gtk_print_unix_dialog_get_property; - widget_class->style_set = gtk_print_unix_dialog_style_set; + widget_class->style_updated = gtk_print_unix_dialog_style_updated; g_object_class_install_property (object_class, PROP_PAGE_SETUP, @@ -775,13 +842,11 @@ void set_cell_sensitivity_func (GtkTreeViewColumn *tree_column, gtk_tree_model_get (tree_model, iter, PRINTER_LIST_COL_PRINTER_OBJ, &printer, -1); if (printer != NULL && !gtk_printer_is_accepting_jobs (printer)) - g_object_set (cell, - "sensitive", FALSE, - NULL); + g_object_set (cell, "sensitive", FALSE, NULL); else - g_object_set (cell, - "sensitive", TRUE, - NULL); + g_object_set (cell, "sensitive", TRUE, NULL); + + g_object_unref (printer); } static void @@ -1010,10 +1075,8 @@ is_printer_active (GtkTreeModel *model, GtkPrinter *printer; GtkPrintUnixDialogPrivate *priv = dialog->priv; - gtk_tree_model_get (model, - iter, - PRINTER_LIST_COL_PRINTER_OBJ, - &printer, + gtk_tree_model_get (model, iter, + PRINTER_LIST_COL_PRINTER_OBJ, &printer, -1); if (printer == NULL) @@ -1083,8 +1146,10 @@ default_printer_list_sort_func (GtkTreeModel *model, g_free (a_name); g_free (b_name); - g_object_unref (a_printer); - g_object_unref (b_printer); + if (a_printer) + g_object_unref (a_printer); + if (b_printer) + g_object_unref (b_printer); return result; } @@ -1130,11 +1195,12 @@ static GtkWidget * wrap_in_frame (const gchar *label, GtkWidget *child) { - GtkWidget *frame, *alignment, *label_widget; + GtkWidget *frame, *label_widget; gchar *bold_text; label_widget = gtk_label_new (NULL); - gtk_misc_set_alignment (GTK_MISC (label_widget), 0.0, 0.5); + gtk_widget_set_halign (label_widget, GTK_ALIGN_START); + gtk_widget_set_valign (label_widget, GTK_ALIGN_CENTER); gtk_widget_show (label_widget); bold_text = g_markup_printf_escaped ("%s", label); @@ -1144,15 +1210,13 @@ wrap_in_frame (const gchar *label, frame = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); gtk_box_pack_start (GTK_BOX (frame), label_widget, FALSE, FALSE, 0); - alignment = gtk_alignment_new (0.0, 0.0, 1.0, 1.0); - gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), - 0, 0, 12, 0); - gtk_box_pack_start (GTK_BOX (frame), alignment, FALSE, FALSE, 0); + gtk_widget_set_margin_left (child, 12); + gtk_widget_set_halign (child, GTK_ALIGN_FILL); + gtk_widget_set_valign (child, GTK_ALIGN_FILL); - gtk_container_add (GTK_CONTAINER (alignment), child); + gtk_box_pack_start (GTK_BOX (frame), child, FALSE, FALSE, 0); gtk_widget_show (frame); - gtk_widget_show (alignment); return frame; } @@ -1187,7 +1251,8 @@ add_option_to_extension_point (GtkPrinterOption *option, label = gtk_printer_option_widget_get_external_label (GTK_PRINTER_OPTION_WIDGET (widget)); gtk_widget_show (label); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); @@ -1201,42 +1266,70 @@ add_option_to_extension_point (GtkPrinterOption *option, gtk_box_pack_start (GTK_BOX (extension_point), widget, FALSE, FALSE, 0); } +static gint +grid_rows (GtkGrid *table) +{ + gint t0, t1, t, h; + GList *children, *c; + + children = gtk_container_get_children (GTK_CONTAINER (table)); + t0 = t1 = 0; + for (c = children; c; c = c->next) + { + gtk_container_child_get (GTK_CONTAINER (table), c->data, + "top-attach", &t, + "height", &h, + NULL); + if (c == children) + { + t0 = t; + t1 = t + h; + } + else + { + if (t < t0) + t0 = t; + if (t + h > t1) + t1 = t + h; + } + } + g_list_free (children); + + return t1 - t0; +} + static void add_option_to_table (GtkPrinterOption *option, gpointer user_data) { - GtkTable *table; + GtkGrid *table; GtkWidget *label, *widget; guint row; - table = GTK_TABLE (user_data); + table = GTK_GRID (user_data); if (g_str_has_prefix (option->name, "gtk-")) return; + row = grid_rows (table); + widget = gtk_printer_option_widget_new (option); gtk_widget_show (widget); - gtk_table_get_size (table, &row, NULL); - gtk_table_resize (table, row + 1, 2); - if (gtk_printer_option_widget_has_external_label (GTK_PRINTER_OPTION_WIDGET (widget))) { label = gtk_printer_option_widget_get_external_label (GTK_PRINTER_OPTION_WIDGET (widget)); gtk_widget_show (label); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); - gtk_table_attach (table, label, - 0, 1, row - 1 , row, GTK_FILL, 0, 0, 0); - - gtk_table_attach (table, widget, - 1, 2, row - 1, row, GTK_FILL, 0, 0, 0); + gtk_grid_attach (table, label, 0, row - 1, 1, 1); + gtk_grid_attach (table, widget, 1, row - 1, 1, 1); } else - gtk_table_attach (table, widget, - 0, 2, row - 1, row, GTK_FILL, 0, 0, 0); + gtk_grid_attach (table, widget, 0, row - 1, 2, 1); } static void @@ -1245,14 +1338,14 @@ setup_page_table (GtkPrinterOptionSet *options, GtkWidget *table, GtkWidget *page) { - guint nrows; + gint nrows; gtk_printer_option_set_foreach_in_group (options, group, add_option_to_table, table); - gtk_table_get_size (GTK_TABLE (table), &nrows, NULL); - if (nrows == 1) + nrows = grid_rows (GTK_GRID (table)); + if (nrows == 0) gtk_widget_hide (page); else gtk_widget_show (page); @@ -1416,17 +1509,17 @@ update_dialog_from_settings (GtkPrintUnixDialog *dialog) strcmp (group, "GtkPrintDialogExtension") == 0) continue; - table = gtk_table_new (1, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); + table = gtk_grid_new (); + gtk_grid_set_row_spacing (GTK_GRID (table), 6); + gtk_grid_set_column_spacing (GTK_GRID (table), 12); gtk_printer_option_set_foreach_in_group (priv->options, group, add_option_to_table, table); - gtk_table_get_size (GTK_TABLE (table), &nrows, NULL); - if (nrows == 1) + nrows = grid_rows (GTK_GRID (table)); + if (nrows == 0) gtk_widget_destroy (table); else { @@ -1445,8 +1538,7 @@ update_dialog_from_settings (GtkPrintUnixDialog *dialog) else gtk_widget_hide (priv->advanced_page); - g_list_foreach (groups, (GFunc) g_free, NULL); - g_list_free (groups); + g_list_free_full (groups, g_free); } static void @@ -1777,20 +1869,13 @@ clear_per_printer_ui (GtkPrintUnixDialog *dialog) GtkPrintUnixDialogPrivate *priv = dialog->priv; gtk_container_foreach (GTK_CONTAINER (priv->finishing_table), - (GtkCallback)gtk_widget_destroy, - NULL); - gtk_table_resize (GTK_TABLE (priv->finishing_table), 1, 2); + (GtkCallback)gtk_widget_destroy, NULL); gtk_container_foreach (GTK_CONTAINER (priv->image_quality_table), - (GtkCallback)gtk_widget_destroy, - NULL); - gtk_table_resize (GTK_TABLE (priv->image_quality_table), 1, 2); + (GtkCallback)gtk_widget_destroy, NULL); gtk_container_foreach (GTK_CONTAINER (priv->color_table), - (GtkCallback)gtk_widget_destroy, - NULL); - gtk_table_resize (GTK_TABLE (priv->color_table), 1, 2); + (GtkCallback)gtk_widget_destroy, NULL); gtk_container_foreach (GTK_CONTAINER (priv->advanced_vbox), - (GtkCallback)gtk_widget_destroy, - NULL); + (GtkCallback)gtk_widget_destroy, NULL); extension_point_clear_children (GTK_CONTAINER (priv->extension_point)); } @@ -1898,7 +1983,7 @@ selected_printer_changed (GtkTreeSelection *selection, priv->printer_capabilities = 0; - if (gtk_printer_is_accepting_jobs (printer)) + if (printer != NULL && gtk_printer_is_accepting_jobs (printer)) gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, TRUE); priv->current_printer = printer; @@ -1960,9 +2045,10 @@ paint_page (GtkWidget *widget, gchar *text, gint text_x) { - GtkStyle *style; + GtkStyleContext *context; gint x, y, width, height; gint text_y, linewidth; + GdkRGBA color; x = x_offset * scale; y = y_offset * scale; @@ -1972,13 +2058,18 @@ paint_page (GtkWidget *widget, linewidth = 2; text_y = 21; - style = gtk_widget_get_style (widget); + context = gtk_widget_get_style_context (widget); - gdk_cairo_set_source_color (cr, &style->base[GTK_STATE_NORMAL]); + gtk_style_context_save (context); + gtk_style_context_add_class (context, GTK_STYLE_CLASS_VIEW); + + gtk_style_context_get_background_color (context, 0, &color); + gdk_cairo_set_source_rgba (cr, &color); cairo_rectangle (cr, x, y, width, height); cairo_fill (cr); - gdk_cairo_set_source_color (cr, &style->text[GTK_STATE_NORMAL]); + gtk_style_context_get_color (context, 0, &color); + gdk_cairo_set_source_rgba (cr, &color); cairo_set_line_width (cr, linewidth); cairo_rectangle (cr, x + linewidth/2.0, y + linewidth/2.0, width - linewidth, height - linewidth); cairo_stroke (cr); @@ -1989,6 +2080,8 @@ paint_page (GtkWidget *widget, cairo_set_font_size (cr, (gint)(9 * scale)); cairo_move_to (cr, x + (gint)(text_x * scale), y + (gint)(text_y * scale)); cairo_show_text (cr, text); + + gtk_style_context_restore (context); } static gboolean @@ -2035,10 +2128,9 @@ draw_collate_cb (GtkWidget *widget, } static void -gtk_print_unix_dialog_style_set (GtkWidget *widget, - GtkStyle *previous_style) +gtk_print_unix_dialog_style_updated (GtkWidget *widget) { - GTK_WIDGET_CLASS (gtk_print_unix_dialog_parent_class)->style_set (widget, previous_style); + GTK_WIDGET_CLASS (gtk_print_unix_dialog_parent_class)->style_updated (widget); if (gtk_widget_has_screen (widget)) { @@ -2181,10 +2273,10 @@ create_main_page (GtkPrintUnixDialog *dialog) gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0); - table = gtk_table_new (4, 2, FALSE); + table = gtk_grid_new (); priv->range_table = table; - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); + gtk_grid_set_row_spacing (GTK_GRID (table), 6); + gtk_grid_set_column_spacing (GTK_GRID (table), 12); frame = wrap_in_frame (_("Range"), table); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); gtk_widget_show (table); @@ -2192,28 +2284,21 @@ create_main_page (GtkPrintUnixDialog *dialog) radio = gtk_radio_button_new_with_mnemonic (NULL, _("_All Pages")); priv->all_pages_radio = radio; gtk_widget_show (radio); - gtk_table_attach (GTK_TABLE (table), radio, - 0, 2, 0, 1, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), radio, 0, 0, 2, 1); radio = gtk_radio_button_new_with_mnemonic (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)), _("C_urrent Page")); if (priv->current_page == -1) gtk_widget_set_sensitive (radio, FALSE); priv->current_page_radio = radio; gtk_widget_show (radio); - gtk_table_attach (GTK_TABLE (table), radio, - 0, 2, 1, 2, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), radio, 0, 1, 2, 1); radio = gtk_radio_button_new_with_mnemonic (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)), _("Se_lection")); gtk_widget_set_sensitive (radio, priv->has_selection); priv->selection_radio = radio; - gtk_table_attach (GTK_TABLE (table), radio, - 0, 2, 2, 3, GTK_FILL, 0, - 0, 0); - gtk_table_set_row_spacing (GTK_TABLE (table), 2, 0); + gtk_grid_attach (GTK_GRID (table), radio, 0, 2, 2, 1); radio = gtk_radio_button_new_with_mnemonic (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)), _("Pag_es:")); range_tooltip = _("Specify one or more page ranges,\n e.g. 1-3,7,11"); @@ -2221,41 +2306,36 @@ create_main_page (GtkPrintUnixDialog *dialog) priv->page_range_radio = radio; gtk_widget_show (radio); - gtk_table_attach (GTK_TABLE (table), radio, - 0, 1, 3, 4, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), radio, 0, 3, 1, 1); entry = gtk_entry_new (); gtk_widget_set_tooltip_text (entry, range_tooltip); + gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE); atk_object_set_name (gtk_widget_get_accessible (entry), _("Pages")); atk_object_set_description (gtk_widget_get_accessible (entry), range_tooltip); priv->page_range_entry = entry; gtk_widget_show (entry); - gtk_table_attach (GTK_TABLE (table), entry, - 1, 2, 3, 4, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), entry, 1, 3, 1, 1); g_signal_connect (radio, "toggled", G_CALLBACK (update_entry_sensitivity), entry); update_entry_sensitivity (radio, entry); - table = gtk_table_new (3, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); + table = gtk_grid_new (); + gtk_grid_set_row_spacing (GTK_GRID (table), 6); + gtk_grid_set_column_spacing (GTK_GRID (table), 12); frame = wrap_in_frame (_("Copies"), table); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); gtk_widget_show (table); /* FIXME chpe: too much space between Copies and spinbutton, put those 2 in a hbox and make it span 2 columns */ label = gtk_label_new_with_mnemonic (_("Copie_s:")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, - 0, 1, 0, 1, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1); spinbutton = gtk_spin_button_new_with_range (1.0, 100.0, 1.0); + gtk_entry_set_activates_default (GTK_ENTRY (spinbutton), TRUE); priv->copies_spin = spinbutton; gtk_widget_show (spinbutton); - gtk_table_attach (GTK_TABLE (table), spinbutton, - 1, 2, 0, 1, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), spinbutton, 1, 0, 1, 1); gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton); g_signal_connect_swapped (spinbutton, "value-changed", G_CALLBACK (update_dialog_from_capabilities), dialog); @@ -2266,17 +2346,13 @@ create_main_page (GtkPrintUnixDialog *dialog) priv->collate_check = check; g_signal_connect (check, "toggled", G_CALLBACK (update_collate_icon), dialog); gtk_widget_show (check); - gtk_table_attach (GTK_TABLE (table), check, - 0, 1, 1, 2, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), check, 0, 1, 1, 1); check = gtk_check_button_new_with_mnemonic (_("_Reverse")); g_signal_connect (check, "toggled", G_CALLBACK (update_collate_icon), dialog); priv->reverse_check = check; gtk_widget_show (check); - gtk_table_attach (GTK_TABLE (table), check, - 0, 1, 2, 3, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), check, 0, 2, 1, 1); image = gtk_drawing_area_new (); gtk_widget_set_has_window (image, FALSE); @@ -2284,9 +2360,7 @@ create_main_page (GtkPrintUnixDialog *dialog) priv->collate_image = image; gtk_widget_show (image); gtk_widget_set_size_request (image, 70, 90); - gtk_table_attach (GTK_TABLE (table), image, - 1, 2, 1, 3, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), image, 1, 1, 1, 2); g_signal_connect (image, "draw", G_CALLBACK (draw_collate_cb), dialog); @@ -2589,7 +2663,7 @@ draw_page_cb (GtkWidget *widget, GtkPrintUnixDialog *dialog) { GtkPrintUnixDialogPrivate *priv = dialog->priv; - GtkStyle *style; + GtkStyleContext *context; gdouble ratio; gint w, h, tmp, shadow_offset; gint pages_x, pages_y, i, x, y, layout_w, layout_h; @@ -2599,7 +2673,7 @@ draw_page_cb (GtkWidget *widget, PangoLayout *layout; PangoFontDescription *font; gchar *text; - GdkColor *color; + GdkRGBA color; GtkNumberUpLayout number_up_layout; gint start_x, end_x, start_y, end_y; gint dx, dy; @@ -2698,7 +2772,10 @@ draw_page_cb (GtkWidget *widget, pages_y = tmp; } - style = gtk_widget_get_style (widget); + context = gtk_widget_get_style_context (widget); + + gtk_style_context_save (context); + gtk_style_context_add_class (context, GTK_STYLE_CLASS_VIEW); pos_x = (width - w) / 2; pos_y = (height - h) / 2 - 10; @@ -2706,18 +2783,20 @@ draw_page_cb (GtkWidget *widget, shadow_offset = 3; - color = &style->text[GTK_STATE_NORMAL]; - cairo_set_source_rgba (cr, color->red / 65535., color->green / 65535., color->blue / 65535, 0.5); + gtk_style_context_get_color (context, 0, &color); + cairo_set_source_rgba (cr, color.red, color.green, color.blue, 0.5); cairo_rectangle (cr, shadow_offset + 1, shadow_offset + 1, w, h); cairo_fill (cr); - gdk_cairo_set_source_color (cr, &style->base[GTK_STATE_NORMAL]); + gtk_style_context_get_background_color (context, 0, &color); + gdk_cairo_set_source_rgba (cr, &color); cairo_rectangle (cr, 1, 1, w, h); cairo_fill (cr); cairo_set_line_width (cr, 1.0); cairo_rectangle (cr, 0.5, 0.5, w + 1, h + 1); - gdk_cairo_set_source_color (cr, &style->text[GTK_STATE_NORMAL]); + gtk_style_context_get_color (context, 0, &color); + gdk_cairo_set_source_rgba (cr, &color); cairo_stroke (cr); i = 1; @@ -2985,6 +3064,8 @@ draw_page_cb (GtkWidget *widget, cairo_stroke (cr); } + gtk_style_context_restore (context); + return TRUE; } @@ -3310,74 +3391,62 @@ create_page_setup_page (GtkPrintUnixDialog *dialog) gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0); - table = gtk_table_new (5, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); + table = gtk_grid_new (); + gtk_grid_set_row_spacing (GTK_GRID (table), 6); + gtk_grid_set_column_spacing (GTK_GRID (table), 12); frame = wrap_in_frame (_("Layout"), table); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); gtk_widget_show (table); label = gtk_label_new_with_mnemonic (_("T_wo-sided:")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, - 0, 1, 0, 1, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1); widget = gtk_printer_option_widget_new (NULL); priv->duplex = GTK_PRINTER_OPTION_WIDGET (widget); gtk_widget_show (widget); - gtk_table_attach (GTK_TABLE (table), widget, - 1, 2, 0, 1, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), widget, 1, 0, 1, 1); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new_with_mnemonic (_("Pages per _side:")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, - 0, 1, 1, 2, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), label, 0, 1, 1, 1); widget = gtk_printer_option_widget_new (NULL); g_signal_connect_swapped (widget, "changed", G_CALLBACK (redraw_page_layout_preview), dialog); g_signal_connect_swapped (widget, "changed", G_CALLBACK (update_number_up_layout), dialog); priv->pages_per_sheet = GTK_PRINTER_OPTION_WIDGET (widget); gtk_widget_show (widget); - gtk_table_attach (GTK_TABLE (table), widget, - 1, 2, 1, 2, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), widget, 1, 1, 1, 1); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new_with_mnemonic (_("Page or_dering:")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, - 0, 1, 2, 3, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), label, 0, 2, 1, 1); widget = gtk_printer_option_widget_new (NULL); g_signal_connect_swapped (widget, "changed", G_CALLBACK (redraw_page_layout_preview), dialog); priv->number_up_layout = GTK_PRINTER_OPTION_WIDGET (widget); gtk_widget_show (widget); - gtk_table_attach (GTK_TABLE (table), widget, - 1, 2, 2, 3, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), widget, 1, 2, 1, 1); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new_with_mnemonic (_("_Only print:")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, - 0, 1, 3, 4, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), label, 0, 3, 1, 1); combo = gtk_combo_box_text_new (); priv->page_set_combo = combo; gtk_widget_show (combo); - gtk_table_attach (GTK_TABLE (table), combo, - 1, 2, 3, 4, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), combo, 1, 3, 1, 1); gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo); /* In enum order */ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("All sheets")); @@ -3386,17 +3455,14 @@ create_page_setup_page (GtkPrintUnixDialog *dialog) gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0); label = gtk_label_new_with_mnemonic (_("Sc_ale:")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, - 0, 1, 4, 5, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), label, 0, 4, 1, 1); hbox2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); gtk_widget_show (hbox2); - gtk_table_attach (GTK_TABLE (table), hbox2, - 1, 2, 4, 5, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), hbox2, 1, 4, 1, 1); spinbutton = gtk_spin_button_new_with_range (1.0, 1000.0, 1.0); priv->scale_spin = spinbutton; @@ -3409,96 +3475,80 @@ create_page_setup_page (GtkPrintUnixDialog *dialog) gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0); - table = gtk_table_new (4, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); + table = gtk_grid_new (); + gtk_grid_set_row_spacing (GTK_GRID (table), 6); + gtk_grid_set_column_spacing (GTK_GRID (table), 12); frame = wrap_in_frame (_("Paper"), table); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 6); gtk_widget_show (table); label = gtk_label_new_with_mnemonic (_("Paper _type:")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, - 0, 1, 0, 1, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1); widget = gtk_printer_option_widget_new (NULL); priv->paper_type = GTK_PRINTER_OPTION_WIDGET (widget); gtk_widget_show (widget); - gtk_table_attach (GTK_TABLE (table), widget, - 1, 2, 0, 1, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), widget, 1, 0, 1, 1); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new_with_mnemonic (_("Paper _source:")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, - 0, 1, 1, 2, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), label, 0, 1, 1, 1); widget = gtk_printer_option_widget_new (NULL); priv->paper_source = GTK_PRINTER_OPTION_WIDGET (widget); gtk_widget_show (widget); - gtk_table_attach (GTK_TABLE (table), widget, - 1, 2, 1, 2, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), widget, 1, 1, 1, 1); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new_with_mnemonic (_("Output t_ray:")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, - 0, 1, 2, 3, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), label, 0, 2, 1, 1); widget = gtk_printer_option_widget_new (NULL); priv->output_tray = GTK_PRINTER_OPTION_WIDGET (widget); gtk_widget_show (widget); - gtk_table_attach (GTK_TABLE (table), widget, - 1, 2, 2, 3, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), widget, 1, 2, 1, 1); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new_with_mnemonic (_("_Paper size:")); priv->paper_size_combo_label = GTK_WIDGET (label); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, - 0, 1, 3, 4, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), label, 0, 3, 1, 1); combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (priv->page_setup_list)); priv->paper_size_combo = GTK_WIDGET (combo); - gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (combo), + gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (combo), paper_size_row_is_separator, NULL, NULL); cell = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, TRUE); gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo), cell, page_name_func, NULL, NULL); - gtk_table_attach (GTK_TABLE (table), combo, - 1, 2, 3, 4, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), combo, 1, 3, 1, 1); gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo); gtk_widget_set_sensitive (combo, FALSE); gtk_widget_show (combo); - label = gtk_label_new_with_mnemonic (_("Or_ientation:")); priv->orientation_combo_label = GTK_WIDGET (label); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, - 0, 1, 4, 5, - GTK_FILL, 0, 0, 0); + gtk_grid_attach (GTK_GRID (table), label, 0, 4, 1, 1); combo = gtk_combo_box_text_new (); priv->orientation_combo = GTK_WIDGET (combo); - gtk_table_attach (GTK_TABLE (table), combo, - 1, 2, 4, 5, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), combo, 1, 4, 1, 1); gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo); /* In enum order */ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Portrait")); @@ -3541,57 +3591,47 @@ create_job_page (GtkPrintUnixDialog *dialog) const gchar *at_tooltip; const gchar *on_hold_tooltip; - main_table = gtk_table_new (2, 2, FALSE); + main_table = gtk_grid_new (); gtk_container_set_border_width (GTK_CONTAINER (main_table), 12); - gtk_table_set_row_spacings (GTK_TABLE (main_table), 18); - gtk_table_set_col_spacings (GTK_TABLE (main_table), 18); + gtk_grid_set_row_spacing (GTK_GRID (main_table), 18); + gtk_grid_set_column_spacing (GTK_GRID (main_table), 18); - table = gtk_table_new (2, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); + table = gtk_grid_new (); + gtk_grid_set_row_spacing (GTK_GRID (table), 6); + gtk_grid_set_column_spacing (GTK_GRID (table), 12); frame = wrap_in_frame (_("Job Details"), table); - gtk_table_attach (GTK_TABLE (main_table), frame, - 0, 1, 0, 1, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (main_table), frame, 0, 0, 1, 1); gtk_widget_show (table); label = gtk_label_new_with_mnemonic (_("Pri_ority:")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, - 0, 1, 0, 1, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1); widget = gtk_printer_option_widget_new (NULL); priv->job_prio = GTK_PRINTER_OPTION_WIDGET (widget); gtk_widget_show (widget); - gtk_table_attach (GTK_TABLE (table), widget, - 1, 2, 0, 1, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), widget, 1, 0, 1, 1); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); label = gtk_label_new_with_mnemonic (_("_Billing info:")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, - 0, 1, 1, 2, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), label, 0, 1, 1, 1); widget = gtk_printer_option_widget_new (NULL); priv->billing_info = GTK_PRINTER_OPTION_WIDGET (widget); gtk_widget_show (widget); - gtk_table_attach (GTK_TABLE (table), widget, - 1, 2, 1, 2, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), widget, 1, 1, 1, 1); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); - table = gtk_table_new (2, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); + table = gtk_grid_new (); + gtk_grid_set_row_spacing (GTK_GRID (table), 6); + gtk_grid_set_column_spacing (GTK_GRID (table), 12); frame = wrap_in_frame (_("Print Document"), table); - gtk_table_attach (GTK_TABLE (main_table), frame, - 0, 1, 1, 2, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (main_table), frame, 0, 1, 1, 1); gtk_widget_show (table); /* Translators: this is one of the choices for the print at option @@ -3600,9 +3640,7 @@ create_job_page (GtkPrintUnixDialog *dialog) radio = gtk_radio_button_new_with_mnemonic (NULL, _("_Now")); priv->print_now_radio = radio; gtk_widget_show (radio); - gtk_table_attach (GTK_TABLE (table), radio, - 0, 2, 0, 1, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), radio, 0, 0, 2, 1); /* Translators: this is one of the choices for the print at option * in the print dialog. It also serves as the label for an entry that * allows the user to enter a time. @@ -3618,9 +3656,7 @@ create_job_page (GtkPrintUnixDialog *dialog) gtk_widget_set_tooltip_text (radio, at_tooltip); priv->print_at_radio = radio; gtk_widget_show (radio); - gtk_table_attach (GTK_TABLE (table), radio, - 0, 1, 1, 2, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), radio, 0, 1, 1, 1); entry = gtk_entry_new (); gtk_widget_set_tooltip_text (entry, at_tooltip); @@ -3628,9 +3664,7 @@ create_job_page (GtkPrintUnixDialog *dialog) atk_object_set_description (gtk_widget_get_accessible (entry), at_tooltip); priv->print_at_entry = entry; gtk_widget_show (entry); - gtk_table_attach (GTK_TABLE (table), entry, - 1, 2, 1, 2, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), entry, 1, 1, 1, 1); g_signal_connect (radio, "toggled", G_CALLBACK (update_entry_sensitivity), entry); update_entry_sensitivity (radio, entry); @@ -3645,9 +3679,7 @@ create_job_page (GtkPrintUnixDialog *dialog) gtk_widget_set_tooltip_text (radio, on_hold_tooltip); priv->print_hold_radio = radio; gtk_widget_show (radio); - gtk_table_attach (GTK_TABLE (table), radio, - 0, 2, 2, 3, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), radio, 0, 2, 2, 1); g_signal_connect_swapped (priv->print_now_radio, "toggled", G_CALLBACK (update_print_at_option), dialog); @@ -3658,49 +3690,41 @@ create_job_page (GtkPrintUnixDialog *dialog) g_signal_connect_swapped (priv->print_hold_radio, "toggled", G_CALLBACK (update_print_at_option), dialog); - table = gtk_table_new (2, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); + table = gtk_grid_new (); + gtk_grid_set_row_spacing (GTK_GRID (table), 6); + gtk_grid_set_column_spacing (GTK_GRID (table), 12); frame = wrap_in_frame (_("Add Cover Page"), table); - gtk_table_attach (GTK_TABLE (main_table), frame, - 1, 2, 0, 1, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (main_table), frame, 1, 0, 1, 1); gtk_widget_show (table); /* Translators, this is the label used for the option in the print * dialog that controls the front cover page. */ label = gtk_label_new_with_mnemonic (_("Be_fore:")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, - 0, 1, 0, 1, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1); widget = gtk_printer_option_widget_new (NULL); priv->cover_before = GTK_PRINTER_OPTION_WIDGET (widget); gtk_widget_show (widget); - gtk_table_attach (GTK_TABLE (table), widget, - 1, 2, 0, 1, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), widget, 1, 0, 1, 1); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); /* Translators, this is the label used for the option in the print * dialog that controls the back cover page. */ label = gtk_label_new_with_mnemonic (_("_After:")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); gtk_widget_show (label); - gtk_table_attach (GTK_TABLE (table), label, - 0, 1, 1, 2, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), label, 0, 1, 1, 1); widget = gtk_printer_option_widget_new (NULL); priv->cover_after = GTK_PRINTER_OPTION_WIDGET (widget); gtk_widget_show (widget); - gtk_table_attach (GTK_TABLE (table), widget, - 1, 2, 1, 2, GTK_FILL, 0, - 0, 0); + gtk_grid_attach (GTK_GRID (table), widget, 1, 1, 1, 1); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); /* Translators: this is the tab label for the notebook tab containing @@ -3728,9 +3752,9 @@ create_optional_page (GtkPrintUnixDialog *dialog, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); - table = gtk_table_new (1, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); + table = gtk_grid_new (); + gtk_grid_set_row_spacing (GTK_GRID (table), 6); + gtk_grid_set_column_spacing (GTK_GRID (table), 12); gtk_container_set_border_width (GTK_CONTAINER (table), 12); gtk_widget_show (table); @@ -3871,7 +3895,7 @@ gtk_print_unix_dialog_new (const gchar *title, * * Gets the currently selected printer. * - * Returns: the currently selected printer + * Returns: (transfer none): the currently selected printer * * Since: 2.10 */ @@ -3920,7 +3944,7 @@ gtk_print_unix_dialog_set_page_setup (GtkPrintUnixDialog *dialog, * * Gets the page setup that is used by the #GtkPrintUnixDialog. * - * Returns: the page setup of @dialog. + * Returns: (transfer none): the page setup of @dialog. * * Since: 2.10 */ @@ -4246,7 +4270,7 @@ gtk_print_unix_dialog_set_manual_capabilities (GtkPrintUnixDialog *dialog, * gtk_print_unix_dialog_get_manual_capabilities: * @dialog: a #GtkPrintUnixDialog * - * Gets the value of #GtkPrintUnixDialog::manual-capabilities property. + * Gets the value of #GtkPrintUnixDialog:manual-capabilities property. * * Returns: the printing capabilities * @@ -4289,15 +4313,11 @@ gtk_print_unix_dialog_set_support_selection (GtkPrintUnixDialog *dialog, if (support_selection) { gtk_widget_set_sensitive (priv->selection_radio, priv->has_selection); - gtk_table_set_row_spacing (GTK_TABLE (priv->range_table), - 2, - gtk_table_get_default_row_spacing (GTK_TABLE (priv->range_table))); gtk_widget_show (priv->selection_radio); } else { gtk_widget_set_sensitive (priv->selection_radio, FALSE); - gtk_table_set_row_spacing (GTK_TABLE (priv->range_table), 2, 0); gtk_widget_hide (priv->selection_radio); } } @@ -4310,7 +4330,7 @@ gtk_print_unix_dialog_set_support_selection (GtkPrintUnixDialog *dialog, * gtk_print_unix_dialog_get_support_selection: * @dialog: a #GtkPrintUnixDialog * - * Gets the value of #GtkPrintUnixDialog::support-selection property. + * Gets the value of #GtkPrintUnixDialog:support-selection property. * * Returns: whether the application supports print of selection * @@ -4364,7 +4384,7 @@ gtk_print_unix_dialog_set_has_selection (GtkPrintUnixDialog *dialog, * gtk_print_unix_dialog_get_has_selection: * @dialog: a #GtkPrintUnixDialog * - * Gets the value of #GtkPrintUnixDialog::has-selection property. + * Gets the value of #GtkPrintUnixDialog:has-selection property. * * Returns: whether there is a selection * @@ -4432,7 +4452,7 @@ gtk_print_unix_dialog_set_embed_page_setup (GtkPrintUnixDialog *dialog, * gtk_print_unix_dialog_get_embed_page_setup: * @dialog: a #GtkPrintUnixDialog * - * Gets the value of #GtkPrintUnixDialog::embed-page-setup property. + * Gets the value of #GtkPrintUnixDialog:embed-page-setup property. * * Returns: whether there is a selection *