# HG changeset patch # User Mark Doliner # Date 1077348358 0 # Node ID 34e8ad866f126a7cf9f2af4b195111f3c4ccbcd5 # Parent 068db3a28cf61094b2c961c9047d6ad52578d9c4 [gaim-migrate @ 9032] Bring back the meaningless join chat icon on the join chat button in the join chat dialog. Hip hip, hoorah! Also give an error in oscar if trying to join a chat with no name. And rename g to gc in a few places. committer: Tailor Script diff -r 068db3a28cf6 -r 34e8ad866f12 src/gtkblist.c --- a/src/gtkblist.c Sat Feb 21 07:01:42 2004 +0000 +++ b/src/gtkblist.c Sat Feb 21 07:25:58 2004 +0000 @@ -816,7 +816,7 @@ _("Join a Chat"), gtkblist->window ? GTK_WINDOW(gtkblist->window) : NULL, 0, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - _("_Join"), GTK_RESPONSE_OK, NULL); + GAIM_STOCK_CHAT, GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response(GTK_DIALOG(data->window), GTK_RESPONSE_OK); gtk_container_set_border_width(GTK_CONTAINER(data->window), 6); gtk_window_set_resizable(GTK_WINDOW(data->window), FALSE); diff -r 068db3a28cf6 -r 34e8ad866f12 src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Sat Feb 21 07:01:42 2004 +0000 +++ b/src/protocols/oscar/oscar.c Sat Feb 21 07:25:58 2004 +0000 @@ -5363,8 +5363,8 @@ return m; } -static void oscar_join_chat(GaimConnection *g, GHashTable *data) { - OscarData *od = (OscarData *)g->proto_data; +static void oscar_join_chat(GaimConnection *gc, GHashTable *data) { + OscarData *od = (OscarData *)gc->proto_data; aim_conn_t *cur; char *name, *exchange; @@ -5373,6 +5373,12 @@ gaim_debug(GAIM_DEBUG_INFO, "oscar", "Attempting to join chat room %s.\n", name); + + if ((name == NULL) || (*name == '\0')) { + gaim_notify_error(gc, NULL, _("Invalid chat name specified."), NULL); + return; + } + if ((cur = aim_getconn_type(od->sess, AIM_CONN_TYPE_CHATNAV))) { gaim_debug(GAIM_DEBUG_INFO, "oscar", "chatnav exists, creating room\n"); @@ -5389,9 +5395,9 @@ } } -static void oscar_chat_invite(GaimConnection *g, int id, const char *message, const char *name) { - OscarData *od = (OscarData *)g->proto_data; - struct chat_connection *ccon = find_oscar_chat(g, id); +static void oscar_chat_invite(GaimConnection *gc, int id, const char *message, const char *name) { + OscarData *od = (OscarData *)gc->proto_data; + struct chat_connection *ccon = find_oscar_chat(gc, id); if (!ccon) return; @@ -5400,9 +5406,9 @@ ccon->exchange, ccon->name, 0x0); } -static void oscar_chat_leave(GaimConnection *g, int id) { - OscarData *od = g ? (OscarData *)g->proto_data : NULL; - GSList *bcs = g->buddy_chats; +static void oscar_chat_leave(GaimConnection *gc, int id) { + OscarData *od = gc ? (OscarData *)gc->proto_data : NULL; + GSList *bcs = gc->buddy_chats; GaimConversation *b = NULL; struct chat_connection *c = NULL; int count = 0; @@ -5422,20 +5428,20 @@ gaim_debug(GAIM_DEBUG_INFO, "oscar", "Attempting to leave room %s (currently in %d rooms)\n", b->name, count); - c = find_oscar_chat(g, gaim_conv_chat_get_id(GAIM_CONV_CHAT(b))); + c = find_oscar_chat(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(b))); if (c != NULL) { if (od) od->oscar_chats = g_slist_remove(od->oscar_chats, c); if (c->inpa > 0) gaim_input_remove(c->inpa); - if (g && od->sess) + if (gc && od->sess) aim_conn_kill(od->sess, &c->conn); g_free(c->name); g_free(c->show); g_free(c); } /* we do this because with Oscar it doesn't tell us we left */ - serv_got_chat_left(g, gaim_conv_chat_get_id(GAIM_CONV_CHAT(b))); + serv_got_chat_left(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(b))); } static int oscar_send_chat(GaimConnection *gc, int id, const char *message) { diff -r 068db3a28cf6 -r 34e8ad866f12 src/stock.c --- a/src/stock.c Sat Feb 21 07:01:42 2004 +0000 +++ b/src/stock.c Sat Feb 21 07:25:58 2004 +0000 @@ -84,6 +84,7 @@ const GtkStockItem stock_items[] = { { GAIM_STOCK_ALIAS, N_("_Alias"), 0, 0, NULL }, + { GAIM_STOCK_CHAT, N_("_Join"), 0, 0, NULL }, { GAIM_STOCK_MODIFY, N_("_Modify"), 0, 0, NULL }, { GAIM_STOCK_OPEN_MAIL, N_("_Open Mail"), 0, 0, NULL }, { GAIM_STOCK_PAUSE, N_("_Pause"), 0, 0, NULL },