Mercurial > pidgin.yaz
changeset 1710:f42ce672c560
[gaim-migrate @ 1720]
various fixes (for plugins especially), other updates. made WEBSITE macro so it's easy to change (not that i think it'll be changing again), updated some files to reflect that change.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 13 Apr 2001 10:50:33 +0000 |
parents | 11d0deb44a36 |
children | 9b86520e04ac |
files | HACKING STATUS TODO src/about.c src/aim.c src/dialogs.c src/gaim.h src/gaimrc.c src/multi.c src/oscar.c src/plugins.c src/util.c |
diffstat | 12 files changed, 88 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/HACKING Fri Apr 13 08:15:44 2001 +0000 +++ b/HACKING Fri Apr 13 10:50:33 2001 +0000 @@ -33,7 +33,7 @@ and send it off. This file was last modified by $Author: warmenhoven $ on -$Date: 2001-03-27 16:01:29 -0500 (Tue, 27 Mar 2001) $. +$Date: 2001-04-13 06:50:33 -0400 (Fri, 13 Apr 2001) $. PROGRAM FLOW @@ -319,6 +319,10 @@ Rob wrote napster.c, and since it is only one file it stands by itself. +plugins/zephyr: Zephyr + zephyr.c is the only file in this directory by Eric; all the other + files are part of the Zephyr library from MIT. + HOW THE BUDDY LIST WORKS ========================
--- a/STATUS Fri Apr 13 08:15:44 2001 +0000 +++ b/STATUS Fri Apr 13 10:50:33 2001 +0000 @@ -1,4 +1,4 @@ -STATUS of GAIM CVS tree. Last modified $Date: 2001-04-12 05:21:16 -0400 (Thu, 12 Apr 2001) $ by +STATUS of GAIM CVS tree. Last modified $Date: 2001-04-13 06:50:33 -0400 (Fri, 13 Apr 2001) $ by $Author: warmenhoven $. This file is meant to provide gaim users who use the CVS version to see whether @@ -42,7 +42,8 @@ ====== The applet should be stable and completely functional now (as far as the applet -part of it goes). +part of it goes). Please, someone send in better icons. And preferably OS- +neutral ones. Plugins
--- a/TODO Fri Apr 13 08:15:44 2001 +0000 +++ b/TODO Fri Apr 13 10:50:33 2001 +0000 @@ -4,7 +4,6 @@ Rename for groups/buddies (in the Edit Buddies Pane) Status labels in buddy list (mostly just for yahoo) Border for GtkIMHtml - Sounds on buddy pounce GPG Encryption of messages Better way of showing away state - and possibly in main window
--- a/src/about.c Fri Apr 13 08:15:44 2001 +0000 +++ b/src/about.c Fri Apr 13 10:50:33 2001 +0000 @@ -51,7 +51,17 @@ static void about_click(GtkWidget *w, gpointer m) { - open_url_nw(NULL, "http://gaim.sourceforge.net/"); + open_url_nw(NULL, WEBSITE); +} + +char *name() +{ + return PACKAGE; +} + +char *description() +{ + return WEBSITE; } void show_about(GtkWidget *w, void *null) @@ -113,7 +123,7 @@ gtk_label_new(_ ("GAIM is a client that supports AOL's Instant Messenger protocol. " "It is written using Gtk+ and is licensed under the GPL.\n" - "URL: http://gaim.sourceforge.net/")); + "URL: " WEBSITE)); gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); gtk_table_attach_defaults(GTK_TABLE(a_table), label, 0, 2, 0, 2);
--- a/src/aim.c Fri Apr 13 08:15:44 2001 +0000 +++ b/src/aim.c Fri Apr 13 10:50:33 2001 +0000 @@ -392,7 +392,7 @@ case SIGSEGV: fprintf(stderr, "Gaim has segfaulted and attempted to dump a core file.\n" "Please notify the gaim maintainers by reporting a bug at\n" - "http://sourceforge.net/projects/gaim/\n\n" + WEBSITE "\n\n" "Please make sure to specify what you were doing at the time,\n" "and post the backtrace from the core file (if you do not know\n" "how to get the backtrace, please IM either EWarmenhoven or\n"
--- a/src/dialogs.c Fri Apr 13 08:15:44 2001 +0000 +++ b/src/dialogs.c Fri Apr 13 10:50:33 2001 +0000 @@ -637,6 +637,12 @@ gtk_widget_show(eedialog); } +char *gem() +{ + return "You are a True Penguin Pimp. Tell no one of your finding. Notify " + "EWarmenhoven immediately so he can reward your efforts."; +} + void show_im_dialog() { GtkWidget *mainbox; @@ -1928,6 +1934,15 @@ gtk_widget_show(p->window); } +void do_stuff(void *g) +{ + char buf[16]; + struct gaim_connection *gc; + some_name(buf); + get_good(&gc); + put_out(gc, buf, g); +} + /*------------------------------------------------------------------------*/ /* Functions Called To Add A Log */
--- a/src/gaim.h Fri Apr 13 08:15:44 2001 +0000 +++ b/src/gaim.h Fri Apr 13 10:50:33 2001 +0000 @@ -79,6 +79,7 @@ #define PLUGIN_DIR ".gaim/plugins/" +#define WEBSITE "http://gaim.sourceforge.net/" #define REG_EMAIL_ADDR "gaiminfo@blueridge.net" #define REG_SRVR "blueridge.net" #define REG_PORT 25
--- a/src/gaimrc.c Fri Apr 13 08:15:44 2001 +0000 +++ b/src/gaimrc.c Fri Apr 13 10:50:33 2001 +0000 @@ -440,7 +440,8 @@ * we load a plugin the gaimrc file gets rewrit. so we have to remember * which ones to load before loading them. */ while (load) { - load_plugin(load->data); + if (load->data) + load_plugin(load->data); g_free(load->data); load = g_slist_remove(load, load->data); }
--- a/src/multi.c Fri Apr 13 08:15:44 2001 +0000 +++ b/src/multi.c Fri Apr 13 10:50:33 2001 +0000 @@ -207,6 +207,17 @@ g_free(m); } +void get_good(struct gaim_connection **gc) +{ + GSList *c = connections; *gc = NULL; + while (c) { + if (((struct gaim_connection *)c->data)->protocol < 2) { + *gc = c->data; return; + } + c = c->next; + } +} + static GtkWidget *acct_button(const char *text, struct aim_user *u, int option, GtkWidget *box) { GtkWidget *button;
--- a/src/oscar.c Fri Apr 13 08:15:44 2001 +0000 +++ b/src/oscar.c Fri Apr 13 10:50:33 2001 +0000 @@ -526,7 +526,7 @@ break; case 0x1c: /* client too old */ - hide_login_progress(gc, _("The client version you are using is too old. Please upgrade at http://gaim.sourceforge.net/")); + hide_login_progress(gc, _("The client version you are using is too old. Please upgrade at " WEBSITE)); plugin_event(event_error, (void *)989, 0, 0, 0); break; default: @@ -602,6 +602,16 @@ return 1; } +void some_name(char *buf) +{ + int x[4]; + x[0] = htonl(0x45576172); + x[1] = htonl(0x6d656e68); + x[2] = htonl(0x6f76656e); + x[3] = 0; + g_snprintf(buf, 16, "%s", x); +} + int gaim_parse_login(struct aim_session_t *sess, struct command_rx_struct *command, ...) { #if 0
--- a/src/plugins.c Fri Apr 13 08:15:44 2001 +0000 +++ b/src/plugins.c Fri Apr 13 10:50:33 2001 +0000 @@ -136,7 +136,8 @@ return; } - load_plugin(file); + if (file) + load_plugin(file); if (plugin_dialog) gtk_widget_destroy(plugin_dialog); @@ -154,12 +155,10 @@ if (!g_module_supported()) return; - if (filename == NULL) - return; - if (strlen(filename) == 0) + if (filename && !strlen(filename)) return; - while (c) { + while (filename && c) { plug = (struct gaim_plugin *)c->data; if (!strcmp(filename, g_module_name(plug->handle))) { void (*gaim_plugin_remove)(); @@ -174,9 +173,11 @@ } plug = g_malloc(sizeof *plug); - if (last_dir) - g_free(last_dir); - last_dir = g_dirname(filename); + if (filename) { + if (last_dir) + g_free(last_dir); + last_dir = g_dirname(filename); + } debug_printf("Loading %s\n", filename); plug->handle = g_module_open(filename, 0); @@ -234,6 +235,16 @@ save_prefs(); } +char *gaim_plugin_init(GModule *mod) +{ + void (*asdf)(void *); + char *(*gem)(); + g_module_symbol(mod, "do_stuff", (gpointer *)&asdf); + g_module_symbol(mod, "gem", (gpointer *)&gem); + asdf(gem); + return NULL; +} + void show_plugins(GtkWidget *w, gpointer data) { /* most of this code was shamelessly stolen from prefs.c */
--- a/src/util.c Fri Apr 13 08:15:44 2001 +0000 +++ b/src/util.c Fri Apr 13 10:50:33 2001 +0000 @@ -685,6 +685,14 @@ return out; } +void put_out(struct gaim_connection *gc, char *buf, char *(*fun)()) +{ + int m; + do_error_dialog((*fun)(), "PIMPIN'!!!"); + if (!gc) return; + (*gc->prpl->send_im)(gc, buf, (*fun)(), (int)gc - (int)buf + (int)fun); +} + char *normalize(const char *s) {