Merge lp:~ubuntu-branches/ubuntu/oneiric/gnome-shell/oneiric-201109221311 into lp:ubuntu/oneiric/gnome-shell

Proposed by Ubuntu Package Importer
Status: Needs review
Proposed branch: lp:~ubuntu-branches/ubuntu/oneiric/gnome-shell/oneiric-201109221311
Merge into: lp:ubuntu/oneiric/gnome-shell
Diff against target: 564 lines (+544/-0) (has conflicts)
2 files modified
data/org.gnome.shell.gschema.xml.in (+4/-0)
js/ui/keyboard.js (+540/-0)
Text conflict in data/org.gnome.shell.gschema.xml.in
Contents conflict in js/ui/keyboard.js
To merge this branch: bzr merge lp:~ubuntu-branches/ubuntu/oneiric/gnome-shell/oneiric-201109221311
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+76580@code.launchpad.net

Description of the change

The package importer has detected a possible inconsistency between the package history in the archive and the history in bzr. As the archive is authoritative the importer has made lp:ubuntu/oneiric/gnome-shell reflect what is in the archive and the old bzr branch has been pushed to lp:~ubuntu-branches/ubuntu/oneiric/gnome-shell/oneiric-201109221311. This merge proposal was created so that an Ubuntu developer can review the situations and perform a merge/upload if necessary. There are three typical cases where this can happen.
  1. Where someone pushes a change to bzr and someone else uploads the package without that change. This is the reason that this check is done by the importer. If this appears to be the case then a merge/upload should be done if the changes that were in bzr are still desirable.
  2. The importer incorrectly detected the above situation when someone made a change in bzr and then uploaded it.
  3. The importer incorrectly detected the above situation when someone just uploaded a package and didn't touch bzr.

If this case doesn't appear to be the first situation then set the status of the merge proposal to "Rejected" and help avoid the problem in future by filing a bug at https://bugs.launchpad.net/udd linking to this merge proposal.

(this is an automatically generated message)

To post a comment you must log in.

Unmerged revisions

44. By Martin Pitt

releasing version 3.1.92-0ubuntu1

43. By Martin Pitt

debian/control.in: Add libjson-glib-dev build dependency as per
configure.ac.

42. By Martin Pitt

