Commit Graph

131 Commits

Author SHA1 Message Date
Jasper St. Pierre
5d1de33026 Use the standard apps tree for gnome-control-center panels desktop files
gnome-control-center is planning on removing its own tree in the
future. Since it already installs these applications into
/usr/share/applications, just use this for now.

https://bugzilla.gnome.org/show_bug.cgi?id=692483
2013-01-26 19:56:01 -05:00
Jasper St. Pierre
9548cd8341 js: Explicitly dispose all cairo contexts
Due to limitations and bugs in SpiderMonkey's GC, wrapper objects
for cairo contexts and similar may not get cleaned up immediately
after repainting, leading to leaking memory. Explicitly disposing
of such objects after they're not needed can clean up large portions
of memory for cairo surfaces.

https://bugzilla.gnome.org/show_bug.cgi?id=685513
2013-01-08 13:07:51 -05:00
Jasper St. Pierre
8d4855f100 volume: Add smooth scrolling to adjust output volume
Allow users to smoothly scroll on the volume indicator icon
to adjust the volume. Do this by simply passing the scroll
event to the slider inside the menu.

https://bugzilla.gnome.org/show_bug.cgi?id=687573
2012-12-20 08:40:04 -05:00
Jasper St. Pierre
7d4e14f384 popupMenu: Add smooth scrolling support for sliders
Allowing smooth scrolling on the Y axis to accurately adjust the value
of the slider.

https://bugzilla.gnome.org/show_bug.cgi?id=687573
2012-12-20 08:40:04 -05:00
Tanner Doshier
b48a7d5cfd popupMenu: Break separator drawing code out of PopupSeparatorMenuItem
And into a separate HorizontalSeparatorClass.

https://bugzilla.gnome.org/show_bug.cgi?id=681797
2012-12-10 16:50:53 -05:00
Jasper St. Pierre
b42af9aa99 popupMenu: Don't slide menus when we're changing them
As calling close() will drop the grab, we were inadverdently
re-closing menus, causing them to re-animate with a full animation.

https://bugzilla.gnome.org/show_bug.cgi?id=689954
2012-12-10 14:38:07 -05:00
Jasper St. Pierre
ca2ee22827 popupMenu: Display the proper animations for popup menus
BoxPointer's API changed to take a BoxPointer.PopupAnimation
enumeration value, but the code was accidentally replaced with
older code when porting the PopupMenuManager code to GrabHelper.

https://bugzilla.gnome.org/show_bug.cgi?id=689954
2012-12-10 14:38:07 -05:00
Jasper St. Pierre
13a2b28bf1 popupMenu: Complete the dummy fake menu
"toggle" is used when clicking on the source actor. As we don't
actually have a menu, we don't want to actually take any grabs
through the menu system, so make it a no-op rather than have it
toggle the menu state.

https://bugzilla.gnome.org/show_bug.cgi?id=689954
2012-12-10 14:38:06 -05:00
Jasper St. Pierre
fc9a96ac85 popupMenu: Introduce PopupDummyMenu
This is designed for things like the activities button that sort of
need a menu to make navigation work, but not really have it do anything.

https://bugzilla.gnome.org/show_bug.cgi?id=689109
2012-12-07 19:55:28 -05:00
Jasper St. Pierre
9dfc3af9d7 popupMenu: Port to GrabHelper
https://bugzilla.gnome.org/show_bug.cgi?id=689109
2012-12-07 19:55:28 -05:00
Florian Müllner
98b313c75f popupMenu: Overwrite ongoing animations when calling close repeatedly
Currently close() is a no-op when the menu has already been closed.
However, repeated calls could pass different animation parameters.
For instance in the user menu, we try to hide the menu immediately
before locking the screen, to avoid the popup jumping across the
screen while fading out - as we do this from the corresponding
item's activate handler, the closing is still animated if the menu's
own handler (which requests a full animation) is run first.
Fix this by changing close() to overwrite ongoing animations before
bailing out early.

https://bugzilla.gnome.org/show_bug.cgi?id=686484
2012-10-23 22:21:45 +02:00
Florian Müllner
e8ebe4de14 popupMenu: Set initial visibility of settings items
With the recent session mode changes, the visibility of settings
items is now only set on sessionMode::updated - while the signal
is emitted when the session mode is initialized, settings items
that are added after that are visible regardless of the allowSettings
setting until the next sessionMode::updated signal is received.
Fix this by explicitly setting the initial visibility of settings
items.

