Re: [pygtk] Newbie question
On Sun, May 30, 2010 at 10:49 PM, Brian Rowlands (Greymouth High School) wrote: > > My simple question is: how do I reference a textfield [ example ‘no_teams‘ ] > when the button ‘on_show_settings’ is clicked. Say, print it’s contents. > > Any help greatly appreciated. > You want to use builder.get_object('no_teams') to reference the textfield. You can either pull out the specific fields in __init__ (like you did with the window) or save the builder and look up the fields when you need them. Any questions related to PyGTK are appropriate for the list, though it's recommended that you consult the FAQ (handily linked in the list footer) as a first point of reference. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
[pygtk] Translation: Different locales directories
Hello List, i got an application with translation. I am doing this... gettext.bindtextdomain(APP_NAME, LOCALE_DIR) gettext.textdomain(APP_NAME) But my problem is, that I do different packaging types like source, deb and rpm. In these different cases, the location of the mo file is not the same for the different packages. What is the recommended way to handle this? Can I provide more than one locale dirs? Should I change the code, for each packaging type? Should I set an environment variable that contains the correct locales dir? Thanks a lot and kind regards Cornelius signature.asc Description: OpenPGP digital signature ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] Custom gtk.Clipboard function for TextView?
Disreguard this, I decided to use a custom key combination instead, and now everything is working as I want it to. :) Smartboy On Sat, May 29, 2010 at 4:39 PM, Smartboy wrote: > So I am trying to do some custom conversions of some pango formatting > in my application when I copy text from it to the clipboard, and > created a signal which is called when something is copied from it. It > seems that it doesn't do what I want, however, and the default copy > function stays in place (the text turns out plain when I paste it in > another non-formatted textbox). Would there be any way to set the > clipboard and then keep the text from being copied as per the default > and instead using the converted text which I already have? > > The snippet of code pertaining to what I want to do is attached, note > that self.ipb is the buffer for my textView. > > Thanks, > Smartboy > ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
[pygtk] Newbie question
Hi Guys I'm very, very new to both Python and Glade and I'm not even sure if I should be posting to this list. Anyway, here goes as I need help - even a useful reference. I'm working on a Win32 platform and have begun to create a python program as follows: #!/usr/bin/env python import pygtk pygtk.require("2.0") import gtk import sys #>>> handles class handles: def __init__(self): self.gladefile = "Bowls.glade" def on_quit_clicked(event): sys.exit(1) def on_tournament_destroy(event): sys.exit(1) def on_show_settings_clicked(event): pass #>>> define main class EventApp: def __init__(self): # set the glade file builder = gtk.Builder() builder.add_from_file("Bowls.glade") self.window = builder.get_object("tournament") builder.connect_signals(handles.__dict__) #>>> run application if __name__ == '__main__': w = EventApp() w.window.show() gtk.main() My simple question is: how do I reference a textfield [ example 'no_teams' ] when the button 'on_show_settings' is clicked. Say, print it's contents. Any help greatly appreciated. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/