Re: PyGObject Maybe bug with alternate row colors in a Gt.TreeView

2018-05-16 Thread Reuben Rissler
On 05/16/2018 01:51 PM, Eric Cashon via gtk-app-devel-list wrote: The following gives an error if I use "cell-background" which is stated in the documentation. Maybe just a typo someplace but "cell_background" seems to work fine for binding the color column to the cell-background property.

Re: clear() on TreeView causes select-events

2018-07-03 Thread Reuben Rissler
On 07/03/2018 05:30 PM, c.buhtz--- via gtk-app-devel-list wrote: Hello I observer an interesting behavior (PyGObject, Gtk3.0, Python3.6, Debian unstable with XFCE desktop): An item (row) in a TreeView is selected (highlighted). Then calling .clear() on the TreeView causes an select-event for

Re: How to scroll to a specific line

2018-07-28 Thread Reuben Rissler
Thanks for the suggestion. Believe it or not, I had just arrived at that same solution! I first tried to use GLib.timeout_add(), and that worked too, if the time was larger than 300 - 400 ms, which is on the verge of annoying. I then tried idle_add(), and I guess that makes the 300-400ms

Re: [PyGObject] Drag & Drop in a TreeView

2018-07-28 Thread Reuben Rissler
If it's only for reordering the elements in the tree view, you can use the built-in Gtk.TreeView.set_reorderable() method [1], and you're all set. You get inserted/deleted signals for moved rows so you can know when and how things changed if needed, and the underlying model is also changing

Re: How to scroll to a specific line

2018-07-27 Thread Reuben Rissler
On 07/26/2018 02:17 PM, John Coppens wrote: get_iter_at_line, place_cursor, place_cursor_onscreen, and others. Even tried to more or less calculate the scroll position and manipulate the vadjustments. An example: itr = self.tbff.get_iter_at_line(linenr)

Re: [PyGObject] Drag & Drop in a TreeView

2018-07-23 Thread Reuben Rissler
On 07/22/2018 04:26 PM, c.buhtz--- via gtk-app-devel-list wrote: I am totally confused about this topic. I think I miss some fundamental understanding on how PyGObject works here. I want to drag & drop items of one TreeView inside itself. Not other widgets or applications. I just want to drag

Re: GTK window winthout main iterator

2018-09-04 Thread Reuben Rissler
Forgive me for second guessing you, but are you definite that that your loop is better/easier to maintain than a Gtk main loop? So far, if I was tempted to implement my own main loop, it wasn't because the Gtk main loop was inferior, but because I was looking at it the wrong way. Definitely

Re: GtkTreeView: how to get the cell with current focus?

2018-07-12 Thread Reuben Rissler
I do this all the time in Python with: def key_tree_tab(self, treeview, event): keyname = Gdk.keyval_name(event.keyval) path, col = treeview.get_cursor() # only visible columns!! columns = [c for c in treeview.get_columns() if c.get_visible()] colnum =

Re: clear() on TreeView causes select-events

2018-07-09 Thread Reuben Rissler
I have had very similar experiences with liststore.clear() in Python3.5 and Mint 18. To work around this I do: store = treeview.get_model() #may not be necessary in your code treeview.set_model(None) store.clear() store.append('my string or etc') treeview.set_model(store) This works.

Re: Python3, GObject objects & models

2018-12-19 Thread Reuben Rissler
So I am assuming that you are looking for a discussion and not for a specific problem to be solved. If this is not the case, please post the code that is not working for you, delete my email and forgive me. On 12/18/2018 01:01 PM, Adam Tauno Williams wrote: I have created, and registered, a

Re: Problem with grids and items spanning more than one column

2019-04-03 Thread Reuben Rissler
On 04/02/2019 05:09 AM, Mike Martin via gtk-app-devel-list wrote: I am using an embedded Gtk grid within a grid , which contains numerous widgets However if I have a widget that spans more than one column it messes up the layout of all other widgets , which seem to position themseleves randomly

Re: ANNOUNCE: Phasing out GTK mailing lists and move to Discord

