Re: Treeview (liststore) CSS question

2019-03-18 Thread Daniel Kasak via gtk-app-devel-list
On Tue, Mar 19, 2019 at 3:01 AM Mike Martin via gtk-app-devel-list <
gtk-app-devel-list@gnome.org> wrote:

> Is it possible to set different background for a treestore, with a
> liststore, for populated rows v blank area.
>
> ie: If I have a dynamic treeview I would like to have one background colour
> for the rows and another for the treestore where there are no rows
>
> The particular example has the following tree
> Grid,Notebook,grid,scrolledwindow,treeview
>

Use set_cell_data_func:
https://developer.gnome.org/gtk3/stable/GtkTreeViewColumn.html#gtk-tree-view-column-set-cell-data-func

You'd have to do this for every GtkTreeViewColumn you wanted to colour.
Your callback would then fetch whatever value you want to use as a test (
ie to test whether the row is 'empty' or not ), and set the renderer's
"background' property to whatever colour you're after ( the callback get's
passed the renderer ).

Dan
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


ANNOUNCE: Phasing out GTK mailing lists and move to Discord

2019-03-18 Thread Emmanuele Bassi via gtk-app-devel-list
Hi all;

as announced in:

  https://mail.gnome.org/archives/gtk-devel-list/2019-March/msg0.html

we have created a Discourse instance available at:

  https://discourse.gnome.org

After testing it for the past couple of weeks, we're very satisfied with
how the platform behaves, so we are going to officially migrate all
GTK-related discussion lists over to Discourse. This means the following
mailing lists:

 - gtk-devel-list
 - gtk-app-devel-list
 - gtk-list

Will be closed and archived on May 1st, 2019. The archives will remain
public, but you won't be able to subscribe or send emails to the list.

If you're subscribed to any of those lists you will receive a link to
Discourse where you'll be able to create an account on that platform; you
can also use other single sign-on systems, like Google or GitHub; and if
you have an LDAP account on gnome.org, you're strongly encouraged to use
that account.

For further information on Discourse, please see the following topics:

 - https://discourse.gnome.org/t/interacting-with-discourse-via-email/46
 - https://discourse.gnome.org/t/tags-and-watching/94

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[@] ebassi [@gmail.com]
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Treeview (liststore) CSS question

2019-03-18 Thread Mike Martin via gtk-app-devel-list
Is it possible to set different background for a treestore, with a
liststore, for populated rows v blank area.

ie: If I have a dynamic treeview I would like to have one background colour
for the rows and another for the treestore where there are no rows

The particular example has the following tree
Grid,Notebook,grid,scrolledwindow,treeview

thanks
Mike
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Correct way to deallocate an unix signal source

2019-03-18 Thread Philip Withnall
Hi,

On Thu, 2019-03-14 at 00:09 +0100, Enrico Mioso wrote:
> I am facing an issue, where it seems I am not deallocating correctly
> an UNIX signal source. I use
> my_state->unix_signals_src = g_unix_signal_source_new(SIGINT);
> g_source_set_callback(my_state->unix_signals_src, my_unix_signals_cb,
> my_state, NULL);
> my_state->unix_signals_src_tag = g_source_attach(my_state-
> >unix_signals_src, my_state->ctx);
> g_source_unref(my_state->unix_signals_src);
> 
> then, on the exit path of my program, I have something like:
> 
> if (!my_state->sigint_received)
>g_source_destroy(my_state->unix_signals_src);
> 
> my_state->unix_signals_src_tag = 0;

This code seems fine to me, within the context you’ve provided. I
assume you’re also correctly unreffing the GMainContext at the end of
your program.

> This output can be obtained even using the glib.supp file as found in
> glib repository.
> Looking at the file specified by valgrind, glib-unix.c, line 222, I
> can see:
> return _g_main_create_unix_signal_watch (signum);

That valgrind trace looks like an intentional one-time leak, since the
allocation is within pthread_create().

I’d be very happy to accept a patch to GLib to add this to glib.supp. ☺

Philip
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list