Commit Graph

461 Commits

Author SHA1 Message Date
Jasper St. Pierre
6bd275669d status: Add new airplane mode indicator / menu
This is a simple indicator that shows if the user is currently in
airplane mode, and if they are, offers a way to turn it off. It
will not be shown if the user is not in airplane mode.

This is a part of the new system status design, see
https://wiki.gnome.org/GnomeShell/Design/Guidelines/SystemStatus/
for design details.

https://bugzilla.gnome.org/show_bug.cgi?id=705845
2013-08-13 06:50:25 -04:00
Jasper St. Pierre
37487c243e power: Move the Power Off indicator to the power menu
It's only supposed to show if we have a battery, and hooking into
the power system is the easiest way of making that happen.

https://bugzilla.gnome.org/show_bug.cgi?id=705845
2013-08-13 06:50:24 -04:00
Jasper St. Pierre
54bec54765 panel: Align the arrows together in the status menus
To align the arrows, we need to allocate panel buttons the full
height of the tray. Fix up all of the panel buttons to support this,
and align the arrows in the middle.

https://bugzilla.gnome.org/show_bug.cgi?id=705845
2013-08-13 06:50:24 -04:00
Jasper St. Pierre
5c8c4e0aad panel: Move statuses to the aggregate menu
Swap out the implementation of SystemIndicator with a dummy,
and build the aggregate menu. At the same time, remove the
poweroff and login screen menus, as those were fake aggregate
menus beforehand.

We lose some flexibility as we lose session-mode-based menu
layout, but as each component of the aggregate menu is supposed
to be "smart" in response to updating itself when session
state changes, I believe it's better than a declarative model.

https://bugzilla.gnome.org/show_bug.cgi?id=705845
2013-08-13 06:50:24 -04:00
Jasper St. Pierre
a347f02545 status: Put arrow icons next to the separate status indicators
This is to indicate that it has a pulldown menu.

This is a part of the new system status design, see
https://wiki.gnome.org/GnomeShell/Design/Guidelines/SystemStatus/
for design details.

https://bugzilla.gnome.org/show_bug.cgi?id=705845
2013-08-13 06:50:24 -04:00
Jasper St. Pierre
a45cc0a048 panel: Use an hbox to lay out the app menu contents
This will make it easier to add the arrow to the app menu without
having to do the allocation logic ourselves.

https://bugzilla.gnome.org/show_bug.cgi?id=705845
2013-08-13 06:50:24 -04:00
Jasper St. Pierre
1cc5bb5ec4 shell-app: Fade the app icon on the left in RTL layouts
The point of fading the icon is to make the text displayed over the
icon more legible. In RTL layouts, the text is displayed on the left
of the icon, so fading the right-hand-side of the icon doesn't work
well.

https://bugzilla.gnome.org/show_bug.cgi?id=704583
2013-07-22 07:09:42 -04:00
Jasper St. Pierre
ca861d8ff9 status: Rebrand the user menu as the system menu
As the user menu no longer really shows anything about the user, and just
power menu and settings, it's not really deserving of the "user menu" name,
so rename it to the ever-blandly-named "system menu".

This is a part of the new system status design, see
https://wiki.gnome.org/GnomeShell/Design/Guidelines/SystemStatus/
for design details.

https://bugzilla.gnome.org/show_bug.cgi?id=704368
2013-07-19 05:34:44 -04:00
Jasper St. Pierre
93dc7a51c0 Rework window / actor focus handling
The duality of the Clutter's key focus and mutter's window focus has long been
a problem for us in lots of case, and caused us to create large and complicated
hacks to get around the issue, including GrabHelper's focus grab model.

Instead of doing this, tie basic focus management into the core of gnome-shell,
instead of requiring complex "application-level" management to get it done
right.

Do this by making sure that only one of an actor or window can be focused at
the same time, and apply the appropriate logic to drop one or the other,
reactively.

Modals are considered a special case, as we grab all keyboard events, but at
the X level, the client window still has focus. Make sure to not do any input
synchronization when we have a modal.

At the same time, remove the FOCUSED input mode, as it's no longer necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-07-08 17:05:16 -04:00
Ray Strode
aa6b63373e ui: move AnimatedIcon out of panel.js
The class is generally useful, so it only makes sense in panel.js
for historical reasons. Because other parts of the code are
using it, though, problems are cropping up that require a
workaround like:

placeSpinner: function(...) {
    /* This is here because of recursive imports */
    const Panel = imports.ui.panel;
    Panel.AnimatedIcon(spinnerIcon, WORK_SPINNER_ICON_SIZE);
    ...
}

This commit moves AnimatedIcon to its own file so we can drop that
workaround.

https://bugzilla.gnome.org/show_bug.cgi?id=702818
2013-06-25 15:16:42 -04:00
Jasper St. Pierre
5803f69605 popupMenu: Split the remote menu code into its own module
This is getting sufficiently complicated to deserve its own place.

https://bugzilla.gnome.org/show_bug.cgi?id=700257
2013-05-13 18:34:26 -04:00
Florian Müllner
22b6a25408 loginDialog: Remove logo in upper left corner
With optional branding now being shown below the user list, we can
remove the unloved instance in the upper left corner ...

https://bugzilla.gnome.org/show_bug.cgi?id=694912
2013-05-07 20:52:58 +02:00
Florian Müllner
60cb1ad7c5 panel: Change openAppMenu() to a toggle action
It makes sense to allow closing the app menu with the same shortcut
that is used to open it, so make it a toggle action and allow it
TOPBAR_POPUP mode.

https://bugzilla.gnome.org/show_bug.cgi?id=686756
2013-04-26 17:32:54 +02:00
Florian Müllner
4a5ff5dcfb panel: Add keybinding mode for top bar popups and use it
Allow some keybindings to still work while a top bar menu is open
by assigning it a keybinding mode.

https://bugzilla.gnome.org/show_bug.cgi?id=698938
2013-04-26 17:32:53 +02:00
Tim Lunn
ee4f199a9f AppMenuButton: Improve handling of signals
If for some reason an extension needs to destroy the AppMenu object,
currently it is not possible to do this cleanly due to these signals
remaining connected.

https://bugzilla.gnome.org/show_bug.cgi?id=698531
2013-04-22 10:14:48 +10:00
Cosimo Cecchi
5ecf40e967 panel: show spinner animation for busy applications
When the active application signals its busy state, we now will show a
spinner on the panel, next to the application name.

https://bugzilla.gnome.org/show_bug.cgi?id=697207
2013-04-19 13:54:56 -04:00
Florian Müllner
4710753700 panel: Pick up spinner icon from CSS
In order to use a different spinner image in classic mode (or any
other mode specific style), get it from CSS rather than hardcoding
a particular image.

https://bugzilla.gnome.org/show_bug.cgi?id=693688
2013-04-16 19:10:40 +02:00
Florian Müllner
2fc76e6d9e panel: Pass a full pathname to AnimatedIcon
For classic mode, we want to use a different styling for the spinner,
so we will pick up the image filename from CSS to make use of mode
specific styling. As the CSS will give us a full pathname, adapt the
API to take a full pathname instead of building it inside AnimatedIcon
from the passed basename.

https://bugzilla.gnome.org/show_bug.cgi?id=693688
2013-04-16 19:10:40 +02:00
Matthias Clasen
ff544450a5 Revert "classic: Invert the spinner color"
This reverts commit f358bb1a96.
2013-04-15 18:40:00 -04:00
Matthias Clasen
f358bb1a96 classic: Invert the spinner color
https://bugzilla.gnome.org/show_bug.cgi?id=693688
2013-04-15 17:48:47 -04:00
Jasper St. Pierre
36a7429aa0 overview: Try to do the right thing related to XDnD
Rather than expose a dizzying array of methods related to managing
state that require infecting every user of the overview methods, try
to do the sensible and smart thing internally. Now, the overview
itself tracks when XDND drags start, and simply calling show, hide or
toggle while an XDnD drag is in effect will show the overview, and
will only take the grab until after the XDND drag ends.

