Commit Graph

637 Commits

Author SHA1 Message Date
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
8a56b990dd Bug 587949 - Handle locale-encoded names from struct pwent
Convert to utf8 internally.
2009-07-10 10:19:17 -04:00
Colin Walters
f353283a40 Merge up to commit 92e608bd0f3807314c45ee5f5daf6ba781c27d58 of gdm
Pull in a few fixes from gdm trunk for gdm-user.c
2009-07-10 10:19:17 -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
Colin Walters
00407d6971 Explicitly include gio/gio.h in ShellGlobal
Because we use GFile.
2009-07-06 23:13:58 -04:00
Colin Walters
db630b2945 More for applications now displays a category list
Rework the previously extant Application category code to display
in the expanded list.  Add a "Frequent" category which corresponds
to the most_used_apps, and selected by default.

Instead of adding the background and shadow as expanded items to
the results/details panes as fixed, we slave the background/shadow
sizes to the results using notify::allocation.

Also clean up the code for sizing the details pane, using a common
function which adjusts its x position in one place.
2009-07-06 16:15:12 -04:00
Colin Walters
a15ee28177 Add ShellDrawingArea and ShellStack
ShellDrawingArea is a size-independent wrapper for a ClutterCairoTexture.
Useful when drawing non-fixed size areas.

ShellStack is a simple container class which holds items
in a completely overlapping Z stack.  The main difference
from ClutterGroup is that items will be constrained to
(and allocated) the size of the stack, not getting their
preferred size always.
2009-07-06 14:11:18 -04:00
Colin Walters
92e9bc85a1 AppWell: If an application is running, activate an existing window
Instead of relaunching, pick the first window and activate
2009-07-06 13:43:19 -04:00
Dan Winship
70c51beeeb Add a sidebar show/hide menu item to the status menu
This is how it is in the mockups, but we may want to revisit it
2009-07-06 11:55:17 -04:00
Dan Winship
9890887126 Add GConf schemas for sidebar prefs, and use those prefs from sidebar.js 2009-07-06 11:55:17 -04:00
Dan Winship
203ec385c5 Add ShellGConf
Although methods like gconf_client_get/set_bool() and such are usable
from gjs, get_list/set_list is not, since there's only one method for
all list types. So ShellGConf wraps GConfClient and adds separate
typed list methods.

Also, add a detailed "changed" signal that can easily be connected to
from js, since we can't currently use gconf_client_notify_add()
directly.
2009-07-06 11:55:17 -04:00
Dan Winship
5a0d8eca9f Fix Chrome.removeActor()
The split between this.actor and this.nonOverlayActor in chrome.js is
annoying, but aside from actually subclassing ClutterGroup (which
would have to be done from C), all of the other possibilities are
annoying too.
2009-07-06 11:55:17 -04:00
Dan Winship
ae779c7f20 Fixes to allow widgets to be initially collapsed 2009-07-06 11:55:16 -04:00
Milan Bouchet-Valat
3852176e80 Use a fading icon button in genericDisplay
Add a new icon button in button.js that fades in/out with a short delay when the mouse enters/leaves its parent. Use it for the information button of genericDisplay.
2009-07-05 10:40:50 +02:00
Colin Walters
7a0ce6c57b ShellOverflowList: Implement pick
This gives us the correct event behavior.
2009-07-04 19:50:55 -04:00
Colin Walters
15e862f974 Switch GenericDisplay to ShellOverflowList for dynamic height
This converts GenericDisplay to totally dynamic layout, where
we display as many items as we can, and the rest cleanly overflow
into pages.