https://bugzilla.gnome.org/show_bug.cgi?id=684473
2012-09-20 20:04:05 +02:00
Giovanni Campagna
7499b04638 Fix insensitive styling for popup menu items
The selector for insensitive popup menu items was wrong (a PopupMenuItem is
a ShellGenericContainer, not a StButton). Fixing it showed that previous
:insensitive tracking was manual for a reason: we have many items that are
not reactive, but don't want the insensitive styling (for example those in
the battery menu).
Fix it by adding a new style-class, popup-inactive-menu-item, that is added
to all new PopupMenuItems that are not activatable.

https://bugzilla.gnome.org/show_bug.cgi?id=683988
2012-09-13 23:48:17 +02:00
Florian Müllner
2ed28211ed popupMenu: Don't always ignore SubMenu children in width requests
Hidden children are currently ignored in width requests; in the
case of submenu items, this results in abrupt width changes of
open menus when the corresponding SubMenuMenuItem is toggled.
To fix, only ignore SubMenu children when the corresponding
SubMenuMenuItem is hidden as well.

https://bugzilla.gnome.org/show_bug.cgi?id=683485
2012-09-06 13:56:44 +02:00
Florian Müllner
58477282fe popupSubMenu: Only remove padding when scrollbar is shown
The special padding rules for submenu items currently ensure that
content aligns properly when the scrollbar is shown. While they
work nicely for the network menu, it looks odd for non-scrolled
submenus, so make this case explicit by introducing a :scrolled
pseudo class and adjust the style rules to use it.

https://bugzilla.gnome.org/show_bug.cgi?id=683009
2012-09-06 13:56:44 +02:00
Jasper St. Pierre
ca2e09fe8b sessionMode: Allow changing the session mode at runtime
Since we eventually want to add a system for changing the top panel
contents depending on the current state of the shell, let's use the
"session mode" feature for this, and add a mechanism for updating the
session mode at runtime. Add support for every key besides the two
functional keys, and make all the components update automatically when the
session mode is changed. Add a new lock-screen mode, and make the lock
screen change to this when locked.

https://bugzilla.gnome.org/show_bug.cgi?id=683156
2012-09-04 18:42:44 -03:00
Giovanni Campagna
04d1a35cb5 PopupMenu: propagate all open-state-changed down to PopupMenuSection
PopupMenuBase relies on open-state-changed to update the separator
visibility, but PopupMenuSection were only emitting when the parent
closed, so the first time the menu was opened, separator visiblity was
wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=682998
2012-08-30 01:10:47 +02:00
Jasper St. Pierre
8a86540090 Revert the other half of "St: don't attempt to give focus to non reactive actors"
This reverts commit 26d3b1929e.

https://bugzilla.gnome.org/show_bug.cgi?id=667439
2012-08-26 11:56:45 -03:00
Alejandro Piñeiro
8ebd2ff9eb a11y: adding a proper state for menu items with a dot
https://bugzilla.gnome.org/show_bug.cgi?id=682366
2012-08-21 18:17:21 +02:00
Dan Winship
c540cb5e16 st-scroll-bar: use clutter_grab_pointer()
StScrollBar was intercepting motion events by using captured-event on
the stage, which required additional dirty tricks, which required
additional hacks. Simplify it by just using clutter_grab_pointer()
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=671001
2012-08-19 18:41:51 -04:00
Alejandro Piñeiro
dafa27fccd a11y: can_focus=!reactive as a general rule is not true anymore
In some cases can_focus value is taken directly as
!reactive. But this is not the case anymore, as
we are interested on navigate on non reactive items

https://bugzilla.gnome.org/show_bug.cgi?id=667439
2012-08-17 17:32:52 +02:00
Jasper St. Pierre
414fe75d02 st-widget: Move reactivity tracking to StWidget, use "insensitive"
This lets use remove another few pieces of code that do the tracking
manually.