https://bugzilla.gnome.org/show_bug.cgi?id=663661
2013-03-04 17:47:47 -05:00
Jasper St. Pierre
5679e6b3a9 layout: Construct the primary monitors's hot corner, too
This cleans up the code considerably, and makes it so that
one path creates all hot corners for all monitors. Why this
wasn't done originally, I have no clue...

The one complication is debouncing if the button and hot corner
are triggered in rapid succession, so we just move this tracking
to the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=663661
2013-03-04 15:50:45 -05:00
Adel Gadllah
627a2412d2 ui: Don't use Clutter.Group
It is deprecated use Clutter.Actor instead.

https://bugzilla.gnome.org/show_bug.cgi?id=694441
2013-02-22 14:28:58 +01:00
Jasper St. Pierre
3db253998b panel: Don't try to begin a grab op while something else has taken a grab
https://bugzilla.gnome.org/show_bug.cgi?id=694241
2013-02-20 11:36:06 -05:00
Giovanni Campagna
c4621119b3 AccessibilityMenu: hide when not needed
Tie the menu visibility to having at least one a11y feature enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=681528
2013-02-19 22:07:08 +01:00
Cosimo Cecchi
eab4c7bce9 Don't call beginItemDrag() for XDND
The dragged actors are not overview items.

https://bugzilla.gnome.org/show_bug.cgi?id=686984
2013-02-18 14:54:53 -05:00
Giovanni Campagna
33dde63256 Main: move the stage hierarchy initialization to LayoutManager
It is cleaner to concentrate all layout and chrome management
in one place, instead of having it scattered around the codebase.

https://bugzilla.gnome.org/show_bug.cgi?id=682429
2013-02-14 01:12:24 -05:00
Florian Müllner
f47c0601ce panel: Add :overview pseudo class while in overview
The panel used to provide an .in-overview class which was removed after
the theme stopped using it. Classic mode should use a different top bar
style in the overview, so bring it back (but use a pseudo class this
time for consistency with MessageTray and ActivitiesButton).

https://bugzilla.gnome.org/show_bug.cgi?id=693218
2013-02-05 19:54:17 +01:00
Giovanni Campagna
9a25224890 ScreenShield: lower the shield when the user is idle but before locking
In time span between idle and lock the shield should behave like autologin,
but should prevent accidental reactivation (for example when using a touch
screen) by showing the curtain.

https://bugzilla.gnome.org/show_bug.cgi?id=692560
2013-01-31 14:10:20 +01:00
Rui Matos
3b31774dd3 Fix remaining uses of transition-duration without time units
Commit 8be3c5ed21 changed the CSS parser
to only accept values with explicit time units.
2013-01-12 17:39:08 +01: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
Rui Matos
d87db04e55 panel: Update corners' nearest button on session mode change
With panel buttons changing dynamically on session mode changes we can
no longer rely on a corner's respective box style-changed signal to
find the nearest button.

Instead, make the panel take care of telling the corners to look for a
new button when buttons are changed.

https://bugzilla.gnome.org/show_bug.cgi?id=690180
2013-01-04 13:35:53 +00:00
Rui Matos
906ec3c8a9 panel: Remove unused method
https://bugzilla.gnome.org/show_bug.cgi?id=690180
2013-01-04 13:35:47 +00:00
Giovanni Campagna
ebd1bc83c9 Ping the active window when using the app menu
Use the new meta_window_check_alive() to verify if the application is
responding after the user activates an action from the app menu.
This in particular restores the ability to force quit applications
from the menu, even if the use a custom GMenu.

https://bugzilla.gnome.org/show_bug.cgi?id=684340
2012-12-25 18:41:22 +01:00
Jasper St. Pierre
04bf75d137 panel: Remove a dead check
With the dummy menu item now in place, we will always have a menu.

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
31d14a2fb0 panel: Update the hot corner when the panel box allocation changes
This fixes the missing hotcorner in the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=689537
2012-12-03 16:09:46 -05:00
Jasper St. Pierre
d50c3e6c67 panel: Don't create a menu for the ActivitiesButton
A "dontCreateMenu" item was created for the lock screen; we should
just use that instead of having a hacked up menu.

https://bugzilla.gnome.org/show_bug.cgi?id=689537
2012-12-03 16:06:34 -05:00
Jasper St. Pierre
a46321baa0 panel: Make Animation visible by default
None of the other widget actors hide themselves by default;
that's a GTK+ thing.
2012-11-27 13:25:18 -05:00
Jasper St. Pierre
9808e8ab0d panel: Split off Animation code from AnimatedIcon
This is to share with wanda.
2012-11-27 13:16:30 -05:00
Jasper St. Pierre
7bd7b53845 panel: Remove a bit of duplicated code
The play() method does what we want here.
2012-11-27 13:16:30 -05:00
Florian Müllner
2511f60d39 sessionMode: Add panelStyle property
The panel should change appearance according to the sessionMode,
so add a new panelStyle sessionMode property which allows to
specify a mode specific style class for the panel actors.

https://bugzilla.gnome.org/show_bug.cgi?id=684573
2012-11-21 13:10:46 +01:00
Florian Müllner
c0f868dd56 panel: Remove .in-overview style class
The panel used to be styled differently in the overview, but
nowadays this is just a left-over.

https://bugzilla.gnome.org/show_bug.cgi?id=684573
2012-11-21 13:10:46 +01:00
Florian Müllner
a112bfdaa2 panelCorner: Only overlap panel if necessary
The panel corners overlap the panel in order to hide the underline
used for active buttons where it is supposed to arc downwards
following the roundness of the corner.
Unfortunately this prevents us from using a transparent panel background,
as the overlapped area ends up with the wrong transparency. Work around
this limitation by only overlapping the panel if there is a visible
border.

https://bugzilla.gnome.org/show_bug.cgi?id=684573
2012-11-21 13:10:46 +01:00
Stéphane Démurget
5e3111bad8 ctrl-alt-tab: use better icons
The top panel and message tray icons were by default a gnome foot and
are replaced by better ones. The applications icon is now using the
symbolic apps icon of the dash, and the windows icon is also improved.

https://bugzilla.gnome.org/show_bug.cgi?id=641303
2012-11-20 11:42:04 +00:00
Stéphane Démurget
c48a246ccb panel: programmatic anim. control of AnimatedIcon
The AnimatedIcon does not have an API for controlling the animation but
relies on the :visible property changes to start and stop a timeout used
to update the frame.

This has the inconvenient of having a side effect when visible is set to
true multiple times, and is not really the API expected from such
component. Also, there is a race if it is displayed before the images
are loaded: there is no child yet and thus we get this._frame = NaN
which leads to a crash.

Switch to a play/stop API instead, and add a load event callback to the
TextureCache.load_slice_image to exactly know when we can start using
the images.

https://bugzilla.gnome.org/show_bug.cgi?id=687583
2012-11-17 22:26:55 +01:00
Jasper St. Pierre
d88002c4ed Revert "panel: programmatic anim. control of AnimatedIcon"
This reverts commit e04a4c3923.

This commit exposed an already-existing race condition in the panel
animation code that caused the shell to crash for some people.

https://bugzilla.gnome.org/show_bug.cgi?id=687112
2012-11-05 14:31:04 -05:00
Stéphane Démurget
e04a4c3923 panel: programmatic anim. control of AnimatedIcon
The AnimatedIcon does not have an API for controlling the animation but
relies on the :visible property changes to start and stop a timeout used
to update the frame.

This has the inconvenient of having a side effect when visible is set to
true multiple times, and is not really the API expected from such
component.

Switch to a start/stop API instead. Also, update to the first frame at
startup while we are at it, since this is the expected behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=687583
2012-11-05 15:05:14 +01:00
Florian Müllner
04da29c939 appMenu: Update on icon theme changes
While we recreate icons on style changes elsewhere, the faded
icon in the application menu will stick around after icon theme
changes until another application is focused.

