mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
Scroll to make the selected printer visible. (#418403, Nickolay V.
2007-03-16 Matthias Clasen <mclasen@redhat.com> * gtk/gtkprintunixdialog.c (printer_added_cb): Scroll to make the selected printer visible. (#418403, Nickolay V. Shmyrev, patch by Christian Persch) svn path=/trunk/; revision=17531
This commit is contained in:
parent
244bbfa043
commit
7a66837a80
@ -1,3 +1,9 @@
|
||||
2007-03-16 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkprintunixdialog.c (printer_added_cb): Scroll to
|
||||
make the selected printer visible. (#418403, Nickolay V. Shmyrev,
|
||||
patch by Christian Persch)
|
||||
|
||||
2007-03-15 Federico Mena Quintero <federico@novell.com>
|
||||
|
||||
Merged from gtk-2-10:
|
||||
|
@ -427,6 +427,7 @@ printer_added_cb (GtkPrintBackend *backend,
|
||||
GtkPrintUnixDialogPrivate *priv = dialog->priv;
|
||||
GtkTreeIter iter, filter_iter;
|
||||
GtkTreeSelection *selection;
|
||||
GtkTreePath *path;
|
||||
|
||||
gtk_list_store_append (GTK_LIST_STORE (priv->printer_list), &iter);
|
||||
|
||||
@ -446,6 +447,7 @@ printer_added_cb (GtkPrintBackend *backend,
|
||||
|
||||
gtk_tree_model_filter_convert_child_iter_to_iter (priv->printer_list_filter,
|
||||
&filter_iter, &iter);
|
||||
path = gtk_tree_model_get_path (GTK_TREE_MODEL (priv->printer_list_filter), &filter_iter);
|
||||
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->printer_treeview));
|
||||
|
||||
@ -455,6 +457,8 @@ printer_added_cb (GtkPrintBackend *backend,
|
||||
{
|
||||
priv->internal_printer_change = TRUE;
|
||||
gtk_tree_selection_select_iter (selection, &filter_iter);
|
||||
gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (priv->printer_treeview),
|
||||
path, NULL, TRUE, 0.5, 0.0);
|
||||
priv->internal_printer_change = FALSE;
|
||||
g_free (priv->waiting_for_printer);
|
||||
priv->waiting_for_printer = NULL;
|
||||
@ -464,8 +468,12 @@ printer_added_cb (GtkPrintBackend *backend,
|
||||
{
|
||||
priv->internal_printer_change = TRUE;
|
||||
gtk_tree_selection_select_iter (selection, &filter_iter);
|
||||
gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (priv->printer_treeview),
|
||||
path, NULL, TRUE, 0.5, 0.0);
|
||||
priv->internal_printer_change = FALSE;
|
||||
}
|
||||
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user