"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/FilePanel.cpp" between
xfe-1.43.1.tar.gz and xfe-1.43.2.tar.gz

About: Xfe (X File Explorer) is a file manager and browser (using the FOX toolkit).

FilePanel.cpp  (xfe-1.43.1):FilePanel.cpp  (xfe-1.43.2)
skipping to change at line 6082 skipping to change at line 6082
else if (num > 1) else if (num > 1)
{ {
selmult = true; selmult = true;
} }
} }
item = list->getCurrentItem(); item = list->getCurrentItem();
if (num > 1) if (num > 1)
{ {
int nbdirs = 0;
for (int u = 0; u < list->getNumItems(); u++) for (int u = 0; u < list->getNumItems(); u++)
{ {
if (list->isItemSelected(u) && !list->isItemDirectory(u)) if (list->isItemSelected(u) && !list->isItemDirectory(u))
{ {
size += list->getItemFileSize(u); size += list->getItemFileSize(u);
#if __WORDSIZE == 64 #if __WORDSIZE == 64
snprintf(usize, sizeof(usize)-1, "%lu", size); snprintf(usize, sizeof(usize)-1, "%lu", size);
#else #else
snprintf(usize, sizeof(usize)-1, "%llu", size); snprintf(usize, sizeof(usize)-1, "%llu", size);
#endif #endif
hsize = ::hSize(usize); hsize = ::hSize(usize);
} }
if (list->isItemDirectory(u))
{
nbdirs++;
}
} }
str.format(_("%s in %s selected items"), hsize.text(), FXStringVal(num).
text()); // Don't count the '..' directory
if (nbdirs >= 1)
{
nbdirs--;
}
int nbfiles = num - nbdirs;
if (nbdirs <= 1 && nbfiles <= 1)
{
str.format(_("%s in %s selected items (%s folder, %s file)"), hsi
ze.text(), FXStringVal(num).text(), FXStringVal(nbdirs).text(), FXStringVal(nbfi
les).text());
}
else if (nbdirs <=1 && nbfiles > 1)
{
str.format(_("%s in %s selected items (%s folder, %s files)"), hs
ize.text(), FXStringVal(num).text(), FXStringVal(nbdirs).text(), FXStringVal(nbf
iles).text());
}
else if (nbdirs > 1 && nbfiles <= 1)
{
str.format(_("%s in %s selected items (%s folders, %s file)"), hs
ize.text(), FXStringVal(num).text(), FXStringVal(nbdirs).text(), FXStringVal(nbf
iles).text());
}
else
{
str.format(_("%s in %s selected items (%s folders, %s files)"), h
size.text(), FXStringVal(num).text(), FXStringVal(nbdirs).text(), FXStringVal(nb
files).text());
}
} }
else else
{ {
// Nothing selected
if ((num == 0) || (item < 0)) if ((num == 0) || (item < 0))
{ {
num = list->getNumItems(); num = list->getNumItems();
if (num == 1) if (num == 1)
{ {
str = _("1 item"); str = _("1 item (1 folder)");
} }
else else
{ {
str = FXStringVal(num)+_(" items"); int nbdirs = 0;
for (int u = 0; u < num; u++)
{
if (list->isItemDirectory(u))
{
nbdirs++;
}
}
int nbfiles = num - nbdirs;
str.format(_("%s items (%s folders, %s files)"), FXString
Val(num).text(), FXStringVal(nbdirs).text(), FXStringVal(nbfiles).text());
if (nbdirs <= 1 && nbfiles <= 1)
{
str.format(_("%s items (%s folder, %s fil
e)"), FXStringVal(num).text(), FXStringVal(nbdirs).text(), FXStringVal(nbfiles).
text());
}
else if (nbdirs <=1 && nbfiles > 1)
{
str.format(_("%s items (%s folder, %s fil
es)"), FXStringVal(num).text(), FXStringVal(nbdirs).text(), FXStringVal(nbfiles)
.text());
}
else if (nbdirs > 1 && nbfiles <= 1)
{
str.format(_("%s items (%s folders, %s fi
le)"), FXStringVal(num).text(), FXStringVal(nbdirs).text(), FXStringVal(nbfiles)
.text());
}
else
{
str.format(_("%s items (%s folders, %s fi
les)"), FXStringVal(num).text(), FXStringVal(nbdirs).text(), FXStringVal(nbfiles
).text());
}
} }
} }
else else
{ {
FXString string = list->getItemText(item); FXString string = list->getItemText(item);
FXString name = string.section('\t', 0); FXString name = string.section('\t', 0);
FXString type = string.section('\t', 2); FXString type = string.section('\t', 2);
FXString date = string.section('\t', 4); FXString date = string.section('\t', 4);
FXString usr = string.section('\t', 5); FXString usr = string.section('\t', 5);
 End of changes. 6 change blocks. 
4 lines changed or deleted 76 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)