https://bugzilla.gnome.org/show_bug.cgi?id=687224
2012-10-31 00:06:46 +01:00
Florian Müllner
9efe5287e4 gdm: Move logo into the panel
GDM has a 'logo' key in its schema to allow distributors to add
some branding. It is currently placed above the user list, which
no longer works too well since the login screen lost its dialog
window. Display the logo in the top-left corner instead of the
Activities button instead.

https://bugzilla.gnome.org/show_bug.cgi?id=685852
2012-10-25 18:31:16 +02:00
Jasper St. Pierre
88fbdba018 panel: Fix a copy/paste type when dealing with panel corners
Since panel corners are currently square, this doesn't really affect much,
but it's very clear what the code was supposed to be. At the same time,
also fix up a redeclaration with 'let', which technically isnt' kosher.
2012-10-12 17:47:21 -04:00
Florian Müllner
e421953fcd panel: Make activities button's hot corner public
https://bugzilla.gnome.org/show_bug.cgi?id=682255
2012-09-16 19:53:49 +02:00
Giovanni Campagna
8c534163e1 Panel: don't animate session mode switches
It causes problems with extensions, and it's excessively distracting.

https://bugzilla.gnome.org/show_bug.cgi?id=683526
2012-09-06 21:38:18 +02:00
Giovanni Campagna
657887b241 Revert "userMenu: Don't update the presence icon immediately"
This reverts commit f1ca96bbf0.
We're moving towards atomic panel upgrade, so we don't need this.

https://bugzilla.gnome.org/show_bug.cgi?id=683526
2012-09-06 21:38:17 +02:00
Giovanni Campagna
7c244b01c6 Panel: move the _panelContainer down to PanelMenu
Panel already forces each item to be a PanelMenu.Button, so it's better
to have the latter handle the bin container too, instead of attaching
a private property that might collide with internal usage by the indicator.

https://bugzilla.gnome.org/show_bug.cgi?id=683156
2012-09-04 23:52:41 +02:00
Jasper St. Pierre
f1ca96bbf0 userMenu: Don't update the presence icon immediately
If we don't freeze the presence icon, we can end up in a place where
we'll be updating the icon before we fade out the panel indicators when
coming back from the lock screen.

https://bugzilla.gnome.org/show_bug.cgi?id=683156
2012-09-04 18:42:45 -03: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
Jasper St. Pierre
aa9c095c8e panel: Make sure to show the app menu button after unlocking the screen
I'm not sure how we missed this one.

https://bugzilla.gnome.org/show_bug.cgi?id=683154
2012-09-03 19:24:11 -03:00
Giovanni Campagna
e5534e86ab Panel: clean up button construction code
We already could build the right part of the panel declaratively according
to the session mode. Extend that to handle the left and center parts.
Also, move the mapping from the roles to the classes in panel.js, as it shared
by all modes.

https://bugzilla.gnome.org/show_bug.cgi?id=682546
2012-09-03 23:08:36 +02:00
Jasper St. Pierre
c21b1e5fe0 st: Remove StIconType
GTK+ works by explicitly specifying a -symbolic suffix for all icons.
Do the same here.

https://bugzilla.gnome.org/show_bug.cgi?id=682540
2012-08-29 16:41:09 -03:00
Giovanni Campagna
c1de2788b1 Add a new lock screen menu to combine volume network and power
The design has a combined volume-network-power indicator in the lock
screen, which when opened shows a volume slider. Implement it by abstracting
the volume menu into a PopupMenuSection, and by creating three StIcons
bound to the real ones.

https://bugzilla.gnome.org/show_bug.cgi?id=682540
2012-08-29 01:13:23 +02:00
Florian Müllner
88effdd9c3 appMenu: Make show() a no-op in locked state
The app menu is hidden when entering the lock screen, however it
might be shown again while the lock is still in place - we don't
want this ever to be the case, so make show() a no-op while the
screen is locked.

https://bugzilla.gnome.org/show_bug.cgi?id=682475
2012-08-22 20:31:43 +02:00
Jasper St. Pierre
dcf872b485 js: Remove StatusIconDispatcher
With IBus in the top panel, we don't need it any more

https://bugzilla.gnome.org/show_bug.cgi?id=680800
2012-08-03 11:51:53 -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
d9c3b83d1e Panel: fix finding leftmost and rightmost buttons
Previous code would access the array element before checking that
the index was within bounds, and therefore cause a TypeError.
It wasn't noticed earlier because at least one visible children
is in each panel box in all session modes.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:27 +02:00
Florian Müllner
f906cfe5f6 appMenu: Disable app menu during startup animations
When activating the app menu while displaying a startup notification
animation, the application shown in the menu does not match the
application providing the menu. To avoid this case, make the menu
button unreactive while playing the animation.

https://bugzilla.gnome.org/show_bug.cgi?id=672322
2012-07-10 22:36:45 +02:00
Jean-Philippe Braun
9faac81a37 panel: don't break when indicator has no menu
Status indicators don't have necessarily a menu. If they have not we don't
want to add the menu in the PopupMenuManager.

https://bugzilla.gnome.org/show_bug.cgi?id=678694
2012-07-10 22:21:07 +02:00
Florian Müllner
ebbd295ebe panel: Refuse to add (legacy) status icons not part of the session mode
If a session mode does not use certain status items, we don't want their
fallback implementation to show up either, so filter them out.

https://bugzilla.gnome.org/show_bug.cgi?id=677058
2012-05-29 22:06:03 +02:00
Florian Müllner
e4f1572a3a sessionMode: Add statusArea property
Add a sessionMode.statusArea property, which specifies both the order
and shell implementation of the status area items for the mode.

https://bugzilla.gnome.org/show_bug.cgi?id=676156
2012-05-22 19:42:28 +02:00
Florian Müllner
ba92cfa064 sessionMode: Add showCalendarEvents property
Add a sessionMode.showCalendarEvents property, which determines
whether the calendar menu should contain an events section or not.

https://bugzilla.gnome.org/show_bug.cgi?id=676156
2012-05-22 19:42:28 +02:00
Florian Müllner
6bee51ed33 sessionMode: Add hasAppMenu property
Add a sessionMode.hasAppMenu property, which determines whether
the top bar should contain a menu for the active application or
not.

https://bugzilla.gnome.org/show_bug.cgi?id=676156
2012-05-22 19:42:28 +02:00
Florian Müllner
122bca49ea sessionMode: Add hasOverview property
Add a sessionMode.hasOverview property, which determines whether
the mode should give access to the overview 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
82c2f5221d panel: Check for appMenu button's reactivity before opening
When the appMenu is not available, for instance when no windows are
open (on the current workspace), we make its actor unreactive to
"hide" it from keynav. However the menu can still be triggered
erroneously when using the corresponding keyboard shortcut, so
add a check for the actor's reactivity there as well.

https://bugzilla.gnome.org/show_bug.cgi?id=676316
2012-05-18 17:38:06 +02:00
Florian Müllner
c51acf7c2a panel: Add keyboard shortcut to open app menu
With the application menu now being more than a stub, it has
become a much more interesting target, so add a keyboard shortcut
to open it directly.
This should also ease some of the pain for focus-follows-mouse users.

https://bugzilla.gnome.org/show_bug.cgi?id=672909
2012-03-30 19:58:43 +02:00
Rui Matos
985f28bbea AppMenuButton: Check input mode only on application focus changes
Bailing out of _sync() early if the application lost keyboard focus to
the shell can only be done on actual application focus changes. In
particular, doing this check on a switch to an empty workspace while
the keyboard focus is already on the shell prevents the AppMenuButton
from being hidden as it should.

https://bugzilla.gnome.org/show_bug.cgi?id=672011
2012-03-17 01:11:44 +01:00
Rui Matos
22e1abbaff AppMenuButton: Don't set the actor reactive if it's not really visible
Reactive means that the actor is reachable from keyboard
navigation. If the target isn't current that means we are not tweening
the actor to be visible so we shouldn't set it reactive either.

