[maemo-developers] [maemo-developers] Nokia 770 - Vs - Xnest
From: Tommi Komulainen tommi.komulainen at nokia.comDate: Mon Aug 8 10:21:20 EEST 2005
- Previous message: [maemo-developers] Nokia 770 - Vs - Xnest
- Next message: [maemo-developers] Nokia 770 - Vs - Xnest
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, 2005-08-07 at 19:19 +0530, ext Mayank Jain wrote:
>
> I just tried running "ls" in 770 XNest window. The output was "TODO".
> This is with the stock installation of Maemo/scratchbox. But, your
> screenshot shows different output. Why so? Did you installed something
> else also, like some "base" packages... sort of?
> while(fgets(temp_buffer, 1024, fd))
> {
> gtk_text_buffer_set_text(buffer, temp_buffer, strlen(temp_buffer));
Well, here you are replacing the contents of the buffer with the last
line you read from 'ls'. You should use gtk_text_buffer_insert()
instead (see also gtk_text_buffer_get_bounds())
> gtk_text_view_set_buffer(GTK_TEXT_VIEW(m_textView), buffer);
Calling this inside the loop is redundant, it is sufficient to attach
the buffer to the view once. The view is automatically notified about
changes in the buffer.
--
Tommi Komulainen <tommi.komulainen at nokia.com>
- Previous message: [maemo-developers] Nokia 770 - Vs - Xnest
- Next message: [maemo-developers] Nokia 770 - Vs - Xnest
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
