Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
thunar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ikem Krueger
thunar
Commits
23894cd9
Commit
23894cd9
authored
7 years ago
by
Alexander Schwinn
Browse files
Options
Downloads
Patches
Plain Diff
Add setting to show file sizes in bytes (bug #11690)
- fix for statusbar
parent
b2d7b1e5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
thunar/thunar-list-model.c
+15
-15
15 additions, 15 deletions
thunar/thunar-list-model.c
with
15 additions
and
15 deletions
thunar/thunar-list-model.c
+
15
−
15
View file @
23894cd9
...
...
@@ -2324,8 +2324,8 @@ thunar_list_model_get_statusbar_text (ThunarListModel *store,
if
(
size_summary
>
0
)
{
/* generate a text which includes the size of all items in the folder */
size_string
=
g_format_size_full
(
size_summary
,
file_size_binary
?
G_FORMAT_SIZE_IEC_UNITS
:
G_FORMAT_SIZE_DEFAULT
);
text
=
g_strdup_printf
(
ngettext
(
"%d item
(
%s
)
, Free space: %s"
,
"%d items
(
%s
)
, Free space: %s"
,
nrows
),
size_string
=
g_format_size_full
(
size_summary
,
G_FORMAT_SIZE_LONG_FORMAT
|
(
file_size_binary
?
G_FORMAT_SIZE_IEC_UNITS
:
G_FORMAT_SIZE_DEFAULT
)
)
;
text
=
g_strdup_printf
(
ngettext
(
"%d item
:
%s, Free space: %s"
,
"%d items
:
%s, Free space: %s"
,
nrows
),
nrows
,
size_string
,
fspace_string
);
g_free
(
size_string
);
}
...
...
@@ -2357,29 +2357,29 @@ thunar_list_model_get_statusbar_text (ThunarListModel *store,
if
(
G_UNLIKELY
(
content_type
!=
NULL
&&
g_str_equal
(
content_type
,
"inode/symlink"
)))
{
text
=
g_strdup_printf
(
_
(
"
\"
%s
\"
broken link"
),
thunar_file_get_display_name
(
file
));
text
=
g_strdup_printf
(
_
(
"
\"
%s
\"
:
broken link"
),
thunar_file_get_display_name
(
file
));
}
else
if
(
G_UNLIKELY
(
thunar_file_is_symlink
(
file
)))
{
size_string
=
thunar_file_get_size_string_
formatted
(
file
,
file_size_binary
);
text
=
g_strdup_printf
(
_
(
"
\"
%s
\"
(
%s
)
link to %s"
),
thunar_file_get_display_name
(
file
),
size_string
=
thunar_file_get_size_string_
long
(
file
,
file_size_binary
);
text
=
g_strdup_printf
(
_
(
"
\"
%s
\"
:
%s link to %s"
),
thunar_file_get_display_name
(
file
),
size_string
,
thunar_file_get_symlink_target
(
file
));
g_free
(
size_string
);
}
else
if
(
G_UNLIKELY
(
thunar_file_get_kind
(
file
)
==
G_FILE_TYPE_SHORTCUT
))
{
text
=
g_strdup_printf
(
_
(
"
\"
%s
\"
shortcut"
),
thunar_file_get_display_name
(
file
));
text
=
g_strdup_printf
(
_
(
"
\"
%s
\"
:
shortcut"
),
thunar_file_get_display_name
(
file
));
}
else
if
(
G_UNLIKELY
(
thunar_file_get_kind
(
file
)
==
G_FILE_TYPE_MOUNTABLE
))
{
text
=
g_strdup_printf
(
_
(
"
\"
%s
\"
mountable"
),
thunar_file_get_display_name
(
file
));
text
=
g_strdup_printf
(
_
(
"
\"
%s
\"
:
mountable"
),
thunar_file_get_display_name
(
file
));
}
else
if
(
thunar_file_is_regular
(
file
))
{
description
=
g_content_type_get_description
(
content_type
);
size_string
=
thunar_file_get_size_string_
formatted
(
file
,
file_size_binary
);
size_string
=
thunar_file_get_size_string_
long
(
file
,
file_size_binary
);
/* I18N, first %s is the display name of the file, 2nd the file size, 3rd the content type */
text
=
g_strdup_printf
(
_
(
"
\"
%s
\"
(
%s
)
%s"
),
thunar_file_get_display_name
(
file
),
text
=
g_strdup_printf
(
_
(
"
\"
%s
\"
:
%s %s"
),
thunar_file_get_display_name
(
file
),
size_string
,
description
);
g_free
(
description
);
g_free
(
size_string
);
...
...
@@ -2388,7 +2388,7 @@ thunar_list_model_get_statusbar_text (ThunarListModel *store,
{
description
=
g_content_type_get_description
(
content_type
);
/* I18N, first %s is the display name of the file, second the content type */
text
=
g_strdup_printf
(
_
(
"
\"
%s
\"
%s"
),
thunar_file_get_display_name
(
file
),
description
);
text
=
g_strdup_printf
(
_
(
"
\"
%s
\"
:
%s"
),
thunar_file_get_display_name
(
file
),
description
);
g_free
(
description
);
}
...
...
@@ -2456,19 +2456,19 @@ thunar_list_model_get_statusbar_text (ThunarListModel *store,
/* text for the items in the folder */
if
(
non_folder_count
>
0
)
{
size_string
=
g_format_size_full
(
size_summary
,
file_size_binary
?
G_FORMAT_SIZE_IEC_UNITS
:
G_FORMAT_SIZE_DEFAULT
);
size_string
=
g_format_size_full
(
size_summary
,
G_FORMAT_SIZE_LONG_FORMAT
|
(
file_size_binary
?
G_FORMAT_SIZE_IEC_UNITS
:
G_FORMAT_SIZE_DEFAULT
)
)
;
if
(
folder_count
>
0
)
{
/* item count if there are also folders in the selection */
non_folder_text
=
g_strdup_printf
(
ngettext
(
"%d other item selected
(
%s
)
"
,
"%d other items selected
(
%s
)
"
,
non_folder_text
=
g_strdup_printf
(
ngettext
(
"%d other item selected
:
%s"
,
"%d other items selected
:
%s"
,
non_folder_count
),
non_folder_count
,
size_string
);
}
else
{
/* only non-folders are selected */
non_folder_text
=
g_strdup_printf
(
ngettext
(
"%d item selected
(
%s
)
"
,
"%d items selected
(
%s
)
"
,
non_folder_text
=
g_strdup_printf
(
ngettext
(
"%d item selected
:
%s"
,
"%d items selected
:
%s"
,
non_folder_count
),
non_folder_count
,
size_string
);
}
g_free
(
size_string
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment