From: Mark D. <the...@us...> - 2003-01-18 01:58:02
|
Update of /cvsroot/gaim/gaim/src/protocols/gg In directory sc8-pr-cvs1:/tmp/cvs-serv29612/src/protocols/gg Modified Files: gg.c Log Message: I needed to make gc->login_time set before do_proto_menu was called, so I moved that line into account_online instead of serv_finish_login. serv_finish_login is called directly after account_online, and gc->login_time isn't used for anything anyway, so it shouldn't matter. I use gc->login_time to determine if a gc's protocol actions menu is ready to be drawn or not (should not be draw for accounts that are in the process of signing online). I made the "Show Buddies Awaiting Authorization" thing show something reasonable for when you aren't waiting for authorization from anyone. I swapped the ok and cancel buttons for the search for buddy by information and clear log file so they follow the HIG. I gave the right side of the log viewer a shadowed border. I Robot. I applied a patch from Ryan McCabe that doesn't really do anything for gaim (yet, anyway), but it allows clients using libfaim to call cleansnacs cleanly, which stops a potential build up of SNACs in memory when you don't send an IM for a long period of time. I applied another patch from Mr. McCabe that fixes a potential crash in ssi.c when your buddy list is a few lions short of a pride, if you know what I mean. I re-prettified an authorization dialog or two. The bold stuff and the non-bold stuff got backwardcised somehow. I added support for those messages from the ICQ server. Like the one that tells you not to give your password to anyone when you first signon. Index: gg.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/gg.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- gg.c 7 Jan 2003 20:57:41 -0000 1.32 +++ gg.c 18 Jan 2003 01:57:59 -0000 1.33 @@ -1157,32 +1157,44 @@ } } -static void agg_do_action(struct gaim_connection *gc, char *action) -{ - if (!strcmp(action, _("Directory Search"))) { - show_find_info(gc); - } else if (!strcmp(action, _("Change Password"))) { - show_change_passwd(gc); - } else if (!strcmp(action, _("Import Buddy List from Server"))) { - import_buddies_server(gc); - } else if (!strcmp(action, _("Export Buddy List to Server"))) { - export_buddies_server(gc); - } else if (!strcmp(action, _("Delete Buddy List from Server"))) { - delete_buddies_server(gc); - } -} - -static GList *agg_actions() +static GList *agg_actions(struct gaim_connection *gc) { GList *m = NULL; + struct proto_actions_menu *pam; + + pam = g_new0(struct proto_actions_menu, 1); + pam->label = _("Directory Search"); + pam->callback = show_find_info; + pam->gc = gc; + m = g_list_append(m, pam); - m = g_list_append(m, _("Directory Search")); m = g_list_append(m, NULL); - m = g_list_append(m, _("Change Password")); + + pam = g_new0(struct proto_actions_menu, 1); + pam->label = _("Change Password"); + pam->callback = show_change_passwd; + pam->gc = gc; + m = g_list_append(m, pam); + m = g_list_append(m, NULL); - m = g_list_append(m, _("Import Buddy List from Server")); - m = g_list_append(m, _("Export Buddy List to Server")); - m = g_list_append(m, _("Delete Buddy List from Server")); + + pam = g_new0(struct proto_actions_menu, 1); + pam->label = _("Import Buddy List from Server"); + pam->callback = import_buddies_server; + pam->gc = gc; + m = g_list_append(m, pam); + + pam = g_new0(struct proto_actions_menu, 1); + pam->label = _("Export Buddy List to Server"); + pam->callback = export_buddies_server; + pam->gc = gc; + m = g_list_append(m, pam); + + pam = g_new0(struct proto_actions_menu, 1); + pam->label = _("Delete Buddy List from Server"); + pam->callback = delete_buddies_server; + pam->gc = gc; + m = g_list_append(m, pam); return m; } @@ -1258,7 +1270,6 @@ ret->list_icon = agg_list_icon; ret->away_states = agg_away_states; ret->actions = agg_actions; - ret->do_action = agg_do_action; ret->buddy_menu = agg_buddy_menu; ret->chat_info = NULL; ret->login = agg_login; |