Re: One Window, change the frame continous
- From: "Anand S. Katti" <askatti ece iisc ernet in>
 
- To: "Leandro A. F. Pereira" <leandro linuxmag com br>
 
- Cc: <gtk-app-devel-list gnome org>
 
- Subject: Re: One Window, change the frame continous
 
- Date: Tue, 24 Jun 2003 12:47:05 +0530 (IST)
 
That is I want to have one single window and wants to change the inside
frames continously each time displaying one or the other event.
Each time i click NEXT button it should show me new frame DYNAMICALLY.
      Learn about pipes (man popen).
        sir i did learn about popen i did this..
        I have used GLADE 1.2 to prepare the GUI, it has files like 
callback.c and main.c and support.c
I prepared two windows with two buttons in each. On clicking button2 of 
window1, i want to see frame 1 of window2, then on clicking button 4 of 
window2, i want to see frame 2 in window2 itself, and this goes on...as i 
keep on pressing the button(labelled as NEXT)
so in the callbacks.c file i've written the things like this..so that on 
clicking button 2 window gets displayed with the frame 1. :::(, but im not 
geeting how to display "buffer"(output of poepn) in the frame?
Please understand my problem and help me out.
-------------------------------------
 void
on_button2_clicked                     (GtkButton       *button,
                                        gpointer         user_data)
{
        file1 = popen ("sh /tmp/abc.sh", "r");
        while (!feof (file1))
                    {
                 /* fgets (buffer, sizeof (buffer), file1); */
                                  fread (buffer, 1, 1024, file1);
                                       // label = gtk_label_new (buffer);
        printf ("files : %s", buffer);                                     
gtk_widget_show (window2);
}
---------------------------------------
Thanking you in adavance.
Anand S. KAtti
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]