Re: [pygtk] [GTK3] get background color

2013-08-01 Thread Osmo Salomaa
01.08.2013 10:09, Yann Leboulanger wrote: On 08/01/2013 02:00 AM, Osmo Salomaa wrote: style.lookup_color("theme_base_color") returns a 0, 0, 0, 0 color here. OK, so that's theme-specific. Some color names might be available regardless of theme, but I don't know whi

Re: [pygtk] [GTK3] get background color

2013-07-31 Thread Osmo Salomaa
ly don't know if they work across different themes. [1] https://git.gnome.org/browse/gnome-themes-standard/tree/themes/Adwaita/gtk-3.0/gtk-main.css -- Osmo Salomaa ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinf

Re: [pygtk] Good way to determine which version of PyGObject is installed

2012-11-18 Thread Osmo Salomaa
d/or > Gio? >>> from gi.repository import GObject >>> GObject.pygobject_version (3, 2, 2) And since there is no PyGLib or PyGio, you don't do the same for those. PyGObject provides the bindings for GObject, Gtk, GLib and any o

[pygtk] Using Gtk.RecentData struct

2012-06-23 Thread Osmo Salomaa
ith a simple Gtk.RecentData() call, but I don't know how to set values for its fields. -- Osmo Salomaa ___ 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] Painting in text view margin and the "draw" signal

2012-02-28 Thread Osmo Salomaa
26.02.2012 13:20, Timo wrote: > Callback works ok here, well, after removing everything after the print > function. Ubuntu 11.10 with GTK 3.2.0 and PyGObject 3.0.0. Thanks. I guess I better file another bug report. -- Osmo Salomaa ___ pygtk m

[pygtk] Painting in text view margin and the "draw" signal

2012-02-25 Thread Osmo Salomaa
eveloper.gnome.org/gtk3/3.3/ch25s02.html -- Osmo Salomaa ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/

[pygtk] Drag and drop in PyGI

2011-07-25 Thread Osmo Salomaa
estDefaults.ALL, [Gtk.TargetEntry.new("text/uri-list", 0, 0)], Gdk.DragAction.COPY) window.connect("drag-data-received", lambda *args: print(args)) window.resize(500, 500) window.show_all() window.connect("delete-event", Gt

[pygtk] TextBuffer, Python 3 and UTF-8

2011-07-23 Thread Osmo Salomaa
ing to insert "åäö." instead of "åäö" doesn't give a warning, but doesn't insert the period. Is this related to the string type changes in Python 2->3? Can I expect Python 3 and non-ASCII text to work in general with PyGI? I'm using Python 3.2 and PyGObject 2.

Re: [pygtk] Receiving click events on a CellRendererPixbuf

2011-05-15 Thread Osmo Salomaa
e of breakage with new versions of GTK+ if you have to write the rendering etc. code yourself -- I stumbled on this a couple times. Can you get the 'on-activate' signal if you subclass gtk.CellRendererPixbuf? -- Osmo Salomaa ___ pygtk mailing

Re: [pygtk] Receiving click events on a CellRendererPixbuf

2011-05-14 Thread Osmo Salomaa
ose should allow you to handle the common cases of single and double left click events and corresponding keyboard events. There's also gtk.Widget's 'button-press-event' etc., coordinates from which you can convert with gtk.TreeView.get_path_at_pos. -- Osmo Salomaa __

Re: [pygtk] gtk.Builder and translation directory

2009-03-07 Thread Osmo Salomaa
els, I also do obj.set_title(_(obj.get_title())) to translate all window titles. -- Osmo Salomaa ___ 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] gtk.Builder and translation directory

2009-03-02 Thread Osmo Salomaa
uilder case it still doesn't work, but that may be some gtk-builder-convert error or some string extraction error, I'm sure I'll figure it out now. -- Osmo Salomaa ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/li

[pygtk] gtk.Builder and translation directory

