Commit Graph

85 Commits

Author SHA1 Message Date
Adel Gadllah
059504ca70 Add demands attention support to the messagetray
Inform the user about demands attention events using the messagetray.

Clicking on the notification icon moves the user to the window.

It differentiates between newly started apps and windows of already running apps, by showing different banners for this cases.

It is based on Jon Nettleton's "window attention" extension.

https://bugzilla.gnome.org/show_bug.cgi?id=610594
2010-02-22 20:09:43 +01:00
Maxim Ermilov
cfd63c7d4c fix selection of all-workspace windows
all-workspace windows can be active on every workspace.
https://bugzilla.gnome.org/show_bug.cgi?id=603078
2010-02-19 21:29:46 +03:00
Dan Winship
cec62a7ca5 Main.activateWindow: always exit the overview if it's currently open
This way, clicking a message tray icon while the overview is open will
close the overview when activating its window.

Remove some other overview-related activation code which is now
redundant.

Also, remove calls to "global.get_current_time()" when calling
Main.activateWindow, since it's unnecessary (activateWindow will call
it itself if you don't pass in that arg).

https://bugzilla.gnome.org/show_bug.cgi?id=609765
2010-02-17 17:08:28 -05:00
Adel Gadllah
4749393ab5 Remove panel-run-dialog/main-menu handling from shell-global
This is handled by the shellwm (takeover_keybinding) nowdays.

https://bugzilla.gnome.org/show_bug.cgi?id=610039
2010-02-16 16:50:40 +01:00
Florian Müllner
03a750176b Fade out desktop icons when showing overview
As desktop icons don't have any purpose in the overview (except for
distracting the user), fade them out when entering the overview.

Unfortunately, the fading effect affects performance, therefore hide
icons directly when there are maximized windows on the desktop.

https://bugzilla.gnome.org/show_bug.cgi?id=600999
2010-02-15 21:49:11 +01:00
Adel Gadllah
3a7dc32659 Fix up "window-added/removed" callbacks
Currently the window-added and window-removed callbacks in
main.js:_onWorkspaceSwitched access the first parameter as metaWindow object,
but in fact the first one passed is the workspace (metaWorkspace).

Fix it by using the second parameter instead (which is a metaWindow object).

https://bugzilla.gnome.org/show_bug.cgi?id=609521
2010-02-10 15:34:44 +01:00
Adel Gadllah
3e1b1d5789 Make parameters configureable
Make the framerate, file extension and gstreamer pipeline used by the
screencast recorder configureable using gconf.

This patch does not change the defaults, it justs provides a way for
the user to override them.

https://bugzilla.gnome.org/show_bug.cgi?id=608995
2010-02-08 21:31:30 +01:00
Maxim Ermilov
86515f3943 show background when nautilus isn't drawing the desktop.
If window with type Meta.WindowType.DESKTOP doesn't exist, then draw
background.
https://bugzilla.gnome.org/show_bug.cgi?id=591912
2010-02-03 22:52:25 +03:00
Maxim Ermilov
d9008054cf Handle resolution changes
Added signal 'screen-size-changed' to ShellGlobal.
Connect to this signal in main.js and run the _relayout() method.
If Overview or calendar are visible when this signal emit, they will be hiding.
https://bugzilla.gnome.org/show_bug.cgi?id=584526
2010-01-19 21:32:36 +03:00
Dan Winship
11276a3505 Initial implementation of the message tray and notification daemon
From the message-tray branch. Most of the UI parts were written by
Marina, and most of the D-Bus parts by me.
2010-01-13 15:13:20 -05:00
Colin Walters
45e89bf34a [main] Print a starting message to stdout
This helps developers delineate error streams between "Alt-f2 r",
among other things.
2010-01-08 11:39:02 -05:00
Colin Walters
aa9d3515a1 Add extensionSystem
Consumer documentation will live at http://live.gnome.org/GnomeShell/Extensions

In terms of implementation; basically we load extensions from the well-known
directories.  Add a GConf key to disable extensions by uuid.  There is a new
option --create-extension for the gnome-shell script which takes a bit of
interactive input, sets up some sample files, and launches gedit.

No extensions UI in this patch; that will come later.

https://bugzilla.gnome.org/show_bug.cgi?id=599661
2009-12-18 11:19:59 -05:00
Colin Walters
42757a0c87 Move Main.currentTime() and Main.createAppLaunchContext() into ShellGlobal
Primarily motivated by wanting these functions accessible from C.

https://bugzilla.gnome.org/show_bug.cgi?id=603522
2009-12-15 15:54:38 -05:00
Colin Walters
d624db18c5 Add deferred work system
Previously we had various things watching for notify::mapped so
we could be more lazy about updating non-visible actors, but it
was fairly ad-hoc.

