From 2b2b742048544f2094b2d365adc43a890c9953f3 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 17 Aug 2006 04:48:39 +0000 Subject: [PATCH] Re-select the current printer to update per-printer ui. (#348245, Don 2006-08-17 Matthias Clasen * gtk/gtkprintunixdialog.c (gtk_print_unix_dialog_set_manual_capabilities): Re-select the current printer to update per-printer ui. (#348245, Don Scorgie) --- ChangeLog | 4 ++++ ChangeLog.pre-2-10 | 4 ++++ gtk/gtkprintunixdialog.c | 18 +++++++++++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 02ce3e26ac..c4e4e815cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-08-17 Matthias Clasen + * 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. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 02ce3e26ac..c4e4e815cb 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,9 @@ 2006-08-17 Matthias Clasen + * 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. diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c index 722232eb67..220e6a2875 100644 --- a/gtk/gtkprintunixdialog.c +++ b/gtk/gtkprintunixdialog.c @@ -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__