Commit Graph

122 Commits

Author SHA1 Message Date
Owen W. Taylor
1137ca0fce main.js: fix variable naming style for css_stylesheet
Change css_stylesheet to cssStylesheet in various places.
2011-02-01 10:13:35 -05:00
Sardem FF7
36f3429ad2 Better API for extensions changing CSS
Rename the setter to reflect the fact that it's the stylesheet which is
changing

Add a getter to allow some useful checks
2011-02-01 10:13:35 -05:00
David Zeuthen
885b6ffaef Calendar: Implement new mockup
https://bugzilla.gnome.org/show_bug.cgi?id=632109

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-01-31 11:52:27 -05:00
Sardem FF7
5abf9a0425 Add an API to allow extension to set a theme
Add a setTheme function to Main that allows to set a CSS stylesheet
which overrides the GNOME Shell default one

https://bugzilla.gnome.org/show_bug.cgi?id=630428
2011-01-30 16:01:15 -05:00
Ray Strode
e73e4375b8 endSessionDialog: Add logout/shutdown dialog
This commit adds a dialog for gnome-session to
privately use when initiating log outs and shut
downs.

Coordination is done over the bus.

https://bugzilla.gnome.org/show_bug.cgi?id=637187
2011-01-14 00:11:17 -05:00
Ray Strode
dc020628b5 main: add timestamp parameter to push/popModal
Right now popModal() passes global.get_current_time() for
its begin_modal() call.  global.get_current_time() is the
timestamp of the last gdk or clutter event processed by the
shell's mutter process.  These values could potentially be
be too stale to use if pushModal() were to get called in
response to an event by another process.

This commit changes pushModal() to have an optional timestamp
argument, which can be used to associate the call with the
event that initiated it.

https://bugzilla.gnome.org/show_bug.cgi?id=637187
2011-01-13 23:36:22 -05:00
Dan Winship
8bdfb8df68 util: add Util.spawn and friends
Add Util.spawn, Util.spawnCommandLine, and Util.spawnDesktop for
spawning a command/argv/.desktop file in the background, automatically
handling errors via MessageTray.SystemNotificationSource(), and
Util.trySpawn, Util.trySpawnCommandLine, and Utils.trySpawnDesktop
that don't do automatic error handling (but do at least clean up the
error message in the exception a bit).

Update various other bits of code around the shell to use the new
methods.

https://bugzilla.gnome.org/show_bug.cgi?id=635089
2011-01-13 12:14:40 -05:00
Dan Winship
44f70646d3 main: clean up handling of metacity keybindings during grabs
Although certain keys (like Ctrl-Alt-Tab and Alt-F2) should work in
the overview, we generally don't want them to work from inside each
others grabs. In particular, typing Left or Right from inside
Ctrl-Alt-Tab should navigate among focus groups, not switch
workspaces.

https://bugzilla.gnome.org/show_bug.cgi?id=636971
2011-01-10 15:24:54 -05:00
Dan Winship
ed83b5494c main: allow Alt-F1 to exit the overview
Also, change _globalKeyPressHandler to handle KEY_PRESS, not
KEY_RELEASE, for consistency with other code (and so that the
combination of an Alt-F1 press and release doesn't first enter the
overview and then immediately exit it).

https://bugzilla.gnome.org/show_bug.cgi?id=636371
2011-01-10 15:24:54 -05:00
Maxim Ermilov
512798f9c6 Factor out a function to load the default theme
We will use this function elsewhere when the theme needs to be reloaded.

https://bugzilla.gnome.org/show_bug.cgi?id=630428
2011-01-07 15:21:48 -05:00
Adel Gadllah
ceedc7e32c Implement cross overview drag & drop
The gnome-panel allows the user to hover over a tasklist entry
while draging to activate a minimized or obscured window and drop onto it.

Implement a similar behaviour by allowing draging to the activities button or
the hotcorner (and thus opening the overview), which allows the user to
activate any window (even on different workspaces) as a drop target.

https://bugzilla.gnome.org/show_bug.cgi?id=601731
2011-01-05 23:19:56 +01:00
Dan Winship
d3de4e3fbd ctrlAltTabManager: implement Ctrl-Alt-Tab
Add CtrlAltTabManager, which allows tabbing between StFocusManager
groups, and fix up the panel to be keyboard navigable.

https://bugzilla.gnome.org/show_bug.cgi?id=618885
2010-12-20 17:43:01 -05:00
Dan Winship
4dd4c9f99f Use more actor.grab_key_focus() and less stage.connect('key-press-event')
Until recently, the clutter keyboard focus was almost always kept on
the stage, and bits of code that wanted to do stuff with the keyboard
would just watch for key-press-events on the stage. In several places,
the code wasn't even bothering to ensure that the focus was on the
stage, which caused problems with other actors that explicitly grabbed
focus.

