Re: [pygtk] Translation: Different locales directories

2010-05-31 Thread Walter Leibbrandt
where this value is imported/accessed by the application. [1]: https://translate.svn.sourceforge.net/svnroot/translate/src/trunk/translate/misc/file_discovery.py [2]: https://translate.svn.sourceforge.net/svnroot/translate/src/trunk/virtaal/virtaal/views/baseview.py HTH, -- Walter Leibbrandt

Re: [pygtk] Any way to create a drop down menu for a button without using gtk.MenuToolButton?

2010-05-14 Thread Walter Leibbrandt
The biggest issue I had was calculating the menu's position (relative to the button, see the _calculate_popup_pos() method), but it's mostly working. HTH, -- Walter Leibbrandt Software Developer Recent blogs: * Ubuntu PPA for Translate Toolkit and Virtaal http://www.translate.org.za

Re: [pygtk] Get textview from scrolledwindow

2010-03-02 Thread Walter Leibbrandt
Op 02/03/2010 12:44, Alexander Kuleshov het geskryf: Hi to all. I have one gtk.ScrolledWindow and gtk.textView in it. How can i get this textview? textview = scrolledwindow.child -- Walter Leibbrandt Software Developer Recent blogs: * Ubuntu PPA for Translate Toolkit

Re: [pygtk] where is the api for window.connect

2009-12-07 Thread Walter Leibbrandt
of it the trtoral is in http://www.pygtk.org/pygtk2tutorial/ch-GettingStarted.html#sec-HelloWorld All widgets inherit from GObject, where connect() comes from. http://library.gnome.org/devel/pygobject/stable/class-gobject.html#method-gobject--connect -- Walter Leibbrandt Software Developer

Re: [pygtk] Popup always on top of everything

2009-11-16 Thread Walter Leibbrandt
, -- Walter Leibbrandt Software Developer Recent blogs: * Ubuntu PPA for Translate Toolkit and Virtaal http://www.translate.org.za/blogs/walter/en/content/ubuntu-ppa-translate-toolkit-and-virtaal ___ pygtk mailing list pygtk@daa.com.au http

Re: [pygtk] How do I accumulate return values from a signal

2009-09-29 Thread Walter Leibbrandt
, you have the opportunity to use it in any signal handler. So, in your case, you can simply use an attribute of the object that the handlers modify. HTH -- Walter Leibbrandt Software Developer Recent blogs: * Showing the current git branch in the Bash prompt http

Re: [pygtk] Creating an object browser

2009-08-28 Thread Walter Leibbrandt
of the TreeView has two cell renderers, though: a CellRendererPixmap for the icon and a CellRendererText for the object name. -- Walter Leibbrandt Software Developer Recent blogs: * Conquering the CellRendererWidget http://www.translate.org.za/blogs/walter/en/content/conquering

Re: [pygtk] Make the TreeView widget look different (like in Transmission)

2009-07-27 Thread Walter Leibbrandt
(the business end of the render_minimal() function), you can see that the 4 wrapped cell renderers' rendering functions are simply called with modified areas. HTH, -- Walter Leibbrandt Software Developer Recent blogs: * Conquering the CellRendererWidget http://www.translate.org.za

Re: [pygtk] liststore column names

2009-07-20 Thread Walter Leibbrandt
Imre Horvath wrote: How can I get the column names in a liststore? [column.get_title() for column in treeview.get_columns()] I assume you are referring to the column names of a gtk.TreeView, since gtk.ListStores don't have column names. -- Walter Leibbrandt Software

Re: [pygtk] Problem in fetching Unicode from URL and displaying it in PyGTK widget

2009-07-17 Thread Walter Leibbrandt
(match.group(1), 16)) + data[match.end():] match = htmluni.search(data) -- Walter Leibbrandt Software Developer Recent blogs: * Conquering the CellRendererWidget http://www.translate.org.za/blogs/walter/en/content/conquering-cellrendererwidget

Re: [pygtk] what key is pressend, key-press-event