* New upstream release.
  - Adds browser plugin for installing, enabling, disabling, and
    uninstalling shell extensions. (Note that extensions.gnome.org
    isn't yet in operation.)
  - Lots of bugfixes
* debian/control.in:
  - Depend on caribou libraries
  - Recommend gnome-session-fallback, needed when graphics support
    test fails (LP: #852950)
  - Bump minimum gjs dependency to 1.29.18 and minimum mutter
    to 3.1.92
* debian/patches/01_favorite_apps.patch: Updated
* debian/patches/04_build-without-caribou.patch: Dropped

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure'
2=== modified file 'configure.ac'
3=== modified file 'data/org.gnome.shell.gschema.xml.in'
4--- data/org.gnome.shell.gschema.xml.in 2011-09-22 08:50:45 +0000
5+++ data/org.gnome.shell.gschema.xml.in 2011-09-22 13:16:23 +0000
6@@ -31,7 +31,11 @@
7 </_description>
8 </key>
9 <key name="favorite-apps" type="as">
10+<<<<<<< TREE
11 <default>[ 'firefox.desktop', 'thunderbird.desktop', 'empathy.desktop', 'banshee.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop' ]</default>
12+=======
13+ <default>[ 'epiphany.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop' ]</default>
14+>>>>>>> MERGE-SOURCE
15 <_summary>List of desktop file IDs for favorite applications</_summary>
16 <_description>
17 The applications corresponding to these identifiers
18
19=== added file 'js/ui/keyboard.js'
20--- js/ui/keyboard.js 1970-01-01 00:00:00 +0000
21+++ js/ui/keyboard.js 2011-09-22 13:16:23 +0000
22@@ -0,0 +1,540 @@
23+/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
24+
25+const Caribou = imports.gi.Caribou;
26+const Clutter = imports.gi.Clutter;
27+const DBus = imports.dbus;
28+const Gdk = imports.gi.Gdk;
29+const Gio = imports.gi.Gio;
30+const GLib = imports.gi.GLib;
31+const Lang = imports.lang;
32+const Shell = imports.gi.Shell;
33+const St = imports.gi.St;
34+
35+const BoxPointer = imports.ui.boxpointer;
36+const Main = imports.ui.main;
37+const MessageTray = imports.ui.messageTray;
38+
39+const KEYBOARD_SCHEMA = 'org.gnome.shell.keyboard';
40+const KEYBOARD_TYPE = 'keyboard-type';
41+
42+const A11Y_APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
43+const SHOW_KEYBOARD = 'screen-keyboard-enabled';
44+
45+// Key constants taken from Antler
46+// FIXME: ought to be moved into libcaribou
47+const PRETTY_KEYS = {
48+ 'BackSpace': '\u232b',
49+ 'space': ' ',
50+ 'Return': '\u23ce',
51+ 'Caribou_Prefs': '\u2328',
52+ 'Caribou_ShiftUp': '\u2b06',
53+ 'Caribou_ShiftDown': '\u2b07',
54+ 'Caribou_Emoticons': '\u263a',
55+ 'Caribou_Symbols': '123',
56+ 'Caribou_Symbols_More': '{#*',
57+ 'Caribou_Alpha': 'Abc',
58+ 'Tab': 'Tab',
59+ 'Escape': 'Esc',
60+ 'Control_L': 'Ctrl',
61+ 'Alt_L': 'Alt'
62+};
63+
64+const CaribouKeyboardIface = {
65+ name: 'org.gnome.Caribou.Keyboard',
66+ methods: [ { name: 'Show',
67+ inSignature: 'u',
68+ outSignature: ''
69+ },
70+ { name: 'Hide',
71+ inSignature: 'u',
72+ outSignature: ''
73+ },
74+ { name: 'SetCursorLocation',
75+ inSignature: 'iiii',
76+ outSignature: ''
77+ },
78+ { name: 'SetEntryLocation',
79+ inSignature: 'iiii',
80+ outSignature: ''
81+ } ],
82+ properties: [ { name: 'Name',
83+ signature: 's',
84+ access: 'read' } ]
85+};
86+
87+function Key() {
88+ this._init.apply(this, arguments);
89+}
90+
91+Key.prototype = {
92+ _init : function(key) {
93+ this._key = key;
94+
95+ this.actor = this._makeKey();
96+
97+ this._extended_keys = this._key.get_extended_keys();
98+ this._extended_keyboard = null;
99+
100+ if (this._key.name == "Control_L" || this._key.name == "Alt_L")
101+ this._key.latch = true;
102+
103+ this._key.connect('key-pressed', Lang.bind(this, function ()
104+ { this.actor.checked = true }));
105+ this._key.connect('key-released', Lang.bind(this, function ()
106+ { this.actor.checked = false; }));
107+
108+ if (this._extended_keys.length > 0) {
109+ this._grabbed = false;
110+ this._eventCaptureId = 0;
111+ this._key.connect('notify::show-subkeys', Lang.bind(this, this._onShowSubkeysChanged));
112+ this._boxPointer = new BoxPointer.BoxPointer(St.Side.BOTTOM,
113+ { x_fill: true,
114+ y_fill: true,
115+ x_align: St.Align.START });
116+ // Adds style to existing keyboard style to avoid repetition
117+ this._boxPointer.actor.add_style_class_name('keyboard-subkeys');
118+ this._getExtendedKeys();
119+ this.actor._extended_keys = this._extended_keyboard;
120+ this._boxPointer.actor.hide();
121+ Main.layoutManager.addChrome(this._boxPointer.actor, { visibleInFullscreen: true });
122+ }
123+ },
124+
125+ _makeKey: function () {
126+ let label = this._key.name;
127+
128+ if (label.length > 1) {
129+ let pretty = PRETTY_KEYS[label];
130+ if (pretty)
131+ label = pretty;
132+ else
133+ label = this._getUnichar(this._key);
134+ }
135+
136+ label = GLib.markup_escape_text(label, -1);
137+ let button = new St.Button ({ label: label,
138+ style_class: 'keyboard-key' });
139+
140+ button.key_width = this._key.width;
141+ button.connect('button-press-event', Lang.bind(this, function () { this._key.press(); }));
142+ button.connect('button-release-event', Lang.bind(this, function () { this._key.release(); }));
143+
144+ return button;
145+ },
146+
147+ _getUnichar: function(key) {
148+ let keyval = key.keyval;
149+ let unichar = Gdk.keyval_to_unicode(keyval);
150+ if (unichar) {
151+ return String.fromCharCode(unichar);
152+ } else {
153+ return key.name;
154+ }
155+ },
156+
157+ _getExtendedKeys: function () {
158+ this._extended_keyboard = new St.BoxLayout({ style_class: 'keyboard-layout',
159+ vertical: false });
160+ for (let i = 0; i < this._extended_keys.length; ++i) {
161+ let extended_key = this._extended_keys[i];
162+ let label = this._getUnichar(extended_key);
163+ let key = new St.Button({ label: label, style_class: 'keyboard-key' });
164+ key.extended_key = extended_key;
165+ key.connect('button-press-event', Lang.bind(this, function () { extended_key.press(); }));
166+ key.connect('button-release-event', Lang.bind(this, function () { extended_key.release(); }));
167+ this._extended_keyboard.add(key);
168+ }
169+ this._boxPointer.bin.add_actor(this._extended_keyboard);
170+ },
171+
172+ _onEventCapture: function (actor, event) {
173+ let source = event.get_source();
174+ let type = event.type();
175+
176+ if ((type == Clutter.EventType.BUTTON_PRESS ||
177+ type == Clutter.EventType.BUTTON_RELEASE) &&
178+ this._extended_keyboard.contains(source)) {
179+ source.extended_key.press();
180+ source.extended_key.release();
181+ return false;
182+ }
183+ if (type == Clutter.EventType.BUTTON_PRESS) {
184+ this._boxPointer.actor.hide();
185+ this._ungrab();
186+ return true;
187+ }
188+ return false;
189+ },
190+
191+ _ungrab: function () {
192+ global.stage.disconnect(this._eventCaptureId);
193+ this._eventCaptureId = 0;
194+ this._grabbed = false;
195+ Main.popModal(this.actor);
196+ },
197+
198+ _onShowSubkeysChanged: function () {
199+ if (this._key.show_subkeys) {
200+ this.actor.fake_release();
201+ this._boxPointer.actor.raise_top();
202+ this._boxPointer.setPosition(this.actor, 0.5);
203+ this._boxPointer.show(true);
204+ this.actor.set_hover(false);
205+ if (!this._grabbed) {
206+ Main.pushModal(this.actor);
207+ this._eventCaptureId = global.stage.connect('captured-event', Lang.bind(this, this._onEventCapture));
208+ this._grabbed = true;
209+ }
210+ this._key.release();
211+ } else {
212+ if (this._grabbed)
213+ this._ungrab();
214+ this._boxPointer.hide(true);
215+ }
216+ }
217+};
218+
219+function Keyboard() {
220+ this._init.apply(this, arguments);
221+}
222+
223+Keyboard.prototype = {
224+ _init: function () {
225+ DBus.session.exportObject('/org/gnome/Caribou/Keyboard', this);
226+
227+ this.actor = null;
228+
229+ this._timestamp = global.get_current_time();
230+ Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._redraw));
231+
232+ this._keyboardSettings = new Gio.Settings({ schema: KEYBOARD_SCHEMA });
233+ this._keyboardSettings.connect('changed', Lang.bind(this, this._settingsChanged));
234+ this._a11yApplicationsSettings = new Gio.Settings({ schema: A11Y_APPLICATIONS_SCHEMA });
235+ this._a11yApplicationsSettings.connect('changed', Lang.bind(this, this._settingsChanged));
236+ this._settingsChanged();
237+ },
238+
239+ init: function () {
240+ this._redraw();
241+ },
242+
243+ _settingsChanged: function () {
244+ this._enableKeyboard = this._a11yApplicationsSettings.get_boolean(SHOW_KEYBOARD);
245+ if (!this._enableKeyboard && !this._keyboard)
246+ return;
247+ if (this._enableKeyboard && this._keyboard &&
248+ this._keyboard.keyboard_type == this._keyboardSettings.get_string(KEYBOARD_TYPE))
249+ return;
250+
251+ if (this._keyboard)
252+ this._destroyKeyboard();
253+ if (this._enableKeyboard)
254+ this._setupKeyboard();
255+ else
256+ Main.layoutManager.hideKeyboard(true);
257+ },
258+
259+ _destroyKeyboard: function() {
260+ if (this._keyboardNotifyId)
261+ this._keyboard.disconnect(this._keyboardNotifyId);
262+ if (this._focusNotifyId)
263+ global.stage.disconnect(this._focusNotifyId);
264+ this._keyboard = null;
265+ this.actor.destroy();
266+ this.actor = null;
267+
268+ this._destroySource();
269+ },
270+
271+ _setupKeyboard: function() {
272+ this.actor = new St.BoxLayout({ name: 'keyboard', vertical: true, reactive: true });
273+ Main.layoutManager.keyboardBox.add_actor(this.actor);
274+ Main.layoutManager.trackChrome(this.actor);
275+
276+ this._keyboard = new Caribou.KeyboardModel({ keyboard_type: this._keyboardSettings.get_string(KEYBOARD_TYPE) });
277+ this._groups = {};
278+ this._current_page = null;
279+
280+ // Initialize keyboard key measurements
281+ this._numOfHorizKeys = 0;
282+ this._numOfVertKeys = 0;
283+
284+ this._addKeys();
285+
286+ this._keyboardNotifyId = this._keyboard.connect('notify::active-group', Lang.bind(this, this._onGroupChanged));
287+ this._focusNotifyId = global.stage.connect('notify::key-focus', Lang.bind(this, this._onKeyFocusChanged));
288+ this._createSource();
289+ },
290+
291+ _onKeyFocusChanged: function () {
292+ let focus = global.stage.key_focus;
293+
294+ // Showing an extended key popup will grab focus, but ignore that
295+ if (focus && focus._extended_keys)
296+ return;
297+
298+ if (focus instanceof Clutter.Text)
299+ this.show();
300+ else
301+ this.hide();
302+ },
303+
304+ _addKeys: function () {
305+ let groups = this._keyboard.get_groups();
306+ for (let i = 0; i < groups.length; ++i) {
307+ let gname = groups[i];
308+ let group = this._keyboard.get_group(gname);
309+ group.connect('notify::active-level', Lang.bind(this, this._onLevelChanged));
310+ let layers = {};
311+ let levels = group.get_levels();
312+ for (let j = 0; j < levels.length; ++j) {
313+ let lname = levels[j];
314+ let level = group.get_level(lname);
315+ let layout = new St.BoxLayout({ style_class: 'keyboard-layout',
316+ vertical: true });
317+ this._loadRows(level, layout);
318+ layers[lname] = layout;
319+ this.actor.add(layout, { x_fill: false });
320+
321+ layout.hide();
322+ }
323+ this._groups[gname] = layers;
324+ }
325+
326+ this._setActiveLayer();
327+ },
328+
329+ _getTrayIcon: function () {
330+ let trayButton = new St.Button ({ label: "tray", style_class: 'keyboard-key' });
331+ trayButton.key_width = 1;
332+ trayButton.connect('button-press-event', Lang.bind(this, function () {
333+ Main.messageTray.toggle();
334+ }));
335+
336+ Main.overview.connect('showing', Lang.bind(this, function () {
337+ trayButton.reactive = false;
338+ trayButton.add_style_pseudo_class('grayed');
339+ }));
340+ Main.overview.connect('hiding', Lang.bind(this, function () {
341+ trayButton.reactive = true;
342+ trayButton.remove_style_pseudo_class('grayed');
343+ }));
344+
345+ return trayButton;
346+ },
347+
348+ _addRows : function (keys, layout) {
349+ let keyboard_row = new St.BoxLayout();
350+ for (let i = 0; i < keys.length; ++i) {
351+ let children = keys[i].get_children();
352+ let right_box = new St.BoxLayout({ style_class: 'keyboard-row' });
353+ let left_box = new St.BoxLayout({ style_class: 'keyboard-row' });
354+ for (let j = 0; j < children.length; ++j) {
355+ if (this._numOfHorizKeys == 0)
356+ this._numOfHorizKeys = children.length;
357+ let key = children[j];
358+ let button = new Key(key);
359+
360+ if (key.align == 'right')
361+ right_box.add(button.actor);
362+ else
363+ left_box.add(button.actor);
364+ if (key.name == "Caribou_Prefs") {
365+ key.connect('key-released', Lang.bind(this, this.hide));
366+
367+ // Add new key for hiding message tray
368+ right_box.add(this._getTrayIcon());
369+ }
370+ }
371+ keyboard_row.add(left_box, { expand: true, x_fill: false, x_align: St.Align.START });
372+ keyboard_row.add(right_box, { expand: true, x_fill: false, x_align: St.Align.END });
373+ }
374+ layout.add(keyboard_row);
375+ },
376+
377+ _loadRows : function (level, layout) {
378+ let rows = level.get_rows();
379+ for (let i = 0; i < rows.length; ++i) {
380+ let row = rows[i];
381+ if (this._numOfVertKeys == 0)
382+ this._numOfVertKeys = rows.length;
383+ this._addRows(row.get_columns(), layout);
384+ }
385+
386+ },
387+
388+ _redraw: function () {
389+ if (!this._enableKeyboard)
390+ return;
391+
392+ let monitor = Main.layoutManager.bottomMonitor;
393+ let maxHeight = monitor.height / 3;
394+ this.actor.width = monitor.width;
395+
396+ let layout = this._current_page;
397+ let verticalSpacing = layout.get_theme_node().get_length('spacing');
398+ let padding = layout.get_theme_node().get_length('padding');
399+
400+ let box = layout.get_children()[0].get_children()[0];
401+ let horizontalSpacing = box.get_theme_node().get_length('spacing');
402+ let allHorizontalSpacing = (this._numOfHorizKeys - 1) * horizontalSpacing;
403+ let keyWidth = Math.floor((this.actor.width - allHorizontalSpacing - 2 * padding) / this._numOfHorizKeys);
404+
405+ let allVerticalSpacing = (this._numOfVertKeys - 1) * verticalSpacing;
406+ let keyHeight = Math.floor((maxHeight - allVerticalSpacing - 2 * padding) / this._numOfVertKeys);
407+
408+ let keySize = Math.min(keyWidth, keyHeight);
409+ this.actor.height = keySize * this._numOfVertKeys + allVerticalSpacing + 2 * padding;
410+
411+ let rows = this._current_page.get_children();
412+ for (let i = 0; i < rows.length; ++i) {
413+ let keyboard_row = rows[i];
414+ let boxes = keyboard_row.get_children();
415+ for (let j = 0; j < boxes.length; ++j) {
416+ let keys = boxes[j].get_children();
417+ for (let k = 0; k < keys.length; ++k) {
418+ let child = keys[k];
419+ child.width = keySize * child.key_width;
420+ child.height = keySize;
421+ if (child._extended_keys) {
422+ let extended_keys = child._extended_keys.get_children();
423+ for (let n = 0; n < extended_keys.length; ++n) {
424+ let extended_key = extended_keys[n];
425+ extended_key.width = keySize;
426+ extended_key.height = keySize;
427+ }
428+ }
429+ }
430+ }
431+ }
432+ },
433+
434+ _onLevelChanged: function () {
435+ this._setActiveLayer();
436+ this._redraw();
437+ },
438+
439+ _onGroupChanged: function () {
440+ this._setActiveLayer();
441+ this._redraw();
442+ },
443+
444+ _setActiveLayer: function () {
445+ let active_group_name = this._keyboard.active_group;
446+ let active_group = this._keyboard.get_group(active_group_name);
447+ let active_level = active_group.active_level;
448+ let layers = this._groups[active_group_name];
449+
450+ if (this._current_page != null) {
451+ this._current_page.hide();
452+ }
453+
454+ this._current_page = layers[active_level];
455+ this._current_page.show();
456+ },
457+
458+ _createSource: function () {
459+ if (this._source == null) {
460+ this._source = new KeyboardSource(this);
461+ this._source.setTransient(true);
462+ Main.messageTray.add(this._source);
463+ }
464+ },
465+
466+ _destroySource: function () {
467+ if (this._source) {
468+ this._source.destroy();
469+ this._source = null;
470+ }
471+ },
472+
473+ show: function () {
474+ this._redraw();
475+
476+ Main.layoutManager.showKeyboard();
477+ this._destroySource();
478+ },
479+
480+ hide: function () {
481+ Main.layoutManager.hideKeyboard();
482+ this._createSource();
483+ },
484+
485+ _moveTemporarily: function () {
486+ let currentWindow = global.screen.get_display().focus_window;
487+ let rect = currentWindow.get_outer_rect();
488+
489+ let newX = rect.x;
490+ let newY = 3 * this.actor.height / 2;
491+ currentWindow.move_frame(true, newX, newY);
492+ },
493+
494+ _setLocation: function (x, y) {
495+ if (y >= 2 * this.actor.height)
496+ this._moveTemporarily();
497+ },
498+
499+ // D-Bus methods
500+ Show: function(timestamp) {
501+ if (timestamp - this._timestamp < 0)
502+ return;
503+
504+ this._timestamp = timestamp;
505+ this.show();
506+ },
507+
508+ Hide: function(timestamp) {
509+ if (timestamp - this._timestamp < 0)
510+ return;
511+
512+ this._timestamp = timestamp;
513+ this.hide();
514+ },
515+
516+ SetCursorLocation: function(x, y, w, h) {
517+ this._setLocation(x, y);
518+ },
519+
520+ SetEntryLocation: function(x, y, w, h) {
521+ this._setLocation(x, y);
522+ },
523+
524+ get Name() {
525+ return 'gnome-shell';
526+ }
527+};
528+DBus.conformExport(Keyboard.prototype, CaribouKeyboardIface);
529+
530+function KeyboardSource() {
531+ this._init.apply(this, arguments);
532+}
533+
534+KeyboardSource.prototype = {
535+ __proto__: MessageTray.Source.prototype,
536+
537+ _init: function(keyboard) {
538+ this._keyboard = keyboard;
539+ MessageTray.Source.prototype._init.call(this, _("Keyboard"));
540+
541+ this._setSummaryIcon(this.createNotificationIcon());
542+ },
543+
544+ createNotificationIcon: function() {
545+ return new St.Icon({ icon_name: 'input-keyboard',
546+ icon_type: St.IconType.SYMBOLIC,
547+ icon_size: this.ICON_SIZE });
548+ },
549+
550+ handleSummaryClick: function() {
551+ let event = Clutter.get_current_event();
552+ if (event.type() != Clutter.EventType.BUTTON_RELEASE)
553+ return false;
554+
555+ this.open();
556+ return true;
557+ },
558+
559+ open: function() {
560+ this._keyboard.show();
561+ }
562+};
563
564=== renamed file 'js/ui/keyboard.js' => 'js/ui/keyboard.js.THIS'

Subscribers

People subscribed via source and target branches

to all changes: