Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Abhijeetsingh Meena
thunar
Commits
721c4601
Commit
721c4601
authored
Nov 25, 2021
by
Abhijeetsingh Meena
Browse files
Removed comments, trailing whitespaces and modified documentation
parent
5461e017
Pipeline
#12232
passed with stages
in 6 minutes
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
thunar/thunar-device.c
View file @
721c4601
...
...
@@ -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
);
...
...
thunar/thunar-shortcuts-model.c
View file @
721c4601
...
...
@@ -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
);
...
...
thunar/thunar-tree-model.c
View file @
721c4601
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment