Re: Problem to open a new window using libglade

2007-03-07 Thread patrick
Hello, if I use g_idle_add, then when the function from g_idle_add is executed, it blocks the 'update_pbar' function. So I probably must make it with threads but by now I think it's to early for me to work with threads. It's easier if I add the progressbar into the main window, and update it with:

Re: Problem to open a new window using libglade

2007-03-06 Thread Karl H. Beckers
Am Montag, den 05.03.2007, 17:03 +0100 schrieb patrick: > Great! Thank you very much, this works. > But how can I make something during gtk_dialog_run? > I'd like to do somthing like this. > > g_timeout_add(1000, update_pbar, dialog); > result = gtk_dialog_run(GTK_DIALOG(dialog)); > ...my process

Re: Problem to open a new window using libglade

2007-03-05 Thread patrick
Great! Thank you very much, this works. But how can I make something during gtk_dialog_run? I'd like to do somthing like this. g_timeout_add(1000, update_pbar, dialog); result = gtk_dialog_run(GTK_DIALOG(dialog)); ...my process which progressbar should show g_spawn... progress = 0.2 other work

Re: Problem to open a new window using libglade

2007-03-02 Thread Karl H. Beckers
Well, there's prolly several ways of doing it, but smth. along the following lines should work: GladeXML *gxml = glade_xml_new (GLADE_FILE, "dialog1", NULL); GtkWidget *dialog = glade_xml_get_widget(gxml, "dialog1"); g_assert(dialog); GtkResponseType result;

Re: Problem to open a new window using libglade

2007-03-02 Thread patrick
Thanks for your answer. > if I'm not completely mistaken here, this has nothing to do with glade. > The thing just is, that you need to return to the main loop from the > callback for the widgets to be drawn properly. > That is prolly why you put in your gtk_main_iteration though I doubt > there i

Re: Problem to open a new window using libglade

2007-03-02 Thread Karl H. Beckers
Am Freitag, den 02.03.2007, 11:33 -0500 schrieb [EMAIL PROTECTED]: > >>> void > >>> on_button1_clicked(GtkButton *button, gpointer data) > >>> { > >>> /* the button was clicked */ > >>> //Print out to console > >>> g_print("Beginn break\n"); > >>> > >>> //Create the new "pro

Re: Problem to open a new window using libglade

2007-03-02 Thread Micah Carrick
Sorry, just use gtk_widget_show() - Micah Carrick Developer | http://www.micahcarrick.com | http://www.gtkforums.com patrick wrote: > If I compile it with "gtk_window_show_now" I get the following compiler error: > implicit declaration of function 'gtk_window_show_now' > I also tried it with

Re: Problem to open a new window using libglade

2007-03-02 Thread patrick
If I compile it with "gtk_window_show_now" I get the following compiler error: implicit declaration of function 'gtk_window_show_now' I also tried it with 'gtk_widget_show_now', but there is no difference. 2007/3/2, Micah Carrick <[EMAIL PROTECTED]>: > A quick "cheap trick" you could do is: > > gt

Re: Problem to open a new window using libglade

2007-03-01 Thread Micah Carrick
A quick "cheap trick" you could do is: gtk_window_set_keep_above (GTK_WINDOW(window2), TRUE); gtk_window_show_now (GTK_WINDOW(window2)); - Micah Carrick Developer | http://www.micahcarrick.com | http://www.gtkforums.com patrick wrote: > Hi All, > > I'd like to open a new window, when a butto

Problem to open a new window using libglade

2007-03-01 Thread patrick
Hi All, I'd like to open a new window, when a button is clicked by using libglade. But the window appears always at the end of the function, but it should appear at the beginnig, so that I can show the progrwess to the user. I also tried to add "while (gtk_events_pending()) gtk_main_iteration();"