Compare commits

...

21 Commits

Author SHA1 Message Date
3dff544396 Bump version to 3.14.3
Update NEWS.
2014-12-19 12:07:06 +01:00
7e7eab2bea gestures: Restrict actions based on keybindingMode
Just like keybindings and the message tray pointer barrier, gestures
don't always make sense - for instance, swiping up the screen shield
should not trigger the message tray just as the SelectArea action around
the left edge should not open the overview.
To avoid this, restrict gestures based on the current keybinding mode.

https://bugzilla.gnome.org/show_bug.cgi?id=740237
2014-12-19 11:48:27 +01:00
c568b44997 Calendar: ignore timeouts starting the calendar-server
In certain cases the timeout for starting the calendar helper can
be reached but the calendar helper still loads fine. If so, just
ignore the timeout and wait until we get a notification from
dbus of the successful start.

https://bugzilla.gnome.org/show_bug.cgi?id=735308
2014-12-14 17:19:12 -08:00
ce818c0ae5 calendar-server: activate evolution-source-registry manually at startup
g_dbus_proxy_new() (and library calls that wrap it) has an hardcoded
timeout of 25 seconds, which is insufficient for starting up e-s-r
in certain setups. Avoid a timeout error by starting the service
manually with a longer timeout before hand.
Also demote the error to a warning + exit failure instead of
a crash, to avoid triggering abrt reports.

https://bugzilla.gnome.org/show_bug.cgi?id=735308
2014-12-14 17:19:12 -08:00
ef2e301c08 Add ScrollView to calendar events
Added single ScrollView to make the calendar events scrollable

The calendar height will not go beyond the screen height
Calendar events for all periods will be enclosed in a single ScrollView

Moved the separator to top of the buttons while expanding

https://bugzilla.gnome.org/show_bug.cgi?id=705115
2014-12-11 18:48:22 +01:00
ba274f42b2 build: Workaround quoting issues in configure script
Default value of BROWSER_PLUGIN_DIR variable contains special symbols.
Thus quoting and inlining it in parameter expansion is not portable.
In particular it does not work in dash. Replace ${a:-b} parameter
expansion with conditional statement.

https://bugzilla.gnome.org/show_bug.cgi?id=739241
2014-11-29 16:37:54 +00:00
2ceaa05a5a gdm: fix sensitivity of auth prompt when cancelling early and user list is disabled
If the user list is disabled and the user clicks cancel quickly enough
after typing their username, they can get in a state where the
auth prompt gets stuck in the insensitive state.

This is because the login dialog code makes the prompt insensitive
while while pam is processing the provided username, but the prompt
only makes itself sensitive again when it is hidden.

This commit makes it sensitive right before asking for a username again.

https://bugzilla.gnome.org/show_bug.cgi?id=740141
2014-11-26 19:04:43 -06:00
047e454a7c gdm: disallow cancel after verification succeeds
Once verification has succeeded, the train's already
left the building and we shouldn't allow canceling.

This commit renders the cancel button non-reactive
and makes the cancel function be a noop after
verification succeeds.

https://bugzilla.gnome.org/show_bug.cgi?id=740141
2014-11-26 19:04:29 -06:00
86618ce1f9 network: properly remove connections from list
Due to a typo we were always removing the first (index 0) connection
from the global list of connections instead of the correct one.

This resulted in some connections remaining in the shell's connection
list long after they were removed.  In particular, this resulted in
multiple copies of a bluetooth connection appearing after suspend/resume
(when the device was readded and the cached connection list was
rescanned).

https://bugzilla.gnome.org/show_bug.cgi?id=740227
2014-11-26 16:08:17 -05:00
59724c5dd5 Bump version to 3.14.2
Update NEWS.
2014-11-12 19:30:14 +01:00
3bb500fed4 viewSelector: Hide workspace page after animating to app picker
WorkspacesDisplay relies on being hidden to disable workspace switches
by scrolling or panning. Usually viewSelector will hide the previous
page on page switch, but we currently miss the case when opening the
overview at the app picker, where the workspaces page is still shown
for the transition, but never hidden.
Fix this by calling hide() in addition to setting the opacity to 0 at
the end of the overview animation.

https://bugzilla.gnome.org/show_bug.cgi?id=737534
2014-11-12 19:19:31 +01:00
dcd3945bb7 Move style updates in AppIcon._onStateChanged out
There is currently no simple way to inject into AppIcon's state change,
so an extension that wants to do this has to destroy/remove/update all
icons in the Shell (i.e. in the Dash, AllView, FrequentView) on enable()
and disable() after updating AppIcon.prototype._onStateChange, or the
extension must require a restart of the Shell.

