Commit Graph

1541 Commits

Author SHA1 Message Date
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
cf85477864 workspace: Move close button to the left in RTL locales
Mutter reverses the button layout in RTL locales, so we should do
the same for the window previews' close buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=643834
2011-03-04 22:42:57 +01:00
Adel Gadllah
614176b269 appSwitcher: Fix logic error in AltTabPopup._allocate 2011-03-04 17:07:45 +01:00
Adel Gadllah
03401bbb58 CtrlAltTabPopup: Fix pixel alignment
CtrlAltTabPopup was using a St.BoxLayout and relied on anchor_gravity
center for positioning. This does not guarantee correct pixel alignment,
so use a St.GenericContainer instead and do the positioning similar to
that of the appSwitcher.

https://bugzilla.gnome.org/show_bug.cgi?id=643820
2011-03-04 17:07:01 +01:00
Jasper St. Pierre
75ae209653 history: Fix HistoryManager
Make GSettings support optional, refactor text entry handling,
fix some off-by-one bugs in the management itself, use Params
for parsing, fix other typos and bugs.

https://bugzilla.gnome.org/show_bug.cgi?id=642793
2011-03-04 09:07:15 -05:00
Jasper St. Pierre
8ce97961b4 lookingGlass: Add TelepathyGLib to the default set of imports
https://bugzilla.gnome.org/show_bug.cgi?id=642793
2011-03-04 09:07:04 -05:00
Adel Gadllah
0065e2cfac xdndHandler: Correctly disconnect the window group visibility handler 2011-03-04 11:23:18 +01:00
Adel Gadllah
2ee4f57395 WindowAttentionHandler: Fix notify callback leak
Keep track of the connected handlers and disconnect them on
when destroying the source.

https://bugzilla.gnome.org/show_bug.cgi?id=640781
2011-03-04 08:27:32 +01:00
Florian Müllner
e01971eac7 base-icon: Always recreate icon texture on style changes
Currently the icon texture is only updated on style changes when
the icon size is set from CSS and differs from the previously used
icon size.
As the style change may have been triggered by an icon theme change,
textures that are created for themed icons should always be recreated;
given that this is the case for most uses (with the exception of
file thumbnails), recreate the icon texture unconditionally to avoid
complexity.

https://bugzilla.gnome.org/show_bug.cgi?id=643738
2011-03-03 23:14:32 +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
William Jon McCann
440b222664 Do not launch power statistics app from battery items
https://bugzilla.gnome.org/show_bug.cgi?id=640768
2011-03-03 15:44:38 -05:00
Florian Müllner
602fa1c657 universal-access: Use "text-scaling-factor" instead of "dpi"
The latter has been removed from the schema, so adjust to that change.
2011-03-03 18:49:40 +01:00
Alexander Larsson
d964d2baae Ensure that all struts we set extends to their boundary
Mutter really expects this, as this is how app-specified struts
happen. For instance, if the primary display is beside a taller
screen and is not positioned at the top, then we extend the struts
for the panel with the size of the unused area above the primary
monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=642881
2011-03-03 15:56:16 +01:00
Alexander Larsson
d235c205d6 Consider struts top/botton or left/right based on primary monitor size
Right now we require a strut to be as wide as the full screen to
create a TOP strut. This means that in a multi-monitor scenario (at
least if the primary monitor is leftmost) we will make the panel strut
be Meta.Side.LEFT due to the random side picking for corner objects.

This changes the width/height comparison to the primary monitor rather
than the screen to get this right. Also adds some docs about how
struts work in a multi-monitor situation.

https://bugzilla.gnome.org/show_bug.cgi?id=642881
2011-03-03 15:56:16 +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
Maxim Ermilov
29e5768f9b messageTray: don't leak Notifications
https://bugzilla.gnome.org/show_bug.cgi?id=640781
2011-03-03 03:53:08 +03:00
Maxim Ermilov
3a6b4f3eb5 main: correct pushModal/popModal mechanism
1. disconnect destroy signals in popModal (actors can have great lifetime and then pushed again)
2. incorrect pushModal/popModal pair in overview
https://bugzilla.gnome.org/show_bug.cgi?id=64078
2011-03-03 03:53:04 +03:00
Florian Müllner
34ce17c4b3 search-result: Use a larger icon size
Increase the icon size of search results for consistency with the
application view. To account for the larger icons, only display
a single row of results per section.