The deferred work system unifies these callbacks, and also adds
a timeout so that we don't delay changes arbitrarily; this way we
avoid a storm of work if you stay out of the overview for a while,
then go in.

https://bugzilla.gnome.org/show_bug.cgi?id=603522
2009-12-15 15:53:05 -05:00
Colin Walters
a4405be71c Add global.log, global.logError functions
These log to a display in lookingGlass; rough equivalent of
the Firebug "console.log".

https://bugzilla.gnome.org/show_bug.cgi?id=599661
2009-12-01 15:15:12 -05:00
JP St. Pierre
585bfe5b5a Make places results available in search
Places is one of the dash sections and it should be included in search results.

Factor out the code for getting and updating the information about places from
Places to PlacesManager.

Introduce PlaceInfo class that contains information about the place and can be
used by classes that display it in different ways. Rename classes so that their
names are consistent with corresponding classes in appDisplay.js and
docDisplay.js

https://bugzilla.gnome.org/show_bug.cgi?id=599125
2009-11-09 16:57:49 -05:00
Colin Walters
e941e8088b Split ShellAppMonitor into ShellWindowTracker, ShellAppUsage
The two parts were mapping windows to applications, and
recording application usage statistics.  The latter part
(now called ShellAppUsage) is much more naturally built on top of
the former (now called ShellWindowTracker).

ShellWindowTracker retains the startup-notification handling.

ShellWindowTracker also gains a focus-app property, which is
what most things in the shell UI are interested in (instead of
window focus).

ShellAppSystem moves to exporting ShellApp from more of its
public API, rather than ShellAppInfo.  ShellAppSystem also
ensures that ShellApp instances are unique by holding
a hash on the ids.

ShellApp's private API is split off into a shell-app-private.h,
so shell-app.h can be included in shell-app-system.h.

Favorites handling is removed from ShellAppSystem, now inside
appFavorites.js.

Port all of the JavaScript for these changes.

https://bugzilla.gnome.org/show_bug.cgi?id=598646
2009-10-20 12:55:07 -04:00
Owen W. Taylor
ff39edd1ee Deal with unknown flags from ClutterEvent.get_state()
When we get a ClutterModifierType from Clutter, it might contain
bits not in the enumeration. See bug 59771 for a similar problem
with GdkModifierType.

Add a wrapper Shell.get_event_state() around clutter_event_get_state()
to mask these bits out and only return approved bits.

https://bugzilla.gnome.org/show_bug.cgi?id=597735
2009-10-07 17:22:37 -04:00
Owen W. Taylor
a9fd350396 Port our imported parts of Mx to ShellTheme
ShellTheme replaces both StStyle and ccss_stylesheet_t.

The interface StStylable is replaced by usage of ShellThemeNode.
A concrete node class allows some significant optimizations of property
inheritance that would have been much more difficult to achieve with
the highly abstract pair of StStylable and ccss_node_t.

Some operations that were previously on StStylable (like the
::style-changed signal) are directly on NtkWidget.

Custom properties are no longer registered as param-specs; instead you
call directly into shell theme node to look up a length or color:

shell_theme_node_get_length (theme_node, "border-spacing", FALSE, &spacing);

The dependency on libccss is dropped, while preserving all existing
functionality and adding proper parsing and inheritance of font properties
and proper inheritance for the 'color' property.

Some more javascript tests for CSS functionality are added; workarounds for
a CSS bug where *.some-class was needed instead of .some-class are removed.

https://bugzilla.gnome.org/show_bug.cgi?id=595990
2009-10-01 14:41:18 -04:00
Owen W. Taylor
6b95864076 Fix installation and distribution of stylesheet data
Install and distribute gnome-shell.css and theme images. They are moved
down from $datadir to $datadir/theme to avoid a weirdness where we have
images in $datadir and then also in $datadir/images.

(Also moved in the source tree to avoid adding another difference between
installed and uninstalled operation.)

https://bugzilla.gnome.org/show_bug.cgi?id=595989
2009-10-01 14:41:18 -04:00
Owen W. Taylor
55497899dd Add some structure for interactive tests of UI components
js/ui/environment.js: Split out initial UI setup (Tweener initialization,
  ClutterContainer monkey-patching) into a separate file we can import from tests.

tests/: Directory for various types of tests
tests/run-test.sh: Shell script that to run tests with an appropriate
  environment set up.

tests/testcommon/: Common modules and data for tests
tests/interactive/: Interactive tests

tests/interactive/box-layout.js: A sample test of StLayout

https://bugzilla.gnome.org/show_bug.cgi?id=595987
2009-10-01 14:41:17 -04:00
Owen W. Taylor
e37790fdf9 Monkey-patch in ClutterContainer methods for StBoxLayout
Setting options for children added to StBoxLayout is not convenient
since we are missing the varargs methods of clutter_container.

