/* Monolith chat button. * - by Richard W.M. Jones * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: ml_chat_button.c,v 1.4 2003/02/22 15:34:28 rich Exp $ */ #include "config.h" #include #include #include #include #include "ml_chat_window.h" #include "ml_chat_button.h" ml_button new_ml_chat_button (pool pool, ml_session session, const char *conninfo, const char *resname, const char *text) { ml_button b; struct ml_chat_window_args *args; b = new_ml_button (pool, text); if (!b) return 0; args = pmalloc (pool, sizeof *args); args->conninfo = conninfo; args->resname = resname; ml_button_set_callback (b, ml_chat_window, session, args); ml_button_set_popup (b, psprintf (pool, "ml_chat_window_%s", resname)); ml_button_set_popup_size (b, 550, 650); return b; }