https://bugzilla.gnome.org/show_bug.cgi?id=643632
2011-03-02 23:12:35 +01:00
Florian Müllner
7723e59a72 search: Replace 'icon' property in metaInfo with a function
Search results' meta info currently is expected to have an 'icon'
property holding a Clutter.Texture of a fixed icon size. This
property is used to implement the createIcon() function of BaseIcon,
which is used to actually display the result, ignoring the size
parameter due to the fixed icon size.
Given that all available search providers create this property for
the desired icon size using a function with the same signature, it
appears logical to replace the fixed-sized 'icon' property with
such a function, so that the icon size will be defined by the display
actor rather than the search system.

https://bugzilla.gnome.org/show_bug.cgi?id=643632
2011-03-02 23:12:35 +01:00
Florian Müllner
7f5135016e search: Don't expand search when clicking section headers
Currently section headers in the search view are reactive and run
the corresponding provider's expandSearch() function when clicked,
which should launch an external program displaying all search
results for the section. Unfortunately it is only implemented for
the "Settings" provider, and does not work properly (as it ignores
the search and just launches System Settings).
Also current mockups deemphasize the section header, making the
feature pretty much indiscoverable (except by accident when
interfering with swipe-scrolling).
In conclusion, the feature does not make much sense in its current
form, so remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=643632
2011-03-02 23:12:35 +01:00
Florian Müllner
08e0485213 search-display: Remove search result count
Currently the total number of matches for a particular section is
displayed on the left of the section's header. While it made sense
in the old layout where it was close to the section's title, it is
now rather disconnected, and has been removed in current mockups.

https://bugzilla.gnome.org/show_bug.cgi?id=643632
2011-03-02 23:12:35 +01:00
Giovanni Campagna
b9cb37da5e PopupMenuManager: don't throw exceptions if don't have focus
stage.key_focus can be null, but passing null to _activeMenuContains
throws (from gjs marshalling). In that case, just assume it returned
false.

https://bugzilla.gnome.org/show_bug.cgi?id=642976
2011-03-02 16:30:38 +01:00
Florian Müllner
6207c68439 extensions: Ignore extensions in directories without read permission
Gio.enumerate_children() throws an exception if called for a directory
without read permissions. Catch this case to allow the shell to start.

https://bugzilla.gnome.org/show_bug.cgi?id=643663
2011-03-02 16:00:52 +01:00
Florian Müllner
5e8f7ec590 app-display: Rename PREFERENCES search provider to SETTINGS
Both the shell and gnome-control-center prefer "Settings" over
"Preferences", so rename the corresponding search section.
2011-03-02 01:20:24 +01:00
Giovanni Campagna
89dcd9027d PowerStatus: report 0 minutes as "Estimating..."
When UPower has not yet collected enough data to calculate a time
to discharge, it will report 0 minutes. Show "Estimating..." in
that case instead.

https://bugzilla.gnome.org/show_bug.cgi?id=642753
2011-03-01 20:18:29 +01:00
Adel Gadllah
102b2e2ca6 autoWorkspaces: Better handle apps that open a splashscreen or dialog at startup
Currently we remove a workspace when last window on that workspace closes,
which turned out to be too agressive as some apps open either a splashscreen
or a "I have crashed last time" dialog at startup.

