Commit Graph

122 Commits

Author SHA1 Message Date
Giovanni Campagna
5a7201ef4d Resolve cyclic dependency on StatusMenu
Solved by splitting the base class (PanelMenuButton) in a separate
module, ui.panelMenu, which is meant to hold also other reusable
button classes.

https://bugzilla.gnome.org/show_bug.cgi?id=621705
2010-07-13 11:58:13 -04:00
Florian Müllner
69fde6822c [StartupNotification] Do not bounce the animation
The spinner animation moving from left-to-right to indicate a starting
application changes its direction on reaching the end of the movement.
Instead, keep the spinner at the right of the app name until startup
has finished.

https://bugzilla.gnome.org/show_bug.cgi?id=623687
2010-07-10 02:25:58 +02:00
Florian Müllner
81aed78a1f [panel] Flip left and right group in RTL locales
While the contents of the left and right group in the panel are
flipped correctly, the groups themselves have to be swapped as
well. The location of the hot corner has to be corrected as well.

https://bugzilla.gnome.org/show_bug.cgi?id=622243
2010-06-21 18:40:29 +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
Maxim Ermilov
7f8f0f2358 Add animated display of startup notification
The shell design says that upon launching an application,
no X window should have focus, and we should display an
animated launching indicator.

Implement this by in panel.js, keep track of the last started
application.  If there isn't currently an X focus, show an animation
for the last starting application.

https://bugzilla.gnome.org/show_bug.cgi?id=598349
2010-06-17 23:18:28 +04:00
Florian Müllner
9baf8e19ea Kill Ubuntu indicators on start-up
Canonical replaced status icons with libindicator based solutions,
which don't work in the shell environment. Force the distro-patched
versions to fall-back to upstream.

https://bugzilla.gnome.org/show_bug.cgi?id=621382
2010-06-17 18:44:50 +02:00
Dan Winship
7fbf8ae4c9 [popupMenu] split this out from panel.js
We want to use this menu style in other places as well

https://bugzilla.gnome.org/show_bug.cgi?id=619541
2010-06-10 15:04:42 -04:00
Colin Walters
e4a6bf994f Fix ShellAppSystem's use of no_focus_window, clean up state handling
First, we were passing an incorrect timestamp to
meta_display_focus_the_no_focus_window - fix that.

The invocation of set_focus_app to the started app there couldn't
really work, because (if the above call had worked) we'd get the
X reply *after* the started app.

What we need to untangle here is the distinction that's now made in
ShellApp between _STATE_STARTING and _STATE_RUNNING.  A nice way to
start doing this is to rebase ShellWindowTracker to only be concerned
with app states.  Concretely, the current "has windows implies
running" logic now lives just inside shell-app.c.

Rename the app-running-changed signal to be app-state-changed.  This
will ultimately be useful so that inside the panel, we can track
the last started app.

https://bugzilla.gnome.org/show_bug.cgi?id=620899
2010-06-09 14:44:15 -04:00
Florian Müllner
e1a109b9be [panel] Fix translatable strings
There are some strings in panel.js which are not extracted correctly.
Fix by marking them correctly with double quotes and _().
2010-06-08 17:13:26 +02:00
Florian Müllner
63d84533c9 [ClockButton] Add a right-click menu to the clock
The clock preferences are hardly discoverable, so allow launching
them from a right-click menu.

https://bugzilla.gnome.org/show_bug.cgi?id=600276
2010-06-03 11:43:58 +02:00
Raphael Bosshard
e3eaa69948 Add ISO week dates to the calendar
This patch adds ISO week dates to the calendar. Week dates are an
often used feature in business and government offices. Can be turned
on through gconf, off by default.

https://bugzilla.gnome.org/show_bug.cgi?id=603532
2010-05-28 01:31:33 +02:00
Florian Müllner
a0be7fa455 [panel] Hide application menu in overview
The activities overview is not a place where we expect users to
interact with a specific application, so showing the application
menu there is misleading.

