Commit Graph

293 Commits

Author SHA1 Message Date
Siegfried-Angel Gevatter Pujals
be95ca553a Fix indentation issues in altTab.js, plus minor cleanup in some other files. 2009-08-06 01:54:22 +02:00
Colin Walters
c4b4248707 Bug 589086 - Fix non-integer positioning in altTab
Non-integer makes fonts look awful.  Fix this by rounding
down.
2009-08-05 11:43:54 -04:00
Dan Winship
41f6e8ef86 Add dash.js to js/ui/Makefile.am. #590813 2009-08-05 08:58:35 -04:00
Colin Walters
85b4b97b7b Rewrite Dash, remove hardcoded width/height from GenericDisplay
This patch is a near-total rewrite of the Dash.  First, the dash
code moves into a separate file, dash.js.

Inside dash.js, the components are more broken up into separate
classes; in particular there's now a Pane class and a MoreLink
class.  Instead of each section of the dash, when activated,
attempting to close all N-1 other sections, instead there
is the concept of a single "active pane", and when e.g. activating
the More link for documents, if we know there's an active pane
which happens to be the apps, close it.

Many redundant containers were removed from the dash, and all
manual width, height and x/y offsets are entirely gone.  We move
the visual apperance closer to the design by using the view-more.svg,
etc.

To complete the removal of height/width calculations from the dash,
we also had to do the same for GenericDisplay.  Also clean up
the positioning inside overlay.js so calculation of children's
positioning is inside a single function that flows from screen.width
and screen.height, so in the future we can stop passing the width
into the Dash constructor and call this once and work on screen
resizing.
2009-08-05 04:04:27 -04:00
Colin Walters
2726fdb831 Bug 588343 - Major rework of window monitoring to be application-based
The previous application monitoring code was originally designed
to be based on WM_CLASS, which was then resolved on a server.
We have that resolution code locally now, so instead
of saving WM_CLASS data, save application IDs.

Also, inside the WM we have a much better
infrastructure for tracking windows.  In particular, rather
than polling, we can just watch for focus notification on
the display, and window add/remove.

Instead of polling XScreensaver, use DBus to watch org.gnome.Session
which already has an idle time watch.

Now there is no polling at all inside the monitor.
2009-08-04 18:40:37 -04:00
Colin Walters
898d76af53 lookingGlass: Add hierarchy list and property inspector
Add a Notebook class which we then use to pack in separate Hierarchy
and Properties tabs.

Split out the inspector into its own class to avoid bloat in the
main class.
2009-08-04 11:12:02 -04:00
Halton Huo
7c26303b25 lookingGlass: Add to Makefile.am
Signed-off-by: Colin Walters <walters@verbum.org>
2009-08-04 10:01:06 -04:00
Colin Walters
902956ca0d lookingGlass: Draw a red border around target actor 2009-08-04 09:55:52 -04:00
Colin Walters
3429abff40 lookingGlass: Faster history save, avoid empty lines
5 seconds is should help ensure we lose work less often on
Alt-f2 restart.

Avoid saving empty lines to history, and filter them out if
we find them.

Minor fixes for the still-not-enabled inspector.
2009-08-04 09:55:46 -04:00
Colin Walters
61b28c5c7d Adjust tray spacing to cope with many icons
This patch attempts to adjust if we have many tray icons; currently
the simple algorithm is to drop down to a spacing of 8 if we have
more than 6.  In the future we should fix the panel layout so that
the clock moves to the side.
2009-08-03 20:42:00 -04:00
Siegfried-Angel Gevatter Pujals
e84e842c1e Fix 'redeclaration of global' error in lookingGlass.js. 2009-08-04 02:36:53 +02:00
Colin Walters
0792f8d4a3 lookingGlass: Fix spacing and line appearance 2009-08-03 20:21:07 -04:00
Colin Walters
52ae75d4b8 LookingGlass - JavaScript prompt and interactive Clutter controller
Add a dropdown pane triggered by Alt-F2, "lg" which supports interactive
JavaScript evaluation, saving/restoring a history file, as well as
an inspector element to pick by using the mouse.
2009-08-03 20:17:08 -04:00
Colin Walters
224538c885 Cleanups for runDialog
Using an internal boolean rather than the visibility property seems
more reliable to me.  Add a list of internal functions rather than
an if/else chain, so for example an extension could hook something on.

