Commit Graph

67 Commits

Author SHA1 Message Date
Maxim Ermilov
3efc7bf7f1 boxpointer: add setPosition method
split out this function from popupMenu
https://bugzilla.gnome.org/show_bug.cgi?id=624900
2010-10-19 23:23:05 +04:00
Maxim Ermilov
4d18d54d9d boxpointer: add animateDisappear/animateAppear methods
https://bugzilla.gnome.org/show_bug.cgi?id=624900
2010-10-19 23:23:00 +04:00
Giovanni Campagna
f336564e19 PopupMenu: add horizontal sliders
Introduce Cairo-drawn sliders to be used in PopupMenus (for example for
volume). They are stylable to some extent (colors, border width, slider
height) and have the standard behaviour of a slider, except they are
completely modal (once you start dragging, all events are intercepted by
the slider, which thus is kept active and highlighted at all times).
They show numeric values between 0 and 1 (scaling must be performed outside)
and emit value-changed on button release, but no activate, keeping the
menu open.

https://bugzilla.gnome.org/show_bug.cgi?id=625029
2010-10-01 15:18:36 -04:00
Giovanni Campagna
aebdf79430 Connect PopupMenuManager to destroy signal
PopupMenuManager now connects to the destroy signal of PopupMenu, so
that destroying a PopupMenu is now enough for removing it from the
relevant manager. Useful if menu come and go on-the-fly (like in
app views or sidebars).

https://bugzilla.gnome.org/show_bug.cgi?id=630914
2010-10-01 12:37:06 -04:00
Dan Winship
a6e4bab990 Add symbolic icons to TextureCache's load_icon_name()
Icons can be loaded as St.Icon.SYMBOLIC, FULLCOLOR, APPLICATION or
DOCUMENT. The first will look for a symbolic equivalent, the second
looks for a full-color version (and does fallback, eg, from
"drive-harddisk-usb" to "drive-harddisk"). APPLICATION and DOCUMENT do
full-color icons without fallback (as specified by the icon spec).

And update various callers to use the right flags.

Based on a patch from Matt Novenstern.

https://bugzilla.gnome.org/show_bug.cgi?id=621311
2010-09-24 10:57:27 -04:00
Dan Winship
d188a7b32a PopupSwitchMenuItem: use SVG switches
https://bugzilla.gnome.org/show_bug.cgi?id=629954
2010-09-22 11:12:31 -04:00
William Jon McCann
516fe49bb0 Style fixes for the popup menu
https://bugzilla.gnome.org/show_bug.cgi?id=629954
2010-09-20 17:20:58 -04:00
Giovanni Campagna
4e1de26a02 PopupMenu: Add support for submenus
Adds class PopupSubMenuMenuItem, which is an item holding a submenu,
that is opened when the corresponding item is active, and is keyboard
and mouse navigable like its Gtk counterpart.

https://bugzilla.gnome.org/show_bug.cgi?id=623498
2010-09-15 14:02:22 -04:00
Giovanni Campagna
b5ee89459a Support setting the image after construction
This patch allows the icon in PopupImageMenuItems to be changed at
any time, while preserving the item and all other properties (style,
signals) attached and without rebuilding the whole menu. This is useful
for images reflecting a dynamic status (e.g. cellular strength
indicator or battery level)

https://bugzilla.gnome.org/show_bug.cgi?id=623652
2010-09-15 13:34:28 -04:00
Giovanni Campagna
0c38f49dde Fix typo inside Switch class
Corrects setToogleState into setToggleState, slipped from 4dfc869e

https://bugzilla.gnome.org/show_bug.cgi?id=621880
2010-07-22 12:49:48 -04:00
Giovanni Campagna
4dfc869e9d Add support for toggle switches in menus
Adds class PopupSwitchMenuItem, which is a two-state switch similar
to those in system status indicators mockups. Also adds class Switch,
which represents the switch itself, in case it is useful somewhere
else.

https://bugzilla.gnome.org/show_bug.cgi?id=621880
2010-07-22 09:06:01 -04:00
Giovanni Campagna
d8df46d4a1 Enable insertion and removal of menus
This patch adds the method "removeMenu" to PopupMenuManager, to allow
for removal of menus after they're inserted. In order to do this, it
needs to store along with the menu all the relevant signal connections,
that are disconnected when the menu is removed.
Also adds a parameter "position" to "addMenu", so that menus can added
in arbitrary order (in particular to reintroduce those which were removed).
This patch is intended towards dynamic menu users, like extensions for
application lists, docks, sidebars showing recent documents or favourites,
as well as advanced system tray implementations.

https://bugzilla.gnome.org/show_bug.cgi?id=622730
2010-07-20 09:35:12 -04:00
Giovanni Campagna
4aa80105ca Fix possible property access on undefined object
PopupMenuManager allows the insertion of menu without a sourceActor
(or with a null one), but never checks before calling contains() on
it.

https://bugzilla.gnome.org/show_bug.cgi?id=622730
2010-07-20 09:35:12 -04:00
Florian Müllner
4632db177a Clean up unused includes
Some late spring cleaning ...
2010-07-19 01:46:01 +02:00
Adel Gadllah
a691192ffa [popupMenu] Fix wrong positioning when showing for the first time
We query the transformed position and size of the popupMenu before actually showing
it which results into wrong positioning, when displaying it for the first time.

In case of the statusMenu this can even result into it being offscreen.

https://bugzilla.gnome.org/show_bug.cgi?id=621385
2010-06-12 18:15:52 +02:00
Dan Winship
a4befeba53 De-duplicate "actor contains actor" code
Add _st_actor_contains() in st-private for use within St, and
monkey-patch in a Clutter.Actor.contains() for use by javascript, and
then replace all the duplicate implementations with one or the other
of those.

https://bugzilla.gnome.org/show_bug.cgi?id=621197
2010-06-11 10:05:46 -04:00
Dan Winship
7fbf8ae4c9 [popupMenu] split this out from panel.js
We want to use this menu style in other places as well

https://bugzilla.gnome.org/show_bug.cgi?id=619541
2010-06-10 15:04:42 -04:00