https://bugzilla.gnome.org/show_bug.cgi?id=671998
2012-03-17 01:10:40 +01:00
Alejandro Piñeiro
01c66eaf0c a11y: set CHECKED state on Activities button 2012-03-15 20:04:50 +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
Alejandro Piñeiro
e37574510e a11y: setting a proper name for Activities button
https://bugzilla.gnome.org/show_bug.cgi?id=670312
2012-02-29 16:22:55 +01:00
Florian Müllner
f4b58f35ba panel: Allow to start a drag to restore a window from the panel
The preferred way to unmaximize/untile a window is by using a drag
gesture. Extend the available area to start this gesture into
non-reactive parts of the top bar above the window - with that we
take advantage of the "infinite height" of the screen edge, and the
extra space is particularly useful when the window has its titlebar
hidden.

https://bugzilla.gnome.org/show_bug.cgi?id=666359
2012-02-29 13:49:25 +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
Jasper St. Pierre
740388c778 st-texture-cache: Use ClutterActor, not ClutterGroup
ClutterGroup is deprecated, and since ClutterActor is concrete, we
can use that now instead.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-15 20:12:16 -05:00
Stefano Facchini
eab4f4c963 Return expected type from handleDragOver for Activities button actors
Currently they return 'undefined' instead of something meaningful,
e.g. DND.DragMotionResult.CONTINUE. This was unnoticed because none
of the ancestors of the Activities button actors do any drag handling.
The only visible issue are JS errors generated when dragging, for example,
a window thumbnail over the button, because the cursor cannot be set.

https://bugzilla.gnome.org/show_bug.cgi?id=669921
2012-02-12 20:22:04 +01:00
Florian Müllner
d1fc87577a panel: Simplify corner drawing
With the panel border removed, it is no longer necessary to account
for it in the corner drawing code, so simplify the drawing code
a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=669489
2012-02-08 23:39:24 +01:00
Rui Matos
bdd65fe755 AppMenuButton: bind "can-focus" to "reactive"
When changing to an empty workspace we make the AppMenuButton invisible but
the user could still get to the menu using keyboard navigation.

https://bugzilla.gnome.org/show_bug.cgi?id=643867
2012-01-27 18:01:22 +00:00
Rui Matos
21e2280825 AppMenuButton: only show the button if the target app is on the current ws
When the last window on a workspace is closed the focus goes to some other
window in another workspace which would cause us to show the AppMenuButton for
an application that isn't visible on the current empty workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=643867
2012-01-27 16:34:52 +00: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
1bac40fbe3 App menu: only create the popup menu with a GMenu
Since the application proxy is created asynchronously, at the time
the GActionGroup (GActionMuxer) is created, there is no GDBusMenu yet.
Defer creating the menu in that case.
Also, clear out signal handlers if have no target application.

https://bugzilla.gnome.org/show_bug.cgi?id=633028
2012-01-17 18:40:04 +01:00
Matthias Clasen
6c4e9d23f2 Add per-window actions
GTK+ also exports window-specific actions, by putting the object path
for the exported action group in the _DBUS_OBJECT_PATH X property.
We add this action group to the app's muxer with a 'win' prefix,
since that is what the exported menu expects. Whenever the focus
window changes, we update the window-specific actions of its
application, and emit notify::action-group to cause the app
menu to be updated.
2011-12-20 17:36:59 -05:00
Giovanni Campagna
951fff5aa0 Application Menu: watch for menu property changes
By the time the window is first mapped and the app menu button is
synced, we may not have finished reading the menu. In that case,
connect to notify::menu and update accordingly.
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
566bdb50c2 Port PanelMenu to new class framework
Second patch in the class framework, now it's the turn of
PanelMenu (buttons, menus and status indicators).

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Dan Winship
75b824d032 *.js: Make emacs modelines consistent
js2-mode is no longer developed and we recommend js-mode these days,
so switch the modelines to specify that, and make them consistent
across all files.

https://bugzilla.gnome.org/show_bug.cgi?id=660358
2011-10-11 08:05:12 -04:00
Dan Winship
ae00f86887 panel: allow padding around panel buttons to shrink
for narrow screens (eg, portrait orientation)

https://bugzilla.gnome.org/show_bug.cgi?id=651299
2011-09-19 17:43:54 -04:00
Ray Strode
33718ef7a5 panel: drop dead code
The _userMenu variable never gets initialized anymore,
so remove some code that only gets run when it's defined.

https://bugzilla.gnome.org/show_bug.cgi?id=651299
2011-09-17 23:23:15 -04:00
Ray Strode
a94a62764d gdm: add a power button
Making users have to log in to power off the machine isn't a good idea.

This commit adds a power menu similar to the one in the fallback greeter
which offers 3 items:

- Suspend
- Restart
- Power off

https://bugzilla.gnome.org/show_bug.cgi?id=657822
2011-09-17 23:16:20 -04:00
Dan Winship
9fbd79316a panel: merge statusBox into rightBox
Simplify the layout in rightBox by getting rid of statusBox, and just
putting everything into rightBox directly.

Simplify the handling of the user menu by adding it like it was a
status icon rather than special-casing it. Rename the "tray_icon"
variables to "status_area" to reflect this better.

https://bugzilla.gnome.org/show_bug.cgi?id=651299
2011-09-16 14:15:49 -04:00
Dan Winship
6d89d0b02a panel: remove legacyBox, mix legacy icons in with regular
Legacy trayicons are mostly gone, so remove some of the special-casing
for them to simplify things.

Also, fix panel.addToStatusArea() to interpret its "position" relative
to tray_icon_order, not relative to the existing contents of
statusBox, so that the order that extension icons appear in does not
depend on the order they are loaded in.

https://bugzilla.gnome.org/show_bug.cgi?id=651299
2011-09-16 14:15:49 -04:00
Dan Winship
f2f2898fe3 panel: fix part of the panel-corner-highlighting hack
The underline highlights on the panel menu items normally have a 100ms
transition between highlighted and unhighlighted, but the panel corner
graphics can't do that, so we hacked the Activities button and user
menu to have no transition. But in gdm mode, the user menu isn't the
rightmost item any more. Fix this by modifying the CSS from the code
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=651299
2011-09-16 14:15:48 -04:00
Florian Müllner
0518d69b72 panel: Fix corner highlight
The style of the top bar's corners is bound to the style of the
corresponding button; we used to hardcode this association, but
as the login mode does have a different layout, the button is now
determined programmatically.
Unfortunately, some containers take the text direction into account
when ordering their children, while some don't, so the current
code returned the wrong button in RTL locales.

https://bugzilla.gnome.org/show_bug.cgi?id=658983
2011-09-14 21:26:58 +02:00
Colin Walters
0af108211c apps: Ensure running apps override new .desktop file data
This patch fixes the "apps vanish from alt-TAB bug".

If a "package system" rips away and possibly replaces .desktop files
at some random time, we have historically used inotify to detect this
and reread state (in a racy way, but...).  In GNOME 2, this was
generally not too problematic because the menu widget was totally
separate from the list of windows - and the data they operate on was
disjoint as well.

In GNOME 3 we unify these, and this creates architectural problems
because the windows are tied to the app.

What this patch tries to do is, when rereading the application state,
if we have a running application, we keep that app around instead of
making a new instance.  This ensures we preserve any state such as the
set of open windows.

This requires moving the running state into ShellAppSystem.  Adjust
callers as necessary, and while we're at it drop the unused "contexts"
stuff.

This is just a somewhat quick band-aid; a REAL fix would require us
having low-level control over application installation.  As long as
we're on top of random broken tar+wget wrappers, it will be gross.

A slight future improvement to this patch would add an explicit
"merge" between the old and new data.  I think probably we always keep
around the ShellApp corresponding to a given ID, but replace its
GMenuTreeEntry.

https://bugzilla.gnome.org/show_bug.cgi?id=657990
2011-09-05 17:29:41 -04:00
Florian Müllner
07660f7fcf status-menu: Rename to userMenu
We haven't actually been calling the top-right menu "status menu" for
quite some time, so use the upcoming code changes as an excuse for
renaming it to "user menu".
2011-08-29 22:11:09 +02:00
Ray Strode
9f1da20161 Add support for gdm greeter session
This commit adds GDM session support.

It provides a user list that talks to GDM,
handles authentication via PAM, etc.