https://bugzilla.gnome.org/show_bug.cgi?id=680426
2012-07-24 06:11:21 -03:00
Giovanni Campagna
c3afe1a83a Show the panel above the screenshield when locked
Track locked status and use it to provide a reduced version of
the panel in the locked screen. Accessibility, input sources and
volume menus are preserved, without the link to the control center.
Network, battery and user menu are reduced to pure indicators,
with no menu.
This is similar to the design but not exactly, because designers
in IRC said that network needs more analysis before exposing, and
because the design didn't account for a11y and IM (so the one menu
metaphor is not really appropriate).

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Giovanni Campagna
26d3b1929e St: don't attempt to give focus to non reactive actors
Non reactive actors don't expect to be interacted with, and thus
should not get keyboard focus.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Rui Matos
cf6f149888 boxpointer: Change 'animate' parameter on show/hide to a bitmask
This allows us to have more control of the animation.

https://bugzilla.gnome.org/show_bug.cgi?id=678337
2012-07-06 16:04:42 +02:00
Jasper St. Pierre
c9296191a8 js: Remove unnecessary versions of clutter_actor_get_children
clutter_actor_get_children requires making a temporary GSList from
a linked list structure, and then creating a JS Array from that GSList.
For simple cases like the number of children, use clutter_actor_get_n_children.

https://bugzilla.gnome.org/show_bug.cgi?id=677426
2012-06-11 13:10:25 -04:00
Alban Browaeys
f850e92524 popupMenu: do not overflow the currentItems
Do not overflow currentItems array. If the Menu section is filled
via model items-changed callback the position in the model passed to
the RemoteMenu _modelChanged can be a to be added asynchronously
action-added. Thus the item does not yet exists in the currentItems.

https://bugzilla.gnome.org/show_bug.cgi?id=676447
2012-06-05 16:28:40 +02:00
Alban Browaeys
cc9d53e038 popupMenu: bypass changeSignal callback if action is already handled
https://bugzilla.gnome.org/show_bug.cgi?id=676447
2012-06-05 16:28:40 +02:00
Florian Müllner
a3fcb8c284 sessionMode: Add allowSettings property
Add a sessionMode.allowSettings property, which determines whether
menus in the top bar should allow access to System Settings or not.

https://bugzilla.gnome.org/show_bug.cgi?id=676156
2012-05-22 19:42:28 +02:00
Florian Müllner
3d26224180 Delegate mode information to a dedicated object
Rather than accessing global.session_type / global.session_mode
all over the place, delegate mode information to a dedicated
sessionMode object. While not very useful for now, we will replace
checks for a particular mode with checks for particular properties
that sessionMode defines based on global.session_mode.

https://bugzilla.gnome.org/show_bug.cgi?id=676156
2012-05-22 19:42:27 +02:00
Florian Müllner
43fd29f9bf Revert "popupMenu: Fix RemoteMenu items with boolean state action"
This reverts commit 7293ddb22c.
2012-04-29 10:38:52 +02:00
Florian Müllner
7293ddb22c popupMenu: Fix RemoteMenu items with boolean state action
Stateful actions are expected to pass their state when activated,
but we currently only do this for actions with a string state.

https://bugzilla.gnome.org/show_bug.cgi?id=674932
2012-04-27 12:30:16 +02:00
Stefano Facchini
3422e1dca7 popupMenu: make sure to break the grab when the slider is not visible
Otherwise the grab will persist for example after closing the PopupMenu
with Escape.

https://bugzilla.gnome.org/show_bug.cgi?id=672713
2012-04-24 22:37:19 +02:00
Alejandro Piñeiro
c2fdec188e a11y: adding checked state on the popup menu items
https://bugzilla.gnome.org/show_bug.cgi?id=668366
2012-03-15 20:04:28 +01:00
Alejandro Piñeiro
06354a8c9a a11y: userMenu: support for IMStatus combobox and
suspend/power-off label

https://bugzilla.gnome.org/show_bug.cgi?id=671404
2012-03-15 19:04:54 +01:00
Alejandro Piñeiro
7c25dead17 a11y: Setting role on several panel ui elements
https://bugzilla.gnome.org/show_bug.cgi?id=667432
2012-03-15 18:58:44 +01:00
Jasper St. Pierre
15f881f967 st: Remove custom text direction stuff
Clutter has its own built-in system for managing text directions, like GTK+.
Convert over to use this.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-28 08:14:06 -05:00
Jasper St. Pierre
a8b081661c st-box-layout: Remove insert_actor/insert_before
Now that 'insert_child_at_index' and 'insert_child_below' exist
on ClutterActor, these aren't necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-22 17:00:44 -05:00
Giovanni Campagna
ee6bc33cea PopupSwitchMenuItem: allow toggling without closing the menu
Similar to what Gtk does, now toggling with Space does not close
the menu.

https://bugzilla.gnome.org/show_bug.cgi?id=664416
2012-02-06 16:49:15 +01:00
Florian Müllner
55308917f9 popup-menu: Do not open empty menus
There is little point in showing an empty menu, so return early from
open() if the menu does not contain any items.

https://bugzilla.gnome.org/show_bug.cgi?id=643867
2012-01-27 13:32:43 +01:00
Alejandro Piñeiro
74dd298891 a11y: Setting a name/label_actor for several items on the panel
https://bugzilla.gnome.org/show_bug.cgi?id=667376
2012-01-27 12:29:52 +01:00
Giovanni Campagna
b087191d2b RemoteMenu: add support for section labels
According to the GIO docs, sections can have labels too. We support
them by inserting a non reactive menu item at the beginning of the
section. This item is specially flagged to be ignored while processing
changed signals from the model (since it does not correspond to any
model item)

https://bugzilla.gnome.org/show_bug.cgi?id=666681
2012-01-16 19:29:50 +01:00
Giovanni Campagna
a7bd9f811b PopupMenu: disconnect from 'destroy' signals of destroyed items
After an item is destroyed, all its signals were disconnected,
except for 'destroy' itself. This could lead to exceptions, if
destroy was called more than once on the item.

https://bugzilla.gnome.org/show_bug.cgi?id=665680
2011-12-22 18:00:52 +01:00
Matthias Clasen
4aa1fe9ca2 Another update for GLib API changes
GDBusActionGroup api has changed again, adapt to that.
Also, use a GActionMuxer to add the 'app.' prefix to actions,
instead of manually stripping it out of the action names.
In the future, the muxer will also contain per-window actions
with a 'win.' prefix.
2011-12-20 17:36:59 -05:00
Colin Walters
8a029f333f popupMenu: Remove app. from app actions 2011-12-20 17:36:59 -05:00
Giovanni Campagna
4debedb275 Application Menu: add support for showing GApplication actions
Use the new GApplication support in ShellApp to create the application
menu. Supports plain (no state), boolean and double actions.
Includes a test application (as no other application uses GApplication
for actions)

https://bugzilla.gnome.org/show_bug.cgi?id=621203
2011-12-20 17:36:59 -05:00
Giovanni Campagna
17c46c2452 Port everything to class framework
The last patch in the sequence. Every place that was previously
setting prototype has been ported to Lang.Class, to make code more
concise and allow for better toString().

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Giovanni Campagna
2b57603271 Port PopupMenu to new Lang.Class framework
The Lang module in gjs has recently gained a small yet powerful
Class framework, that should help improve the readability of code
when using complex inheritance.
This commit starts porting shell code, by rewriting all classes in
popupMenu.js (and all derived classes) to Lang.Class.

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Florian Müllner
b88657ab83 combo-box-menu-item: Propagate pseudo classes to the combo menu
ComboBoxMenuItems use ClutterClones to reconstruct the active item
in the associated ComboMenu, so pseudo class changes due to state
changes of the ComboBoxMenuItem don't have the intended effect
(since the actual style information is taken from the associated
ComboBoxMenu item).
As a fix, propagate relevant pseudo class changes to the active
ComboBoxMenu item.

https://bugzilla.gnome.org/show_bug.cgi?id=662799
2011-11-15 13:54:29 +01:00
Florian Müllner
d20e646ed6 combo-box-menu-item: Propagate style changes to the combo menu
ComboBoxMenuItems use ClutterClones to reconstruct the active item
in the associated ComboMenu to not impose a particular MenuItem type
in the menu. However, this results in style changes (for instance
those triggered by icon-theme or text-scaling-factor changes) of
the ComboBoxMenuItem not having a visual effect until the ComboBoxMenu
is shown.
As a fix, force a style update on the ComboBoxMenu when the item's
style changes.

https://bugzilla.gnome.org/show_bug.cgi?id=662799
2011-11-15 13:46:08 +01:00