RE: GTK Progress bar: assistance pls.

2008-01-09 Thread zhangLance
once in a while and give the GTK system a chance to handle them, this is essentially what the above code fraction do. HTH. Lance Date: Mon, 7 Jan 2008 17:18:08 +0530 Subject: Re: GTK Progress bar: assistance pls. From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: gtk-app-devel-list

RE: GTK Progress bar: assistance pls.

2008-01-09 Thread zhangLance
Date: Mon, 7 Jan 2008 14:53:30 +0530 Subject: Re: GTK Progress bar: assistance pls. From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: gtk-app-devel-list@gnome.org Friends, How about the idea of emitting a signal with the value of the fraction when I want to get the progress

RE: GTK Progress bar: assistance pls.

2008-01-09 Thread vijayasarathy
10:17 am, zhangLance wrote: Date: Mon, 7 Jan 2008 14:53:30 +0530 Subject: Re: GTK Progress bar: assistance pls. From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: gtk-app-devel-list@gnome.org Friends, How about the idea of emitting a signal with the value of the fraction when I

Re: GTK Progress bar: assistance pls.

2008-01-07 Thread tom
Bin Chen wrote: 在 2008-01-07一的 13:18 [EMAIL PROTECTED] for(i=start_count;iend_count;i++) { //g_print(i = (%d)\n,i); while(j10)//To kill time, keep counting until a lakh j++; j = 0;//Make j 0 for

Re: GTK Progress bar: assistance pls.

2008-01-07 Thread Dan H
On Mon, 7 Jan 2008 13:18:07 +0530 (IST) [EMAIL PROTECTED] wrote: [Stuff snipped] Some comments on your code, aside from the basic conceptual problems: pdata = (ProgressData *)g_malloc0(sizeof(ProgressData)); Useless cast, and useless parentheses around sizeof's operand.

Re: GTK Progress bar: assistance pls.

2008-01-07 Thread vijayasarathy
IN REPLY TO DANS COMMENTS: 1. I am using the g++ compiler and g++ doesnt let a gpointer[return type of g_malloc0()] or a void pointer point a gchar or a ProgressData pointer. That is why the typecast. 2. I need more explanation here: txt_start_count = (gchar

Re: GTK Progress bar: assistance pls.

2008-01-07 Thread vijayasarathy
Friends, How about the idea of emitting a signal with the value of the fraction when I want to get the progress bar updated, and having a signal handling function for hte progress bar ? will that work ? On Mon, January 7, 2008 2:03 pm, Dan H wrote: --=neXtPaRt_1199694274

Re: GTK Progress bar: assistance pls.

2008-01-07 Thread carlo
[EMAIL PROTECTED] ha scritto lo scorso 07/01/2008 08:34: Hey Bin Chen[or how do I call you :-)], First of all, thank you very much for your instant reply. Let me give a simple pseudo-code explaining my problem. Please see what I can do with this. Program Goal: Do work w1 iterations

Re: GTK Progress bar: assistance pls.

2008-01-07 Thread Dan H
On Mon, 7 Jan 2008 14:51:11 +0530 (IST) [EMAIL PROTECTED] wrote: IN REPLY TO DANS COMMENTS: 1. I am using the g++ compiler and g++ doesnt let a gpointer[return type of g_malloc0()] or a void pointer point a gchar or a ProgressData pointer. That is why the typecast. Ah, so you're using it

Re: GTK Progress bar: assistance pls.

2008-01-07 Thread vijayasarathy
Hey Carlo, Thanks man. Your idea works, but I am still not able to figure out how it works . Let me first tell you all what I have done. I have a button which when clicked shall start iterating from 0 to 1000[say], and for each iteration, does some work[counts another variable j

Re: GTK Progress bar: assistance pls.

2008-01-07 Thread tom
Quoting [EMAIL PROTECTED]: //Call progress_timeout() every 1 second. g_timeout_add (100, progress_timeout, pdata); Ok, you want glib to call progress_timeout() in 100msecs. Glib saves the data somewhere internally and then returns. There is no second thread that would call the

Re: GTK Progress bar: assistance pls.

2008-01-06 Thread Bin Chen
在 2008-01-07一的 12:21 [EMAIL PROTECTED] Hi All, My name is Vijay, and I have been working with GTK [with glade] for the last few months in making an UI for certain programs that we have implemented. The programs I am talking about are ones which keep running for hours together. I want

Re: GTK Progress bar: assistance pls.

2008-01-06 Thread vijayasarathy
Hey Bin Chen[or how do I call you :-)], First of all, thank you very much for your instant reply. Let me give a simple pseudo-code explaining my problem. Please see what I can do with this. Program Goal: Do work w1 iterations number of times, and keep showing progress of this whole work

Re: GTK Progress bar: assistance pls.

2008-01-06 Thread Bin Chen
在 2008-01-07一的 13:04 [EMAIL PROTECTED] Hey Bin Chen[or how do I call you :-)], First of all, thank you very much for your instant reply. Let me give a simple pseudo-code explaining my problem. Please see what I can do with this. Program Goal: Do work w1 iterations number of times, and

Re: GTK Progress bar: assistance pls.

2008-01-06 Thread vijayasarathy
Hi Chen, Now that you have dug into the problem, let me post the entire code I did in glade [this code is part of a callback file, containing a function which will be invoked when a button is clicked. *START OF CODE CHUNK #ifdef

Re: GTK Progress bar: assistance pls.

2008-01-06 Thread Bin Chen
在 2008-01-07一的 13:18 [EMAIL PROTECTED] for(i=start_count;iend_count;i++) { //g_print(i = (%d)\n,i); while(j10)//To kill time, keep counting until a lakh j++; j = 0;//Make j 0 for the next loop.