Commit bbe808d0 authored by Abhijeetsingh Meena's avatar Abhijeetsingh Meena
Browse files

Revert "Renamed the method thunar_device_sort to...

Revert "Renamed the method thunar_device_sort to thunar_device_compare_by_name, added documentation to thunar_device_get_name and dropped comments"

This reverts commit d4910503.
parent d4910503
......@@ -327,20 +327,7 @@ thunar_device_emit_pre_unmount (ThunarDevice *device,
}
/**
* thunar_device_get_name:
* @device : a #ThunarDevice instance.
*
* Returns the name of the @device if the @device
* is mounted. Otherwise %NULL will be
* returned.
*
* The caller is responsible to free the returned string
* using g_free() when no longer needed.
*
* Return value: the name of @device if @device is mounted
* , %NULL otherwise.
**/
gchar *
thunar_device_get_name (const ThunarDevice *device)
{
......@@ -677,7 +664,7 @@ thunar_device_get_root (const ThunarDevice *device)
gint
thunar_device_compare_by_name (const ThunarDevice *device1,
thunar_device_sort (const ThunarDevice *device1,
const ThunarDevice *device2)
{
gchar* name1;
......@@ -695,9 +682,6 @@ thunar_device_compare_by_name (const ThunarDevice *device1,
/* code which arranges devices in ASCII order */
return g_strcmp0 (name1, name2);
g_free (name1);
g_free (name2);
}
......
......@@ -1111,7 +1111,8 @@ thunar_tree_model_device_added (ThunarDeviceMonitor *device_monitor,
if (item->device == NULL)
break;
if (thunar_device_compare_by_name (item->device, device) > 0)
/* sort devices by ASCII order */
if (thunar_device_sort (item->device, device) > 0)
break;
}
......
Supports Markdown
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