]>
Commit | Line | Data |
---|---|---|
ca36f83d | 1 | diff -urN kazehakase-0.5.6.orig/configure.ac kazehakase-0.5.6/configure.ac |
2 | --- kazehakase-0.5.6.orig/configure.ac 2008-10-28 16:09:19.000000000 +0100 | |
3 | +++ kazehakase-0.5.6/configure.ac 2008-11-05 12:59:48.000000000 +0100 | |
8bfa11de | 4 | @@ -6,6 +6,11 @@ |
5 | AM_CONFIG_HEADER(config.h) | |
6 | ||
7 | AC_CANONICAL_HOST | |
8 | +AC_DEFINE_UNQUOTED([KZ_HOST],["$host"],[The host]) | |
9 | +AC_DEFINE_UNQUOTED([KZ_HOST_CPU],["$host_cpu"],[The host CPU type]) | |
10 | +AC_DEFINE_UNQUOTED([KZ_HOST_VENDOR],["$host_vendor"],[The host vendor]) | |
11 | +AC_DEFINE_UNQUOTED([KZ_HOST_OS],["$host_os"],[The host OS]) | |
12 | +AC_DEFINE_UNQUOTED([KZ_BUILD_ID],["$(TZ=UTC0 date +'%Y%m%d')"],[The build date]) | |
13 | ||
14 | AC_MSG_CHECKING([for native Win32]) | |
15 | case "$host" in | |
ca36f83d | 16 | diff -urN kazehakase-0.5.6.orig/module/embed/gecko/KzXULAppInfo.cpp kazehakase-0.5.6/module/embed/gecko/KzXULAppInfo.cpp |
17 | --- kazehakase-0.5.6.orig/module/embed/gecko/KzXULAppInfo.cpp 1970-01-01 01:00:00.000000000 +0100 | |
18 | +++ kazehakase-0.5.6/module/embed/gecko/KzXULAppInfo.cpp 2008-11-05 12:59:48.000000000 +0100 | |
8bfa11de | 19 | @@ -0,0 +1,130 @@ |
20 | +/* | |
21 | + * Copyright © 2008 Christian Persch | |
22 | + * | |
23 | + * This program is free software; you can redistribute it and/or modify | |
24 | + * it under the terms of the GNU General Public License as published by | |
25 | + * the Free Software Foundation; either version 2, or (at your option) | |
26 | + * any later version. | |
27 | + * | |
28 | + * This program is distributed in the hope that it will be useful, | |
29 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
30 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
31 | + * GNU General Public License for more details. | |
32 | + * | |
33 | + * You should have received a copy of the GNU General Public License | |
34 | + * along with this program; if not, write to the Free Software | |
35 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
36 | + */ | |
37 | + | |
38 | +#include "mozilla-config.h" | |
39 | +#include "config.h" | |
40 | + | |
41 | +#include <nsStringGlue.h> | |
42 | + | |
43 | +#include "KzXULAppInfo.h" | |
44 | + | |
45 | +NS_IMPL_ISUPPORTS2 (KzXULAppInfo, nsIXULRuntime, nsIXULAppInfo) | |
46 | + | |
47 | +KzXULAppInfo::KzXULAppInfo () | |
48 | + : mLogConsoleErrors (PR_TRUE) | |
49 | +{ | |
50 | +} | |
51 | + | |
52 | +KzXULAppInfo::~KzXULAppInfo () | |
53 | +{ | |
54 | +} | |
55 | + | |
56 | +/* readonly attribute ACString vendor; */ | |
57 | +NS_IMETHODIMP | |
58 | +KzXULAppInfo::GetVendor(nsACString & aVendor) | |
59 | +{ | |
60 | + aVendor.Assign ("Kazehakase"); | |
61 | + return NS_OK; | |
62 | +} | |
63 | + | |
64 | +/* readonly attribute ACString name; */ | |
65 | +NS_IMETHODIMP | |
66 | +KzXULAppInfo::GetName(nsACString & aName) | |
67 | +{ | |
68 | + aName.Assign ("Kazehakase Web Browser"); | |
69 | + return NS_OK; | |
70 | +} | |
71 | + | |
72 | +/* readonly attribute ACString ID; */ | |
73 | +NS_IMETHODIMP | |
74 | +KzXULAppInfo::GetID(nsACString & aID) | |
75 | +{ | |
76 | + aID.Assign ("{8cbd4d83-3182-4d7e-9889-a8d77bf1f205}"); | |
77 | + return NS_OK; | |
78 | +} | |
79 | + | |
80 | +/* readonly attribute ACString version; */ | |
81 | +NS_IMETHODIMP | |
82 | +KzXULAppInfo::GetVersion(nsACString & aVersion) | |
83 | +{ | |
84 | + aVersion.Assign (VERSION); | |
85 | + return NS_OK; | |
86 | +} | |
87 | + | |
88 | +/* readonly attribute ACString appBuildID; */ | |
89 | +NS_IMETHODIMP | |
90 | +KzXULAppInfo::GetAppBuildID(nsACString & aAppBuildID) | |
91 | +{ | |
92 | + aAppBuildID.Assign (KZ_BUILD_ID); | |
93 | + return NS_OK; | |
94 | +} | |
95 | + | |
96 | +/* readonly attribute ACString platformVersion; */ | |
97 | +NS_IMETHODIMP | |
98 | +KzXULAppInfo::GetPlatformVersion(nsACString & aPlatformVersion) | |
99 | +{ | |
100 | + aPlatformVersion.Assign ("1.9"); | |
101 | + return NS_OK; | |
102 | +} | |
103 | + | |
104 | +/* readonly attribute ACString platformBuildID; */ | |
105 | +NS_IMETHODIMP | |
106 | +KzXULAppInfo::GetPlatformBuildID(nsACString & aPlatformBuildID) | |
107 | +{ | |
108 | + aPlatformBuildID.Assign (KZ_BUILD_ID); | |
109 | + return NS_OK; | |
110 | +} | |
111 | + | |
112 | +/* readonly attribute boolean inSafeMode; */ | |
113 | +NS_IMETHODIMP | |
114 | +KzXULAppInfo::GetInSafeMode(PRBool *aInSafeMode) | |
115 | +{ | |
116 | + *aInSafeMode = PR_FALSE; | |
117 | + return NS_OK; | |
118 | +} | |
119 | + | |
120 | +/* attribute boolean logConsoleErrors; */ | |
121 | +NS_IMETHODIMP | |
122 | +KzXULAppInfo::GetLogConsoleErrors(PRBool *aLogConsoleErrors) | |
123 | +{ | |
124 | + *aLogConsoleErrors = mLogConsoleErrors; | |
125 | + return NS_OK; | |
126 | +} | |
127 | + | |
128 | +NS_IMETHODIMP | |
129 | +KzXULAppInfo::SetLogConsoleErrors(PRBool aLogConsoleErrors) | |
130 | +{ | |
131 | + mLogConsoleErrors = aLogConsoleErrors; | |
132 | + return NS_OK; | |
133 | +} | |
134 | + | |
135 | +/* readonly attribute AUTF8String OS; */ | |
136 | +NS_IMETHODIMP | |
137 | +KzXULAppInfo::GetOS(nsACString & aOS) | |
138 | +{ | |
139 | + aOS.Assign (KZ_HOST_OS); | |
140 | + return NS_OK; | |
141 | +} | |
142 | + | |
143 | +/* readonly attribute AUTF8String XPCOMABI; */ | |
144 | +NS_IMETHODIMP | |
145 | +KzXULAppInfo::GetXPCOMABI(nsACString & aXPCOMABI) | |
146 | +{ | |
147 | + aXPCOMABI.Assign (KZ_HOST_CPU "-gcc3"); | |
148 | + return NS_OK; | |
149 | +} | |
ca36f83d | 150 | diff -urN kazehakase-0.5.6.orig/module/embed/gecko/KzXULAppInfo.h kazehakase-0.5.6/module/embed/gecko/KzXULAppInfo.h |
151 | --- kazehakase-0.5.6.orig/module/embed/gecko/KzXULAppInfo.h 1970-01-01 01:00:00.000000000 +0100 | |
152 | +++ kazehakase-0.5.6/module/embed/gecko/KzXULAppInfo.h 2008-11-05 12:59:48.000000000 +0100 | |
8bfa11de | 153 | @@ -0,0 +1,48 @@ |
154 | +/* | |
155 | + * Copyright © 2008 Christian Persch | |
156 | + * | |
157 | + * This program is free software; you can redistribute it and/or modify | |
158 | + * it under the terms of the GNU General Public License as published by | |
159 | + * the Free Software Foundation; either version 2, or (at your option) | |
160 | + * any later version. | |
161 | + * | |
162 | + * This program is distributed in the hope that it will be useful, | |
163 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
164 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
165 | + * GNU General Public License for more details. | |
166 | + * | |
167 | + * You should have received a copy of the GNU General Public License | |
168 | + * along with this program; if not, write to the Free Software | |
169 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
170 | + */ | |
171 | + | |
172 | +#ifndef KZ_XUL_APP_INFO_H | |
173 | +#define KZ_XUL_APP_INFO_H | |
174 | + | |
175 | +#include <nsIXULAppInfo.h> | |
176 | +#include <nsIXULRuntime.h> | |
177 | + | |
178 | +#include <nsAutoPtr.h> | |
179 | +#include <nsCOMPtr.h> | |
180 | + | |
181 | +#define KZ_XUL_APP_INFO_CLASSNAME "Kazehakase XUL App Info" | |
182 | + | |
183 | +/* 3032bcd2-663c-4583-88bf-6f251123f6dd */ | |
184 | +#define KZ_XUL_APP_INFO_CID { 0x3032bcd2, 0x663c, 0x4583, { 0x88, 0xbf, 0x6f, 0x25, 0x11, 0x23, 0xf6, 0xdd } } | |
185 | + | |
186 | +class KzXULAppInfo : public nsIXULAppInfo, | |
187 | + public nsIXULRuntime | |
188 | +{ | |
189 | + public: | |
190 | + KzXULAppInfo (); | |
191 | + virtual ~KzXULAppInfo(); | |
192 | + | |
193 | + NS_DECL_ISUPPORTS | |
194 | + NS_DECL_NSIXULAPPINFO | |
195 | + NS_DECL_NSIXULRUNTIME | |
196 | + | |
197 | + private: | |
198 | + PRBool mLogConsoleErrors; | |
199 | +}; | |
200 | + | |
201 | +#endif /* KZ_XUL_APP_INFO_H */ | |
ca36f83d | 202 | diff -urN kazehakase-0.5.6.orig/module/embed/gecko/Makefile.am kazehakase-0.5.6/module/embed/gecko/Makefile.am |
203 | --- kazehakase-0.5.6.orig/module/embed/gecko/Makefile.am 2008-10-28 16:09:11.000000000 +0100 | |
204 | +++ kazehakase-0.5.6/module/embed/gecko/Makefile.am 2008-11-05 12:59:48.000000000 +0100 | |
8bfa11de | 205 | @@ -61,6 +61,7 @@ |
206 | -I$(MOZILLA_INCLUDE_ROOT)/windowwatcher \ | |
207 | -I$(MOZILLA_INCLUDE_ROOT)/xmlextras \ | |
208 | -I$(MOZILLA_INCLUDE_ROOT)/xpcom \ | |
209 | + -I$(MOZILLA_INCLUDE_ROOT)/xulapp \ | |
210 | $(GTK_CFLAGS) \ | |
211 | -I$(top_builddir)/src \ | |
212 | -I$(top_srcdir)/src \ | |
213 | @@ -76,6 +77,7 @@ | |
214 | kz-gecko-embed.cpp kz-gecko-embed.h \ | |
215 | kz-gecko-single.cpp kz-gecko-single.h \ | |
216 | GtkPromptService.cpp GtkPromptService.h \ | |
217 | + KzXULAppInfo.cpp KzXULAppInfo.h \ | |
218 | mozilla.cpp mozilla.h \ | |
219 | mozilla-prefs.cpp mozilla-prefs.h \ | |
220 | kz-mozdownloader.cpp kz-mozdownloader.h \ | |
ca36f83d | 221 | diff -urN kazehakase-0.5.6.orig/module/embed/gecko/mozilla.cpp kazehakase-0.5.6/module/embed/gecko/mozilla.cpp |
222 | --- kazehakase-0.5.6.orig/module/embed/gecko/mozilla.cpp 2008-10-28 16:09:11.000000000 +0100 | |
223 | +++ kazehakase-0.5.6/module/embed/gecko/mozilla.cpp 2008-11-05 13:01:25.000000000 +0100 | |
224 | @@ -54,6 +54,8 @@ | |
8bfa11de | 225 | #endif |
226 | #ifdef HAVE_GECKO_1_9 | |
227 | # include <nsComponentManagerUtils.h> | |
228 | +# include <nsXULAppAPI.h> | |
229 | +# include "KzXULAppInfo.h" | |
230 | #endif | |
231 | ||
232 | NS_GENERIC_FACTORY_CONSTRUCTOR(KzFilePicker) | |
ca36f83d | 233 | @@ -66,8 +68,19 @@ |
8bfa11de | 234 | NS_GENERIC_FACTORY_CONSTRUCTOR(GtkNSSDialogs) |
235 | #endif | |
ca36f83d | 236 | NS_GENERIC_FACTORY_CONSTRUCTOR(KzMozCookiePromptService) |
8bfa11de | 237 | +#ifdef HAVE_GECKO_1_9 |
238 | +NS_GENERIC_FACTORY_CONSTRUCTOR(KzXULAppInfo) | |
239 | +#endif | |
240 | ||
241 | static const nsModuleComponentInfo sAppComps[] = { | |
242 | +#ifdef HAVE_GECKO_1_9 | |
ca36f83d | 243 | + { |
8bfa11de | 244 | + KZ_XUL_APP_INFO_CLASSNAME, |
245 | + KZ_XUL_APP_INFO_CID, | |
246 | + XULAPPINFO_SERVICE_CONTRACTID, | |
247 | + KzXULAppInfoConstructor | |
248 | + }, | |
249 | +#endif | |
250 | { | |
251 | KZ_DOWNLOAD_CLASSNAME, | |
252 | KZ_DOWNLOAD_CID, |