2009-07-15 Thread Walter Leibbrandt
according to http://library.gnome.org/devel/pygtk/2.14/gdk-constants.html#gdk-modifier-constants HTH, -- Walter Leibbrandt Software Developer Recent blogs: * Conquering the CellRendererWidget http://www.translate.org.za/blogs/walter/en/content/conquering-cellrendererwidget

Re: [pygtk] Internationalization my App

2009-06-17 Thread Walter Leibbrandt
a gtk.HBox containing an image (the stock icon) and a label. HTH, -- Walter Leibbrandt Software Developer Recent blogs: * Conquering the CellRendererWidget http://www.translate.org.za/blogs/walter/en/content/conquering-cellrendererwidget

Re: [pygtk] problem with focus in notebook

2009-06-04 Thread Walter Leibbrandt
(the page's child). HTH, -- Walter Leibbrandt Software Developer Recent blogs: * Conquering the CellRendererWidget http://www.translate.org.za/blogs/walter/en/content/conquering-cellrendererwidget ___ pygtk mailing list pygtk@daa.com.au http

Re: [pygtk] Rendering arbitrary widgets in a CellRenderer

2009-05-20 Thread Walter Leibbrandt
set_size_request(). Just using size_request() should do what you want. For some inexplicable reason I've always believed that get_size_request() and size_request() are the same. Thank you for enlightening me, it helped a lot. -- Walter Leibbrandt Software Developer Recent blogs

Re: [pygtk] Rendering arbitrary widgets in a CellRenderer

2009-05-13 Thread Walter Leibbrandt
Walter Leibbrandt wrote: Hi, I took another swing at creating a custom cell renderer that can render any arbitrary widget in a TreeView. It currently works, albeit with a few annoyances. The source is available at https://translate.svn.sourceforge.net/svnroot/translate/src/trunk/virtaal

[pygtk] Rendering arbitrary widgets in a CellRenderer

2009-05-08 Thread Walter Leibbrandt
://translate.svn.sourceforge.net/svnroot/translate/src/trunk/virtaal/virtaal/views/unitview.py Any insight would be greatly appreciated. Thanks in advance, -- Walter Leibbrandt Software Developer Recent blogs: * Firefox-style button with a pop-up menu http://www.translate.org.za/blogs/walter/en/content

Re: [pygtk] Combobox with thousands of rows

2009-03-26 Thread Walter Leibbrandt
users have no knowledge about the data they are looking for, then your best bet is probably a TreeView. -- Walter Leibbrandt Software Developer Recent blogs: * Firefox-style button with a pop-up menu http://www.translate.org.za/blogs/walter/en/content/firefox-style-button-pop

Re: [pygtk] quoting text for markup

2009-03-19 Thread Walter Leibbrandt
should also quote your markup strings as such. That means that an should become amp;. HTH, -- Walter Leibbrandt Software Developer Recent blogs: * Firefox-style button with a pop-up menu http://www.translate.org.za/blogs/walter/en/content/firefox-style-button-pop-menu

Re: [pygtk] Fwd: Is there a way to use markup in gtk.CellRendererCombo's popup using pygtk?

2009-03-16 Thread Walter Leibbrandt
. This is the first time that I see the CellRenderer of a CellRenderer coming into play. :) HTH, -- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer +27 12 460 1095 (w) Translate.org.za Recent blogs: * Firefox-style button with a pop-up

[pygtk] Text border inside a TextView

2009-03-11 Thread Walter Leibbrandt
, though, or am I missing something? Does anyone know of an alternative way to draw such a border? Thanks in advance, -- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer +27 12 460 1095 (w) Translate.org.za Recent blogs

Re: [pygtk] Callbacks

2009-03-11 Thread Walter Leibbrandt
connect() it returns the handle_id. But if glade is doing this for me, are the handle id's stored somewhere? Surely there has to be a widget.get_handle_id('callback_function') method. I can't seem to find anything on this over the net though. -- Walter Leibbrandt http

Re: [pygtk] Callbacks