To solve this issue, we rename _onStateChanged to _updateRunningStyle,
and connect the notify::state signal with an anonymous function that
calls _updateRunningStyle.
This extra function call should allow extensions to just extend the
updateRunningStyle function in the prototype.

https://bugzilla.gnome.org/show_bug.cgi?id=739497
2014-11-06 21:31:47 +01:00
f414f616c4 dateMenu: Fix typo in _isToday()
getDay() is the day of week, what we want there is getDate().

https://bugzilla.gnome.org/show_bug.cgi?id=738725
2014-11-03 15:05:59 +01:00
e21e90c5e6 networkAgent: Support NM versions without :capabilities
Commit 926de53c0c bumped the requirement for NetworkManager,
which is problematic on a stable branch; optionally fall back to
the previous code.

https://bugzilla.gnome.org/show_bug.cgi?id=738485
2014-10-31 12:41:23 +00:00
1e7b2ef51f Bump version to 3.14.1.5
Update NEWS
2014-10-30 11:22:27 +00:00
c291de7479 Calendar: Inline _ellipsizeEventTime into caller
This patch inlines the function _ellipsizeEventTime into its only caller
_addEvent. This also removes the need for the global const
EventEllipses and is thus removed by this commit as well.

https://bugzilla.gnome.org/show_bug.cgi?id=727302
2014-10-27 19:33:25 -05:00
aee1a18270 Calendar: sort multi-day events by ending day/time
With commit dc6a60dde, the calendar displays the ending day and time of
a continuing multi-day event on its ending day. This results in the list
not appearing to be sorted. This patch sorts the list according to the
displayed day/time.

With the two appointments
Thursday 0800-1000 Foo, and Wednesday 0900-Friday 1200 Bar and today
being Monday, the rest of the week list currently displays:
F ...1200 Bar
T    0800 Foo
With this patch, the displaying order is switched because Friday comes
after Thursday.

https://bugzilla.gnome.org/show_bug.cgi?id=727302
2014-10-27 19:33:25 -05:00
6c67f26e7d Calendar: Show multi-day event continuation
Currently, multi-day events are shown as individual appointments on each
day.  This patch ellipsizes multi-day events to indicate continuation on
the prior or following day (or other time-period.)

The time label spot is now replaced by a box layout that contains the
prefix ellipsis label, the time label and the postfix ellipsis label.
In order to keep the alignment, ellipses are merely invisible (zero
opacity) when hidden.

The ellipses are styled using the events-day-time-ellipses class which,
by default, take the color of the event text.

When RTL is used, the box contents are adjusted accordingly (clutter
does that for us).

An event spanning three days now displays "...All Day..." in the
calendar on the second day.

https://bugzilla.gnome.org/show_bug.cgi?id=727302
2014-10-27 19:33:25 -05:00
deb651acbf BackgroundCache: plug an Animation object leak
We need to return early in case the animation file is the same,
otherwise we'll create a new Animation object and leak the previous
one.

https://bugzilla.gnome.org/show_bug.cgi?id=739252
2014-10-27 18:28:39 +01:00
d2011f6d7f messageTray: Summarize notifications when messages queue up
It is really annoying for the user to acknowledge multiple notifications
when they queue up. So, to prevent a notification flood that has to be
handled by the user one-by-one, a summarized-notification feature is
added which leaves a single summarized-notification for the user,
replacing multiple notifications if the number exceeds 1, which they may
or may not acknowledge. When this summarized-notification is acknowledged,
the message-tray is opened where they can view the notifications that were
summarized. This helps the user concentrate on his primary task
simultaneously informing them about the new notifications.

https://bugzilla.gnome.org/show_bug.cgi?id=702460
2014-10-27 18:22:36 +01:00
416adec904 Fix handling of SystemBackground
Since the background rework, SystemBackground is no longer a transparent
actor that you have to stack on top of a solid background, it is an
opaque actor. Fix the color of the background actor, and remove places
where we were setting the background color underneath the system background
and expecting blending - in particular, we can always set no_clear_hint
on the stage.

https://bugzilla.gnome.org/show_bug.cgi?id=738652
2014-10-16 17:17:33 -04:00
19 changed files with 246 additions and 80 deletions

33
NEWS
View File