Patch in:

 child_set() - set properties of a child
 add() - add a child and set properties (this is different from
         clutter_container_add()! I think the deviation is
         with avoiding the awkward name add_with_properties()
         which is what might be expected. ClutterContainer
         currently doesn't have a method like this at all.)

The code is written to allow patching into multiple ClutterContainer
classes but for now only StBoxLayout is patched, since it's the only
container we are using where we need to set options as properties.

https://bugzilla.gnome.org/show_bug.cgi?id=595419
2009-10-01 14:41:17 -04:00
Colin Walters
529f74c0e5 Load gnome-shell.css at startup
https://bugzilla.gnome.org/show_bug.cgi?id=591245
2009-10-01 14:41:17 -04:00
Dan Winship
2b78d5bd5d Improve support for multihead setups
Fix panel, app switcher, and looking glass to limit themselves to the
primary monitor, and run dialog to limit itself to the monitor
containing the currently-focused window.

The overview is also limited to the primary monitor now (with the
other monitors being blacked out), although the workspaces within the
overview are shaped like the full "screen" (the bounding box of all
monitors). To be fixed later.

https://bugzilla.gnome.org/show_bug.cgi?id=593060
2009-10-01 13:46:03 -04:00
Colin Walters
3564d78d30 Use shellwm.takeover_keybinding for Alt-F1 and Alt-F2
This fixes a regression where we weren't using the correct event
timestamps, because for both of these we were sending an XClientMessage
to ourself.

https://bugzilla.gnome.org/show_bug.cgi?id=596262
2009-09-25 11:28:13 -04:00
Dan Winship
24d42adc04 Add Main.activateWindow() to remove some duplication 2009-09-24 11:11:01 -04:00
Dan Winship
110ef17e2d Add Main.currentTime(), to get the correct current-event-time
https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-09-24 11:10:55 -04:00
Colin Walters
4876474be3 Add shellDBus.js which implements Eval(str) and an OverviewActive property
For various reasons I'd like a method which allows evaluation; say
log in from another machine and run "gnome-shell --repl" or something.

Also as a possible solution for the screensaver X grab issue, add
a (read/write) property "OverviewActive".

https://bugzilla.gnome.org/show_bug.cgi?id=596102
2009-09-23 16:56:33 -04:00
Colin Walters
cee7106cb1 Better handle pushModal failing
Previously we'd leave the focus on the stack, etc.

https://bugzilla.gnome.org/show_bug.cgi?id=595382
2009-09-17 16:36:33 -04:00
Colin Walters
159690b2d3 Enable Alt-f2 in overview
This isn't a long-term solution; what we really want is for Alt-F2 to
just be an application search with a hack to detect shell commands,
but in the short term this allows us to run the magic 'lg' command
from the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=595116
2009-09-15 16:20:19 -04:00
Colin Walters
8a2bfd0e55 Change keyboard handling API to handle nested modal calls
Rename beginModal/endModal to pushModal/popModal.  All of the current callers
just want to ensure that we're in a modal state; they don't actually need to
fail if we already are.

These functions also now take the Clutter keyboard focus, while recording
the previous focus.

https://bugzilla.gnome.org/show_bug.cgi?id=595116
2009-09-15 16:15:16 -04:00
Colin Walters
37ee16b34d Use clutter_event_get_* instead of ShellGlobal
Before Clutter gained accessors for event information, we had
shell_global_ functions.  Now that Clutter has them, use them and
delete the ShellGlobal code.

http://bugzilla.gnome.org/show_bug.cgi?id=594561
2009-09-08 17:58:13 -04:00
Dan Winship
d0d79c5b3e Make "global" global.
Rather than doing "let global = Shell.Global.get()" everywhere we
need it, just create a global variable called "global".

http://bugzilla.gnome.org/show_bug.cgi?id=594546
2009-09-08 16:21:15 -04:00
Owen W. Taylor
479acf2d18 Renable PrintScreen and Super_L in the overview
When we are modal, examine keypresses and look for:

 - 'Print': Run the screenshot command in any mode; very useful for
   bug filing, reviews, etc.

 - Release of Super_L/Super_R - if in the overview, toggle back
   out of the overview.

http://bugzilla.gnome.org/show_bug.cgi?id=593427
2009-08-28 15:15:17 -04:00
Owen W. Taylor
799f56fe87 Use new plugin-modality functionality in Mutter
We now have functionality in Mutter to grab the keyboard on behalf
of a plugin. This avoids interactions with the key handling code
in Mutter that could leave the user with an inconsistent state
and no way to get out of it.

src/shell-global.[ch]: Change shell_global_grab_keyboard() and
  shell_global_grab_keyboard() to shell_global_begin_modal()
  shell_global_end_modal() and call mutter_plugin_begin_modal()
  mutter_plugin_end_modal() rather than directly grabbing the
  keyboard.
main.js: Call global.begin_modal/end_modal from Main.startModal()
  and Main.endModal()
altTab.js; Remove call to Main.startModal() - we're letting Mutter
  handle modality for Alt-Tab.
main.js lookingGlass.js overview.js runDialog.js: Rename
  Main.startModal() to Main.beginModal() for consistency with
  naming in mutter and ShellGlobal.

http://bugzilla.gnome.org/show_bug.cgi?id=590686
2009-08-26 14:07:02 -04:00
Colin Walters
d17c94f9b9 Initialize ShellAppMonitor/ShellAppSystem at predicatable time
Currently ShellAppMonitor relies on all the .desktop files being
loaded.  We should initialize it very early to ensure that anything
that uses it has up-to-date information right away.
2009-08-12 17:10:17 -04:00
Colin Walters
e330c5ea17 panel: Switch to fully dynamic layout
There was lots of fixed positioning in the Panel; now it is completely
dynamic, and width/height is driven from main.js.  We still have a
global constant Panel.PANEL_HEIGHT, but this is a big step towards
eliminating it.

Also, this avoids overdraw in the "way too many tray icons" case.  The
clock will shift left.
2009-08-11 13:08:19 -04:00
Sander Dijkhuis
47af454115 Bug 591437 - Rename overlay.js to overview.js
Replace 'overlay' with the more descriptive name 'overview'
where the Activities Overview is meant. Call it Overview
(capitalized) in code comments.

The overlay-group and overlay-key provided by Mutter are not
affected, since they may be used for other components than
the Activities Overview.
2009-08-11 15:15:25 +02:00
Owen W. Taylor
f7746ec3f6 Initialize GStreamer from shell_recorder_init()
Move the GStreamer initialization from the Javascript code into
shell_recorder_init(). This avoids a dependency on the GStreamer
introspection information and will make it easier to drop the
gir-repository module dependency.
2009-08-06 15:19:04 -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
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
8ef48ca33c Animate panel appearance on startup 2009-07-02 01:04:40 -04:00
Dan Winship
10afe46195 Add an initial implementation of the sidebar
This still needs design love, and none of the current widgets should be
considered finalized, but it shows the basic ideas.

http://bugzilla.gnome.org/show_bug.cgi?id=581774
2009-05-15 17:04:18 -04:00
Dan Winship
bc558306a4 Improve the framework for managing shell UI
Adds an explicit "chrome" layer for the panel (and later the sidebar),
managing the input region and struts for them, and hiding them when
fullscreen windows are present or the user enters the overlay.

http://bugzilla.gnome.org/show_bug.cgi?id=581771
2009-05-15 16:12:53 -04:00
Dan Winship
062e1aa78b Reorganize overlay hiding/showing code
Rather than having main.js manage this, put it into overlay.js, and
have the overlay object emit signals that other code can watch to do
things when the overlay is showing/shown/hiding/hidden.
2009-05-07 16:41:07 -04:00
Owen W. Taylor
20e755023b Clean up underscores in function and variable names
Try to fix all places where we accidentally used foo_bar instead
of fooBar for function names, function parameters, and variables.

(Lucas Rocha pointed out one example.)

http://bugzilla.gnome.org/show_bug.cgi?id=581141
2009-05-04 13:50:49 -04:00
Owen W. Taylor
4664fac566 Improve comments about startup notification
Do a better job at describe the problems in docDisplay.js related
to not reading the desktop files and finding StartupNotify=true.
Also, fix a typo.

http://bugzilla.gnome.org/show_bug.cgi?id=580658
2009-05-01 16:21:00 -04:00
Owen W. Taylor
bb69afc830 Set the workspace when launching apps
main.js: Add create_app_launch_context() with code from appDisplay;
  additionally set the workspace on the launch context to the current
  workspace so that the application launches on the right workspace
  even if the user switches before the app starts.

appDisplay.js docDisplay.js: Use Main.create_app_launch_context()

http://bugzilla.gnome.org/show_bug.cgi?id=580658 (Reported by Igor Vatavuk)
2009-05-01 15:18:51 -04:00
Dan Winship
4a5873dd22 Create a more extensible/organized strut/input_area management system.
Now code can call Main.addShellActor(actor) to declare that that actor
is part of the shell, and so it should (a) be protected by wm struts, and
(b) be part of the stage input area, and then that code automatically
deals with updating if the actor changes size or visibility.
2009-04-30 14:57:13 -04:00