mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
print dialog: Fix initial selection
This broke with recent fixes to GtkSingleSelection. Fixes: #6996
This commit is contained in:
parent
97a2c3a656
commit
b807b84e16
@ -887,12 +887,17 @@ gtk_print_unix_dialog_init (GtkPrintUnixDialog *dialog)
|
||||
|
||||
filtered = G_LIST_MODEL (gtk_filter_list_model_new (sorted, filter));
|
||||
|
||||
selection = G_LIST_MODEL (gtk_single_selection_new (filtered));
|
||||
selection = G_LIST_MODEL (gtk_single_selection_new (NULL));
|
||||
gtk_single_selection_set_autoselect (GTK_SINGLE_SELECTION (selection), FALSE);
|
||||
gtk_single_selection_set_selected (GTK_SINGLE_SELECTION (selection), GTK_INVALID_LIST_POSITION);
|
||||
gtk_column_view_set_model (GTK_COLUMN_VIEW (dialog->printer_list), GTK_SELECTION_MODEL (selection));
|
||||
g_signal_connect (selection, "items-changed", G_CALLBACK (printer_added_cb), dialog);
|
||||
g_signal_connect_swapped (selection, "notify::selected", G_CALLBACK (selected_printer_changed), dialog);
|
||||
|
||||
gtk_single_selection_set_model (GTK_SINGLE_SELECTION (selection), filtered);
|
||||
|
||||
g_object_unref (filtered);
|
||||
|
||||
gtk_column_view_set_model (GTK_COLUMN_VIEW (dialog->printer_list), GTK_SELECTION_MODEL (selection));
|
||||
|
||||
g_object_unref (selection);
|
||||
|
||||
gtk_print_load_custom_papers (dialog->custom_paper_list);
|
||||
|
Loading…
Reference in New Issue
Block a user