# HG changeset patch # User Sean Egan # Date 1019936467 0 # Node ID 49fb2b634a2a3b461123d65872fb367663f7a5c6 # Parent 01279615a5fe26fbf0ec00f6c2f643d6a734685b [gaim-migrate @ 3205] The Robot101 commit. A toc fix (don't use toc) and the possibility to compile iconaway.c on an applet and use it on the standalone app. committer: Tailor Script diff -r 01279615a5fe -r 49fb2b634a2a plugins/iconaway.c --- a/plugins/iconaway.c Sat Apr 27 07:43:53 2002 +0000 +++ b/plugins/iconaway.c Sat Apr 27 19:41:07 2002 +0000 @@ -20,14 +20,8 @@ return; XIconifyWindow(GDK_DISPLAY(), GDK_WINDOW_XWINDOW(imaway->window), - ((_XPrivDisplay)GDK_DISPLAY())->default_screen); -#ifdef USE_APPLET - applet_destroy_buddy(); -#else - XIconifyWindow(GDK_DISPLAY(), - GDK_WINDOW_XWINDOW(blist->window), - ((_XPrivDisplay)GDK_DISPLAY())->default_screen); -#endif + ((_XPrivDisplay)GDK_DISPLAY())->default_screen); + hide_buddy_list(); if (all_convos) XIconifyWindow(GDK_DISPLAY(), GDK_WINDOW_XWINDOW(all_convos->window), diff -r 01279615a5fe -r 49fb2b634a2a src/about.c --- a/src/about.c Sat Apr 27 07:43:53 2002 +0000 +++ b/src/about.c Sat Apr 27 19:41:07 2002 +0000 @@ -69,6 +69,15 @@ return VERSION; } +gboolean is_applet() +{ +#ifdef USE_APPLET + return TRUE; +#else + return FALSE; +#endif +} + void show_about(GtkWidget *w, void *null) { GtkWidget *vbox; diff -r 01279615a5fe -r 49fb2b634a2a src/buddy.c --- a/src/buddy.c Sat Apr 27 07:43:53 2002 +0000 +++ b/src/buddy.c Sat Apr 27 19:41:07 2002 +0000 @@ -1986,6 +1986,16 @@ return g; } +void hide_buddy_list() { + #ifdef USE_APPLET + applet_destroy_buddy(); +#else + XIconifyWindow(GDK_DISPLAY(), + GDK_WINDOW_XWINDOW(blist->window), + ((_XPrivDisplay)GDK_DISPLAY())->default_screen); +#endif +} + static gint log_timeout(struct buddy_show *b) { /* this part is really just a bad hack because of a bug I can't find */ diff -r 01279615a5fe -r 49fb2b634a2a src/protocols/toc/toc.c --- a/src/protocols/toc/toc.c Sat Apr 27 07:43:53 2002 +0000 +++ b/src/protocols/toc/toc.c Sat Apr 27 19:41:07 2002 +0000 @@ -1003,9 +1003,12 @@ g_free (g->away); g->away = NULL; if (message) { + char *tmp = g_malloc(strlen(message) * 4 + 1); + strcpy(tmp, message); g->away = g_strdup (message); - escape_text(message); - g_snprintf(buf, MSG_LEN, "toc_set_away \"%s\"", message); + escape_text(tmp); + g_snprintf(buf, MSG_LEN, "toc_set_away \"%s\"", tmp); + g_free(tmp); } else g_snprintf(buf, MSG_LEN, "toc_set_away \"\""); sflap_send(g, buf, -1, TYPE_DATA); diff -r 01279615a5fe -r 49fb2b634a2a src/ui.h --- a/src/ui.h Sat Apr 27 07:43:53 2002 +0000 +++ b/src/ui.h Sat Apr 27 19:41:07 2002 +0000 @@ -349,6 +349,7 @@ extern void gaim_separator(GtkWidget *); extern void redo_buddy_list(); /* you really shouldn't call this function */ extern void set_blist_tab(); +extern void hide_buddy_list(); /* Functions in buddy_chat.c */ extern void join_chat();