mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Cosmetics
Moved string truncate to BaseToolkit, fixed SystemToolkit max memory, clean left panel UI
This commit is contained in:
@@ -84,7 +84,7 @@ long SystemToolkit::memory_max_usage() {
|
||||
|
||||
struct rusage r_usage;
|
||||
getrusage(RUSAGE_SELF,&r_usage);
|
||||
return r_usage.ru_maxrss;
|
||||
return 1024 * r_usage.ru_maxrss;
|
||||
// return r_usage.ru_isrss;
|
||||
}
|
||||
|
||||
@@ -132,16 +132,6 @@ string SystemToolkit::path_filename(const string& path)
|
||||
return path.substr(0, path.find_last_of(PATH_SEP) + 1);
|
||||
}
|
||||
|
||||
string SystemToolkit::trunc_filename(const string& path, int lenght)
|
||||
{
|
||||
string trunc = path;
|
||||
int l = path.size();
|
||||
if ( l > lenght ) {
|
||||
trunc = string("...") + path.substr( l - lenght + 3 );
|
||||
}
|
||||
return trunc;
|
||||
}
|
||||
|
||||
string SystemToolkit::extension_filename(const string& filename)
|
||||
{
|
||||
string ext = filename.substr(filename.find_last_of(".") + 1);
|
||||
|
||||
Reference in New Issue
Block a user