[gtkmm] progress bar headache
- From: junk siology net
- To: gtkmm-list gnome org
- Subject: [gtkmm] progress bar headache
- Date: Thu, 6 May 2004 00:13:38 +0000
lo, ive got this code.....
let_progress_go = true;
string s = "";
string cmd = "md5deep "; // prefix to location of md5deep operation
if (m_entry_md5deep.get_text() == "")
m_entry_md5deep.set_text("~"); // if blank, do the home dir
cmd = cmd + m_entry_md5deep.get_text();
cmd = cmd + " -r"; // recursive md5deep needed
if ((ptr = popen(cmd.c_str(), "r")) != NULL)
while (fgets(buf, BUFSIZ, ptr) != NULL)
s = s + buf;
//******* POINT A ********
m_TextBuffer->set_text(s); // fill the buffer with the output
let_progress_go = false;
ive got a timeout event which makes a progress bar pulse() no problem at all, the idea is that let_progress_go (boolean) if true will allow the pulse command to happen, if not it will skip it (i used an if statement for that) -- still no trouble.
the problem is that the progress bar isnt started during this block of code, (when i set let_progress_g to true). and even if i put the pulse() call directly in the loop at point A it dosnt work.
the code it meant to call a system process, and fill a text buffer with the output. The other problem is that i'd like it to update the display as the output arrives not just at the end, but even if (again at point A) i put the set_text(s) call, it dosnt get updated.
any ideas ?
] [Thread Prev