-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The attached patch can catch window closing events. It needs to filter out the ones it's interested in and then force the icon to drop to the tray still in the right conditions. It's still a work in progress so I'm not tagging the bug patch yet.
Alan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGnqFN1FNW1LDdr0IRAuTvAJ4+UDLuwmdYtDypnlY/uNCx+I3jFQCghQIY o5pSScUgQUoMgbMM/UX+yMA= =5e5f -----END PGP SIGNATURE-----
#! /bin/sh /usr/share/dpatch/dpatch-run ## 23_window_close.dpatch by <[EMAIL PROTECTED]> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. @DPATCH@ diff -urNad mozilla-traybiff-1.2.3~/components/nsMessengerFreeDesktopIntegration.cpp mozilla-traybiff-1.2.3/components/nsMessengerFreeDesktopIntegration.cpp --- mozilla-traybiff-1.2.3~/components/nsMessengerFreeDesktopIntegration.cpp 2007-07-19 00:08:13.000000000 +0100 +++ mozilla-traybiff-1.2.3/components/nsMessengerFreeDesktopIntegration.cpp 2007-07-19 00:08:24.000000000 +0100 @@ -395,7 +395,12 @@ if (!iconFile) ResolveIconName(NS_LITERAL_STRING("mozicon16"), NS_LITERAL_STRING(".xpm"), getter_AddRefs(iconFile)); if (iconFile) - iconFile->GetNativePath(mBrandIconPath); + iconFile->GetNativePath(mBrandIconPath); + + nsCOMPtr<nsIWindowMediator> mediator ( do_GetService(NS_WINDOWMEDIATOR_CONTRACTID) ); + NS_ASSERTION(mediator, "no mediator"); + mediator->AddListener(this); + } nsMessengerFreeDesktopIntegration::~nsMessengerFreeDesktopIntegration() @@ -649,6 +654,25 @@ return NS_OK; } +NS_IMETHODIMP +nsMessengerFreeDesktopIntegration::OnWindowTitleChange(nsIXULWindow *window, const PRUnichar *newTitle) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsMessengerFreeDesktopIntegration::OnOpenWindow(nsIXULWindow *window) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsMessengerFreeDesktopIntegration::OnCloseWindow(nsIXULWindow *window) +{ + printf("In window close event\n"); + return NS_OK; +} + nsresult nsMessengerFreeDesktopIntegration::GetStringBundle(const char* src, nsIStringBundle **aBundle) { nsresult rv = NS_OK; diff -urNad mozilla-traybiff-1.2.3~/components/nsMessengerFreeDesktopIntegration.h mozilla-traybiff-1.2.3/components/nsMessengerFreeDesktopIntegration.h --- mozilla-traybiff-1.2.3~/components/nsMessengerFreeDesktopIntegration.h 2007-07-19 00:08:13.000000000 +0100 +++ mozilla-traybiff-1.2.3/components/nsMessengerFreeDesktopIntegration.h 2007-07-19 00:08:13.000000000 +0100 @@ -54,6 +54,7 @@ #include <nsInt64.h> #include <nsISupportsArray.h> #include <nsWeakReference.h> +#include <nsIWindowMediatorListener.h> #include "eggstatusicon.h" #include <gtk/gtk.h> @@ -70,7 +71,8 @@ public nsIFolderListener, public nsIFolderListener10, public nsIObserver, - public nsSupportsWeakReference + public nsSupportsWeakReference, + public nsIWindowMediatorListener { public: nsMessengerFreeDesktopIntegration(); @@ -82,6 +84,7 @@ NS_DECL_NSIFOLDERLISTENER NS_DECL_NSIOBSERVER NS_DECL_NSIMESSENGERFREEDESKTOPINTEGRATION + NS_DECL_NSIWINDOWMEDIATORLISTENER // Instead of NS_DECL_NSIFOLDERLISTENER10 public:
23_window_close.dpatch.sig
Description: Binary data