Delete the javascript evaluator in favor of the upcoming lookingGlass.js.
2009-08-03 20:16:15 -04:00
Colin Walters
d7f5fd5d24 Give the runDialog a rounded corner
Just makes things a bit nicer looking.
2009-08-01 21:46:02 -04:00
Colin Walters
026f014d32 Bug 589937 - Raise clone on window activation
We had duplicate code in appDisplay and workspaces for handling activating
a window; unify that inside workspaces, add an API to Main.overlay to
access it from both contexts.

Also, explicitly raise the clone we're activating to the top
before starting the animation to leave the overlay.
2009-07-31 19:26:32 -04:00
Jon Nettleton
a439a58f13 Remove taskpanel
The new design doesn't have the task panel at the bottom; remove it.

Signed-off-by: Colin Walters <walters@verbum.org>
2009-07-31 17:42:49 -04:00
Colin Walters
29ffa46d08 Move drawing functions from shell-global into new shell-drawing.c file
Just to avoid shell-global.c bloat.
2009-07-31 17:26:47 -04:00
Siegfried-Angel Gevatter Pujals
0a1aac862f Fix details pane repositioning
Two calls to _repositionDetails() were done too early,
before the visibility of the results pane had changed,
so they had no effect. Thus when a search was done while
a details pane was active, the pane with the results was
hidden by the details pane.

In addition to fixing this, move the two remaining calls to
the line after changing the results pane's visibility
to make it clearer why the calls are there.
2009-07-31 16:12:19 +02:00
Marina Zhurakhinskaya
f7fff83647 Fix showing small item previews
Don't use a clone of an actor that's not part of the scene graph for the
item previews. This patch fixes previews in the details pane for documents
for which we don't have full previews and for applications.

Use create_icon_texture() from AppInfo instead of looking up the file
for gicon when creating an application icon for the details pane.
2009-07-29 17:56:13 -04:00
Siegfried-Angel Gevatter Pujals
77c92d75d5 Toggle the info pane when clicking the info icon (#587550)
Now clicking on the information icon of the same item a second
time will hide the details pane. Clicking it another time will
show it again, etc.

This is achieved by adding a 'toggle-details' signal which
switches the visibility of the details pane.

Other than the necessary changes, function _selectIndex (in
genericDisplay.js) has been restructured a bit to avoid
duplicating checks.
2009-07-29 19:35:11 +02:00
Siegfried-Angel Gevatter Pujals
f3efbf432f Replace lastVisited method in DocInfo with timestamp attribute
This is not only more consistent with the name, uri and
mimeType attributes, but makes adding Zeitgeist support easier.
2009-07-29 10:52:33 +02:00
Marina Zhurakhinskaya
efcf8bae9d Align category labels vertically
Add a box to contain the MenuItem labels and align them vertically.

Clean up the style in the MenuItem code.
2009-07-27 19:02:46 -04:00
Colin Walters
adfb419ceb Don't line wrap application names in wells, fix running alignment
The experiment with avoiding ellipsization was a definite failure;
several translations have very long names, and we'd end up
with a single column.

Also fix extra padding; we only want some space at the top, not
left/right.
2009-07-27 18:35:41 -04:00
Siegfried-Angel Gevatter Pujals
ff6ee2c0c2 DocsWidget -> RecentDocsWidget
Rename DocsWidget to RecentDocsWidget (as widgets for most used docs,
docs related to the currently open documents, etc. may be added in the
future), and change the title so that it doesn't abbreviate 'Docs' (for
consistency with the overlay).
2009-07-27 14:50:54 -04:00
Colin Walters
96cf9c739e Avoid ellipsizing app names; Draw glow around running
Corresponding with the design, if an application is in a running
state (has > 0 windows open), draw a glow behind the name.

