diff src/collect.c @ 1367:fe4da037be21

When g_new0() is used, drop redundant initializations to NULL, FALSE or 0, second pass.
author zas_
date Sun, 01 Mar 2009 23:14:19 +0000
parents 79937bc55f3a
children 3a9fb1b52559
line wrap: on
line diff
--- a/src/collect.c	Sun Mar 01 21:35:18 2009 +0000
+++ b/src/collect.c	Sun Mar 01 23:14:19 2009 +0000
@@ -323,23 +323,10 @@
 
 	cd = g_new0(CollectionData, 1);
 
-	collection_list = g_list_append(collection_list, cd);
-
 	cd->ref = 1;	/* starts with a ref of 1 */
-
-	cd->list = NULL;
 	cd->sort_method = SORT_NONE;
-	cd->thumb_loader = NULL;
-	cd->info_updated_func = NULL;
-
-	cd->window_read = FALSE;
-	cd->window_x = 0;
-	cd->window_y = 0;
 	cd->window_w = COLLECT_DEF_WIDTH;
 	cd->window_h = COLLECT_DEF_HEIGHT;
-
-	cd->changed = FALSE;
-
 	cd->existence = g_hash_table_new(NULL, NULL);
 
 	if (path)
@@ -350,8 +337,6 @@
 		}
 	else
 		{
-		cd->path = NULL;
-
 		if (untitled_counter == 0)
 			{
 			cd->name = g_strdup(_("Untitled"));
@@ -366,6 +351,9 @@
 
 	file_data_register_notify_func(collection_notify_cb, cd, NOTIFY_PRIORITY_MEDIUM);
 
+
+	collection_list = g_list_append(collection_list, cd);
+	
 	return cd;
 }
 
@@ -1183,8 +1171,6 @@
 
 	cw = g_new0(CollectWindow, 1);
 
-	cw->close_dialog = NULL;
-
 	collection_window_list = g_list_append(collection_window_list, cw);
 
 	cw->cd = collection_new(path);