Hi Neo,

as far as I understand, this piece of code can used to create an new
window "inside " the main window. is it what you want ?!

void button_click_cb (GtkWindow *button, GPointer *user_pointer) {

        GtkWidget *Dialog = gtk_dialog_new ();
        gtk_widget_set_size_request (Dialog, 240, 320);
        gtk_window_set_title (GTK_WINDOW (Dialog), ("Page Info"));
        gtk_window_set_position (GTK_WINDOW (Dialog), 
GTK_WIN_POS_CENTER_ON_PARENT);
        gtk_window_set_modal (GTK_WINDOW (Dialog), TRUE);
        gtk_window_set_default_size (GTK_WINDOW (Dialog), 240, 320);
        gtk_window_set_resizable (GTK_WINDOW (Dialog), FALSE);
        gtk_window_set_decorated (GTK_WINDOW (Dialog), TRUE);
        gtk_window_set_skip_taskbar_hint (GTK_WINDOW (Dialog), TRUE);
        gtk_window_set_skip_pager_hint (GTK_WINDOW (Dialog), TRUE);
        gtk_window_set_type_hint (GTK_WINDOW (Dialog), 
GDK_WINDOW_TYPE_HINT_DIALOG);
        gtk_window_set_gravity (GTK_WINDOW (Dialog), GDK_GRAVITY_NORTH_EAST);
        gtk_window_set_transient_for(GTK_WINDOW(Dialog),
GTK_WINDOW(main_window->topLevelWindow));
 (...)

}

regards

PS: sorry if I do not undestand as you expect :S


On 5/9/05, Neo Liu <[EMAIL PROTECTED]> wrote:
> Gurus,
> 
> I want to implement below behavior
> 
> 1.main window has a button.
> 2.when the button is pressed, a new modal window pops up.
> 
> However, it seems neither gtk_window_set_modal nor gtk_grab_add does help.
> 
> What's the right way to use that? Is there any sample code that I can
> refer to?
> 
> thanks in advance and best regards,

-- 
Antonio Gomes
E-mail: [EMAIL PROTECTED]
Embedded Linux Lab - 10LE
INdT - Instituto Nokia de Tecnologia (Manaus/Br)
NOKIA's Technology Institute
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to