~ubuntu-branches/ubuntu/trusty/thunderbird/trusty

« back to all changes in this revision

Viewing changes to debian/globalmenu/src/uGlobalMenuUtils.cpp

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2012-06-20 18:21:30 UTC
  • mfrom: (1.6.47)
  • Revision ID: package-import@ubuntu.com-20120620182130-5d855q8fd6puskjt
Tags: 14.0~b3+build1-0ubuntu1
* New upstream release from the beta channel (THUNDERBIRD_14_0b3_BUILD1)

* Update globalmenu-extension to 3.3 prerelease r369
  - Fix LP: #1010580 - update the window event timestamp when handling
    menu events
  - Fix LP: #775080 - Thunderbird with Firetray/MinimizeToTray -
    Global menu disappears
  - Fix LP: #813775 - Hitting an assertion in dbusmenu
* Update eds extension to 0.3.10 for new evolution-data-server ABI
  (thanks to Tim Gardner)
* Update eds dependencies for quantal (LP: #1015723)

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
#include <nsIContent.h>
40
40
#include <nsIAtom.h>
41
 
 
42
 
#include "uGlobalMenuObject.h"
 
41
#include <nsIWidget.h>
 
42
 
 
43
#include <gdk/gdk.h>
 
44
 
43
45
#include "uGlobalMenu.h"
44
46
#include "uGlobalMenuItem.h"
45
47
#include "uGlobalMenuSeparator.h"
56
58
                  nsIContent *aContent,
57
59
                  uGlobalMenuBar *aMenuBar)
58
60
{
59
 
  TRACE_WITH_CONTENT(aContent);
 
61
  TRACEC(aContent);
60
62
 
61
63
  if (!aContent->IsXUL()) {
62
64
    return uGlobalMenuDummy::Create();
80
82
 
81
83
  return menuitem;
82
84
}
 
85
 
 
86
GtkWidget*
 
87
WidgetToGTKWindow(nsIWidget *aWidget)
 
88
{
 
89
  // Get the main GDK drawing window from our nsIWidget
 
90
  GdkWindow *window = static_cast<GdkWindow *>(aWidget->GetNativeData(NS_NATIVE_WINDOW));
 
91
  if (!window)
 
92
    return nsnull;
 
93
 
 
94
  // Get the widget for the main drawing window, which should be a MozContainer
 
95
  gpointer user_data = nsnull;
 
96
  gdk_window_get_user_data(window, &user_data);
 
97
  if (!user_data || !GTK_IS_CONTAINER(user_data))
 
98
    return nsnull;
 
99
 
 
100
  return gtk_widget_get_toplevel(GTK_WIDGET(user_data));
 
101
}