2009-03-11 Thread Walter Leibbrandt
is working. What exactly do i have to pass as a parameter. You made reference to passing the handler to it. Cheers Peyman Askari On 11 Mar 2009, at 12:53, Walter Leibbrandt wrote: Hi, It seems that this has been asked before: http://osdir.com/ml/gnome.gtk+.python/2003-04/msg00089.html Short

Re: [pygtk] Inserting items into ComboBox

2009-03-06 Thread Walter Leibbrandt
with such an initialized ComboBox! I've attached my test program and Glade file as well. This is certainly a new discovery for me and should make it much simpler to work with simple ComboBoxes. HTH, -- Walter Leibbrandt http://translate.org.za/blogs/walter Software

Re: [pygtk] Gtk+ RC Files for Styling Widgets?

2009-03-05 Thread Walter Leibbrandt
http://www.pygtk.org/docs/pygtk/class-gtkrcstyle.html Kevin wrote: I see nothing about GTK RC files in the PyGTK documentation. Is there perhaps some way to wrap the relevant functions? -- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer

Re: [pygtk] Inserting items into ComboBox

2009-03-03 Thread Walter Leibbrandt
) combo.add_attribute(cellr, 'text', 0) return combo See the documentation for the used methods for more information. HTH -- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer +27 12 460 1095 (w) Translate.org.za Recent

Re: [pygtk] date changed signal ?

2009-03-02 Thread Walter Leibbrandt
to be being used - but I'm trying to be thorough :-) Thanks I am not aware of any such signal in gtk-/gobject space. Maybe some other service (like dbus) has something that can suite your needs? Personally, I would go for a simple gobject.timeout_add() call. HTH -- Walter Leibbrandt

Re: [pygtk] Restore a scrolling position

2009-02-19 Thread Walter Leibbrandt
bound of the possible scroll ? -- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer +27 12 460 1095 (w) Translate.org.za Recent blogs: * Virtaal's MVCisation http://www.translate.org.za/blogs/walter/en/content/virtaals

Re: [pygtk] Getting string with in pixels

