Re: Detect change with stack/ stackswitcher

2016-05-28 Thread Stefan Salewski
On Fri, 2016-05-27 at 14:32 +0530, Jay Aurabind wrote:
> Hi,
> 
> I have added a stackswitcher to the headerbar, and I also have few
> more button on the header bar. Depending on the stack which user
> selected, I'd like to make changes to the headerbar. I cant seem to
> find a way to do it.
> 


What is your main problem? To make the actual changes, or to get a
signal when stack is switched? For the later connecting to
"notify::visible-child" of GtkStack should work, because GtkStack has
property visible-child, see https://developer.gnome.org/gtk3/stable/Gtk
Stack.html#GtkStack.properties

What you did not tell us: Which GTK version, which OS, which
programming language -- so I am not too surprised that nobody replied.
And when language is a well known one, it may be a good idea to provide
full code of a minimal example. (Maybe for less known language too, I
would like to see how the code looks in Chapel, Rust or Go.) I may
provide a Nim example if that helps. For making the changes in the
header bar, I have no idea, I am not sure what you exactly intent.
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Detect change with stack/ stackswitcher

2016-05-27 Thread Jay Aurabind
Hi,

I have added a stackswitcher to the headerbar, and I also have few
more button on the header bar. Depending on the stack which user
selected, I'd like to make changes to the headerbar. I cant seem to
find a way to do it.

I've seen a question in SO[1] which asks exactly the same question,
but my callback does not get triggered by connecting to
"notify::visible-child" as mentioned in there. Neither do I get any
warning telling the absence of such a signal I'm connecting to.

What is the trick to achieve this ?



[1]:http://stackoverflow.com/questions/29182792/how-to-detect-the-change-of-a-gtkstack-or-gtkstackswitcher

-- 

Thanks and Regards,
Aurabindo J
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list