Commit Graph

331 Commits

Author SHA1 Message Date
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