2009-02-13 Thread Walter Leibbrandt
message: AttributeError: 'gtk.Style' has no attribute 'font'. Is the FAQ outdated? What syntax should I use? Thank yo Try widget.get_style().get_font(). -- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer +27 12 460 1095 (w

Re: [pygtk] Scrolling to the previous position in a TreeView

2009-01-30 Thread Walter Leibbrandt
-- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer +27 12 460 1095 (w) Translate.org.za Recent blogs: * Virtaal's MVCisation http://www.translate.org.za/blogs/walter/en/content/virtaals-mvcisation * Things that changed

Re: [pygtk] Scrolling to the previous position in a TreeView

2009-01-30 Thread Walter Leibbrandt
scroll position is a very common usecase. (but it looks like the documentation on this part is very weak. Look at the get_vadjustement which refers to set_vadjustement which, itself, just says : it set the adjustement without explaining what an adjustement is) -- Walter Leibbrandt

Re: [pygtk] Event ordering

2009-01-27 Thread Walter Leibbrandt
in the entry to the end of the text whenever focus changes to the entry, but doing this from focus-in-event doesn't work (the entire text still gets highlighted). http://www.pygtk.org/docs/pygtk/class-gtkwidget.html#signal-gtkwidget--configure-event -- Walter Leibbrandt http

Re: [pygtk] get_active() of CheckButton added to ScrolledWindow

2009-01-20 Thread Walter Leibbrandt
___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ -- Walter Leibbrandt http

Re: [pygtk] Entry.connect_after('changed', ...) doesn't see updated cursor position

2009-01-05 Thread Walter Leibbrandt
/autocompletor.py). It is written to not make assumptions about the source of the strings, but only supports TextViews at the moment. :/ HTH Walter -- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer +27 12 460 1095 (w

Re: [pygtk] Getting Widget geometry

2009-01-05 Thread Walter Leibbrandt
of (hopefully) saving you a few hours, have a look at the TMWindow.update_geometry() method in https://translate.svn.sourceforge.net/svnroot/translate/src/trunk/virtaal/virtaal/plugins/tm/tmwidgets.py. HTH Walter -- Walter Leibbrandt http://translate.org.za/blogs/walter Software

[pygtk] Replacing text with paste

2009-01-05 Thread Walter Leibbrandt
, Walter -- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer +27 12 460 1095 (w) Translate.org.za Recent blogs: * Virtaal's MVCisation http://www.translate.org.za/blogs/walter/en/content/virtaals-mvcisation * Things

[pygtk] Getting widget geometry

2008-12-12 Thread Walter Leibbrandt
be greatly appreciated. Thanks in advance, Walter -- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer +27 12 460 1095 (w) Translate.org.za Recent blogs: * Virtaal's MVCisation http://www.translate.org.za/blogs/walter/en/content

Re: [pygtk] Notebook

2008-12-04 Thread Walter Leibbrandt
? -- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer +27 12 460 1095 (w) Translate.org.za Recent blogs: * Things that changed the way I code http://www.translate.org.za/blogs/walter/en/content/things-changed-way-i-code

Re: [pygtk] Moving two windows at the same time

2008-12-04 Thread Walter Leibbrandt
@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ -- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer +27 12 460 1095 (w) Translate.org.za Recent blogs: * Things

Re: [pygtk] examples

2008-11-17 Thread Walter Leibbrandt
For PyGtk, the pygtk-demo program (that should be installed with PyGtk) contains some great examples. See http://mysql-python.sourceforge.net/ for more information about using MySQL in Python. Regards, Walter -- Walter Leibbrandt http://translate.org.za/blogs/walter Software

Re: [pygtk] Application name is '-c'

2008-10-14 Thread Walter Leibbrandt
, 2008, at 6:56 AM, Frédéric wrote: Le 14/10/2008, Walter Leibbrandt [EMAIL PROTECTED] a écrit: This is just a hunch, but I'll bet that you don't get that behavior when you run your program from the command-line? My first guess is that it has something to do with the way in which your program

Re: [pygtk] Application name is '-c'

2008-10-14 Thread Walter Leibbrandt
Frédéric wrote: Le 14/10/2008, Walter Leibbrandt [EMAIL PROTECTED] a écrit: No, it won't work, at least in local, because I would have a papywizard.py file which will mask the papywizard/ module. So the import will fail. That's why I used a shell script. But it should work once installed

Re: [pygtk] Change the appearance for all labels in a glade file

2008-10-08 Thread Walter Leibbrandt
in glade_xml.get_widget_prefix('') if w is gtk.Label] /code Although I would also suggest looking at RC files if it's applicable. Regards, -- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer +27 12 460 1095 (w) Translate.org.za

[pygtk] Connecting gtk.MenuItems to existing accelerators