A previous fix for this (f21403fd) was to always reset the focus to
the stage after calling pushModal(), but a better fix is to just
actually make use of the keyboard focus everywhere rather than having
everyone try to read events off the stage.

Now pushModal(actor) also does actor.grab_key_focus(), and various
bits of code have been changed to read key events off their own
toplevels rather than off the stage, meaning there's no chance of them
accidentally getting someone else's events.

https://bugzilla.gnome.org/show_bug.cgi?id=618885
2010-12-20 17:32:07 -05:00
Giovanni Campagna
9e99a8c25a Bluetooth status indicator
Introduce the new Bluetooth indicator in the System Status area. It
is written in JS with St and uses the new GnomeBluetoothApplet library.

https://bugzilla.gnome.org/show_bug.cgi?id=618312
2010-12-18 19:10:15 +01:00
Owen W. Taylor
e5a802bf99 Use the new "background actor" functionality in Mutter
The code to draw the root background has now been moved into Mutter,
with added smarts to not draw obscured portions. Remove the old
version of the code and clone the Mutter background actor to draw
the background in the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=634836
2010-11-18 14:03:37 -05:00
Owen W. Taylor
55f290bc96 Disable clearing the color buffer
Since we always cover the stage, we don't need to clear it to a
constant color before painting the scene.

https://bugzilla.gnome.org/show_bug.cgi?id=634769
2010-11-18 14:03:37 -05:00
Dan Winship
f21403fd9f pushModal: clear focus after pushing a new level
This way the new modal level is independent of whatever may have been
happening before. Fixes a problem with status menus becoming active
again from inside the app switcher, etc.
2010-10-29 15:06:01 -04:00
Dan Winship
c217377114 main: use Meta.Display.get_keybinding_action for PrintScreen as well
(and trigger it on keyrelease rather than keypress, like the other
bindings)

https://bugzilla.gnome.org/show_bug.cgi?id=632151
2010-10-25 16:40:44 -04:00
Owen W. Taylor
2fa6f7ba7e Adapt to removal of Mutter namespace
MutterWindow and MutterPlugin have been renamed to MetaWindowActor
and MetaPlugin, mutter_plugin_list_windows() to
meta_plugin_list_window_actors(). Adapt to those changes.

https://bugzilla.gnome.org/show_bug.cgi?id=632500
2010-10-23 14:02:45 -04:00
Dan Winship
cbf2cbac61 [StatusIconDispatcher] Move non-system-tray icons to message tray
New StatusIconDispatcher dispatches icons to the system or message tray.

Based on a patch from Matt Novenstern
https://bugzilla.gnome.org/show_bug.cgi?id=608869
2010-09-23 09:49:47 -04:00
Giovanni Campagna
6ea18136ac Add Universal Access status indicator
Introduce the Universal Access status indicator as designed, modeled
after the similar UI provided by g-s-d. This indicator allows the user
to change rapidly the keyboard and mouse behaviour (sticky keys, slow
keys, bounce keys, mouse keys), as well as the enabled ATs (magnifier,
screen reader, screen keyboard) and the HighContrast Gtk theme.

https://bugzilla.gnome.org/show_bug.cgi?id=624916
2010-09-16 15:03:26 -04:00
Florian Müllner
4632db177a Clean up unused includes
Some late spring cleaning ...
2010-07-19 01:46:01 +02:00
Florian Müllner
643c7fdb3a Switch build to Gtk+-3.0
Update the build dependencies to gtk+-3.0 and adjust the javascript
to run on gtk+-3. Obviously depends on mutter compiled with gtk+-3
as well.

https://bugzilla.gnome.org/show_bug.cgi?id=621845
2010-07-07 12:57:59 -04:00
Adel Gadllah
4ccff179a5 [recorder] Don't pass recorderSettings as a paramter to the signal handler
We want to use the settings object created in start(), not the argument
passed to the signal handler.
2010-06-19 12:08:52 +02:00
Milan Bouchet-Valat
2799327c84 Migrate to GSettings
Use GSettings for all Shell configuration. GConf is kept to read
configuration from external programs (Metacity, Nautilus and Magnifier),
but ShellGConf is removed because it's mostly useless for the few calls
we still have. Also get rid of unused GConf code in ShellAppSystem.

A basic GConf schema is still used to override Metacity defaults and
configure Magnifier in a system-wide fashion. GConf is also used as
GSettings backend via the GSETTINGS_BACKEND environment variable.
All of this will be removed when these programs have been ported
to GSettings and able to use dconf.

GLib 2.25.9 is required. Schemas are converted to the new XML format,
and compiled at build time in data/ so that the Shell can be run from
the source tree. This also requires setting the GSETTINGS_SCHEMA_DIR
environment variable both when running installed or from source tree,
in src/gnome-shell.in and src/gnome-shell-clock-preferences.in.