Try to detect such apps and give them a chance to open their "real window(s)"
on the workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=642188
2011-03-01 19:10:21 +01:00
Colin Walters
5b3974b6b4 panel: Remove some unused duplicate constants 2011-03-01 09:40:48 -05:00
Guillaume Desmottes
e8e36e8a66 statusMenu: change IM presence when needed (#617207) 2011-03-01 10:10:14 +01:00
Giovanni Campagna
88bcd0a9ce AppDisplay: allow changing categories by scrolling over them
Respond to scrolling over the app categories by changing them, so
it is not required to point and click, or to use the All view.

https://bugzilla.gnome.org/show_bug.cgi?id=643426
2011-02-28 22:57:31 +01:00
Adel Gadllah
7c534a87cf dnd: Don't pass null to ClutterActor.disconnect()
_ungrabActor disconnects the event signal handler but does not
check whether it is connected before doing so which can result into
an exception like:

JS ERROR: !!!   Exception was: Error: disconnect() takes one arg, the signal handler id
JS ERROR: !!!     lineNumber = '0'
JS ERROR: !!!     fileName = 'gjs_throw'
JS ERROR: !!!     stack = 'Error("disconnect() takes one arg, the signal handler id")@:0
2011-02-28 22:41:11 +01:00
David Zeuthen
e9e30138bd Move calendar handling out-of-process
Unfortunately the evolution-data-server client-side libraries seem to
block the calling thread. This is a major problem as we must never
ever block the main thread (doing so causes animations to flicker
etc.). In the worst case, this problem causes login to hang (without
falling back to fall-back mode) and in the best case it slows down
login until a network connection is acquired.

Additionally, in order to sanely use these evolution-data-server
libraries, GConf has to be involved and GConf is not thread-safe. So
it's not really feasible just moving the code to a separate
thread. Therefore, move all calendar IO out of process and use a
simple (and private) D-Bus interface for the shell to communicate with
the out-of-process helper.

For simplification, remove existing in-process code since internal
interfaces have been slightly revised. This means that the shell is no
longer using any native code for drawing the calendar dropdown.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-02-28 16:08:18 -05:00
Colin Walters
474ff2e997 Claim DBus names (Shell, Notifictions) *very* early
See commit f2158218bef0c51 in mutter.  Basically, we need
to grab org.freedesktop.Notifications before anything else
in the session gets started.

Note: I intentionally removed the Util.killall bits.  I believe that
for notification-daemon at least, if we specify
DBUS_NAME_FLAG_REPLACE_EXISTING, we'll take over the name.  Not sure
about notify-osd; if that's still a problem, then what we need to do
is add killing (and possibly respawning) of notify-osd to
"gnome-shell --replace", and not have it embedded randomly in a JS file.

https://bugzilla.gnome.org/show_bug.cgi?id=642666
2011-02-28 13:53:44 -05:00
Giovanni Campagna
0d2eb76cee Ensure that all signatures are defined in DBus interfaces
The DBus JS binding will complain if the signature of a method
or of a signal is undefined, so we need to define it even if it
is an empty string, and we need to use the correct property name
for signals.

https://bugzilla.gnome.org/show_bug.cgi?id=643374
2011-02-28 18:40:57 +01:00
Florian Müllner
c72241df5b alt-tab: Enforce icon size
For applications with no proper desktop file, the window icon is
used as application icon in the tab switcher, but it won't have
the correct icon size. The current approach is to add additional
padding to these icons - the size turns out inconsistent with
other icons, but the icon appears sharp. For the dash it has been
decided that unsharp icons are less evil than differing icon sizes,
so icons are scaled up to the "right" size - for consistency, do the
same in the alt-tab switcher.

https://bugzilla.gnome.org/show_bug.cgi?id=643300
2011-02-26 00:06:44 +01:00
Florian Müllner
a78e75775d base-icon: Enforce the requested icon size
Mainly due to StTextureCache's way of handling fallback icons, an
implementation of BaseIcon.createIcon() may return an icon smaller
than the requested size. Given that BaseIcon is not used for isolated
elements, but rather for groups of related items (App view, Dash,
Search Results, ...), having some elements end up with the wrong
size is more annoying than having some elements end up ugly due to
scaling, so explicitly enforce the requested icon size.

https://bugzilla.gnome.org/show_bug.cgi?id=642043
2011-02-26 00:06:44 +01:00
Adel Gadllah
260e6662f0 overview: Remove unused 'getWorkspacesForWindow' method 2011-02-25 19:43:47 +01:00
Florian Müllner
5137cee3d6 app-display: Escape categories in filter labels
As gnome-shell now switched to use the menu file from gnome-menus,
we no longer have direct control over category names. If such a name
contains unescaped markup, the shell will crash when trying to create
the filter label, so make sure to escape markup in category names.
2011-02-25 18:04:08 +01:00
Adel Gadllah
7ddf54c4d3 appWellMenu: Show the "new window" item for non running apps
There is no reason to not display it, and from a user's point of view the
distinction is confusing.
2011-02-25 15:51:15 +01:00
William Jon McCann
be775b9206 Use new name of gnome-session quit helper process
Changed names from gnome-session-save to gnome-session-quit.
2011-02-24 17:58:05 -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
Dan Winship
d5735496af viewSelector: don't process key presses from capture-event
Rather than connecting to stage::capture-event and then trying to
guess whether or not a given key-press should be handled by us or not,
handle the end-search-on-Escape case from entry::key-press-event
(since it only makes sense when the entry is focused anyway) and the
start-search-on-printable-key case from stage::key-press-event (which
will only get the events that no other actor wanted for itself).

Similarly, do exit-overview-on-Escape and switch-panes cases from
stage::key-press-event, rather than
viewSelector.actor::key-press-event, so that they will work correctly
even if the keyboard focus is somewhere else. (Also fix a longstanding
bug in the pane-switching code, which was supposed to be disabled when
a search was active, but was checking a non-existent variable.)

https://bugzilla.gnome.org/show_bug.cgi?id=642502
2011-02-24 09:36:36 -05:00
Dan Winship
3755783d41 viewSelector: remove the search entry's event grab
The search entry was taking a sort of grab when it was in the
focused-but-empty state, and would eat up most events for other actors
(except, confusingly, for panel actors). The only bit of "modality" we
really need here is that the entry is supposed to go back to the
unfocused state if you click somewhere outside it when it was in the
focused-but-empty state. So do that.

https://bugzilla.gnome.org/show_bug.cgi?id=642502
2011-02-24 09:36:35 -05:00
Dan Winship
5b8d3ba1d6 viewSelector: merge SearchEntry into SearchTab
The division of labor between the two was quite muddled. Rather than
try to invent a clean distinction of what belongs where, just merge
them together.

https://bugzilla.gnome.org/show_bug.cgi?id=642502
2011-02-24 09:36:35 -05:00
Adel Gadllah
6d6ec46f25 XDND: Remove the switch timeout in _onDragEnd
When the user cancels the drag while hovering over a window the timeout
handler will throw an exception because the drag actor will be destroyed
at this point.

Fix that by removing the timeout in _onDragEnd.
2011-02-24 11:47:00 +01:00
Adel Gadllah
8d78c3a2ab XDND: Always update the timestamp on motion
The xdnd timestamp gets updated on every xdnd-position event,
so while waiting for the window timeout to fire we need to make sure we
update the timestamp when getting on motion to activate the window
with the correct timestamp.
2011-02-24 11:46:53 +01:00
Jasper St. Pierre
7077e57d53 main: Remove left-over 'hotCorner' global
Commit 259c84ed9a refactored out HotCorner into its own class
and added this line and a variable, but it was left behind
when the variable disappeared in commit 7cf311dac0.
2011-02-23 17:50:03 -05:00
Jasper St. Pierre
97bb5b6680 telepathyClient: Fix two minor typos
https://bugzilla.gnome.org/show_bug.cgi?id=642793
2011-02-23 15:08:45 -05:00
David Zeuthen
adb04eb010 polkit: don't show authentication dialog until needed
See https://bugs.freedesktop.org/show_bug.cgi?id=27788#c1 for details
about the problem this patch is solving

In particular, we should never bring up the dialog if there is no
password on the account. While this sounds like a weird corner case,
it's not.. the Live CD, for example, does not have a root password.

This also avoids the initial dialog resize.. before the patch the
authentication dialog appears and a split-second later an StEntry
widget is added.

Also print out more diagnostic information if showing the modal dialog
fails. Also add a comment about how to easily make this happen.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-02-23 14:49:09 -05: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
885f668d53 Track fullscreen status per-monitor in Chrome
This is required since we can have chrome on multiple monitors (due to
per-monitor hot-corners).

Windows are primary associated with the monitor that their center is on.

https://bugzilla.gnome.org/show_bug.cgi?id=642881
2011-02-23 20:16:48 +01:00
Alexander Larsson
7cf311dac0 Put a hot corner on each monitor
https://bugzilla.gnome.org/show_bug.cgi?id=642881
2011-02-23 20:16:48 +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
Giovanni Campagna
06198702c2 KeyboardStatus: fix showing current layout
Util.spawn accepts an array of strings as the arguments, and will
not implicitly convert other types.

https://bugzilla.gnome.org/show_bug.cgi?id=643104
2011-02-23 20:13:31 +01:00
Giovanni Campagna
12d991f336 A11yStatus: ignore an user default of O dpi
The default for the DPI setting is 0, but 0 * any scaling factor
is 0, so we need to deal with that, by falling back to X default.

https://bugzilla.gnome.org/show_bug.cgi?id=639762
2011-02-23 20:10:44 +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
David Zeuthen
697139043f polkit: return error when authentication dialog is dismissed
This allows PolicyKit applications to disambiguate between when the
authentication dialog is dismissed versus when authentication fails
(e.g. the wrong password has been entered).

See https://bugs.freedesktop.org/show_bug.cgi?id=30653 for more
information.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-02-23 11:02:46 -05:00
Alexander Larsson
60ae784c01 Remove unused tracking of visibility in Chrome
https://bugzilla.gnome.org/show_bug.cgi?id=642881
2011-02-23 15:24:28 +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
Adel Gadllah
fbf7528728 dateMenu: Make sure that the event list fills the available width
Currently the menu has a hardcoded width which result into the hover
effect of the "Open Calendar" item being "cut off" in the middle rather
then reaching to the edge.

To be consistent with other menu items, make it expand to fill the available
space.
2011-02-23 14:56:26 +01:00
Ray Strode
26f4e44d6c statusMenu: change how we stop the system
This updates the way we stop the system to
somewhat match the designs here:

https://live.gnome.org/GnomeShell/Design/Whiteboards/SystemStopRestart

We suspend by default unless suspend is unavailable, and offer shutdown
as a choice by hold down the alt key.

https://bugzilla.gnome.org/show_bug.cgi?id=636680
2011-02-22 18:46:57 -05:00
Ray Strode
610c2b5987 popupMenu: add alternate menu item
This is special menu item that can alternate
between two choices when you hit the alt key.

It will be useful for getting a hybrid
suspend/power off menu item.

https://bugzilla.gnome.org/show_bug.cgi?id=636680
2011-02-22 18:46:57 -05: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
Giovanni Campagna
1496c85bb6 MessageTray: Use status from gnome-session
This patch modifies MessageTray behaviour so that normal (not urgent)
notifications are not shown when the user is Busy (they're sent
immediately to the Summary area). When status is then changed,
notifications still pending are shown again.
Additionally, when status is modified from Idle to anything other than
Busy, the message tray is forced open for 4 seconds, so that summary
icons are visible.

https://bugzilla.gnome.org/show_bug.cgi?id=617225
2011-02-22 23:14:55 +01:00
David Zeuthen
86b925a294 Add a PolicyKit authentication agent
A PolicyKit Authentication Agent is a construct used to authenticate
one or more identities. See the PolicyKit documentation for more
details on authentication agents and how PolicyKit works:

    http://hal.freedesktop.org/docs/polkit/

Since gjs does not support subclassing a GObject class from Javascript
code, we bring in a native class to bridge the VFuncs to GObject
signals. Additionally, this native class also queues up authentication
requests so the user of the native class only has to deal with a
single outstanding request at any one time.

The file js/ui/polkitAuthenticationAgent.js introduces a singleton
that listens for authentication requests via the native class. This
singleton uses the PolkitAgent machinery to do the actual heavy-weight
lifting required for authentication (essentially a PAM conversation).

We currently don't allow the user to pick the identity to be
authenticated.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-02-22 15:13:56 -05:00
Owen W. Taylor
192d3a94ed tweener: remove tweens when target.actor is destroyed
We already remove tweens automatically when a Clutter actor is destroyed;
do the same when the target is a JS delegate with an actor property.

https://bugzilla.gnome.org/show_bug.cgi?id=642925
2011-02-22 12:36:25 -05: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
Adel Gadllah
75dbe4fdb9 workspaces: Remove the unused '_removeSelf' method
https://bugzilla.gnome.org/show_bug.cgi?id=640363
2011-02-21 21:31:07 +01:00
Giovanni Campagna
f34ce9271c PopupMenu: introduce PopupMenuSection
Complex popup menus require the ability to manager sequences of items
as "sections", to which you can add and and remove items, as well
as hide and show.
PopupMenuSection does exactly that, leveraging the existing machinery
for submenus, but without being exposed as a submenu to the user.
Also, make getMenuItems() private, since it is used for different things
now and may change semantics in the future.

https://bugzilla.gnome.org/show_bug.cgi?id=621707
2011-02-21 19:54:10 +01:00
Giovanni Campagna
6e236546ea PopupMenu: make parameters overridable in items
Make all subclasses of PopupMenuBase accept a params argument, which
can be used to make the item non reactive, not responsive to hover
and, as a new feature, with a different style class.

https://bugzilla.gnome.org/show_bug.cgi?id=621707
2011-02-21 19:54:10 +01:00
Adel Gadllah
3fd908d92c workspaces: Remove obsolete comment
https://bugzilla.gnome.org/show_bug.cgi?id=640361
2011-02-21 19:23:34 +01:00
Giovanni Campagna
a4d3a57a1c A11yStatus: fix resetting the GTK and icon themes
If the Shell is started with HighContrast enabled, it will never
see another value for the GSettings keys. In that case, we just
reset to the default.

https://bugzilla.gnome.org/show_bug.cgi?id=642641
2011-02-21 18:50:35 +01:00
Giovanni Campagna
0064ca3582 KeyboardStatus: add "Show layout" item
Add a menu item that opens a dialog showing the current keyboard
layout. Uses the new utility in libgnomekbd.

https://bugzilla.gnome.org/show_bug.cgi?id=641415
2011-02-21 18:49:19 +01:00
Owen W. Taylor
9c4cee7875 overview: avoid round-off errors when sizing and positioning view selector
We need the view selector to extend all the way to the right edge of the
monitor, so size and position the view selector in a way that the sum of
its X position and its width add up to the primary monitor width.

https://bugzilla.gnome.org/show_bug.cgi?id=642834
2011-02-21 12:20:38 -05: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
Florian Müllner
9925264410 search-entry: Update style
Update the style of the search entry to match the latest mockups[0].

 - use a (non-reactive) loupe icon when no search is active
 - use themed symbolic icons
 - make the entry rounder
 - tweak gradient colors
 - use an inset shadow

[0] http://git.gnome.org/browse/gnome-shell-design/plain/mockups/static/searchbox.png

https://bugzilla.gnome.org/show_bug.cgi?id=642335
2011-02-21 17:38:47 +01:00
Owen W. Taylor
01097ac954 Fix cursor when dragging a window over its current workspace
When we are dragging a window over its current workspace or workspace
thumbnail, we show show "no drop possible" feedback instead
of "move here" feedback.

https://bugzilla.gnome.org/show_bug.cgi?id=642329
2011-02-20 12:38:10 -05:00
Owen W. Taylor
45fe44da85 workspaceThumbnail: forbid manipulations of removed workspaces
Don't allow dragging onto a removed workspace or activating it.

https://bugzilla.gnome.org/show_bug.cgi?id=642329
2011-02-20 12:38:10 -05:00
Owen W. Taylor
89cc6807e0 workspaceThumbnail: fix stacking for newly added actors
We don't necessarily get a syncStacking call when an actor is added
at the top of the workspace, so make sure to set the stackAbove value
for it correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=642329
2011-02-20 12:38:10 -05:00
Florian Müllner
136ed3623b search-entry: Update hint text
'Search your computer' is problematic for various reasons:
 - it specifies the kind of device
 - it focuses on local search (while we also do web search)
 - it does not advertise the instant search functionality

Change the hint text to 'Type to search' as proposed by Allan Day.

https://bugzilla.gnome.org/show_bug.cgi?id=642287
2011-02-20 00:36:56 +01:00
Jasper St. Pierre
4bedbca66f lookingGlass: use new history manager implementation
This starts saving lookingGlass history in gsettings, and also adds
the ability to clear the text field by pressing 'down' on the last
entry, like the run dialog and readline allow.

https://bugzilla.gnome.org/show_bug.cgi?id=642237
2011-02-19 13:28:17 -05:00
Jasper St. Pierre
30da70a09e runDialog: use new history manager implementation
https://bugzilla.gnome.org/show_bug.cgi?id=642237
2011-02-19 13:28:16 -05:00
Jasper St. Pierre
cf3c631cde Add a history manager
runDialog and lookingGlass both implement a home-made history
manager, each working slightly differently than each other in
behavior and implementation.

Extract the behavior and implementation from runDialog, which
reads and saves to GSettings.

https://bugzilla.gnome.org/show_bug.cgi?id=642237
2011-02-19 13:28:16 -05:00
Florian Müllner
edc0cd36c5 date-menu: Adjust boxpointer position for RTL locales
We try to position the boxpointer centered above the calendar,
which swaps position with the events list when using a RTL locale,
so make the menu alignment dependent on the text direction.

https://bugzilla.gnome.org/show_bug.cgi?id=642721
2011-02-19 11:19:19 +01:00
Florian Müllner
5261304231 dash: Adjust CSS in RTL locales
As the dash uses different widths and radii for left and right
borders, we need to use different CSS when it is positioned at
the right of the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=642721
2011-02-19 11:19:19 +01:00
Sardem FF7
1b4cff7cdc workspaceThumbnails: Allow mousewheel scrolling
Allow the user to switch the active workspace by using
the mousewheel over the workspace thumbnails.

https://bugzilla.gnome.org/show_bug.cgi?id=642303
2011-02-18 18:12:18 +01:00
Owen W. Taylor
ef983480c0 Be more careful with workspace thumbnail scale
- When tweening a workspace to collapse it, round the multiplied
  height so that we don't change other workspace sizes via rounding
  differences.
- Use separate horizontal and vertical scales, so that every thumbnail
  has the same horizontal scale.

https://bugzilla.gnome.org/show_bug.cgi?id=641881
2011-02-18 11:36:33 -05:00
Owen W. Taylor
bff027c1f7 Fix workspace thumbnails in RTL locales
We need slightly different CSS and positioning logic for
the workspace thumbnails list when it is on the left side of the
screen.

https://bugzilla.gnome.org/show_bug.cgi?id=642672
2011-02-18 11:36:33 -05:00
Owen W. Taylor
1473a66862 Omit the panel area from the previewed workspaces
Allow defining a "porthole" that is the visible area of a workspace
thumbnail, and use this to clip the portion under the panel off the
workspace thumbnails. (This is wrong for fullscreen windows, but not
very wrong, and hopefullly the few missing pixels will be
unnoticeable.)

https://bugzilla.gnome.org/show_bug.cgi?id=641880
2011-02-18 11:36:33 -05:00
Owen W. Taylor
53516733f7 Fix position of indicator while tweening
Because the overall parent allocation width immediately when the workspace
count changes, we were sometimes drawing the indicator in the wrong place
in the indicator animation that proceeded the remove-workspace animation.
Fix this by tweening only the Y position of the indicator and computing
the X position and size in our allocate() method. This also is considerably
simpler than switching the indicator between fixed position and geometry
managed.

https://bugzilla.gnome.org/show_bug.cgi?id=641881
2011-02-18 11:36:33 -05:00
Owen W. Taylor
e9a45190e4 Animate workspace indicator before adding/removing workspaces
Rather than killing the workspace indicator indicator when we remove
workspaces because the source and target locations might have changed,
do it as a separate first step. This provides a better explanation
than doing it simultaneously with the addition/removal or not at all
and also keeps our computations simple.

https://bugzilla.gnome.org/show_bug.cgi?id=641881
2011-02-18 11:36:33 -05:00
Owen W. Taylor
649ed3332f Fix background to animate with thumbnails
When we animating the scale for the thumbnails, the border and
background should wrap around the current size of the thumbails.
The technique that we are using to animate the scale breaks that
since we don't animate the overall size of the thumbnails box -
we just animate our child actors within the allocation.

To fix this, switch from drawing the background by packing in another
container to drawing the background with a separate actor that
is under the other actors and allocated by our custom logic.

https://bugzilla.gnome.org/show_bug.cgi?id=641881
2011-02-18 11:36:33 -05:00
Owen W. Taylor
7598fd4581 Slide workspace thumbnails in when added and out when removed
To explain to the user what is happening, instead of abruptly changing
updating the workspace thumbnail list, slide thubmnails in and out
as they are added and removed.

To implement this, we track a state for each thumbnail and when things
change go through a process of first sliding removed thumbnails out,
then ollapsing the left-over spaces and rescaling the thumbnails, then
finally sliding newly added thumbnails in.

https://bugzilla.gnome.org/show_bug.cgi?id=641881
2011-02-18 11:36:33 -05:00
Owen W. Taylor
aaf94ea8f9 Animate scale changes to workspace thumbnails
When we change the overall scale of the workspace thumbnail container, instead of
doing it abruptly, animate the transition.

https://bugzilla.gnome.org/show_bug.cgi?id=641881
2011-02-18 11:36:33 -05:00