| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Use .popup, which is already in use elsewhere, fits better with
the other button differentiating style classes, and does not
interfere with menus.
|
|
|
|
|
| |
Change the style class to .menubutton, to avoid interference
from GtkMenu theming.
|
|
|
|
|
| |
Add a .menu style class to differentiate menu buttons from normal
ones.
|
|
|
|
| |
This avoids pspec lookup overhead in g_object_notify.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The visibility toggling happening on ::click() relied implicitly
on the popover animation, but breaks on disabled animations. The
recursion happening within gtk_toggle_button_set_active() (which
triggers ::clicked when changing state) makes this vfunc to run
again, inverting the visibility of the popover in result.
Fix this by explicitly checking about recursion, we want the
button to be toggled to the right state, but we don't want the
callback running again.
https://bugzilla.gnome.org/show_bug.cgi?id=752577
|
|
|
|
|
|
| |
GtkInspector is opening a separate display connection, which makes
it more likely that gtk_get_current_event() returns an event from
the "wrong" display.
|
|
|
|
|
|
| |
This was broken in 0796d7b6ff9393746d.
https://bugzilla.gnome.org/show_bug.cgi?id=751018
|
|
|
|
|
|
|
|
|
| |
We were getting ourselves in trouble by casting touch events
to GdkEventButton and poking directly at their internals. Instead,
use GdkEvent API to get what we need.
This fixes a crash when using the gear menu in epiphany with
touch. The same crash also occurred in testmenubutton.
|
|
|
|
| |
Preserve the symmetry in set_align_widget_pointer.
|
|
|
|
|
|
| |
Rework the way we assign an accessible name to menu buttons,
to make sure we pick up a label, should the button contain
one, and only override the name with "Menu" as a fallback.
|
|
|
|
|
|
|
|
|
| |
This happens on button release, which is more convenient if the gesture
can be consumed by something else (eg. window dragging), and already behaves
correctly wrt cancelled gestures, broken grabs, etc.
This also allows us to unify pointer and keyboard behavior, popping up the
menu widget in a single place.
|
|
|
|
|
|
|
|
|
|
|
| |
While a popover is hiding, the modal grab is already gone and the toggle
button is clickable again, but clicking again at that time will result in
gtk_widget_show() trying to show an already shown widget (although fading
out and hidden soon) and the toggle button activated.
So let the menubutton set the active status only if the menu/popover
widget wasn't already shown, and ensure this doesn't get triggered by
double/triple button press events.
|
|
|
|
|
|
|
| |
Detach the previous popover from the toplevel when a new one
is set. This should fix
https://bugzilla.gnome.org/show_bug.cgi?id=741652
|
| |
|
|
|
|
|
|
|
|
|
| |
As an actionable (inherited from GtkButton), a GtkMenuButton
should not set its own sensitivity when it has an action-name
set, but just follow the enabled state of the associated
action.
https://bugzilla.gnome.org/show_bug.cgi?id=738083
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=735545
|
|
|
|
|
|
|
|
| |
GtkArrow is deprecated and is not used internally anymore by the
menu button. Document also the fact that if no direction is specified
then the view-context-menu icon is shown.
https://bugzilla.gnome.org/show_bug.cgi?id=733441
|
|
|
|
| |
Just a small cleanup, we can use a proper type.
|
| |
|
|
|
|
|
| |
This makes it easier to construct gear menus: just set the direction
to 'none', no need to manually construct an image.
|
| |
|
|
|
|
|
| |
This is in preparation for GtkArrow getting deprecated.
https://bugzilla.gnome.org/show_bug.cgi?id=729564
|
|
|
|
|
| |
The previous commit changed the property declaration, but
omitted the actual change of the default.
|
|
|
|
|
|
|
| |
When constructing from a menu model, use popovers by default.
This change has the potential to cause some size problems for
applications with big gear menus, so we're doing it early in
the cycle to uncover and fix those.
|
|
|
|
|
|
| |
With the code as written, use-popover has to be set first,
before the model. To avoid this ordering dependency, re-set
the model when use-popover changes.
|
| |
|
|
|
|
|
|
| |
The convention we follow is that the PROP_foo define should
match the property name. Therefore, change PROP_MODEL to
PROP_MENU_MODEL to match "menu-model".
|
|
|
|
|
|
|
| |
The addition of popovers to menu buttons broke this, by making
the toolbuttons stay insensitive.
https://bugzilla.gnome.org/show_bug.cgi?id=724799
|
|
|
|
| |
Instead of Return value:
|
|
|
|
|
|
|
| |
This gives a critical warning since that function expects a
valid widget.
https://bugzilla.gnome.org/show_bug.cgi?id=724407
|
|
|
|
|
| |
This was changed by accident. The default value is supposed
to be FALSE, for now.
|
|
|
|
|
| |
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add api to allow explicitly setting a GtkPopover instead of
a GtkMenu as the popup of a GtkMenuButton. Also, add api to
instruct the menu button to construct a popover when given
a menu model.
We set the style class "menu-button" on the button only when
it pops up a menu, to allow different treatment for the active
state of the button in the two cases.
https://bugzilla.gnome.org/show_bug.cgi?id=723878
|
| |
|
| |
|
|
|
|
| |
https://wiki.gnome.org/Design/OS/Typography
|
| |
|
| |
|
|
|
|
|
|
| |
Use the menu allocation instead of the request size.
https://bugzilla.gnome.org/show_bug.cgi?id=720939
|
|
|
|
|
| |
Requested in
https://bugzilla.gnome.org/show_bug.cgi?id=720945
|
|
|
|
|
|
|
|
| |
The button now claims its menu as a child for a11y purposes,
which makes it possible for ATs to see it when the navigate
the tree top-down.
Update the a11y test to match.
|
|
|
|
|
| |
These commonly have just an image in them, so lets at least
call them 'Menu'.
|
| |
|
|
|
|
|
|
|
|
| |
Keyboard activation relies on the menu not being visible,
so ensure that it isn't when the menu is attached.
Problem tracked down by Vincent Le Garrec,
https://bugzilla.gnome.org/show_bug.cgi?id=688738
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=702996
|
|
|
|
|
|
| |
The documentation for GtkMenuButton was still referring to a
"menu" properties in several places, though it has been renamed
to "popup".
|
|
|
|
|
|
| |
We must make sure to remove the weak pointer when disposing the widget
or when resetting the align widget otherwise glib will try to nullify
invalid memory.
|
|
|
|
| |
Prevent menu to be detached multiple times.
|
|
|
|
|
| |
7c6454246e7fa181d9e16f3520bc6d3765168f40 removed the property, but
forgot to change the name in a g_object_notify().
|
|
|
|
|
| |
See that it was already announced to be removed before 3.6.0
but we forgot.
|