Re: Working with embedded images with GResource, GdkPixbuf and GtkWidget

2018-11-11 Thread infirit via gtk-app-devel-list
. ~infirit ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: PyGObject: ask for system/theme colors

2018-09-15 Thread infirit via gtk-app-devel-list
style_context(). It hold the information you are looking for like font and colour information. You retrieve them with Gtk.StyleContext.get_property() with a Gtk.STYLE_PROPERTY_* property and Gtk.StateFlags.*. ~infirit ___ gtk-app-devel-list mailing list gtk-

Re: Own drag icon with same color and font settings as the default drag icon in a Gtk.TreeView

2018-09-15 Thread infirit via gtk-app-devel-list
Op 15-09-18 om 14:13 schreef infirit: > You use the Gtk.render_* range of functions. There is one for for every > type of content you will want to render onto a cairo surface. > > If you want to render text put it in a Pango.Layout and use > Gtk.render_layout(). Below is a modifie

Re: Own drag icon with same color and font settings as the default drag icon in a Gtk.TreeView

2018-09-15 Thread infirit via gtk-app-devel-list
nt you will want to render onto a cairo surface. If you want to render text put it in a Pango.Layout and use Gtk.render_layout(). ~infirit ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Appending to treestore - how to set selection on new entry?

2018-08-28 Thread infirit via gtk-app-devel-list
r stored in column 2) Next is to get the selection from your view with gtk_tree_view_get_selection and call gtk_tree_selection_select_iter with the toplevel iter from earlier. It should now have selected the newly added row. ~infirit ___

Re: Using SVG for icons (and scaling)

2018-07-18 Thread infirit via gtk-app-devel-list
ace) rsvg_handle_render_cairo(svg, ctx) image = gtk_image_new_from_surface(surface) You may need to handle scale changes by listening to changes of the scale-factor property on the GtkWidget. ~infirit ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.

Re: PyGObject: cell_data_func or own Renderer for date column?

2018-05-11 Thread infirit
ime):     super().__init__()     self._datetime = datetime     do_render(self, cr, widget, bg_area, cell_area, flags):     # implement your own rendering here ~infirit ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: PyGObject: Which types accepted in a Gtk.ListStore

2018-05-11 Thread infirit
h it can’t accept all custom types However, if I remember correctly, in the bindings several native python types like int, float and str are mapped to GObject types automatically. ~infirit ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.or

Re: GtkRevealer glitches the text view drawing

2018-05-04 Thread infirit
und it by queuing a resize which is worth a try. ~infirit ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Accelerators for GtkNotebook to switch between pages

2018-02-03 Thread infirit
ead up on [1] for the details on getting/settings notebook pages. ~infirit [1] https://developer.gnome.org/gtk3/stable/GtkNotebook.html ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Scrolling a GtkTreeview cell

2018-01-24 Thread infirit
a specific size. I would try to drop that limitation and force the size on the parent instead and let the TreeView add scrollbars when needed. ~infirit ps: attachments are not allowed ___ gtk-app-devel-list mailing list gtk-app-devel-list@

Re: GdkPixbuf and click events

2017-08-03 Thread infirit
le button-press-event) and do what you want in a callback function. Note that you have to handle drawing yourself which the docs provide an example of. ~infirit [1] https://developer.gnome.org/gtk3/stable/GtkDrawingArea.html ___ gtk-app-devel-list mai

Re: GtkLabel max-width-chars with ellipsize broken?

2017-06-13 Thread infirit
On 10/06/17 19:39, cecas...@aol.com wrote: > Hi infirit, Hi > Give the hexpand a try and see if that works. It works for me on Python3.5 > and GTK3.18 Define works :) Does it limit to what was set as maximum width chars? When resizing does it use the available space to show mor

GtkLabel max-width-chars with ellipsize broken?

2017-06-10 Thread infirit
character with ellipses or just ellipses. Am I missing something? is this the correct way to force a certain width on the label? Thx ~infirit from gi.repository import Gtk, Pango class MyWindow(Gtk.Window): def __init__(self, *args, **kwargs): super().__init__(default_width=400, default_

Re: Live Thumbnail of Widgets

2017-06-02 Thread infirit
ich one usually draws on but I can imagine you could just as well create a pixbuf miniature. So, get the surface from the cairo context with cairo_get_target, then use gdk_pixbuf_get_from_surface to create the pixbuf. ~infirit ___ gtk-app-devel-list m

Re: Weather API

2017-02-23 Thread infirit
is almost 2 years ago and looking at how broken they are today it seems nobody from the gnome team cares. Don't you think it is a shame that the python binding api docs for libgweather is better than the official ones? So I have no problem is saying gnome documentation suck

Re: Weather API

2017-02-23 Thread infirit
ions > sections. But they are empty, e.g.: > https://developer.gnome.org/libgweather/stable/GWeatherLocationEntry.html > Maybe someone needs to run GTK-Doc to create the manual? Yeah gnome documentation sucks. A reasonable C example can be found in gnome-applets [1]. ~infirit [1] https://gi

Re: GNOME Help Method

2017-02-14 Thread infirit
Op 02/15/2017 om 12:01 AM schreef infirit: > Op 02/14/2017 om 11:29 PM schreef Sascha Manns: >> actually i'm working on a new GNOME-App. >> The codebase is already done. Now i would like to implement a small >> method, which launches yelp with the installed apps helpfiles. &

Re: GNOME Help Method

2017-02-14 Thread infirit
in /yourappname [1]. Then have your app launch the uri relative to the docdir [2]. If you want to integrate this with your autotools build system see [3]. Several tools are available to help you create and edit the pages [4]. ~infirit [1] this is typically /usr/share/doc [2] example uri help://you

Re: gtk3 and fork/exec of non-gtk child

2017-01-14 Thread infirit
l interactions > between forking and system calls like malloc, or threading primitives. There is an example [1] under python that demonstrates why this is a problem quite well. Hope this helps. ~infirit [1] https://jameswestby.net/weblog/tech/14-caution-python-multiprocessing-and-glib-dont-mix.

Re: pango_scan_string() deprecation

2017-01-05 Thread infirit
the looks of it there is no intention just yet to remove it. And there is no replacement but its fairly simple and self contained so you could just copy [2] it and include it in your own code. ~infirit [1] https://bugzilla.gnome.org/show_bug.cgi?id=682840 [2] https://git.gnome.org/browse/pango/tree/pango/pango-uti

Re: Why GTK+ ignore, that someone want's to create own widget ?!

2016-12-13 Thread infirit
dkRGBA *color; gtk_style_context_get (GtkStyleContext, GtkStateFlags, "background-color", , NULL); gdk_rgba_free (color); ~infirit ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Why GTK+ ignore, that someone want's to create own widget ?!

2016-12-13 Thread infirit
ccomplish and others may have alternative solutions. My guess is that you were using the border colour to paint or set something to that colour. A possible option is to use your own CSS and loading it with a GtkCssProvider [1]. ~infirit [1] https://developer.gnome.org/gtk3/unstable/GtkCssProv

Re: SpinButton: how to avoid calling signal handler when set_value()

2016-11-03 Thread infirit
y code (when the dialog is > shown) and by the user (when he wants to change the volume speaker). So you need to keep properties in sync with each other, right? Binding widgets properties is possible even with some conversion, see [1]. As you refuse to give proper example code I'll leave it at t