Results 1 to 4 of 4

Thread: gtk ui update problem

  1. #1
    Join Date
    Sep 2008
    Beans
    52

    gtk ui update problem

    Hi,

    I'm having a frustrating gtk problem

    I have an external hardware controller with a bunch of knobs, and I have a gtk gui that I need to reflect the state of the controller.

    My problem is with the gui refresh.

    whenever there is a change on the controller, it calls:
    Code:
    gtk_range_set_value(GTK_RANGE(controller)
    unfortunately, the gui only refreshes every two seconds for some reason when I do that. So I've set the function to also call:
    Code:
    Gdk::Window::process_all_updates();
    This works much better, but the gui will regularly hang for a second or two with this method.

    I've been trying to find a cause for this *all day long*, but I can't figure it out. I'm fairly new to gtk, so I'm assuming there's probably something simple I'm not doing.

    Any ideas?

  2. #2
    Join Date
    Sep 2008
    Beans
    52

    Re: gtk ui update problem

    oh, forgot to mention.

    I'm using c++

  3. #3
    Join Date
    Dec 2007
    Location
    .
    Beans
    Hidden!
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: gtk ui update problem

    C++? That first code block looks like C.

    Also you didn't add any functions to the "idle" thread did you?

  4. #4
    Join Date
    Sep 2008
    Beans
    52

    Re: gtk ui update problem

    No... not that I know of at least.

Bookmarks

Posting Permissions

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