~ubuntu-branches/ubuntu/oneiric/thunderbird/oneiric-proposed

« back to all changes in this revision

Viewing changes to debian/globalmenu/components/src/uGlobalMenuDocListener.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2011-07-01 18:01:04 UTC
  • Revision ID: james.westby@ubuntu.com-20110701180104-d0r0qgp71f5goi3e
Tags: 5.0+build1+nobinonly-0ubuntu4
* Update globalmenu-extension to 1.7
  - Fixes LP: #797680 - "thunderbird -addressbook" and "thunderbird -compose"
    open a window without putting the menu in the panel, because the menu
    loader is started from the chrome overlay in the main window. Add the
    loader to the profile-after-change category instead
  - Fixes LP: #779905 - menubar sometimes appears inside the window rather
    than the panel, due to a startup race
* Apply some changes to the messagingmenu-extension:
  - Ignore new messages in archive folders
  - Don't request attention for messages which aren't starred and aren't
    addressed directly to the recipient
  - Always show messaging indicator shortcuts, even when we have a desktop
    file which has them

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#include <nsIDocument.h>
43
43
#include <nsIAtom.h>
44
44
#include <nsINode.h>
45
 
#if MOZILLA_BRANCH_MAJOR_VERSION >= 2
46
45
#include <mozilla/dom/Element.h>
47
 
#endif
48
46
#include <nsIContent.h>
49
47
#include <nsIDocument.h>
50
48
 
97
95
 
98
96
void
99
97
uGlobalMenuDocListener::AttributeWillChange(nsIDocument *aDocument,
100
 
#if MOZILLA_BRANCH_MAJOR_VERSION < 2
101
 
                                            nsIContent *aContent,
102
 
#else
103
98
                                            mozilla::dom::Element *aElement,
104
 
#endif
105
99
                                            PRInt32 aNameSpaceID,
106
100
                                            nsIAtom *aAttribute,
107
101
                                            PRInt32 aModType)
111
105
 
112
106
void
113
107
uGlobalMenuDocListener::AttributeChanged(nsIDocument *aDocument,
114
 
#if MOZILLA_BRANCH_MAJOR_VERSION < 2
115
 
                                         nsIContent *aElement,
116
 
#else
117
108
                                         mozilla::dom::Element *aElement,
118
 
#endif
119
109
                                         PRInt32 aNameSpaceID,
120
110
                                         nsIAtom *aAttribute,
121
 
#if MOZILLA_BRANCH_MAJOR_VERSION < 2
122
 
                                         PRInt32 aModType,
123
 
                                         PRUint32 aStateMask)
124
 
#else
125
111
                                         PRInt32 aModType)
126
 
#endif
127
112
{
128
113
  if (!aElement)
129
114
    return;
136
121
void
137
122
uGlobalMenuDocListener::ContentAppended(nsIDocument *aDocument,
138
123
                                        nsIContent *aContainer,
139
 
#if MOZILLA_BRANCH_MAJOR_VERSION >= 2
140
124
                                        nsIContent *aFirstNewContent,
141
 
#endif
142
125
                                        PRInt32 aNewIndexInContainer)
143
126
{
144
 
#if MOZILLA_BRANCH_MAJOR_VERSION < 2
145
 
  PRUint32 count = aContainer->GetChildCount();
146
 
  while ((PRUint32)aNewIndexInContainer < count) {
147
 
    nsIContent *cur = aContainer->GetChildAt(aNewIndexInContainer);
148
 
#else
149
127
  for (nsIContent* cur = aFirstNewContent; cur; cur = cur->GetNextSibling()) {
150
 
#endif
151
128
    ContentInserted(aDocument, aContainer, cur, aNewIndexInContainer);
152
129
    aNewIndexInContainer++;
153
130
  }
180
157
uGlobalMenuDocListener::ContentRemoved(nsIDocument *aDocument,
181
158
                                       nsIContent *aContainer,
182
159
                                       nsIContent *aChild,
183
 
#if MOZILLA_BRANCH_MAJOR_VERSION < 2
184
 
                                       PRInt32 aIndexInContainer)
185
 
#else
186
160
                                       PRInt32 aIndexInContainer,
187
161
                                       nsIContent *aPreviousSibling)
188
 
#endif
189
162
{
190
163
  if (!aContainer)
191
164
    return;