It doesn't currently support fingerprint readers
and smartcards.

https://bugzilla.gnome.org/show_bug.cgi?id=657082
2011-08-29 14:11:36 -04:00
Ray Strode
d4239d570d main: Factor out remaining user session specific bits
The shell has a number of things that are only relevant for
logged in users (e.g. calendar events, telepathy integration, a
user menu, etc).

This commit moves those user session specific bits into their
own functions in preparation for making the shell code ready
for use at login time.

https://bugzilla.gnome.org/show_bug.cgi?id=657082
2011-08-29 14:11:35 -04:00
Ray Strode
1ecbabc69a panel: Dynamically match corner to style of nearest button
Right now the panel code makes the left corner sync up with the
activities button and the right corner sync up with the user menu.
This is fine as long as we have an activities button and a user menu.

The login screen won't have those things, though.

This commit changes the panel corner code to try to figure out which
interface element is the most appropriate to sync up with based on
its position in the panel.

https://bugzilla.gnome.org/show_bug.cgi?id=657082
2011-08-29 14:11:35 -04:00
Dan Winship
021d3dadbb layout: add panelBox and trayBox
Have LayoutManager automatically deal with sizing and positioning
boxes for the panel and messageTray relative to the monitors.

Also, now that LayoutManager knows exactly where and how tall the
panel and tray are, have it manage the pointer barriers as well.

https://bugzilla.gnome.org/show_bug.cgi?id=612662
2011-08-29 12:59:25 -04:00
Marc-Antoine Perennou
8f4a4d93f2 panel: Fix ordering of status icons
Otherwise a11y would be added to the right of the power indicator instead of to
the left of keyboard indicator
2011-08-25 17:15:24 -04:00
Giovanni Campagna
5be8d5f9cf panel: Remove 'display' from the standard icons
This way all standard indicators have a shell implementation
provided, which prevents issues with extensions enabling/disabling
(in particular with xrandr-indicator)

https://bugzilla.gnome.org/show_bug.cgi?id=653205
2011-08-25 13:35:41 -04:00
Giovanni Campagna
08126e5a38 panel: Add an easier way of adding items to the system status area
Extensions often want to add items to the system status area, so it
is useful to add a convenience API for it. Also, we now allow
for cleaner destruction of panel objects, by just calling destroy()
on it.
Based on a patch by Jasper St. Pierre.

https://bugzilla.gnome.org/show_bug.cgi?id=653205
2011-08-25 13:34:45 -04:00
Dan Winship
c1acf992fa layout: make Chrome an implementation detail of LayoutManager
Make the Chrome object be a private member of LayoutManager, and add
new LayoutManager methods to proxy to the old Chrome methods.

https://bugzilla.gnome.org/show_bug.cgi?id=655813
2011-08-03 09:18:30 -04:00
Dan Winship
fde200d084 panel: move the corners into the panel actor
Rather than having the panel corners as independent bits of chrome and
manually syncing their positions, put them inside the panel actor, and
update the panel's allocation code to position them correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=655813
2011-08-03 09:17:52 -04:00
Dan Winship
a376cd1610 chrome: Make affectsStruts default to false
Since we only want it to be true for the panel, and nothing else.

https://bugzilla.gnome.org/show_bug.cgi?id=655813
2011-08-03 09:17:52 -04:00
Dan Winship
aed50e2a39 shell-global: add a "display" property
and update callers to fetch that rather than doing
"global.screen.get_display()"

https://bugzilla.gnome.org/show_bug.cgi?id=654639
2011-08-03 09:09:55 -04:00
Dan Winship
0549f42030 panel, layout: clean up HotCorner handling
Move the HotCorner class from panel to layout, and make the panel
manage its own HotCorner.

Stick the panel's HotCorner into the Activities button actor (rather
than separately floating above it), so that hover tracking on the
button works properly without needing hacks in HotCorner.

https://bugzilla.gnome.org/show_bug.cgi?id=645759
2011-07-14 15:31:25 -04:00
Dan Winship
50f248ec5b panel: make ActivitiesButton a PanelMenu.Button
The fact that everything in the top bar except the activities button
was a menu made various things difficult. Simplify this by making the
activities button be a menu too, but just hack it up a bit so that the
menu associated with the button never actually appears.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=645759 (Clicking on
Activities with menu up leaves a funny state) and its semi-dup 641253
(panel keynav between Activities and menus is quirky).
2011-07-14 15:31:25 -04:00
Dan Winship
544bdb4fb1 panel: abstract ActivitiesButton into its own class
https://bugzilla.gnome.org/show_bug.cgi?id=645759
2011-07-14 15:31:25 -04:00
Dan Winship
64b2b4a7d4 layout: new file handling shell layout
Remove ShellGlobal's monitor-related methods, and have
Main.layoutManager provide that information instead. Move
Main._relayout() to LayoutManager, and have other objects connect to
the layout manager's 'monitors-changed' signal to know when the screen
geometry has changed.

https://bugzilla.gnome.org/show_bug.cgi?id=636963
2011-07-06 08:38:35 -04:00
Dan Winship
ae35d0e43c panel: pass the Panel object to the PanelCorners
rather than having them refer to it via Main.panel

https://bugzilla.gnome.org/show_bug.cgi?id=636963
2011-07-06 08:38:35 -04:00
Dan Winship
82a8ac1976 chrome: drop visibleInOverview
Every place that called chrome.addActor was specifying
visibleInOverview:true, and no existing designs call for chrome that
disappears when you enter the overview, so just drop that as an
option.

https://bugzilla.gnome.org/show_bug.cgi?id=633620
2011-06-28 11:07:11 -04:00
Rui Matos
63b1699a35 panel: Don't propagate button-release-event in _onCornerClicked()
Since both the hot corner's ClutterGroup and the hot corner's
ClutterRectangle button-release-event is connected to
_onCornerClicked() we must handle it there by returning 'true' to
Clutter or else _onCornerClicked() is called twice which defeats the
HOT_CORNER_ACTIVATION_TIMEOUT logic.

https://bugzilla.gnome.org/show_bug.cgi?id=649427
2011-05-19 12:09:01 -04:00
Jasper St. Pierre
c4f5274d74 appMenu: Disable reactivity at the start of animation
If you clicked on the application button while it was fading out, like
during a transition to the overview, a vestigal menu appeared.

https://bugzilla.gnome.org/show_bug.cgi?id=639459
2011-05-16 19:12:38 -04:00
Dan Winship
898b2b903d environment: put gettext stuff into global environment
Rather than defining _() as a local function in every module, put it
into the global environment (along with C_() and ngettext()).

https://bugzilla.gnome.org/show_bug.cgi?id=649203
2011-05-16 14:57:21 -04:00
Dan Winship
9d5906dae3 panel: provide a consistent way to refer to panel items from lg
Rename a few Panel fields and add a _statusArea object pointing to the
status area PanelButton objects. You can now address each item
consistently from lg:

    Main.panel._activities
    Main.panel._appMenu
    Main.panel._dateMenu
    Main.panel._statusArea.a11y
    Main.panel._statusArea.volume ...
    Main.panel._userMenu

https://bugzilla.gnome.org/show_bug.cgi?id=646915
2011-04-26 08:21:41 -04:00
Florian Müllner
d97657b151 app-menu: Update clip on icon size changes
To keep the app icon from overlapping the panel's (border-image)
border, a custom property for clipping the app menu icon's bottom
was introduced. But if the clip region is set before the initial
icon is set, the entire actor ends up clipped. Also due to the double
meaning of clutter_actor_get_height() (e.g. preferred height versus
allocated height), the clip region may end up too large and the icon
overlaps the panel's border-image.
Fix both problems by updating the clip region on size changes as
well, rather than on style changes only.