To make the display look a bit nicer, set the width of each item
to be equal to the longest word among all the items.
2009-07-27 12:45:22 -04:00
Marina Zhurakhinskaya
9f4ccb83e3 Make dash background darker
Make dash background darker so that the blue color used for indicating
running apps can be visible. Use the dark blue (almost black) color from
Jeremy's mockup.

Make the dash height be the full screen height minus the height of the panel.
Don't use padding on top or on the bottom.

Remove the border from the main dash, but leave it for the results and details
panes. Make the border slightly transparent.

Make sure the details pane is correctly positioned by not applying the
additional padding when determining its x position.
2009-07-24 17:25:20 -04:00
Marina Zhurakhinskaya
978ab8a4dd Return false from the timeout callback function
Timeout callback function should not be rescheduled again with the same timeout
because we compute a new timeout and schedule it again instead. So the callback
function needs to return false to not be scheduled again by default.
2009-07-24 12:58:53 -04:00
Colin Walters
2cc650e389 Bug 589437 - Switch to workspace of target app to activate
The user explicitly selected a window, so take them to it.
2009-07-23 12:28:31 -04:00
Marina Zhurakhinskaya
f24169735a Fix updating last visited time for the doc display items.
Make sure that we calculate the next update time correctly.

Store timeout time instead of the timeout delta, so that it doesn't get outdated.

Create a new callback when the time update happens for the original callback.

Make sure last visited time is updated in the details pane by keeping track
of the description actors created for the detail actors.

Add comments to the new functions.
2009-07-22 18:57:05 -04:00
Colin Walters
75c875f073 Fix time updating for recent files 2009-07-22 12:46:05 -04:00
Colin Walters
b4cf178cc5 Display last visited time as docInfo description
It's useful information, and takes up some of the blank space.
2009-07-21 23:05:08 -04:00
Colin Walters
8d9fc28872 Bug 588050 - Cache information icon forever, only look up recent once
Extend ShellTextureCache by adding the concept of a policy, which
we expose to the public API for loading URIs.

This lets us have the shell tell the cache to keep the information
icon texture around forever.

Secondly, fix the caching of recent info; we shouldn't always be
loading the backup pixbuf.  Move recent info loading entirely
into ShellTextureCache.
2009-07-17 17:35:53 -04:00
Sander Dijkhuis
9e85d197fd Bug 588462 - Use a plain black panel with a different layout
The semi-transparent gradient on the panel is replaced by a
solid black background. The shadow below the panel is removed.
The clock is put at the center instead of the right side of
the panel and has the date removed. The user icon is hidden.
Instead of boldface, a regular font is used. Padding is added
on each side and between panel elements.

button.js: Allow for custom text colors and fonts.
panel.js: Change the panel colors and layout, remove the shadow.
2009-07-16 22:02:32 +02:00
Sander Dijkhuis
2aea9c59a4 Bug 588173 - No remove button on the first workspace
If there is only one workspace and it's empty, it should
not get a remove button. Add a workspaceNum != 0 check to
workspaces.js.
2009-07-14 14:58:24 +02:00
Colin Walters
001af72727 Merge branch 'bug588050-doc-textures' 2009-07-13 16:24:55 -04:00
Colin Walters
9d594d7f26 Always clear details pane when unsetting more mode
We don't want a detail pane hanging around for an item no
longer visible.
2009-07-13 11:01:50 -04:00
Colin Walters
2161e90cda Fixes for GenericDisplay
GenericDisplay wasn't quite completely converted to the ShellOverflowList
model.  Since the list now holds all actors, the indexing/wrapping
was incorrect.

Add a property which lets us keep track of how many items are displayed,
use this in genericDisplay.

