Merge branch 'wip/corey/print-crash' into 'main'
printunixdialog: Set selection after list view item created Closes #7109 See merge request GNOME/gtk!7880
This commit is contained in:
@@ -892,8 +892,6 @@ gtk_print_unix_dialog_init (GtkPrintUnixDialog *dialog)
|
||||
|
||||
selection = G_LIST_MODEL (gtk_single_selection_new (NULL));
|
||||
gtk_single_selection_set_autoselect (GTK_SINGLE_SELECTION (selection), FALSE);
|
||||
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);
|
||||
|
||||
@@ -901,6 +899,9 @@ gtk_print_unix_dialog_init (GtkPrintUnixDialog *dialog)
|
||||
|
||||
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);
|
||||
|
||||
g_object_unref (selection);
|
||||
|
||||
gtk_print_load_custom_papers (dialog->custom_paper_list);
|
||||
|
Reference in New Issue
Block a user