Refresh Problem
- From: M Ezman Zainudin <ee4mez yahoo com>
- To: gtk-app-devel-list gnome org
- Subject: Refresh Problem
- Date: Mon, 29 Sep 2003 01:46:22 -0700 (PDT)
Hi,
I'm writing a GTK+ 2 program which reads some data
from a smart card. I am reading and subsequently
displaying the data in a GtkTextView, contained in a
GtkScrolledWindow, upon the click of a GtkButton.
The problem is, the GtkTextView is not updated until
the callback function returns. I have tried using
gdk_threads_enter() and gdk_threads_leave() in the
function but that still doesn't work.
I am currently using the following:-
- GTK+ 2.2.1
- gcc 3.2.2
- RedHat Linux 9
The following is taken from the callback function:
gdk_threads_enter();
tbuf =
gtk_text_view_get_buffer(GTK_TEXT_VIEW(tview));
gtk_text_buffer_set_text(tbuf, "new value", -1);
csr = gdk_cursor_new(GDK_WATCH);
gdk_window_set_cursor(GTK_WIDGET(btn)->window, csr);
gdk_flush();
gdk_threads_leave();
The code above changes the cursor, but does not change
the text in the GtkTextView. Please help.
Thanks
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]