Re: auto refresh file in textview

2012-08-24 Thread Rudra Banerjee
I will be really grateful if someone help me in the problem. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: auto refresh file in textview

2012-08-24 Thread jcupitt
Hi Rudra, On 23 August 2012 13:45, Rudra Banerjee bnrj.ru...@yahoo.com wrote: whenever I am writing, it is saved, but to see the change, I have to reopen the file(obviously). What do you need to know? Do you want your textview to update as the file changes? If your program is appending to the

Re: auto refresh file in textview

2012-08-24 Thread Olivier Sessink
On 08/23/2012 02:45 PM, Rudra Banerjee wrote: Dear friends, I am openning an existing file in textview from command line as: textview = gtk_text_view_new(); gtk_container_add(GTK_CONTAINER(scrolledwindow), textview); textbuffer =

Re: auto refresh file in textview

2012-08-24 Thread Rudra Banerjee
I am sorry but I really don't know how to write on a buffer. I am writing on the file as: FILE *fop = fopen(filename, a ); g_fprintf( fop, @%s{%s,\n, strcombo, strkey ); g_fprintf( fop, \tAuthor=%s,\n, strAuth); etc. and the buffer is defined as static void read_view(char *inpfn) {

Re: auto refresh file in textview

2012-08-24 Thread Rudra Banerjee
Please ignore the previous post. google is giving some hints. I will comeback if I failed. On Fri, 2012-08-24 at 14:41 +0100, Rudra Banerjee wrote: I am sorry but I really don't know how to write on a buffer. I am writing on the file as: FILE *fop = fopen(filename, a ); g_fprintf( fop,

Re: auto refresh file in textview

2012-08-24 Thread jcupitt
On 24 August 2012 14:41, Rudra Banerjee bnrj.ru...@yahoo.com wrote: I am sorry but I really don't know how to write on a buffer. I append to a textview like this: void log_text( Log *log, const char *buf ) { GtkTextView *text_view = GTK_TEXT_VIEW( log-view ); GtkTextBuffer

auto refresh file in textview

2012-08-23 Thread Rudra Banerjee
Dear friends, I am openning an existing file in textview from command line as: textview = gtk_text_view_new(); gtk_container_add(GTK_CONTAINER(scrolledwindow), textview); textbuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview)); if (argc 1 argv[1] != NULL) { char