Commit Graph

66 Commits

Author SHA1 Message Date
Colin Walters
38c06ca837 Create ShellApp, rebase things on it
Previously, we had ShellAppInfo, which contains fundamental
information about an application, and methods on ShellAppMonitor
to retrieve "live" information like the window list.

AppIcon ended up being used as the "App" class which was painful
for various reasons; among them that we need to handle window
list changes, and some consumers weren't ready for that.

Clean things up a bit by introducing a new ShellApp class in C,
which currently wraps a ShellAppInfo.

AppIcon then is more like the display actor for a ShellApp.  Notably,
the ".windows" property moves out of it.  The altTab code which
won't handle dynamic changes instead is changed to maintain a
cached version.

ShellAppMonitor gains some more methods related to ShellApp now.

In the future, we might consider changing ShellApp to be a GInterface,
which could be implemented by ShellDesktopFileApp, ShellWindowApp.

Then we could axe ShellAppInfo from the "public" API and it would
return to being an internal loss mitigation layer for GMenu.

https://bugzilla.gnome.org/show_bug.cgi?id=598227
2009-10-14 14:37:34 -04:00
Marina Zhurakhinskaya
212d5c1954 Add missing files to POTFILES.in; add a translation hint
POTFILES.in was missing some files.

"Activities" is not easily translatable into some languages, e.g. Russian,
so suggest using the word for "Overview" instead.
2009-10-09 00:30:10 -04:00
Owen W. Taylor
4c6f770dea Fix positioning of the Calendar on multihead
Parens were in the wrong place, resulting in the calendar not
being properly centered on the primary monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=597078
2009-10-07 14:52:49 -04:00
Marina Zhurakhinskaya
53d0581377 Don't process the first click on Activities button for a timeout period after the hot corner was triggered
This avoids opening and closing the overview when the hot corner is triggered
and the activities button is clicked.
2009-10-06 16:58:30 -04:00
Adel Gadllah
9b05304c2d Use better fitting color for non ARGB tray icons
Currently we use 0xefefefff as a background color for non ARGB tray icons,
which looks out of place (i.e does not fit the panel's background gradient).

Change it to 0x0b0b0bff to fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=597148
2009-10-04 10:02:37 +02:00
Owen W. Taylor
afb3b1e718 Fixes for Calendar widget
Miscellaneous fixes from review:

- Distribute calendar.js and the interactive test
- Make the pointless protection against leap seconds actually work
  by starting in the middle of the day so that forward/back always
  move a day.
- Use a variable instead of an inline '8' to know where to start
  when removing old day actors.
- Remove a stray comment from the test

https://bugzilla.gnome.org/show_bug.cgi?id=596432
2009-10-01 16:48:24 -04:00
Owen W. Taylor
04e28cd7c4 Add a calendar pop-down to the clock
js/ui/calendar.js: Generic calendar widget
tests/interactive/calendar.js: Basic test of the calendar

js/ui/panel.js: Add a pop-down from the clock that shows a
  calendar widget. The pop-down is not menu-like to allow the user to
  interact with an application while looking at the calendar.
gnome-shell.css: Add theming for calendar, calendar popup, and for
  buttons on the panel

https://bugzilla.gnome.org/show_bug.cgi?id=596432
2009-10-01 15:05:11 -04:00
Dan Winship
d8cabbee0b More global-ization 2009-09-11 17:23:42 -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
5803aa7e65 Simplify Button class by using ShellButtonBox
Make Button class purely about adding visuals, and use ShellButtonBox
for behavior. API equivalences:

  shell.button => shell.actor [for consistency]

  staysPressed parameter to constructor => replaced by manually setting
   the 'active' property of button.actor as appropriate

  pressIn/release => button.actor.active = true/false

  enter-event/leave-event signals => button.actor notify::hover

Along the way, this fixes a bug with the user status menu where it was
not getting set to active because the button was getting a leave
(triggered by the menu popping up and grabbing the pointer) before for
button release, which disabled the staysPressed behavior.

Reported by Michael Meeks
http://bugzilla.gnome.org/show_bug.cgi?id=593471
2009-08-29 15:20:19 -04:00
Owen W. Taylor
943c5e2edc Improve comment about button-release-event handler
Improve the documentation about the button-release-event handler
we put on the status-menu button at Colin's suggestion.

http://bugzilla.gnome.org/show_bug.cgi?id=593362
2009-08-28 12:40:56 -04:00
Owen W. Taylor
1340413740 Fix hang when clicking on the user status menu in the overview
shell-global.[ch]: Add shell_global_display_is_grabbed() that
  uses the newly added meta_display_get_grab_op() to check
  for existing grabs.
shell-status-menu.[ch]: Add shell_status_menu_is_active() to
  check if the menu is popped up. Check for active grabs before
  popping the menu up. Use gtk_menu_popdown() rather than
  gtk_widget_hide(). Remove an excess gtk_widget_show() and
  some excess casts.
panel.js: Check whether the status menu is popped up after button
  release, and if it's not popped up, unhighlight the button.

Reported by Nuno Donato
http://bugzilla.gnome.org/show_bug.cgi?id=593362
2009-08-28 12:34:04 -04:00
William Jon McCann
14a7e310fc Make the gradient on the top panel the same as the "dash"
The previous top color was a bit too bright.
2009-08-28 11:47:19 -04:00
Colin Walters
ed7881d6c9 [AppMonitor] Handle window title changes causing mapping changes
For Firefox/OpenOffice, right now we have a workaround in the
code where we look at their "title" property.  However, we
weren't monitoring that property for changes, and I'm fairly
certain Firefox at least was mapping a window and then very
quickly changing its title after.  So we need to handle
dynamic changes.

Split out the wm_class mapping from the title hack.  It was
messy and weird to have the two mixed because they're not
at all related, and we're not trying to handle WM_CLASS changes
right now.

Explicitly connect to notify::title in the case where we had
a title fallback.  When a title changes, just treat it as
an add+remove.

In the Application Menu area in the panel, hook up to app-added
and app-removed so we get notification of the active app changing.
2009-08-27 02:22:25 -04:00
Marina Zhurakhinskaya
72b4d2a234 Make hotCorner a class variable
This fixes a bug where we were already using this._hotCorner
in _onHotCornerEnvironsLeft() and were incorrectly setting
this._hotCornerEntered to false when the hot corner was
re-entered from the environs.
2009-08-21 15:56:07 -04:00
Marina Zhurakhinskaya
30d3c1fe72 Use a larger area around the hot corner to decide if the user has left the hot corner
Using a larger area around the hot corner to decide if the user has left the
hot corner prevents triggering the hot corner multiple times due to an
accidental jitter.
2009-08-18 14:59:53 -04:00
Colin Walters
ca51a8c926 Add initial calls to Gettext
We don't have a lot of strings, and what ones we do have we've
been avoiding duplication.  This patch adds calls to _() i.e. gettext
for those strings we do have.
2009-08-14 09:32:15 -04:00
Colin Walters
f00500d3d5 Bug 591246 - Move towards shell-black02 mockup
Remove the last use of passing width into Dash by having the
Pane with the previews scaling dynamically and relying on
Clutter scaling.

If we only have one workspace, don't display a selection frame
for it.

Rework Dash into a searchArea and sectionArea, which get
explicitly sized by overlay.js.  We use the workspaces size
to choose the size of those dash areas.

Switch dash colors/boxes etc. to ones from shell-black02.

Add a gradient to the panel.

Add a magnifier.svg for use in search.
2009-08-12 16:07:05 -04:00
Marina Zhurakhinskaya
babb13f603 Remove unused button width and height arguments and specify button height explicitly
minWidth and minHeight arguments of the Button class were not used.

Panel buttons need their height to be explicitly specified as
PANEL_HEIGHT to take up full panel height. This fixes the problem with the
user not being able to click at the very top edge of the panel to activate
the button.
2009-08-11 18:16:33 -04:00
Colin Walters
74eac21870 Add application menu area to panel
This is a start at the "Active Appliction Item" component of the
shell design.  Currently we just show the currently focused
application.  When launching a new application, we show that as well.

The implementation here is not complete; basically when launching
we de-focus the active one, and the application well shows the
most recent startup sequence.

This kind of fails in the case of multiple sequences, and we
also don't correctly de-focus the current window in other
launch paths.
2009-08-11 13:09:41 -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
Marina Zhurakhinskaya
00cc32d95a Ignore clicks on hot corner during transition
It's both intuitive to go to the corner of the screen
and click the activities button at the same time.

Both actions bring up the overlay,  but combined
they cancel each other out.  This commit makes
clicking the hot corner not cancel the act of
going to the hot corner.

Based on a patch from Ray Strode.
2009-08-10 14:19:07 -04:00
Marina Zhurakhinskaya
ccafa53bd6 Enable hot corner for triggering the overview mode
Use the 1x1 actor in the top left corner of the screen to enter and leave
the overview mode by just moving the mouse over to it.

No delay is used for triggering the hot corner because a delay significant
enough to allow moving away the mouse to avoid triggering it ruins the desired
flow when triggering the hot corner is actually intended.

The hot corner is not enabled in the full screen mode because the application
or the virtual system might have a hot corner of its own in that place.
2009-08-07 16:45:35 -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
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
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
Colin Walters
8ef48ca33c Animate panel appearance on startup 2009-07-02 01:04:40 -04:00
William Jon McCann
361461d1b9 Allow status icons to receive clicks at edge of screen
This removes the border and padding and aligns the box to the top.  Perhaps we
could push the padding down into the active area of the icon since it does look
a bit nicer with it.

http://bugzilla.gnome.org/show_bug.cgi?id=583139
2009-06-03 22:24:59 -04:00
Dan Winship
3ed0c2dc1c Take advantage of trayicon transparency in gtk+ 2.16
Fall back to the old behavior with older gtk.

http://bugzilla.gnome.org/show_bug.cgi?id=582484
2009-06-02 10:36:07 -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
Marina Zhurakhinskaya
e365a0ba7a Press in the Activities button when the overlay is entered
In addition to pressing the Activities button, the overlay can be entered
by pressing the System key or Alt+F1. We want the button to look pressed in
in these cases too.
2009-05-08 16:27:14 -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
Dan Winship
17fb280884 js/ui/panel.js: Lang.bind-ify 2009-05-07 09:54:21 -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
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
Marina Zhurakhinskaya
81b3f7cf44 Bug 580528 – The panel should show today's date
Show the date in the panel so that it looks more polished.

Suggested by Josh Adams.
2009-04-28 17:29:53 -04:00
Dan Winship
670532e5c9 Fix the stage_input_area handling
The panel show/hide changes broke things if window restacking occurred
while the overlay was active. Now instead of having the panel set the
input area itself, main.js just watches whether or not the panel is
visible, and updates things itself (taking the modal state into
account as well).

http://bugzilla.gnome.org/show_bug.cgi?id=576903
2009-04-01 18:24:26 -04:00
Sander Dijkhuis
2b9b600710 Bug 574702 - Give the panel a gradient background and shadow
The panel looks nicer when it is drawn as a semi-transparent gradient
above the background color.

shell-global.[ch]: Add a function that creates vertical gradient actors.
panel.js: Change the look of the panel and put the tray in a framed box.
overlay.js: Extend the overlay background to behind the panel.
2009-03-24 15:20:16 -04:00
Dan Winship
1fcaafdb58 Fix panel stacking with respect to fullscreen windows and screensaver. #571827
Because we can't set the stage input area to a non-rectangular shape,
we don't allow the panel to be partially overlapped; it is always either
on top, or else completely hidden.
2009-03-23 09:33:13 -04:00
Owen W. Taylor
9c8074535c Change Meta.Direction.Top to Meta.Side.TOP
Handle MetaSide being split from MetaDirection. The enums have
the same numeric values for the corresponding values, so this
change is only a cleanup.
2009-03-17 17:14:24 -04:00
Owen W. Taylor
0f7abf96a7 Port to Clutter-0.9
tools/build/gnome-shell.modules: Point  at master branch of Clutter (0.9)
  and make gobject-introspection a dep of Clutter.
configure.ac src/Makefile.am: Use Clutter-0.9
js/ui/button.js js/ui/genericDisplay.js js/ui/overlay.js js/ui/panel.js
js/ui/runDialog.js js/ui/workspaces.js src/shell-status-menu.c:
  Use ClutterText instead of ClutterLabel and ClutterEntry
js/ui/workspaces.js js/ui/genericDisplay.js: Use ClutterClone instead
  of ClutterCloneTexture
src/shell-global.[ch]: Add Shell.get_event_key_symbol() to workaround
  unaccessibility of clutter_key_event_symbol() to use.
js/runDialog.js js/overlay.js: Use Shell.get_event_key_symbol() as
  appropriate.
2009-02-23 14:53:06 -05:00
Colin Walters
b7a0a5e769 Merge branch 'statusmenu'
svn path=/trunk/; revision=183
2009-02-04 18:45:38 +00:00
Dan Winship
87a3088719 sort imports consistently; everything-but-our-javascript, alphabetically,
then a blank line, then all of our javascript, alphabetically

svn path=/trunk/; revision=176
2009-02-02 23:02:16 +00:00
Dan Winship
a80c18bc4e Use BigBox rather than TidyGrid to organize the panel. #568712
svn path=/trunk/; revision=168
2009-01-27 20:29:37 +00:00
Dan Winship
a5c3c258a3 fix incorrect variable name in _updateClock
svn path=/trunk/; revision=111
2008-12-03 18:27:48 +00:00
Owen Taylor
dd4db82475 Bug 562771 – The clock is inaccurate
Fix the clock to update exactly on the minute, rather than at a random
time within the minute.

Patch from RainCT (Siegfried Gevatter)

svn path=/trunk/; revision=98
2008-12-01 19:59:59 +00:00
Owen Taylor
7b471645f4 Redo tabs => spaces indentation change to not lose manual indentation
Revert most JS changes in commit:

    Fri Nov 28 20:12:20 2008 +0000
    Convert all JS style to be uniform, add Eclipse settings bits

Instead, just add 'indent-tabs-mode: nil' to the mode lines and convert
tabs to spaces. The indentation no longer exactly matches the Eclipse
settings, since they differ in some ways from the style we are trying
to achieve.

svn path=/trunk/; revision=97
2008-12-01 19:51:43 +00:00