Re-select the current printer to update per-printer ui. (#348245, Don

2006-08-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintunixdialog.c (gtk_print_unix_dialog_set_manual_capabilities):
	Re-select the current printer to update per-printer ui.
	(#348245, Don Scorgie)
This commit is contained in:
Matthias Clasen 2006-08-17 04:48:39 +00:00 committed by Matthias Clasen
parent 23b37da67d
commit 2b2b742048
3 changed files with 25 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2006-08-17 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprintunixdialog.c (gtk_print_unix_dialog_set_manual_capabilities):
Re-select the current printer to update per-printer ui.
(#348245, Don Scorgie)
* gtk/gtkfilechooserbutton.c (set_info_get_info_cb)
(model_add_special_get_info_cb): Handle the case where the
filechooser button is destroyed quickly.

View File

@ -1,5 +1,9 @@
2006-08-17 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprintunixdialog.c (gtk_print_unix_dialog_set_manual_capabilities):
Re-select the current printer to update per-printer ui.
(#348245, Don Scorgie)
* gtk/gtkfilechooserbutton.c (set_info_get_info_cb)
(model_add_special_get_info_cb): Handle the case where the
filechooser button is destroyed quickly.

View File

@ -2732,8 +2732,24 @@ void
gtk_print_unix_dialog_set_manual_capabilities (GtkPrintUnixDialog *dialog,
GtkPrintCapabilities capabilities)
{
dialog->priv->manual_capabilities = capabilities;
GtkPrintUnixDialogPrivate *priv = dialog->priv;
g_print ("set caps %d\n", capabilities);
priv->manual_capabilities = capabilities;
update_dialog_from_capabilities (dialog);
if (priv->current_printer)
{
GtkTreeSelection *selection;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->printer_treeview));
g_object_unref (priv->current_printer);
priv->current_printer = NULL;
priv->internal_printer_change = TRUE;
selected_printer_changed (selection, dialog);
priv->internal_printer_change = FALSE;
}
}
#define __GTK_PRINT_UNIX_DIALOG_C__