@ -1,3 +1,36 @@
3.14.3
======
* Properly remove network connections from list [Ryan; #740227]
* Fix handling of cancel button on login screen [Ray; #740141]
* Fix build when using dash as default shell [Alexander; #739241]
* Make event list in calendar scrollable [Stalin; #705115]
* Fix calendar-server crash on DBus timeout [Giovanni; #735308]
* Fix gestures triggering erroneously [Florian; #740237]
Contributors:
Giovanni Campagna, Ryan Lortie, Florian Müllner, Stalin Pereira, Ray Strode,
Alexander Tsoy
3.14.2
======
* Do not hard-depend on latest NetworkManager [Florian; #738485]
* Fix check for isToday in calendar [Darcy; #738725]
* Fix workspace changes from app picker [Yuki; #737534]
* Misc. bug fixes [Yuki; #739497]
Contributors:
Darcy, Florian Müllner, Yuki
3.14.1.5
========
* Fix handing of SystemBackground [Owen; #738652]
* Summarize queued up notifications [Devyani; #702460]
* Plug an animation object leak [Rui; #739252]
* Improve handling of multi-day events [Andreas; #727302]
Contributors:
Andreas Brauchli, Devyani Kota, Rui Matos, Owen W. Taylor
3.14.1
======
* Fix pulse animation for scrolled app folders [Florian; #736885]

View File

@ -1,5 +1,5 @@
AC_PREREQ(2.63)
AC_INIT([gnome-shell],[3.14.1],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
AC_INIT([gnome-shell],[3.14.3],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/shell-global.c])
@ -76,7 +76,7 @@ AC_MSG_RESULT($enable_systemd)
CLUTTER_MIN_VERSION=1.15.90
GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1
GJS_MIN_VERSION=1.39.0
MUTTER_MIN_VERSION=3.14.1
MUTTER_MIN_VERSION=3.14.3
GTK_MIN_VERSION=3.13.2
GIO_MIN_VERSION=2.37.0
LIBECAL_MIN_VERSION=3.5.3
@ -232,7 +232,9 @@ esac
AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS"
AC_SUBST(AM_CFLAGS)
BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}"
if test -z "${BROWSER_PLUGIN_DIR}"; then
BROWSER_PLUGIN_DIR="\${libdir}/mozilla/plugins"
fi
AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to])
AC_CONFIG_FILES([

View File

@ -1494,6 +1494,10 @@ StScrollBar StButton#vhandle:active {
text-align: right;
}
.events-day-time-ellipses {
color: rgba(153, 153, 153, 1.0);
}
.events-day-time:rtl {
text-align: left;
}

View File

@ -260,6 +260,7 @@ const AuthPrompt = new Lang.Class({
_onVerificationComplete: function() {
this.verificationStatus = AuthPromptStatus.VERIFICATION_SUCCEEDED;
this.cancelButton.reactive = false;
},
_onReset: function() {
@ -431,6 +432,7 @@ const AuthPrompt = new Lang.Class({
reset: function() {
let oldStatus = this.verificationStatus;
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
this.cancelButton.reactive = true;
if (oldStatus == AuthPromptStatus.VERIFYING)
this._userVerifier.cancel();
@ -499,6 +501,9 @@ const AuthPrompt = new Lang.Class({
},
cancel: function() {
if (this.verificationStatus == AuthPromptStatus.NOT_VERIFYING || this.verificationStatus == AuthPromptStatus.VERIFICATION_SUCCEEDED) {
return;
}
this.reset();
this.emit('cancelled');
}

View File

@ -643,6 +643,8 @@ const LoginDialog = new Lang.Class({
realmManager.release();
}));
this._updateCancelButton();
this._authPrompt.updateSensitivity(true);
this._showPrompt();
},

View File

@ -1564,10 +1564,11 @@ const AppIcon = new Lang.Class({
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
this._menuTimeoutId = 0;
this._stateChangedId = this.app.connect('notify::state',
Lang.bind(this,
this._onStateChanged));
this._onStateChanged();
this._stateChangedId = this.app.connect('notify::state', Lang.bind(this,
function () {
this._updateRunningStyle();
}));
this._updateRunningStyle();
},
_onDestroy: function() {
@ -1588,7 +1589,7 @@ const AppIcon = new Lang.Class({
}
},
_onStateChanged: function() {
_updateRunningStyle: function() {
if (this.app.state != Shell.AppState.STOPPED)
this.actor.add_style_class_name('running');
else

View File

@ -106,6 +106,8 @@ const Main = imports.ui.main;
const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
const DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
const BACKGROUND_SCHEMA = 'org.gnome.desktop.background';
const PRIMARY_COLOR_KEY = 'primary-color';
const SECONDARY_COLOR_KEY = 'secondary-color';
@ -160,6 +162,7 @@ const BackgroundCache = new Lang.Class({
}));
GLib.Source.set_name_by_id(id, '[gnome-shell] params.onLoaded');
}
return;
}
let animation = new Animation({ filename: params.filename });
@ -452,6 +455,7 @@ const SystemBackground = new Lang.Class({
if (_systemBackground == null) {
_systemBackground = new Meta.Background({ meta_screen: global.screen });
_systemBackground.set_color(DEFAULT_BACKGROUND_COLOR);
_systemBackground.set_filename(filename, GDesktopEnums.BackgroundStyle.WALLPAPER);
}

View File

@ -2,6 +2,7 @@
const Clutter = imports.gi.Clutter;
const Gio = imports.gi.Gio;
const Gtk = imports.gi.Gtk;
const GLib = imports.gi.GLib;
const Lang = imports.lang;
const St = imports.gi.St;
@ -13,6 +14,7 @@ const Shell = imports.gi.Shell;
const MSECS_IN_DAY = 24 * 60 * 60 * 1000;
const SHOW_WEEKDATE_KEY = 'show-weekdate';
const ELLIPSIS_CHAR = '\u2026';
// alias to prevent xgettext from picking up strings translated in GTK+
const gtk30_ = Gettext_gtk30.gettext;
@ -58,19 +60,21 @@ function _getEndOfDay(date) {
return ret;
}
function _formatEventTime(event, clockFormat) {
function _formatEventTime(event, clockFormat, periodBegin, periodEnd) {
let ret;
if (event.allDay) {
let allDay = (event.allDay || (event.date <= periodBegin && event.end >= periodEnd));
if (allDay) {
/* Translators: Shown in calendar event list for all day events
* Keep it short, best if you can use less then 10 characters
*/
ret = C_("event list time", "All Day");
} else {
let date = event.date >= periodBegin ? event.date : event.end;
switch (clockFormat) {
case '24h':
/* Translators: Shown in calendar event list, if 24h format,
\u2236 is a ratio character, similar to : */
ret = event.date.toLocaleFormat(C_("event list time", "%H\u2236%M"));
ret = date.toLocaleFormat(C_("event list time", "%H\u2236%M"));
break;
default:
@ -79,7 +83,7 @@ function _formatEventTime(event, clockFormat) {
/* Translators: Shown in calendar event list, if 12h format,
\u2236 is a ratio character, similar to : and \u2009 is
a thin space */
ret = event.date.toLocaleFormat(C_("event list time", "%l\u2236%M\u2009%p"));
ret = date.toLocaleFormat(C_("event list time", "%l\u2236%M\u2009%p"));
break;
}
}
@ -248,12 +252,25 @@ const DBusEventSource = new Lang.Class({
this._initialized = false;
this._dbusProxy = new CalendarServer();
this._dbusProxy.init_async(GLib.PRIORITY_DEFAULT, null, Lang.bind(this, function(object, result) {
let loaded = false;
try {
this._dbusProxy.init_finish(result);
loaded = true;
} catch(e) {
if (e.matches(Gio.DBusError, Gio.DBusError.TIMED_OUT)) {
// Ignore timeouts and install signals as normal, because with high
// probability the service will appear later on, and we will get a
// NameOwnerChanged which will finish loading
//
// (But still _initialized to false, because the proxy does not know
// about the HasCalendars property and would cause an exception trying
// to read it)
} else {
log('Error loading calendars: ' + e.message);
return;
}
}
this._dbusProxy.connectSignal('Changed', Lang.bind(this, this._onChanged));
@ -268,9 +285,11 @@ const DBusEventSource = new Lang.Class({
this.emit('notify::has-calendars');
}));
this._initialized = true;
this._initialized = loaded;
if (loaded) {
this.emit('notify::has-calendars');
this._onNameAppeared();
}
}));
},
@ -292,6 +311,7 @@ const DBusEventSource = new Lang.Class({
},
_onNameAppeared: function(owner) {
this._initialized = true;
this._resetCache();
this._loadEvents(true);
},
@ -361,6 +381,12 @@ const DBusEventSource = new Lang.Class({
result.push(event);
}
}
result.sort(function(event1, event2) {
// sort events by end time on ending day
let d1 = event1.date < begin && event1.end <= end ? event1.end : event1.date;
let d2 = event2.date < begin && event2.end <= end ? event2.end : event2.date;
return d1.getTime() - d2.getTime();
});
return result;
},
@ -721,12 +747,18 @@ const EventsList = new Lang.Class({
this._eventSource.connect('changed', Lang.bind(this, this._update));
},
_addEvent: function(event, index, includeDayName) {
_addEvent: function(event, index, includeDayName, periodBegin, periodEnd) {
let eventBox = new St.BoxLayout();
eventBox.set_vertical(false);
let dayString;
if (includeDayName)
if (includeDayName) {
if (event.date >= periodBegin)
dayString = _getEventDayAbbreviation(event.date.getDay());
else
else /* show event end day if it began earlier */
dayString = _getEventDayAbbreviation(event.end.getDay());
} else {
dayString = '';
}
let dayLabel = new St.Label({ style_class: 'events-day-dayname',
text: dayString,
@ -738,17 +770,32 @@ const EventsList = new Lang.Class({
let rtl = this.actor.get_text_direction() == Clutter.TextDirection.RTL;
let layout = this.actor.layout_manager;
layout.attach(dayLabel, rtl ? 2 : 0, index, 1, 1);
eventBox.add_actor(dayLabel);
let clockFormat = this._desktopSettings.get_string(CLOCK_FORMAT_KEY);
let timeString = _formatEventTime(event, clockFormat);
let timeString = _formatEventTime(event, clockFormat, periodBegin, periodEnd);
let timeLabel = new St.Label({ style_class: 'events-day-time',
text: timeString,
y_align: Clutter.ActorAlign.START });
timeLabel.clutter_text.line_wrap = false;
timeLabel.clutter_text.ellipsize = false;
layout.attach(timeLabel, 1, index, 1, 1);
let preEllipsisLabel = new St.Label({ style_class: 'events-day-time-ellipses',
text: ELLIPSIS_CHAR,
y_align: Clutter.ActorAlign.START });
let postEllipsisLabel = new St.Label({ style_class: 'events-day-time-ellipses',
text: ELLIPSIS_CHAR,
y_align: Clutter.ActorAlign.START });
if (event.allDay || event.date >= periodBegin)
preEllipsisLabel.opacity = 0;
if (event.allDay || event.end <= periodEnd)
postEllipsisLabel.opacity = 0;
let timeLabelBoxLayout = new St.BoxLayout({ x_align: Clutter.ActorAlign.START });
timeLabelBoxLayout.add(preEllipsisLabel);
timeLabelBoxLayout.add(timeLabel);
timeLabelBoxLayout.add(postEllipsisLabel);
timeLabelBoxLayout.set_size(50, 1);
eventBox.add_actor(timeLabelBoxLayout);
let titleLabel = new St.Label({ style_class: 'events-day-task',
text: event.summary,
@ -756,30 +803,29 @@ const EventsList = new Lang.Class({
titleLabel.clutter_text.line_wrap = true;
titleLabel.clutter_text.ellipsize = false;
layout.attach(titleLabel, rtl ? 0 : 2, index, 1, 1);
eventBox.add_actor(titleLabel);
this._eventListBox.add_actor(eventBox);
},
_addPeriod: function(header, index, begin, end, includeDayName, showNothingScheduled) {
let events = this._eventSource.getEvents(begin, end);
_addPeriod: function(header, index, periodBegin, periodEnd, includeDayName, showNothingScheduled) {
let events = this._eventSource.getEvents(periodBegin, periodEnd);
if (events.length == 0 && !showNothingScheduled)
return index;
let label = new St.Label({ style_class: 'events-day-header', text: header });
let layout = this.actor.layout_manager;
layout.attach(label, 0, index, 3, 1);
this._eventListBox.add_actor(label);
index++;
for (let n = 0; n < events.length; n++) {
this._addEvent(events[n], index, includeDayName);
this._addEvent(events[n], index, includeDayName, periodBegin, periodEnd);
index++;
}
if (events.length == 0 && showNothingScheduled) {
let now = new Date();
/* Translators: Text to show if there are no events */
let nothingEvent = new CalendarEvent(now, now, _("Nothing Scheduled"), true);
this._addEvent(nothingEvent, index, false);
let nothingEvent = new CalendarEvent(periodBegin, periodBegin, _("Nothing Scheduled"), true);
this._addEvent(nothingEvent, index, false, periodBegin, periodEnd);
index++;
}
@ -787,8 +833,6 @@ const EventsList = new Lang.Class({
},
_showOtherDay: function(day) {
this.actor.destroy_all_children();
let dayBegin = _getBeginningOfDay(day);
let dayEnd = _getEndOfDay(day);
@ -804,7 +848,6 @@ const EventsList = new Lang.Class({
},
_showToday: function() {
this.actor.destroy_all_children();
let index = 0;
let now = new Date();
@ -849,6 +892,24 @@ const EventsList = new Lang.Class({
if (this._eventSource.isLoading)
return;
this.actor.destroy_all_children();
let layout = this.actor.layout_manager;
this._eventListContainer = new St.BoxLayout({ x_expand: true, y_expand: true });
this._eventListContainer.set_vertical(true);
this._eventListBox = new St.BoxLayout();
this._eventListBox.set_vertical(true);
let eventScrollView = new St.ScrollView({style_class: 'vfade',
hscrollbar_policy: Gtk.PolicyType.NEVER,
vscrollbar_policy: Gtk.PolicyType.AUTOMATIC});
eventScrollView.add_actor(this._eventListBox);
this._eventListContainer.add_actor(eventScrollView);
layout.attach(this._eventListContainer, 0, 0, 1, 1);
let today = new Date();
if (_sameDay (this._date, today)) {
this._showToday();

View File

@ -604,9 +604,15 @@ const NetworkAgent = new Lang.Class({
Name: 'NetworkAgent',
_init: function() {
try {
this._native = new Shell.NetworkAgent({ identifier: 'org.gnome.Shell.NetworkAgent',
capabilities: NMClient.SecretAgentCapabilities.VPN_HINTS
});
} catch(e) {
// Support older versions without NetworkAgent:capabilities
this._native = new Shell.NetworkAgent({ identifier: 'org.gnome.Shell.NetworkAgent'
});
}
this._dialogs = { };
this._vpnRequests = { };

View File

@ -59,7 +59,7 @@ const DateMenuButton = new Lang.Class({
// Fill up the first column
vbox = new St.BoxLayout({vertical: true});
vbox = new St.BoxLayout({vertical: true, x_expand: true, y_expand: true });
hbox.add(vbox);
// Date
@ -96,11 +96,11 @@ const DateMenuButton = new Lang.Class({
this._openCalendarItem = new PopupMenu.PopupMenuItem(_("Open Calendar"));
this._openCalendarItem.connect('activate', Lang.bind(this, this._onOpenCalendarActivate));
vbox.add(this._openCalendarItem.actor, {y_align: St.Align.END, expand: true, y_fill: false});
vbox.add(this._openCalendarItem.actor, {y_align: St.Align.END, expand: false, y_fill: false});
this._openClocksItem = new PopupMenu.PopupMenuItem(_("Open Clocks"));
this._openClocksItem.connect('activate', Lang.bind(this, this._onOpenClocksActivate));
vbox.add(this._openClocksItem.actor, {y_align: St.Align.END, expand: true, y_fill: false});
vbox.add(this._openClocksItem.actor, {y_align: St.Align.END, expand: false, y_fill: false});
Shell.AppSystem.get_default().connect('installed-changed',
Lang.bind(this, this._appInstalledChanged));
@ -147,7 +147,7 @@ const DateMenuButton = new Lang.Class({
let now = new Date();
return now.getYear() == date.getYear() &&
now.getMonth() == date.getMonth() &&
now.getDay() == date.getDay();
now.getDate() == date.getDate();
},
_appInstalledChanged: function() {

View File

@ -6,6 +6,8 @@ const Meta = imports.gi.Meta;
const Clutter = imports.gi.Clutter;
const St = imports.gi.St;
const Main = imports.ui.main;
const EDGE_THRESHOLD = 20;
const DRAG_DISTANCE = 80;
@ -13,9 +15,10 @@ const EdgeDragAction = new Lang.Class({
Name: 'EdgeDragAction',
Extends: Clutter.GestureAction,
_init : function(side) {
_init : function(side, allowedModes) {
this.parent();
this._side = side;
this._allowedModes = allowedModes;
this.set_n_touch_points(1);
global.display.connect('grab-op-begin', Lang.bind(this, function() {
@ -34,6 +37,9 @@ const EdgeDragAction = new Lang.Class({
if (this.get_n_current_points() == 0)
return false;
if (!(this._allowedModes & Main.keybindingMode))
return false;
let [x, y] = this.get_press_coords(0);
let monitorRect = this._getMonitorRect(x, y);

View File

@ -20,7 +20,6 @@ const Tweener = imports.ui.tweener;
const STARTUP_ANIMATION_TIME = 0.5;
const KEYBOARD_ANIMATION_TIME = 0.15;
const BACKGROUND_FADE_ANIMATION_TIME = 1.0;
const DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
// The message tray takes this much pressure
// in the pressure barrier at once to release it.
@ -160,10 +159,10 @@ const LayoutManager = new Lang.Class({
this._isPopupWindowVisible = false;
this._startingUp = true;
// Normally, the stage is always covered so Clutter doesn't need to clear
// it; however it becomes visible during the startup animation
// See the comment below for a longer explanation
global.stage.background_color = DEFAULT_BACKGROUND_COLOR;
// We don't want to paint the stage background color because either
// the SystemBackground we create or the MetaBackgroundActor inside
// global.window_group covers the entirety of the screen.
global.stage.no_clear_hint = true;
// Set up stage hierarchy to group all UI actors under one container.
this.uiGroup = new Shell.GenericContainer({ name: 'uiGroup' });
@ -591,10 +590,6 @@ const LayoutManager = new Lang.Class({
//
// When starting a normal user session, we want to grow it out of the middle
// of the screen.
//
// Usually, we don't want to paint the stage background color because the
// MetaBackgroundActor inside global.window_group covers the entirety of the
// screen. So, we set no_clear_hint at the end of the animation.
_prepareStartupAnimation: function() {
// During the initial transition, add a simple actor to block all events,
@ -675,10 +670,6 @@ const LayoutManager = new Lang.Class({
},
_startupAnimationComplete: function() {
// At this point, the UI group is covering everything, so
// we no longer need to clear the stage
global.stage.no_clear_hint = true;
this._coverPane.destroy();
this._coverPane = null;

View File

@ -1198,12 +1198,7 @@ const ZoomRegion = new Lang.Class({
// Add a background for when the magnified uiGroup is scrolled
// out of view (don't want to see desktop showing through).
this._background = new Clutter.Actor({ background_color: Main.DEFAULT_BACKGROUND_COLOR,
layout_manager: new Clutter.BinLayout(),
width: global.screen_width,
height: global.screen_height });
let noiseTexture = (new Background.SystemBackground()).actor;
this._background.add_actor(noiseTexture);
this._background = (new Background.SystemBackground()).actor;
mainGroup.add_actor(this._background);
// Clone the group that contains all of UI on the screen. This is the

View File

@ -40,8 +40,6 @@ const Magnifier = imports.ui.magnifier;
const XdndHandler = imports.ui.xdndHandler;
const Util = imports.misc.util;
const DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
const A11Y_SCHEMA = 'org.gnome.desktop.a11y.keyboard';
const STICKY_KEYS_ENABLE = 'stickykeys-enable';
const GNOMESHELL_STARTED_MESSAGE_ID = 'f3ea493c22934e26811cd62abe8e203a';

View File

@ -1951,7 +1951,9 @@ const MessageTray = new Lang.Class({
this._messageTrayMenuButton.actor.connect('key-press-event',
Lang.bind(this, this._onTrayButtonKeyPress));
let gesture = new EdgeDragAction.EdgeDragAction(St.Side.BOTTOM);
let gesture = new EdgeDragAction.EdgeDragAction(St.Side.BOTTOM,
Shell.KeyBindingMode.NORMAL |
Shell.KeyBindingMode.OVERVIEW);
gesture.connect('activated', Lang.bind(this, this.toggle));
global.stage.add_action(gesture);
},
@ -2432,9 +2434,23 @@ const MessageTray = new Lang.Class({
if (shouldShowNotification && nextNotification) {
let limited = this._busy || Main.layoutManager.bottomMonitor.inFullscreen;
let showNextNotification = (!limited || nextNotification.forFeedback || nextNotification.urgency == Urgency.CRITICAL);
if (showNextNotification)
if (showNextNotification) {
let len = this._notificationQueue.length;
if (len > 1) {
this._notificationQueue.length = 0;
let source = new SystemNotificationSource();
this.add(source);
let notification = new Notification(source, ngettext("%d new message", "%d new messages", len).format(len));
notification.setTransient(true);
notification.connect('clicked', Lang.bind(this, function() {
this.openTray();
}));
source.notify(notification);
} else {
this._showNotification();
}
}
}
} else if (this._notificationState == State.SHOWN) {
let expired = (this._userActiveWhileNotificationShown &&
this._notificationTimeoutId == 0 &&

View File

@ -1866,7 +1866,7 @@ const NMApplet = new Lang.Class({
_connectionRemoved: function(connection) {
let pos = this._connections.indexOf(connection);
if (pos != -1)
this._connections.splice(connection, 1);
this._connections.splice(pos, 1);
let section = connection._section;

View File

@ -65,7 +65,8 @@ const ShowOverviewAction = new Lang.Class({
},
vfunc_gesture_prepare : function(action, actor) {
return this.get_n_current_points() == this.get_n_touch_points();
return Main.keybindingMode == Shell.KeyBindingMode.NORMAL &&
this.get_n_current_points() == this.get_n_touch_points();
},
_getBoundingRect : function(motion) {
@ -193,8 +194,10 @@ const ViewSelector = new Lang.Class({
// the windows to animate, but now we no longer want to
// show it given that we are now on the apps page or
// search page.
if (this._activePage != this._workspacesPage)
if (this._activePage != this._workspacesPage) {
this._workspacesPage.opacity = 0;
this._workspacesPage.hide();
}
}));
Main.wm.addKeybinding('toggle-application-view',
@ -213,7 +216,8 @@ const ViewSelector = new Lang.Class({
let gesture;
gesture = new EdgeDragAction.EdgeDragAction(St.Side.LEFT);
gesture = new EdgeDragAction.EdgeDragAction(St.Side.LEFT,
Shell.KeyBindingMode.NORMAL);
gesture.connect('activated', Lang.bind(this, function() {
if (Main.overview.visible)
Main.overview.hide();

View File

@ -478,7 +478,9 @@ const WorkspaceSwitchAction = new Lang.Class({
},
vfunc_gesture_prepare : function(action, actor) {
return this.get_n_current_points() == this.get_n_touch_points();
let allowedModes = Shell.KeyBindingMode.NORMAL | Shell.KeyBindingMode.OVERVIEW;
return this.get_n_current_points() == this.get_n_touch_points() &&
(allowedModes & Main.keybindingMode);
},
vfunc_gesture_end : function(action, actor) {
@ -526,7 +528,7 @@ const AppSwitchAction = new Lang.Class({
},
vfunc_gesture_prepare : function(action, actor) {
if (Main.overview.visible) {
if (Main.keybindingMode != Shell.KeyBindingMode.NORMAL) {
this.cancel();
return false;
}

View File

@ -176,18 +176,54 @@ static void
calendar_sources_init (CalendarSources *sources)
{
GError *error = NULL;
GDBusConnection *session_bus;
GVariant *result;
sources->priv = CALENDAR_SOURCES_GET_PRIVATE (sources);
/* XXX Not sure what to do if this fails.
* Should this class implement GInitable or pass the
* registry in as a G_PARAM_CONSTRUCT_ONLY property? */
/* WORKAROUND: the hardcoded timeout for e_source_registry_new_sync()
(and other library calls that eventually call g_dbus_proxy_new[_sync]())
is 25 seconds. This has been shown to be too small for
evolution-source-registry in certain cases (slow disk, concurrent IO,
many configured sources), so we first ensure that the service
starts with a manual call and a higher timeout.
HACK: every time the DBus API is bumped in e-d-s we need
to update this!
*/
session_bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
if (session_bus == NULL)
{
g_error ("Failed to connect to the session bus: %s", error->message);
}
result = g_dbus_connection_call_sync (session_bus, "org.freedesktop.DBus",
"/", "org.freedesktop.DBus",
"StartServiceByName",
g_variant_new ("(su)",
"org.gnome.evolution.dataserver.Sources3",
0),
NULL,
G_DBUS_CALL_FLAGS_NONE,
60 * 1000,
NULL, &error);
if (result != NULL)
{
g_variant_unref (result);
sources->priv->registry = e_source_registry_new_sync (NULL, &error);
}
if (error != NULL)
{
g_error ("%s: %s", G_STRFUNC, error->message);
/* Any error is fatal, but we don't want to crash gnome-shell-calendar-server
because of e-d-s problems. So just exit here.
*/
g_warning ("Failed to start evolution-source-registry: %s", error->message);
exit(EXIT_FAILURE);
}
g_object_unref (session_bus);
sources->priv->source_added_id = g_signal_connect (sources->priv->registry,
"source-added",
G_CALLBACK (calendar_sources_registry_source_changed_cb),