User Profile

Collapse

Profile Sidebar

Collapse
kdikert
kdikert
Last Activity: Oct 23 '07, 09:49 AM
Joined: Sep 19 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I was just struggling with this myself, so I happen to have example code for a progressbar. In my case the subprocess is run as a thread within the same program, which makes knowing the relative progress of the work easier.

    [CODE=python]
    import gobject
    import gtk
    import threading
    import time

    class TestThread(thre ading.Thread):
    def __init__(self, mainview):
    threading.Threa d.__init__(self )...
    See more | Go to post

    Leave a comment:


  • As I see it, the Queue would not provide any help here, as it is intended for exchanging data between threads. The problem is rather that the thing I want to do can not be done in the worker thread, and so far I did not find the correct way of scheduling my own events to be executed in the main loop. It's the Widget.show_all () call that jams the system if it is not called in the GTK main loop.

    However, now I found a solution to the...
    See more | Go to post

    Leave a comment:


  • Thanks for the hints.I was expecting something like this, and it seems somewhat reasonable that the toolkit allows certain operatinons only from the main thread. I tested the callback approach, but i couldn't get it to work either. Here is some sample code for activating callbacks:

    [CODE=python]
    ...
    class TestThread(thre ading.Thread):
    def __init__(self, mainview):
    threading.Threa d.__init__(self )
    ...
    See more | Go to post

    Leave a comment:


  • kdikert
    started a topic Showing a message dialog from a thread using GTK

    Showing a message dialog from a thread using GTK

    I have a worker thread, and when the worker is done I want it to show a popup dialog. The sample application below demonstrates this. There are two buttons: a "Show dialog" button which immediately displays a dialog, and a "Do work" button which launches a worker thread. The worker thread simulates some work by sleeping a moment, and then attempts to display a dialog.

    The problem is that when the worker thread attempts...
    See more | Go to post

  • kdikert
    replied to What is your OS and Python Version
    Hey all,

    I'm using Windows XP pro and Python 2.5.1
    I'm also developing applications to Nokia N800 which runs on linux.
    See more | Go to post

    Leave a comment:


  • kdikert
    started a topic How to use Styles in PyGTK

    How to use Styles in PyGTK

    The GTK includes a class gtk.Style which affects the look of widgets in a nice and efficient way. However, I have found no clues on how to modify the style within the application. I am trying to find a tutorial that explains how to use and modify the gtk.Style objects. There is also a class gtk.RcStyle, and I'm trying to find out how it relates to gtk.Style.

    The related problem is as follows:

    I am developing an application...
    See more | Go to post
No activity results to display
Show More
Working...