summaryrefslogtreecommitdiffstats
path: root/widget/gtk/nsWidgetFactory.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-06-09 16:22:26 +0200
committerGitHub <noreply@github.com>2020-06-09 16:22:26 +0200
commit907530e8669d40c1ff59c2855afcf669fe724263 (patch)
tree40312a1ab94ab5e6a3d155e62136309ff4b5acfd /widget/gtk/nsWidgetFactory.cpp
parentad6ce890dc38fe71df1c55958aed3128a711fb5a (diff)
parentd18faf81938c947f1d02feab2c394b8135f88d8f (diff)
downloadUXP-907530e8669d40c1ff59c2855afcf669fe724263.tar
UXP-907530e8669d40c1ff59c2855afcf669fe724263.tar.gz
UXP-907530e8669d40c1ff59c2855afcf669fe724263.tar.lz
UXP-907530e8669d40c1ff59c2855afcf669fe724263.tar.xz
UXP-907530e8669d40c1ff59c2855afcf669fe724263.zip
Merge pull request #1584 from Lootyhoof/global-menu
Add global menubar support for GTK
Diffstat (limited to 'widget/gtk/nsWidgetFactory.cpp')
-rw-r--r--widget/gtk/nsWidgetFactory.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp
index 7e4274377..a1508d1d6 100644
--- a/widget/gtk/nsWidgetFactory.cpp
+++ b/widget/gtk/nsWidgetFactory.cpp
@@ -49,6 +49,8 @@
#include "GfxInfoX11.h"
#endif
+#include "nsNativeMenuService.h"
+
#include "nsNativeThemeGTK.h"
#include "nsIComponentRegistrar.h"
@@ -121,6 +123,9 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(GfxInfo, Init)
}
#endif
+NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsNativeMenuService,
+ nsNativeMenuService::GetInstanceForServiceManager)
+
#ifdef NS_PRINTING
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecGTK)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintOptionsGTK, Init)
@@ -223,6 +228,7 @@ NS_DEFINE_NAMED_CID(NS_IMAGE_TO_PIXBUF_CID);
NS_DEFINE_NAMED_CID(NS_IDLE_SERVICE_CID);
NS_DEFINE_NAMED_CID(NS_GFXINFO_CID);
#endif
+NS_DEFINE_NAMED_CID(NS_NATIVEMENUSERVICE_CID);
static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
@@ -258,6 +264,7 @@ static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
{ &kNS_IDLE_SERVICE_CID, false, nullptr, nsIdleServiceGTKConstructor },
{ &kNS_GFXINFO_CID, false, nullptr, mozilla::widget::GfxInfoConstructor },
#endif
+ { &kNS_NATIVEMENUSERVICE_CID, true, NULL, nsNativeMenuServiceConstructor },
{ nullptr }
};
@@ -295,6 +302,7 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
{ "@mozilla.org/widget/idleservice;1", &kNS_IDLE_SERVICE_CID },
{ "@mozilla.org/gfx/info;1", &kNS_GFXINFO_CID },
#endif
+ { "@mozilla.org/widget/nativemenuservice;1", &kNS_NATIVEMENUSERVICE_CID },
{ nullptr }
};