For now, remove multi-column; to readd this, we can pack multiple
display items into a single ShellOverflowList item.
2009-07-04 15:30:12 -04:00
Colin Walters
a1908d9db1 Add ShellOverflowList, a dynamic list with paging
This container class will be used for GenericDisplay.
2009-07-04 15:29:51 -04:00
Owen W. Taylor
8ee740e425 Don't include NoDisplay items, except for window identification
Searching across NoDisplay desktop items can produce weird
results to the user (including duplicates, and items that
aren't really applications at all.) So, don't include them
normally.

But continue including NoDisplay items when we look up the
desktop file for a window, since we want to catch applications
like Evince and Nautilus which are otherwise NoDisplay.

http://bugzilla.gnome.org/show_bug.cgi?id=587548
2009-07-04 15:07:10 +01:00
Owen W. Taylor
f44b3e0553 Hide the running-apps area when empty
It looks funny to have the "more running apps area" there as a gap
when empty and dragging to it is an unintuitive way to remove stuff
from the favorites list, in any case, so just hide the area when
empty.

http://bugzilla.gnome.org/show_bug.cgi?id=587720
2009-07-04 14:19:25 +01:00
Owen W. Taylor
bddcb40237 Fix expand flags for the contents of the Dash
Pack everything we don't want to expand with BigBoxPackFlags.NONE;
this fixes the More... button for the docs section ending up with
a gap underneath it.

Since the More... button for the docs now ends is right at the bottom
of the dash, add some padding to it.

http://bugzilla.gnome.org/show_bug.cgi?id=587720
2009-07-04 14:16:57 +01:00
Colin Walters
66ea19fbfb Switch to dynamic layout for Dash
Instead of laying out the dash contents "manually" and having
the content items explicitly passed their height, just give them
a set width.
2009-07-04 13:45:27 +01:00
Owen W. Taylor
e9966b4aff Add partial implementation of dynamic width/height layout to TidyGrid
This is not a complete patch; it doesn't attempt to handle the homogenous
property or column major.

(Based on patch by Colin Walters <walters@verbum.org>)

http://bugzilla.gnome.org/show_bug.cgi?id=587720
2009-07-04 13:45:27 +01:00
Colin Walters
a71ae65f8b Allow dragging a Workspace.WindowClone into favorites well
It's a natural thing to do, though in the future we may want
to split the WindowClone into js/misc/window.js or the like.
2009-07-02 05:04:33 -04:00
Colin Walters
96a2747e0b Wire up search up/down
This is not a complete fix; the search selection will not cross
the apps/docs boundary.  But it's good enough until we have a more
final search design.
2009-07-02 01:04:40 -04:00
Colin Walters
8ef48ca33c Animate panel appearance on startup 2009-07-02 01:04:40 -04:00
Colin Walters
8a0cebccdc Display full application title, allow DnD from More
For now display the full application name, centered to avoid
excessive ellipsization.

Highlight on mouseover, and allow DnD from the More display.
2009-07-02 01:04:40 -04:00
William Lachance
5ae6239344 SuSE needs xorg-x11-proto-devel for X11 screen saver extension header
libXScrnSaver-devel was a Mandriva package, not available on SuSE.
2009-07-02 00:37:05 +02:00
Colin Walters
aaeb980688 Add info.svg to Makefile.am 2009-07-01 13:43:27 -04:00
Dan Winship
77c325772a fix tag name in schema 2009-07-01 10:34:24 -04:00
Milan Bouchet-Valat
2eb0d20221 Make the sidebar's horizontal padding symmetric
Widgets should be horizontally centered in the sidebar. Else they look
out of place (in particular the clock and the applications widgets).
Due to little tricks with the sidebar starting out of the screen to
hide rounded corners, this implies playing with paddings. The patch
decreases the widgets padding from 4 to 2 pixels, removes additionnal
padding on the right, and adds an out-of-screen padding to the widget
box to make up for the negative horizontal position of the sidebar.
2009-07-01 09:28:03 -04:00
Marina Zhurakhinskaya
454ca09575 Make individual dash panes reactive instead of making the dash Group actor reactive
The width of a Group actor ends up including the width of its hidden children,
so we were getting a reactive object as wide as the details pane that was
blocking the clicks to the workspaces underneath it even when the details
pane was actually hidden.

Not making the dash Group actor reactive solves this problem. However, we
have to make individual parts of the dash reactive instead so that the clicks
are not passed to the transparent actor underneath them. That transparent
actor is used for dismissing the additional panes when the user clicks over
the workspaces area.
2009-06-30 19:45:56 -04:00
Colin Walters
8f0bf5deae Fix double free and under-dup in ShellAppMonitor
The hash table is keeping ownership of appid, we don't need
to free it again.  However we do need to re-dup it when we
insert as a key.
2009-06-30 18:16:39 -04:00
Colin Walters
09d9d91297 Include NoDisplay applications in application data
For now, we want to get Evince and Nautilus at least in the application
list.
2009-06-30 18:16:39 -04:00
Dan Winship
a5e3227b64 Set GCONF_DEFAULT_SOURCE_PATH from the gnome-shell wrapper script
Needed so that a jhbuilt gnome-shell can find its schemas at runtime
2009-06-30 17:29:40 -04:00
Dan Winship
8a790e1c38 Fix schema install 2009-06-30 17:29:20 -04:00
Marina Zhurakhinskaya
db52e024e8 Use a separate icon image as a drag actor instead of using the clone of the icon
Clutter no longer allows using a clone of an actor that is not a part of
the scene graph. This is what used to happen when we created a clone for
the icon of the item that was being dragged, and then closed the More panes
with the original item, removing the icon from the scene graph. This was
also when happened when the user hit Esc while dragging, which prompted the
overlay to close, removing the original icon from the scene graph.

Rename getIcon() methods to createIcon() to better reflect on the fact that
a new icon is created each time the method is called (we do use cache in
some cases).

Remove a stray log message in overlay.js

Fixes http://bugzilla.gnome.org/show_bug.cgi?id=585490
and http://bugzilla.gnome.org/show_bug.cgi?id=585489
2009-06-30 16:42:00 -04:00
Marina Zhurakhinskaya
79c166c38d Make workspaces accept a drop of AppDisplay.WellDisplayItem
AppDispplay.WellDisplayItem needed to be added along with the
GenericDisplay.GenericDisplayItem as a type of a drop object
that workspaces accept.
2009-06-30 16:42:00 -04:00
Colin Walters
04fbaf4f27 Avoid duplicating most used applications in the AppDisplay cache
All used applications should be in the database from the menus
anyways.
2009-06-30 16:42:00 -04:00
Colin Walters
b92263e80c Fix invalid function signature and a memory leak
Add the missing GParamSpec to on_n_workspaces_changed.

Also, we don't need to re-dup the appid, since it's already dup'd.
2009-06-30 16:42:00 -04:00