https://bugzilla.gnome.org/show_bug.cgi?id=644122
2011-04-25 22:20:10 +02:00
Owen W. Taylor
c5eb324cf0 Fix problem with app menu showing when leaving overview
Since the opacity of the application menu is controlled by
it's _targetIsCurrent flag, we need to respect that when entering
and leaving the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=645734
2011-03-28 23:05:55 -04:00
Giovanni Campagna
9f438d0ec6 Panel: sync primary hotcorner hover with Activities button
Since the hotcorner is a reactive actor, and it is over the Activities
button, hovering on it results in a leave-event for the button.
This is not noticeable when opening the overview, as the button is
correctly prelighted, but it is when closing, if you keep the mouse
near the hot corner, as the button is kept in normal state, despite
the mouse being over it.

https://bugzilla.gnome.org/show_bug.cgi?id=645751
2011-03-28 22:15:04 +02:00
Abderrahim Kitouni
12fad6f05f Fix ripple animation for RTL locales
The animation was invisible because it was going out of screen, also
add a mirrored version of the image to the theme.

https://bugzilla.gnome.org/show_bug.cgi?id=584662
2011-03-22 19:35:21 +01:00
Phil Bull
30346884fe Update terminology from "panel" to "top bar" when Ctrl+Alt+Tab is pressed.
This is the term recommended for use by the Documentation Team.
2011-03-21 17:17:27 -04:00
Alexander Larsson
1518dc9b60 Add pointer barriers to panel and message tray
If you have XFixes 5 (and corresponding xserver support) then we
add barriers on the panel and in the message tray corner so that
its easy to reach the corners even when there are monitors to the
sides of the primary monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=622655
2011-03-21 21:03:19 +01:00
Florian Müllner
b7be4df603 panel: Hide spinner when switching apps
Commit fcfd17e was overzealous when simplifying the previous spinner
animation, as a result the spinner now stays around when switching
to another application while the animation is ongoing.
2011-03-17 22:06:34 +01:00
Giovanni Campagna
c8ac3fd4f5 Status area: add NetworkManager indicator
Adds an implementation of nm-applet in javascript. Uses the new
introspection from NetworkManager, and temporarily requires
nm-applet to be running for the secret service.
Features a renewed interface, with each device controllable through
a switch, which if toggled off disconnects, and if toggled on
connects to the most recently used valid connection. More esoteric
features like creation of ad-hoc networks have been moved to the
control center panel.

https://bugzilla.gnome.org/show_bug.cgi?id=621707
2011-03-16 15:59:34 +01:00
Owen W. Taylor
e8eec2d357 Use points for font sizes
Do a basic job of converting font sizes from pixels to points, so they
will scale will the global GNOME scale factor. Some other sizes that are
clearly related to the font sizes are changed to ems, but no comprehensive
attempt is made to get rid of px units.

https://bugzilla.gnome.org/show_bug.cgi?id=636868
2011-03-15 12:01:40 -04:00
Florian Müllner
fcfd17e973 app-menu: Simplify startup animation
During application startup, we used to display a rotating spinner
which also moved from left to right, revealing the application title.
The result looks rather busy, so remove the horizontal movement.

https://bugzilla.gnome.org/show_bug.cgi?id=640782
2011-03-15 13:27:44 +01:00
Maxim Ermilov
69d6ae4141 panel: prevent blink of current app indicator
If new current app is null, show animation of disappearing old.
https://bugzilla.gnome.org/show_bug.cgi?id=615099
2011-03-09 01:53:32 +03:00
Dan Winship
797368bf9f Revert "panel: remove accessibility icon"
pending further discussion in
https://bugzilla.gnome.org/show_bug.cgi?id=639762

This reverts commit 7790a07c08.
2011-03-07 13:06:34 -05:00
Dan Winship
af4fcc831e ctrlAltTab: misc improvements
Fix the "panel" icon to be symbolic. Make the overview parts only show
up when in the overview, and the non-overview parts (eg, the Desktop
window, if there is one) only show up when not in the overview. Sort
the different items consistently with their locations on the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=618887
2011-03-07 11:15:05 -05:00
Dan Winship
7790a07c08 panel: remove accessibility icon
The accessibility menu is not ready for prime time. Remove it for now.

https://bugzilla.gnome.org/show_bug.cgi?id=639762
2011-03-07 11:00:42 -05:00
Jakub Steiner
1496d6af2f Update the spinner to be consistent with adwaita/gtk
https://bugzilla.gnome.org/show_bug.cgi?id=643708
2011-03-07 16:24:19 +01:00
Florian Müllner
8ed191283a Remove manually added :rtl pseudo classes
To deal with different CSS in RTL locales, we used to manually add
an :rtl pseudo class to some actors. With automatically assigned
:ltr/:rtl selectors this is no longer necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=643835
2011-03-05 19:40:56 +01:00
Florian Müllner
d6e29be980 panel: Include panel corners in startup animation
Commit b1654af406 moved the panel positioning (and thus that of its
corners) before the panel startup animation. As the panel corners now
are mapped while the panel animation is active, the initial style-changed
signal which triggers another repositioning is received after the
initial layout and the corners end up at wrong positions.
To fix, animate the corner positions as well during the startup
animation - if anyone could actually see the animation, the corners
should animate with the panel anyway ...

https://bugzilla.gnome.org/show_bug.cgi?id=643804
2011-03-03 22:56:38 +01:00
Florian Müllner
6fbf8fa9e4 panel: Use a constant for the panel startup animation time
https://bugzilla.gnome.org/show_bug.cgi?id=643804
2011-03-03 22:43:35 +01:00
Alexander Larsson
b1654af406 Fix positioning of panel on startup
We need to do the initial relayout before we start up the startup
animation, and the startup animation can't hardcode the position
of the panel to zero.

https://bugzilla.gnome.org/show_bug.cgi?id=642881
2011-03-03 15:56:00 +01:00
Colin Walters
5b3974b6b4 panel: Remove some unused duplicate constants 2011-03-01 09:40:48 -05:00
Giovanni Campagna
15ec185be5 Don't declare global variables
Fix a typo in panel.js, and ensure that all variables used in
functions are scoped to the block (using let), to avoid polluting
the global namespace.

https://bugzilla.gnome.org/show_bug.cgi?id=643210
2011-02-24 21:22:44 +01:00
Florian Müllner
ff171e3651 panel: Reposition corners on changes to the monitor layout
When the monitor layout changes, the panel might have been moved
to another monitor, in which case the rounded corners need to be
repositioned.

https://bugzilla.gnome.org/show_bug.cgi?id=643064
2011-02-23 20:32:31 +01:00
Florian Müllner
172d68d1fe panel: Add a relayout() method to position the panel
Currently the panel is positioned from main.js, move that code into
a method in panel.js instead and call it from main.js, which is
consistent with what we do for the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=643064
2011-02-23 20:32:31 +01:00
Alexander Larsson
259c84ed9a Move HotCorner to chrome instead of in the panel
This prepares for there being multiple hot corners, one per monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=642881
2011-02-23 20:16:48 +01:00
Alexander Larsson
196d10454a Factor out hot corner handling into a class
This is needed so that we can have several instances, one per
monitor.

This also makes the hot corner environments a container which
contains the corner.

https://bugzilla.gnome.org/show_bug.cgi?id=642881
2011-02-23 20:16:48 +01:00
Florian Müllner
9a048af1fb panel: Move panel border into the background
In the mockups the bottom border of active panel buttons is drawn
on top of the panel's border. To get this effect, move the panel
border into the background, so that it is not subtracted from the
vertical space given to the buttons. Adjust the drawing of the rounded
corners to reflect that change.

https://bugzilla.gnome.org/show_bug.cgi?id=643001
2011-02-23 17:39:07 +01:00
Alexander Larsson
e3511127c7 No need to Check for grabbed menus on hot corner enter/click
We never get enter events anyway due to the menu code, and if
the user clicks on a non-menu the menu is removed and ungrabbed
before the target actor gets the event anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=642881
2011-02-23 15:24:28 +01:00
Florian Müllner
867c9a19ae panel: Defer adding the user status menu to the manager
PopupMenuManager relies on menus being added in the order of the
menu buttons they are attached to, so defer adding the user status
menu until the status icon menus have been added to make the manager
happy.
2011-02-23 00:07:40 +01:00
Florian Müllner
fb800f3d8b panel: Fix corner positions for multi-monitors
The corner positions were only based on the panel's dimensions, its
position needs to be taken into account as well.
2011-02-21 23:59:48 +01:00
Florian Müllner
526384320e panel-buttons: Remove transitions for corner buttons
So far transitions do not work for the custom drawn corners, so to
avoid a visible glitch when transitioning a button in the panel corner
while updating the style of the apparently attached corner instantly,
remove transition of those panel buttons until we make it work for the
custom drawn parts as well.

