[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: GTK Progress bar: assistance pls.
- From: vijayasarathy setsindia net
- To: "Dan H" <dunno stoptrick com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GTK Progress bar: assistance pls.
- Date: Mon, 7 Jan 2008 14:53:30 +0530 (IST)
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
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: 7bit
>
>
> On Mon, 7 Jan 2008 13:18:07 +0530 (IST)
> vijayasarathy setsindia net 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.
>
>
>> txt_start_count = (gchar *) g_malloc0(50*sizeof(gchar));
>
> Same here.
>
>
>> txt_start_count = (gchar
>> *)gtk_entry_get_text(GTK_ENTRY(wdgt_start_count));
>>
>
> Useless (possibly dangerous) cast, and you're leaking the memory
> g_malloced() above.
>
> txt_end_count =
>> (gchar *)gtk_entry_get_text(GTK_ENTRY(wdgt_end_count));
>>
>
> Same here.
>
>
>>
>> start_count = atoi(txt_start_count); end_count = atoi(txt_end_count);
>
> Don't use atoi(). Use strtol() and do error checking.
>
>
> --D.
> _______________________________________________
> gtk-app-devel-list mailing list gtk-app-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
>
> ------=neXtPaRt_1199694274
> Content-Type: text/plain;
>
>
> *************************************************************************
> ************
> DISCLAIMER
> This e-mail and any files transmitted with it are for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information. Any use,distribution,copying or disclosure by any other
> person is strictly prohibited. If you have received this transmission in
> error please notify SETS immediately either by replying to this e-mail or
> by telephone +91-44-28205655 and then delete this e-mail. The sender does
> not accept any responsibility for any damage which you sustain as a
> result of software viruses or malicious programs. You should therefore
> scan attachments (if any) prior to opening them.
> *************************************************************************
> ***********
>
>
>
>
>
>
>
> ------=neXtPaRt_1199694274--
>
>
Vijayasarathy
Senior Research Associate
SETS
***************************************************************************
DISCLAIMER
This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. Any use, distribution, copying or disclosure by any other
person is strictly prohibited. If you have received this transmission
in error please notify SETS immediately either by replying to this e-mail
or
by telephone on +91-44-28205655 and then delete this e-mail.
The sender does not accept any responsibility for any damage which
you sustain as a result of software viruses or malicious programs.
You should therefore scan attachments (if any) prior to opening them.
**************************************************************************
*************************************************************************************
DISCLAIMER
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
Any use,distribution,copying or disclosure by any other person is strictly prohibited. If you have received this transmission in error please notify SETS immediately either by replying to this e-mail or by telephone +91-44-28205655 and then delete this e-mail. The sender does not accept any responsibility for any damage which you sustain as a result of software viruses or malicious programs. You should therefore scan attachments (if any) prior to opening them.
************************************************************************************
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]