2019-03-20 Thread Reuben Rissler
RIP gtk-app-devel. :'( I hope this discourse thing succeeds. Personally I find it just another awkward, cumbersome run of the mill QA site. The mailing list should be preserved. But what do I know? I've only seen about 90% of these migrations to forum like sites lose users and community

Re: Setting the scroll position of a GtkTextView in GtkScrolledWindow after render

2019-04-08 Thread Reuben Rissler
On 04/08/2019 09:07 AM, Andri Möll via gtk-app-devel-list wrote: Hey, I can't figure out if it's me or something's amiss. I'm trying to set the scroll position after rendering a GtkTextView in a GtkScrolledWindow, but it's reset to a different value, if it works at all. I've so far tried

Re: liststore issue 1 - iter points to wrong row after sort of column with cellrenderercombo

2019-02-27 Thread Reuben Rissler
On 02/27/2019 06:46 AM, Mike Martin via gtk-app-devel-list wrote: I have come across an issue where the iter points to the wrong row on edited signal after sorting the column (via clicking header). This only happens with edited signal and not editing-started (which is correct) I don't

Re: liststore issue 2 - which 'path' comes from signal

2019-02-27 Thread Reuben Rissler
On 02/27/2019 06:51 AM, Mike Martin via gtk-app-devel-list wrote: according to the docs the path reference is edited signal = path editing-started = path These above two look like something a treeview uses changed = path_string And this one I assume to be coming from a CellRendererCombo?

Re: Changing font of GtkSourceView changes font of GtkSourceMap

2019-02-28 Thread Reuben Rissler
I am not sure if this helps any: #!/usr/bin/env python import gi gi.require_version('GtkSource', '3.0') gi.require_version('Gtk', '3.0') from gi.repository import Gtk, GtkSource, GObject, Pango class GUI:     def __init__(self):         GObject.type_register(GtkSource.View)         window =

Fwd: Re: Changing font of GtkSourceView changes font of GtkSourceMap

2019-03-01 Thread Reuben Rissler
me__ == "__main__": app = GUI() Gtk.main() Give it try and change the font of the view. You'll see that the font of the map changes to the same font as the view, including *the same size*. Thank you. On Thu, Feb 28, 2019 at 8:47 AM Reuben Rissler wrote: I am not sure if this help

Re: Changing font of GtkSourceView changes font of GtkSourceMap

2019-03-01 Thread Reuben Rissler
I filed the following bug: https://gitlab.gnome.org/GNOME/gtksourceview/issues/41, which promptly got close as "expected behavior". Apparently, you'd either have to use CSS or install a new font map for the GtkSourceMap. Sure is disappointingly helpful. I can't figure out the connection

Re: Scrolling to a line in GtkTextView

2019-02-12 Thread Reuben Rissler
On 02/12/2019 12:47 PM, Mitko Haralanov via gtk-app-devel-list wrote: Hi, In my application, I would like to have a GtkTextView be scrolled to a particular line after the GtkTextBuffer is loaded. This was already discussed

Re: Force liststore to update when leaving treeview

2019-02-12 Thread Reuben Rissler
On 02/12/2019 11:32 AM, Mike Martin via gtk-app-devel-list wrote: Is this possible? Yes. I did this a while back, but would need to find an archive to provide you with exact code. I have a (for example) a grid which contains Various action widgets And a Treeview based on a liststore Is

Re: Force liststore to update when leaving treeview

2019-02-12 Thread Reuben Rissler
On 02/12/2019 12:25 PM, Mitko Haralanov via gtk-app-devel-list wrote: One idea is to hook the widget to the "leave-notify-event", which will be triggered when the mouse leaves the widget. Have you used this with a GtkTreeView? I mean, actually implemented what Mike Martin is requesting? On

Re: Using different signals depending on which row of of a treeview

2019-04-29 Thread Reuben Rissler
On 04/29/2019 10:36 AM, Mike Martin via gtk-app-devel-list wrote: Has anyone done anything like this? I haven't, but you are welcome to my simple Glade mockup:                               1     one         2     two