Commit Graph

23 Commits

Author SHA1 Message Date
Matthias Clasen
c59ef7bf2f stack switcher: Clarify CSS documentation 2015-11-05 08:17:49 -05:00
Matthias Clasen
ead35ee12f stack switcher: Use an element name 2015-11-03 23:24:49 -05:00
Florian Müllner
e364ae3ea8 Use gtk_widget_set_focus_on_click() instead of deprecated setters
https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Debarshi Ray
26b03332a4 GtkStackSwitcher: Don't emit notify::visible-child when setting a stack
Synchronizing the visible child with the switcher's toggle buttons can
lead to GtkButton::clicked being emitted twice. Once for the button
that was active before, and once for the button that we just activated.
This leads to notify::visible-child being called twice and one of
them is with the wrong child.

Let's deal with this in the same way we handle the visible child
changing underneath us.

https://bugzilla.gnome.org/show_bug.cgi?id=749021
2015-05-06 22:31:10 +02:00
Matthias Clasen
972ea14ef6 GtkStackSwitcher: Don't take focus on click
Moving the focus to the stack switcher buttons is
never what is wanted here.
2014-12-09 20:57:58 -05:00
Yosef Or Boczko
bb5574c0bd GtkStackSwitcher: Make the buttons fill vertically
It fix some cases with different height for the buttons,
like with Hebrew character.

https://bugzilla.gnome.org/show_bug.cgi?id=740642
2014-11-27 23:21:35 -05:00
Matthias Clasen
c53f4bb342 GtkStackSwitcher: Pick up the visible child from the stack
We forgot to synchronize the visible child when setting a
stack on the switcher. Oops.
2014-10-06 23:06:09 -04:00
Matthias Clasen
3d7f059087 GtkStackSwitcher: More disconnect fixes
When resetting the stack, don't forget to disconnect signals.

https://bugzilla.gnome.org/show_bug.cgi?id=736307
2014-09-11 20:42:12 -04:00
Matthias Clasen
2e88ae8ad9 GtkStackSwitcher: Disconnect signals when a child is removed
This is quite an oversight, and causes bad things to happen if
the child is later changed.

https://bugzilla.gnome.org/show_bug.cgi?id=736307
2014-09-09 14:48:59 -04:00
Matthias Clasen
bb6057bfb7 GtkStackSwitcher: Simplify setting of .needs-attention
Always add the .needs-attention style class, even if the button
is active. Themes can already avoid showing anything in this case.
2014-07-16 21:08:27 -04:00
Lapo Calamandrei
4053ee0cca GtkStackSwitcher: center the button child
Set button child halign to GTK_ALIGN_CENTER since I need it to style
the needs-attention class, see:
https://bugzilla.gnome.org/show_bug.cgi?id=707153
2014-07-16 19:35:29 +02:00
Paolo Borelli
63b90bb5b8 stackswitcher: do not leak buttons hash table 2014-03-29 23:15:28 +01:00
Benjamin Otte
1d422deb0f stackswitcher: Don't do unneeded update
The update of the needs-attention state is done via its own property,
so it doesn't need to be done via visibility changes.

This patch is largely the result of inspecting the code due to a warning
and not a result of testing. So if issues pop up that bisect back to
this patch, that's why.
2014-02-20 02:10:07 +01:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Jasper St. Pierre
0ff2dbd6fc stackswitcher: Only show a button if the stack child is visible 2013-10-17 16:24:00 -04:00
Matthias Clasen
7439e03f3d Fixups to GtkStack
The GtkStack and GtkStackSwitcher code did not really
follow GTK+ conventions for includes. Fix that, and also
fix up a case of gpointer vs gpointer* confusion
in gtkstack.c.
2013-09-25 23:54:31 -04:00
Paolo Borelli
e59c28743a Add a needs-attention child property to GtkStack
The child property is watched by the StackSwicther which in turns sets a
needs-attention css class on the corresponding button, so that the theme
can for instance show a throbbing animation if one of the hidden pages
needs the user attention.

https://bugzilla.gnome.org/show_bug.cgi?id=707153
2013-09-25 22:34:22 -04:00
Matthias Clasen
d137f74fe9 Remove priv pointer from GtkStackSwitcher
This is a new widget, so lets avoid the unnecessary
priv pointer while we still can.
2013-09-21 23:50:55 -04:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Matthias Clasen
a8a41b52ad GtkStackSwitcher: unset tooltip
It was pointed out to me that we leave the tooltip behind
when setting and unsetting an icon.
2013-04-24 20:10:05 -04:00
Matthias Clasen
6d77bf66ac Typo fix in GtkStackSwitcher docs 2013-04-22 10:25:30 -04:00
Matthias Clasen
8ca73e3258 Add docs for GtkStackSwitcher 2013-04-21 21:51:25 -04:00
Matthias Clasen
2e39c4bab8 Add GtkStack
Add separate GtkStack and GtkStackSwitcher widgets that are an
alternative to GtkNotebook. Additionally, GtkStack supports
animated transitions when changing pages.
These widgets were initially developed in libgd.
2013-04-21 21:51:24 -04:00