From 8a94538efe74a0aa5dc521cd06e139332f5c259c Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Wed, 28 Jul 2004 19:35:36 +0000 Subject: [PATCH] removed a redundant parameter from one of the internal functions. Made * plug-ins/gimpressionist/brush.c: removed a redundant parameter from one of the internal functions. * plug-ins/gimpressionist/utils.c: Made sure that resources that are selected by the presets will position their list views accordingly. --- ChangeLog | 8 ++++++++ plug-ins/gimpressionist/brush.c | 6 +++--- plug-ins/gimpressionist/utils.c | 10 ++++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b9778bdfb..7584a2ccaa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-07-28 Shlomi Fish + + * plug-ins/gimpressionist/brush.c: removed a redundant parameter + from one of the internal functions. + * plug-ins/gimpressionist/utils.c: Made sure that resources that + are selected by the presets will position their list views + accordingly. + 2004-07-28 Sven Neumann * autogen.sh: if the check for libtoolize fails, try glibtoolize. diff --git a/plug-ins/gimpressionist/brush.c b/plug-ins/gimpressionist/brush.c index d44a20ff07..04620f9c13 100644 --- a/plug-ins/gimpressionist/brush.c +++ b/plug-ins/gimpressionist/brush.c @@ -346,7 +346,7 @@ update_brush_preview (const gchar *fn) static gboolean brush_dont_update = FALSE; static void -brush_select (GtkTreeSelection *selection, gpointer data) +brush_select (GtkTreeSelection *selection) { GtkTreeIter iter; GtkTreeModel *model; @@ -413,7 +413,7 @@ brush_select_file (GtkTreeSelection *selection, gpointer data) { brush_from_file = 1; preset_save_button_set_sensitive (TRUE); - brush_select (selection, NULL); + brush_select (selection); } static void @@ -548,7 +548,7 @@ create_brushpage(GtkNotebook *notebook) G_CALLBACK (gimp_double_adjustment_update), &pcvals.brushrelief); - brush_select (selection, NULL); + brush_select (selection); readdirintolist ("Brushes", view, pcvals.selectedbrush); /* diff --git a/plug-ins/gimpressionist/utils.c b/plug-ins/gimpressionist/utils.c index 5c9cd7c8ff..f23df2cfde 100644 --- a/plug-ins/gimpressionist/utils.c +++ b/plug-ins/gimpressionist/utils.c @@ -208,7 +208,17 @@ reselect (GtkWidget *view, gtk_tree_model_get (model, &iter, 0, &name, -1); if (!strcmp(name, fname)) { + GtkTreePath *tree_path; gtk_tree_selection_select_iter (selection, &iter); + tree_path = gtk_tree_model_get_path (model, + &iter); + gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (view), + tree_path, + NULL, + TRUE, + 0.5, + 0.5); + gtk_tree_path_free (tree_path); quit = TRUE; } g_free (name);