Find the answer to your Linux question:
Results 1 to 7 of 7
Is there a good website that is a how to on GTK+? I know about the reference manual and things, but they do not contains good howtos on some things....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Posts
    7

    GTK+ how to


    Is there a good website that is a how to on GTK+? I know about the reference manual and things, but they do not contains good howtos on some things.

  2. #2
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942
    Flies of a particular kind, i.e. time-flies, are fond of an arrow.

    Registered Linux User #408794

  3. #3
    Just Joined!
    Join Date
    Oct 2006
    Posts
    7
    Thank you for your response. This is a great website, but unfortunately doesnt answer the question that I have in specific. I am looking for how to force the focus on a certain window. For example, I have a window pop up when there is an error and there is an OK button on that window. I do not want focus on anyother object until that OK button is pressed.

  4. #4
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942
    Try looking up information on window modality.
    Flies of a particular kind, i.e. time-flies, are fond of an arrow.

    Registered Linux User #408794

  5. #5
    Just Joined!
    Join Date
    Oct 2006
    Posts
    7

    Unhappy

    I tried using gtk_window_set_modal but it didnt work. Let me show you exactly what I am trying to do.

    on_buttonWindowOneOK_clicked(GtkButton *button, gpointer user_data) {
    if(checkVariables()) {
    do stuff....
    } else {
    windowTwo = create_windowTwo();
    gtk_widget_show(windowTwo);
    gtk_window_set_modal(GTK_WINDOW(windowTwo), TRUE);
    }
    }

    I also tried FALSE just in case I didnt understand the documentation. I want windowTwo to be on top of windowOne until the OK button in windowTwo closes windowTwo, but set_modal didnt seem to work. I also tried set_focus.

    I really appreciate any help on the matter and I am sorry if I am being a pain.

  6. #6
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942
    http://developer.gnome.org/doc/API/2...ndow-set-modal

    Read the part about transient windows; that's probably what you have to do. I'm not sure; I've never even used GTK (only straight Xlib for me).
    Flies of a particular kind, i.e. time-flies, are fond of an arrow.

    Registered Linux User #408794

  7. #7
    Just Joined!
    Join Date
    Oct 2006
    Posts
    7
    Same damn result with

    gtk_set_transient_for(GTK_WINDOW(windowTwo), GTK_WINDOW(windowOne));

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •