# HG changeset patch # User Christian Hammond # Date 1055632862 0 # Node ID 059d95c67cda9a5606836d92b947e430506a9964 # Parent 508adf90fbb9c57fe5b11956e341c4344e336303 [gaim-migrate @ 6304] The legendary Header File Cleanup! Files now only include what they need. This should reduce the number of files that must recompile when a header file changes. It's a lot nicer. Trust me on it. I also added a couple new header files. I hope I didn't break TOO much! committer: Tailor Script diff -r 508adf90fbb9 -r 059d95c67cda plugins/autorecon.c --- a/plugins/autorecon.c Sat Jun 14 21:34:31 2003 +0000 +++ b/plugins/autorecon.c Sat Jun 14 23:21:02 2003 +0000 @@ -1,11 +1,10 @@ -#include "config.h" +#include "internal.h" + +#include "connection.h" +#include "debug.h" +#include "prpl.h" #include "gaim.h" -#include "prpl.h" - -#ifdef _WIN32 -#include "win32dep.h" -#endif #define AUTORECON_PLUGIN_ID "core-autorecon" diff -r 508adf90fbb9 -r 059d95c67cda plugins/docklet/docklet.c --- a/plugins/docklet/docklet.c Sat Jun 14 21:34:31 2003 +0000 +++ b/plugins/docklet/docklet.c Sat Jun 14 23:21:02 2003 +0000 @@ -27,16 +27,26 @@ - optional pop up notices when GNOME2's system-tray-applet supports it */ /* includes */ -#include -#include "gtkplugin.h" -#include "gtkaccount.h" -#include "gaim.h" +#include "internal.h" + +#include "debug.h" +#include "prefs.h" #include "sound.h" + +#include "gtkaccount.h" +#include "gtkblist.h" +#include "gtkft.h" +#include "gtkplugin.h" +#include "gtkprefs.h" #include "gtksound.h" -#include "prefs.h" -#include "gtkblist.h" +#include "gtkutils.h" +#include "stock.h" + #include "eggtrayicon.h" +#include "gaim.h" +#include "ui.h" + #define DOCKLET_PLUGIN_ID "gtk-docklet" /* types */ diff -r 508adf90fbb9 -r 059d95c67cda plugins/gaim-remote/Makefile.am --- a/plugins/gaim-remote/Makefile.am Sat Jun 14 21:34:31 2003 +0000 +++ b/plugins/gaim-remote/Makefile.am Sat Jun 14 23:21:02 2003 +0000 @@ -15,6 +15,7 @@ INCLUDES = \ -I$(top_srcdir)/src \ + -I$(top_srcdir)/plugins \ -DVERSION=\"$(VERSION)\" \ -DDATADIR=\"$(datadir)\" \ $(DEBUG_CFLAGS) diff -r 508adf90fbb9 -r 059d95c67cda plugins/gaim-remote/remote-socket.c --- a/plugins/gaim-remote/remote-socket.c Sat Jun 14 21:34:31 2003 +0000 +++ b/plugins/gaim-remote/remote-socket.c Sat Jun 14 23:21:02 2003 +0000 @@ -28,12 +28,9 @@ /* This provides code for connecting to a Gaim socket and communicating with * it. It will eventually be made a library once the core and ui are split. */ -#include -#include +#include "internal.h" #include -#include -#include "gaim.h" -#include "remote-socket.h" +#include void gaim_remote_session_send_packet(int fd, GaimRemotePacket *p) diff -r 508adf90fbb9 -r 059d95c67cda plugins/gaim-remote/remote.c --- a/plugins/gaim-remote/remote.c Sat Jun 14 21:34:31 2003 +0000 +++ b/plugins/gaim-remote/remote.c Sat Jun 14 23:21:02 2003 +0000 @@ -18,34 +18,29 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. + * + * @todo Make this a core plugin! */ -#include "config.h" - -#include "gaim.h" +#include "internal.h" -#ifdef _WIN32 -#include -#include -#else -#include -#include -#include +#ifndef _WIN32 +# include #endif -#include -#include #include #include -#include -#include +#include "conversation.h" +#include "debug.h" +#include "prpl.h" + +/* XXX */ +#include "gtkconv.h" +#include "gtkplugin.h" #include "gaim.h" -#include "remote-socket.h" +#include "ui.h" -#ifdef _WIN32 -#include "win32dep.h" -#endif - +#include #define REMOTE_PLUGIN_ID "core-remote" @@ -57,8 +52,148 @@ #ifndef _WIN32 static gint UI_fd = -1; #endif -int gaim_session = 0; -GSList *uis = NULL; +static int gaim_session = 0; +static GSList *uis = NULL; + +/* AIM URI's ARE FUN :-D */ +const char * +gaim_remote_handle_uri(const char *uri) +{ + const char *username; + GString *str; + GList *conn; + GaimConnection *gc = NULL; + GaimAccount *account; + + gaim_debug(GAIM_DEBUG_INFO, "gaim_remote_handle_uri", "Handling URI: %s\n", uri); + + /* Well, we'd better check to make sure we have at least one + AIM account connected. */ + for (conn = gaim_connections_get_all(); conn != NULL; conn = conn->next) { + gc = conn->data; + account = gaim_connection_get_account(gc); + username = gaim_account_get_username(account); + + if (gaim_account_get_protocol(account) == GAIM_PROTO_OSCAR && + username != NULL && isalpha(*username)) { + + break; + } + } + + if (gc == NULL) + return _("Not connected to AIM"); + + /* aim:goim?screenname=screenname&message=message */ + if (!g_ascii_strncasecmp(uri, "aim:goim?", strlen("aim:goim?"))) { + char *who, *what; + GaimConversation *c; + uri = uri + strlen("aim:goim?"); + + if (!(who = strstr(uri, "screenname="))) { + return _("No screenname given."); + } + /* spaces are encoded as +'s */ + who = who + strlen("screenname="); + str = g_string_new(NULL); + while (*who && (*who != '&')) { + g_string_append_c(str, *who == '+' ? ' ' : *who); + who++; + } + who = g_strdup(str->str); + g_string_free(str, TRUE); + + what = strstr(uri, "message="); + if (what) { + what = what + strlen("message="); + str = g_string_new(NULL); + while (*what && (*what != '&' || !g_ascii_strncasecmp(what, "&", 5))) { + g_string_append_c(str, *what == '+' ? ' ' : *what); + what++; + } + what = g_strdup(str->str); + g_string_free(str, TRUE); + } + + c = gaim_conversation_new(GAIM_CONV_IM, gc->account, who); + g_free(who); + + if (what) { + GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(c); + + gtk_text_buffer_insert_at_cursor(gtkconv->entry_buffer, what, -1); + g_free(what); + } + } else if (!g_ascii_strncasecmp(uri, "aim:addbuddy?", strlen("aim:addbuddy?"))) { + char *who, *group; + uri = uri + strlen("aim:addbuddy?"); + /* spaces are encoded as +'s */ + + if (!(who = strstr(uri, "screenname="))) { + return _("No screenname given."); + } + who = who + strlen("screenname="); + str = g_string_new(NULL); + while (*who && (*who != '&')) { + g_string_append_c(str, *who == '+' ? ' ' : *who); + who++; + } + who = g_strdup(str->str); + g_string_free(str, TRUE); + + group = strstr(uri, "group="); + if (group) { + group = group + strlen("group="); + str = g_string_new(NULL); + while (*group && (*group != '&' || !g_ascii_strncasecmp(group, "&", 5))) { + g_string_append_c(str, *group == '+' ? ' ' : *group); + group++; + } + group = g_strdup(str->str); + g_string_free(str, TRUE); + } + + gaim_debug(GAIM_DEBUG_MISC, "gaim_remote_handle_uri", "who: %s\n", who); + show_add_buddy(gc, who, group, NULL); + g_free(who); + if (group) + g_free(group); + } else if (!g_ascii_strncasecmp(uri, "aim:gochat?", strlen("aim:gochat?"))) { + char *room; + GHashTable *components; + int exch = 5; + + uri = uri + strlen("aim:gochat?"); + /* spaces are encoded as +'s */ + + if (!(room = strstr(uri, "roomname="))) { + return _("No roomname given."); + } + room = room + strlen("roomname="); + str = g_string_new(NULL); + while (*room && (*room != '&')) { + g_string_append_c(str, *room == '+' ? ' ' : *room); + room++; + } + room = g_strdup(str->str); + g_string_free(str, TRUE); + components = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, + g_free); + g_hash_table_replace(components, g_strdup("room"), room); + g_hash_table_replace(components, g_strdup("exchange"), + g_strdup_printf("%d", exch)); + + serv_join_chat(gc, components); + g_hash_table_destroy(components); + } else { + return _("Invalid AIM URI"); + } + + + return NULL; +} + + #if 0 static guchar * @@ -345,7 +480,7 @@ send = g_malloc(len + 1); memcpy(send, data, len); send[len] = 0; - resp = handle_uri(send); + resp = gaim_remote_handle_uri(send); g_free(send); /* report error */ break; @@ -585,7 +720,7 @@ { 2, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ - NULL, /**< ui_requirement */ + GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */ diff -r 508adf90fbb9 -r 059d95c67cda plugins/gaim-remote/remote.h --- a/plugins/gaim-remote/remote.h Sat Jun 14 21:34:31 2003 +0000 +++ b/plugins/gaim-remote/remote.h Sat Jun 14 23:21:02 2003 +0000 @@ -24,4 +24,79 @@ #include + +/* this is the basis of the CUI protocol. */ +#define CUI_TYPE_META 1 +#define CUI_TYPE_PLUGIN 2 +#define CUI_TYPE_USER 3 +#define CUI_TYPE_CONN 4 +#define CUI_TYPE_BUDDY 5 /* BUDDY_LIST, i.e., both groups and buddies */ +#define CUI_TYPE_MESSAGE 6 +#define CUI_TYPE_CHAT 7 +#define CUI_TYPE_REMOTE 8 + /* This is used to send commands to other UI's, + * like "Open new conversation" or "send IM". + * Even though there's much redundancy with the + * other CUI_TYPES, we're better keeping this stuff + * seperate because it's intended use is so different */ + +#define CUI_META_LIST 1 + /* 1 is always list; this is ignored by the core. + If we move to TCP this can be a keepalive */ +#define CUI_META_QUIT 2 +#define CUI_META_DETACH 3 + /* you don't need to send this, you can just close + the socket. the core will understand. */ +#define CUI_META_PING 4 +#define CUI_META_ACK 5 + +#define CUI_PLUGIN_LIST 1 +#define CUI_PLUGIN_LOAD 2 +#define CUI_PLUGIN_UNLOAD 3 + +#define CUI_USER_LIST 1 +#define CUI_USER_ADD 2 +#define CUI_USER_REMOVE 3 +#define CUI_USER_MODIFY 4 /* this handles moving them in the list too */ +#define CUI_USER_SIGNON 5 + +#define CUI_CONN_LIST 1 +#define CUI_CONN_PROGRESS 2 +#define CUI_CONN_ONLINE 3 +#define CUI_CONN_OFFLINE 4 /* this may send a "reason" for why it was killed */ + +#define CUI_BUDDY_LIST 1 +#define CUI_BUDDY_STATE 2 + /* notifies the UI of state changes; UI can use it to + request the current status from the core */ +#define CUI_BUDDY_ADD 3 +#define CUI_BUDDY_REMOVE 4 +#define CUI_BUDDY_MODIFY 5 + +#define CUI_MESSAGE_LIST 1 /* no idea */ +#define CUI_MESSAGE_SEND 2 +#define CUI_MESSAGE_RECV 3 + +#define CUI_CHAT_LIST 1 +#define CUI_CHAT_HISTORY 2 /* is this necessary? should we have one for IMs? */ +#define CUI_CHAT_JOIN 3 /* handles other people joining/parting too */ +#define CUI_CHAT_PART 4 +#define CUI_CHAT_SEND 5 +#define CUI_CHAT_RECV 6 + +#define CUI_REMOTE_CONNECTIONS 2 /* Get a list of gaim_connections */ +#define CUI_REMOTE_URI 3 /* Have the core handle aim:// URI's */ +#define CUI_REMOTE_BLIST 4 /* Return a copy of the buddy list */ +#define CUI_REMOTE_STATE 5 /* Given a buddy, return his presence. */ +#define CUI_REMOTE_NEW_CONVO 6 /* Must give a user, can give an optional message */ +#define CUI_REMOTE_SEND 7 /* Sends a message, a 'quiet' flag determines whether + * a convo window is displayed or not. */ +#define CUI_REMOTE_ADD_BUDDY 8 /* Adds buddy to list */ +#define CUI_REMOTE_REMOVE_BUDDY 9 /* Removes buddy from list */ +#define CUI_REMOTE_JOIN_CHAT 10 /* Joins a chat. */ + /* What else?? */ + + +const char *gaim_remote_handle_uri(const char *uri); + #endif /* _GAIM_REMOTE_H_ */ diff -r 508adf90fbb9 -r 059d95c67cda plugins/gestures/gestures.c --- a/plugins/gestures/gestures.c Sat Jun 14 21:34:31 2003 +0000 +++ b/plugins/gestures/gestures.c Sat Jun 14 23:21:02 2003 +0000 @@ -18,13 +18,18 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. */ -#include "config.h" +#include "internal.h" + +#include "debug.h" +#include "prefs.h" + +#include "gtkconv.h" +#include "gtkplugin.h" +#include "gtkutils.h" #include "gaim.h" -#include "prefs.h" + #include "gstroke.h" -#include "gtkconv.h" -#include "gtkplugin.h" #define GESTURES_PLUGIN_ID "gtk-gestures" diff -r 508adf90fbb9 -r 059d95c67cda plugins/history.c --- a/plugins/history.c Sat Jun 14 21:34:31 2003 +0000 +++ b/plugins/history.c Sat Jun 14 23:21:02 2003 +0000 @@ -1,15 +1,18 @@ /* Puts last 4k of log in new conversations a la Everybuddy (and then * stolen by Trillian "Pro") */ -#include "config.h" +#include "internal.h" + +#include "conversation.h" +#include "debug.h" +#include "prefs.h" +#include "util.h" + +#include "gtkconv.h" +#include "gtkimhtml.h" +#include "gtkplugin.h" #include "gaim.h" -#include "prefs.h" -#include "gtkimhtml.h" -#include "gtkplugin.h" -#include -#include -#include #define HISTORY_PLUGIN_ID "core-history" diff -r 508adf90fbb9 -r 059d95c67cda plugins/iconaway.c --- a/plugins/iconaway.c Sat Jun 14 21:34:31 2003 +0000 +++ b/plugins/iconaway.c Sat Jun 14 23:21:02 2003 +0000 @@ -1,11 +1,11 @@ -#include "config.h" +#include "internal.h" + +#include "conversation.h" + +#include "gtkconv.h" +#include "gtkplugin.h" #include "gaim.h" -#include "gtkplugin.h" - -#ifdef _WIN32 -#include "win32dep.h" -#endif #define ICONAWAY_PLUGIN_ID "gtk-iconaway" diff -r 508adf90fbb9 -r 059d95c67cda plugins/idle.c --- a/plugins/idle.c Sat Jun 14 21:34:31 2003 +0000 +++ b/plugins/idle.c Sat Jun 14 23:21:02 2003 +0000 @@ -3,12 +3,16 @@ * 40-day idle times. */ -#include "config.h" +#include "internal.h" + +#include "connection.h" +#include "debug.h" +#include "server.h" + +#include "gtkplugin.h" +#include "gtkutils.h" #include "gaim.h" -#include "multi.h" -#include "gtkplugin.h" -#include #define IDLE_PLUGIN_ID "gtk-idle" diff -r 508adf90fbb9 -r 059d95c67cda plugins/perl/perl.c --- a/plugins/perl/perl.c Sat Jun 14 21:34:31 2003 +0000 +++ b/plugins/perl/perl.c Sat Jun 14 23:21:02 2003 +0000 @@ -23,43 +23,42 @@ * X-Chat Copyright (C) 1998 Peter Zelezny. * */ +#ifdef DEBUG +# undef DEBUG +#endif -#ifdef HAVE_CONFIG_H -#include -#ifdef DEBUG -#undef DEBUG -#endif -#endif #undef PACKAGE #define group perl_group + #ifdef _WIN32 /* This took me an age to figure out.. without this __declspec(dllimport) * will be ignored. */ -#define HASATTRIBUTE +# define HASATTRIBUTE #endif + #include + #ifndef _SEM_SEMUN_UNDEFINED -#define HAS_UNION_SEMUN +# define HAS_UNION_SEMUN #endif + #include #include + #ifndef _WIN32 -#include +# include #endif -#include -#include -#include + #undef PACKAGE -#include + #ifndef _WIN32 -#include +# include #else -/* We're using perl's win32 port of this */ -#define dirent direct + /* We're using perl's win32 port of this */ +# define dirent direct #endif -#include #undef group @@ -72,14 +71,22 @@ #undef _ #ifdef DEBUG -#undef DEBUG +# undef DEBUG #endif #ifdef _WIN32 -#undef pipe +# undef pipe #endif + +#include "internal.h" + +#include "debug.h" +#include "prpl.h" +#include "notify.h" +#include "server.h" +#include "sound.h" + #include "gaim.h" -#include "prpl.h" -#include "sound.h" +#include "ui.h" #ifndef call_pv # define call_pv(i,j) perl_call_pv((i), (j)) @@ -1395,11 +1402,11 @@ }; static void -__init_plugin(GaimPlugin *plugin) +init_plugin(GaimPlugin *plugin) { my_plugin = plugin; loader_info.exts = g_list_append(loader_info.exts, "pl"); } -GAIM_INIT_PLUGIN(perl, __init_plugin, info); +GAIM_INIT_PLUGIN(perl, init_plugin, info); diff -r 508adf90fbb9 -r 059d95c67cda plugins/spellchk.c --- a/plugins/spellchk.c Sat Jun 14 21:34:31 2003 +0000 +++ b/plugins/spellchk.c Sat Jun 14 23:21:02 2003 +0000 @@ -8,21 +8,15 @@ * BUGS: * ? I think i fixed them all. */ -#include "config.h" +#include "internal.h" + +#include "debug.h" +#include "util.h" + +#include "gtkplugin.h" +#include "gtkutils.h" #include "gaim.h" -#include "gtkplugin.h" - -#include -#include -#include -#include -#include -#include -#include -#ifdef _WIN32 -#include "win32dep.h" -#endif #define SPELLCHECK_PLUGIN_ID "gtk-spellcheck" diff -r 508adf90fbb9 -r 059d95c67cda plugins/statenotify.c --- a/plugins/statenotify.c Sat Jun 14 21:34:31 2003 +0000 +++ b/plugins/statenotify.c Sat Jun 14 23:21:02 2003 +0000 @@ -1,3 +1,9 @@ +#include "internal.h" + +#include "blist.h" +#include "conversation.h" +#include "debug.h" + #include "gaim.h" static void diff -r 508adf90fbb9 -r 059d95c67cda plugins/ticker/ticker.c --- a/plugins/ticker/ticker.c Sat Jun 14 21:34:31 2003 +0000 +++ b/plugins/ticker/ticker.c Sat Jun 14 23:21:02 2003 +0000 @@ -21,20 +21,19 @@ * ticker.c -- Syd Logan, Summer 2000 * pluginized- Sean Egan, Summer 2002 */ - +#include "internal.h" -#include -#include "gtkticker.h" -#include -#include +#include "blist.h" +#include "conversation.h" +#include "debug.h" +#include "prpl.h" + +#include "gtkblist.h" +#include "gtkplugin.h" + #include "gaim.h" -#include "prpl.h" -#include "gtkplugin.h" -#include "blist.h" -#include "gtkblist.h" -#ifdef _WIN32 -#include "win32dep.h" -#endif + +#include "gtkticker.h" #define TICKER_PLUGIN_ID "gtk-ticker" diff -r 508adf90fbb9 -r 059d95c67cda plugins/timestamp.c --- a/plugins/timestamp.c Sat Jun 14 21:34:31 2003 +0000 +++ b/plugins/timestamp.c Sat Jun 14 23:21:02 2003 +0000 @@ -3,12 +3,16 @@ * Modified by: Chris J. Friesen Jan 05, 2003. * */ -#include "config.h" +#include "internal.h" -#include -#include "gaim.h" +#include "conversation.h" +#include "debug.h" + #include "gtkimhtml.h" #include "gtkplugin.h" +#include "gtkutils.h" + +#include "gaim.h" #define TIMESTAMP_PLUGIN_ID "gtk-timestamp" diff -r 508adf90fbb9 -r 059d95c67cda src/about.c --- a/src/about.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/about.c Sat Jun 14 23:21:02 2003 +0000 @@ -19,17 +19,14 @@ * */ -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include +#include "internal.h" +#include "gtkimhtml.h" +#include "gtkutils.h" +#include "stock.h" +#include "ui.h" -#include +/* XXX For WEBSITE */ #include "gaim.h" -#include "gtkimhtml.h" static GtkWidget *about = NULL; @@ -40,21 +37,6 @@ about = NULL; } -char *name() -{ - return PACKAGE; -} - -char *description() -{ - return WEBSITE; -} - -char *version() -{ - return VERSION; -} - void show_about(GtkWidget *w, void *data) { GtkWidget *vbox; diff -r 508adf90fbb9 -r 059d95c67cda src/account.c --- a/src/account.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/account.c Sat Jun 14 23:21:02 2003 +0000 @@ -20,23 +20,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include - +#include "internal.h" #include "account.h" #include "debug.h" #include "prefs.h" #include "prpl.h" +#include "server.h" #include "util.h" -#include "gaim.h" typedef enum { diff -r 508adf90fbb9 -r 059d95c67cda src/account.h --- a/src/account.h Sat Jun 14 21:34:31 2003 +0000 +++ b/src/account.h Sat Jun 14 23:21:02 2003 +0000 @@ -29,6 +29,14 @@ #include "proxy.h" #include "prpl.h" +enum +{ + PERMIT_ALL = 1, + PERMIT_NONE, + PERMIT_SOME, + DENY_SOME +}; + struct _GaimAccount { char *username; /**< The username. */ diff -r 508adf90fbb9 -r 059d95c67cda src/away.c --- a/src/away.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/away.c Sat Jun 14 23:21:02 2003 +0000 @@ -16,24 +16,25 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * + * */ +#include "internal.h" -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - -#include -#include "gaim.h" -#include "prpl.h" -#include "gtkimhtml.h" -#include "gtkblist.h" +#include "conversation.h" +#include "debug.h" #include "plugin.h" #include "prefs.h" +#include "prpl.h" +#include "util.h" + +/* XXX Until we can get rid of the message queue stuff... */ +#include "gaim.h" + +#include "gtkblist.h" +#include "gtkimhtml.h" +#include "gtkprefs.h" +#include "gtkutils.h" +#include "ui.h" GtkWidget *imaway = NULL; diff -r 508adf90fbb9 -r 059d95c67cda src/blist.c --- a/src/blist.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/blist.c Sat Jun 14 23:21:02 2003 +0000 @@ -19,29 +19,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#ifndef _WIN32 -#include -#else -#include -#endif -#include -#include "gaim.h" -#include "prpl.h" +#include "internal.h" #include "blist.h" +#include "conversation.h" +#include "debug.h" #include "notify.h" #include "prefs.h" - -#ifdef _WIN32 -#include "win32dep.h" -#endif +#include "privacy.h" +#include "prpl.h" +#include "server.h" +#include "util.h" #define PATHSIZE 1024 diff -r 508adf90fbb9 -r 059d95c67cda src/browser.c --- a/src/browser.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/browser.c Sat Jun 14 23:21:02 2003 +0000 @@ -25,42 +25,19 @@ * their protocol. Nifty. * */ - +#include "internal.h" -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef _WIN32 -#include -#else -#include -#ifndef HOST_NAME_MAX -#define HOST_NAME_MAX 255 -#endif -#include -#endif -#include -#include -#include +#include - - - -#include -#include -#include "gaim.h" +#include "debug.h" #include "notify.h" #include "prefs.h" +#include "util.h" #ifndef _WIN32 - - - - #include #include - static const char *progname = "gaim"; static const char *expected_mozilla_version = "1.1"; diff -r 508adf90fbb9 -r 059d95c67cda src/buddy_chat.c --- a/src/buddy_chat.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/buddy_chat.c Sat Jun 14 23:21:02 2003 +0000 @@ -18,26 +18,20 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ +#include "internal.h" -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include +#include "debug.h" +#include "multi.h" +#include "notify.h" +#include "prpl.h" +#include "server.h" + #include "gtkimhtml.h" - -#include "prpl.h" -#include "notify.h" -#include "gaim.h" -#include "multi.h" +#include "gtkutils.h" +#include "ui.h" #ifdef _WIN32 -#include "wspell.h" +# include "wspell.h" #endif static GList *chatentries = NULL; diff -r 508adf90fbb9 -r 059d95c67cda src/connection.c --- a/src/connection.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/connection.c Sat Jun 14 23:21:02 2003 +0000 @@ -20,15 +20,25 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - +#include "internal.h" +#include "blist.h" #include "connection.h" #include "debug.h" -#include "gaim.h" +#include "log.h" +#include "notify.h" +#include "prefs.h" +#include "request.h" +#include "server.h" +#include "sound.h" + +/* XXX UI stuff! */ +#include "ui.h" static GList *connections = NULL; static GList *connections_connecting = NULL; static GaimConnectionUiOps *connection_ui_ops = NULL; + GaimConnection * gaim_connection_new(GaimAccount *account) { @@ -144,6 +154,7 @@ gaim_request_close_with_handle(gc); gaim_notify_close_with_handle(gc); + /* XXX UI stuff! */ update_privacy_connections(); } @@ -153,10 +164,11 @@ if (connections != NULL) return; - destroy_all_dialogs(); + /* XXX destroy_all_dialogs(); */ + gaim_blist_destroy(); - show_login(); + /* XXX show_login(); */ } /* @@ -196,7 +208,7 @@ gaim_blist_show(); gaim_blist_add_account(gc->account); - /* I hate this. -- ChipX86 */ + /* XXX I hate this. UI code. -- ChipX86 */ gaim_setup(gc); /* diff -r 508adf90fbb9 -r 059d95c67cda src/connection.h --- a/src/connection.h Sat Jun 14 21:34:31 2003 +0000 +++ b/src/connection.h Sat Jun 14 23:21:02 2003 +0000 @@ -31,6 +31,10 @@ #include "account.h" #include "plugin.h" +#define OPT_CONN_HTML 0x00000001 +/* set this flag on a gc if you want serv_got_im to autoreply when away */ +#define OPT_CONN_AUTO_RESP 0x00000002 + typedef enum { GAIM_DISCONNECTED = 0, /**< Disconnected. */ diff -r 508adf90fbb9 -r 059d95c67cda src/conversation.c --- a/src/conversation.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/conversation.c Sat Jun 14 23:21:02 2003 +0000 @@ -18,26 +18,17 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include +#include "internal.h" +#include "blist.h" #include "conversation.h" -#include "gaim.h" -#include "multi.h" -#include "prpl.h" +#include "debug.h" #include "notify.h" #include "prefs.h" - -#ifdef _WIN32 -#include "win32dep.h" -#endif +#include "prpl.h" +#include "util.h" + +/* XXX */ +#include "ui.h" typedef struct { @@ -148,7 +139,7 @@ im = GAIM_IM(c); - gaim_im_set_typing_state(im, NOT_TYPING); + gaim_im_set_typing_state(im, GAIM_NOT_TYPING); gaim_im_update_typing(im); gaim_im_stop_typing_timeout(im); @@ -169,7 +160,7 @@ gaim_im_set_type_again(GAIM_IM(conv), TRUE); /* XXX Somebody add const stuff! */ - serv_send_typing(gc, (char *)name, TYPED); + serv_send_typing(gc, (char *)name, GAIM_TYPED); gaim_debug(GAIM_DEBUG_MISC, "conversation", "typed...\n"); } @@ -962,7 +953,7 @@ if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { if (gaim_prefs_get_bool("/core/conversations/im/send_typing")) - serv_send_typing(gc, (char *)name, NOT_TYPING); + serv_send_typing(gc, (char *)name, GAIM_NOT_TYPING); if (gc && prpl_info->convo_closed != NULL) prpl_info->convo_closed(gc, (char *)name); @@ -1483,7 +1474,7 @@ if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { if ((flags & WFLAG_RECV) == WFLAG_RECV) - gaim_im_set_typing_state(GAIM_IM(conv), NOT_TYPING); + gaim_im_set_typing_state(GAIM_IM(conv), GAIM_NOT_TYPING); } if (gaim_window_get_active_conversation(win) != conv) { diff -r 508adf90fbb9 -r 059d95c67cda src/conversation.h --- a/src/conversation.h Sat Jun 14 21:34:31 2003 +0000 +++ b/src/conversation.h Sat Jun 14 23:21:02 2003 +0000 @@ -24,8 +24,6 @@ #ifndef _GAIM_CONVERSATION_H_ #define _GAIM_CONVERSATION_H_ -#include "account.h" - /**************************************************************************/ /** Data Structures */ /**************************************************************************/ @@ -33,6 +31,7 @@ typedef enum _GaimConversationType GaimConversationType; typedef enum _GaimUnseenState GaimUnseenState; typedef enum _GaimConvUpdateType GaimConvUpdateType; +typedef enum _GaimTypingState GaimTypingState; typedef struct _GaimWindowUiOps GaimWindowUiOps; typedef struct _GaimWindow GaimWindow; typedef struct _GaimConversationUiOps GaimConversationUiOps; @@ -87,6 +86,21 @@ }; /** + * The typing state of a user. + */ +enum _GaimTypingState +{ + GAIM_NOT_TYPING = 0, /**< Not typing. */ + GAIM_TYPING, /**< Currently typing. */ + GAIM_TYPED /**< Stopped typing momentarily. */ +}; + + +#include "account.h" +#include "server.h" + + +/** * Conversation window operations. * * Any UI representing a window must assign a filled-out gaim_window_ops @@ -161,7 +175,7 @@ { GaimConversation *conv; /**< The parent conversation. */ - int typing_state; /**< The current typing state. */ + GaimTypingState typing_state; /**< The current typing state. */ guint typing_timeout; /**< The typing timer handle. */ time_t type_again; /**< The type again time. */ guint type_again_timeout; /**< The type again timer handle. */ @@ -1157,6 +1171,11 @@ */ GaimWindowUiOps *gaim_get_win_ui_ops(void); +/** + * Initializes the conversation subsystem. + */ +void gaim_conversation_init(void); + /*@}*/ #endif /* _GAIM_CONVERSATION_H_ */ diff -r 508adf90fbb9 -r 059d95c67cda src/core.c --- a/src/core.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/core.c Sat Jun 14 23:21:02 2003 +0000 @@ -18,13 +18,8 @@ * */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +/* + * NOTE - I'd like to see this entire file just go away! -- ChipX86 + */ -#include -#include -#include -#include - - +/* DONE! */ diff -r 508adf90fbb9 -r 059d95c67cda src/core.h --- a/src/core.h Sat Jun 14 21:34:31 2003 +0000 +++ b/src/core.h Sat Jun 14 23:21:02 2003 +0000 @@ -24,96 +24,6 @@ #ifndef _CORE_H_ #define _CORE_H_ -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#ifdef HAVE_ICONV -#include -#endif - -#ifdef HAVE_LANGINFO_CODESET -#include -#endif - -#include -#include -#include -#include - -struct group; -struct buddy; - - -#include "debug.h" -#include "conversation.h" -#include "ft.h" -#include "privacy.h" -#include "plugin.h" -#include "event.h" -#include "notify.h" -#include "request.h" - -/* XXX Temporary! */ -#define OPT_LOG_BUDDY_SIGNON 0x00000004 -#define OPT_LOG_BUDDY_IDLE 0x00000008 -#define OPT_LOG_BUDDY_AWAY 0x00000010 -#define OPT_LOG_MY_SIGNON 0x00000020 - -/* Really user states are controlled by the PRPLs now. We just use this for event_away */ -#define UC_UNAVAILABLE 1 - -/* This is far too long to be practical, but MSN users are probably used to long aliases */ -#define SELF_ALIAS_LEN 400 - -#if 0 -GaimAccount { - char username[64]; - char alias[SELF_ALIAS_LEN]; - char password[32]; - char user_info[2048]; - int options; - int protocol; - /* prpls can use this to save information about the user, - * like which server to connect to, etc */ - char proto_opt[7][256]; - - /* buddy icon file */ - char iconfile[256]; - - - GaimConnection *gc; - gboolean connecting; - - GSList *permit; - GSList *deny; - int permdeny; -}; -#endif - -/* XXX Temporary, until we have better account-specific prefs. */ -#define GAIM_ACCOUNT_CHECK_MAIL(account) \ - ((account)->options & OPT_ACCT_MAIL_CHECK) - -/* Functions in gaimrc.c */ -extern void load_prefs(); -extern void load_pounces(); -extern void save_prefs(); - -/* Functions in server.c */ -extern void serv_got_update(GaimConnection *, const char *, int, int, time_t, time_t, int); -extern void serv_got_im(GaimConnection *, const char *, const char *, guint32, time_t, gint); -extern void serv_got_typing(GaimConnection *, const char *, int, int); -extern void serv_got_typing_stopped(GaimConnection *, const char *); -extern void serv_got_eviled(GaimConnection *, const char *, int); -extern void serv_got_chat_invite(GaimConnection *, const char *, const char *, const char *, GHashTable *); -extern GaimConversation *serv_got_joined_chat(GaimConnection *, int, const char *); -extern void serv_got_chat_left(GaimConnection *, int); -extern void serv_got_chat_in(GaimConnection *, int, char *, int, char *, time_t); -extern void serv_got_alias(GaimConnection *, const char *, const char *); -extern void serv_finish_login(); - #endif /* _CORE_H_ */ /* diff -r 508adf90fbb9 -r 059d95c67cda src/dialogs.c --- a/src/dialogs.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/dialogs.c Sat Jun 14 23:21:02 2003 +0000 @@ -18,46 +18,29 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include - -#ifdef _WIN32 -#include -#else -#include -#include -#include -#include -#include -#include -#endif - -#include -#include - -#include -#include "gaim.h" -#include "gtkimhtml.h" -#include "prpl.h" -#include "gtkblist.h" +#include "internal.h" + +#include "debug.h" +#include "log.h" +#include "multi.h" #include "notify.h" #include "prefs.h" -#include "multi.h" - -#ifdef _WIN32 -#include "win32dep.h" -#endif - -#define PATHSIZE 1024 +#include "privacy.h" +#include "prpl.h" +#include "request.h" +#include "util.h" + +#include "gtkblist.h" +#include "gtkconv.h" +#include "gtkimhtml.h" +#include "gtkprefs.h" +#include "gtkutils.h" +#include "stock.h" + +#include "ui.h" + +/* XXX For the soon-to-be-deprecated MultiEntryDlg stuff */ +#include "gaim.h" static GtkWidget *imdialog = NULL; /*I only want ONE of these :) */ static GList *dialogwindows = NULL; diff -r 508adf90fbb9 -r 059d95c67cda src/ft.c --- a/src/ft.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/ft.c Sat Jun 14 23:21:02 2003 +0000 @@ -3,7 +3,7 @@ * * gaim * - * Copyright (C) 2002-2003, Christian Hammond + * Copyright (C) 2003 Christian Hammond * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,24 +20,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include - -#include -#include "gaim.h" +#include "internal.h" +#include "ft.h" +#include "notify.h" #include "proxy.h" -#include "notify.h" - -#ifdef _WIN32 -#include "win32dep.h" -#endif static struct gaim_xfer_ui_ops *xfer_ui_ops = NULL; diff -r 508adf90fbb9 -r 059d95c67cda src/ft.h --- a/src/ft.h Sat Jun 14 21:34:31 2003 +0000 +++ b/src/ft.h Sat Jun 14 23:21:02 2003 +0000 @@ -28,6 +28,8 @@ /**************************************************************************/ struct gaim_xfer; +#include "account.h" + /** * Types of file transfers. */ diff -r 508adf90fbb9 -r 059d95c67cda src/gaim-remote.c --- a/src/gaim-remote.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gaim-remote.c Sat Jun 14 23:21:02 2003 +0000 @@ -21,10 +21,9 @@ * */ -#include "gaim.h" +#include "internal.h" + #include -#include -#include #include #include diff -r 508adf90fbb9 -r 059d95c67cda src/gaim.h --- a/src/gaim.h Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gaim.h Sat Jun 14 23:21:02 2003 +0000 @@ -22,166 +22,9 @@ #ifndef _GAIM_H_ #define _GAIM_H_ -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "core.h" -#include "blist.h" -#include "ui.h" -#include "util.h" - #define XPATCH BAD /* Because Kalla Said So */ -/* XXX CUI: when this is done being split, the only things below should be things - * both the core and the uis depend on e.g. the protocol definitions, etc, and - * it won't include core.h or ui.h (i.e. it'll mostly be #define's) */ - -/* this is the basis of the CUI protocol. */ -#define CUI_TYPE_META 1 -#define CUI_TYPE_PLUGIN 2 -#define CUI_TYPE_USER 3 -#define CUI_TYPE_CONN 4 -#define CUI_TYPE_BUDDY 5 /* BUDDY_LIST, i.e., both groups and buddies */ -#define CUI_TYPE_MESSAGE 6 -#define CUI_TYPE_CHAT 7 -#define CUI_TYPE_REMOTE 8 - /* This is used to send commands to other UI's, - * like "Open new conversation" or "send IM". - * Even though there's much redundancy with the - * other CUI_TYPES, we're better keeping this stuff - * seperate because it's intended use is so different */ - -#define CUI_META_LIST 1 - /* 1 is always list; this is ignored by the core. - If we move to TCP this can be a keepalive */ -#define CUI_META_QUIT 2 -#define CUI_META_DETACH 3 - /* you don't need to send this, you can just close - the socket. the core will understand. */ -#define CUI_META_PING 4 -#define CUI_META_ACK 5 - -#define CUI_PLUGIN_LIST 1 -#define CUI_PLUGIN_LOAD 2 -#define CUI_PLUGIN_UNLOAD 3 - -#define CUI_USER_LIST 1 -#define CUI_USER_ADD 2 -#define CUI_USER_REMOVE 3 -#define CUI_USER_MODIFY 4 /* this handles moving them in the list too */ -#define CUI_USER_SIGNON 5 - -#define CUI_CONN_LIST 1 -#define CUI_CONN_PROGRESS 2 -#define CUI_CONN_ONLINE 3 -#define CUI_CONN_OFFLINE 4 /* this may send a "reason" for why it was killed */ - -#define CUI_BUDDY_LIST 1 -#define CUI_BUDDY_STATE 2 - /* notifies the UI of state changes; UI can use it to - request the current status from the core */ -#define CUI_BUDDY_ADD 3 -#define CUI_BUDDY_REMOVE 4 -#define CUI_BUDDY_MODIFY 5 - -#define CUI_MESSAGE_LIST 1 /* no idea */ -#define CUI_MESSAGE_SEND 2 -#define CUI_MESSAGE_RECV 3 - -#define CUI_CHAT_LIST 1 -#define CUI_CHAT_HISTORY 2 /* is this necessary? should we have one for IMs? */ -#define CUI_CHAT_JOIN 3 /* handles other people joining/parting too */ -#define CUI_CHAT_PART 4 -#define CUI_CHAT_SEND 5 -#define CUI_CHAT_RECV 6 - -#define CUI_REMOTE_CONNECTIONS 2 /* Get a list of gaim_connections */ -#define CUI_REMOTE_URI 3 /* Have the core handle aim:// URI's */ -#define CUI_REMOTE_BLIST 4 /* Return a copy of the buddy list */ -#define CUI_REMOTE_STATE 5 /* Given a buddy, return his presence. */ -#define CUI_REMOTE_NEW_CONVO 6 /* Must give a user, can give an optional message */ -#define CUI_REMOTE_SEND 7 /* Sends a message, a 'quiet' flag determines whether - * a convo window is displayed or not. */ -#define CUI_REMOTE_ADD_BUDDY 8 /* Adds buddy to list */ -#define CUI_REMOTE_REMOVE_BUDDY 9 /* Removes buddy from list */ -#define CUI_REMOTE_JOIN_CHAT 10 /* Joins a chat. */ - /* What else?? */ - - -#define IM_FLAG_AWAY 0x01 -#define IM_FLAG_CHECKBOX 0x02 -#define IM_FLAG_GAIMUSER 0x04 - -#define PERMIT_ALL 1 -#define PERMIT_NONE 2 -#define PERMIT_SOME 3 -#define DENY_SOME 4 - -#define NOT_TYPING 0 -#define TYPING 1 -#define TYPED 2 - -#define WFLAG_SEND 0x01 -#define WFLAG_RECV 0x02 -#define WFLAG_AUTO 0x04 -#define WFLAG_WHISPER 0x08 -#define WFLAG_FILERECV 0x10 -#define WFLAG_SYSTEM 0x20 -#define WFLAG_NICK 0x40 -#define WFLAG_NOLOG 0x80 -#define WFLAG_COLORIZE 0x100 - -#define AUTO_RESPONSE "<AUTO-REPLY> : " - -#define WEBSITE "http://gaim.sourceforge.net/" - -#ifdef ENABLE_NLS -# include -# define _(x) gettext(x) -# ifdef gettext_noop -# define N_(String) gettext_noop (String) -# else -# define N_(String) (String) -# endif -#else -# define N_(String) (String) -# define _(x) (x) -#endif - -#define DEFAULT_INFO "Visit the Gaim website at http://gaim.sourceforge.net/." - -enum log_event { - log_signon = 0, - log_signoff, - log_away, - log_back, - log_idle, - log_unidle, - log_quit -}; - -#define OPT_POUNCE_POPUP 0x001 -#define OPT_POUNCE_SEND_IM 0x002 -#define OPT_POUNCE_COMMAND 0x004 -#define OPT_POUNCE_SOUND 0x008 - -#define OPT_POUNCE_SIGNON 0x010 -#define OPT_POUNCE_UNAWAY 0x020 -#define OPT_POUNCE_UNIDLE 0x040 -#define OPT_POUNCE_TYPING 0x080 -#define OPT_POUNCE_SAVE 0x100 - -#define OPT_POUNCE_NOTIFY 0x200 - -/* These should all be runtime selectable */ - -#define MSG_LEN 2048 -/* The above should normally be the same as BUF_LEN, - * but just so we're explictly asking for the max message - * length. */ -#define BUF_LEN MSG_LEN -#define BUF_LONG BUF_LEN * 2 +#include "connection.h" /* Globals in main.c */ extern int opt_away; @@ -225,52 +68,6 @@ /* Functions in idle.c */ extern gint check_idle(gpointer); -/* Functions in server.c */ -/* input to serv */ -extern void serv_login(GaimAccount *); -extern void serv_close(GaimConnection *); -extern void serv_touch_idle(GaimConnection *); -extern int serv_send_im(GaimConnection *, char *, char *, int, int); -extern void serv_get_info(GaimConnection *, char *); -extern void serv_get_dir(GaimConnection *, char *); -extern void serv_set_idle(GaimConnection *, int); -extern void serv_set_info(GaimConnection *, char *); -extern void serv_set_away(GaimConnection *, char *, char *); -extern void serv_set_away_all(char *); -extern int serv_send_typing(GaimConnection *, char *, int); -extern void serv_change_passwd(GaimConnection *, const char *, const char *); -extern void serv_add_buddy(GaimConnection *, const char *); -extern void serv_add_buddies(GaimConnection *, GList *); -extern void serv_remove_buddy(GaimConnection *, char *, char *); -extern void serv_remove_buddies(GaimConnection *, GList *, char *); -extern void serv_add_permit(GaimConnection *, const char *); -extern void serv_add_deny(GaimConnection *, const char *); -extern void serv_rem_permit(GaimConnection *, const char *); -extern void serv_rem_deny(GaimConnection *, const char *); -extern void serv_set_permit_deny(GaimConnection *); -extern void serv_warn(GaimConnection *, char *, int); -extern void serv_set_dir(GaimConnection *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, int); -extern void serv_dir_search(GaimConnection *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *); -extern void serv_join_chat(GaimConnection *, GHashTable *); -extern void serv_chat_invite(GaimConnection *, int, const char *, const char *); -extern void serv_chat_leave(GaimConnection *, int); -extern void serv_chat_whisper(GaimConnection *, int, char *, char *); -extern int serv_chat_send(GaimConnection *, int, char *); -extern void serv_got_popup(char *, char *, int, int); -extern void serv_get_away(GaimConnection *, const char *); -extern void serv_alias_buddy(struct buddy *); -extern void serv_move_buddy(struct buddy *, struct group *, struct group *); -extern void serv_rename_group(GaimConnection *, struct group *, const char *); -extern void serv_set_buddyicon(GaimConnection *, const char *); - -/* Functions in log.h */ -extern FILE *open_log_file (const char *, int); -extern void system_log(enum log_event, GaimConnection *, struct buddy *, int); -extern void rm_log(struct log_conversation *); -extern struct log_conversation *find_log_info(const char *); -extern void update_log_convs(); -extern void save_convo(GtkWidget *save, GaimConversation *c); -extern char *html_logize(const char *p); /*------------------------------------------------------------------------*/ /* Multi-Entry dialog and vCard dialog support */ diff -r 508adf90fbb9 -r 059d95c67cda src/gaimrc.c --- a/src/gaimrc.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gaimrc.c Sat Jun 14 23:21:02 2003 +0000 @@ -18,36 +18,24 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include +#include "internal.h" -#ifndef _WIN32 -#include -#include -#endif - -#include -#include - -#include -#include -#include -#include "gaim.h" -#include "prpl.h" +#include "account.h" +#include "debug.h" +#include "log.h" +#include "notify.h" +#include "pounce.h" #include "prefs.h" #include "proxy.h" +#include "prpl.h" #include "sound.h" -#include "gtksound.h" -#include "pounce.h" +#include "ui.h" +#include "util.h" + +#include "gaim.h" + #include "gtkpounce.h" -#include "notify.h" - -#ifdef _WIN32 -#include "win32dep.h" -#endif +#include "gtksound.h" /* for people like myself, who are too lazy to add an away msg :) */ #define BORING_DEFAULT_AWAY_MSG _("sorry, i ran out for a while. bbl") diff -r 508adf90fbb9 -r 059d95c67cda src/gtkaccount.c --- a/src/gtkaccount.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gtkaccount.c Sat Jun 14 23:21:02 2003 +0000 @@ -20,32 +20,27 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "internal.h" -#include -#include -#include - -#include - -#include "gtkaccount.h" #include "account.h" #include "accountopt.h" +#include "debug.h" #include "event.h" -#include "prefs.h" #include "plugin.h" -#include "stock.h" -#include "gtkblist.h" -#include "gaim-disclosure.h" -#include "gaim.h" +#include "prefs.h" +#include "request.h" +#include "util.h" -#ifdef _WIN32 -# include -#else -# include -# include -#endif +#include "gaim-disclosure.h" +#include "gtkaccount.h" +#include "gtkblist.h" +#include "gtkutils.h" +#include "stock.h" -#include +#include "ui.h" + +/* XXX for do_quit() */ +#include "gaim.h" enum { diff -r 508adf90fbb9 -r 059d95c67cda src/gtkblist.h --- a/src/gtkblist.h Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gtkblist.h Sat Jun 14 23:21:02 2003 +0000 @@ -24,6 +24,8 @@ #ifndef _GAIM_GTK_LIST_H_ #define _GAIM_GTK_LIST_H_ +#include "blist.h" + enum { STATUS_ICON_COLUMN, STATUS_ICON_VISIBLE_COLUMN, diff -r 508adf90fbb9 -r 059d95c67cda src/gtkconn.c --- a/src/gtkconn.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gtkconn.c Sat Jun 14 23:21:02 2003 +0000 @@ -18,17 +18,17 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ - -#include -#include +#include "internal.h" #include "account.h" -#include "gtkblist.h" -#include "gaim.h" +#include "debug.h" +#include "notify.h" +#include "util.h" -#ifdef _WIN32 -#include "win32dep.h" -#endif +#include "gtkblist.h" +#include "gtkutils.h" + +#include "ui.h" struct signon_meter { GaimAccount *account; @@ -281,7 +281,7 @@ return; } - +#if 0 struct kick_dlg { GaimAccount *account; GtkWidget *dlg; @@ -372,4 +372,4 @@ gaim_account_get_username(account)); hide_login_progress_common(gc, why, _("Connection Error"), buf); } - +#endif diff -r 508adf90fbb9 -r 059d95c67cda src/gtkconv.c --- a/src/gtkconv.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gtkconv.c Sat Jun 14 23:21:02 2003 +0000 @@ -1,7 +1,8 @@ -/* - * gaim +/** + * @file gtkconv.h GTK+ Conversation API + * @ingroup gtkui * - * Copyright (C) 2002-2003, Christian Hammond + * Copyright (C) 2002-2003 Christian Hammond * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,45 +19,45 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ -#ifdef HAVE_CONFIG_H -#include -#endif -#include +#include "internal.h" + #ifndef _WIN32 -#include -#include -#include -#include -#endif /*_WIN32*/ -#include -#include -#include -#include -#include -#include -#include +# include +#endif + #ifdef USE_GTKSPELL -#include +# include #endif + #include -#include "prpl.h" -#include "gtkimhtml.h" -#include "dnd-hints.h" -#include "sound.h" -#include "gtkblist.h" + +#include "debug.h" +#include "log.h" +#include "multi.h" #include "notify.h" #include "prefs.h" +#include "prpl.h" +#include "sound.h" +#include "util.h" + +#include "dnd-hints.h" +#include "gtkblist.h" #include "gtkconv.h" -#include "gaim.h" +#include "gtkimhtml.h" +#include "gtkutils.h" +#include "stock.h" + #include "ui.h" -#include "debug.h" -#include "multi.h" + +/* XXX */ +#include "gaim.h" #ifdef _WIN32 -#include "win32dep.h" -#include "wspell.h" +# include "wspell.h" #endif +#define AUTO_RESPONSE "<AUTO-REPLY> : " + static char nick_colors[][8] = { "#ba55d3", /* Medium Orchid */ "#ee82ee", /* Violet */ @@ -1325,7 +1326,7 @@ /* XXX The (char *) should go away! Somebody add consts to stuff! */ serv_send_typing(gaim_conversation_get_gc(conv), (char *)gaim_conversation_get_name(conv), - NOT_TYPING); + GAIM_NOT_TYPING); } else { /* We're deleting, but not all of it, so it counts as typing. */ @@ -1936,7 +1937,7 @@ /* * We know we got something, so we at least have to make sure we don't - * send TYPED any time soon. + * send GAIM_TYPED any time soon. */ im = GAIM_IM(conv); @@ -1951,7 +1952,7 @@ int timeout = serv_send_typing(gaim_conversation_get_gc(conv), (char *)gaim_conversation_get_name(conv), - TYPING); + GAIM_TYPING); if (timeout) gaim_im_set_type_again(im, time(NULL) + timeout); @@ -1976,7 +1977,7 @@ gtk_widget_destroy(gtkwin->menu.typing_icon); gtkwin->menu.typing_icon = NULL; } - if(im && gaim_im_get_typing_state(im) == TYPING) { + if(im && gaim_im_get_typing_state(im) == GAIM_TYPING) { gtkwin->menu.typing_icon = gtk_image_menu_item_new(); gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(gtkwin->menu.typing_icon), @@ -1984,7 +1985,7 @@ GTK_ICON_SIZE_MENU)); gtk_tooltips_set_tip(gtkconv->tooltips, gtkwin->menu.typing_icon, _("User is typing..."), NULL); - } else if(im && gaim_im_get_typing_state(im) == TYPED) { + } else if(im && gaim_im_get_typing_state(im) == GAIM_TYPED) { gtkwin->menu.typing_icon = gtk_image_menu_item_new(); gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(gtkwin->menu.typing_icon), @@ -4456,13 +4457,13 @@ style->font_desc = pango_font_description_copy( gtk_widget_get_style(gtkconv->tab_label)->font_desc); - if (im != NULL && gaim_im_get_typing_state(im) == TYPING) { + if (im != NULL && gaim_im_get_typing_state(im) == GAIM_TYPING) { style->fg[GTK_STATE_NORMAL].red = 0x4646; style->fg[GTK_STATE_NORMAL].green = 0xA0A0; style->fg[GTK_STATE_NORMAL].blue = 0x4646; style->fg[GTK_STATE_ACTIVE] = style->fg[GTK_STATE_NORMAL]; } - else if (im != NULL && gaim_im_get_typing_state(im) == TYPED) { + else if (im != NULL && gaim_im_get_typing_state(im) == GAIM_TYPED) { style->fg[GTK_STATE_NORMAL].red = 0xD1D1; style->fg[GTK_STATE_NORMAL].green = 0x9494; style->fg[GTK_STATE_NORMAL].blue = 0x0C0C; diff -r 508adf90fbb9 -r 059d95c67cda src/gtkconv.h --- a/src/gtkconv.h Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gtkconv.h Sat Jun 14 23:21:02 2003 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Copyright (C) 2002-2003, Christian Hammond + * Copyright (C) 2002-2003 Christian Hammond * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r 508adf90fbb9 -r 059d95c67cda src/gtkdebug.c --- a/src/gtkdebug.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gtkdebug.c Sat Jun 14 23:21:02 2003 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Copyright (C) 2002-2003, Christian Hammond + * Copyright (C) 2003 Christian Hammond * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,11 +20,17 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "internal.h" + +#include "prefs.h" +#include "util.h" + #include "gtkdebug.h" -#include "gaim.h" #include "gtkimhtml.h" -#include "prefs.h" -#include + +#include "ui.h" + +extern int opt_debug; typedef struct { diff -r 508adf90fbb9 -r 059d95c67cda src/gtkdebug.h --- a/src/gtkdebug.h Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gtkdebug.h Sat Jun 14 23:21:02 2003 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Copyright (C) 2002-2003, Christian Hammond + * Copyright (C) 2003 Christian Hammond * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r 508adf90fbb9 -r 059d95c67cda src/gtkft.c --- a/src/gtkft.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gtkft.c Sat Jun 14 23:21:02 2003 +0000 @@ -1,9 +1,10 @@ /** - * @file gtkft.c The GTK+ file transfer UI + * @file gtkft.c GTK+ file transfer UI + * @ingroup gtkui * * gaim * - * Copyright (C) 2003, Christian Hammond + * Copyright (C) 2003 Christian Hammond * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,18 +19,20 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ -#include "gaim.h" +#include "internal.h" + +#include "debug.h" +#include "notify.h" +#include "ft.h" #include "prpl.h" -#include -#include -#include -#include +#include "request.h" +#include "util.h" + +#include "gaim-disclosure.h" #include "gtkcellrendererprogress.h" -#include "gaim-disclosure.h" -#include "notify.h" -#include "request.h" +#include "gtkft.h" +#include "stock.h" #define GAIM_GTKXFER(xfer) \ (struct gaim_gtkxfer_ui_data *)(xfer)->ui_data diff -r 508adf90fbb9 -r 059d95c67cda src/gtkft.h --- a/src/gtkft.h Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gtkft.h Sat Jun 14 23:21:02 2003 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Copyright (C) 2003, Christian Hammond + * Copyright (C) 2003 Christian Hammond * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r 508adf90fbb9 -r 059d95c67cda src/gtknotify.c --- a/src/gtknotify.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gtknotify.c Sat Jun 14 23:21:02 2003 +0000 @@ -20,12 +20,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "gtknotify.h" +#include "internal.h" + +#include "debug.h" +#include "connection.h" #include "stock.h" -#include -/* XXX For ngettext :/ */ -#include "gaim.h" +#include "gtknotify.h" + +#include "ui.h" typedef struct { diff -r 508adf90fbb9 -r 059d95c67cda src/gtkpounce.c --- a/src/gtkpounce.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gtkpounce.c Sat Jun 14 23:21:02 2003 +0000 @@ -1,5 +1,6 @@ /** * @file gtkpounce.c GTK+ Buddy Pounce API + * @ingroup gtkui * * gaim * @@ -20,14 +21,20 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ -#include -#include -#include "gaim.h" +#include "internal.h" + +#include "conversation.h" +#include "debug.h" +#include "notify.h" +#include "prpl.h" +#include "server.h" +#include "sound.h" + +#include "gtkblist.h" #include "gtkpounce.h" -#include "gtkblist.h" -#include "prpl.h" -#include "sound.h" -#include "notify.h" +#include "gtkutils.h" + +#include "ui.h" typedef struct { diff -r 508adf90fbb9 -r 059d95c67cda src/gtkprefs.c --- a/src/gtkprefs.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gtkprefs.c Sat Jun 14 23:21:02 2003 +0000 @@ -21,38 +21,30 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include +#include "internal.h" + +#include "debug.h" +#include "notify.h" +#include "prefs.h" +#include "proxy.h" +#include "prpl.h" +#include "sound.h" +#include "util.h" + +#include "gtkblist.h" +#include "gtkconv.h" +#include "gtkdebug.h" #include "gtkimhtml.h" -#include "gaim.h" -#include "gtkblist.h" -#include "gtkdebug.h" #include "gtkplugin.h" #include "gtkprefs.h" -#include "prpl.h" -#include "prefs.h" -#include "proxy.h" -#include "sound.h" #include "gtksound.h" -#include "notify.h" - -#ifdef _WIN32 -#include "win32dep.h" -#endif +#include "gtkutils.h" +#include "stock.h" + +#include "ui.h" + +/* XXX for grab_url */ +#include "gaim.h" #define PROXYHOST 0 #define PROXYPORT 1 diff -r 508adf90fbb9 -r 059d95c67cda src/gtkrequest.c --- a/src/gtkrequest.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gtkrequest.c Sat Jun 14 23:21:02 2003 +0000 @@ -20,13 +20,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "internal.h" + +#include "debug.h" + #include "gtkrequest.h" +#include "gtkutils.h" #include "stock.h" -#include -#include - -/* XXX For _(..) */ -#include "gaim.h" typedef struct { diff -r 508adf90fbb9 -r 059d95c67cda src/gtksound.c --- a/src/gtksound.c Sat Jun 14 21:34:31 2003 +0000 +++ b/src/gtksound.c Sat Jun 14 23:21:02 2003 +0000 @@ -19,44 +19,29 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ - -#ifdef HAVE_CONFIG_H -#include -#endif +#include "internal.h" -#ifdef HAVE_ENDIAN_H -#include -#endif - -#include -#include -#include - -#ifndef _WIN32 -#include -#else +#ifdef _WIN32 #include #include #endif #ifdef USE_AO -#include -#include +# include +# include #endif /* USE_AO */ #ifdef USE_NAS_AUDIO -#include