Mercurial > pidgin
changeset 2380:6f83c22d9e70
[gaim-migrate @ 2393]
(19:13:52) vanguardist: it's easy mmmkay
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 28 Sep 2001 02:16:34 +0000 |
parents | cacaf7ace3a5 |
children | 427ccd7dfdd2 |
files | src/about.c src/buddy.c src/gaim.h src/multi.c |
diffstat | 4 files changed, 86 insertions(+), 84 deletions(-) [+] |
line wrap: on
line diff
--- a/src/about.c Fri Sep 28 01:25:02 2001 +0000 +++ b/src/about.c Fri Sep 28 02:16:34 2001 +0000 @@ -126,7 +126,8 @@ label = gtk_label_new( _("GAIM is a client that supports AOL's Instant Messenger protocol. It is written\n" - "using Gtk+ and is licensed under the GPL.\n\n" "URL: " WEBSITE)); + "using Gtk+ and is licensed under the GPL.\n\n" "URL: " WEBSITE "\n\n" + "IRC: #gaim on irc.openprojects.net")); gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
--- a/src/buddy.c Fri Sep 28 01:25:02 2001 +0000 +++ b/src/buddy.c Fri Sep 28 02:16:34 2001 +0000 @@ -126,7 +126,6 @@ static void remove_buddy_show(struct group_show *gs, struct buddy_show *bs); static struct group_show *find_gs_by_bs(struct buddy_show *b); static void update_num_group(struct group_show *gs); -static void redo_buddy_list(); void handle_group_rename(struct group *g, char *prevname) { @@ -290,6 +289,33 @@ void destroy_buddy() { + GSList *s = shows; + struct group_show *g; + GSList *m; + struct buddy_show *b; + while (s) { + g = (struct group_show *)s->data; + debug_printf("group_show still exists: %s\n", g->name); + m = g->members; + while (m) { + b = (struct buddy_show *)m->data; + debug_printf("buddy_show still exists: %s\n", b->name); + m = g_slist_remove(m, b); + if (b->log_timer > 0) + gtk_timeout_remove(b->log_timer); + b->log_timer = 0; + gtk_tree_remove_item(GTK_TREE(g->tree), b->item); + g_free(b->show); + g_free(b->name); + g_free(b); + } + gtk_tree_remove_item(GTK_TREE(buddies), g->item); + s = g_slist_remove(s, g); + g_free(g->name); + g_free(g); + } + shows = NULL; + if (blist) gtk_widget_destroy(blist); blist = NULL; @@ -472,86 +498,6 @@ #endif - -void signoff_all(GtkWidget *w, gpointer d) -{ - GSList *c = connections; - struct gaim_connection *g = NULL; - - while (c) { - g = (struct gaim_connection *)c->data; - g->wants_to_die = TRUE; - signoff(g); - c = connections; - } -} - -void signoff(struct gaim_connection *gc) -{ - plugin_event(event_signoff, gc, 0, 0, 0); - system_log(log_signoff, gc, NULL, OPT_LOG_BUDDY_SIGNON | OPT_LOG_MY_SIGNON); - update_keepalive(gc, FALSE); - convo_menu_remove(gc); - remove_icon_data(gc); - serv_close(gc); - redo_buddy_list(); - build_edit_tree(); - do_away_menu(); - do_proto_menu(); - redo_convo_menus(); -#ifdef USE_APPLET - if (connections) - set_user_state(online); -#endif - update_connection_dependent_prefs(); - - if (connections) - return; - - { - GSList *s = shows; - struct group_show *g; - GSList *m; - struct buddy_show *b; - while (s) { - g = (struct group_show *)s->data; - debug_printf("group_show still exists: %s\n", g->name); - m = g->members; - while (m) { - b = (struct buddy_show *)m->data; - debug_printf("buddy_show still exists: %s\n", b->name); - m = g_slist_remove(m, b); - if (b->log_timer > 0) - gtk_timeout_remove(b->log_timer); - b->log_timer = 0; - gtk_tree_remove_item(GTK_TREE(g->tree), b->item); - g_free(b->show); - g_free(b->name); - g_free(b); - } - gtk_tree_remove_item(GTK_TREE(buddies), g->item); - s = g_slist_remove(s, g); - g_free(g->name); - g_free(g); - } - shows = NULL; - } - - debug_printf("date: %s\n", full_date()); - destroy_all_dialogs(); - destroy_buddy(); -#ifdef USE_APPLET - set_user_state(offline); - applet_buddy_show = FALSE; - applet_widget_unregister_callback(APPLET_WIDGET(applet), "signoff"); - remove_applet_away(); -#else - show_login(); -#endif /* USE_APPLET */ - if (misc_options & OPT_MISC_BUDDY_TICKER) - BuddyTickerSignoff(); -} - void handle_click_group(GtkWidget *widget, GdkEventButton *event, struct group *g) { if (event->type == GDK_2BUTTON_PRESS) { @@ -991,7 +937,8 @@ } -static void redo_buddy_list() +/* you really shouldn't call this function */ +void redo_buddy_list() { /* so here we can safely assume that we don't have to add or delete anything, we * just have to go through and reorder everything. remember, nothing is going to
--- a/src/gaim.h Fri Sep 28 01:25:02 2001 +0000 +++ b/src/gaim.h Fri Sep 28 02:16:34 2001 +0000 @@ -747,7 +747,7 @@ extern void refresh_buddy_window(); extern void toc_build_config(struct gaim_connection *, char *, int len, gboolean); extern void signoff(struct gaim_connection *); -extern void signoff_all(GtkWidget *, gpointer); +extern void signoff_all(gpointer, gpointer); extern void do_im_back(); extern void set_buddy(struct gaim_connection *, struct buddy *); extern struct group *add_group(struct gaim_connection *, char *); @@ -765,6 +765,7 @@ extern void remove_group(struct gaim_connection *, struct group *); extern void toggle_buddy_pixmaps(); extern void gaim_separator(GtkWidget *); +extern void redo_buddy_list(); /* you really shouldn't call this function */ /* Functions in away.c */ extern void rem_away_mess(GtkWidget *, struct away_message *);
--- a/src/multi.c Fri Sep 28 01:25:02 2001 +0000 +++ b/src/multi.c Fri Sep 28 02:16:34 2001 +0000 @@ -1080,6 +1080,59 @@ gc->meter = NULL; } +void signoff_all(gpointer w, gpointer d) +{ + GSList *c = connections; + struct gaim_connection *g = NULL; + + while (c) { + g = (struct gaim_connection *)c->data; + g->wants_to_die = TRUE; + signoff(g); + c = connections; + } +} + +void signoff(struct gaim_connection *gc) +{ + /* core stuff */ + debug_printf("date: %s\n", full_date()); + plugin_event(event_signoff, gc, 0, 0, 0); + system_log(log_signoff, gc, NULL, OPT_LOG_BUDDY_SIGNON | OPT_LOG_MY_SIGNON); + update_keepalive(gc, FALSE); + + /* UI stuff */ + convo_menu_remove(gc); + remove_icon_data(gc); + serv_close(gc); + redo_buddy_list(); + build_edit_tree(); + do_away_menu(); + do_proto_menu(); + redo_convo_menus(); +#ifdef USE_APPLET + if (connections) + set_user_state(online); +#endif + update_connection_dependent_prefs(); + + if (connections) + return; + + destroy_all_dialogs(); + destroy_buddy(); +#ifdef USE_APPLET + set_user_state(offline); + applet_buddy_show = FALSE; + applet_widget_unregister_callback(APPLET_WIDGET(applet), "signoff"); + remove_applet_away(); +#else + show_login(); +#endif /* USE_APPLET */ + if (misc_options & OPT_MISC_BUDDY_TICKER) + BuddyTickerSignoff(); +} + struct aim_user *new_user(const char *name, int proto, int opts) { char *titles[4];