https://bugzilla.gnome.org/show_bug.cgi?id=618479
2010-05-26 14:06:53 +02:00
Colin Walters
01c493565f [panel] Ellipsize long application titles, don't push clock around
First, simply set the ellipsize flag on the application menu labels.
Next, rework how we lay out the panel components so that the center
box is always centered and constrains the left and right, rather
than pushing it around.

Previously, as part of making the shell not obviously explode if
one had a lot of tray icons, we allowed them to push the clock over.
Instead, go back to just failing in this case; we need to exile legacy
tray icons, not be slightly less ugly.

https://bugzilla.gnome.org/show_bug.cgi?id=592640
2010-05-25 10:40:15 -04:00
Dan Winship
fff04d51b7 [panel] fix alignment of app menu label
we were aligning the top of the shadow with the top of the other labels,
rather than aligning the label itself

https://bugzilla.gnome.org/show_bug.cgi?id=618793
2010-05-25 09:34:01 -04:00
Christian Schramm
91319d5da2 changed 'y_fill' of '_clockButton' in panel to false
The clock appeared to high compared to the activities button
or the login name. Might be just me though.

https://bugzilla.gnome.org/show_bug.cgi?id=619144
2010-05-20 13:01:45 -04:00
Dan Winship
c8f4adde7f [panel] fix nested-queue_relayout warning in menus
We don't need to reposition the menu every time its button is
allocated; we can just stick it in the right place when we pop it up
(which is guaranteed to not be during a layout cycle).

(This means that now we won't reposition the menu if the button
moves/resizes while the menu is already popped up, but it's not clear
that we'd want it to anyway, since that could easily result in the
user selecting the wrong item, etc.)

Also, we don't need to override the menu's width any more, so remove
that.

https://bugzilla.gnome.org/show_bug.cgi?id=619113
2010-05-19 17:06:35 -04:00
Dan Winship
8b242dd4bd minor js cleanups
add missing semicolons pointed out by js2-mode, add missing emacs
modelines, fix a few tabs that crept in via cut+paste
2010-05-19 13:26:41 -04:00
Dan Winship
9b3e16595b [panel] add keyboard navigation of menus
https://bugzilla.gnome.org/show_bug.cgi?id=619008
2010-05-19 13:16:22 -04:00
Dan Winship
2179f5836e [panel] separate "active" state from hover state in PanelBaseMenuItem
When doing keyboard navigation, the active menu item may not be the
one under the mouse.

https://bugzilla.gnome.org/show_bug.cgi?id=619008
2010-05-19 13:15:46 -04:00
Dan Winship
320adb316d [panel] split out a PanelBaseMenuItem class
Make the existing PanelMenuItem, PanelSeparatorMenuItem,
PanelImageMenuItem inherit from it.

https://bugzilla.gnome.org/show_bug.cgi?id=619008
2010-05-19 13:15:46 -04:00
Colin Walters
db36a90c48 Combination of updates to match design suggestions
* Align the icons inside text
* Add application name to Quit
* Fade in/out the menu
* Drop some padding around the edges
* Add padding around the separators
* Use a gradient for separators

https://bugzilla.gnome.org/show_bug.cgi?id=618460
2010-05-19 12:31:19 -04:00
Dan Winship
1d721c9080 [panel] add some missing semicolons 2010-05-18 13:16:24 -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
Colin Walters
e835cd2c2d [panel] PanelImageMenuItem should follow gtk-menu-show-images
Update statusMenu to always show images for the presence items only.

https://bugzilla.gnome.org/show_bug.cgi?id=618438
2010-05-12 17:25:51 -04:00
Colin Walters
27bcce0888 [panel] Port user status menu to panel menu
https://bugzilla.gnome.org/show_bug.cgi?id=613804
2010-05-11 14:10:36 -04:00
Colin Walters
fdcb73d93e Make panel more menu-like, initial application menu
Change the panel into a menu-like actor, where elements can
add menu items.

Implement the initial application menu.

