Commit 0b7f4638 authored by Cosimo Cecchi's avatar Cosimo Cecchi Committed by Cosimo Cecchi

Plugged some leaks around. Cleaned up this bit of code.

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.

svn path=/trunk/; revision=14149
parent 0e85321f
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.
2008-05-08 Federico Mena Quintero <federico@novell.com>
http://bugzilla.gnome.org/show_bug.cgi?id=364843
......
......@@ -228,6 +228,8 @@ nautilus_drag_file_local_internal (const char *target_uri_string,
g_object_unref (parent);
}
g_object_unref (target);
return result;
}
......@@ -586,6 +588,7 @@ nautilus_drag_drag_data_get (GtkWidget *widget,
gtk_selection_data_set (selection_data,
selection_data->target,
8, result->str, result->len);
g_string_free (result, TRUE);
return TRUE;
}
......
......@@ -3146,10 +3146,12 @@ static gboolean
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 @@ get_custom_icon (NautilusFile *file)
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) {
......
......@@ -243,6 +243,7 @@ add_or_find_application (NautilusOpenWithDialog *dialog)
app_name,
G_APP_INFO_CREATE_NONE,
&error);
g_free (app_name);
}
}
......
......@@ -206,6 +206,7 @@ nautilus_launch_application (GAppInfo *application,
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);
......
......@@ -327,14 +327,15 @@ update_icon (NautilusSidebarTitle *sidebar_title)
}
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
......
......@@ -551,6 +551,7 @@ got_file_info_for_location_menu_callback (NautilusFile *file,
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),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment