I have wrote a firefox extension. My code is: NS_IMETHODIMP nsTray::Connect_window_event(nsIBaseWindow *aBaseWindow, nsITrayCallback *aCallback) { nsresult rv;
NS_ENSURE_ARG_POINTER(aBaseWindow); nativeWindow aNativeWindow; rv = aBaseWindow->GetParentNativeWindow(&aNativeWindow); NS_ENSURE_SUCCESS(rv, rv); g_signal_connect(G_OBJECT(gdk_window_get_toplevel(NS_REINTERPRET_CAST(GdkWindow*, aNativeWindow))), "destroy", G_CALLBACK(nsTray::window_close_event), this); return NS_OK; } When I call this function, displayed that: GLib-GObject-WARNING **: gsignal.c:1669: signal `destroy' is invalid for instance `0x8444920' On 5/24/07, Marcelo Armengot <[EMAIL PROTECTED]> wrote: > > 小多 escribió: > > Hi, > > > > I want to capture a GdkWindow's destory event. And I have tried > > 'g_signal_connect' function, but failed. > > Can someone refer me to an example? > > > > thanks, > > > > > What's the matther following this example? > Is the doc exampl, i used it last time... > > g_signal_connect(G_OBJECT (window), "destroy", G_CALLBACK (destroy), > NULL); > > static void destroy (GtkWidget *widget, gpointer data) > { > gtk_main_quit(); > } > > May be you have to explain us any more, > anyway the asiatic keys in your signature are lovely > ;) > -- Sorry for my poor English :) - http://www.aragonconsultinggroup.com - http://www.aiyo.cn _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list