]> Pileus Git - ~andy/gtk/blobdiff - tests/testtreemodel.c
stylecontext: Do invalidation on first resize container
[~andy/gtk] / tests / testtreemodel.c
index 56b986b3f9dbec0af8b3a12bcd22740d345f6ff2..0c228ea40771b3fcf246a0a939c7167af16854a4 100644 (file)
  * Library General Public License for more details.
  *
  * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
+#include <string.h>
+
 #ifdef HAVE_MALLINFO
 #include <malloc.h>
 #endif
+
 #include <gtk/gtk.h>
 
 static gint repeats = 2;
@@ -187,7 +190,6 @@ tree_store_insert_deep (GtkTreeModel *model,
   GtkTreeIter iter;
   gchar *text;
   FindData data;
-  gint n;
 
   text = g_strdup_printf ("row %d", i);
   data.n = g_random_int_range (0, items);
@@ -195,7 +197,7 @@ tree_store_insert_deep (GtkTreeModel *model,
   data.found = FALSE;
   if (data.n < i)
     gtk_tree_model_foreach (model, find_nth, &data);
-  gtk_tree_store_insert (store, &iter, data.found ? &(data.iter) : NULL, n);
+  gtk_tree_store_insert (store, &iter, data.found ? &(data.iter) : NULL, data.n);
   gtk_tree_store_set (store, &iter, 0, i, 1, text, -1);
   g_free (text);
 }
@@ -207,12 +209,10 @@ test_run (gchar        *title,
          ClearFunc    *clear,
          InsertFunc   *insert)
 {
-  GtkTreeIter iter;
   gint i, k, d, items;
-  gchar *text;
   GTimer *timer;
   gdouble elapsed;
-  int uordblks_before, memused;
+  int uordblks_before = 0, memused;
 
   g_print ("%s (average over %d runs, time in milliseconds)\n"
           "items \ttime      \ttime/item \tused memory\n", title, repeats);
@@ -253,7 +253,6 @@ int
 main (int argc, char *argv[])
 {
   GtkTreeModel *model;
-  GOptionContext *context;
   
   gtk_init_with_args (&argc, &argv, NULL, entries, NULL, NULL);