Avoid setting selectedIndex to -2 when going up with no items.

If we're not displaying any results at all, don't attempt keynav (for now).
2009-07-13 11:01:49 -04:00
Sander Dijkhuis
f7a82d6400 Bug 588445 - Use BigBox vertical alignment for the clock
panel.js: Replace the manual vertical padding calculation
    for the panel's clock with an y_align property on its
    BigBox container.
2009-07-13 16:16:44 +02:00
Sander Dijkhuis
10e30f7dc7 Bug 588405 - Handle status menu button appearance in JavaScript
Make the ClutterText and ClutterTexture from the status menu
button available to JavaScript, and from there improve the
font definition of the user name.

shell-status-menu.[ch]: Add public get_name() and get_icon()
    functions that return the user name label and icon
    texture, remove the markup from update_name_text().
panel.js: Set the font for the button consistently with that
    of the other panel labels.
2009-07-13 13:54:38 +02:00
Milan Bouchet-Valat
177edc5444 Bug 587955 - Small cleanups to iconButton
Missing trailing ; after "this._fadeOut()". A few missing spaces after "if". Parameter inconsistently named "icon" instead of "texture".
2009-07-11 18:44:21 +02:00
Colin Walters
b45cd0a4eb Small fixes for sidebar application bits
We need to set the .name property, also skip unknown apps.
2009-07-10 17:04:39 -04:00
Colin Walters
5d067ec718 Better caching for document textures and information
Move thumbnail creation into ShellTextureCache.  It's now asynchronous,
and we cache the result.

Create a DocManager class which keeps around the DocInfo objects between
invocations.  This is also where we ensure we remove thumbnails for
recent items not known anymore.
2009-07-09 13:58:45 -04:00
Colin Walters
1cb6fc004b Add magic "js " prefix to runDialog to run arbitrary JavaScript
This is useful for debugging things; e.g. you can "js Meta.quit(0)"
to exit the WM, "js Shell.Global.get().<whatever>..." etc.
2009-07-08 17:30:09 -04:00
Colin Walters
3b603ef7e0 Don't fail if we can't find an application
Instead of logging and passing null through, explicitly skip
apps we don't know about.  It's valid to have say uninstalled
an app.
2009-07-08 11:54:15 -04:00
Colin Walters
0971ba54b8 Bug 587952 - Immediately fade in information button
0.5s is a pretty long time, start immediate fade in.
2009-07-08 11:41:40 -04:00
Colin Walters
c136acc879 Remove inadvertent early return in apps search 2009-07-08 11:38:22 -04:00
Colin Walters
cc2d3fd56d Major rework of application data structures and caching
Before, we looked up application data in several ways; the ShellAppSystem
exported just application ids (though it parsed the .desktop files internally),
and we'd create a Gio.DesktopAppInfo object (reparsing the desktop file again),
wrapping that inside a JavaScript AppInfo class, and finally the AppDisplay
would again parse the .desktop file to get the categories.

Also, to look up applications by id previously, we traversed the entire
menu structure each time.

Some qualities such as the NoDisplay flag were not easily exposed in the old
system.  And if we wanted to expose them we'd have to change several different
application information wrapper classes.

All in all, it was quite suboptimal.

The theme of this new code is basically "just use libgnome-menus".  We do
not call into Gio for app lookups anymore.  The new Shell.AppInfo class
is a disguised pointer for the GMenuTreeEntry item.

To fix the caching, we keep a simple hash table of desktop id -> ShellAppInfo.
2009-07-08 11:33:47 -04:00
Siegfried-Angel Gevatter Pujals
72e6e7839f Reset page number when changing the active category 2009-07-07 11:59:51 +01:00
Owen W. Taylor
732573331a Fix DND to left side of the screen
Set the size of the Dash actor to 0x0 so that it doesn't
interfere with drag and drop.

http://bugzilla.gnome.org/show_bug.cgi?id=587899
2009-07-07 10:58:49 +01:00