https://bugzilla.gnome.org/show_bug.cgi?id=617917
2010-06-18 20:27:41 +02:00
Adel Gadllah
ccbf247970 Relayout on monitor layout changes
Currently we only relayout when the screen size changes, this gets
 the cases where a monitor gets added/removed but not when the primary
 monitor changes.

 We need to relayout on all monitor layout changes.

 Remove ShellGlobal::screen-size-changed signal as it is no longer used, Gdk is
 used to track changes now.

 A ShellGlobal::gdk-screen property is added for this purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=620377
2010-06-04 15:20:04 +02:00
Owen W. Taylor
98c2247c1b Add a facility for automated performance measurement
We want to be able to summarize the behavior of the shell's
performance in a series of "metrics", like the latency between
clicking on the Activities button and seeing a response.

This patch adds the ability to create a script under perf/
in a special format that automates a series of actions in the
shell, writing events to the performance log, then collects
statistics as the log as replayed and turns them into a set
of metrics.

The script is then executed by running as gnome-shell
--perf=<script>.

The 'core' script which is added here will be the primary
performance measurement script that we use for shell performance
regression testing; right now it has a couple of placeholder
metrics.

https://bugzilla.gnome.org/show_bug.cgi?id=618189
2010-05-20 23:41:47 -04:00
Colin Walters
11cde53108 [main] Explicitly require the Clutter and Gtk versions we want
By default introspection will use "latest", which blows up with
Gtk3.
2010-05-20 17:03:43 -04:00
Colin Walters
84716bccd4 Create ShellGlobal later to avoid connecting to X during build
The ShellGlobal initialization performs several actions like connecting
to the X server, ensuring directories exist, etc., that are problematic
because we were creating the object even when running the binary for
introspection scanning.  During compilation we may not even have X11
available in e.g. autobuilder type environments, and it's just a
bad idea to connect even if we do.

Avoid this by deferring creation of the ShellGlobal object
until the plugin is actually started.

Now that we're initializing things later, remove the connection to
screen changes, and initialize cached ShellGlobal state at the point
when the plugin is set.  The root pixmap actor is now sized initially
on creation too.  Instead of relying on screen-size-changed being
emitted on startup, explicitly invoke _relayout().

https://bugzilla.gnome.org/show_bug.cgi?id=618371
2010-05-17 13:04:38 -04:00
Marina Zhurakhinskaya
703b21cef0 Don't use double quotes for things that don't need to be translated
This is our convention.

The only exceptions are double quotes for words in comments that give
them a special meaning (though beware that these quotes are not truly
necessary most of the time) and double quotes that need to be a part
of the output string.
2010-05-13 16:00:38 -04:00
Joseph Scheuhammer
7b7c34a399 Adds magnifier functionality to gnome-shell.
Adds the ability to create one or more zoom regions that show magnified or
enhanced views of the desktop.  The magnifier provides options for:
* magnification factor,
* four mouse tracking modes common to screen magnifiers,
* positioning the magnified view in one of four screen location, or full screen,
* crosshairs to accentuate the position of the mouse,
* user preferences persistence via GConf (schemas in
  .../data/gnome-shell.schemas).
* a DBus API to allow other processes to drive the magnifier as a service.

https://bugzilla.gnome.org/show_bug.cgi?id=595507
2010-05-11 14:52:25 -04:00
Joseph Scheuhammer
62afd2ffa3 Reorganize stage in terms of a UI Group actor and everything else
In preparation for adding magnification, "uiGroup.patch", organizes the stage
along the following lines:

Stage
  *Magnifier
  UI group
    Window group
    Chrome group
    Overlay group
    Alt tab
    App display
    Chrome
    ...

This allows a magnifier actor to clone and magnify the UI group.  The magnifier
is a sibling of the UI Group in this stage oraganization -- see the next patch,
"Magnifier.patch".
2010-05-06 17:18:10 -04:00
Owen W. Taylor
29d89467b9 Remove a stray bit of user data
We don't need to pass a user_data argument to Meta.later_add() any
more, so remove a stray 'null'.

https://bugzilla.gnome.org/show_bug.cgi?id=615590
2010-04-13 11:10:33 -04:00
Dan Winship
5bce103a40 Use Telepathy for IM notifications
And suppress libnotify-based notifications from Empathy

https://bugzilla.gnome.org/show_bug.cgi?id=608999
2010-04-06 09:16:00 -04:00
Dan Winship
b8647cc00e Remove sidebar 2010-03-31 10:08:18 -04:00
Colin Walters
d98db2bd59 Use Meta.Display.lookup_keyboard_action to enable workspace switches
Also refactor Alt-F2 to use this as well.

https://bugzilla.gnome.org/show_bug.cgi?id=613101
2010-03-18 14:15:07 -04:00
Adel Gadllah
cdef8bf5aa Remove the "Yessir. The compositor is running" code
Mutter does no longer add this, so there is no reason for us to remove it.
2010-03-17 18:57:05 +01:00
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