Closed Bug 258217 Opened 20 years ago Closed 20 years ago

Windows DDE code should extract application name from nsXREAppData

Categories

(SeaMonkey :: UI Design, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8beta1

People

(Reporter: darin.moz, Assigned: darin.moz)

References

()

Details

Attachments

(1 file, 1 obsolete file)

The Windows DDE code should extract the application's name from nsXREAppData. 
Currently, it inspects the current EXE's resource section for the application's
name.  This makes it difficult to override the application's name at runtime,
which is something XULRunner needs.
Target Milestone: --- → mozilla1.8beta
Attached patch v1 patch (obsolete) — Splinter Review
Very simple patch.
Attachment #158127 - Flags: review?(bsmedberg)
Comment on attachment 158127 [details] [diff] [review]
v1 patch

0) This is currently differentiated between debug/not-debug. Do we care?
http://lxr.mozilla.org/mozilla/source/browser/app/splash.rc#51

1) fix OS/2 also:
http://lxr.mozilla.org/mozilla/source/toolkit/xre/nsNativeAppSupportOS2.cpp#758

2) remove the stringtable entries which are no longer needed:
http://lxr.mozilla.org/mozilla/search?string=dde_application_name

(everything except for xpfe/)
Attachment #158127 - Flags: review?(bsmedberg) → review+
> 0) This is currently differentiated between debug/not-debug. Do we care?
> http://lxr.mozilla.org/mozilla/source/browser/app/splash.rc#51

Yeah, I thought about that too.. I think it probably isn't worth concerning
ourselves with that.  Folks can use MOZ_NO_REMOTE=1 or even -app if they care ;-)

Moreover, we don't make such a distinction for SeaMonkey today.


> 1) fix OS/2 also:

yup


> 2) remove the stringtable entries which are no longer needed:

right, i meant to include that in this patch :-/
Attachment #158127 - Attachment is obsolete: true
fixed-on-trunk
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Blocks: 257162
Reopening as this breaks Win32/MingW/cygwin builds :-

e:/mozilla/source/thunderbird/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp: In
constructor `Mutex::Mutex(const char*)':
e:/mozilla/source/thunderbird/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp:138:
 warning: converting of negative value `-0x000000001' to `DWORD'
e:/mozilla/source/thunderbird/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp: In
destructor `Mutex::~Mutex()':
e:/mozilla/source/thunderbird/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp:149:
 warning: unused variable 'rc'
e:/mozilla/source/thunderbird/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp: In
member function `void Mutex::Unlock()':
e:/mozilla/source/thunderbird/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp:177:
 warning: converting of negative value `-0x000000001' to `DWORD'
e:/mozilla/source/thunderbird/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp: In
member function `virtual nsresult nsNativeAppSupportWin::StartDDE()':
e:/mozilla/source/thunderbird/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp:727:
 error: invalid conversion from `const char* const' to `CHAR*'
e:/mozilla/source/thunderbird/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp: In
static member function `static void nsNativeAppSupportWin::ParseDDEArg(HSZ__*, i
nt, nsCString&)':
e:/mozilla/source/thunderbird/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp:1212
: warning: passing NULL used for non-pointer converting 4 of `DWORD DdeQueryStri
ngA(DWORD, HSZ__*, CHAR*, DWORD, int)'
e:/mozilla/source/thunderbird/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp: At
global scope:
e:/mozilla/source/thunderbird/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp:868:
 warning: 'nsCString uTypeDesc(UINT)' defined but not used
e:/mozilla/source/thunderbird/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp:871:
 warning: 'nsCString hszValue(DWORD, HSZ__*)' defined but not used
make[4]: *** [nsNativeAppSupportWin.o] Error 1
make[4]: Leaving directory `/cygdrive/e/mozilla/source/thunderbird/mozilla/toolk
it/xre'
make[3]: *** [libs] Error 2
make[3]: Leaving directory `/cygdrive/e/mozilla/source/thunderbird/mozilla/toolk
it'
make[2]: *** [libs] Error 2
make[2]: Leaving directory `/cygdrive/e/mozilla/source/thunderbird/mozilla'
make[1]: *** [alldep] Error 2
make[1]: Leaving directory `/cygdrive/e/mozilla/source/thunderbird/mozilla'
make: *** [alldep] Error 2
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
fix for MingW bustage checked in.  where's the MingW firefox tinderbox?

marking FIXED again.
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
All working again....thanks.
Component: XP Miscellany → XP Apps: GUI Features
Product: Core → Mozilla Application Suite
This patch was never checked into the Aviary Branch for OS/2.  I found while
building Firefox and Sunbird on OS/2 from the trunk:
E:/cvs/work/mozilla/toolkit/xre/nsNativeAppSupportOS2.cpp: In member function `
   virtual nsresult nsNativeAppSupportOS2::StartDDE()':
E:/cvs/work/mozilla/toolkit/xre/nsNativeAppSupportOS2.cpp:882: error: invalid
   conversion from `const char* const' to `char*'
make.exe[1]: *** [nsNativeAppSupportOS2.o] Error 1
make.exe[1]: Leaving directory `E:/cvs/work/mozilla/ffobj/toolkit/xre'

NS_ENSURE_TRUE( ( mApplication = WinDdeCreateStringHandle( gAppData->appName,
CP_WINANSI ) ) && InitTopicStrings(),
                    NS_ERROR_FAILURE );

WinDdeCreateStringHandle is expecting a char* but is getting a const char is
what I think the problem is.  I don't know enough C to get further than that.
Andy
Ok, I found the fix for mingw fixes the issue on OS/2 as well.
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: