StartPtyMagic();
// Tell the progress that its starting and fork dpkg
- d->progress->Start();
+ d->progress->Start(d->master);
// this loop is runs once per dpkg operation
vector<Item>::const_iterator I = List.begin();
SetupTerminalScrollArea(nr_terminal_rows);
}
-void PackageManagerFancy::Start()
+void PackageManagerFancy::Start(int child_pty)
{
int nr_terminal_rows = GetNumberTerminalRows();
if (nr_terminal_rows > 0)
+ {
SetupTerminalScrollArea(nr_terminal_rows);
+ // *cough*
+ struct winsize win;
+ ioctl(child_pty, TIOCGWINSZ, (char *)&win);
+ win.ws_row = nr_terminal_rows - 1;
+ ioctl(child_pty, TIOCSWINSZ, (char *)&win);
+ }
}
void PackageManagerFancy::Stop()
virtual ~PackageManager() {};
/* Global Start/Stop */
- virtual void Start() {};
+ virtual void Start(int child_pty=-1) {};
virtual void Stop() {};
/* When dpkg is invoked (may happen multiple times for each
public:
PackageManagerFancy();
~PackageManagerFancy();
- virtual void Start();
+ virtual void Start(int child_pty=-1);
virtual void Stop();
virtual bool StatusChanged(std::string PackageName,
unsigned int StepsDone,