https://bugzilla.gnome.org/show_bug.cgi?id=642697
2011-02-21 17:38:47 +01:00
Florian Müllner
977f45cdb9 panel: Add rounded corners
Current mockups show the panel curving downwards at the edges to
frame the work area and look awesome. Implement those as separate
actors to not affect the struts set by the panel, and synchronize
their state with the corresponding panel buttons so they blend in
with the panel. It might be worth considering whether the corners
should be hidden with maximized windows on the current workspace,
though this might affect the illusion of them being part of the
panel. As the corners don't affect the input region, the small
overlap with windows might not be too bad after all.

https://bugzilla.gnome.org/show_bug.cgi?id=642697
2011-02-21 17:38:47 +01:00
Florian Müllner
0a94c01f83 panel: Adjust CSS for RTL locales
The groups at the panel sides use different left/right padding, so
a slightly different CSS is required for RTL locales. Add :rtl
pseudo classes as necessary and adjust the CSS.

https://bugzilla.gnome.org/show_bug.cgi?id=642697
2011-02-21 17:38:47 +01:00
Florian Müllner
473dad0c3e appMenu: Clip app icon when the button is active
We now use a border image on active panel buttons to underline the
button's content. As the property does not affect the content's
allocation, the app icon ends up being drawn on top of the border
image. To prevent this, use a custom property to clip the bottom of
the app icon when the button is active.

https://bugzilla.gnome.org/show_bug.cgi?id=642697
2011-02-21 17:38:47 +01:00
Florian Müllner
4dec1bc846 panel: Move statusmenu initialization in the constructor
While related to the status area, the user status button is clearly
not a status icon, and it does not make too much sense in
startStatusArea(), which is about filling the status area with
icons. Also, the status icon container is added to the panel in
the constructor, in fact, the user status button is the only "toplevel"
panel element which is initialized elsewhere. Not a crucial change,
but makes for a nice read anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=642697
2011-02-21 17:38:47 +01:00
Owen W. Taylor
43961aaca5 panel: fix app menu visibility after quick overview visit
If you left the overview immediately after entering it (either
intentionally or due to a bug), the app menu would mistakenly end up
hidden due to flaky interaction between its show() and hide() methods.

Based on a patch by Dan Winship <danw@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=641117
2011-02-17 11:36:35 -05:00
Sardem FF7
8f3376ce62 Add "precision" to boxpointer alignment
Allows the boxpointer arrow to be at a fixed percentage of the bubble

https://bugzilla.gnome.org/show_bug.cgi?id=642031
2011-02-16 10:19:39 -05:00
Dan Winship
37d307c80e panel: remove some leftover code from the old calendar 2011-02-15 17:12:47 -05:00
Dan Winship
c86a977564 St: drop StClickable, add some functionality to StButton
For historical reasons, we had both StClickable and StButton, which
were nearly identical. StButton was more widely-used, so keep that and
port all StClickable users to that.

https://bugzilla.gnome.org/show_bug.cgi?id=640583
2011-02-07 12:45:48 -05:00
David Zeuthen
885b6ffaef Calendar: Implement new mockup
https://bugzilla.gnome.org/show_bug.cgi?id=632109

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-01-31 11:52:27 -05:00
Florian Müllner
0244c6d5b8 Revert "KeyboardStatus: handle modifier key indicators"
The 'show-keyboard-leds-indicator' key has been removed from
the schema.

This reverts commit 20f49e8c89.
2011-01-29 19:34:12 +01:00
Giovanni Campagna
20f49e8c89 KeyboardStatus: handle modifier key indicators
Introduce a generic framework for on/off indicators that are shown
in the panel, next to the system status area, and use it for
showing the status of modifier keys.

https://bugzilla.gnome.org/show_bug.cgi?id=600771
2011-01-21 19:38:30 +01:00
Giovanni Campagna
4207536377 Status Area: add keyboard layout selector
Add an indicator for the current keyboard layout, based on
libgnomekbd. The indicator is shown when more than one group
is loaded in X and it is not disabled in GSettings.

https://bugzilla.gnome.org/show_bug.cgi?id=600771
2011-01-12 20:27:25 +01:00
Adel Gadllah
ceedc7e32c Implement cross overview drag & drop
The gnome-panel allows the user to hover over a tasklist entry
while draging to activate a minimized or obscured window and drop onto it.

Implement a similar behaviour by allowing draging to the activities button or
the hotcorner (and thus opening the overview), which allows the user to
activate any window (even on different workspaces) as a drop target.

https://bugzilla.gnome.org/show_bug.cgi?id=601731
2011-01-05 23:19:56 +01:00
Adel Gadllah
dd0f721694 calendar: Use AlignConstraint to center the popup
This fixes warnings like:

(mutter:12238): Clutter-WARNING **: The actor 'calendarPopup' is
currently inside an allocation cycle; calling clutter_actor_queue_relayout()
is not recommended

https://bugzilla.gnome.org/show_bug.cgi?id=637829
2011-01-04 17:20:16 +01:00
Florian Müllner
24f1e87813 clock: Use settings from gsettings-desktop-schemas
A key for 12hr/24hr clock format has been added to gsettings-desktop-schemas,
so use that instead of the one from the shell clock schema.

As the setting can be controlled from the Date and Time panel of
gnome-control-center now, drop the temporary preference dialog
as well.

https://bugzilla.gnome.org/show_bug.cgi?id=633200
2011-01-04 17:14:00 +01:00
Dan Winship
7d0eeef90a panel: fix up calendar-vs-menu handling on clock
Give the clock's right-click menu its own PopupMenuManager so that if
you drop down another menu and then mouseover the clock it doesn't
pop up the right-click menu.

https://bugzilla.gnome.org/show_bug.cgi?id=634755
2010-12-21 17:10:36 -05:00
Giovanni Campagna
9e99a8c25a Bluetooth status indicator
Introduce the new Bluetooth indicator in the System Status area. It
is written in JS with St and uses the new GnomeBluetoothApplet library.

https://bugzilla.gnome.org/show_bug.cgi?id=618312
2010-12-18 19:10:15 +01:00
Giovanni Campagna
8b3f05b6e3 Status area: introduce battery & power indicator
Add an indicator for battery charge and power indication in the
system status area, using the newly exported DBus API from
gnome-power-manager.

https://bugzilla.gnome.org/show_bug.cgi?id=622451
2010-11-17 14:52:39 +01:00
Florian Müllner
34aa46a844 app-menu: Fix quit menu item
As popup menus now take focus for keyboard navigation, no application
is focused when activating the menu. Use the target application instead,
which keeps track of the application currently associated with the menu.

https://bugzilla.gnome.org/show_bug.cgi?id=634103
2010-11-05 19:02:53 +01:00
Giovanni Campagna
08f7ecad35 Don't remove the tray icons we don't add
Tray icons replaced by a shell version are automatically filtered
and never make to the tray container, but when removed by the client
we were still trying to remove them from the tray, causing a warning.

https://bugzilla.gnome.org/show_bug.cgi?id=633028
2010-10-29 20:05:31 +02:00
Dan Winship
548a23a969 PopupMenu: redo keynav using St.FocusManager
Each menu is a focus manager group, but there is also some explicit
focus handling between non-hierarchically-related widgets. Eg, to move
between menus, or from a menubutton into its menu.

https://bugzilla.gnome.org/show_bug.cgi?id=621671
2010-10-29 08:38:05 -04:00
Giovanni Campagna
0547a582d1 Add volume indicator
Add volume control indicator which uses API from gnome-volume-control
to interact with PulseAudio and shows both input and output volumes.
Also adds a small wrapper around libcanberra in ShellGlobal, used by the
volume indicator to provide auditive feedback.

