nautilus r14149 - in trunk: . libnautilus-private src



Author: cosimoc
Date: Thu May  8 22:54:59 2008
New Revision: 14149
URL: http://svn.gnome.org/viewvc/nautilus?rev=14149&view=rev

Log:
2008-05-09  Cosimo Cecchi  <cosimoc gnome org>

	* libnautilus-private/nautilus-dnd.c:
	(nautilus_drag_file_local_internal), (nautilus_drag_drag_data_get):
	* libnautilus-private/nautilus-open-with-dialog.c:
	(add_or_find_application):
	* libnautilus-private/nautilus-program-choosing.c:
	(nautilus_launch_application):
	* src/nautilus-sidebar-title.c: (update_icon):
	* src/nautilus-spatial-window.c:
	(got_file_info_for_location_menu_callback):
	* libnautilus-private/nautilus-file.c: (get_custom_icon):
	Plugged some leaks around.
	* libnautilus-private/nautilus-file.c: (is_uri_relative):
	Cleaned up this bit of code.

	Bug #532126.


Modified:
   trunk/ChangeLog
   trunk/libnautilus-private/nautilus-dnd.c
   trunk/libnautilus-private/nautilus-file.c
   trunk/libnautilus-private/nautilus-open-with-dialog.c
   trunk/libnautilus-private/nautilus-program-choosing.c
   trunk/src/nautilus-sidebar-title.c
   trunk/src/nautilus-spatial-window.c

Modified: trunk/libnautilus-private/nautilus-dnd.c
==============================================================================
--- trunk/libnautilus-private/nautilus-dnd.c	(original)
+++ trunk/libnautilus-private/nautilus-dnd.c	Thu May  8 22:54:59 2008
@@ -228,6 +228,8 @@
 		g_object_unref (parent);
 	}
 	
+	g_object_unref (target);
+	
 	return result;
 }	
 
@@ -586,6 +588,7 @@
 	gtk_selection_data_set (selection_data,
 				selection_data->target,
 				8, result->str, result->len);
+	g_string_free (result, TRUE);
 
 	return TRUE;
 }

Modified: trunk/libnautilus-private/nautilus-file.c
==============================================================================
--- trunk/libnautilus-private/nautilus-file.c	(original)
+++ trunk/libnautilus-private/nautilus-file.c	Thu May  8 22:54:59 2008
@@ -3146,10 +3146,12 @@
 is_uri_relative (const char *uri)
 {
 	char *scheme;
+	gboolean ret;
 
 	scheme = g_uri_parse_scheme (uri);
+	ret = (scheme == NULL);
 	g_free (scheme);
-	return scheme == NULL;
+	return ret;
 }
 
 static char *
@@ -3193,6 +3195,7 @@
 		icon_file = g_file_new_for_uri (custom_icon_uri);
 		icon = g_file_icon_new (icon_file);
 		g_object_unref (icon_file);
+		g_free (custom_icon_uri);
 	}
  
 	if (icon == NULL && file->details->got_link_info && file->details->custom_icon != NULL) {

Modified: trunk/libnautilus-private/nautilus-open-with-dialog.c
==============================================================================
--- trunk/libnautilus-private/nautilus-open-with-dialog.c	(original)
+++ trunk/libnautilus-private/nautilus-open-with-dialog.c	Thu May  8 22:54:59 2008
@@ -243,6 +243,7 @@
 								  app_name,
 								  G_APP_INFO_CREATE_NONE,
 								  &error);
+			g_free (app_name);
 		}
 	}
 

Modified: trunk/libnautilus-private/nautilus-program-choosing.c
==============================================================================
--- trunk/libnautilus-private/nautilus-program-choosing.c	(original)
+++ trunk/libnautilus-private/nautilus-program-choosing.c	Thu May  8 22:54:59 2008
@@ -206,6 +206,7 @@
 			g_warning ("Cannot open app: %s\n", error->message);
 #endif
 		}
+		g_error_free (error);
 	} else {
 		for (l = files; l != NULL; l = l->next) {
 			file = NAUTILUS_FILE (l->data);

Modified: trunk/src/nautilus-sidebar-title.c
==============================================================================
--- trunk/src/nautilus-sidebar-title.c	(original)
+++ trunk/src/nautilus-sidebar-title.c	Thu May  8 22:54:59 2008
@@ -327,14 +327,15 @@
 	}
 	
 	g_free (icon_name);
-	
-	if (pixbuf != NULL) {
-		sidebar_title->details->determined_icon = TRUE;
-	}
 
 	if (!leave_pixbuf_unchanged) {
 		gtk_image_set_from_pixbuf (GTK_IMAGE (sidebar_title->details->icon), pixbuf);
 	}
+	
+	if (pixbuf != NULL) {
+		sidebar_title->details->determined_icon = TRUE;
+		g_object_unref (pixbuf);
+	}
 }
 
 static void

Modified: trunk/src/nautilus-spatial-window.c
==============================================================================
--- trunk/src/nautilus-spatial-window.c	(original)
+++ trunk/src/nautilus-spatial-window.c	Thu May  8 22:54:59 2008
@@ -551,6 +551,7 @@
 	name = nautilus_file_get_display_name (file);
 	label = gtk_bin_get_child (GTK_BIN (menu_item));
 	gtk_label_set_label (GTK_LABEL (label), name);
+	g_free (name);
 
 	pixbuf = nautilus_file_get_icon_pixbuf (file,
 						nautilus_get_icon_size_for_stock_size (GTK_ICON_SIZE_MENU),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]