https://bugzilla.gnome.org/show_bug.cgi?id=613804
2010-05-11 14:10:36 -04:00
Owen W. Taylor
5111edb80b Use a St.Bin rather than a St.BoxLayout for calendar popup
Using a horizontal St.BoxLayout for calendar container forces
width-for-height layout on the St.Table child. Since St.Table
is naturally width-for-height, this can trigger bugs and is,
at best, a bit ineffecient. Use a St.Bin instead since we don't
need any BoxLayout features.

https://bugzilla.gnome.org/show_bug.cgi?id=618104
2010-05-09 16:37:08 -04:00
Florian Müllner
e6b91414de [panel] Make clock configurable via gconf
Add keys for customizing the panel clock to the gconf schema and make
the clock use them. The settings are copied from gnome-panel's clock
applet, excluding all location/weather/appointment/... keys. In addition,
'internet' is no longer a supported value for the format key.

https://bugzilla.gnome.org/show_bug.cgi?id=600276
2010-05-09 01:07:40 +02: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
Colin Walters
7d7ed7ce7a [panel] y_fill the calendar button 2010-04-27 13:07:31 -04:00
Colin Walters
704354be2c [panel] Remove hardcoded uses of PANEL_HEIGHT
It's cleaner to just y_fill.

https://bugzilla.gnome.org/show_bug.cgi?id=616951
2010-04-27 12:52:57 -04:00
Colin Walters
3715109ebe [panel] Fix allocation positioning for boxes
This change doesn't actually affect anything visibly, but
using the absolute coordinates of our allocation box in allocate()
is wrong; we should be positioning our children at 0,0 and using
width/height as a reference.

https://bugzilla.gnome.org/show_bug.cgi?id=616951
2010-04-27 10:37:17 -04:00
Colin Walters
6aaf4b87d5 Major ShellApp API cleanup, startup notification, window focus handling
This patch combines several high level changes which are conceptually
independent but in practice rather intertwined.

* Add a "state" property to ShellApp which reflects whether it's
  stopped, starting, or started.  This will allow us to later clean
  up all the callers that are using ".get_windows().length > 0" as
  a proxy for this property
* Replace shell_app_launch with shell_app_activate and shell_app_open_new_window
  A lot of code was calling .launch, but it's signficantly clearer
  if we call this ".open_new_window()", and later if we gain the ability
  to call into an application's menu, we can implement this correctly rather
  than trying to update all .launch callers.
* Because ShellApp now has a "starting" state, rebase panel.js on top of
  this so that when we get a startup-notification sequence for an app
  and transition it to starting, it becomes the focus app, and panel.js
  cleanly just tracks the focus app, rather than bouncing between SN
  sequences.  This removes display of non-app startup sequences, which
  I consider an acceptable action in light of the committed changes
  to startup-notification and GTK+.

https://bugzilla.gnome.org/show_bug.cgi?id=614755
2010-04-12 16:32:21 -04:00
Dan Winship
2320c393c9 Replace all remaining BigBoxes with StBoxLayouts or StBins
Also, remove a lot of cruft from genericDisplay.js leftover from
previous St-ifications, and remove the pre-gtk-2.16 hacks from the
status tray in panel.js (which are much less needed with the
nearly-all-black panel anyway).

https://bugzilla.gnome.org/show_bug.cgi?id=614516
2010-04-06 09:13:51 -04:00
Colin Walters
c92ce5983d Consume startup-notification APPLICATION_ID
This patch ensures we're showing the correct data when doing
startup-notification.

https://bugzilla.gnome.org/show_bug.cgi?id=612833
2010-03-30 17:36:05 -04:00
Colin Walters
087ac8470e [panel.js] Remove duplicated 'let'
Original fix from Maxim Ermilov <zaspire@rambler.ru>
2010-03-16 10:51:05 -04:00
Dan Winship
3ce89e3c80 Add missing semicolons noted by jslint
Taken from a patch by Lex Hider on the mailing list
2010-03-15 09:50:05 -04:00
Colin Walters
3aea09b614 Fix app icon fading
The way we were loading data into a CoglTexture, then pulling it out
and manipulating it on the CPU, then loading it back into a texture
was a bit lame.