2009-03-01 Thread Osmo Salomaa
s only for defining the domain. How do I set the directory where to search for translations to strings in GtkBuilder XML files? -- Osmo Salomaa ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK

Re: [pygtk] date & multiline cell renderers for sqlkit

2009-01-08 Thread Osmo Salomaa
As promised, here's code for a multiline text cell renderer that deprecates my old post [1] (as long as you're not using an antiquated version of PyGTK). Shift+Enter or Control+Enter can be used for a linebreak, plain Enter will end editing. — Osmo Salomaa [1] http://www.

Re: [pygtk] date & multiline cell renderers for sqlkit

2009-01-07 Thread Osmo Salomaa
You can subclass gtk.CellRendererText directly. You just need to define 'do_start_editing' method and forget about all the rendering methods in that gtk.GenericCellRenderer subclass. This is not the first time I've received a question about that old post. I'll try

[pygtk] Propagation of keyboard events

2008-12-29 Thread Osmo Salomaa
cus. Basically, I'd want the propagation to work the other way around. [1] http://faq.pygtk.org/index.py?req=show&file=faq03.011.htp -- Osmo Salomaa ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk

Re: [pygtk] To put gnome-terminal in a pygtk application

2007-11-17 Thread Osmo Salomaa
nal plugin, which sets the vte properties to match those defined for gnome-terminal in gconf. http://svn.gnome.org/viewvc/gedit-plugins/trunk/plugins/terminal/ -- Osmo Salomaa <[EMAIL PROTECTED]> ___ pygtk mailing list pygtk@daa.com.au http://www.da

Re: [pygtk] Row number column

2007-05-09 Thread Osmo Salomaa
he row number to update automatically after whatever changes in the list store. def set_row_number(column, renderer, store, itr): renderer.props.text = store.get_path(itr)[0] + 1 column.set_cell_data_func(renderer, set_row_number) -- Osmo Salomaa _

[pygtk] Tooltip markup hack

2006-11-13 Thread Osmo Salomaa
s not work in some cases or that it breaks in future versions of GTK? -- Osmo Salomaa ___ 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/

[pygtk] Button x- and ythicknesses

2006-11-05 Thread Osmo Salomaa
) Can I do this with PyGTK? Or is there perhaps another way to change the x- and ythicknesses of individual buttons? -- Osmo Salomaa ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async

Re: [pygtk] URLs in treeviews

2006-09-09 Thread Osmo Salomaa
return window.set_cursor(NORMAL_CURSOR) However, this is painfully slow! Maybe someone knows a better way? -- Osmo Salomaa <[EMAIL PROTECTED]> ___ pygtk mailing list pygtk@daa.com.au http://

Re: [pygtk] Improving pygtk appearance, or moving to wxPython?

2006-05-04 Thread Osmo Salomaa
t? Would they as well be forced to use the same theme? -- Osmo Salomaa ___ 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/

[pygtk] External activation of gtk.FileChooserButton

2006-01-15 Thread Osmo Salomaa
s the part that needs modification. Thanks, Osmo Salomaa #!/usr/bin/env python import gtk fcbutton = gtk.FileChooserButton('Select File') def on_clicked(*args): fcbutton.activate() # Does not work. button = gtk.Button('Activate file chooser button') button.connect(

Re: [pygtk] Custom cell renderers

2005-04-09 Thread Osmo Salomaa
I didn't manage to subclass CellRendererText but I got the job done the hard way with GenericCellRenderer. Below is the code for an editable multiline text cell renderer. If you try it, use shift/ctrl/alt + return/keypad enter for linebreaking while editing the text in a cell. It seems to work

[pygtk] Custom cell renderers

2005-04-07 Thread Osmo Salomaa
I've been reading some old posts on the list about problems with creating custom cell renderers. After those posts has happened the following: "ANNOUNCE: PyGTK 2.6.0 ... GInterfaces can now be implemented. Overriding GTK+ virtual methods is now supported." If I understood correctly these two were