gtk application taking 6 seconds to load



hi michael,

As described in my previous posts, I tried dividing the code into 7
different parts. But the problem still persists. The problem is not
exactly the same. Now after gtk_widget_show() of first part, it shows
a blank dialog within 2 seconds, But the other parts (with all the
widgets) are loaded after 5-6 seconds only.
This is not what I want. I want to see the fully loaded tabs as soon
as their gtk_widget_show(create_dialog_somehow()) is called.
I even tried the following lines to refresh the gtk_main() as soon as
gtk_widget_show() is called. This is how my main() function looks:


       g_thread_init (NULL);

       gdk_threads_init ();

       gdk_threads_enter ();

       gtk_init (&argc, &argv);

       add_pixmap_directory ("/usr/share/pixmaps/ControlCenter/");


       dialog1 = create_dialog1 ();

       gtk_widget_show (dialog1);

       if(gtk_events_pending())
               gtk_main_iteration();

       gtk_widget_show(create_display());

       if(gtk_events_pending())
               gtk_main_iteration();

       gtk_widget_show(create_rest());

       if(gtk_events_pending())
               gtk_main_iteration();

       gtk_main ();
       gdk_threads_leave ();

       return 0;

Is there any other variation of gtk_main() that I can use in place of
gtk_main_iteration() ?

Thanks and Regards,
Siddharth Kapoor


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]