summaryrefslogtreecommitdiff
path: root/gtk/gtkmenubutton.c
Commit message (Collapse)AuthorAgeFilesLines
* menu button: Revisit style class one more timeMatthias Clasen2015-10-301-2/+2
| | | | | | Use .popup, which is already in use elsewhere, fits better with the other button differentiating style classes, and does not interfere with menus.
* Revisit menu button styleMatthias Clasen2015-10-301-2/+2
| | | | | Change the style class to .menubutton, to avoid interference from GtkMenu theming.
* menu button: Add a style classMatthias Clasen2015-10-301-1/+9
| | | | | Add a .menu style class to differentiate menu buttons from normal ones.
* menu button: Convert to g_object_notify_by_pspecMatthias Clasen2015-09-061-52/+52
| | | | This avoids pspec lookup overhead in g_object_notify.
* GtkMenuButton: explicitly protect against recursionCarlos Garnacho2015-07-301-0/+7
| | | | | | | | | | | | | | 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
* Deal with events from wrong displayMatthias Clasen2015-06-151-1/+2
| | | | | | GtkInspector is opening a separate display connection, which makes it more likely that gtk_get_current_event() returns an event from the "wrong" display.
* GtkMenuButton: Make programmatic toggling work againMatthias Clasen2015-06-151-13/+23
| | | | | | This was broken in 0796d7b6ff9393746d. https://bugzilla.gnome.org/show_bug.cgi?id=751018
* GtkMenuButton: Avoid direct button accessMatthias Clasen2015-06-151-8/+22
| | | | | | | | | 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.
* menu button: Minor cleanupMatthias Clasen2015-03-221-1/+1
| | | | Preserve the symmetry in set_align_widget_pointer.
* menu button: Improve accessibilityMatthias Clasen2015-03-131-5/+0
| | | | | | 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.
* gtkmenubutton: Popup menu/popover on GtkButton:clickedCarlos Garnacho2015-03-021-46/+25
| | | | | | | | | 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.
* menubutton: Fix possible button/popover state inconsistencesCarlos Garnacho2015-02-201-2/+8
| | | | | | | | | | | 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.
* GtkMenuButton: Don't leak popoversMatthias Clasen2014-12-171-0/+2
| | | | | | | 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
* menubutton: Fix double freeze_notifyTimm Bäder2014-12-161-2/+2
|
* GtkMenuButton: Submit to actionMatthias Clasen2014-10-091-5/+16
| | | | | | | | | 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
* menubutton: dismiss menu/popover when toggling programmaticallyPaolo Borelli2014-08-281-10/+15
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=735545
* GtkMenuButton: do not mention GtkArrow in the docsPaolo Borelli2014-07-211-1/+4
| | | | | | | | 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
* GtkMenuButton: do not use gpointer for the arrow widgetPaolo Borelli2014-07-211-1/+1
| | | | Just a small cleanup, we can use a proper type.
* Update more places for the changed icon nameMatthias Clasen2014-07-091-1/+1
|
* GtkMenuButton: Use view-context-menu-symbolic when direction is NONEMatthias Clasen2014-07-081-0/+2
| | | | | This makes it easier to construct gear menus: just set the direction to 'none', no need to manually construct an image.
* GtkMenuButton: Use G_PARAM_EXPLICIT_NOTIFYMatthias Clasen2014-06-091-6/+7
|
* Drop GtkArrow use in GtkMenuButtonMatthias Clasen2014-05-131-4/+26
| | | | | This is in preparation for GtkArrow getting deprecated. https://bugzilla.gnome.org/show_bug.cgi?id=729564
* Actually set the default for GtkMenuButton::use-popoverMatthias Clasen2014-04-261-0/+1
| | | | | The previous commit changed the property declaration, but omitted the actual change of the default.
* GtkMenuButton: use popovers by defaultMatthias Clasen2014-04-241-1/+1
| | | | | | | 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.
* menu button: avoid property order dependenciesMatthias Clasen2014-02-221-0/+7
| | | | | | 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.
* menu button: Fix property notificationMatthias Clasen2014-02-221-16/+35
|
* GtkModelButton: fix up namingMatthias Clasen2014-02-221-4/+4
| | | | | | 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".
* Fix GtkMenuToolButtonMatthias Clasen2014-02-211-0/+2
| | | | | | | The addition of popovers to menu buttons broke this, by making the toolbuttons stay insensitive. https://bugzilla.gnome.org/show_bug.cgi?id=724799
* docs: use Returns: consistentlyWilliam Jon McCann2014-02-191-1/+1
| | | | Instead of Return value:
* Do not call popover_set_relative with NULLPaolo Borelli2014-02-191-1/+0
| | | | | | | This gives a critical warning since that function expects a valid widget. https://bugzilla.gnome.org/show_bug.cgi?id=724407
* menu button: Don't set use_popover to TRUE by defaultMatthias Clasen2014-02-101-1/+0
| | | | | This was changed by accident. The default value is supposed to be FALSE, for now.
* Docs: Remove all entities and turn off sgml modeMatthias Clasen2014-02-091-0/+1
| | | | | With all element markup gone, it is time to turn off sgml mode, and get rid of entities as well.
* GtkMenuButton: Support popoversMatthias Clasen2014-02-081-99/+344
| | | | | | | | | | | | | 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
* docs: use proper quotations instead of '*'William Jon McCann2014-02-071-1/+1
|
* docs: use apostrophes in *n'tWilliam Jon McCann2014-02-071-1/+1
|
* docs: use proper apostropheWilliam Jon McCann2014-02-071-1/+1
| | | | https://wiki.gnome.org/Design/OS/Typography
* docs: use proper quotesWilliam Jon McCann2014-02-051-1/+1
|
* docs: use a list instead of a tableWilliam Jon McCann2014-02-041-98/+56
|
* Fix positioning of up menu button popupWilliam Jon McCann2014-01-061-25/+20
| | | | | | Use the menu allocation instead of the request size. https://bugzilla.gnome.org/show_bug.cgi?id=720939
* Nicer nicks for GtkMenuButton propertiesMatthias Clasen2014-01-041-4/+4
| | | | | Requested in https://bugzilla.gnome.org/show_bug.cgi?id=720945
* Improve menubutton a11yMatthias Clasen2013-12-201-0/+3
| | | | | | | | 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.
* Set an accessible name on menu buttonsMatthias Clasen2013-12-201-0/+6
| | | | | These commonly have just an image in them, so lets at least call them 'Menu'.
* Improve struct packing in various placesMatthias Clasen2013-09-211-1/+1
|
* Fix keyboard activation of menu buttonsMatthias Clasen2013-08-181-3/+1
| | | | | | | | 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
* gtk: Use new macros for defining private dataEmmanuele Bassi2013-07-091-4/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=702996
* Documentation fixesMatthias Clasen2013-01-131-5/+5
| | | | | | The documentation for GtkMenuButton was still referring to a "menu" properties in several places, though it has been renamed to "popup".
* gtkmenubutton: remove weak pointer when neededPaolo Borelli2012-11-041-4/+20
| | | | | | 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.
* gtkmenubutton: set menu to NULL in dispose.Paolo Borelli2012-11-041-0/+1
| | | | Prevent menu to be detached multiple times.
* menubutton: don't refer to the non-existant menu propertyCosimo Cecchi2012-10-171-1/+1
| | | | | 7c6454246e7fa181d9e16f3520bc6d3765168f40 removed the property, but forgot to change the name in a g_object_notify().
* GtkMenuButton: remove menu property as it is replaced by popup.Ignacio Casal Quinteiro2012-10-171-16/+1
| | | | | See that it was already announced to be removed before 3.6.0 but we forgot.