diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-01-28 16:56:55 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-02-26 20:13:09 -0300 |
commit | e6c98b6e8ee232d6cb7f79126fcb1c551af22cee (patch) | |
tree | d3c196bc374aaad22109fef7fdec6d2434049f61 /Settings.c | |
parent | b815e4c7a3cdcc64e3c5a28414ef2450bc9d5ebd (diff) |
htoprc: store screen 0's setup for improved compatibility
Diffstat (limited to 'Settings.c')
-rw-r--r-- | Settings.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -434,6 +434,13 @@ bool Settings_write(Settings* this) { fprintf(fd, "left_meter_modes="); writeMeterModes(this, fd, 0); fprintf(fd, "right_meters="); writeMeters(this, fd, 1); fprintf(fd, "right_meter_modes="); writeMeterModes(this, fd, 1); + + // Legacy compatibility with older versions of htop + fprintf(fd, "tree_view=%d\n", (int) this->screens[0]->treeView); + // This "-1" is for compatibility with the older enum format. + fprintf(fd, "sort_key=%d\n", (int) this->screens[0]->sortKey-1); + fprintf(fd, "sort_direction=%d\n", (int) this->screens[0]->direction); + if (this->screens && this->screens[0]) { for (unsigned int i = 0; i < this->nScreens; i++) { ScreenSettings* ss = this->screens[i]; |