diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css index c7d875a13..da21721e7 100644 --- a/data/theme/gnome-shell.css +++ b/data/theme/gnome-shell.css @@ -469,11 +469,12 @@ StTooltip StLabel { #searchResults { padding: 20px 10px 10px 10px; + spacing: 18px; } #searchResultsContent { - padding: 0 10px; - spacing: 8px; + padding: 0 20px 0 0; + spacing: 36px; } .search-statustext, @@ -481,18 +482,11 @@ StTooltip StLabel { padding: 4px 12px; spacing: 4px; color: #6f6f6f; -} - -.search-section { - background-color: rgba(128, 128, 128, .1); - border: 1px solid rgba(50, 50, 50, .4); - border-radius: 10px; + font-size: .8em; } .search-section-results { color: #ffffff; - border-radius: 10px; - border: 1px solid rgba(50, 50, 50, .4); padding: 6px; } @@ -505,17 +499,18 @@ StTooltip StLabel { } .search-providers-box { - spacing: 4px; + spacing: 12px; } .dash-search-button { background-gradient-direction: vertical; background-gradient-start: rgba(255, 255, 255, 0.2); background-gradient-end: rgba(255, 255, 255, 0); -/* border: 1px solid #808080;*/ - border-radius: 10px; + border: 1px solid #808080; + border-radius: 16px; height: 32px; width: 300px; + font-weight: bold; } .dash-search-button:selected, @@ -534,7 +529,11 @@ StTooltip StLabel { .icon-grid { spacing: 36px; - -shell-grid-item-size: 70px; + -shell-grid-item-size: 118px; +} + +.icon-grid .overview-icon { + icon-size: 96px; } .all-app { @@ -542,15 +541,6 @@ StTooltip StLabel { spacing: 20px; } -.all-app .icon-grid { - -shell-grid-item-size: 118px; -} - -.all-app .overview-icon { - icon-size: 96px; -} - - .app-filter { font-size: 14px; font-weight: bold; diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index cd5983bf6..b9f4b1fb4 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -251,7 +251,10 @@ BaseAppSearchProvider.prototype = { return null; return { 'id': resultId, 'name': app.get_name(), - 'icon': app.create_icon_texture(Search.RESULT_ICON_SIZE)}; + 'createIcon': function(size) { + return app.create_icon_texture(size); + } + }; }, activateResult: function(id, params) { @@ -294,10 +297,6 @@ AppSearchProvider.prototype = { let app = this._appSys.get_app(resultMeta['id']); let icon = new AppWellIcon(app); return icon.actor; - }, - - expandSearch: function(terms) { - log('TODO expand search'); } }; @@ -318,12 +317,6 @@ PrefsSearchProvider.prototype = { getSubsearchResultSet: function(previousResults, terms) { return this._appSys.subsearch(true, previousResults, terms); - }, - - expandSearch: function(terms) { - let controlCenter = this._appSys.load_from_desktop_file('gnomecc.desktop'); - controlCenter.launch(); - Main.overview.hide(); } }; diff --git a/js/ui/chrome.js b/js/ui/chrome.js index f5e82920e..addc9ac7d 100644 --- a/js/ui/chrome.js +++ b/js/ui/chrome.js @@ -363,41 +363,75 @@ Chrome.prototype = { if (!actorData.affectsStruts) continue; + // Limit struts to the size of the screen + let x1 = Math.max(x, 0); + let x2 = Math.min(x + w, global.screen_width); + let y1 = Math.max(y, 0); + let y2 = Math.min(y + h, global.screen_height); + + // NetWM struts are not really powerful enought to handle + // a multi-monitor scenario, they only describe what happens + // around the outer sides of the full display region. However + // it can describe a partial region along each side, so + // we can support having the struts only affect the + // primary monitor. This should be enough as we only have + // chrome affecting the struts on the primary monitor so + // far. + // // Metacity wants to know what side of the screen the // strut is considered to be attached to. If the actor is // only touching one edge, or is touching the entire - // width/height of one edge, then it's obvious which side - // to call it. If it's in a corner, we pick a side + // border of the primary monitor, then it's obvious which + // side to call it. If it's in a corner, we pick a side // arbitrarily. If it doesn't touch any edges, or it spans // the width/height across the middle of the screen, then // we don't create a strut for it at all. let side; - if (w >= global.screen_width) { - if (y <= 0) + let primary = this._primaryMonitor; + if (x1 <= primary.x && x2 >= primary.x + primary.width) { + if (y1 <= primary.y) side = Meta.Side.TOP; - else if (y + h >= global.screen_height) + else if (y2 >= primary.y + primary.height) side = Meta.Side.BOTTOM; else continue; - } else if (h >= global.screen_height) { - if (x <= 0) + } else if (y1 <= primary.y && y2 >= primary.y + primary.height) { + if (x1 <= 0) side = Meta.Side.LEFT; - else if (x + w >= global.screen_width) + else if (x2 >= global.screen_width) side = Meta.Side.RIGHT; else continue; - } else if (x <= 0) + } else if (x1 <= 0) side = Meta.Side.LEFT; - else if (y <= 0) + else if (y1 <= 0) side = Meta.Side.TOP; - else if (x + w >= global.screen_width) + else if (x2 >= global.screen_width) side = Meta.Side.RIGHT; - else if (y + h >= global.screen_height) + else if (y2 >= global.screen_height) side = Meta.Side.BOTTOM; else continue; - let strut = new Meta.Strut({ rect: rect, side: side }); + // Ensure that the strut rects goes all the way to the screen edge, + // as this really what mutter expects. + switch (side) { + case Meta.Side.TOP: + y1 = 0; + break; + case Meta.Side.BOTTOM: + y2 = global.screen_height; + break; + case Meta.Side.LEFT: + x1 = 0; + break; + case Meta.Side.RIGHT: + x2 = global.screen_width; + break; + } + + let strutRect = new Meta.Rectangle({ x: x1, y: y1, width: x2 - x1, height: y2 - y1}); + let strut = new Meta.Strut({ rect: strutRect, side: side }); struts.push(strut); } diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index f2d046cb2..24556e233 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -52,8 +52,7 @@ BaseIcon.prototype = { this.createIcon = params.createIcon; this._setSizeManually = params.setSizeManually; - this.icon = this.createIcon(this.iconSize); - this._iconBin.set_child(this.icon); + this.icon = null; }, _allocate: function(actor, box, flags) { @@ -116,14 +115,15 @@ BaseIcon.prototype = { if (!this._setSizeManually) throw new Error('setSizeManually has to be set to use setIconsize'); - this._setIconSize(size); - }, - - _setIconSize: function(size) { if (size == this.iconSize) return; - this.icon.destroy(); + this._createIconTexture(size); + }, + + _createIconTexture: function(size) { + if (this.icon) + this.icon.destroy(); this.iconSize = size; this.icon = this.createIcon(this.iconSize); @@ -139,12 +139,15 @@ BaseIcon.prototype = { let node = this.actor.get_theme_node(); this._spacing = node.get_length('spacing'); - if (this._setSizeManually) - return; + let size; + if (this._setSizeManually) { + size = this.iconSize; + } else { + let [found, len] = node.lookup_length('icon-size', false); + size = found ? len : ICON_SIZE; + } - let len = node.get_length('icon-size'); - if (len > 0) - this._setIconSize(len); + this._createIconTexture(size); } }; diff --git a/js/ui/main.js b/js/ui/main.js index 2a7e225b3..3d3d87c14 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -196,6 +196,9 @@ function start() { ExtensionSystem.init(); ExtensionSystem.loadExtensions(); + // Perform initial relayout here + _relayout(); + panel.startStatusArea(); panel.startupAnimation(); @@ -204,9 +207,6 @@ function start() { global.stage.connect('captured-event', _globalKeyPressHandler); - // Perform initial relayout here - _relayout(); - _log('info', 'loaded at ' + _startDate); log('GNOME Shell started at ' + _startDate); @@ -539,10 +539,8 @@ function _globalKeyPressHandler(actor, event) { function _findModal(actor) { for (let i = 0; i < modalActorFocusStack.length; i++) { - let [stackActor, stackFocus] = modalActorFocusStack[i]; - if (stackActor == actor) { + if (modalActorFocusStack[i].actor == actor) return i; - } } return -1; } @@ -568,7 +566,6 @@ function _findModal(actor) { * Returns: true iff we successfully acquired a grab or already had one */ function pushModal(actor, timestamp) { - if (timestamp == undefined) timestamp = global.get_current_time(); @@ -582,20 +579,24 @@ function pushModal(actor, timestamp) { global.set_stage_input_mode(Shell.StageInputMode.FULLSCREEN); modalCount += 1; - actor.connect('destroy', function() { + let actorDestroyId = actor.connect('destroy', function() { let index = _findModal(actor); if (index >= 0) modalActorFocusStack.splice(index, 1); }); let curFocus = global.stage.get_key_focus(); + let curFocusDestroyId; if (curFocus != null) { - curFocus.connect('destroy', function() { + curFocusDestroyId = curFocus.connect('destroy', function() { let index = _findModal(actor); if (index >= 0) - modalActorFocusStack[index][1] = null; + modalActorFocusStack[index].actor = null; }); } - modalActorFocusStack.push([actor, curFocus]); + modalActorFocusStack.push({ actor: actor, + focus: curFocus, + destroyId: actorDestroyId, + focusDestroyId: curFocusDestroyId }); global.stage.set_key_focus(actor); return true; @@ -615,28 +616,42 @@ function pushModal(actor, timestamp) { * global.get_current_time() is assumed. */ function popModal(actor, timestamp) { - if (timestamp == undefined) timestamp = global.get_current_time(); - modalCount -= 1; let focusIndex = _findModal(actor); - if (focusIndex >= 0) { - if (focusIndex == modalActorFocusStack.length - 1) { - let [stackActor, stackFocus] = modalActorFocusStack[focusIndex]; - global.stage.set_key_focus(stackFocus); - } else { - // Remove from the middle, shift the focus chain up - for (let i = focusIndex; i < modalActorFocusStack.length - 1; i++) { - modalActorFocusStack[i + 1][1] = modalActorFocusStack[i][1]; - } - } - modalActorFocusStack.splice(focusIndex, 1); + if (focusIndex < 0) { + global.stage.set_key_focus(null); + global.end_modal(timestamp); + global.set_stage_input_mode(Shell.StageInputMode.NORMAL); + + throw new Error('incorrect pop'); } + + modalCount -= 1; + + let record = modalActorFocusStack[focusIndex]; + record.actor.disconnect(record.destroyId); + + if (focusIndex == modalActorFocusStack.length - 1) { + if (record.focus) + record.focus.disconnect(record.focusDestroyId); + global.stage.set_key_focus(record.focus); + } else { + let t = modalActorFocusStack[modalActorFocusStack.length - 1]; + if (t.focus) + t.focus.disconnect(t.focusDestroyId); + // Remove from the middle, shift the focus chain up + for (let i = modalActorFocusStack.length - 1; i > focusIndex; i--) { + modalActorFocusStack[i].focus = modalActorFocusStack[i - 1].focus; + modalActorFocusStack[i].focusDestroyId = modalActorFocusStack[i - 1].focusDestroyId; + } + } + modalActorFocusStack.splice(focusIndex, 1); + if (modalCount > 0) return; - global.stage.set_key_focus(null); global.end_modal(timestamp); global.set_stage_input_mode(Shell.StageInputMode.NORMAL); } diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index fe220744e..5c4445810 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -421,6 +421,7 @@ Notification.prototype = { !this._actionArea.contains(event.get_source())) this._onClicked(); })); + this.actor.connect('destroy', Lang.bind(this, this._onDestroy)); this._buttonFocusManager = St.FocusManager.get_for_stage(global.stage); @@ -763,6 +764,8 @@ Notification.prototype = { }, collapseCompleted: function() { + if (this._destroyed) + return; this.expanded = false; // Make sure we don't line wrap the title, and ellipsize it instead. this._titleLabel.clutter_text.line_wrap = false; @@ -794,13 +797,18 @@ Notification.prototype = { this.destroy(); }, - destroy: function(reason) { + _onDestroy: function() { if (this._destroyed) return; this._destroyed = true; - if (!reason) - reason = NotificationDestroyedReason.DISMISSED; - this.emit('destroy', reason); + if (!this._destroyedReason) + this._destroyedReason = NotificationDestroyedReason.DISMISSED; + this.emit('destroy', this._destroyedReason); + }, + + destroy: function(reason) { + this._destroyedReason = reason; + this.actor.destroy(); } }; Signals.addSignalMethods(Notification.prototype); @@ -1135,10 +1143,7 @@ MessageTray.prototype = { this._onSummaryItemClicked(summaryItem); })); - source.connect('destroy', Lang.bind(this, - function () { - this.removeSource(source); - })); + source.connect('destroy', Lang.bind(this, this._onSourceDestroy)); // We need to display the newly-added summary item, but if the // caller is about to post a notification, we want to show that @@ -1147,20 +1152,12 @@ MessageTray.prototype = { Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() { this._updateState(); return false; })); }, - removeSource: function(source) { + _onSourceDestroy: function(source) { let index = this._getIndexOfSummaryItemForSource(source); if (index == -1) return; - // remove all notifications with this source from the queue - let newNotificationQueue = []; - for (let i = 0; i < this._notificationQueue.length; i++) { - if (this._notificationQueue[i].source != source) - newNotificationQueue.push(this._notificationQueue[i]); - } - this._notificationQueue = newNotificationQueue; - - this._summary.remove_actor(this._summaryItems[index].actor); + this._summaryItems[index].actor.destroy(); let newSummaryItemsIndex = this._newSummaryItems.indexOf(this._summaryItems[index]); if (newSummaryItemsIndex != -1) @@ -1202,9 +1199,16 @@ MessageTray.prototype = { if (needUpdate); this._updateState(); + + // remove all notifications with this source from the queue + let newNotificationQueue = []; + for (let i = this._notificationQueue.length - 1; i >= 0; i--) { + if (this._notificationQueue[i].source == source) + this._notificationQueue[i].destroy(); + } }, - removeNotification: function(notification) { + _onNotificationDestroy: function(notification) { if (this._notification == notification && (this._notificationState == State.SHOWN || this._notificationState == State.SHOWING)) { this._updateNotificationTimeout(0); this._notificationRemoved = true; @@ -1213,6 +1217,7 @@ MessageTray.prototype = { } let index = this._notificationQueue.indexOf(notification); + notification.destroy(); if (index != -1) this._notificationQueue.splice(index, 1); }, @@ -1248,7 +1253,7 @@ MessageTray.prototype = { this._updateShowingNotification(); } else if (this._notificationQueue.indexOf(notification) < 0) { notification.connect('destroy', - Lang.bind(this, this.removeNotification)); + Lang.bind(this, this._onNotificationDestroy)); this._notificationQueue.push(notification); this._notificationQueue.sort(function(notification1, notification2) { return (notification2.urgency - notification1.urgency); diff --git a/js/ui/overview.js b/js/ui/overview.js index 3c5e6e64a..9437b498c 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -659,20 +659,20 @@ Overview.prototype = { if (this._shown) { if (!this._modal) { - if (Main.pushModal(this.dash.actor)) + if (Main.pushModal(this._group)) this._modal = true; else this.hide(); } } else if (this._shownTemporarily) { if (this._modal) { - Main.popModal(this.dash.actor); + Main.popModal(this._group); this._modal = false; } global.stage_input_mode = Shell.StageInputMode.FULLSCREEN; } else { if (this._modal) { - Main.popModal(this.dash.actor); + Main.popModal(this._group); this._modal = false; } else if (global.stage_input_mode == Shell.StageInputMode.FULLSCREEN) diff --git a/js/ui/panel.js b/js/ui/panel.js index 92272df98..95dc2bcac 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -25,6 +25,8 @@ const PANEL_HEIGHT = 26; const PANEL_ICON_SIZE = 24; +const STARTUP_ANIMATION_TIME = 0.2; + const HOT_CORNER_ACTIVATION_TIMEOUT = 0.5; const BUTTON_DND_ACTIVATION_TIMEOUT = 250; @@ -1042,10 +1044,25 @@ Panel.prototype = { }, startupAnimation: function() { - this.actor.y = -this.actor.height; + let oldY = this.actor.y; + this.actor.y = oldY - this.actor.height; Tweener.addTween(this.actor, - { y: 0, - time: 0.2, + { y: oldY, + time: STARTUP_ANIMATION_TIME, + transition: 'easeOutQuad' + }); + + let oldCornerY = this._leftCorner.actor.y; + this._leftCorner.actor.y = oldCornerY - this.actor.height; + this._rightCorner.actor.y = oldCornerY - this.actor.height; + Tweener.addTween(this._leftCorner.actor, + { y: oldCornerY, + time: STARTUP_ANIMATION_TIME, + transition: 'easeOutQuad' + }); + Tweener.addTween(this._rightCorner.actor, + { y: oldCornerY, + time: STARTUP_ANIMATION_TIME, transition: 'easeOutQuad' }); }, diff --git a/js/ui/placeDisplay.js b/js/ui/placeDisplay.js index a44506e70..450a7ba2b 100644 --- a/js/ui/placeDisplay.js +++ b/js/ui/placeDisplay.js @@ -415,7 +415,10 @@ PlaceSearchProvider.prototype = { return null; return { 'id': resultId, 'name': placeInfo.name, - 'icon': placeInfo.iconFactory(Search.RESULT_ICON_SIZE) }; + 'createIcon': function(size) { + return placeInfo.iconFactory(size); + } + }; }, activateResult: function(id, params) { diff --git a/js/ui/search.js b/js/ui/search.js index e465a6a87..184a731f3 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -15,8 +15,6 @@ const Main = imports.ui.main; const DISABLED_OPEN_SEARCH_PROVIDERS_KEY = 'disabled-open-search-providers'; -const RESULT_ICON_SIZE = 48; - // Not currently referenced by the search API, but // this enumeration can be useful for provider // implementations. @@ -202,8 +200,9 @@ SearchProvider.prototype = { * getResultInfo: * @id: Result identifier string * - * Return an object with 'id', 'name', (both strings) and 'icon' (Clutter.Texture) - * properties which describe the given search result. + * Return an object with 'id', 'name', (both strings) and 'createIcon' + * (function(size) returning a Clutter.Texture) properties which describe + * the given search result. */ getResultMeta: function(id) { throw new Error('Not implemented'); @@ -246,17 +245,6 @@ SearchProvider.prototype = { */ activateResult: function(id) { throw new Error('Not implemented'); - }, - - /** - * expandSearch: - * - * Called when the user clicks on the header for this - * search section. Should typically launch an external program - * displaying search results for that item type. - */ - expandSearch: function(terms) { - throw new Error('Not implemented'); } }; Signals.addSignalMethods(SearchProvider.prototype); diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js index b1a08d9dc..1290d234a 100644 --- a/js/ui/searchDisplay.js +++ b/js/ui/searchDisplay.js @@ -13,7 +13,7 @@ const Main = imports.ui.main; const Overview = imports.ui.overview; const Search = imports.ui.search; -const MAX_SEARCH_RESULTS_ROWS = 2; +const MAX_SEARCH_RESULTS_ROWS = 1; function SearchResult(provider, metaInfo, terms) { @@ -36,9 +36,7 @@ SearchResult.prototype = { reactive: true, track_hover: true }); let icon = new IconGrid.BaseIcon(this.metaInfo['name'], - { createIcon: Lang.bind(this, function(size) { - return this.metaInfo['icon']; - })}); + { createIcon: this.metaInfo['createIcon'] }); content.set_child(icon.actor); } this._content = content; @@ -244,18 +242,9 @@ SearchResults.prototype = { createProviderMeta: function(provider) { let providerBox = new St.BoxLayout({ style_class: 'search-section', vertical: true }); - let titleButton = new St.Button({ style_class: 'search-section-header', - reactive: true, - x_fill: true, - y_fill: true }); - titleButton.connect('clicked', Lang.bind(this, function () { this._onHeaderClicked(provider); })); - providerBox.add(titleButton); - let titleBox = new St.BoxLayout(); - titleButton.set_child(titleBox); - let title = new St.Label({ text: provider.title }); - let count = new St.Label(); - titleBox.add(title, { expand: true }); - titleBox.add(count); + let title = new St.Label({ style_class: 'search-section-header', + text: provider.title }); + providerBox.add(title); let resultDisplayBin = new St.Bin({ style_class: 'search-section-results', x_fill: true, @@ -268,8 +257,7 @@ SearchResults.prototype = { resultDisplayBin.set_child(resultDisplay.actor); this._providerMeta.push({ actor: providerBox, - resultDisplay: resultDisplay, - count: count }); + resultDisplay: resultDisplay }); this._content.add(providerBox); }, @@ -326,7 +314,6 @@ SearchResults.prototype = { let meta = this._metaForProvider(provider); meta.actor.show(); meta.resultDisplay.renderResults(providerResults, terms); - meta.count.set_text('' + providerResults.length); } if (this._selectedOpenSearchButton == -1) @@ -335,10 +322,6 @@ SearchResults.prototype = { return true; }, - _onHeaderClicked: function(provider) { - provider.expandSearch(this._searchSystem.getTerms()); - }, - _modifyActorSelection: function(resultDisplay, up) { let success; let index = resultDisplay.getSelectionIndex(); diff --git a/js/ui/status/accessibility.js b/js/ui/status/accessibility.js index 035e96e16..5d77a5c1c 100644 --- a/js/ui/status/accessibility.js +++ b/js/ui/status/accessibility.js @@ -25,16 +25,12 @@ const KEY_MOUSE_KEYS_ENABLED = 'mousekeys-enable'; const APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications'; -const XSETTINGS_SCHEMA = 'org.gnome.settings-daemon.plugins.xsettings'; -const KEY_DPI = 'dpi'; - const DPI_LOW_REASONABLE_VALUE = 50; const DPI_HIGH_REASONABLE_VALUE = 500; const DPI_FACTOR_LARGE = 1.25; const DPI_FACTOR_LARGER = 1.5; const DPI_FACTOR_LARGEST = 2.0; -const DPI_DEFAULT = 96; const KEY_META_DIR = '/apps/metacity/general'; const KEY_VISUAL_BELL = KEY_META_DIR + '/visual_bell'; @@ -42,25 +38,10 @@ const KEY_VISUAL_BELL = KEY_META_DIR + '/visual_bell'; const DESKTOP_INTERFACE_SCHEMA = 'org.gnome.desktop.interface'; const KEY_GTK_THEME = 'gtk-theme'; const KEY_ICON_THEME = 'icon-theme'; +const KEY_TEXT_SCALING_FACTOR = 'text-scaling-factor'; const HIGH_CONTRAST_THEME = 'HighContrast'; -function getDPIFromX() { - let screen = global.get_gdk_screen(); - if (screen) { - let width_dpi = (screen.get_width() / (screen.get_width_mm() / 25.4)); - let height_dpi = (screen.get_height() / (screen.get_height_mm() / 25.4)); - if (width_dpi < DPI_LOW_REASONABLE_VALUE - || width_dpi > DPI_HIGH_REASONABLE_VALUE - || height_dpi < DPI_LOW_REASONABLE_VALUE - || height_dpi > DPI_HIGH_REASONABLE_VALUE) - return DPI_DEFAULT; - else - return (width_dpi + height_dpi) / 2; - } - return DPI_DEFAULT; -} - function ATIndicator() { this._init.apply(this, arguments); } @@ -194,30 +175,23 @@ ATIndicator.prototype = { }, _buildFontItem: function() { - let settings = new Gio.Settings({ schema: XSETTINGS_SCHEMA }); + let settings = new Gio.Settings({ schema: DESKTOP_INTERFACE_SCHEMA }); - // we assume this never changes (which is not true if resolution - // is changed, but we would need XRandR events for that) - let x_value = getDPIFromX(); - let user_value; - function on_get() { - user_value = settings.get_double(KEY_DPI); - return (user_value - (DPI_FACTOR_LARGE * x_value) > -1); - } - let initial_setting = on_get(); - let default_value = (initial_setting || user_value == 0) ? x_value : user_value; + let factor = settings.get_double(KEY_TEXT_SCALING_FACTOR); + let initial_setting = (factor > 1.0); let widget = this._buildItemExtended(_("Large Text"), initial_setting, - settings.is_writable(KEY_DPI), + settings.is_writable(KEY_TEXT_SCALING_FACTOR), function (enabled) { if (enabled) - settings.set_double(KEY_DPI, DPI_FACTOR_LARGE * default_value); + settings.set_double(KEY_TEXT_SCALING_FACTOR, + DPI_FACTOR_LARGE); else - settings.set_double(KEY_DPI, default_value); + settings.reset(KEY_TEXT_SCALING_FACTOR); }); - settings.connect('changed::' + KEY_DPI, function() { - let active = on_get(); - default_value = (active || user_value == 0) ? x_value : user_value; + settings.connect('changed::' + KEY_TEXT_SCALING_FACTOR, function() { + let factor = settings.get_double(KEY_TEXT_SCALING_FACTOR); + let active = (factor > 1.0); widget.setToggleState(active); }); return widget; diff --git a/js/ui/status/power.js b/js/ui/status/power.js index f3625cc2d..fabb18187 100644 --- a/js/ui/status/power.js +++ b/js/ui/status/power.js @@ -72,7 +72,7 @@ Indicator.prototype = { this._hasPrimary = false; this._primaryDeviceId = null; - this._batteryItem = new PopupMenu.PopupMenuItem(''); + this._batteryItem = new PopupMenu.PopupMenuItem('', { reactive: false }); this._primaryPercentage = new St.Label(); this._batteryItem.addActor(this._primaryPercentage, { align: St.Align.END }); this.menu.addMenuItem(this._batteryItem); @@ -136,17 +136,6 @@ Indicator.prototype = { } this._primaryDeviceId = device_id; - if (this._primaryDeviceId) { - this._batteryItem.actor.reactive = true; - this._batteryItem.actor.can_focus = true; - this._batteryItem.connect('activate', function(item) { - Util.spawn(['gnome-power-statistics', '--device', device_id]); - }); - } else { - // virtual device - this._batteryItem.actor.reactive = false; - this._batteryItem.actor.can_focus = false; - } })); }, @@ -168,9 +157,6 @@ Indicator.prototype = { continue; let item = new DeviceItem (devices[i]); - item.connect('activate', function() { - Util.spawn(['gnome-power-statistics', '--device', device_id]); - }); this._deviceItems.push(item); this.menu.addMenuItem(item, this._otherDevicePosition + position); position++; @@ -216,7 +202,7 @@ DeviceItem.prototype = { __proto__: PopupMenu.PopupBaseMenuItem.prototype, _init: function(device) { - PopupMenu.PopupBaseMenuItem.prototype._init.call(this); + PopupMenu.PopupBaseMenuItem.prototype._init.call(this, { reactive: false }); let [device_id, device_type, icon, percentage, state, time] = device; diff --git a/js/ui/zeitgeistSearch.js b/js/ui/zeitgeistSearch.js index efca78bc0..4fad11efc 100644 --- a/js/ui/zeitgeistSearch.js +++ b/js/ui/zeitgeistSearch.js @@ -84,7 +84,10 @@ ZeitgeistAsyncSearchProvider.prototype = { getResultMeta: function(resultId) { return { 'id': ZeitgeistSubjectCache[resultId].uri, 'name': ZeitgeistSubjectCache[resultId].name, - 'icon': ZeitgeistSubjectCache[resultId].createIcon(48) }; + 'createIcon': function (size) { + return ZeitgeistSubjectCache[resultId].createIcon(size); + }, + }; }, activateResult: function(resultId) { diff --git a/tools/build/gnome-shell-build-setup.sh b/tools/build/gnome-shell-build-setup.sh index 99e741799..f568fc27b 100755 --- a/tools/build/gnome-shell-build-setup.sh +++ b/tools/build/gnome-shell-build-setup.sh @@ -63,7 +63,7 @@ fi # spidermonkey ({mozilla,firefox,xulrunner}-js), startup-notification, # xdamage, icon-naming-utils, upower, libtool-ltdl, libvorbis, # libgcrypt, libtasn1, libgnome-keyring, libgtop, cups, -# evolution-data-server libusb +# libusb, libproxy, libdb, libproxy, sqlite # # Non-devel packages needed by gnome-shell and its deps: # glxinfo, gstreamer-plugins-base, gstreamer-plugins-good, @@ -82,8 +82,8 @@ if test "x$system" = xUbuntu -o "x$system" = xDebian -o "x$system" = xLinuxMint xulrunner-dev libcroco3-dev libgstreamer0.10-dev gstreamer0.10-plugins-base gstreamer0.10-plugins-good libltdl-dev libvorbis-dev iso-codes libgnome-keyring-dev libusb-1.0-0-dev - libupower-glib-dev libcups2-dev evolution-data-server-dev - libecal1.2-dev libedataserverui1.2-dev + libupower-glib-dev libcups2-dev libproxy-dev libdb-dev libproxy-dev + libsqlite3-dev " if apt-cache show autopoint > /dev/null 2> /dev/null; then @@ -121,7 +121,8 @@ if test "x$system" = xFedora ; then startup-notification-devel zenity icon-naming-utils upower-devel libtool-ltdl-devel libvorbis-devel iso-codes-devel libgcrypt-devel libtasn1-devel libtasn1-tools libusb1-devel - libgnome-keyring-devel libgtop2-devel cups-devel evolution-data-server-devel + libgnome-keyring-devel libgtop2-devel cups-devel db4-devel libproxy-devel + sqlite-devel " if expr $version \>= 14 > /dev/null ; then diff --git a/tools/build/gnome-shell.modules b/tools/build/gnome-shell.modules index b32104ef5..e9f1407a8 100644 --- a/tools/build/gnome-shell.modules +++ b/tools/build/gnome-shell.modules @@ -200,6 +200,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -223,6 +260,7 @@ +