Re: Memory question

2005-09-28 Thread Allin Cottrell
On Wed, 28 Sep 2005, David Rosal wrote: Allin Cottrell wrote: gchar *text = g_strdup_printf("banana %d", i); gtk_entry_set_text(GTK_ENTRY(entry), text); g_free(text); Is the above code really safe? Yes! A function such as gtk_entry_set_text() is bound to make a copy of the string offered

Re: gtk label problem

2005-09-28 Thread David Necas (Yeti)
On Wed, Sep 28, 2005 at 03:03:53PM +0530, Suganya wrote: > I have a label widget which displays a text (in my case, it is the > status of the SIP call) > > Depending on the status of the call, the text in the label widget should > change. > > The problem I am facing is that the text is changing s

gtk label problem

2005-09-28 Thread Suganya
Hi all, I am very new to developing applications with gtk. I am developing SIP stack as a gui using gtk+-devel-1.2.10 I have a label widget which displays a text (in my case, it is the status of the SIP call) Depending on the status of the call, the text in the label widget should change. The

Re: Error while cross-compiling x11

2005-09-28 Thread Gian Mario Tagliaretti
2005/9/28, sadhees kumar <[EMAIL PROTECTED]>: > Hi friends, Hi > Im now trying to cross-compile the x-11 source to tiny-x for > arm-architecture.What i did was in path x11/xc/config/cf/ i included the > host.def file and also changed the cross.def file, but it shows error while > compiling. Is t

Error while cross-compiling x11

2005-09-28 Thread sadhees kumar
Hi friends, Im now trying to cross-compile the x-11 source to tiny-x for arm-architecture.What i did was in path x11/xc/config/cf/ i included the host.def file and also changed the cross.def file, but it shows error while compiling. Is there any seperate tool-chains for this?.Plz let me know i

Re: Memory question

2005-09-28 Thread David Rosal
Colossus wrote: Hi, Am I doing the same ( memory leaking ) with g_strdup_printf ? If so what is the better way to write the following code: ? response = ShowGtkMessageDialog (GTK_WINDOW (MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, g_strdup_printf ("%s",g_strerror(er

Re: Memory question

2005-09-28 Thread Roger Leigh
David Rosal <[EMAIL PROTECTED]> writes: > Allin Cottrell wrote: > >> gchar *text = g_strdup_printf("banana %d", i); >> gtk_entry_set_text(GTK_ENTRY(entry), text); >> g_free(text); > > Is the above code really safe? > > You're passing the address of "text" to the function > gtk_entry_set_text(). N

Re: Memory question

2005-09-28 Thread Colossus
Hi, Am I doing the same ( memory leaking ) with g_strdup_printf ? If so what is the better way to write the following code: ? response = ShowGtkMessageDialog (GTK_WINDOW (MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, g_strdup_printf ("%s",g_strerror(errno)) );

Re: Memory question

2005-09-28 Thread Padraig O'Briain
David Rosal wrote: Allin Cottrell wrote: gchar *text = g_strdup_printf("banana %d", i); gtk_entry_set_text(GTK_ENTRY(entry), text); g_free(text); Is the above code really safe? You're passing the address of "text" to the function gtk_entry_set_text(). Next you g_free() that address, so

Re: Memory question

2005-09-28 Thread David Rosal
Allin Cottrell wrote: gchar *text = g_strdup_printf("banana %d", i); gtk_entry_set_text(GTK_ENTRY(entry), text); g_free(text); Is the above code really safe? You're passing the address of "text" to the function gtk_entry_set_text(). Next you g_free() that address, so AFAIK the memory manag