Commit 721c4601 authored by Abhijeetsingh Meena's avatar Abhijeetsingh Meena
Browse files

Removed comments, trailing whitespaces and modified documentation

parent 5461e017
Pipeline #12232 passed with stages
in 6 minutes
......@@ -332,14 +332,14 @@ thunar_device_emit_pre_unmount (ThunarDevice *device,
* @device : a #ThunarDevice instance.
*
* Returns the name of the @device if the @device
* is mounted. Otherwise %NULL will be
* returned.
* is mounted.If the device is not mounted,
* then g_mount_get_name 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.
* else g_mount_get_name will be returned
**/
gchar *
......@@ -679,21 +679,21 @@ thunar_device_get_root (const ThunarDevice *device)
gint
thunar_device_compare_by_name (const ThunarDevice *device1,
const ThunarDevice *device2)
const ThunarDevice *device2)
{
gchar* name1;
gchar* name2;
_thunar_return_val_if_fail (THUNAR_IS_DEVICE (device1), 0);
_thunar_return_val_if_fail (THUNAR_IS_DEVICE (device2), 0);
/* sort mounts above volumes */
if (G_OBJECT_TYPE (device1->device) != G_OBJECT_TYPE (device2->device))
return G_IS_MOUNT (device1->device) ? 1 : -1;
name1 = thunar_device_get_name (device1);
name2 = thunar_device_get_name (device2);
/* code which compares device names */
return g_strcmp0 (name1, name2);
......
......@@ -1227,7 +1227,6 @@ thunar_shortcuts_model_sort_func (gconstpointer shortcut_a,
if (a->sort_id != b->sort_id)
return a->sort_id > b->sort_id ? 1 : -1;
/* properly sort devices by timestamp */
if (a->device != NULL && b->device != NULL)
return thunar_device_compare_by_name (a->device, b->device);
......
......@@ -1107,10 +1107,9 @@ thunar_tree_model_device_added (ThunarDeviceMonitor *device_monitor,
for (; node->next != NULL; node = node->next)
{
item = THUNAR_TREE_MODEL_ITEM (node->next->data);
if (item->device == NULL)
break;
if (thunar_device_compare_by_name (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