~mozillateam/thunderbird/thunderbird.quantal

« back to all changes in this revision

Viewing changes to debian/globalmenu/src/uGlobalMenuService.h

  • Committer: Chris Coulson
  • Date: 2013-09-13 12:41:38 UTC
  • Revision ID: chris.coulson@canonical.com-20130913124138-x3jrpzdb4sh41gh0
* New upstream stable release (THUNDERBIRD_24_0_BUILD1)
  - see LP: #1224912 for USN information
* Switch to comm-esr24
* Fix LP: #1064423 - "Submitting your report..." shows missing-icon icon.
  Install the throbber icon in the package
  - update debian/thunderbird.install.in
* Disable the menubar addon
  - update debian/config/mozconfig.in
  - update debian/build/mozbuild.mk
  - update debian/thunderbird-globalmenu.dirs.in
* Drop the menubar addon
  - remove debian/globalmenu
  - update debian/build/mozbuild.mk
  - update debian/config/mozconfig.in
  - update debian/control.in
  - remove debian/thunderbird-globalmenu.dirs.in
  - remove debian/patches/unity-globalmenu-build-support.patch
  - update debian/patches/series.in
* Add native support for the Unity menubar (no addon)
  - add debian/patches/unity-menubar.patch
  - update debian/patches/series.in
* Drop support for building on older than precise
  - update debian/apport/source_thunderbird.py.in
  - update debian/build/mozbuild.mk
  - update debian/config/mozconfig.in
  - update debian/control.in
  - remove debian/patches/add-syspref-dir.patch
  - update debian/patches/series.in
  - remove debian/patches/use-new-yasm-in-lucid.patch
  - update debian/rules
  - update debian/thunderbird-globalmenu.dirs.in
  - update debian/thunderbird.desktop.in
  - update debian/thunderbird.dirs.in
  - update debian/thunderbird.install.in
  - update debian/thunderbird.links.in
  - update debian/thunderbird.postinst.in
  - update debian/thunderbird.postrm.in
  - update debian/thunderbird.preinst.in
* Drop the perl script for preprocessing the quilt series file
  - remove debian/build/enable-dist-patches.pl
  - update debian/build/mozbuild.mk
  - update debian/patches/series.in
* Make sure that SHELL is set in the build environment
  - update debian/build/mozbuild.mk
* Use virtualenv for compare-locales
  - update debian/build/create-tarball.py
  - update debian/build/mozbuild.mk
* Add support for running xpcshell tests as autopkgtests
  - add debian/build/fix-mozinfo-appname.py
  - update debian/build/rules.mk
  - update debian/build/testsuite.mk
  - update debian/config/mozconfig.in to always build with --enable-tests
  - update debian/control.in to add testsuite package
  - update debian/rules
  - add debian/testing/filter_results
  - add debian/testing/results-filter-manifest.json
  - add debian/testing/run_xpcshell_tests
  - add debian/testing/testrunhelper.py
  - add debian/testing/xpcshell-build.ini
  - add debian/tests/control.in
  - add debian/tests/post-process
  - add debian/tests/xpcshell-tests
  - add debian/thunderbird-testsuite.install.in
  - add debian/thunderbird-testsuite.links.in
  - add debian/thunderbird-testsuite.lintian-overrides.in
  - add d/p/test-fixes/mozmill-workaround-shebang-char-limit.patch due to
    the virtenv path exceeding the shebang character limit
  - add d/p/test-fixes/xpcshell-chrome-fix-test_bug848297-with-locale-matchOS.patch
    to disable intl.locale.matchOS, which breaks the test
  - add d/p/test-fixes/xpcshell-contentprefs-no-writes-to-appdir.patch
    to fix tests that write to the application directory
  - add d/p/test-fixes/xpcshell-docshell-no-writes-to-appdir.patch to fix
    tests that write to the application directory
  - add d/p/test-fixes/xpcshell-exthandler-no-writes-to-appdir.patch to
    fix tests that write to the application directory
  - add d/p/test-fixes/xpcshell-search-fix-tests-when-plugins-are-not-in-appdir.patch
    to fix tests that assume searchplugins are installed in the application
    directory
  - add d/p/test-fixes/xpcshell-xunit-output-no-bell.patch so that the
    xpcshell harness does not output the terminal bell character, which
    breaks Jenkins
  - add d/p/test-integration/automation-output-junit-xml.patch
  - add d/p/test-integration/xpcshell-disable-addon-select-dialog-test-for-adt.patch
    to fix some addon tests when the selection UI is disabled
  - add d/p/test-integration/xpcshell-disable-tests-which-need-appdir-write-access.patch
    to disable some tests that need to write to the application directory
  - add d/p/test-integration/xpcshell-dont-return-nonzero-on-test-failure.patch
    so that the xpcshell harness does not return with non-zero when some tests
    fail. We detect failures in the JUnit XML results
  - add d/p/test-integration/xpcshell-output-valid-junit-xml.patch so that
    the JUnit output matches the schema
  - add d/p/test-integration/xpcshell-write-time-for-failed-test.patch so that
    the xpcshell harness writes the time even when the test fails
  - update debian/patches/series
