Commit Graph

113 Commits

Author SHA1 Message Date
Cosimo Cecchi
143a600466 menubutton: clear arrow_widget on remove()
So that we clear its pointer also in case somebody else calls
gtk_container_remove() on the button.
Fixes criticals at startup in e.g. Nautilus.
2012-09-04 09:38:28 -04:00
Matthias Clasen
95f64a4d4d Revert "menubutton: make it work with custom content in .ui file"
This reverts commit 6e6487b461.
2012-08-31 23:10:30 -04:00
Matthias Clasen
9e4b550c98 GtkMenuButton: Override add
By removing an existing child in add, if it is our own arrow,
we can make things work better in GtkBuilder.

https://bugzilla.gnome.org/show_bug.cgi?id=682291
2012-08-31 22:58:25 -04:00
David Zeuthen
6e6487b461 menubutton: make it work with custom content in .ui file
This was reported in bug 682291.

https://bugzilla.gnome.org/show_bug.cgi?id=682291

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
2012-08-31 22:58:10 -04:00
Ryan Lortie
0244dc8017 GtkMenuButton: rename _set_menu() to _set_popup()
It's too close to the release so we'll keep _set_menu() around, but
deprecate it, pointing to the new API.  It will be removed (and the name
reused) before the 3.6.0 release.

https://bugzilla.gnome.org/show_bug.cgi?id=682235
2012-08-20 17:04:14 -04:00
Matthias Clasen
5a3442bf9c Improve GtkMenuButton menu positioning
Take the menu halign/valign into consideration when positioning
the menu. Also, document the various combinations.

https://bugzilla.gnome.org/show_bug.cgi?id=680988
2012-08-06 22:27:48 -04:00
Jasper St. Pierre
844e793246 menubutton: Clear references in dispose, not finalize
We need to do this here so that an explicit gtk_widget_destroy
on either the widget or a container that holds it will kill the
reference to the menu or model.

https://bugzilla.gnome.org/show_bug.cgi?id=680803
2012-07-31 12:09:05 -03:00
Matthias Clasen
1bcefc47e1 Cosmetic changes 2012-07-13 23:07:25 -04:00
Cosimo Cecchi
598163e526 menubutton: set DROPDOWN_MENU hint on the menu toplevel
So the WM can render the menu shadows correctly, omitting the top side,
in the common case the menu is rendered down from a toolbar.

https://bugzilla.gnome.org/show_bug.cgi?id=679449
2012-07-05 10:16:42 -04:00
Cosimo Cecchi
d22624b18e menubutton: don't dereference NULL GdkEvent
Since we explictly call popup_menu with NULL when it's
keyboard-activated, we need to be careful and not access event->device
without checking for event != NULL before.
2012-06-29 18:30:53 -04:00
Bastien Nocera
9fef2dc0d1 gtkmenubutton: Add menu button widget
As used in Totem and gnome-contacts. The widget
takes either a GtkMenu or a GMenuModel to construct
its menu, and can be given a parent widget to use to
position the drop-down (as used in GtkMenuToolButton).

https://bugzilla.gnome.org/show_bug.cgi?id=668013
2012-06-15 17:24:42 +01:00
Matthias Clasen
2baba250b8 Revert "gtkmenubutton: Add menu button widget"
This reverts commit 9d35f7e512.
2012-05-30 14:45:24 -04:00
Bastien Nocera
9d35f7e512 gtkmenubutton: Add menu button widget
As used in Totem and gnome-contacts. The widget
takes either a GtkMenu or a GMenuModel to construct
its menu, and can be given a parent widget to use to
position the drop-down (as used in GtkMenuToolButton).

https://bugzilla.gnome.org/show_bug.cgi?id=668013
2012-05-30 13:46:40 -04:00