2008-10-02 Thread Walter Leibbrandt
-connected accelerator handlers (self._on_undo and self._on_search) when the related menu item is activated. Thanks in advance. Regards, -- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer +27 12 460 1095 (w

Re: [pygtk] prevent gtk.Dialog from closing

2008-09-09 Thread Walter Leibbrandt
like to urge you to reconsider altering this. From a UI design point-of-view, closing a dialog should be enough of a response from the user (ie. the same as if he hit Cancel). Make sure that you want to break this convention before doing so. Regards, Walter -- Walter Leibbrandt

Re: [pygtk] PyGTK and threading

2008-08-18 Thread Walter Leibbrandt
that article is written for use with Gtk#, the (supported) concepts are the same for PyGtk. Personally, I have not tried to multi-thread an app with PyGtk, but I can assure you that it was a mess with Gtk#. :P Good luck! Walter -- Walter Leibbrandt http://translate.org.za

Re: [pygtk] gtk.Assistant Question

2008-08-06 Thread Walter Leibbrandt
/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ -- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer +27 12 460 1095 (w) Translate.org.za Recent blogs: * Auto-completion and auto-correction for Gtk

[pygtk] Custom EntryCompletion

2008-08-05 Thread Walter Leibbrandt
(match_func), but match_func() is then never called. Any response will be greatly appreciated. Thanks in advance, Walter -- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer +27 12 460 1095 (w) Translate.org.za Recent blogs

Re: [pygtk] Formatting a spinbutton's display

2008-07-28 Thread Walter Leibbrandt
? ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ -- Walter Leibbrandt http://translate.org.za/blogs/walter Software Developer +27 12 460 1095 (w

Re: [pygtk] Serialize a TreeStore

2008-07-21 Thread Walter Leibbrandt
Try serializing the data in/about the TreeStore rather than the object itself. Richie Ward wrote: I need to serialize a TreeStore. I tried to use pickle with no luck. Is there a nice clean way that I can achieve this? The reason I want this is so that I can save all the data in my program, so

Re: [pygtk] spam?

2008-07-09 Thread Walter Leibbrandt
No, you are certainly not. I currently have about 60 PyGtk ML messages from April 2007 through January 2008. And I've only been a member for about a month! Weird... Yann Leboulanger wrote: Am I the only one to be spammed by quoll.daa.com.au with mails from pygtk ML from 2007 ? begin:vcard

Re: [pygtk] Multilevel ListStore

2008-07-08 Thread Walter Leibbrandt
Hi, Run pygtk-demo. The only real difference to a normal ListStore is specifying the parent gtk.TreeIter when you add rows: code model = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_STRING) parentIter = model.append(None) model.set(parentIter, 0, Parent (1st col), 1, Parent (2nd col)

Re: [pygtk] Underlining text when spell-checking

2008-07-07 Thread Walter Leibbrandt
Hi, With a quick search I found libgtkspell and consequently pygtkspell (http://www.pygtk.org/pygtkspell/ - although I can't access pygtk.org atm). Maybe that will help? Regards, Walter Samuel Abels wrote: Hi, Any idea how to spell check underline the text in a textview? Looking at the

Re: [pygtk] gtkspell breaks the TextView / accessing invalidated iterators

2008-07-07 Thread Walter Leibbrandt
Oh, sorry. Looks like you found pygtkspell. :P Samuel Abels wrote: Hi, The following code works flawlessly when the gtkspell line is commented out, and breaks when gtkspell is enabled. -- import gtk, gtkspell, locale class Window(gtk.Window): def __init__(self):

Re: [pygtk] Dialog without window decoration

2008-06-26 Thread Walter Leibbrandt
... or http://www.pygtk.org/docs/pygtk/class-gtkwindow.html#method-gtkwindow--set-type-hint if your window is already created. Bertrand Son Kintanar wrote: On Thu, Jun 26, 2008 at 3:14 PM, Frédéric [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Is there a way to have dialogs

[pygtk] General PyGtk design question

2008-06-25 Thread Walter Leibbrandt
Good day, I would just like to ask a question about the design of PyGtk: What were the reasons for the C-like deisgn of PyGtk? For example having to use label.set_text('bleh') in stead of label.text = 'bleh' and txt = label.get_text() in stead of txt = label.text. Not that I'm criticizing,

Re: [pygtk] Close button on gtk.AboutDialog

2008-06-24 Thread Walter Leibbrandt
Hi, Try this: code self.aboutdialog = gtk.AboutDialog() self.aboutdialog.set_version('0.0.1') response = self.aboutdialog.run() self.aboutdialog.hide() /code Seeing as gtk.AboutDialog inherits from gtk.Dialog, the right way to use it would be to call the run() method - which automatically

Re: [pygtk] gtk.ListStore columns in a gtk.ComboBox (added full code listing)

2008-06-23 Thread Walter Leibbrandt
Hi, Having recently had my own struggle with ComboBoxen (more specifically ComboBoxEntry's), I can sum up my experience with the following statement: (Py)Gtk wants ComboBoxes' models to have a str column first! I've tried using a ListStore(gobject.TYPE_PYOBJECT) (for my own models) with