Re: [pygtk] Notebook tab functions
On Sun, May 26, 2002 at 08:50:03AM -0600, Collins wrote: Is there a way to code a python function that receives an object that can be invoked in that function, i.e. the equivalent of passing in a pointer to funtion in C code and invoking that function or passing its address to another function. Yes, of course; all functions in Python are objects and can be passed normally as parameters. Something like the following code snippet. def callback(widget,entry) : pass def function(rtn1) : . . . b2 = GtkRadioButton(label=Full list) b2.connect(pressed, rtn1, b2) ... ... function(callback) ... Will work, haven't you tried it? Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 272 3330 | NMFL ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Window sizing controls
What are the proper controls to use with windows and the various child widgets to allow everything to resize automatically. I'm using a main window and a notebook with (at least) 3 static tabs. Each tabe has a radio buttons box at the top and a clist in a scroolled window widget at the bottom that receives variable data Right now I'm using no sizing on the main window and the scrolled window has set_usize(100,380) and the clist has set_usize(94,8000). The value 8000 has to be larger than the number of items I insert into the clist, or the scrolled window can't reach all of the items. What would be a better way to do this? -- Collins Richey - Denver Area - WWTLRD? gentoo(since 01/01/01) 2.4.18+(ext3) xfce-sylpheed-mozilla ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] gtk rc files
I'm setting up an application that will be packaged for general use, and I would like to have one or more rc files to control the default settings (styles and default directories, among others). Is it possible to include non-gtk-related items in a gtk rcfile that is processed by rc-parse()? Are there standard methods for parsing the additional values I put in the file? -- Collins Richey - Denver Area - WWTLRD? gentoo(since 01/01/01) 2.4.18+(ext3) xfce-sylpheed-mozilla ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] gtk rc files
On Mon, May 27, 2002 at 08:20:41AM -0600, Collins wrote: Is it possible to include non-gtk-related items in a gtk rcfile that is processed by rc-parse()? Are there standard methods for parsing the additional values I put in the file? IIRC, no, it is not; the rc parser will complain about them. You'll need your own configuration files; I would suggest using Python's ConfigParser module, which works fine. Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 272 3330 | NMFL ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Menu question
On Sun, May 19, 2002 at 01:23:40PM +0800, Anita Zahara wrote: In my program, whenever user click any button from the main menu, there will be a pop up menu. I want to make Any button from the main menu? Wait, this isn't making any sense to me. Do you mean a toolbar? You have a toolbar of buttons that open popup menus? If this is the case, I would recommend using a more traditional layout for your application; it would be highly unfamiliar and cumbersome. The menubar by itself works very well and provides all the functionality you would need. the main menu disabled, so the user will not tend to click any button from the main menu until they quit the pop up menu. I'm afraid I'm not following you here. Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 272 3330 | NMFL ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Menu question
On Mon, May 27, 2002 at 01:19:18PM -0700, Seth Kurtzberg wrote: I think she means that she wants the popup menu to be modal, so that the user has to make a selection (or escape, presuming escape is bound to cancel) before anything on the taskbar responds. Uhh, but the popup menu _is_ modal - if you click anywhere else, it closes by itself. What's up with that? Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 272 3330 | NMFL ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Detecting keystrokes
I'm writing a keyboard grabbing applet to help sufferers of RSI/chronic-pain/carpal-tunnel. The idea is that the applet limits use of the keyboard/mouse to a certain period of time before forcing the user to take a break. I'd like to be able to detect when the user stops typing (if the user stops typing for more than X seconds, I'd like to stop the clock). Is there anyway I can receive an event every time the user hits a key or moves the mouse? (I've tried the solution mentioned in FAQ entry 3.2, but to no avail, it only detects keystrokes when the window has X focus) e ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Copy to X clipboard
My problem is slightly different; I'm copying from a pygtk application to a legacy application using the clipboard. With the code in the selection.py sample file, the middle button paste works but a paste from the taskbar (in gnome-terminal, for example) doesn't work. Using xclipboard I got it to work using Edit/Paste, but the middle button paste doesn't work. That is, I haven't managed to get *both* middle button and Edit/Paste to paste. (In the cases where xclipboard is being used, Edit/Paste works but middle button doesn't.) Obviously I'm missing something. Is this related to selection names, such as GDK_SELECTION_PRIMARY (which I just copied under emacs, and pasted under kmail, and both middle button and edit/paste work, so it is possible). On Monday 27 May 2002 08:57 pm, Christian Reis wrote: On Tue, May 28, 2002 at 09:47:08AM +0800, James Henstridge wrote: X selection handling is an asynchronous operation. When a user copies some text to the clipboard, the text doesn't necessarily get copied anywhere. Instead, the application claims the CLIPBOARD selection. When another app wants to paste the contents of the clipboard, they request the contents of the CLIPBOARD selection in a particular format (eg. UTF8 text, html, an image, etc), which sends a message to the first app. The first app then sends the data back in the requested format. This has the benefit that no data is sent over the wire until it is requested, and content type negotiation can be performed. As you can see, this model breaks down when the selection owner window gets destroyed. There are some tools to work around this problem such as xclipboard. The downside to xclipboard is that every time the CLIPBOARD selection is claimed, the data gets requested by xclipboard, and xclipboard will only store the data in one format. Added http://async.com.br/faq/pygtk/index.py?req=showfile=faq20.010.htp Take care, -- Seth Kurtzberg MIS Corp. Office: (480) 661-1849 Fax: (480) 614-8909 email: [EMAIL PROTECTED] pager: 888-605-9296 or email [EMAIL PROTECTED] ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/