* Drop libthai suggest - this hasn't been needed for a long time
  - update debian/control
* Replace latex-xft-fonts suggest with ttf-lyx (yes, I know this is a
  transitional package since 12.10, but it avoids suggesting a different
  package for each release)
  - update debian/control
* Fix LP: #1093665 - 'Next' button icon points upwards. Thanks to
  Richard Marti for the patch
  - update debian/patches/theme-refresh-messenger-toolbar-icons.patch
* Get rid of the autogenerated debian/patches/series, as we don't use
  it now
  - rename debian/patches/series.in => debian/patches/series
  - update debian/build/mozbuild.mk
  - update debian/source/options
* Build Lightning packages from Thunderbird uploads
  - update debian/config/mozconfig.in
  - update debian/control.in
  - refresh debian/control
  - update debian/rules
* Enforce a strict dependency between Lightning and Thunderbird, make
  sure that Lightning recommends the 2 support addons and that these
  have a strict dependency on Lightning (LP: #1082089)
  - update debian/control{,.in}
* We don't need to install the calendar-timezones addon
  - update debian/rules
  - update debian/control.in
* Make thunderbird-globalmenu a transitional package
  - update debian/control.in
  - update debian/build/mozbuild.mk
* Always build the crash reporter and Breakpad symbols on supported
  architectures, even if it is disabled at run time. Will hopefully avoid
  surprises by the time we reach beta (where the crash reporter is enabled)
  - update debian/rules
  - update debian/build/mozvars.mk
  - update debian/build/mozbuild.mk
* Rename mozbuild.mk => rules.mk and mozvars.mk => config.mk
* Don't blacklist Thunderbird in Apport on unofficial builds
  - update debian/apport/blacklist.in
  - update debian/build/rules.mk
* Remove the executable bit from the testsuite zip file and searchplugins
  - update debian/build/rules.mk
* Silence an embedded-library warning and some image-file-in-usr-lib warnings
  - update debian/thunderbird.lintian-overrides.in
* Update EDS extension to 0.6
* Make the debian/control autogeneration a bit cleaner
  - update debian/build/config.mk
  - update debian/build/dump-langpack-control-entries.pl
  - update debian/build/rules.mk
  - update debian/control.in
* Don't set stuff that is set by dpkg-buildpackage
  - update debian/build/config.mk
  - update debian/build/rules.mk
* Partially revert part 9 of bmo: #782211 (Implement notification API spec),
  to reintroduce native notifications
  - add debian/patches/revert-removal-of-native-notifications.patch
  - update debian/patches/series
* Refresh patches
  - update debian/patches/dont-include-hyphenation-patterns.patch
  - update debian/patches/no_neon_on_arm.patch
  - update debian/patches/theme-refresh-addressbook-toolbar-icons.patch
  - update debian/patches/theme-refresh-compose-toolbar-icons.patch
  - update debian/patches/theme-refresh-messenger-toolbar-icons.patch
* Drop patches
  - remove debian/patches/fix-for-bmo795395.patch (fixed upstream)
  - remove debian/patches/fix-makefile-substitution-bug.patch (doesn't seem
    to be needed anymore)
  - update debian/patches/series

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- Mode: C++; 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 globalmenu-extension.
16
 
 *
17
 
 * The Initial Developer of the Original Code is
18
 
 * Canonical Ltd.
19
 
 * Portions created by the Initial Developer are Copyright (C) 2010
20
 
 * the Initial Developer. All Rights Reserved.
21
 
 *
22
 
 * Contributor(s):
23
 
 * Chris Coulson <chris.coulson@canonical.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
 
#ifndef _U_GLOBALMENUSERVICE_H
40
 
#define _U_GLOBALMENUSERVICE_H
41
 
 
42
 
#include <prtypes.h>
43
 
#include <nsTArray.h>
44
 
#include <nsCOMPtr.h>
45
 
#include <nsIWindowMediatorListener.h>
46
 
#include <nsIWindowMediator.h>
47
 
 
48
 
#include <glib.h>
49
 
#include <gio/gio.h>
50
 
 
51
 
#include "uGlobalMenuBar.h"
52
 
#include "uIGlobalMenuService.h"
53
 
#include "uGlobalMenuUtils.h"
54
 
 
55
 
#define U_GLOBALMENUSERVICE_CID \
56
 
{ 0xa9e41684, 0xbf71, 0x46e3, { 0x93, 0xbf, 0x3c, 0xda, 0x1e, 0xc6, 0x16, 0x49 } }
57
 
 
58
 
#define U_GLOBALMENUSERVICE_CONTRACTID "@canonical.com/globalmenu-service;1"
59
 
 
60
 
class nsIWidget;
61
 
class nsICaseConversion;
62
 
class imgILoader;
63
 
class nsIImageToPixbuf;
64
 
class nsIPrefBranch;
65
 
class nsIXBLService;
66
 
class nsIXPConnect;
67
 
class nsIAtomService;
68
 
 
69
 
class uGlobalMenuService: public uIGlobalMenuService,
70
 
                          public nsIWindowMediatorListener
71
 
{
72
 
public:
73
 
  NS_DECL_ISUPPORTS
74
 
  NS_DECL_UIGLOBALMENUSERVICE
75
 
  NS_DECL_NSIWINDOWMEDIATORLISTENER
76
 
 
77
 
  uGlobalMenuService() : mOnline(false),
78
 
                         mDbusProxy(NULL),
79
 
                         mCancellable(NULL) { };
80
 
  nsresult Init();
81
 
 
82
 
  ~uGlobalMenuService();
83
 
 
84
 
  static uGlobalMenuService* GetInstanceForService();
85
 
 
86
 
  static void Shutdown();
87
 
 
88
 
  static bool RegisterGlobalMenuBar(uGlobalMenuBar *aMenuBar,
89
 
                                    GCancellable *aCancellable,
90
 
                                    PRUint32 aXID, nsACString& aPath);
91
 
 
92
 
  static bool InitService();
93
 
 
94
 
#define SERVICE(Name, Interface, CID) \
95
 
  static Interface* Get##Name();
96
 
#include "uGlobalMenuServiceList.h"
97
 
#undef SERVICE
98
 
 
99
 
private:
100
 
  void SetOnline(bool aOnline);
101
 
  static void ProxyCreatedCallback(GObject *object,
102
 
                                   GAsyncResult *res,
103
 
                                   gpointer userdata);
104
 
  static void NameOwnerChangedCallback(GObject *object,
105
 
                                       GParamSpec *pspec,
106
 
                                       gpointer userdata);
107
 
  static void RegisterWindowCallback(GObject *object,
108
 
                                     GAsyncResult *res,
109
 
                                     gpointer userdata);
110
 
  bool WidgetHasGlobalMenu(nsIWidget *aWidget);
111
 
  void DestroyMenus();
112
 
  void DestroyMenuForWidget(nsIWidget *aWidget);
113
 
 
114
 
  static uGlobalMenuService *sService;
115
 
#define SERVICE(Name, Interface, CID) \
116
 
  static Interface *s##Name;
117
 
#include "uGlobalMenuServiceList.h"
118
 
#undef SERVICE
119
 
  static bool sShutdown;
120
 
 
121
 
  bool mOnline;
122
 
  GDBusProxy *mDbusProxy;
123
 
  GCancellable *mCancellable;
124
 
  nsTArray<nsRefPtr<uGlobalMenuBar> > mMenus;
125
 
  nsTArray<nsCOMPtr<uIGlobalMenuServiceObserver> > mListeners;
126
 
  nsCOMPtr<nsIWindowMediator> mWindowMediator;
127
 
};
128
 
 
129
 
#endif