diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-03-04 20:35:09 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-03-04 20:37:01 -0500 |
commit | 768e6a45796aec32bbc2119e5742ac2332b1c084 (patch) | |
tree | fe1a40bb2e8bdf14341fa7c7f5565c4ecd5d168b /gtk/gtkprintunixdialog.c | |
parent | ce9a5a3fecd10acc464252c21de8a3a92ea013e1 (diff) | |
download | gtk+-768e6a45796aec32bbc2119e5742ac2332b1c084.tar.gz |
Ensure print-related types are registered
These types are not covered by g_test_register_all_types,
and having the types registered when a print dialog is used
helps in cases where GTK+ is dlopened.
https://bugzilla.gnome.org/show_bug.cgi?id=745065
Diffstat (limited to 'gtk/gtkprintunixdialog.c')
-rw-r--r-- | gtk/gtkprintunixdialog.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c index 06cb4b6fe6..e1c19bc6e9 100644 --- a/gtk/gtkprintunixdialog.c +++ b/gtk/gtkprintunixdialog.c @@ -726,6 +726,11 @@ gtk_print_unix_dialog_init (GtkPrintUnixDialog *dialog) priv->support_selection = FALSE; priv->has_selection = FALSE; + g_type_ensure (GTK_TYPE_PRINTER); + g_type_ensure (GTK_TYPE_PRINTER_OPTION); + g_type_ensure (GTK_TYPE_PRINTER_OPTION_SET); + g_type_ensure (GTK_TYPE_PRINTER_OPTION_WIDGET); + gtk_widget_init_template (GTK_WIDGET (dialog)); gtk_dialog_set_use_header_bar_from_setting (GTK_DIALOG (dialog)); gtk_dialog_add_buttons (GTK_DIALOG (dialog), @@ -737,7 +742,7 @@ gtk_print_unix_dialog_init (GtkPrintUnixDialog *dialog) widget = gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); gtk_widget_set_sensitive (widget, FALSE); - /* Treeview auxilary functions need to be setup here */ + /* Treeview auxiliary functions need to be setup here */ gtk_tree_model_filter_set_visible_func (priv->printer_list_filter, (GtkTreeModelFilterVisibleFunc) is_printer_active, dialog, |