Closed
Bug 115085
Opened 24 years ago
Closed 24 years ago
GTKMozEmbed does not support custom directory service providers
Categories
(Core Graveyard :: Embedding: GTK Widget, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jcorwin, Assigned: blizzard)
Details
Attachments
(6 files)
|
153 bytes,
patch
|
Details | Diff | Splinter Review | |
|
241 bytes,
patch
|
Details | Diff | Splinter Review | |
|
222 bytes,
patch
|
Details | Diff | Splinter Review | |
|
521 bytes,
patch
|
Details | Diff | Splinter Review | |
|
3.95 KB,
patch
|
Details | Diff | Splinter Review | |
|
4.23 KB,
patch
|
mkaply
:
review+
blizzard
:
superreview+
|
Details | Diff | Splinter Review |
gtkmozembed does not currently allow one to pass a custom
nsIDirectoryServiceProvider to NS_InitEmbedding. This patch adds support for
this feature.
Changes to gtkmozembed_internal.h:
25a26
> #include <nsXPCOM.h>
35c36
<
---
> extern void gtk_moz_embed_set_directory_service_provider
(nsIDirectoryServiceProvider * appFileLocProvider);
Changes to gtkmozembed2.cpp:
41a42,43
> class nsIDirectoryServiceProvider;
>
707a710,714
> }
>
> void
> gtk_moz_embed_set_directory_service_provider(nsIDirectoryServiceProvider *
appFileLocProvider) {
> EmbedPrivate::SetDirectoryServiceProvider
Changes to EmbedPrivate.h:
47a48
> class nsIDirectoryServiceProvider;
69a71
> static void SetDirectoryServiceProvider (nsIDirectoryServiceProvider *
appFileLocProvider);
135a138,139
>
> static nsIDirectoryServiceProvider * sAppFileLocProvider
Changes to EmbedPrivate.cpp:
74a75
> nsIDirectoryServiceProvider *EmbedPrivate::sAppFileLocProvider = nsnull;
347c348
< rv = NS_InitEmbedding(binDir, nsnull);
---
> rv = NS_InitEmbedding(binDir, sAppFileLocProvider);
428a430,441
> }
>
> void
> EmbedPrivate::SetDirectoryServiceProvider(nsIDirectoryServiceProvider *
appFileLocProvider)
> {
> if (sAppFileLocProvider)
> NS_IF_RELEASE(sAppFileLocProvider);
>
> if (appFileLocProvider) {
> sAppFileLocProvider = appFileLocProvider;
> NS_IF_ADDREF(sAppFileLocProvider);
> }
Comment 1•24 years ago
|
||
confirm + keywords.
jcorwin, would you mind reattaching your diff using "create a new attachment"?
thanks.
| Reporter | ||
Comment 2•24 years ago
|
||
| Reporter | ||
Comment 3•24 years ago
|
||
| Reporter | ||
Comment 4•24 years ago
|
||
| Reporter | ||
Comment 5•24 years ago
|
||
| Assignee | ||
Comment 6•24 years ago
|
||
Wow, I can't read that at all. Try using 'cvs diff -u' in the
embedding/browser/gtk/src directory and you don't have to do it once for each
file. Plus, it makes it much more readable.
| Reporter | ||
Comment 7•24 years ago
|
||
Sorry about that -- let me know if this file works.
| Assignee | ||
Comment 8•24 years ago
|
||
You don't need to use NS_IF_* in SetDirectoryServiceProvider since the checks
are already in an if() statement. Use NS_ADDREF and NS_RELEASE instead.
Also, should we be releasing the directory service provider after it is used in
NS_InitEmbedding()? If we don't then we've got an extra, useless handle to it
that isn't ever released.
| Reporter | ||
Comment 9•24 years ago
|
||
Yes, I believe you're right on those points.
Here's an updated patch.
| Assignee | ||
Comment 10•24 years ago
|
||
Comment on attachment 61787 [details] [diff] [review]
gtkmozembed diff
r/sr=blizzard
Attachment #61787 -
Flags: superreview+
Comment 11•24 years ago
|
||
Comment on attachment 61787 [details] [diff] [review]
gtkmozembed diff
Please use indententation consistent with the rest of the code (did you use
tabs?)
otherwise r=mkaply
Attachment #61787 -
Flags: review+
| Assignee | ||
Comment 12•24 years ago
|
||
I'll fix any tabbing before I check it in.
| Assignee | ||
Comment 13•24 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•