[gnome-commander/chmod_via_GIO: 1/2] Use GIO when selecting a file
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/chmod_via_GIO: 1/2] Use GIO when selecting a file
- Date: Thu, 27 May 2021 21:16:14 +0000 (UTC)
commit 7fd1c59587b9eec17f72b77ff16dae0df265640c
Author: Uwe Scholz <u scholz83 gmx de>
Date: Fri May 21 23:01:11 2021 +0200
Use GIO when selecting a file
src/gnome-cmd-file-list.cc | 1 -
src/gnome-cmd-file-selector.cc | 2 +-
src/gnome-cmd-file.cc | 2 --
3 files changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index 7bbd1825..71c25059 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -465,7 +465,6 @@ static void on_quicksearch_popup_hide (GtkWidget *quicksearch_popup, GnomeCmdFil
void GnomeCmdFileList::select_file(GnomeCmdFile *f, gint row)
{
g_return_if_fail (f != nullptr);
- g_return_if_fail (f->info != nullptr);
if (f->is_dotdot)
return;
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index eb972bc8..7e0ae762 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -161,7 +161,7 @@ inline void GnomeCmdFileSelector::update_selected_files_label()
case G_FILE_TYPE_REGULAR:
num_sel_files++;
- sel_bytes += f->info->size;
+ sel_bytes += f->GetGfileAttributeUInt64(G_FILE_ATTRIBUTE_STANDARD_SIZE);
break;
default:
diff --git a/src/gnome-cmd-file.cc b/src/gnome-cmd-file.cc
index 814ad721..d9ef371f 100644
--- a/src/gnome-cmd-file.cc
+++ b/src/gnome-cmd-file.cc
@@ -797,8 +797,6 @@ guint64 GnomeCmdFile::calc_tree_size (gulong *count)
const gchar *GnomeCmdFile::get_tree_size_as_str()
{
- g_return_val_if_fail (info != nullptr, nullptr);
-
if (GetGfileAttributeUInt32(G_FILE_ATTRIBUTE_STANDARD_TYPE) != G_FILE_TYPE_DIRECTORY)
return get_size();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]