GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Sep 03, 2014 2:08 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: problem in changing size of window
PostPosted: Fri Mar 19, 2010 3:31 pm 
Offline
GTK+ Geek

Joined: Thu Jul 30, 2009 1:49 pm
Posts: 86
hi everybody,

My problem is i am setting width and hight to 50,50 as bellow and aswell as from glade tool.

But it is not happennig it.

could any one help me out where i am going wrong.

Code:
short int Decorations(void)
{
    GtkWidget *win;
   
   
    static int count= 0;

    win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_window_set_modal ((GtkWindow *)win,TRUE);
   
                                                     

    gtk_widget_set_size_request(Param_widgets.progress_window,50,50);                                         
    gtk_window_set_decorated((GtkWindow *)Param_widgets.progress_window,FALSE);
    gtk_container_add (GTK_CONTAINER (win),Param_widgets.progrss_image);

    gtk_widget_show(Param_widgets.progress_window);
    while(1)
    {
       switch(count)
       {
            case 0:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P1.png");break;
            case 1:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P2.png");break;
            case 2:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P3.png");break;
            case 3:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P4.png");break;
            case 4:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P5.png");break;
            case 5:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P6.png");break;
            case 6:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P7.png");break;
            case 7:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P8.png");break;
            default:break;
       }

       if(7 == count++)
           count= 0;
   
   
   
   
         
     

        //g_static_mutex_lock(&my_mutex);

        if(NO == cntl_response || cntl_response>0)
        {

           
           
            gtk_widget_destroy(win);
            g_thread_exit( thread3);
           
        }

        //g_static_mutex_unlock(&my_mutex);
    }

       
       
}
Added CodeBB -dreblen

thanks and regards,
harinath.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 19, 2010 6:32 pm 
Offline
GTK+ Guru

Joined: Sun Apr 06, 2008 6:43 pm
Posts: 286
Location: Fortress of solitude
It's confuse:
Code:
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_modal ((GtkWindow *)win,TRUE);
gtk_widget_set_size_request(Param_widgets.progress_window,50,50);                               gtk_window_set_decorated((GtkWindow *)Param_widgets.progress_window,FALSE);

win is the toplevel window and Param_widgets.progress_window is a dialog or banner?
how are you creating Param_widgets.progress_window?

_________________
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 21, 2010 5:12 am 
Offline
GTK+ Geek

Joined: Thu Jul 30, 2009 1:49 pm
Posts: 86
hi Joel,

Sorry for inconvenience and Thanks for ur kind reply. Bellow one is the actual code .

I am un able to decorate it(the border is not disappeared).

Code:
GtkWidget *win;
    GtkWidget *image;
   
    static int count= 0;

    win = gtk_window_new (GTK_WINDOW_TOPLEVEL);   
    gtk_window_set_modal ((GtkWindow *)win,TRUE);
    image = gtk_image_new();
   
                                                     

    gtk_widget_set_size_request(win,50,50);                                         
    gtk_window_set_decorated((GtkWindow *)win,FALSE);
    gtk_container_add (GTK_CONTAINER (win),image);

    gtk_widget_show(win);
    while(1)
    {
       switch(count)
       {
            case 0:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P1.png");break;
            case 1:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P2.png");break;
            case 2:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P3.png");break;
            case 3:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P4.png");break;
            case 4:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P5.png");break;
            case 5:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P6.png");break;
            case 6:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P7.png");break;
            case 7:gtk_image_set_from_file((GtkImage*)Param_widgets.progrss_image,"P8.png");break;
            default:break;
       }

       if(7 == count++)
           count= 0;
   
   
   
   
         
     

        //g_static_mutex_lock(&my_mutex);

        if(NO == cntl_response || cntl_response>0)
        {

           
            gtk_widget_destroy(image);
            gtk_widget_destroy(win);
            g_thread_exit( thread3);
           
        }

        //g_static_mutex_unlock(&my_mutex);
    }

       
       
}
Added CodeBB -dreblen


Thanks & Regards ,
Harianth.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group