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.
This commit is contained in:
parent
c7ec84eb33
commit
703b21cef0
@ -120,7 +120,7 @@ AltTabPopup.prototype = {
|
||||
|
||||
show : function(backward) {
|
||||
let tracker = Shell.WindowTracker.get_default();
|
||||
let apps = tracker.get_running_apps ("");
|
||||
let apps = tracker.get_running_apps ('');
|
||||
|
||||
if (!apps.length)
|
||||
return false;
|
||||
@ -420,7 +420,7 @@ AltTabPopup.prototype = {
|
||||
Tweener.addTween(this._thumbnails.actor,
|
||||
{ opacity: 0,
|
||||
time: THUMBNAIL_FADE_TIME,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: function() { this.destroy(); }
|
||||
});
|
||||
this._thumbnails = null;
|
||||
@ -437,7 +437,7 @@ AltTabPopup.prototype = {
|
||||
Tweener.addTween(this._thumbnails.actor,
|
||||
{ opacity: 255,
|
||||
time: THUMBNAIL_FADE_TIME,
|
||||
transition: "easeOutQuad"
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
}
|
||||
};
|
||||
@ -761,7 +761,7 @@ function AppIcon(app) {
|
||||
AppIcon.prototype = {
|
||||
_init: function(app) {
|
||||
this.app = app;
|
||||
this.actor = new St.BoxLayout({ style_class: "alt-tab-app",
|
||||
this.actor = new St.BoxLayout({ style_class: 'alt-tab-app',
|
||||
vertical: true });
|
||||
this.icon = null;
|
||||
this._iconBin = new St.Bin();
|
||||
@ -948,7 +948,7 @@ ThumbnailList.prototype = {
|
||||
|
||||
let activeWorkspace = global.screen.get_active_workspace();
|
||||
|
||||
// We fake the value of "separatorAdded" when the app has no window
|
||||
// We fake the value of 'separatorAdded' when the app has no window
|
||||
// on the current workspace, to avoid displaying a useless separator in
|
||||
// that case.
|
||||
let separatorAdded = windows.length == 0 || windows[0].get_workspace() != activeWorkspace;
|
||||
@ -964,10 +964,10 @@ ThumbnailList.prototype = {
|
||||
separatorAdded = true;
|
||||
}
|
||||
|
||||
let box = new St.BoxLayout({ style_class: "thumbnail-box",
|
||||
let box = new St.BoxLayout({ style_class: 'thumbnail-box',
|
||||
vertical: true });
|
||||
|
||||
let bin = new St.Bin({ style_class: "thumbnail" });
|
||||
let bin = new St.Bin({ style_class: 'thumbnail' });
|
||||
|
||||
box.add_actor(bin);
|
||||
this._thumbnailBins.push(bin);
|
||||
|
@ -323,7 +323,7 @@ AppSearchProvider.prototype = {
|
||||
},
|
||||
|
||||
expandSearch: function(terms) {
|
||||
log("TODO expand search");
|
||||
log('TODO expand search');
|
||||
}
|
||||
};
|
||||
|
||||
@ -713,7 +713,7 @@ AppIconMenu.prototype = {
|
||||
},
|
||||
|
||||
_appendSeparator: function () {
|
||||
let bin = new St.Bin({ style_class: "app-well-menu-separator" });
|
||||
let bin = new St.Bin({ style_class: 'app-well-menu-separator' });
|
||||
this._windowContainer.add_actor(bin);
|
||||
},
|
||||
|
||||
@ -850,7 +850,7 @@ function WellGrid() {
|
||||
|
||||
WellGrid.prototype = {
|
||||
_init: function() {
|
||||
this.actor = new St.BoxLayout({ name: "dashAppWell", vertical: true });
|
||||
this.actor = new St.BoxLayout({ name: 'dashAppWell', vertical: true });
|
||||
// Pulled from CSS, but hardcode some defaults here
|
||||
this._spacing = 0;
|
||||
this._item_size = 48;
|
||||
@ -1012,7 +1012,7 @@ AppWell.prototype = {
|
||||
let favorites = AppFavorites.getAppFavorites().getFavoriteMap();
|
||||
|
||||
/* hardcode here pending some design about how exactly desktop contexts behave */
|
||||
let contextId = "";
|
||||
let contextId = '';
|
||||
|
||||
let running = this._tracker.get_running_apps(contextId);
|
||||
let runningIds = this._appIdListToHash(running);
|
||||
|
@ -26,7 +26,7 @@ function BoxPointer(side, sourceActor, binProperties) {
|
||||
BoxPointer.prototype = {
|
||||
_init: function(arrowSide, sourceActor, binProperties) {
|
||||
if (arrowSide != St.Side.TOP)
|
||||
throw new Error("not implemented");
|
||||
throw new Error('Not implemented');
|
||||
this._arrowSide = arrowSide;
|
||||
this._sourceActor = sourceActor;
|
||||
this._arrowOrigin = 0;
|
||||
|
@ -24,27 +24,27 @@ Calendar.prototype = {
|
||||
// GTK+ by preference uses nl_langinfo (NL_TIME_FIRST_WEEKDAY). We probably
|
||||
// should add a C function so we can do the full handling.
|
||||
this._weekStart = NaN;
|
||||
let weekStartString = Gettext_gtk20.gettext("calendar:week_start:0");
|
||||
if (weekStartString.indexOf("calendar:week_start:") == 0) {
|
||||
let weekStartString = Gettext_gtk20.gettext('calendar:week_start:0');
|
||||
if (weekStartString.indexOf('calendar:week_start:') == 0) {
|
||||
this._weekStart = parseInt(weekStartString.substring(20));
|
||||
}
|
||||
|
||||
if (isNaN(this._weekStart) || this._weekStart < 0 || this._weekStart > 6) {
|
||||
log("Translation of 'calendar:week_start:0' in GTK+ is not correct");
|
||||
log('Translation of "calendar:week_start:0" in GTK+ is not correct');
|
||||
this._weekStart = 0;
|
||||
}
|
||||
|
||||
// Find the ordering for month/year in the calendar heading
|
||||
switch (Gettext_gtk20.gettext("calendar:MY")) {
|
||||
case "calendar:MY":
|
||||
this._headerFormat = "%B %Y";
|
||||
switch (Gettext_gtk20.gettext('calendar:MY')) {
|
||||
case 'calendar:MY':
|
||||
this._headerFormat = '%B %Y';
|
||||
break;
|
||||
case "calendar:YM":
|
||||
this._headerFormat = "%Y %B";
|
||||
case 'calendar:YM':
|
||||
this._headerFormat = '%Y %B';
|
||||
break;
|
||||
default:
|
||||
log("Translation of 'calendar:MY' in GTK+ is not correct");
|
||||
this._headerFormat = "%B %Y";
|
||||
log('Translation of "calendar:MY" in GTK+ is not correct');
|
||||
this._headerFormat = '%B %Y';
|
||||
break;
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ Calendar.prototype = {
|
||||
this.date = new Date();
|
||||
|
||||
this.actor = new St.Table({ homogeneous: false,
|
||||
style_class: "calendar",
|
||||
style_class: 'calendar',
|
||||
reactive: true });
|
||||
|
||||
this.actor.connect('scroll-event',
|
||||
@ -63,21 +63,21 @@ Calendar.prototype = {
|
||||
this.actor.add(this._topBox,
|
||||
{ row: 0, col: 0, col_span: 7 });
|
||||
|
||||
let [backlabel, forwardlabel] = ["<", ">"];
|
||||
let [backlabel, forwardlabel] = ['<', '>'];
|
||||
if (St.Widget.get_default_direction () == St.TextDirection.RTL) {
|
||||
[backlabel, forwardlabel] = [forwardlabel, backlabel];
|
||||
}
|
||||
|
||||
let back = new St.Button({ label: backlabel, style_class: 'calendar-change-month' });
|
||||
this._topBox.add(back);
|
||||
back.connect("clicked", Lang.bind(this, this._prevMonth));
|
||||
back.connect('clicked', Lang.bind(this, this._prevMonth));
|
||||
|
||||
this._dateLabel = new St.Label();
|
||||
this._topBox.add(this._dateLabel, { expand: true, x_fill: false, x_align: St.Align.MIDDLE });
|
||||
|
||||
let forward = new St.Button({ label: forwardlabel, style_class: 'calendar-change-month' });
|
||||
this._topBox.add(forward);
|
||||
forward.connect("clicked", Lang.bind(this, this._nextMonth));
|
||||
forward.connect('clicked', Lang.bind(this, this._nextMonth));
|
||||
|
||||
// We need to figure out the abbreviated localized names for the days of the week;
|
||||
// we do this by just getting the next 7 days starting from right now and then putting
|
||||
@ -86,7 +86,7 @@ Calendar.prototype = {
|
||||
iter.setSeconds(0); // Leap second protection. Hah!
|
||||
iter.setHours(12);
|
||||
for (let i = 0; i < 7; i++) {
|
||||
this.actor.add(new St.Label({ text: iter.toLocaleFormat("%a") }),
|
||||
this.actor.add(new St.Label({ text: iter.toLocaleFormat('%a') }),
|
||||
{ row: 1,
|
||||
col: (7 + iter.getDay() - this._weekStart) % 7,
|
||||
x_fill: false, x_align: St.Align.END });
|
||||
@ -161,11 +161,11 @@ Calendar.prototype = {
|
||||
while (true) {
|
||||
let label = new St.Label({ text: iter.getDate().toString() });
|
||||
if (_sameDay(now, iter))
|
||||
label.style_class = "calendar-day calendar-today";
|
||||
label.style_class = 'calendar-day calendar-today';
|
||||
else if (iter.getMonth() != this.date.getMonth())
|
||||
label.style_class = "calendar-day calendar-other-month-day";
|
||||
label.style_class = 'calendar-day calendar-other-month-day';
|
||||
else
|
||||
label.style_class = "calendar-day";
|
||||
label.style_class = 'calendar-day';
|
||||
this.actor.add(label,
|
||||
{ row: row, col: (7 + iter.getDay() - this._weekStart) % 7,
|
||||
x_fill: false, x_align: St.Align.END });
|
||||
|
@ -249,7 +249,7 @@ Chrome.prototype = {
|
||||
// The chrome layer should be visible unless there is a window
|
||||
// with layer FULLSCREEN, or a window with layer
|
||||
// OVERRIDE_REDIRECT that covers the whole screen.
|
||||
// ("override_redirect" is not actually a layer above all
|
||||
// ('override_redirect' is not actually a layer above all
|
||||
// other windows, but this seems to be how mutter treats it
|
||||
// currently...) If we wanted to be extra clever, we could
|
||||
// figure out when an OVERRIDE_REDIRECT window was trying to
|
||||
|
@ -22,8 +22,8 @@ const Search = imports.ui.search;
|
||||
// 25 search results (per result type) should be enough for everyone
|
||||
const MAX_RENDERED_SEARCH_RESULTS = 25;
|
||||
|
||||
const DOCS = "docs";
|
||||
const PLACES = "places";
|
||||
const DOCS = 'docs';
|
||||
const PLACES = 'places';
|
||||
|
||||
/*
|
||||
* Returns the index in an array of a given length that is obtained
|
||||
@ -54,7 +54,7 @@ Pane.prototype = {
|
||||
_init: function () {
|
||||
this._open = false;
|
||||
|
||||
this.actor = new St.BoxLayout({ style_class: "dash-pane",
|
||||
this.actor = new St.BoxLayout({ style_class: 'dash-pane',
|
||||
vertical: true,
|
||||
reactive: true });
|
||||
this.actor.connect('button-press-event', Lang.bind(this, function (a, e) {
|
||||
@ -185,7 +185,7 @@ function SearchEntry() {
|
||||
|
||||
SearchEntry.prototype = {
|
||||
_init : function() {
|
||||
this.actor = new St.Entry({ name: "searchEntry",
|
||||
this.actor = new St.Entry({ name: 'searchEntry',
|
||||
hint_text: _("Find") });
|
||||
this.entry = this.actor.clutter_text;
|
||||
|
||||
@ -193,7 +193,7 @@ SearchEntry.prototype = {
|
||||
function() {
|
||||
if (this.isActive())
|
||||
this.actor.set_secondary_icon_from_file(global.imagedir +
|
||||
"close-black.svg");
|
||||
'close-black.svg');
|
||||
else
|
||||
this.actor.set_secondary_icon_from_file(null);
|
||||
}));
|
||||
@ -530,7 +530,7 @@ SearchResults.prototype = {
|
||||
let meta = this._metaForProvider(provider);
|
||||
meta.actor.show();
|
||||
meta.resultDisplay.renderResults(providerResults, terms);
|
||||
meta.count.set_text(""+providerResults.length);
|
||||
meta.count.set_text('' + providerResults.length);
|
||||
}
|
||||
|
||||
this.selectDown(false);
|
||||
@ -608,11 +608,11 @@ function MoreLink() {
|
||||
|
||||
MoreLink.prototype = {
|
||||
_init : function () {
|
||||
this.actor = new St.BoxLayout({ style_class: "more-link",
|
||||
this.actor = new St.BoxLayout({ style_class: 'more-link',
|
||||
reactive: true });
|
||||
this.pane = null;
|
||||
|
||||
this._expander = new St.Bin({ style_class: "more-link-expander" });
|
||||
this._expander = new St.Bin({ style_class: 'more-link-expander' });
|
||||
this.actor.add(this._expander, { expand: true, y_fill: false });
|
||||
},
|
||||
|
||||
@ -644,9 +644,9 @@ function BackLink() {
|
||||
|
||||
BackLink.prototype = {
|
||||
_init : function () {
|
||||
this.actor = new St.Button({ style_class: "section-header-back",
|
||||
this.actor = new St.Button({ style_class: 'section-header-back',
|
||||
reactive: true });
|
||||
this.actor.set_child(new St.Bin({ style_class: "section-header-back-image" }));
|
||||
this.actor.set_child(new St.Bin({ style_class: 'section-header-back-image' }));
|
||||
}
|
||||
};
|
||||
|
||||
@ -656,12 +656,12 @@ function SectionHeader(title, suppressBrowse) {
|
||||
|
||||
SectionHeader.prototype = {
|
||||
_init : function (title, suppressBrowse) {
|
||||
this.actor = new St.Bin({ style_class: "section-header",
|
||||
this.actor = new St.Bin({ style_class: 'section-header',
|
||||
x_align: St.Align.START,
|
||||
x_fill: true,
|
||||
y_fill: true,
|
||||
reactive: !suppressBrowse });
|
||||
this._innerBox = new St.BoxLayout({ style_class: "section-header-inner" });
|
||||
this._innerBox = new St.BoxLayout({ style_class: 'section-header-inner' });
|
||||
this.actor.set_child(this._innerBox);
|
||||
|
||||
this.backLink = new BackLink();
|
||||
@ -671,12 +671,12 @@ SectionHeader.prototype = {
|
||||
this.emit('back-link-activated');
|
||||
}));
|
||||
|
||||
let textBox = new St.BoxLayout({ style_class: "section-text-content" });
|
||||
this.text = new St.Label({ style_class: "section-title",
|
||||
let textBox = new St.BoxLayout({ style_class: 'section-text-content' });
|
||||
this.text = new St.Label({ style_class: 'section-title',
|
||||
text: title });
|
||||
textBox.add(this.text, { x_align: St.Align.START });
|
||||
|
||||
this.countText = new St.Label({ style_class: "section-count" });
|
||||
this.countText = new St.Label({ style_class: 'section-count' });
|
||||
textBox.add(this.countText, { expand: true, x_fill: false, x_align: St.Align.END });
|
||||
this.countText.hide();
|
||||
|
||||
@ -712,7 +712,7 @@ SectionHeader.prototype = {
|
||||
},
|
||||
|
||||
setCountText : function(countText) {
|
||||
if (countText == "") {
|
||||
if (countText == '') {
|
||||
this.countText.hide();
|
||||
} else {
|
||||
this.countText.show();
|
||||
@ -729,14 +729,14 @@ function SearchSectionHeader(title, onClick) {
|
||||
|
||||
SearchSectionHeader.prototype = {
|
||||
_init : function(title, onClick) {
|
||||
this.actor = new St.Button({ style_class: "dash-search-section-header",
|
||||
this.actor = new St.Button({ style_class: 'dash-search-section-header',
|
||||
x_fill: true,
|
||||
y_fill: true });
|
||||
let box = new St.BoxLayout();
|
||||
this.actor.set_child(box);
|
||||
let titleText = new St.Label({ style_class: "dash-search-section-title",
|
||||
let titleText = new St.Label({ style_class: 'dash-search-section-title',
|
||||
text: title });
|
||||
this.countText = new St.Label({ style_class: "dash-search-section-count" });
|
||||
this.countText = new St.Label({ style_class: 'dash-search-section-count' });
|
||||
|
||||
box.add(titleText);
|
||||
box.add(this.countText, { expand: true, x_fill: false, x_align: St.Align.END });
|
||||
@ -776,14 +776,14 @@ Dash.prototype = {
|
||||
// of the Group actor ends up including the width of its hidden children, so we were getting a reactive object as
|
||||
// wide as the details pane that was blocking the clicks to the workspaces underneath it even when the details pane
|
||||
// was actually hidden.
|
||||
this.actor = new St.BoxLayout({ name: "dash",
|
||||
this.actor = new St.BoxLayout({ name: 'dash',
|
||||
vertical: true,
|
||||
reactive: true });
|
||||
|
||||
// The searchArea just holds the entry
|
||||
this.searchArea = new St.BoxLayout({ name: "dashSearchArea",
|
||||
this.searchArea = new St.BoxLayout({ name: 'dashSearchArea',
|
||||
vertical: true });
|
||||
this.sectionArea = new St.BoxLayout({ name: "dashSections",
|
||||
this.sectionArea = new St.BoxLayout({ name: 'dashSections',
|
||||
vertical: true });
|
||||
|
||||
this.actor.add(this.searchArea);
|
||||
|
@ -254,7 +254,7 @@ _Draggable.prototype = {
|
||||
{ scale_x: scale * origScale,
|
||||
scale_y: scale * origScale,
|
||||
time: SCALE_ANIMATION_TIME,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
onUpdate: function() {
|
||||
let currentScale = this._dragActor.scale_x / origScale;
|
||||
this._dragOffsetX = currentScale * origDragOffsetX;
|
||||
@ -368,7 +368,7 @@ _Draggable.prototype = {
|
||||
scale_y: this._snapBackScale,
|
||||
opacity: this._dragOrigOpacity,
|
||||
time: SNAP_BACK_ANIMATION_TIME,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: this._onSnapBackComplete,
|
||||
onCompleteScope: this,
|
||||
onCompleteParams: [this._dragActor, eventTime]
|
||||
|
@ -41,7 +41,7 @@ DocDisplayItem.prototype = {
|
||||
GenericDisplay.GenericDisplayItem.prototype._init.call(this);
|
||||
this._docInfo = docInfo;
|
||||
|
||||
this._setItemInfo(docInfo.name, "");
|
||||
this._setItemInfo(docInfo.name, '');
|
||||
|
||||
this._timeoutTime = -1;
|
||||
this._resetTimeDisplay(currentSecs);
|
||||
@ -80,7 +80,7 @@ DocDisplayItem.prototype = {
|
||||
// Creates and returns a large preview icon, but only if this._docInfo is an image file
|
||||
// and we were able to generate a pixbuf from it successfully.
|
||||
_createLargePreviewIcon : function() {
|
||||
if (this._docInfo.mimeType == null || this._docInfo.mimeType.indexOf("image/") != 0)
|
||||
if (this._docInfo.mimeType == null || this._docInfo.mimeType.indexOf('image/') != 0)
|
||||
return null;
|
||||
|
||||
try {
|
||||
@ -513,6 +513,6 @@ DocSearchProvider.prototype = {
|
||||
},
|
||||
|
||||
expandSearch: function(terms) {
|
||||
log("TODO expand docs search");
|
||||
log('TODO expand docs search');
|
||||
}
|
||||
};
|
||||
|
@ -36,7 +36,7 @@ function init() {
|
||||
String.prototype.format = Format.format;
|
||||
|
||||
// Set the default direction for St widgets (this needs to be done before any use of St)
|
||||
if (Gettext_gtk20.gettext("default:LTR") == "default:RTL") {
|
||||
if (Gettext_gtk20.gettext('default:LTR') == 'default:RTL') {
|
||||
St.Widget.set_default_direction(St.TextDirection.RTL);
|
||||
}
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ function init() {
|
||||
try {
|
||||
userExtensionsDir.make_directory_with_parents(null);
|
||||
} catch (e) {
|
||||
global.logError(""+e);
|
||||
global.logError('' + e);
|
||||
}
|
||||
|
||||
disabledExtensions = Shell.GConf.get_default().get_string_list('disabled_extensions');
|
||||
|
@ -34,7 +34,7 @@ function GenericDisplayItem() {
|
||||
|
||||
GenericDisplayItem.prototype = {
|
||||
_init: function() {
|
||||
this.actor = new St.BoxLayout({ style_class: "generic-display-item",
|
||||
this.actor = new St.BoxLayout({ style_class: 'generic-display-item',
|
||||
reactive: true });
|
||||
|
||||
this.actor._delegate = this;
|
||||
@ -144,7 +144,7 @@ GenericDisplayItem.prototype = {
|
||||
|
||||
// Performes an action associated with launching this item, such as opening a file or an application.
|
||||
launch: function() {
|
||||
throw new Error("Not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
//// Protected methods ////
|
||||
@ -176,12 +176,12 @@ GenericDisplayItem.prototype = {
|
||||
this._icon = this._createIcon();
|
||||
this._iconBin.set_child(this._icon);
|
||||
|
||||
this._name = new St.Label({ style_class: "generic-display-item-name",
|
||||
this._name = new St.Label({ style_class: 'generic-display-item-name',
|
||||
text: nameText });
|
||||
this._infoText.add(this._name);
|
||||
|
||||
this._description = new St.Label({ style_class: "generic-display-item-description",
|
||||
text: descriptionText ? descriptionText : "" });
|
||||
this._description = new St.Label({ style_class: 'generic-display-item-description',
|
||||
text: descriptionText ? descriptionText : '' });
|
||||
this._infoText.add(this._description);
|
||||
},
|
||||
|
||||
@ -208,12 +208,12 @@ GenericDisplayItem.prototype = {
|
||||
|
||||
// Returns an icon for the item.
|
||||
_createIcon: function() {
|
||||
throw new Error("Not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
// Returns a preview icon for the item.
|
||||
_createPreviewIcon: function() {
|
||||
throw new Error("Not implemented");
|
||||
throw new Error('Not implemented');
|
||||
}
|
||||
|
||||
//// Private methods ////
|
||||
@ -356,7 +356,7 @@ GenericDisplay.prototype = {
|
||||
// TODO: figure out why this._list.displayedCount is returning a
|
||||
// positive number when this._mathedItems.length is 0
|
||||
// This can be triggered if a search string is entered for which there are no matches.
|
||||
// log("this._mathedItems.length: " + this._matchedItems.length + " this._list.displayedCount " + this._list.displayedCount);
|
||||
// log('this._mathedItems.length: ' + this._matchedItems.length + ' this._list.displayedCount ' + this._list.displayedCount);
|
||||
return this._matchedItemKeys.length > 0;
|
||||
},
|
||||
|
||||
@ -402,7 +402,7 @@ GenericDisplay.prototype = {
|
||||
// and adds it to the list of displayed items, but does not yet display it.
|
||||
_addDisplayItem : function(itemId) {
|
||||
if (this._displayedItems.hasOwnProperty(itemId)) {
|
||||
log("Tried adding a display item for " + itemId + ", but an item with this item id is already among displayed items.");
|
||||
log('Tried adding a display item for ' + itemId + ', but an item with this item id is already among displayed items.');
|
||||
return;
|
||||
}
|
||||
|
||||
@ -461,7 +461,7 @@ GenericDisplay.prototype = {
|
||||
// Return true if there's an active search or other constraint
|
||||
// on the list
|
||||
_filterActive: function() {
|
||||
return this._search != "";
|
||||
return this._search != '';
|
||||
},
|
||||
|
||||
// Called when we are resetting state
|
||||
@ -584,13 +584,13 @@ GenericDisplay.prototype = {
|
||||
// Implementation should return %true if we are up to date, and %false
|
||||
// if a full reload occurred.
|
||||
_refreshCache: function() {
|
||||
throw new Error("Not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
// Sets the list of the displayed items based on the default sorting order.
|
||||
// The default sorting order is specific to each implementing class.
|
||||
_setDefaultList: function() {
|
||||
throw new Error("Not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
// Compares items associated with the item ids based on the order in which the
|
||||
@ -598,18 +598,18 @@ GenericDisplay.prototype = {
|
||||
// Intended to be used as a compareFunction for array.sort().
|
||||
// Returns an integer value indicating the result of the comparison.
|
||||
_compareItems: function(itemIdA, itemIdB) {
|
||||
throw new Error("Not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
// Checks if the item info can be a match for the search string.
|
||||
// Returns a boolean flag indicating if that's the case.
|
||||
_isInfoMatching: function(itemInfo, search) {
|
||||
throw new Error("Not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
// Creates a display item based on itemInfo.
|
||||
_createDisplayItem: function(itemInfo) {
|
||||
throw new Error("Not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
//// Private methods ////
|
||||
|
@ -17,22 +17,22 @@ const Tweener = imports.ui.tweener;
|
||||
const Main = imports.ui.main;
|
||||
|
||||
/* Imports...feel free to add here as needed */
|
||||
var commandHeader = "const Clutter = imports.gi.Clutter; " +
|
||||
"const GLib = imports.gi.GLib; " +
|
||||
"const Gtk = imports.gi.Gtk; " +
|
||||
"const Mainloop = imports.mainloop; " +
|
||||
"const Meta = imports.gi.Meta; " +
|
||||
"const Shell = imports.gi.Shell; " +
|
||||
"const Main = imports.ui.main; " +
|
||||
"const Lang = imports.lang; " +
|
||||
"const Tweener = imports.ui.tweener; " +
|
||||
var commandHeader = 'const Clutter = imports.gi.Clutter; ' +
|
||||
'const GLib = imports.gi.GLib; ' +
|
||||
'const Gtk = imports.gi.Gtk; ' +
|
||||
'const Mainloop = imports.mainloop; ' +
|
||||
'const Meta = imports.gi.Meta; ' +
|
||||
'const Shell = imports.gi.Shell; ' +
|
||||
'const Main = imports.ui.main; ' +
|
||||
'const Lang = imports.lang; ' +
|
||||
'const Tweener = imports.ui.tweener; ' +
|
||||
/* Utility functions...we should probably be able to use these
|
||||
* in the shell core code too. */
|
||||
"const stage = global.stage; " +
|
||||
"const color = function(pixel) { let c= new Clutter.Color(); c.from_pixel(pixel); return c; }; " +
|
||||
'const stage = global.stage; ' +
|
||||
'const color = function(pixel) { let c= new Clutter.Color(); c.from_pixel(pixel); return c; }; ' +
|
||||
/* Special lookingGlass functions */
|
||||
"const it = Main.lookingGlass.getIt(); " +
|
||||
"const r = Lang.bind(Main.lookingGlass, Main.lookingGlass.getResult); ";
|
||||
'const it = Main.lookingGlass.getIt(); ' +
|
||||
'const r = Lang.bind(Main.lookingGlass, Main.lookingGlass.getResult); ';
|
||||
|
||||
function Notebook() {
|
||||
this._init();
|
||||
@ -42,14 +42,14 @@ Notebook.prototype = {
|
||||
_init: function() {
|
||||
this.actor = new St.BoxLayout({ vertical: true });
|
||||
|
||||
this.tabControls = new St.BoxLayout({ style_class: "labels" });
|
||||
this.tabControls = new St.BoxLayout({ style_class: 'labels' });
|
||||
|
||||
this._selectedIndex = -1;
|
||||
this._tabs = [];
|
||||
},
|
||||
|
||||
appendPage: function(name, child) {
|
||||
let labelBox = new St.BoxLayout({ style_class: "notebook-tab" });
|
||||
let labelBox = new St.BoxLayout({ style_class: 'notebook-tab' });
|
||||
let label = new St.Button({ label: name });
|
||||
label.connect('clicked', Lang.bind(this, function () {
|
||||
this.selectChild(child);
|
||||
@ -153,13 +153,13 @@ Result.prototype = {
|
||||
cmdTxt.ellipsize = Pango.EllipsizeMode.END;
|
||||
|
||||
this.actor.add(cmdTxt);
|
||||
let resultTxt = new St.Label({ text: "r(" + index + ") = " + o });
|
||||
let resultTxt = new St.Label({ text: 'r(' + index + ') = ' + o });
|
||||
resultTxt.ellipsize = Pango.EllipsizeMode.END;
|
||||
|
||||
this.actor.add(resultTxt);
|
||||
let line = new Clutter.Rectangle({ name: "Separator",
|
||||
let line = new Clutter.Rectangle({ name: 'Separator',
|
||||
height: 1 });
|
||||
let padBin = new St.Bin({ name: "Separator", x_fill: true, y_fill: true });
|
||||
let padBin = new St.Bin({ name: 'Separator', x_fill: true, y_fill: true });
|
||||
padBin.add_actor(line);
|
||||
this.actor.add(padBin);
|
||||
}
|
||||
@ -171,7 +171,7 @@ function WindowList() {
|
||||
|
||||
WindowList.prototype = {
|
||||
_init : function () {
|
||||
this.actor = new St.BoxLayout({ name: "Windows", vertical: true, style: "spacing: 8px" });
|
||||
this.actor = new St.BoxLayout({ name: 'Windows', vertical: true, style: 'spacing: 8px' });
|
||||
let display = global.screen.get_display();
|
||||
let tracker = Shell.WindowTracker.get_default();
|
||||
this._updateId = Main.initializeDeferredWork(this.actor, Lang.bind(this, this._updateWindowList));
|
||||
@ -193,16 +193,16 @@ WindowList.prototype = {
|
||||
box.add(label.actor);
|
||||
let propsBox = new St.BoxLayout({ vertical: true, style: 'padding-left: 6px;' });
|
||||
box.add(propsBox);
|
||||
propsBox.add(new St.Label({ text: "wmclass: " + metaWindow.get_wm_class() }));
|
||||
propsBox.add(new St.Label({ text: 'wmclass: ' + metaWindow.get_wm_class() }));
|
||||
let app = tracker.get_window_app(metaWindow);
|
||||
if (app != null && !app.is_transient()) {
|
||||
let icon = app.create_icon_texture(22);
|
||||
let propBox = new St.BoxLayout({ style: 'spacing: 6px; ' });
|
||||
propsBox.add(propBox);
|
||||
propBox.add(new St.Label({ text: "app: " + app.get_id() }), { y_align: St.Align.MIDDLE });
|
||||
propBox.add(new St.Label({ text: 'app: ' + app.get_id() }), { y_align: St.Align.MIDDLE });
|
||||
propBox.add(icon, { y_align: St.Align.MIDDLE });
|
||||
} else {
|
||||
propsBox.add(new St.Label({ text: "<untracked>" }));
|
||||
propsBox.add(new St.Label({ text: '<untracked>' }));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -219,7 +219,7 @@ PropertyInspector.prototype = {
|
||||
|
||||
this._parentList = [];
|
||||
|
||||
this.actor = new St.BoxLayout({ name: "PropertyInspector", vertical: true });
|
||||
this.actor = new St.BoxLayout({ name: 'PropertyInspector', vertical: true });
|
||||
},
|
||||
|
||||
setTarget: function(actor) {
|
||||
@ -230,11 +230,11 @@ PropertyInspector.prototype = {
|
||||
for (let propName in actor) {
|
||||
let valueStr;
|
||||
try {
|
||||
valueStr = "" + actor[propName];
|
||||
valueStr = '' + actor[propName];
|
||||
} catch (e) {
|
||||
valueStr = '<error>';
|
||||
}
|
||||
let propText = propName + ": " + valueStr;
|
||||
let propText = propName + ': ' + valueStr;
|
||||
let propDisplay = new St.Label({ reactive: true,
|
||||
text: propText });
|
||||
this.actor.add_actor(propDisplay);
|
||||
@ -250,7 +250,7 @@ Inspector.prototype = {
|
||||
_init: function() {
|
||||
let width = 150;
|
||||
let primary = global.get_primary_monitor();
|
||||
let eventHandler = new St.BoxLayout({ name: "LookingGlassDialog",
|
||||
let eventHandler = new St.BoxLayout({ name: 'LookingGlassDialog',
|
||||
vertical: false,
|
||||
y: primary.y + Math.floor(primary.height / 2),
|
||||
reactive: true });
|
||||
@ -336,7 +336,7 @@ ErrorLog.prototype = {
|
||||
let stack = Main._getAndClearErrorStack();
|
||||
for (let i = 0; i < stack.length; i++) {
|
||||
let logItem = stack[i];
|
||||
text += logItem.category + " t=" + this._formatTime(new Date(logItem.timestamp)) + " " + logItem.message + "\n";
|
||||
text += logItem.category + ' t=' + this._formatTime(new Date(logItem.timestamp)) + ' ' + logItem.message + '\n';
|
||||
}
|
||||
this.text.text = text;
|
||||
}
|
||||
@ -396,7 +396,7 @@ Extensions.prototype = {
|
||||
case ExtensionSystem.ExtensionState.OUT_OF_DATE:
|
||||
return _("Out of date");
|
||||
}
|
||||
return "Unknown"; // Not translated, shouldn't appear
|
||||
return 'Unknown'; // Not translated, shouldn't appear
|
||||
},
|
||||
|
||||
_createExtensionDisplay: function(meta) {
|
||||
@ -442,7 +442,7 @@ function LookingGlass() {
|
||||
LookingGlass.prototype = {
|
||||
_init : function() {
|
||||
this._idleHistorySaveId = 0;
|
||||
let historyPath = global.userdatadir + "/lookingglass-history.txt";
|
||||
let historyPath = global.userdatadir + '/lookingglass-history.txt';
|
||||
this._historyFile = Gio.file_new_for_path(historyPath);
|
||||
this._savedText = null;
|
||||
this._historyNavIndex = -1;
|
||||
@ -461,19 +461,19 @@ LookingGlass.prototype = {
|
||||
// Sort of magic, but...eh.
|
||||
this._maxItems = 150;
|
||||
|
||||
this.actor = new St.BoxLayout({ name: "LookingGlassDialog",
|
||||
this.actor = new St.BoxLayout({ name: 'LookingGlassDialog',
|
||||
vertical: true,
|
||||
visible: false });
|
||||
|
||||
let gconf = Shell.GConf.get_default();
|
||||
gconf.watch_directory("/desktop/gnome/interface");
|
||||
gconf.connect("changed::/desktop/gnome/interface/monospace_font_name",
|
||||
gconf.watch_directory('/desktop/gnome/interface');
|
||||
gconf.connect('changed::/desktop/gnome/interface/monospace_font_name',
|
||||
Lang.bind(this, this._updateFont));
|
||||
this._updateFont();
|
||||
|
||||
Main.uiGroup.add_actor(this.actor);
|
||||
|
||||
let toolbar = new St.BoxLayout({ name: "Toolbar" });
|
||||
let toolbar = new St.BoxLayout({ name: 'Toolbar' });
|
||||
this.actor.add_actor(toolbar);
|
||||
let inspectIcon = St.TextureCache.get_default().load_gicon(new Gio.ThemedIcon({ name: 'gtk-color-picker' }),
|
||||
24);
|
||||
@ -501,13 +501,13 @@ LookingGlass.prototype = {
|
||||
toolbar.add(emptyBox, { expand: true });
|
||||
toolbar.add_actor(notebook.tabControls);
|
||||
|
||||
this._evalBox = new St.BoxLayout({ name: "EvalBox", vertical: true });
|
||||
this._evalBox = new St.BoxLayout({ name: 'EvalBox', vertical: true });
|
||||
notebook.appendPage('Evaluator', this._evalBox);
|
||||
|
||||
this._resultsArea = new St.BoxLayout({ name: "ResultsArea", vertical: true });
|
||||
this._resultsArea = new St.BoxLayout({ name: 'ResultsArea', vertical: true });
|
||||
this._evalBox.add(this._resultsArea, { expand: true });
|
||||
|
||||
let entryArea = new St.BoxLayout({ name: "EntryArea" });
|
||||
let entryArea = new St.BoxLayout({ name: 'EntryArea' });
|
||||
this._evalBox.add_actor(entryArea);
|
||||
|
||||
let label = new St.Label({ text: 'js>>> ' });
|
||||
@ -543,7 +543,7 @@ LookingGlass.prototype = {
|
||||
// newline-separated.
|
||||
text.replace('\n', ' ');
|
||||
// Strip leading and trailing whitespace
|
||||
text = text.replace(/^\s+/g, "").replace(/\s+$/g, "");
|
||||
text = text.replace(/^\s+/g, '').replace(/\s+$/g, '');
|
||||
if (text == '')
|
||||
return true;
|
||||
this._evaluate(text);
|
||||
@ -579,7 +579,7 @@ LookingGlass.prototype = {
|
||||
|
||||
_updateFont: function() {
|
||||
let gconf = Shell.GConf.get_default();
|
||||
let fontName = gconf.get_string("/desktop/gnome/interface/monospace_font_name");
|
||||
let fontName = gconf.get_string('/desktop/gnome/interface/monospace_font_name');
|
||||
// This is mishandled by the scanner - should by Pango.FontDescription_from_string(fontName);
|
||||
// https://bugzilla.gnome.org/show_bug.cgi?id=595889
|
||||
let fontDesc = Pango.Font.description_from_string(fontName);
|
||||
@ -653,7 +653,7 @@ LookingGlass.prototype = {
|
||||
try {
|
||||
resultObj = eval(fullCmd);
|
||||
} catch (e) {
|
||||
resultObj = "<exception " + e + ">";
|
||||
resultObj = '<exception ' + e + '>';
|
||||
}
|
||||
|
||||
this._pushResult(command, resultObj);
|
||||
@ -725,7 +725,7 @@ LookingGlass.prototype = {
|
||||
global.stage.set_key_focus(this._entry);
|
||||
|
||||
Tweener.addTween(this.actor, { time: 0.5,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
y: this._targetY
|
||||
});
|
||||
},
|
||||
@ -750,7 +750,7 @@ LookingGlass.prototype = {
|
||||
Main.popModal(this.actor);
|
||||
|
||||
Tweener.addTween(this.actor, { time: 0.5,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
y: this._hiddenY,
|
||||
onComplete: Lang.bind(this, function () {
|
||||
this.actor.hide();
|
||||
|
@ -43,22 +43,22 @@ const DEFAULT_CROSSHAIRS_LENGTH = 4096;
|
||||
const DEFAULT_CROSSHAIRS_CLIP = false;
|
||||
const DEFAULT_CROSSHAIRS_CLIP_SIZE = [100, 100];
|
||||
const DEFAULT_CROSSHAIRS_COLOR = new Clutter.Color();
|
||||
DEFAULT_CROSSHAIRS_COLOR.from_string("Red");
|
||||
DEFAULT_CROSSHAIRS_COLOR.from_string('Red');
|
||||
|
||||
// GConf settings
|
||||
const A11Y_MAG_PREFS_DIR = "/desktop/gnome/accessibility/magnifier";
|
||||
const SHOW_KEY = A11Y_MAG_PREFS_DIR + "/show_magnifier";
|
||||
const SCREEN_POSITION_KEY = A11Y_MAG_PREFS_DIR + "/screen_position";
|
||||
const MAG_FACTOR_KEY = A11Y_MAG_PREFS_DIR + "/mag_factor";
|
||||
const LENS_MODE_KEY = A11Y_MAG_PREFS_DIR + "/lens_mode";
|
||||
const CLAMP_MODE_KEY = A11Y_MAG_PREFS_DIR + "/scroll_at_edges";
|
||||
const MOUSE_TRACKING_KEY = A11Y_MAG_PREFS_DIR + "/mouse_tracking";
|
||||
const SHOW_CROSS_HAIRS_KEY = A11Y_MAG_PREFS_DIR + "/show_cross_hairs";
|
||||
const CROSS_HAIRS_THICKNESS_KEY = A11Y_MAG_PREFS_DIR + "/cross_hairs_thickness";
|
||||
const CROSS_HAIRS_COLOR_KEY = A11Y_MAG_PREFS_DIR + "/cross_hairs_color";
|
||||
const CROSS_HAIRS_OPACITY_KEY = A11Y_MAG_PREFS_DIR + "/cross_hairs_opacity";
|
||||
const CROSS_HAIRS_LENGTH_KEY = A11Y_MAG_PREFS_DIR + "/cross_hairs_length";
|
||||
const CROSS_HAIRS_CLIP_KEY = A11Y_MAG_PREFS_DIR + "/cross_hairs_clip";
|
||||
const A11Y_MAG_PREFS_DIR = '/desktop/gnome/accessibility/magnifier';
|
||||
const SHOW_KEY = A11Y_MAG_PREFS_DIR + '/show_magnifier';
|
||||
const SCREEN_POSITION_KEY = A11Y_MAG_PREFS_DIR + '/screen_position';
|
||||
const MAG_FACTOR_KEY = A11Y_MAG_PREFS_DIR + '/mag_factor';
|
||||
const LENS_MODE_KEY = A11Y_MAG_PREFS_DIR + '/lens_mode';
|
||||
const CLAMP_MODE_KEY = A11Y_MAG_PREFS_DIR + '/scroll_at_edges';
|
||||
const MOUSE_TRACKING_KEY = A11Y_MAG_PREFS_DIR + '/mouse_tracking';
|
||||
const SHOW_CROSS_HAIRS_KEY = A11Y_MAG_PREFS_DIR + '/show_cross_hairs';
|
||||
const CROSS_HAIRS_THICKNESS_KEY = A11Y_MAG_PREFS_DIR + '/cross_hairs_thickness';
|
||||
const CROSS_HAIRS_COLOR_KEY = A11Y_MAG_PREFS_DIR + '/cross_hairs_color';
|
||||
const CROSS_HAIRS_OPACITY_KEY = A11Y_MAG_PREFS_DIR + '/cross_hairs_opacity';
|
||||
const CROSS_HAIRS_LENGTH_KEY = A11Y_MAG_PREFS_DIR + '/cross_hairs_length';
|
||||
const CROSS_HAIRS_CLIP_KEY = A11Y_MAG_PREFS_DIR + '/cross_hairs_clip';
|
||||
|
||||
let magDBusService = null;
|
||||
|
||||
@ -329,7 +329,7 @@ Magnifier.prototype = {
|
||||
/**
|
||||
* setCrosshairsColor:
|
||||
* Set the color of the crosshairs for all ZoomRegions.
|
||||
* @color: The color as a string, e.g. "#ff0000ff" or "red".
|
||||
* @color: The color as a string, e.g. '#ff0000ff' or 'red'.
|
||||
*/
|
||||
setCrosshairsColor: function(color) {
|
||||
if (this._crossHairs) {
|
||||
@ -342,7 +342,7 @@ Magnifier.prototype = {
|
||||
/**
|
||||
* getCrosshairsColor:
|
||||
* Get the color of the crosshairs.
|
||||
* @return: The color as a string, e.g. "#0000ffff" for blue.
|
||||
* @return: The color as a string, e.g. '#0000ffff' or 'blue'.
|
||||
*/
|
||||
getCrosshairsColor: function() {
|
||||
if (this._crossHairs) {
|
||||
@ -350,7 +350,7 @@ Magnifier.prototype = {
|
||||
return clutterColor.to_string();
|
||||
}
|
||||
else
|
||||
return "#00000000";
|
||||
return '#00000000';
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -53,8 +53,8 @@ const ZoomRegionIface = {
|
||||
};
|
||||
|
||||
// For making unique ZoomRegion DBus proxy object paths of the form:
|
||||
// "/org/gnome/Magnifier/ZoomRegion/zoomer0",
|
||||
// "/org/gnome/Magnifier/ZoomRegion/zoomer1", etc.
|
||||
// '/org/gnome/Magnifier/ZoomRegion/zoomer0',
|
||||
// '/org/gnome/Magnifier/ZoomRegion/zoomer1', etc.
|
||||
let _zoomRegionInstanceCount = 0;
|
||||
|
||||
function ShellMagnifier() {
|
||||
@ -118,7 +118,7 @@ ShellMagnifier.prototype = {
|
||||
let ROI = { x: roi[0], y: roi[1], width: roi[2], height: roi[3] };
|
||||
let viewBox = { x: viewPort[0], y: viewPort[1], width: viewPort[2], height: viewPort[3] };
|
||||
let realZoomRegion = Main.magnifier.createZoomRegion(xMagFactor, yMagFactor, ROI, viewBox);
|
||||
let objectPath = ZOOM_SERVICE_PATH + "/zoomer" + _zoomRegionInstanceCount;
|
||||
let objectPath = ZOOM_SERVICE_PATH + '/zoomer' + _zoomRegionInstanceCount;
|
||||
_zoomRegionInstanceCount++;
|
||||
|
||||
let zoomRegionProxy = new ShellMagnifierZoomRegion(objectPath, realZoomRegion);
|
||||
@ -169,7 +169,7 @@ ShellMagnifier.prototype = {
|
||||
}
|
||||
if (!found) {
|
||||
// Got a ZoomRegion with no DBus proxy, make one.
|
||||
let newPath = ZOOM_SERVICE_PATH + "/zoomer" + _zoomRegionInstanceCount;
|
||||
let newPath = ZOOM_SERVICE_PATH + '/zoomer' + _zoomRegionInstanceCount;
|
||||
_zoomRegionInstanceCount++;
|
||||
let zoomRegionProxy = new ShellMagnifierZoomRegion(newPath, aZoomRegion);
|
||||
let proxyAndZoomer = {};
|
||||
|
@ -54,9 +54,9 @@ let _startDate;
|
||||
let background = null;
|
||||
|
||||
function start() {
|
||||
// Add a binding for "global" in the global JS namespace; (gjs
|
||||
// Add a binding for 'global' in the global JS namespace; (gjs
|
||||
// keeps the web browser convention of having that namespace be
|
||||
// called "window".)
|
||||
// called 'window'.)
|
||||
window.global = Shell.Global.get();
|
||||
|
||||
// Now monkey patch utility functions into the global proxy;
|
||||
@ -65,7 +65,7 @@ function start() {
|
||||
global.logError = _logError;
|
||||
global.log = _logDebug;
|
||||
|
||||
Gio.DesktopAppInfo.set_desktop_env("GNOME");
|
||||
Gio.DesktopAppInfo.set_desktop_env('GNOME');
|
||||
|
||||
global.grab_dbus_service();
|
||||
shellDBusService = new ShellDBus.GnomeShell();
|
||||
@ -94,17 +94,17 @@ function start() {
|
||||
global.stage.color = DEFAULT_BACKGROUND_COLOR;
|
||||
|
||||
let themeContext = St.ThemeContext.get_for_stage (global.stage);
|
||||
let stylesheetPath = global.datadir + "/theme/gnome-shell.css";
|
||||
let stylesheetPath = global.datadir + '/theme/gnome-shell.css';
|
||||
let theme = new St.Theme ({ application_stylesheet: stylesheetPath });
|
||||
themeContext.set_theme (theme);
|
||||
|
||||
let shellwm = global.window_manager;
|
||||
shellwm.takeover_keybinding("panel_main_menu");
|
||||
shellwm.connect("keybinding::panel_main_menu", function () {
|
||||
shellwm.takeover_keybinding('panel_main_menu');
|
||||
shellwm.connect('keybinding::panel_main_menu', function () {
|
||||
overview.toggle();
|
||||
});
|
||||
shellwm.takeover_keybinding("panel_run_dialog");
|
||||
shellwm.connect("keybinding::panel_run_dialog", function () {
|
||||
shellwm.takeover_keybinding('panel_run_dialog');
|
||||
shellwm.connect('keybinding::panel_run_dialog', function () {
|
||||
getRunDialog().open();
|
||||
});
|
||||
|
||||
@ -136,9 +136,9 @@ function start() {
|
||||
} else {
|
||||
//read the parameters from GConf always in case they have changed
|
||||
let gconf = Shell.GConf.get_default();
|
||||
recorder.set_framerate(gconf.get_int("recorder/framerate"));
|
||||
recorder.set_filename("shell-%d%u-%c." + gconf.get_string("recorder/file_extension"));
|
||||
let pipeline = gconf.get_string("recorder/pipeline");
|
||||
recorder.set_framerate(gconf.get_int('recorder/framerate'));
|
||||
recorder.set_filename('shell-%d%u-%c.' + gconf.get_string('recorder/file_extension'));
|
||||
let pipeline = gconf.get_string('recorder/pipeline');
|
||||
if (!pipeline.match(/^\s*$/))
|
||||
recorder.set_pipeline(pipeline);
|
||||
else
|
||||
@ -191,7 +191,7 @@ function _log(category, msg) {
|
||||
for (let i = 2; i < arguments.length; i++) {
|
||||
text += JSON.stringify(arguments[i]);
|
||||
if (i < arguments.length - 1)
|
||||
text += " ";
|
||||
text += ' ';
|
||||
}
|
||||
}
|
||||
_errorLogStack.push({timestamp: new Date().getTime(),
|
||||
@ -280,8 +280,8 @@ function _globalKeyPressHandler(actor, event) {
|
||||
if (symbol == Clutter.Print) {
|
||||
// We want to be able to take screenshots of the shell at all times
|
||||
let gconf = Shell.GConf.get_default();
|
||||
let command = gconf.get_string("/apps/metacity/keybinding_commands/command_screenshot");
|
||||
if (command != null && command != "") {
|
||||
let command = gconf.get_string('/apps/metacity/keybinding_commands/command_screenshot');
|
||||
if (command != null && command != '') {
|
||||
let [ok, len, args] = GLib.shell_parse_argv(command);
|
||||
let p = new Shell.Process({'args' : args});
|
||||
p.run();
|
||||
@ -354,7 +354,7 @@ function _findModal(actor) {
|
||||
function pushModal(actor) {
|
||||
if (modalCount == 0) {
|
||||
if (!global.begin_modal(global.get_current_time())) {
|
||||
log("pushModal: invocation of begin_modal failed");
|
||||
log('pushModal: invocation of begin_modal failed');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -521,7 +521,7 @@ function _queueBeforeRedraw(workId) {
|
||||
*/
|
||||
function initializeDeferredWork(actor, callback, props) {
|
||||
// Turn into a string so we can use as an object property
|
||||
let workId = "" + (++_deferredWorkSequence);
|
||||
let workId = '' + (++_deferredWorkSequence);
|
||||
_deferredWorkData[workId] = { 'actor': actor,
|
||||
'callback': callback };
|
||||
actor.connect('notify::mapped', function () {
|
||||
@ -551,7 +551,7 @@ function initializeDeferredWork(actor, callback, props) {
|
||||
function queueDeferredWork(workId) {
|
||||
let data = _deferredWorkData[workId];
|
||||
if (!data) {
|
||||
global.logError("invalid work id ", workId);
|
||||
global.logError('invalid work id ', workId);
|
||||
return;
|
||||
}
|
||||
if (_deferredWorkQueue.indexOf(workId) < 0)
|
||||
|
@ -30,10 +30,10 @@ const State = {
|
||||
function _cleanMarkup(text) {
|
||||
// Support &, ", ', < and >, escape all other
|
||||
// occurrences of '&'.
|
||||
let _text = text.replace(/&(?!amp;|quot;|apos;|lt;|gt;)/g, "&");
|
||||
let _text = text.replace(/&(?!amp;|quot;|apos;|lt;|gt;)/g, '&');
|
||||
// Support <b>, <i>, and <u>, escape anything else
|
||||
// so it displays as raw markup.
|
||||
return _text.replace(/<(\/?[^biu]>|[^>\/][^>])/g, "<$1");
|
||||
return _text.replace(/<(\/?[^biu]>|[^>\/][^>])/g, '<$1');
|
||||
}
|
||||
|
||||
// Notification:
|
||||
@ -332,7 +332,7 @@ Notification.prototype = {
|
||||
Tweener.addTween(this._bannerLabel,
|
||||
{ opacity: 0,
|
||||
time: ANIMATION_TIME,
|
||||
transition: "easeOutQuad" });
|
||||
transition: 'easeOutQuad' });
|
||||
return true;
|
||||
},
|
||||
|
||||
@ -342,7 +342,7 @@ Notification.prototype = {
|
||||
Tweener.addTween(this._bannerLabel,
|
||||
{ opacity: 255,
|
||||
time: ANIMATION_TIME,
|
||||
transition: "easeOutQuad" });
|
||||
transition: 'easeOutQuad' });
|
||||
return true;
|
||||
},
|
||||
|
||||
@ -692,7 +692,7 @@ MessageTray.prototype = {
|
||||
|
||||
// All of the logic for what happens when occurs here; the various
|
||||
// event handlers merely update variables such as
|
||||
// "this._pointerInTray", "this._summaryState", etc, and
|
||||
// 'this._pointerInTray', 'this._summaryState', etc, and
|
||||
// _updateState() figures out what (if anything) needs to be done
|
||||
// at the present time.
|
||||
_updateState: function() {
|
||||
@ -782,19 +782,19 @@ MessageTray.prototype = {
|
||||
|
||||
_showTray: function() {
|
||||
let primary = global.get_primary_monitor();
|
||||
this._tween(this.actor, "_trayState", State.SHOWN,
|
||||
this._tween(this.actor, '_trayState', State.SHOWN,
|
||||
{ y: primary.y + primary.height - this.actor.height,
|
||||
time: ANIMATION_TIME,
|
||||
transition: "easeOutQuad"
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
},
|
||||
|
||||
_hideTray: function() {
|
||||
let primary = global.get_primary_monitor();
|
||||
this._tween(this.actor, "_trayState", State.HIDDEN,
|
||||
this._tween(this.actor, '_trayState', State.HIDDEN,
|
||||
{ y: primary.y + primary.height - 1,
|
||||
time: ANIMATION_TIME,
|
||||
transition: "easeOutQuad"
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
},
|
||||
|
||||
@ -806,11 +806,11 @@ MessageTray.prototype = {
|
||||
this._notificationBin.y = this.actor.height;
|
||||
this._notificationBin.show();
|
||||
|
||||
this._tween(this._notificationBin, "_notificationState", State.SHOWN,
|
||||
this._tween(this._notificationBin, '_notificationState', State.SHOWN,
|
||||
{ y: 0,
|
||||
opacity: 255,
|
||||
time: ANIMATION_TIME,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: this._showNotificationCompleted,
|
||||
onCompleteScope: this
|
||||
});
|
||||
@ -858,11 +858,11 @@ MessageTray.prototype = {
|
||||
this._reExpandNotificationId = 0;
|
||||
}
|
||||
|
||||
this._tween(this._notificationBin, "_notificationState", State.HIDDEN,
|
||||
this._tween(this._notificationBin, '_notificationState', State.HIDDEN,
|
||||
{ y: this.actor.height,
|
||||
opacity: 0,
|
||||
time: ANIMATION_TIME,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: this._hideNotificationCompleted,
|
||||
onCompleteScope: this
|
||||
});
|
||||
@ -877,10 +877,10 @@ MessageTray.prototype = {
|
||||
|
||||
_expandNotification: function() {
|
||||
if (this._notification && this._notification.popOut()) {
|
||||
this._tween(this._notificationBin, "_notificationState", State.SHOWN,
|
||||
this._tween(this._notificationBin, '_notificationState', State.SHOWN,
|
||||
{ y: this.actor.height - this._notificationBin.height,
|
||||
time: ANIMATION_TIME,
|
||||
transition: "easeOutQuad"
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
|
||||
if (!this._reExpandNotificationId)
|
||||
@ -892,11 +892,11 @@ MessageTray.prototype = {
|
||||
let primary = global.get_primary_monitor();
|
||||
this._summaryBin.opacity = 0;
|
||||
this._summaryBin.y = this.actor.height;
|
||||
this._tween(this._summaryBin, "_summaryState", State.SHOWN,
|
||||
this._tween(this._summaryBin, '_summaryState', State.SHOWN,
|
||||
{ y: 0,
|
||||
opacity: 255,
|
||||
time: ANIMATION_TIME,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: this._showSummaryCompleted,
|
||||
onCompleteScope: this,
|
||||
onCompleteParams: [withTimeout]
|
||||
@ -920,10 +920,10 @@ MessageTray.prototype = {
|
||||
},
|
||||
|
||||
_hideSummary: function() {
|
||||
this._tween(this._summaryBin, "_summaryState", State.HIDDEN,
|
||||
this._tween(this._summaryBin, '_summaryState', State.HIDDEN,
|
||||
{ opacity: 0,
|
||||
time: ANIMATION_TIME,
|
||||
transition: "easeOutQuad"
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
this._summaryNeedsToBeShown = false;
|
||||
},
|
||||
@ -942,11 +942,11 @@ MessageTray.prototype = {
|
||||
this._summaryNotificationBin.y = this.actor.height;
|
||||
this._summaryNotificationBin.show();
|
||||
|
||||
this._tween(this._summaryNotificationBin, "_summaryNotificationState", State.SHOWN,
|
||||
this._tween(this._summaryNotificationBin, '_summaryNotificationState', State.SHOWN,
|
||||
{ y: this.actor.height - this._summaryNotificationBin.height,
|
||||
opacity: 255,
|
||||
time: ANIMATION_TIME,
|
||||
transition: "easeOutQuad"
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
|
||||
if (!this._reExpandSummaryNotificationId)
|
||||
@ -954,21 +954,21 @@ MessageTray.prototype = {
|
||||
},
|
||||
|
||||
_reExpandSummaryNotification: function() {
|
||||
this._tween(this._summaryNotificationBin, "_summaryNotificationState", State.SHOWN,
|
||||
this._tween(this._summaryNotificationBin, '_summaryNotificationState', State.SHOWN,
|
||||
{ y: this.actor.height - this._summaryNotificationBin.height,
|
||||
time: ANIMATION_TIME,
|
||||
transition: "easeOutQuad"
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
},
|
||||
|
||||
_hideSummaryNotification: function() {
|
||||
this._summaryNotification.popIn();
|
||||
|
||||
this._tween(this._summaryNotificationBin, "_summaryNotificationState", State.HIDDEN,
|
||||
this._tween(this._summaryNotificationBin, '_summaryNotificationState', State.HIDDEN,
|
||||
{ y: this.actor.height,
|
||||
opacity: 0,
|
||||
time: ANIMATION_TIME,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: this._hideSummaryNotificationCompleted,
|
||||
onCompleteScope: this
|
||||
});
|
||||
|
@ -121,10 +121,10 @@ NotificationDaemon.prototype = {
|
||||
// kill the notification-daemon. pkill is more portable
|
||||
// than killall, but on Linux at least it won't match if
|
||||
// you pass more than 15 characters of the process name...
|
||||
// However, if you use the "-f" flag to match the entire
|
||||
// However, if you use the '-f' flag to match the entire
|
||||
// command line, it will work, but we have to be careful
|
||||
// in that case that we don't match "gedit
|
||||
// notification-daemon.c" or whatever...
|
||||
// in that case that we don't match 'gedit
|
||||
// notification-daemon.c' or whatever...
|
||||
let p = new Shell.Process({ args: ['pkill', '-f',
|
||||
'^([^ ]*/)?(notification-daemon|notify-osd)$']});
|
||||
p.run();
|
||||
|
@ -794,7 +794,7 @@ Panel.prototype = {
|
||||
|
||||
/* center */
|
||||
|
||||
let clockButton = new St.Button({ style_class: "panel-button",
|
||||
let clockButton = new St.Button({ style_class: 'panel-button',
|
||||
toggle_mode: true,
|
||||
x_fill: true,
|
||||
y_fill: true });
|
||||
@ -881,7 +881,7 @@ Panel.prototype = {
|
||||
Tweener.addTween(this.actor,
|
||||
{ y: 0,
|
||||
time: 0.2,
|
||||
transition: "easeOutQuad"
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
},
|
||||
|
||||
@ -941,7 +941,7 @@ Panel.prototype = {
|
||||
case 'unix':
|
||||
// force updates every second
|
||||
showSeconds = true;
|
||||
clockFormat = "%s";
|
||||
clockFormat = '%s';
|
||||
break;
|
||||
case 'custom':
|
||||
// force updates every second
|
||||
@ -1119,7 +1119,7 @@ CalendarPopup.prototype = {
|
||||
Tweener.addTween(this.actor,
|
||||
{ y: panelActor.y + panelActor.height,
|
||||
time: 0.2,
|
||||
transition: "easeOutQuad"
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
},
|
||||
|
||||
@ -1129,7 +1129,7 @@ CalendarPopup.prototype = {
|
||||
Tweener.addTween(this.actor,
|
||||
{ y: panelActor.y + panelActor.height - this.actor.height,
|
||||
time: 0.2,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: function() { this.actor.hide(); },
|
||||
onCompleteScope: this
|
||||
});
|
||||
|
@ -71,7 +71,7 @@ PlaceDeviceInfo.prototype = {
|
||||
this._mount = mount;
|
||||
this.name = mount.get_name();
|
||||
this._lowerName = this.name.toLowerCase();
|
||||
this.id = "mount:" + mount.get_root().get_uri();
|
||||
this.id = 'mount:' + mount.get_root().get_uri();
|
||||
},
|
||||
|
||||
iconFactory: function(size) {
|
||||
@ -155,7 +155,7 @@ PlacesManager.prototype = {
|
||||
|
||||
this._connect = new PlaceInfo('special:connect', _("Connect to..."),
|
||||
function (size) {
|
||||
return St.TextureCache.get_default().load_icon_name("applications-internet", size);
|
||||
return St.TextureCache.get_default().load_icon_name('applications-internet', size);
|
||||
},
|
||||
function () {
|
||||
new Shell.Process({ args: ['nautilus-connect-server'] }).run();
|
||||
@ -168,7 +168,7 @@ PlacesManager.prototype = {
|
||||
try {
|
||||
networkApp = Shell.AppSystem.get_default().load_from_desktop_file('network-scheme.desktop');
|
||||
} catch(e) {
|
||||
log("Cannot create \"Network\" item, .desktop file not found or corrupt.");
|
||||
log('Cannot create "Network" item, .desktop file not found or corrupt.');
|
||||
}
|
||||
}
|
||||
|
||||
@ -208,7 +208,7 @@ PlacesManager.prototype = {
|
||||
this._volumeMonitor.connect('drive-changed', Lang.bind(this, this._updateDevices));
|
||||
this._updateDevices();
|
||||
|
||||
this._bookmarksPath = GLib.build_filenamev([GLib.get_home_dir(), ".gtk-bookmarks"]);
|
||||
this._bookmarksPath = GLib.build_filenamev([GLib.get_home_dir(), '.gtk-bookmarks']);
|
||||
this._bookmarksFile = Gio.file_new_for_path(this._bookmarksPath);
|
||||
let monitor = this._bookmarksFile.monitor_file(Gio.FileMonitorFlags.NONE, null);
|
||||
this._bookmarkTimeoutId = 0;
|
||||
@ -340,7 +340,7 @@ PlacesManager.prototype = {
|
||||
this._isDesktopHome = gconf.get_boolean(DESKTOP_IS_HOME_KEY);
|
||||
|
||||
if (this._isDesktopHome)
|
||||
this._removeById(this._defaultPlaces, "special:desktop");
|
||||
this._removeById(this._defaultPlaces, 'special:desktop');
|
||||
else
|
||||
this._defaultPlaces.splice(this._desktopMenuIndex, 0,
|
||||
this._desktopMenu);
|
||||
|
@ -51,7 +51,7 @@ CommandCompleter.prototype = {
|
||||
this._paths[i] = file.get_path();
|
||||
this._monitors[i] = file.monitor_directory(Gio.FileMonitorFlags.NONE, null);
|
||||
if (this._monitors[i] != null) {
|
||||
this._monitors[i].connect("changed", Lang.bind(this, this._onChanged));
|
||||
this._monitors[i].connect('changed', Lang.bind(this, this._onChanged));
|
||||
}
|
||||
}
|
||||
this._paths = this._paths.filter(function(a) {
|
||||
@ -132,7 +132,7 @@ CommandCompleter.prototype = {
|
||||
},
|
||||
|
||||
getCompletion: function(text) {
|
||||
let common = "";
|
||||
let common = '';
|
||||
let notInit = true;
|
||||
if (!this._valid) {
|
||||
this._update(0);
|
||||
@ -145,7 +145,7 @@ CommandCompleter.prototype = {
|
||||
break;
|
||||
}
|
||||
if (k == 0)
|
||||
return "";
|
||||
return '';
|
||||
return s1.substr(0, k);
|
||||
}
|
||||
function _hasPrefix(s1, prefix) {
|
||||
@ -372,7 +372,7 @@ RunDialog.prototype = {
|
||||
// We are only interested in the actual error, so parse
|
||||
//that out.
|
||||
let m = /.+\((.+)\)/.exec(e);
|
||||
let errorStr = _("Execution of '%s' failed:").format(command) + "\n" + m[1];
|
||||
let errorStr = _("Execution of '%s' failed:").format(command) + '\n' + m[1];
|
||||
this._errorMessage.set_text(errorStr);
|
||||
|
||||
this._errorBox.show();
|
||||
|
@ -40,7 +40,7 @@ SearchResultDisplay.prototype = {
|
||||
* The terms are useful for search match highlighting.
|
||||
*/
|
||||
renderResults: function(results, terms) {
|
||||
throw new Error("not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
/**
|
||||
@ -67,7 +67,7 @@ SearchResultDisplay.prototype = {
|
||||
* Returns: The number of actors visible.
|
||||
*/
|
||||
getVisibleResultCount: function() {
|
||||
throw new Error("not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
/**
|
||||
@ -79,14 +79,14 @@ SearchResultDisplay.prototype = {
|
||||
* available.
|
||||
*/
|
||||
selectIndex: function() {
|
||||
throw new Error("not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
/**
|
||||
* Activate the currently selected search result.
|
||||
*/
|
||||
activateSelected: function() {
|
||||
throw new Error("not implemented");
|
||||
throw new Error('Not implemented');
|
||||
}
|
||||
};
|
||||
|
||||
@ -127,7 +127,7 @@ SearchProvider.prototype = {
|
||||
* or network queries.
|
||||
*/
|
||||
getInitialResultSet: function(terms) {
|
||||
throw new Error("not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
/**
|
||||
@ -144,7 +144,7 @@ SearchProvider.prototype = {
|
||||
* result set, rather than possibly performing a full re-query.
|
||||
*/
|
||||
getSubsearchResultSet: function(previousResults, newTerms) {
|
||||
throw new Error("not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
/**
|
||||
@ -155,7 +155,7 @@ SearchProvider.prototype = {
|
||||
* properties which describe the given search result.
|
||||
*/
|
||||
getResultMeta: function(id) {
|
||||
throw new Error("not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
/**
|
||||
@ -194,7 +194,7 @@ SearchProvider.prototype = {
|
||||
* Called when the user chooses a given result.
|
||||
*/
|
||||
activateResult: function(id) {
|
||||
throw new Error("not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
/**
|
||||
@ -205,7 +205,7 @@ SearchProvider.prototype = {
|
||||
* displaying search results for that item type.
|
||||
*/
|
||||
expandSearch: function(terms) {
|
||||
throw new Error("not implemented");
|
||||
throw new Error('Not implemented');
|
||||
}
|
||||
};
|
||||
Signals.addSignalMethods(SearchProvider.prototype);
|
||||
@ -238,7 +238,7 @@ SearchSystem.prototype = {
|
||||
},
|
||||
|
||||
updateSearch: function(searchString) {
|
||||
searchString = searchString.replace(/^\s+/g, "").replace(/\s+$/g, "");
|
||||
searchString = searchString.replace(/^\s+/g, '').replace(/\s+$/g, '');
|
||||
if (searchString == '')
|
||||
return null;
|
||||
|
||||
|
@ -8,16 +8,16 @@ const Mainloop = imports.mainloop;
|
||||
const Main = imports.ui.main;
|
||||
|
||||
const GnomeShellIface = {
|
||||
name: "org.gnome.Shell",
|
||||
methods: [{ name: "Eval",
|
||||
inSignature: "s",
|
||||
outSignature: "bs"
|
||||
name: 'org.gnome.Shell',
|
||||
methods: [{ name: 'Eval',
|
||||
inSignature: 's',
|
||||
outSignature: 'bs'
|
||||
}
|
||||
],
|
||||
signals: [],
|
||||
properties: [{ name: "OverviewActive",
|
||||
signature: "b",
|
||||
access: "readwrite" }]
|
||||
properties: [{ name: 'OverviewActive',
|
||||
signature: 'b',
|
||||
access: 'readwrite' }]
|
||||
};
|
||||
|
||||
function GnomeShell() {
|
||||
@ -50,7 +50,7 @@ GnomeShell.prototype = {
|
||||
returnValue = JSON.stringify(eval(code));
|
||||
// A hack; DBus doesn't have null/undefined
|
||||
if (returnValue == undefined)
|
||||
returnValue = "";
|
||||
returnValue = '';
|
||||
success = true;
|
||||
} catch (e) {
|
||||
returnValue = JSON.stringify(e);
|
||||
|
@ -19,8 +19,8 @@ const SCROLLBACK_RECENT_TIME = 15 * 60; // 15 minutes
|
||||
const SCROLLBACK_RECENT_LENGTH = 20;
|
||||
const SCROLLBACK_IDLE_LENGTH = 5;
|
||||
|
||||
// This is GNOME Shell's implementation of the Telepathy "Client"
|
||||
// interface. Specifically, the shell is a Telepathy "Observer", which
|
||||
// This is GNOME Shell's implementation of the Telepathy 'Client'
|
||||
// interface. Specifically, the shell is a Telepathy 'Observer', which
|
||||
// lets us see messages even if they belong to another app (eg,
|
||||
// Empathy).
|
||||
|
||||
|
@ -46,7 +46,7 @@ let slowDownFactor = 1.0;
|
||||
|
||||
// Called from Main.start
|
||||
function init() {
|
||||
let slowdownEnv = GLib.getenv("GNOME_SHELL_SLOWDOWN_FACTOR");
|
||||
let slowdownEnv = GLib.getenv('GNOME_SHELL_SLOWDOWN_FACTOR');
|
||||
if (slowdownEnv) {
|
||||
let factor = parseFloat(slowdownEnv);
|
||||
if (!isNaN(factor) && factor > 0.0)
|
||||
@ -190,7 +190,7 @@ function registerSpecialPropertySplitter(name, splitFunction, parameters) {
|
||||
}
|
||||
|
||||
|
||||
// The "FrameTicker" object is an object used to feed new frames to
|
||||
// The 'FrameTicker' object is an object used to feed new frames to
|
||||
// Tweener so it can update values and redraw. The default frame
|
||||
// ticker for Tweener just uses a simple timeout at a fixed frame rate
|
||||
// and has no idea of "catching up" by dropping frames.
|
||||
|
@ -103,7 +103,7 @@ WindowManager.prototype = {
|
||||
x: xDest,
|
||||
y: 0,
|
||||
time: WINDOW_ANIMATION_TIME,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: this._minimizeWindowDone,
|
||||
onCompleteScope: this,
|
||||
onCompleteParams: [shellwm, actor],
|
||||
@ -160,7 +160,7 @@ WindowManager.prototype = {
|
||||
Tweener.addTween(actor,
|
||||
{ opacity: 255,
|
||||
time: WINDOW_ANIMATION_TIME,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: this._mapWindowDone,
|
||||
onCompleteScope: this,
|
||||
onCompleteParams: [shellwm, actor],
|
||||
@ -258,7 +258,7 @@ WindowManager.prototype = {
|
||||
{ x: xDest,
|
||||
y: yDest,
|
||||
time: WINDOW_ANIMATION_TIME,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: this._switchWorkspaceDone,
|
||||
onCompleteScope: this,
|
||||
onCompleteParams: [shellwm]
|
||||
@ -267,7 +267,7 @@ WindowManager.prototype = {
|
||||
{ x: 0,
|
||||
y: 0,
|
||||
time: WINDOW_ANIMATION_TIME,
|
||||
transition: "easeOutQuad"
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
},
|
||||
|
||||
@ -306,7 +306,7 @@ WindowManager.prototype = {
|
||||
|
||||
_showWorkspaceSwitcher : function(shellwm, binding, window, backwards) {
|
||||
/* We don't support this kind of layout */
|
||||
if (binding == "switch_to_workspace_up" || binding == "switch_to_workspace_down")
|
||||
if (binding == 'switch_to_workspace_up' || binding == 'switch_to_workspace_down')
|
||||
return;
|
||||
|
||||
if (global.screen.n_workspaces == 1)
|
||||
@ -315,11 +315,11 @@ WindowManager.prototype = {
|
||||
if (this._workspaceSwitcherPopup == null)
|
||||
this._workspaceSwitcherPopup = new WorkspaceSwitcherPopup.WorkspaceSwitcherPopup();
|
||||
|
||||
if (binding == "switch_to_workspace_left") {
|
||||
if (binding == 'switch_to_workspace_left') {
|
||||
this.actionMoveWorkspaceLeft();
|
||||
}
|
||||
|
||||
if (binding == "switch_to_workspace_right") {
|
||||
if (binding == 'switch_to_workspace_right') {
|
||||
this.actionMoveWorkspaceRight();
|
||||
}
|
||||
},
|
||||
|
@ -325,7 +325,7 @@ DesktopClone.prototype = {
|
||||
Tweener.addTween(this._desktop,
|
||||
{ opacity: 255,
|
||||
time: Overview.ANIMATION_TIME,
|
||||
transition: "easeOutQuad" });
|
||||
transition: 'easeOutQuad' });
|
||||
}
|
||||
},
|
||||
|
||||
@ -339,7 +339,7 @@ DesktopClone.prototype = {
|
||||
Tweener.addTween(this._desktop,
|
||||
{ opacity: 0,
|
||||
time: Overview.ANIMATION_TIME,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: Lang.bind(this,
|
||||
function() {
|
||||
this._desktop.hide();
|
||||
@ -374,7 +374,7 @@ WindowOverlay.prototype = {
|
||||
this._windowClone = windowClone;
|
||||
this._parentActor = parentActor;
|
||||
|
||||
let title = new St.Label({ style_class: "window-caption",
|
||||
let title = new St.Label({ style_class: 'window-caption',
|
||||
text: metaWindow.title });
|
||||
title.clutter_text.ellipsize = Pango.EllipsizeMode.END;
|
||||
title._spacing = 0;
|
||||
@ -384,7 +384,7 @@ WindowOverlay.prototype = {
|
||||
this.title.text = w.title;
|
||||
}));
|
||||
|
||||
let button = new St.Button({ style_class: "window-close" });
|
||||
let button = new St.Button({ style_class: 'window-close' });
|
||||
button._overlap = 0;
|
||||
|
||||
this._idleToggleCloseId = 0;
|
||||
@ -439,7 +439,7 @@ WindowOverlay.prototype = {
|
||||
Tweener.addTween(this.title,
|
||||
{ opacity: 255,
|
||||
time: Overview.ANIMATION_TIME,
|
||||
transition: "easeOutQuad" });
|
||||
transition: 'easeOutQuad' });
|
||||
},
|
||||
|
||||
chromeWidth: function () {
|
||||
@ -1105,7 +1105,7 @@ Workspace.prototype = {
|
||||
Tweener.addTween(clone.actor,
|
||||
{ opacity: 255,
|
||||
time: Overview.ANIMATION_TIME,
|
||||
transition: "easeInQuad"
|
||||
transition: 'easeInQuad'
|
||||
});
|
||||
}
|
||||
|
||||
@ -1116,7 +1116,7 @@ Workspace.prototype = {
|
||||
scale_y: scale,
|
||||
workspace_relative: workspaceZooming ? this : null,
|
||||
time: Overview.ANIMATION_TIME,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: Lang.bind(this, function() {
|
||||
this._fadeInWindowOverlay(clone, overlay);
|
||||
})
|
||||
@ -1370,7 +1370,7 @@ Workspace.prototype = {
|
||||
workspace_relative: this,
|
||||
time: Overview.ANIMATION_TIME,
|
||||
opacity: 255,
|
||||
transition: "easeOutQuad"
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
} else {
|
||||
// The window is hidden, make it shrink and fade it out
|
||||
@ -1380,7 +1380,7 @@ Workspace.prototype = {
|
||||
opacity: 0,
|
||||
workspace_relative: this,
|
||||
time: Overview.ANIMATION_TIME,
|
||||
transition: "easeOutQuad"
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -1403,7 +1403,7 @@ Workspace.prototype = {
|
||||
scale_x: this.scale,
|
||||
scale_y: this.scale,
|
||||
time: Overview.ANIMATION_TIME,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: Lang.bind(this, this._fadeInAllOverlays)
|
||||
});
|
||||
},
|
||||
@ -1423,7 +1423,7 @@ Workspace.prototype = {
|
||||
scale_x: this.scale,
|
||||
scale_y: this.scale,
|
||||
time: Overview.ANIMATION_TIME,
|
||||
transition: "easeOutQuad"
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
|
||||
this._visible = true;
|
||||
@ -1445,7 +1445,7 @@ Workspace.prototype = {
|
||||
scale_x: this.scale,
|
||||
scale_y: this.scale,
|
||||
time: Overview.ANIMATION_TIME,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: onComplete
|
||||
});
|
||||
|
||||
|
@ -30,8 +30,8 @@ WorkspaceSwitcherPopup.prototype = {
|
||||
|
||||
this._scaleWidth = global.screen_width / global.screen_height;
|
||||
|
||||
this._container = new St.BoxLayout({ style_class: "workspace-switcher-container" });
|
||||
this._list = new St.BoxLayout({ style_class: "workspace-switcher" });
|
||||
this._container = new St.BoxLayout({ style_class: 'workspace-switcher-container' });
|
||||
this._list = new St.BoxLayout({ style_class: 'workspace-switcher' });
|
||||
|
||||
this._container.add(this._list);
|
||||
|
||||
@ -73,7 +73,7 @@ WorkspaceSwitcherPopup.prototype = {
|
||||
_show : function() {
|
||||
Tweener.addTween(this._container, { opacity: 255,
|
||||
time: ANIMATION_TIME,
|
||||
transition: "easeOutQuad"
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
this._position();
|
||||
this.actor.show();
|
||||
@ -92,7 +92,7 @@ WorkspaceSwitcherPopup.prototype = {
|
||||
this._timeoutId = 0;
|
||||
Tweener.addTween(this._container, { opacity: 0.0,
|
||||
time: ANIMATION_TIME,
|
||||
transition: "easeOutQuad",
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: function() { this.actor.hide(); },
|
||||
onCompleteScope: this
|
||||
});
|
||||
|
@ -43,7 +43,7 @@ function GenericWorkspacesView(width, height, x, y, workspaces) {
|
||||
|
||||
GenericWorkspacesView.prototype = {
|
||||
_init: function(width, height, x, y, workspaces) {
|
||||
this.actor = new St.Bin({ style_class: "workspaces" });
|
||||
this.actor = new St.Bin({ style_class: 'workspaces' });
|
||||
this._actor = new Clutter.Group();
|
||||
|
||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
||||
@ -227,7 +227,7 @@ GenericWorkspacesView.prototype = {
|
||||
},
|
||||
|
||||
createControllerBar: function() {
|
||||
throw new Error("Not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
canAddWorkspace: function() {
|
||||
@ -244,7 +244,7 @@ GenericWorkspacesView.prototype = {
|
||||
},
|
||||
|
||||
_getWorkspaceIndexToRemove: function() {
|
||||
throw new Error("Not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
canRemoveWorkspace: function() {
|
||||
@ -263,19 +263,19 @@ GenericWorkspacesView.prototype = {
|
||||
},
|
||||
|
||||
updateWorkspaces: function() {
|
||||
throw new Error("Not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
_transitionWorkspaces: function() {
|
||||
throw new Error("Not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
_computeWorkspacePositions: function() {
|
||||
throw new Error("Not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
_activeWorkspaceChanged: function() {
|
||||
throw new Error("Not implemented");
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
|
||||
_acceptNewWorkspaceDrop: function(source, dropActor, x, y, time) {
|
||||
|
Loading…
Reference in New Issue
Block a user