~ubuntu-branches/ubuntu/oneiric/thunderbird/oneiric-updates

« back to all changes in this revision

Viewing changes to debian/eds/modules/LibEBookClientView.jsm

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2011-08-09 19:28:44 UTC
  • mfrom: (1.6.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20110809192844-tvmhdsvt1hirk9s8
Tags: 6.0~b3+build1+nobinonly-0ubuntu1
* New upstream release from the beta channel (THUNDERBIRD_6_0b3_BUILD1)

* Update globalmenu-extension to 1.9.1
  - Drop Firefox 4 and 5 compatibility
  - Drop the uIGlobalMenuLoader interface, as it never served any purpose
  - Rework how we synchronize attributes to menuitems from their
    corresponding command nodes
  - Don't synchronize attributes from command nodes associated with menus
  - Rework how we handle document insertion/removals. Rather than keeping
    our dbusmenu structure in sync at all times, and routing the events
    to the correct node in the tree, we just mark the menu as invalid and
    rebuild it from scratch next time it opens. This should reduce problems
    like LP: #821391
  - Honour the collapsed attribute. This solves a problem with multiple
    seprators appearing adjacent to each other in the greasemonkey menu
  - Store all booleans as PRPackedBool rather than PRBool
  - Add error checking around uGlobalMenuDocListener
  - Make uGlobalMenuDummy more robust, and use it as a fallback if the
    real menuitem fails to initialize. This should help reduce problems
    like LP: #831391
  - If a menu fails to build correctly, mark it invalid and stop processing
    document events on it (which should avoid the crash in LP: #831391)
  - Invalidate a menu if we fail to insert/remove a node whilst processing
    a document event (which should help avoid the crash in LP: #831391)
  - Make uGlobalMenu::CanOpen() respect the collapsed attribute
  - Allow more than one menu node to register as a listener for any DOM
    node. In the case of command nodes, these may be shared across multiple
    menu nodes, with each one interested in receiving events. Previously, we
    just erased the first listener if a second menu node tried to register
    (discovered after adding error checking around uGlobalMenuDocListener)
* Update messagingmenu-extension to r66
  - add an inbox-only mode
* Refresh shipped locales for new release
* Ship the eds contacts integration extension, based on r80
  - add debian/eds/*
  - update debian/rules
  - update debian/thunderbird.desktop.in
  - update debian/thunderbird.dirs.in
  - update debian/thunderbird.install.in
  - update debian/control
* Move the Unity depends to thunderbird-gnome-support, and make sure we only
  add them for oneiric builds
  - update debian/control
  - update debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 
2
/* ***** BEGIN LICENSE BLOCK *****
 
3
 *       Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
4
 *
 
5
 * The contents of this file are subject to the Mozilla Public License Version
 
6
 * 1.1 (the "License"); you may not use this file except in compliance with
 
7
 * the License. You may obtain a copy of the License at
 
8
 * http://www.mozilla.org/MPL/
 
9
 * 
 
10
 * Software distributed under the License is distributed on an "AS IS" basis,
 
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 
12
 * for the specific language governing rights and limitations under the
 
13
 * License.
 
14
 *
 
15
 * The Original Code is edsintegration.
 
16
 *
 
17
 * The Initial Developer of the Original Code is
 
18
 * Mozilla Corp.
 
19
 * Portions created by the Initial Developer are Copyright (C) 2011
 
20
 * the Initial Developer. All Rights Reserved.
 
21
 *
 
22
 * Contributor(s):
 
23
 * Mike Conley <mconley@mozilla.com>
 
24
 *
 
25
 * Alternatively, the contents of this file may be used under the terms of
 
26
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 
27
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 
28
 * in which case the provisions of the GPL or the LGPL are applicable instead
 
29
 * of those above. If you wish to allow use of your version of this file only
 
30
 * under the terms of either the GPL or the LGPL, and not to allow others to
 
31
 * use your version of this file under the terms of the MPL, indicate your
 
32
 * decision by deleting the provisions above and replace them with the notice
 
33
 * and other provisions required by the GPL or the LGPL. If you do not delete
 
34
 * the provisions above, a recipient may use your version of this file under
 
35
 * the terms of any one of the MPL, the GPL or the LGPL.
 
36
 * 
 
37
 * ***** END LICENSE BLOCK ***** */
 
38
 
 
39
var EXPORTED_SYMBOLS = [ "LibEBookClientView" ];
 
40
 
 
41
const Cu = Components.utils;
 
42
const Cc = Components.classes;
 
43
const Ci = Components.interfaces;
 
44
 
 
45
Cu.import("resource://gre/modules/ctypes.jsm");
 
46
Cu.import("resource://gre/modules/Services.jsm");
 
47
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
48
 
 
49
Cu.import("resource://edsintegration/LibGLib.jsm");
 
50
Cu.import("resource://edsintegration/libebook-ctypes.jsm");
 
51
Cu.import("resource://edsintegration/LibEBookClient.jsm");
 
52
 
 
53
 
 
54
XPCOMUtils.defineLazyGetter(this, "EBookClientView", function() {
 
55
  return ctypes.StructType("EBookClientView");
 
56
});
 
57
 
 
58
XPCOMUtils.defineLazyGetter(this, "EBookClient", function() {
 
59
  return ctypes.StructType("EBookClient");
 
60
});
 
61
 
 
62
 
 
63
XPCOMUtils.defineLazyGetter(this, "EBookBookViewAsyncCallback", function() {
 
64
  var EBookBookViewAsyncCallback = ctypes.FunctionType(ctypes.default_abi,
 
65
                                                       ctypes.void_t,
 
66
                                                      [EBookClient.ptr,
 
67
                                                       LibGLib.GError.ptr,
 
68
                                                       EBookClientView.ptr,
 
69
                                                       LibGLib.gpointer]);
 
70
  if (!EBookBookViewAsyncCallback)
 
71
    throw "EBookBookViewAsyncCallback is unavailable";
 
72
  return EBookBookViewAsyncCallback.ptr;
 
73
});
 
74
 
 
75
XPCOMUtils.defineLazyGetter(this, "e_book_client_view_start", function() {
 
76
  var e_book_client_view_start =
 
77
    libebook.declare("e_book_client_view_start",
 
78
                     ctypes.default_abi,
 
79
                     ctypes.void_t,
 
80
                     EBookClientView.ptr,
 
81
                     LibGLib.GError.ptr.ptr);
 
82
  if (!e_book_client_view_start)
 
83
    throw "e_book_client_view_start is unavailable";
 
84
 
 
85
  return e_book_client_view_start;
 
86
});
 
87
 
 
88
var LibEBookClientView = {
 
89
  EBookClientView: EBookClientView,
 
90
  BookViewAsyncCallback:  EBookBookViewAsyncCallback,
 
91
 
 
92
  start: function LEBV_start(aView, aErrPtr) {
 
93
    e_book_client_view_start(aView, aErrPtr);
 
94
  },
 
95
 
 
96
  castPtr: function LEBV_castPtr(aPointer) {
 
97
    return ctypes.cast(aPointer, EBookView.ptr);
 
98
  }
 
99
}