https://bugzilla.gnome.org/show_bug.cgi?id=629455
2010-10-20 16:59:12 +02:00
Maxim Ermilov
4456954d30 [panel] Only show starting applications for current workspace
Add the workspace we started on to ShellApp.  Use it inside panel.js
to filter the list.
https://bugzilla.gnome.org/show_bug.cgi?id=623688
2010-10-07 01:31:22 +04:00
Jason D. Clinton
b96cf2042a [StatusIconDispatcher] Add keyboard and display icons to tray icon list 2010-09-24 14:53:50 -05:00
Florian Müllner
8c1bf346a9 [appDisplay] Factor out WellGrid/AppIcon
All mockups now use a representation for documents/places similar to
the one used for applications. Rename AppIcon to BaseIcon and move its
code together with WellGrid out of appDisplay to stress their general
usefulness.

https://bugzilla.gnome.org/show_bug.cgi?id=625887
2010-09-23 19:08:43 +02:00
Dan Winship
cbf2cbac61 [StatusIconDispatcher] Move non-system-tray icons to message tray
New StatusIconDispatcher dispatches icons to the system or message tray.

Based on a patch from Matt Novenstern
https://bugzilla.gnome.org/show_bug.cgi?id=608869
2010-09-23 09:49:47 -04:00
Dan Winship
ae9360659d [ShellTrayIcon] add ShellTrayIcon, make ShellTrayManager use it
The actor emitted by ShellTrayManager is now ShellTrayIcon, a subclass
of ShellGtkEmbed which has several properties on it which are (or will
soon be) useful to the shell.

Part of the rearranging to use ShellTrayIcon means that we now show
the ShellEmbeddedWindow before creating its ShellGtkEmbed, which
requires a few modifications to ShellEmbeddedWindow (notably, telling
it at construct time what stage it will be drawn on, since it needs to
know that before it has a ShellGtkEmbed now).

https://bugzilla.gnome.org/show_bug.cgi?id=608869
2010-09-23 09:49:47 -04:00
Giovanni Campagna
6ea18136ac Add Universal Access status indicator
Introduce the Universal Access status indicator as designed, modeled
after the similar UI provided by g-s-d. This indicator allows the user
to change rapidly the keyboard and mouse behaviour (sticky keys, slow
keys, bounce keys, mouse keys), as well as the enabled ATs (magnifier,
screen reader, screen keyboard) and the HighContrast Gtk theme.

https://bugzilla.gnome.org/show_bug.cgi?id=624916
2010-09-16 15:03:26 -04:00
Florian Müllner
c18ff91030 [panel] Add a style class while the overview is active
Designers have asked for the possibility to style the panel
differently in the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=624381
2010-08-20 12:06:48 +02:00
Giovanni Campagna
73ecdbd6da Add API for system status indicators
Add a container in the panel for holding them, a fast method for
loading and a simple base class to be subclassed by specific
implementations.

https://bugzilla.gnome.org/show_bug.cgi?id=621705
2010-07-21 12:31:06 -04:00
Dan Winship
539ad8196e [panel] don't empty out the app menu when the panel itself gets focus
https://bugzilla.gnome.org/show_bug.cgi?id=623429
2010-07-20 15:03:17 -04:00
Florian Müllner
4632db177a Clean up unused includes
Some late spring cleaning ...
2010-07-19 01:46:01 +02:00
Florian Müllner
cc0de39725 [panel] Fix translatable string
Fix a string which is not extracted correctly by marking it
correctly with double quotes.
2010-07-19 01:46:01 +02:00
Giovanni Campagna
5a7201ef4d Resolve cyclic dependency on StatusMenu
Solved by splitting the base class (PanelMenuButton) in a separate
module, ui.panelMenu, which is meant to hold also other reusable
button classes.

https://bugzilla.gnome.org/show_bug.cgi?id=621705
2010-07-13 11:58:13 -04:00
Florian Müllner
69fde6822c [StartupNotification] Do not bounce the animation
The spinner animation moving from left-to-right to indicate a starting
application changes its direction on reaching the end of the movement.
Instead, keep the spinner at the right of the app name until startup
has finished.

https://bugzilla.gnome.org/show_bug.cgi?id=623687
2010-07-10 02:25:58 +02:00
Florian Müllner
81aed78a1f [panel] Flip left and right group in RTL locales
While the contents of the left and right group in the panel are
flipped correctly, the groups themselves have to be swapped as
well. The location of the hot corner has to be corrected as well.

https://bugzilla.gnome.org/show_bug.cgi?id=622243
2010-06-21 18:40:29 +02:00
Milan Bouchet-Valat
2799327c84 Migrate to GSettings
Use GSettings for all Shell configuration. GConf is kept to read
configuration from external programs (Metacity, Nautilus and Magnifier),
but ShellGConf is removed because it's mostly useless for the few calls
we still have. Also get rid of unused GConf code in ShellAppSystem.

A basic GConf schema is still used to override Metacity defaults and
configure Magnifier in a system-wide fashion. GConf is also used as
GSettings backend via the GSETTINGS_BACKEND environment variable.
All of this will be removed when these programs have been ported
to GSettings and able to use dconf.

GLib 2.25.9 is required. Schemas are converted to the new XML format,
and compiled at build time in data/ so that the Shell can be run from
the source tree. This also requires setting the GSETTINGS_SCHEMA_DIR
environment variable both when running installed or from source tree,
in src/gnome-shell.in and src/gnome-shell-clock-preferences.in.

https://bugzilla.gnome.org/show_bug.cgi?id=617917
2010-06-18 20:27:41 +02:00
Maxim Ermilov
7f8f0f2358 Add animated display of startup notification
The shell design says that upon launching an application,
no X window should have focus, and we should display an
animated launching indicator.

Implement this by in panel.js, keep track of the last started
application.  If there isn't currently an X focus, show an animation
for the last starting application.

https://bugzilla.gnome.org/show_bug.cgi?id=598349
2010-06-17 23:18:28 +04:00
Florian Müllner
9baf8e19ea Kill Ubuntu indicators on start-up
Canonical replaced status icons with libindicator based solutions,
which don't work in the shell environment. Force the distro-patched
versions to fall-back to upstream.

https://bugzilla.gnome.org/show_bug.cgi?id=621382
2010-06-17 18:44:50 +02: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
Colin Walters
e4a6bf994f Fix ShellAppSystem's use of no_focus_window, clean up state handling
First, we were passing an incorrect timestamp to
meta_display_focus_the_no_focus_window - fix that.

The invocation of set_focus_app to the started app there couldn't
really work, because (if the above call had worked) we'd get the
X reply *after* the started app.

What we need to untangle here is the distinction that's now made in
ShellApp between _STATE_STARTING and _STATE_RUNNING.  A nice way to
start doing this is to rebase ShellWindowTracker to only be concerned
with app states.  Concretely, the current "has windows implies
running" logic now lives just inside shell-app.c.

Rename the app-running-changed signal to be app-state-changed.  This
will ultimately be useful so that inside the panel, we can track
the last started app.

https://bugzilla.gnome.org/show_bug.cgi?id=620899
2010-06-09 14:44:15 -04:00
Florian Müllner
e1a109b9be [panel] Fix translatable strings
There are some strings in panel.js which are not extracted correctly.
Fix by marking them correctly with double quotes and _().
2010-06-08 17:13:26 +02:00
Florian Müllner
63d84533c9 [ClockButton] Add a right-click menu to the clock
The clock preferences are hardly discoverable, so allow launching
them from a right-click menu.

https://bugzilla.gnome.org/show_bug.cgi?id=600276
2010-06-03 11:43:58 +02:00
Raphael Bosshard
e3eaa69948 Add ISO week dates to the calendar
This patch adds ISO week dates to the calendar. Week dates are an
often used feature in business and government offices. Can be turned
on through gconf, off by default.

https://bugzilla.gnome.org/show_bug.cgi?id=603532
2010-05-28 01:31:33 +02:00