Clean things up a bit here by loading directly into the CPU, doing
the fading, then creating a texture.

Also cache the faded data in StTextureCache.

https://bugzilla.gnome.org/show_bug.cgi?id=612759
2010-03-13 12:50:38 -05:00
Dirk-Jan C. Binnema
046e0609ab Improve 12/24 clock detection
The current check looks at whether there was some am/pm suffix in the
localized time; however in some cases (locales) that does not seem to
work. this version instead checks whether the localized versions of 05:00 and
17:00 start with the same two digits; if not, it's probably a 24h clock.

https://bugzilla.gnome.org/show_bug.cgi?id=603488
2010-03-05 12:02:18 -05:00
Colin Walters
347196d35c [panel] Fix RTL for appMenu, allocation, other misc.
Other misc includes:
* Remove some unused CSS
* Readd comments

https://bugzilla.gnome.org/show_bug.cgi?id=611288
2010-03-01 13:34:20 -05:00
Colin Walters
ae3d1423e5 [panel] Handle async load of icons correctly
Fading the application icon required the texture to have already been
loaded, which was normally the case since we create icons for apps
in the well and browser; but when finding an app not from there,
the cogl-texture for the icon might not be available.

Fix this by watching for the texture and fading when it appears.

https://bugzilla.gnome.org/show_bug.cgi?id=611288
2010-02-28 15:53:22 -05:00
Colin Walters
d56fbf6d6a [panel] Fix AppPanelMenu's allocation
Because we were setting the "fixed-position-set" property
on the internal label, its width/height requests weren't
being accounted for in the size request of the overall box.

The way we were hooking up to notify::allocation was hacky; do
this correctly by simply implementing a container.

https://bugzilla.gnome.org/show_bug.cgi?id=611288
2010-02-28 15:53:22 -05:00
Owen W. Taylor
38b7904f92 Distinguish translator comments for date formats
Don't say 'This is a time format' for both time formats, but
label them as 24-hour and AM/PM.
2010-02-11 14:53:14 -05:00
Colin Walters
c89ee2f8f2 [panel] Fix typo in previous clock patch
We shouldn't be displaying hours as 24 in am/pm case
2010-02-11 14:42:12 -05:00
res
c21e692652 [panel] Detect clock AM/PM from locale
Look at whether a localized time string from JS includes am/pm to
determine whether we should show it in the UI.
2010-02-11 14:01:19 -05:00
Owen W. Taylor
caaa543385 Draw a ripple when the hot corner is hit
Animate an expanding ripple from the hot corner using multiple
scaling copies of a PNG of a single ripple. The idea here is to
give the user a clue as to what happened.

Based on initial version implemented live at MIT IAP GNOME Shell
intro session; thanks to all the attendees for coming!

https://bugzilla.gnome.org/show_bug.cgi?id=609135
2010-02-08 14:04:45 -05: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
Colin Walters
c17e1249d5 [panel] Scale up, center and fade application icon in app menu
Per 20091114 design.

https://bugzilla.gnome.org/show_bug.cgi?id=605491
2010-01-07 18:33:01 -05:00
Colin Walters
1d2dc09ede [panel] Port to CSS
With some tweaks from JP St. Pierre to center things in case we ever
have a larger panel.

https://bugzilla.gnome.org/show_bug.cgi?id=602131
2009-11-23 14:33:49 -05:00
Colin Walters
2f1ca7bf28 Remove ShellButtonBox, button.js; Use St.Clickable in panel.js
StClickable replaces ShellButtonBox.  Reduce the number of
button-like things by deleting button.js.

To do so, add CSS style for the actitivies button.

https://bugzilla.gnome.org/show_bug.cgi?id=602131
2009-11-23 14:33:49 -05:00