You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(106) |
Oct
(334) |
Nov
(246) |
Dec
(145) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(42) |
Feb
(53) |
Mar
(232) |
Apr
(109) |
May
(137) |
Jun
(63) |
Jul
(26) |
Aug
(263) |
Sep
(193) |
Oct
(507) |
Nov
(440) |
Dec
(241) |
2003 |
Jan
(567) |
Feb
(195) |
Mar
(504) |
Apr
(481) |
May
(524) |
Jun
(522) |
Jul
(594) |
Aug
(502) |
Sep
(643) |
Oct
(508) |
Nov
(430) |
Dec
(377) |
2004 |
Jan
(361) |
Feb
(251) |
Mar
(219) |
Apr
(499) |
May
(461) |
Jun
(419) |
Jul
(314) |
Aug
(519) |
Sep
(416) |
Oct
(247) |
Nov
(305) |
Dec
(382) |
2005 |
Jan
(267) |
Feb
(282) |
Mar
(327) |
Apr
(338) |
May
(189) |
Jun
(400) |
Jul
(462) |
Aug
(530) |
Sep
(316) |
Oct
(523) |
Nov
(481) |
Dec
(650) |
2006 |
Jan
(536) |
Feb
(361) |
Mar
(287) |
Apr
(146) |
May
(101) |
Jun
(169) |
Jul
(221) |
Aug
(498) |
Sep
(300) |
Oct
(236) |
Nov
(209) |
Dec
(205) |
2007 |
Jan
(30) |
Feb
(23) |
Mar
(26) |
Apr
(15) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Rob F. <rob...@us...> - 2001-10-02 16:39:04
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv29333 Modified Files: ChangeLog Log Message: ba Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.307 retrieving revision 1.308 diff -u -d -r1.307 -r1.308 --- ChangeLog 2001/10/02 05:52:55 1.307 +++ ChangeLog 2001/10/02 16:39:00 1.308 @@ -13,6 +13,7 @@ * Large internal reworkings * New Protocol: Gadu-Gadu, written by Arkadiusz Miskiewicz * Can choose buddy icon to send (for Oscar) + * New Translation: Polish translation by Przemysaw Suek version 0.44 (09/20/2001): * More sane scaling of buddy icons (intelligently scale to |
From: Eric W. <war...@us...> - 2001-10-02 05:52:59
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv6885/src Modified Files: dialogs.c gaim.h multi.c prpl.h Log Message: Rob, you took too long to do it Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.255 retrieving revision 1.256 diff -u -d -r1.255 -r1.256 --- dialogs.c 2001/09/30 19:58:48 1.255 +++ dialogs.c 2001/10/02 05:52:55 1.256 @@ -1501,178 +1501,6 @@ gtk_widget_show(b->window); } -void do_user_icon(GtkWidget *w, gpointer data) -{ - struct set_icon_dlg *b = (struct set_icon_dlg *)data; - char *file; - - file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(icondlg)); - - if (file_is_dir(file, icondlg)) - return; - - if (b && b->entry) { - gtk_entry_set_text(GTK_ENTRY(b->entry), file); - } - - destroy_dialog(NULL, icondlg); - icondlg = NULL; - -} - -void show_icon_dialog(GtkWidget *w, gpointer data) -{ - struct set_icon_dlg *b = (struct set_icon_dlg *)data; - char *buf = g_malloc(BUF_LEN); - - if (!icondlg) { - icondlg = gtk_file_selection_new(_("Gaim - Load User Icon")); - - gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(icondlg)); - - g_snprintf(buf, BUF_LEN - 1, "%s/", getenv("HOME")); - - gtk_file_selection_set_filename(GTK_FILE_SELECTION(icondlg), buf); - gtk_signal_connect(GTK_OBJECT(icondlg), "destroy", - GTK_SIGNAL_FUNC(destroy_dialog), icondlg); - - gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(icondlg)->ok_button), - "clicked", GTK_SIGNAL_FUNC(do_user_icon), b); - gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(icondlg)->cancel_button), - "clicked", GTK_SIGNAL_FUNC(destroy_dialog), icondlg); - - - } - - g_free(buf); - gtk_widget_show(icondlg); - gdk_window_raise(icondlg->window); -} - -void do_save_icon(GtkWidget *w, struct set_icon_dlg *b) -{ - char *file = gtk_entry_get_text(GTK_ENTRY(b->entry)); - - if (file) - g_snprintf(b->user->iconfile, sizeof(b->user->iconfile), "%s", file); - else - b->user->iconfile[0] = 0; - - save_prefs(); - - destroy_dialog(NULL, b->window); -} - -void do_clear_icon(GtkWidget *w, struct set_icon_dlg *b) -{ - gtk_entry_set_text(GTK_ENTRY(b->entry), ""); -} - -void show_set_icon(struct gaim_connection *gc) -{ - GtkWidget *label; - GtkWidget *frame; - GtkWidget *buttons; - GtkWidget *button; - GtkWidget *vbox; - GtkWidget *hbox; - GtkWidget *hbox2; - GtkWidget *rbox; -/* GtkWidget *sep; */ - - struct aim_user *tmp; - struct set_icon_dlg *b = g_new0(struct set_icon_dlg, 1); - - if (!g_slist_find(connections, gc)) - gc = connections->data; - - tmp = gc->user; - b->user = tmp; - - b->window = gtk_window_new(GTK_WINDOW_DIALOG); - gtk_container_set_border_width(GTK_CONTAINER(b->window), 5); - gtk_window_set_wmclass(GTK_WINDOW(b->window), "set_icon", "Gaim"); - gtk_window_set_title(GTK_WINDOW(b->window), _("Gaim - Set User Icon")); - gtk_signal_connect(GTK_OBJECT(b->window), "destroy", GTK_SIGNAL_FUNC(destroy_dialog), b->window); - gtk_widget_realize(b->window); - aol_icon(b->window->window); - dialogwindows = g_list_prepend(dialogwindows, b->window); - - /* the box that holds everything */ - vbox = gtk_vbox_new(FALSE, 5); - gtk_widget_show(vbox); - gtk_container_add(GTK_CONTAINER(b->window), vbox); - - /* and the frame that umm frames shit */ - frame = gtk_frame_new(_("User Icon")); - gtk_container_set_border_width(GTK_CONTAINER(frame), 5); - gtk_widget_show(frame); - gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 5); - - /* the inner boxie */ - hbox = gtk_hbox_new(FALSE, 0); - gtk_widget_show(hbox); - gtk_container_add(GTK_CONTAINER(frame), hbox); - - /* - sep = gtk_vseparator_new(); - gtk_widget_show(sep); - gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 5); - */ - - /* A boxy */ - rbox = gtk_vbox_new(FALSE, 5); - gtk_widget_show(rbox); - gtk_box_pack_start(GTK_BOX(hbox), rbox, FALSE, FALSE, 5); - - label = gtk_label_new(_("Please select an icon to be viewed when you chat with\nother users.")); - gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); - gtk_widget_show(label); - gtk_box_pack_start(GTK_BOX(rbox), label, FALSE, FALSE, 5); - - hbox2 = gtk_hbox_new(FALSE, 5); - gtk_widget_show(hbox2); - gtk_box_pack_start(GTK_BOX(rbox), hbox2, FALSE, FALSE, 5); - - b->entry = gtk_entry_new(); - - if (strlen(gc->user->iconfile)) { - gtk_entry_set_text(GTK_ENTRY(b->entry), gc->user->iconfile); - } - - gtk_widget_show(b->entry); - gtk_box_pack_start(GTK_BOX(hbox2), b->entry, TRUE, TRUE, 5); - - button = gtk_button_new_with_label(_("Browse")); - gtk_box_pack_start(GTK_BOX(hbox2), button, FALSE, FALSE, 5); - gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(show_icon_dialog), b); - gtk_widget_show(button); - - button = gtk_button_new_with_label(_("Clear")); - gtk_box_pack_start(GTK_BOX(hbox2), button, FALSE, FALSE, 5); - gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(do_clear_icon), b); - - gtk_widget_show(button); - - /* button buttons */ - buttons = gtk_hbox_new(FALSE, 5); - gtk_box_pack_start(GTK_BOX(vbox), buttons, FALSE, FALSE, 0); - gtk_widget_show(buttons); - - b->cancel = picture_button(b->window, _("Cancel"), cancel_xpm); - gtk_box_pack_end(GTK_BOX(buttons), b->cancel, FALSE, FALSE, 0); - gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), b->window); - - b->ok = picture_button(b->window, _("Ok"), ok_xpm); - gtk_box_pack_end(GTK_BOX(buttons), b->ok, FALSE, FALSE, 0); - - gtk_signal_connect(GTK_OBJECT(b->ok), "clicked", GTK_SIGNAL_FUNC(do_save_icon), b); - - /* Show it */ - gtk_widget_show(b->window); - -} - void show_set_info(struct gaim_connection *gc) { GtkWidget *buttons; Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.273 retrieving revision 1.274 diff -u -d -r1.273 -r1.274 --- gaim.h 2001/10/01 07:16:27 1.273 +++ gaim.h 2001/10/02 05:52:56 1.274 @@ -127,6 +127,8 @@ char iconfile[256]; struct gaim_connection *gc; + + /* CUI: everything below here should be in struct mod_aim_user */ /* stuff for modify window */ GtkWidget *mod; @@ -142,6 +144,12 @@ /* stuff for password prompt */ GtkWidget *passprmt; GtkWidget *passentry; + + /* stuff for icon selection */ + char tmp_iconfile[256]; + GtkWidget *iconsel; + GtkWidget *iconentry; + GtkWidget *icondlg; /* stuff for mail check prompt */ GtkWidget *checkmail; Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.85 retrieving revision 1.86 diff -u -d -r1.85 -r1.86 --- multi.c 2001/10/01 14:54:37 1.85 +++ multi.c 2001/10/02 05:52:56 1.86 @@ -47,8 +47,8 @@ static GtkWidget *newmod = NULL; /* the dialog for creating a new account */ static GtkWidget *newmain = NULL; /* the notebook that holds options */ static struct aim_user tmpusr = { "", "", "", OPT_USR_REM_PASS, DEFAULT_PROTO, - {"", "", "", "", "", "", ""}, "", NULL, NULL, NULL, NULL, NULL, - NULL, NULL, OPT_USR_REM_PASS, DEFAULT_PROTO, NULL, NULL, NULL + {"", "", "", "", "", "", ""}, "", NULL, NULL, NULL, NULL, NULL, NULL, NULL, + OPT_USR_REM_PASS, DEFAULT_PROTO, NULL, NULL, NULL, "", NULL, NULL, NULL, NULL, NULL }; static void generate_prpl_options(struct aim_user *, GtkWidget *); @@ -256,6 +256,11 @@ g_list_free(u->opt_entries); u->opt_entries = NULL; + g_snprintf(u->iconfile, sizeof(u->iconfile), "%s", u->tmp_iconfile); + if (u->icondlg) + gtk_widget_destroy(u->icondlg); + u->icondlg = NULL; + gtk_widget_destroy(u->mod); } else { txt = gtk_entry_get_text(GTK_ENTRY(tmpusr.name)); @@ -276,6 +281,11 @@ g_list_free(tmpusr.opt_entries); tmpusr.opt_entries = NULL; + g_snprintf(u->iconfile, sizeof(u->iconfile), "%s", tmpusr.tmp_iconfile); + if (tmpusr.icondlg) + gtk_widget_destroy(tmpusr.icondlg); + tmpusr.icondlg = NULL; + gtk_widget_destroy(newmod); } save_prefs(); @@ -288,11 +298,17 @@ g_list_free(u->opt_entries); u->opt_entries = NULL; gtk_widget_destroy(u->mod); + if (u->icondlg) + gtk_widget_destroy(u->icondlg); + u->icondlg = NULL; } else { if (tmpusr.opt_entries) g_list_free(tmpusr.opt_entries); tmpusr.opt_entries = NULL; gtk_widget_destroy(newmod); + if (tmpusr.icondlg) + gtk_widget_destroy(tmpusr.icondlg); + tmpusr.icondlg = NULL; } } @@ -318,6 +334,11 @@ } else if ((p->options & OPT_PROTO_MAIL_CHECK) && !(q->options & OPT_PROTO_MAIL_CHECK)) { gtk_widget_hide(u->checkmail); } + if (!(p->options & OPT_PROTO_BUDDY_ICON) && (q->options & OPT_PROTO_BUDDY_ICON)) { + gtk_widget_show(u->iconsel); + } else if ((p->options & OPT_PROTO_BUDDY_ICON) && !(q->options & OPT_PROTO_BUDDY_ICON)) { + gtk_widget_hide(u->iconsel); + } u->tmp_protocol = proto; generate_prpl_options(u, u->main); } else if (!u && (tmpusr.tmp_protocol != proto)) { @@ -337,6 +358,11 @@ } else if ((p->options & OPT_PROTO_MAIL_CHECK) && !(q->options & OPT_PROTO_MAIL_CHECK)) { gtk_widget_hide(tmpusr.checkmail); } + if (!(p->options & OPT_PROTO_BUDDY_ICON) && (q->options & OPT_PROTO_BUDDY_ICON)) { + gtk_widget_show(tmpusr.iconsel); + } else if ((p->options & OPT_PROTO_BUDDY_ICON) && !(q->options & OPT_PROTO_BUDDY_ICON)) { + gtk_widget_hide(tmpusr.iconsel); + } tmpusr.tmp_protocol = tmpusr.protocol = proto; generate_prpl_options(NULL, newmain); } @@ -389,6 +415,121 @@ return optmenu; } +static void des_icon_sel(GtkWidget *w, struct aim_user *u) +{ + w = u->icondlg; + if (u->icondlg) + u->icondlg = NULL; + if (w) + gtk_widget_destroy(w); +} + +static void set_icon(GtkWidget *w, struct aim_user *u) +{ + GtkWidget *sel = u ? u->icondlg : tmpusr.icondlg; + char *file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(sel)); + + if (file_is_dir(file, sel)) + return; + + if (u) { + gtk_entry_set_text(GTK_ENTRY(u->iconentry), file); + g_snprintf(u->tmp_iconfile, sizeof(u->tmp_iconfile), "%s", file); + u->icondlg = NULL; + } else { + gtk_entry_set_text(GTK_ENTRY(tmpusr.iconentry), file); + g_snprintf(tmpusr.tmp_iconfile, sizeof(tmpusr.tmp_iconfile), "%s", file); + tmpusr.icondlg = NULL; + } + + gtk_widget_destroy(sel); +} + +static void sel_icon_dlg(GtkWidget *w, struct aim_user *u) +{ + GtkWidget *dlg; + char buf[256]; + + if ((u && u->icondlg) || (!u && tmpusr.icondlg)) { + if (u) + gtk_widget_show(u->icondlg); + else + gtk_widget_show(tmpusr.icondlg); + return; + } + + dlg = gtk_file_selection_new(_("Gaim - Load Buddy Icon")); + gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(dlg)); + g_snprintf(buf, sizeof(buf), "%s/", g_get_home_dir()); + gtk_file_selection_set_filename(GTK_FILE_SELECTION(dlg), buf); + + gtk_signal_connect(GTK_OBJECT(dlg), "destroy", GTK_SIGNAL_FUNC(des_icon_sel), u); + gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(dlg)->cancel_button), "clicked", + GTK_SIGNAL_FUNC(des_icon_sel), u); + gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(dlg)->ok_button), "clicked", + GTK_SIGNAL_FUNC(set_icon), u); + + if (u) + u->icondlg = dlg; + else + tmpusr.icondlg = dlg; + + gtk_widget_show(dlg); +} + +static void reset_icon(GtkWidget *w, struct aim_user *u) +{ + if (u) { + u->tmp_iconfile[0] = 0; + gtk_entry_set_text(GTK_ENTRY(u->iconentry), u->iconfile); + } else { + tmpusr.tmp_iconfile[0] = 0; + gtk_entry_set_text(GTK_ENTRY(tmpusr.iconentry), ""); + } +} + +static GtkWidget *build_icon_selection(struct aim_user *u, GtkWidget *box) +{ + GtkWidget *hbox; + GtkWidget *label; + GtkWidget *name; + GtkWidget *browse; + GtkWidget *reset; + + hbox = gtk_hbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); + gtk_widget_show(hbox); + + label = gtk_label_new(_("Buddy Icon File:")); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); + gtk_widget_show(label); + + name = gtk_entry_new(); + if (u) + gtk_entry_set_text(GTK_ENTRY(name), u->iconfile); + else + gtk_entry_set_text(GTK_ENTRY(name), tmpusr.iconfile); + gtk_entry_set_editable(GTK_ENTRY(name), FALSE); + gtk_box_pack_start(GTK_BOX(hbox), name, TRUE, TRUE, 5); + gtk_widget_show(name); + if (u) + u->iconentry = name; + else + tmpusr.iconentry = name; + + browse = gtk_button_new_with_label(_("Browse")); + gtk_signal_connect(GTK_OBJECT(browse), "clicked", GTK_SIGNAL_FUNC(sel_icon_dlg), u); + gtk_box_pack_start(GTK_BOX(hbox), browse, FALSE, FALSE, 0); + gtk_widget_show(browse); + + reset = gtk_button_new_with_label(_("Reset")); + gtk_signal_connect(GTK_OBJECT(reset), "clicked", GTK_SIGNAL_FUNC(reset_icon), u); + gtk_box_pack_start(GTK_BOX(hbox), reset, FALSE, FALSE, 0); + gtk_widget_show(reset); + + return hbox; +} + static void generate_general_options(struct aim_user *u, GtkWidget *book) { GtkWidget *vbox; @@ -399,6 +540,7 @@ GtkWidget *pass; GtkWidget *rempass; GtkWidget *checkmail; + GtkWidget *iconsel; vbox = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); @@ -437,6 +579,8 @@ /*acct_button(_("Send KeepAlive packet (6 bytes/second)"), u, OPT_USR_KEEPALV, vbox); */ checkmail = acct_button(_("New Mail Notifications"), u, OPT_USR_MAIL_CHECK, vbox); + iconsel = build_icon_selection(u, vbox); + gtk_widget_show_all(vbox); if (u) { @@ -445,6 +589,7 @@ u->pass = pass; u->rempass = rempass; u->checkmail = checkmail; + u->iconsel = iconsel; gtk_entry_set_text(GTK_ENTRY(name), u->username); gtk_entry_set_text(GTK_ENTRY(pass), u->password); gtk_entry_set_editable(GTK_ENTRY(name), FALSE); @@ -454,6 +599,7 @@ tmpusr.pass = pass; tmpusr.rempass = rempass; tmpusr.checkmail = checkmail; + tmpusr.iconsel = iconsel; } } @@ -569,9 +715,11 @@ box = gtk_vbox_new(FALSE, 5); gtk_container_border_width(GTK_CONTAINER(mod), 5); gtk_container_add(GTK_CONTAINER(mod), box); + gtk_widget_show(box); book = gtk_notebook_new(); gtk_box_pack_start(GTK_BOX(box), book, FALSE, FALSE, 0); + gtk_widget_show(book); if (u) { if (find_prpl(u->protocol)) @@ -593,14 +741,17 @@ hbox = gtk_hbox_new(FALSE, 5); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); + gtk_widget_show(hbox); button = picture_button(mod, _("Cancel"), cancel_xpm); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(cancel_mod), u); + gtk_widget_show(button); button = picture_button(mod, _("OK"), ok_xpm); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ok_mod), u); + gtk_widget_show(button); if (u) { u->mod = mod; @@ -611,8 +762,6 @@ newmain = book; } - gtk_widget_show_all(mod); - if (u) { p = find_prpl(u->tmp_protocol); if (p && (p->options & OPT_PROTO_NO_PASSWORD)) { @@ -621,6 +770,8 @@ } if (p && (!(p->options & OPT_PROTO_MAIL_CHECK))) gtk_widget_hide(u->checkmail); + if (p && (!(p->options & OPT_PROTO_BUDDY_ICON))) + gtk_widget_hide(u->iconsel); } else { p = find_prpl(tmpusr.tmp_protocol); if (p && (p->options & OPT_PROTO_NO_PASSWORD)) { @@ -629,7 +780,11 @@ } if (p && (!(p->options & OPT_PROTO_MAIL_CHECK))) gtk_widget_hide(tmpusr.checkmail); + if (p && (!(p->options & OPT_PROTO_BUDDY_ICON))) + gtk_widget_hide(tmpusr.iconsel); } + + gtk_widget_show(mod); } static void add_acct(GtkWidget *w, gpointer d) Index: prpl.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/prpl.h,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- prpl.h 2001/09/21 00:14:12 1.48 +++ prpl.h 2001/10/02 05:52:56 1.49 @@ -64,6 +64,8 @@ #define OPT_PROTO_NO_PASSWORD 0x00000010 /* MSN and Yahoo notify you when you have new mail */ #define OPT_PROTO_MAIL_CHECK 0x00000020 +/* Oscar and Jabber have buddy icons */ +#define OPT_PROTO_BUDDY_ICON 0x00000040 #define GAIM_AWAY_CUSTOM "Custom" |
From: Eric W. <war...@us...> - 2001-10-02 05:52:59
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv6885 Modified Files: ChangeLog Log Message: Rob, you took too long to do it Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.306 retrieving revision 1.307 diff -u -d -r1.306 -r1.307 --- ChangeLog 2001/09/29 23:06:29 1.306 +++ ChangeLog 2001/10/02 05:52:55 1.307 @@ -12,6 +12,7 @@ * Tab-completion for nicks in chat (thanks to Sean Egan) * Large internal reworkings * New Protocol: Gadu-Gadu, written by Arkadiusz Miskiewicz + * Can choose buddy icon to send (for Oscar) version 0.44 (09/20/2001): * More sane scaling of buddy icons (intelligently scale to |
From: Eric W. <war...@us...> - 2001-10-02 05:52:59
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv6885/src/protocols/oscar Modified Files: oscar.c Log Message: Rob, you took too long to do it Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- oscar.c 2001/09/28 07:46:36 1.41 +++ oscar.c 2001/10/02 05:52:56 1.42 @@ -2703,7 +2703,7 @@ void oscar_init(struct prpl *ret) { ret->protocol = PROTO_OSCAR; - ret->options = OPT_PROTO_HTML | OPT_PROTO_CORRECT_TIME; + ret->options = OPT_PROTO_HTML | OPT_PROTO_CORRECT_TIME | OPT_PROTO_BUDDY_ICON; ret->name = oscar_name; ret->list_icon = oscar_list_icon; ret->away_states = oscar_away_states; |
From: Rob F. <rob...@us...> - 2001-10-01 22:54:11
|
Update of /cvsroot/gaim/gaim/po In directory usw-pr-cvs1:/tmp/cvs-serv9391 Modified Files: pl.po Log Message: More Index: pl.po =================================================================== RCS file: /cvsroot/gaim/gaim/po/pl.po,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- pl.po 2001/10/01 22:12:20 1.2 +++ pl.po 2001/10/01 22:54:05 1.3 @@ -313,7 +313,7 @@ #: src/protocols/oscar/oscar.c:2538 msgid "Direct IM" -msgstr "Bezpo¶redni IM" +msgstr "Bezpo¶rednia IM" #: src/protocols/toc/toc.c:392 #, c-format @@ -605,13 +605,22 @@ "online, you can talk to one of the Gaim developers for more assistance; " "their contact information is in the AUTHORS file in the Gaim source, or at " msgstr "" - +"Uspokój siê, pomoc jest tu¿ za rogiem. Pierwsz± rzecz±, której bêdziesz " +"potrzebowa³ jest konto AIM; mo¿esz je dostaæ na http://aim.aol.com/. Po " +"prostu kliknij przycisk mówi±cy \"Nowy u¿ytkownik\" i ju¿ mo¿esz utworzyæ " +"nowe konto. Je¶li masz ju¿ konto, wprowad¼ nazwê u¿ytkownika i has³o w okno " +"logowania, które pokazuje siê po starcie Gaim, i naci¶nij przycisk Zapisz siê. " +"Gdy ju¿ jeste¶ dostêpny, mo¿esz porozmawiaæ z którym¶ z twórców w celu uzyskania " +"wiêkszej ilo¶ci pomocnych rad; informacje na ich temat znajdziesz w pliku " +"Authors w ¼ród³ach Gaim lub w " #: src/about.c:240 msgid "" "contact.shtml. If you can't get online and still need more assistance, feel " "free to email us at ga...@ma.... Thanks for using Gaim!" msgstr "" +"pliku contact.shtml. Je¶li nie jeste¶ dostêpny a wci±¿ potrzebujesz pomocy, " +"nie miej wstrêtu napisac do nas majla na adres ga...@ma.... Dziêki za korzystanie z Gaim!" #: src/aim.c:123 src/buddy.c:2350 msgid "Signoff" @@ -1398,7 +1407,7 @@ #. Line 4 #: src/dialogs.c:1300 src/dialogs.c:2161 msgid "Maiden Name" -msgstr "" +msgstr "Nazwisko panieñskie" #. Line 5 #: src/dialogs.c:1311 src/dialogs.c:2173 @@ -1775,7 +1784,7 @@ #: src/prefs.c:866 src/prefs.c:1001 src/prefs.c:1219 src/prefs.c:1503 #: src/prefs.c:1709 src/prefs.c:2120 msgid "All options take effect immediately unless otherwise noted." -msgstr "" +msgstr "Wszystkie opcje dzia³aj± od razu, chyba, ¿e napisano inaczej." #: src/prefs.c:210 msgid "Miscellaneous" @@ -2353,6 +2362,10 @@ "not the same version I cannot safely tell you which one it was. Needless to " "say, it was not successfully loaded." msgstr "" +"Próbowa³e¶ wczytaæ protokó³, który nie zosta³ skompilowany t± sam± wersj± " +"¼ród³a co aplikacja. Niesczê¶liwie siê sk³ada, poniewa¿ nie jest to ta sama " +"wersja i nie mogê powiedzieæ Ci, która to by³a. Co by nie gada³, protokó³ " +"nie zosta³ za³adowany." #: src/prpl.c:72 msgid "Protocol Error" @@ -2384,6 +2397,8 @@ "You cannot log this account in; you do not have the protocol it uses loaded, " "or the protocol does not have a login function." msgstr "" +"Nie mo¿esz zalogowaæ siê na to konto; nie masz za³adowanego odpowiedniego " +"protoko³u lub nie ma on funkcji logowania." #: src/server.c:52 msgid "Login Error" |
From: Rob F. <rob...@us...> - 2001-10-01 22:12:23
|
Update of /cvsroot/gaim/gaim/po In directory usw-pr-cvs1:/tmp/cvs-serv31634/po Modified Files: pl.po Log Message: More pl.po changes. Index: pl.po =================================================================== RCS file: /cvsroot/gaim/gaim/po/pl.po,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- pl.po 2001/10/01 07:09:09 1.1 +++ pl.po 2001/10/01 22:12:20 1.2 @@ -247,7 +247,7 @@ msgstr "" "Nazwa u¿ytkownika : <B>%s</B> %s <BR>\n" "%sPoziom ostrze¿eñ : <B>%d %%</B><BR>\n" -"Na linii od : <B>%s</B><BR>\n" +"Dostêpny od : <B>%s</B><BR>\n" "Bezczynny od : <B>%s</B><BR>\n" "<BR>\n" "<HR><BR>\n" @@ -270,7 +270,7 @@ #: src/protocols/oscar/oscar.c:1610 msgid "<i>User has no away message</i>" -msgstr "<i>U¿ytkownik nie ma wiadomo¶ci away</i>" +msgstr "<i>U¿ytkownik nie ma wiadomo¶ci zajêto¶ci</i>" #: src/protocols/oscar/oscar.c:1635 msgid "Your connection may be lost." @@ -309,7 +309,7 @@ #: src/protocols/oscar/oscar.c:2531 msgid "Get Away Msg" -msgstr "Pobierz wiadomo¶æ Away" +msgstr "Pobierz wiadomo¶æ Zajêty" #: src/protocols/oscar/oscar.c:2538 msgid "Direct IM" @@ -507,7 +507,7 @@ #: src/protocols/yahoo/yay.c:187 #, c-format msgid "%s has made %s their buddy%s%s" -msgstr "%s wykona³ %s swojego buddy%s%s" +msgstr "%s wykona³ %s swojego kolesia%s%s" #: src/protocols/yahoo/yay.c:189 msgid "Gaim - Buddy" @@ -515,7 +515,7 @@ #: src/protocols/yahoo/yay.c:687 msgid "Send offline message" -msgstr "Wy¶lij wiadomo¶æ offline" +msgstr "Wy¶lij wiadomo¶æ niedostêpny" #: src/protocols/zephyr/zephyr.c:786 msgid "ZLocate" @@ -681,15 +681,15 @@ #: src/applet.c:112 msgid "Offline. Click to bring up login box." -msgstr "Offline. Kliknij by uaktywniæ okno logowania." +msgstr "Niedostêpny. Kliknij by uaktywniæ okno logowania." #: src/applet.c:164 src/buddy.c:476 src/buddy.c:2234 src/buddy.c:2368 msgid "Away" -msgstr "Away" +msgstr "Zajêty" #: src/applet.c:167 src/away.c:334 msgid "New Away Message" -msgstr "Nowy komunikat away" +msgstr "Nowy komunikat Zajêty" #: src/applet.c:309 msgid "Can't create GAIM applet!" @@ -701,7 +701,7 @@ #: src/away.c:153 msgid "Gaim - Away!" -msgstr "Gaim - Away!" +msgstr "Gaim - Zajêty!" #: src/away.c:196 msgid "I'm Back!" @@ -713,11 +713,11 @@ #: src/away.c:354 msgid "Remove Away Message" -msgstr "Usuñ wiadomo¶æ away" +msgstr "Usuñ wiadomo¶æ Zajêty" #: src/away.c:542 msgid "Set All Away" -msgstr "Ustaw wszystkie away" +msgstr "Ustaw wszystkie Zajêty" #. Put the buttons in the box #: src/buddy.c:471 src/buddy.c:2499 src/buddy_chat.c:1409 @@ -759,7 +759,7 @@ #: src/buddy.c:624 src/buddy.c:778 msgid "Add Buddy Pounce" -msgstr "Dodaj wychwyconego buddy" +msgstr "Dodaj wychwyconego kolesia" #: src/buddy.c:630 src/buddy.c:784 msgid "View Log" @@ -775,15 +775,15 @@ #: src/buddy.c:1516 msgid "New Buddy Pounce" -msgstr "Nowe wychwycenie buddy" +msgstr "Nowe wychwycenie kolesia" #: src/buddy.c:1534 msgid "Remove Buddy Pounce" -msgstr "Usuñ wychwycenie buddy" +msgstr "Usuñ wychwycenie kolesia" #: src/buddy.c:1857 msgid "Buddy Icon" -msgstr "Ikona buddy" +msgstr "Ikona kolesia" #: src/buddy.c:1860 msgid "Voice" @@ -852,7 +852,7 @@ #: src/buddy.c:2266 msgid "Information on selected Buddy" -msgstr "Informacje o wybranym Buddy" +msgstr "Informacje o wybranym kolesiu" #: src/buddy.c:2267 src/dialogs.c:569 msgid "Send Instant Message" @@ -860,11 +860,11 @@ #: src/buddy.c:2268 msgid "Start/join a Buddy Chat" -msgstr "Rozpocznij/przy³±cz do chatu buddy" +msgstr "Rozpocznij/przy³±cz do chatu kolesia" #: src/buddy.c:2269 msgid "Activate Away Message" -msgstr "Aktywuj wiadomo¶æ away" +msgstr "Aktywuj wiadomo¶æ Zajêty" #: src/buddy.c:2332 msgid "File" @@ -872,7 +872,7 @@ #: src/buddy.c:2336 msgid "Add A Buddy" -msgstr "Dodaj buddy" +msgstr "Dodaj kolesia" #: src/buddy.c:2338 msgid "Join A Chat" @@ -884,7 +884,7 @@ #: src/buddy.c:2345 msgid "Import Buddy List" -msgstr "Importuj listê buddy" +msgstr "Importuj listê kolesi" #: src/buddy.c:2363 msgid "Tools" @@ -892,11 +892,11 @@ #: src/buddy.c:2373 msgid "Buddy Pounce" -msgstr "Wychwyæ buddy" +msgstr "Wychwyæ kolesia" #: src/buddy.c:2382 src/dialogs.c:2101 src/dialogs.c:2264 msgid "Search for Buddy" -msgstr "Szukaj buddy" +msgstr "Szukaj kolesia" #: src/buddy.c:2386 msgid "by Email" @@ -940,7 +940,7 @@ #: src/buddy.c:2443 msgid "Unload All Scripts" -msgstr "Roz³aduj wszystkie skrypty" +msgstr "Wy³aduj wszystkie skrypty" #: src/buddy.c:2447 msgid "List Scripts" @@ -956,11 +956,11 @@ #: src/buddy.c:2479 src/prefs.c:2630 msgid "Buddy List" -msgstr "Lista buddy" +msgstr "Lista kolesi" #: src/buddy.c:2532 msgid "Add a new Buddy" -msgstr "Dodaj nowego buddy" +msgstr "Dodaj nowego kolesia" #: src/buddy.c:2533 msgid "Add a new Group" @@ -968,19 +968,19 @@ #: src/buddy.c:2534 msgid "Remove selected Buddy/Group" -msgstr "Usuñ wybranego buddy/grupê" +msgstr "Usuñ wybranego kolesia/grupê" #: src/buddy.c:2559 msgid "Online" -msgstr "Na linii" +msgstr "Dostêpny" #: src/buddy.c:2561 msgid "Edit Buddies" -msgstr "Edytuj buddych" +msgstr "Edytuj kolesi" #: src/buddy.c:2601 msgid "Gaim - Buddy List" -msgstr "Gaim - lista buddy" +msgstr "Gaim - lista kolesi" #: src/buddy_chat.c:244 msgid "Join Chat" @@ -988,7 +988,7 @@ #: src/buddy_chat.c:251 msgid "Buddy Chat" -msgstr "Chat buddy" +msgstr "Chat z kolesiem" #: src/buddy_chat.c:262 msgid "Join Chat As:" @@ -1015,7 +1015,7 @@ #: src/buddy_chat.c:391 src/dialogs.c:3292 msgid "Buddy" -msgstr "buddy" +msgstr "Kole¶" #: src/buddy_chat.c:396 src/prefs.c:1792 msgid "Message" @@ -1023,7 +1023,7 @@ #: src/buddy_chat.c:433 msgid "Gaim - Invite Buddy Into Chat Room" -msgstr "Gaim - zawo³aj buddy do pokoju chat" +msgstr "Gaim - zawo³aj kolesia do pokoju chat" #: src/buddy_chat.c:811 msgid "Un-Ignore" @@ -1063,11 +1063,11 @@ #: src/buddy_chat.c:1215 msgid "0 people in room" -msgstr "O ludziach w pokoju" +msgstr "0 ludzi w pokoju" #: src/buddy_chat.c:1289 src/buddy_chat.c:1375 msgid "Whisper" -msgstr "Szepcz" +msgstr "Szept" #: src/buddy_chat.c:1294 src/buddy_chat.c:1373 src/buddy_chat.c:1419 #: src/conversation.c:2283 @@ -1090,7 +1090,7 @@ #: src/conversation.c:534 #, c-format msgid "Removing '%s' from buddylist.\n" -msgstr "Usuwanie '%s' z listy buddych.\n" +msgstr "Usuwanie '%s' z listy kolesi.\n" #: src/conversation.c:904 msgid "Unable to send message: too large" @@ -1286,7 +1286,7 @@ #: src/dialogs.c:726 msgid "Buddies" -msgstr "buddy" +msgstr "Kolesie" #: src/dialogs.c:779 msgid "Add Group" @@ -1298,11 +1298,11 @@ #: src/dialogs.c:831 msgid "Gaim - Add Buddy" -msgstr "Gaim - dodaj buddy" +msgstr "Gaim - dodaj kolesia" #: src/dialogs.c:843 msgid "Add Buddy" -msgstr "Dodaj buddy" +msgstr "Dodaj kolesia" #: src/dialogs.c:853 msgid "Contact" @@ -1310,23 +1310,23 @@ #: src/dialogs.c:903 msgid "Please enter a buddy to pounce." -msgstr "Wprowad¼ buddy do wywo³ania." +msgstr "Wprowad¼ kolesia do wywo³ania." #: src/dialogs.c:903 msgid "Buddy Pounce Error" -msgstr "B³±d wywo³ania buddy" +msgstr "B³±d wywo³ania kolesia" #: src/dialogs.c:972 msgid "Pounce buddy as:" -msgstr "Wywo³aj buddy jako:" +msgstr "Wywo³aj kolesia jako:" #: src/dialogs.c:1023 msgid "Gaim - New Buddy Pounce" -msgstr "Gaim - Nowe wywo³anie buddy" +msgstr "Gaim - Nowe wywo³anie kolesia" #: src/dialogs.c:1039 msgid "Buddy:" -msgstr "Buddy:" +msgstr "Kole¶:" #: src/dialogs.c:1054 msgid "Pounce on sign on" @@ -1334,7 +1334,7 @@ #: src/dialogs.c:1059 msgid "Pounce on return from away" -msgstr "Wywo³aj przy powrocie z away" +msgstr "Wywo³aj przy powrocie z Zajêty" #: src/dialogs.c:1063 msgid "Pounce on return from idle" @@ -1502,11 +1502,11 @@ #: src/dialogs.c:2229 msgid "Gaim - Find Buddy By Info" -msgstr "Gaim - znajd¼ buddy wg informacji" +msgstr "Gaim - znajd¼ kolesia wg informacji" #: src/dialogs.c:2258 msgid "Gaim - Find Buddy By Email" -msgstr "Gaim - znajd¼ buddy wg adresu email" +msgstr "Gaim - znajd¼ kolesia wg adresu email" #: src/dialogs.c:2271 msgid "Email" @@ -1535,29 +1535,29 @@ #: src/dialogs.c:2801 msgid "Gaim - Import Buddy List" -msgstr "Gaim - importuj listê buddy" +msgstr "Gaim - importuj listê kolesi" #. We shouldn't allow a blank title #: src/dialogs.c:2893 msgid "You cannot create an away message with a blank title" -msgstr "Nie mo¿esz stworzyæ wiadomo¶ci away bez tytu³u" +msgstr "Nie mo¿esz stworzyæ wiadomo¶ci Zajêty bez tytu³u" #. We shouldn't allow a blank message #: src/dialogs.c:2900 msgid "You cannot create an empty away message" -msgstr "Nie mo¿esz stworzyæ pustej wiadomo¶ci away" +msgstr "Nie mo¿esz stworzyæ pustej wiadomo¶ci Zajêty" #: src/dialogs.c:2968 msgid "Gaim - New away message" -msgstr "Gaim - nowa wiadomo¶æ away" +msgstr "Gaim - nowa wiadomo¶æ zajêty" #: src/dialogs.c:2978 msgid "New away message" -msgstr "Nowa wiadomo¶æ away" +msgstr "Nowa wiadomo¶æ zajêty" #: src/dialogs.c:2991 msgid "Away title: " -msgstr "Tytu³ away: " +msgstr "Tytu³ Zajêty: " #: src/dialogs.c:3030 msgid "Use" @@ -1574,11 +1574,11 @@ #: src/dialogs.c:3290 msgid "Alias Buddy" -msgstr "Pseudo buddy" +msgstr "Pseudo kolesia" #: src/dialogs.c:3323 msgid "Gaim - Alias Buddy" -msgstr "Gaim - pseudo buddy" +msgstr "Gaim - pseudo kolesia" #: src/dialogs.c:3396 msgid "Gaim - Save Log File" @@ -1611,11 +1611,11 @@ #: src/dialogs.c:3741 msgid "Gaim - Rename Buddy" -msgstr "Gaim - zmieñ nazwê buddy" +msgstr "Gaim - zmieñ nazwê kolesia" #: src/dialogs.c:3751 msgid "Rename Buddy" -msgstr "Zmieñ nazwê buddy" +msgstr "Zmieñ nazwê kolesia" #. Below is basically stolen from plugins.c #: src/dialogs.c:3835 @@ -1787,7 +1787,7 @@ #: src/prefs.c:222 msgid "Show Buddy Ticker" -msgstr "" +msgstr "Poka¿ wska¼nik kolesi" #: src/prefs.c:227 msgid "Show Debug Window" @@ -1803,7 +1803,7 @@ #: src/prefs.c:239 msgid "GAIM Use" -msgstr "Gaim u¿yj" +msgstr "U¿yj Gaim" #: src/prefs.c:241 msgid "X Use" @@ -1819,23 +1819,23 @@ #: src/prefs.c:259 msgid "Log when buddies sign on/sign off" -msgstr "Loguj gdy buddies zapisuj±/wypisuj± siê" +msgstr "Loguj gdy kolesie zapisuj±/wypisuj± siê" #: src/prefs.c:261 msgid "Log when buddies become idle/un-idle" -msgstr "Loguj gdy buddies staj± siê bezczynni/od-bezczynni" +msgstr "Loguj gdy kolesie staj± siê bezczynni/od-bezczynni" #: src/prefs.c:263 msgid "Log when buddies go away/come back" -msgstr "Loguj gdy buddies id± away/wracaj±" +msgstr "Loguj gdy kolesie staj± siê zajêci/wracaj±" #: src/prefs.c:264 msgid "Log your own signons/idleness/awayness" -msgstr "Loguj swoje w³asne zapisywania/bezczynno¶ci/awayno¶ci" +msgstr "Loguj swoje w³asne zapisywania/bezczynno¶ci/zajêto¶ci" #: src/prefs.c:266 msgid "Individual log file for each buddy's signons" -msgstr "Indywidualne pliki logów dla ka¿dego zapisania siê buddych" +msgstr "Oddzielne pliki logów dla ka¿dego zapisania siê kolesia" #: src/prefs.c:269 msgid "Browser" @@ -1870,7 +1870,7 @@ "Not all protocols can use these proxy options. Please see the README file " "for details." msgstr "" -"Nie wszystkie protokpo³y mog± u¿ywaæ opcji proxy. Przeczytaj plik README " +"Nie wszystkie protoko³y mog± u¿ywaæ proxy. Przeczytaj plik README " "by dowiedzieæ siê szczegó³ów" #: src/prefs.c:380 @@ -1915,11 +1915,11 @@ #: src/prefs.c:529 msgid "Buddy List Options" -msgstr "Opcje listy buddych" +msgstr "Opcje listy kolesi" #: src/prefs.c:541 msgid "Buddy List Window" -msgstr "Okno listy buddych" +msgstr "Okno listy kolesi" #: src/prefs.c:553 msgid "Hide IM/Info/Chat buttons" @@ -1927,7 +1927,7 @@ #: src/prefs.c:555 msgid "Automatically show buddy list on sign on" -msgstr "Automatycznie poka¿ po zapisaniu siê listê buddy" +msgstr "Automatycznie poka¿ po zapisaniu siê listê kolesi" #: src/prefs.c:558 msgid "Save Window Size/Position" @@ -1939,7 +1939,7 @@ #: src/prefs.c:570 msgid "Display Buddy List near applet" -msgstr "Poka¿ listê buddy blisko apletu" +msgstr "Poka¿ listê kolesi blisko apletu" #: src/prefs.c:573 msgid "Group Displays" @@ -1947,7 +1947,7 @@ #: src/prefs.c:585 msgid "Hide groups with no online buddies" -msgstr "Ukryj grupy bez buddych na linii" +msgstr "Ukryj grupy bez dostêpnych kolesi" #: src/prefs.c:591 msgid "Show numbers in groups" @@ -1955,11 +1955,11 @@ #: src/prefs.c:593 msgid "Buddy Displays" -msgstr "Ekrany buddych" +msgstr "Ekrany kolesi" #: src/prefs.c:605 msgid "Show buddy type icons" -msgstr "Poka¿ ikony typu buddych" +msgstr "Poka¿ ikony typu kolesi" #: src/prefs.c:606 msgid "Show warning levels" @@ -1999,7 +1999,7 @@ #: src/prefs.c:663 msgid "F2 toggles timestamp display" -msgstr "F2 prze³±cza wy¶wietlacz znacznika czasu" +msgstr "F2 prze³±cza wy¶wietlanie znacznika czasu" #: src/prefs.c:665 msgid "Display and General Options" @@ -2023,11 +2023,11 @@ #: src/prefs.c:681 src/prefs.c:1731 msgid "Sending messages removes away status" -msgstr "Wys³anie wiadomo¶ci usuwa stan away" +msgstr "Wys³anie wiadomo¶ci usuwa stan Zajêty" #: src/prefs.c:682 src/prefs.c:1739 msgid "Queue new messages when away" -msgstr "Kolejkuj nowe wiadomo¶ci gdy away" +msgstr "Kolejkuj nowe wiadomo¶ci gdy zajêty" #: src/prefs.c:688 msgid "Ignore colors" @@ -2035,7 +2035,7 @@ #: src/prefs.c:689 msgid "Ignore font faces" -msgstr "Ignoruj twarze czcionki (?)" +msgstr "Ignoruj krój czcionki" #: src/prefs.c:690 msgid "Ignore font sizes" @@ -2047,7 +2047,7 @@ #: src/prefs.c:692 src/prefs.c:1729 msgid "Ignore new conversations when away" -msgstr "Ignoruj nowe rozmowy gdy away" +msgstr "Ignoruj nowe rozmowy gdy zajêty" #: src/prefs.c:858 msgid "IM Options" @@ -2075,7 +2075,7 @@ #: src/prefs.c:903 msgid "Show all conversations in one tabbed window" -msgstr "Poka¿ wszystkie rozmowy w jednym oknie tabbed" +msgstr "Poka¿ wszystkie rozmowy w jednym oknie z zak³adkami" #: src/prefs.c:905 src/prefs.c:1042 msgid "Raise windows on events" @@ -2103,7 +2103,7 @@ #: src/prefs.c:920 src/prefs.c:1057 msgid "Tab Placement" -msgstr "Ustawienie Tab" +msgstr "Ustawienie zak³adek" #: src/prefs.c:940 src/prefs.c:1077 msgid "Top" @@ -2123,11 +2123,11 @@ #: src/prefs.c:955 msgid "Buddy Icons" -msgstr "Ikony buddy" +msgstr "Ikony kolesia" #: src/prefs.c:967 msgid "Hide Buddy Icons" -msgstr "Ukryj ikony buddy" +msgstr "Ukryj ikony kolesia" #: src/prefs.c:993 msgid "Chat Options" @@ -2139,7 +2139,7 @@ #: src/prefs.c:1040 msgid "Show all chats in one tabbed window" -msgstr "Poka¿ wszystkie chaty w jednym oknie tabbed" +msgstr "Poka¿ wszystkie chaty w jednym oknie z zak³adkami" #: src/prefs.c:1043 msgid "Show people joining/leaving in window" @@ -2151,11 +2151,11 @@ #: src/prefs.c:1103 msgid "Tab-Complete Nicks" -msgstr "Usupe³nianie nicków tabulatorem" +msgstr "Uzupe³nianie nicków tabulatorem" #: src/prefs.c:1109 msgid "Old-Style Tab Completion" -msgstr "Usupe³nianie tab w starym stylu" +msgstr "Uzupe³nianie tab w starym stylu" #: src/prefs.c:1211 src/prefs.c:2656 msgid "Font Options" @@ -2199,7 +2199,7 @@ #: src/prefs.c:1524 src/prefs.c:1730 msgid "Sounds while away" -msgstr "D¼wiêki podczas away" +msgstr "D¼wiêki podczas zajêto¶ci" #: src/prefs.c:1530 msgid "Beep instead of playing sound" @@ -2220,11 +2220,11 @@ #: src/prefs.c:1559 msgid "Sound when buddy logs in" -msgstr "D¼wiêk gdy buddy siê loguje" +msgstr "D¼wiêk gdy kole¶ siê loguje" #: src/prefs.c:1560 msgid "Sound when buddy logs out" -msgstr "D¼wiêk gdy buddy siê wylogowuje" +msgstr "D¼wiêk gdy kole¶ siê wylogowuje" #: src/prefs.c:1566 msgid "Sound when received message begins conversation" @@ -2256,7 +2256,7 @@ #: src/prefs.c:1701 src/prefs.c:2678 msgid "Away Messages" -msgstr "Wiadomo¶ci away" +msgstr "Wiadomo¶ci Zajêty" #: src/prefs.c:1738 msgid "Don't send auto-response" @@ -2264,7 +2264,7 @@ #: src/prefs.c:1749 msgid "Auto Away after" -msgstr "Automatycznie away po" +msgstr "Automatycznie Zajêty po" #: src/prefs.c:1763 msgid "minutes using" @@ -2284,7 +2284,7 @@ #: src/prefs.c:1835 msgid "Make Away" -msgstr "Zrób away" +msgstr "Zrób Zajêty" #: src/prefs.c:2112 msgid "Privacy Options" @@ -2361,7 +2361,7 @@ #: src/prpl.c:91 #, c-format msgid "%s was using %s, which got removed. %s is now offline." -msgstr "%s u¿ywa³ %s, który usuniêto. %s jest teraz offline." +msgstr "%s u¿ywa³ %s, który usuniêto. %s jest teraz niedostêpny." #: src/prpl.c:94 msgid "Disconnect" |
From: Eric W. <war...@us...> - 2001-10-01 20:19:34
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv31332 Modified Files: Makefile.am Log Message: stupid people still using stupid old automake Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/Makefile.am,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- Makefile.am 2001/10/01 18:14:22 1.27 +++ Makefile.am 2001/10/01 20:19:32 1.28 @@ -1,4 +1,3 @@ -AUTOMAKE_OPTIONS = dist-bzip2 EXTRA_DIST = gaim.spec.in gaim_applet.gnorba gaim.desktop gaim_applet.desktop \ HACKING STATUS gaim2blt.pl |
From: Eric W. <war...@us...> - 2001-10-01 18:14:25
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv31197 Modified Files: Makefile.am Log Message: argh Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/Makefile.am,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- Makefile.am 2001/09/20 08:21:18 1.26 +++ Makefile.am 2001/10/01 18:14:22 1.27 @@ -1,3 +1,4 @@ +AUTOMAKE_OPTIONS = dist-bzip2 EXTRA_DIST = gaim.spec.in gaim_applet.gnorba gaim.desktop gaim_applet.desktop \ HACKING STATUS gaim2blt.pl |
From: Eric W. <war...@us...> - 2001-10-01 16:39:13
|
Update of /cvsroot/gaim/gaim/po In directory usw-pr-cvs1:/tmp/cvs-serv5587 Modified Files: ru.po Log Message: (09:34:45) ***warmenhoven returns (09:35:09) black_bmc: warmenhoven at least! (09:35:27) black_bmc: warmenhoven i need something from you -) (09:35:44) warmenhoven: ok (09:35:44) black_bmc: look in ru.po in gaim/po/ directory (09:35:50) ***murley snickers, thinks warmenhoven should rewrtie gaim in java, heh (09:35:56) warmenhoven: oh yeah. (09:36:06) warmenhoven: because you know i love java so much. (09:36:11) warmenhoven: and then it'd be cross-platform. (09:36:11) black_bmc: "Content-Type: text/plain; charset=ISO-8859-5\n" (09:36:17) black_bmc: you see that ? (09:36:20) murley: that way we could all use a slow nasty hiddious looking program (09:36:25) warmenhoven: yep (09:36:39) warmenhoven: i take it that's not correct (09:36:40) black_bmc: warmenhoven here must be "Content-Type: text/plain; charset=KOI8-R\n" (09:37:02) warmenhoven: okie dokie (09:37:05) warmenhoven: that the only change? (09:37:07) murley: I'm a sysadmin, and I just found out a user installed a java tomcat webserver on my server, it was eating 400MB or ram (09:37:09) black_bmc: yes (09:37:26) black_bmc: warmenhoven why somebody change it to ISO ? (09:37:38) warmenhoven: i don't know (09:37:49) murley: Then i began to wonder why 2000 websites went to a scretching halt. :) (09:37:56) black_bmc: warmenhoven heh. -) (09:38:08) murley: kill -9 is my friend, the world is good now :) Index: ru.po =================================================================== RCS file: /cvsroot/gaim/gaim/po/ru.po,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ru.po 2001/09/03 07:16:05 1.2 +++ ru.po 2001/10/01 16:39:10 1.3 @@ -10,7 +10,7 @@ "Last-Translator: Grigory Bakunov <bl...@as...>\n" "Language-Team: RUSSIAN <RU...@li...>\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-5\n" +"Content-Type: text/plain; charset=KOI8-R\n" "Content-Transfer-Encoding: 8bit\n" #: plugins/icq/gaim_icq.c:457 |
From: Eric W. <war...@us...> - 2001-10-01 15:49:07
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv19362 Modified Files: module.c plugins.c Log Message: why is it that it's faster to commit from home than it is from work? Index: module.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/module.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- module.c 2001/09/29 23:06:30 1.1 +++ module.c 2001/10/01 15:49:04 1.2 @@ -52,6 +52,8 @@ GList *plugins = NULL; GList *callbacks = NULL; +char *last_dir = NULL; + /* --------------- Function Declarations --------------------- */ struct gaim_plugin * load_plugin(char *); @@ -91,6 +93,10 @@ c = g_list_next(c); } plug = g_malloc(sizeof *plug); + + 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); Index: plugins.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/plugins.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- plugins.c 2001/09/29 23:06:30 1.83 +++ plugins.c 2001/10/01 15:49:04 1.84 @@ -72,7 +72,7 @@ static guint confighandle = 0; static GtkWidget *reload = NULL; static GtkWidget *unload = NULL; -static char *last_dir = NULL; +extern char *last_dir; /* --------------- Function Declarations --------------------- */ |
From: Eric W. <war...@us...> - 2001-10-01 15:05:29
|
Update of /cvsroot/gaim/gaim/po In directory usw-pr-cvs1:/tmp/cvs-serv5534 Modified Files: .cvsignore Log Message: ignore Index: .cvsignore =================================================================== RCS file: /cvsroot/gaim/gaim/po/.cvsignore,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- .cvsignore 2001/07/31 01:00:38 1.9 +++ .cvsignore 2001/10/01 15:05:26 1.10 @@ -12,3 +12,4 @@ zh_CN.gmo ko.gmo ru.gmo +pl.gmo |
From: Eric W. <war...@us...> - 2001-10-01 14:54:41
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv4089 Modified Files: multi.c prpl.c Log Message: details Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- multi.c 2001/10/01 07:50:07 1.84 +++ multi.c 2001/10/01 14:54:37 1.85 @@ -1029,6 +1029,7 @@ meter = g_new0(struct signon_meter, 1); meter->gc = gc; + meters = g_slist_append(meters, meter); meter->window = gtk_window_new(GTK_WINDOW_DIALOG); gtk_window_set_policy(GTK_WINDOW(meter->window), 0, 0, 1); Index: prpl.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prpl.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- prpl.c 2001/10/01 07:16:27 1.35 +++ prpl.c 2001/10/01 14:54:37 1.36 @@ -377,6 +377,7 @@ if (!(mn = find_mail_notify(gc))) { mn = g_new0(struct mail_notify, 1); mn->gc = gc; + mailnots = g_slist_append(mailnots, mn); } if (count < 0 && from && subject) { |
From: Eric W. <war...@us...> - 2001-10-01 07:50:11
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv30746 Modified Files: multi.c multi.h Log Message: whoops. *now* multi.h doesn't depend on gtk. Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- multi.c 2001/09/30 19:58:48 1.83 +++ multi.c 2001/10/01 07:50:07 1.84 @@ -885,14 +885,36 @@ gtk_widget_show_all(acctedit); } +struct signon_meter { + struct gaim_connection *gc; + GtkWidget *window; + GtkWidget *progress; + GtkWidget *status; +}; +static GSList *meters = NULL; + +static struct signon_meter *find_signon_meter(struct gaim_connection *gc) +{ + GSList *m = meters; + while (m) { + if (((struct signon_meter *)m->data)->gc == gc) + return m->data; + m = m->next; + } + return NULL; +} + void account_online(struct gaim_connection *gc) { int i; + struct signon_meter *meter = find_signon_meter(gc); /* first we hide the login progress meter */ - if (gc->meter) - gtk_widget_destroy(gc->meter); - gc->meter = NULL; + if (meter) { + gtk_widget_destroy(meter->window); + meters = g_slist_remove(meters, meter); + g_free(meter); + } /* then we do the buddy list stuff */ if (mainwindow) @@ -953,9 +975,12 @@ void account_offline(struct gaim_connection *gc) { int i; - if (gc->meter) - gtk_widget_destroy(gc->meter); - gc->meter = NULL; + struct signon_meter *meter = find_signon_meter(gc); + if (meter) { + gtk_widget_destroy(meter->window); + meters = g_slist_remove(meters, meter); + g_free(meter); + } gc->user->gc = NULL; /* wasn't that awkward? */ if (!acctedit) return; @@ -980,66 +1005,71 @@ } } -static void cancel_signon(GtkWidget *button, struct gaim_connection *gc) +static void cancel_signon(GtkWidget *button, struct signon_meter *meter) { - gc->wants_to_die = TRUE; - signoff(gc); + meter->gc->wants_to_die = TRUE; + signoff(meter->gc); } -static gint meter_destroy(GtkWidget *meter, GdkEvent *evt, struct gaim_connection *gc) +static gint meter_destroy(GtkWidget *window, GdkEvent *evt, struct signon_meter *meter) { return TRUE; } void set_login_progress(struct gaim_connection *gc, float howfar, char *message) { + struct signon_meter *meter = find_signon_meter(gc); + if (mainwindow) gtk_widget_hide(mainwindow); - if (!gc->meter) { + if (!meter) { GtkWidget *box, *label, *button; char buf[256]; - gc->meter = gtk_window_new(GTK_WINDOW_DIALOG); - gtk_window_set_policy(GTK_WINDOW(gc->meter), 0, 0, 1); - gtk_window_set_wmclass(GTK_WINDOW(gc->meter), "signon", "Gaim"); - gtk_container_set_border_width(GTK_CONTAINER(gc->meter), 5); + meter = g_new0(struct signon_meter, 1); + meter->gc = gc; + + meter->window = gtk_window_new(GTK_WINDOW_DIALOG); + gtk_window_set_policy(GTK_WINDOW(meter->window), 0, 0, 1); + gtk_window_set_wmclass(GTK_WINDOW(meter->window), "signon", "Gaim"); + gtk_container_set_border_width(GTK_CONTAINER(meter->window), 5); g_snprintf(buf, sizeof(buf), "%s Signing On", gc->username); - gtk_window_set_title(GTK_WINDOW(gc->meter), buf); - gtk_signal_connect(GTK_OBJECT(gc->meter), "delete_event", - GTK_SIGNAL_FUNC(meter_destroy), gc); - gtk_widget_realize(gc->meter); - aol_icon(gc->meter->window); + gtk_window_set_title(GTK_WINDOW(meter->window), buf); + gtk_signal_connect(GTK_OBJECT(meter->window), "delete_event", + GTK_SIGNAL_FUNC(meter_destroy), meter); + gtk_widget_realize(meter->window); + aol_icon(meter->window->window); box = gtk_vbox_new(FALSE, 5); - gtk_container_add(GTK_CONTAINER(gc->meter), box); + gtk_container_add(GTK_CONTAINER(meter->window), box); gtk_widget_show(box); label = gtk_label_new(buf); gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0); gtk_widget_show(label); - gc->progress = gtk_progress_bar_new(); - gtk_widget_set_usize(gc->progress, 150, 0); - gtk_box_pack_start(GTK_BOX(box), gc->progress, FALSE, FALSE, 0); - gtk_widget_show(gc->progress); + meter->progress = gtk_progress_bar_new(); + gtk_widget_set_usize(meter->progress, 150, 0); + gtk_box_pack_start(GTK_BOX(box), meter->progress, FALSE, FALSE, 0); + gtk_widget_show(meter->progress); - gc->status = gtk_statusbar_new(); - gtk_widget_set_usize(gc->status, 150, 0); - gtk_box_pack_start(GTK_BOX(box), gc->status, FALSE, FALSE, 0); - gtk_widget_show(gc->status); + meter->status = gtk_statusbar_new(); + gtk_widget_set_usize(meter->status, 150, 0); + gtk_box_pack_start(GTK_BOX(box), meter->status, FALSE, FALSE, 0); + gtk_widget_show(meter->status); button = gtk_button_new_with_label(_("Cancel")); gtk_box_pack_start(GTK_BOX(box), button, FALSE, FALSE, 0); - gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(cancel_signon), gc); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(cancel_signon), meter); gtk_widget_show(button); - gtk_widget_show(gc->meter); + gtk_widget_show(meter->window); } - gtk_progress_bar_update(GTK_PROGRESS_BAR(gc->progress), howfar / LOGIN_STEPS); - gtk_statusbar_pop(GTK_STATUSBAR(gc->status), 1); - gtk_statusbar_push(GTK_STATUSBAR(gc->status), 1, message); + gtk_progress_bar_update(GTK_PROGRESS_BAR(meter->progress), howfar / LOGIN_STEPS); + gtk_statusbar_pop(GTK_STATUSBAR(meter->status), 1); + gtk_statusbar_push(GTK_STATUSBAR(meter->status), 1, message); } static void set_kick_null(GtkObject *obj, struct aim_user *u) @@ -1050,15 +1080,18 @@ void hide_login_progress(struct gaim_connection *gc, char *why) { char buf[2048]; + struct signon_meter *meter = find_signon_meter(gc); sprintf(buf, _("%s\n%s was unable to sign on: %s"), full_date(), gc->username, why); if (gc->user->kick_dlg) gtk_widget_destroy(gc->user->kick_dlg); gc->user->kick_dlg = do_error_dialog(buf, _("Signon Error")); gtk_signal_connect(GTK_OBJECT(gc->user->kick_dlg), "destroy", GTK_SIGNAL_FUNC(set_kick_null), gc->user); - if (gc->meter) - gtk_widget_destroy(gc->meter); - gc->meter = NULL; + if (meter) { + gtk_widget_destroy(meter->window); + meters = g_slist_remove(meters, meter); + g_free(meter); + } } void signoff_all(gpointer w, gpointer d) Index: multi.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- multi.h 2001/10/01 07:16:27 1.33 +++ multi.h 2001/10/01 07:50:07 1.34 @@ -63,11 +63,6 @@ int is_idle; time_t correction_time; - /* stuff for a signin progress meter */ - GtkWidget *meter; - GtkWidget *progress; - GtkWidget *status; - char *away; int is_auto_away; |
From: Eric W. <war...@us...> - 2001-10-01 07:16:30
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv23921 Modified Files: gaim.h multi.h prpl.c Log Message: multi.h no longer depends on gtk. Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.272 retrieving revision 1.273 diff -u -d -r1.272 -r1.273 --- gaim.h 2001/09/30 19:58:48 1.272 +++ gaim.h 2001/10/01 07:16:27 1.273 @@ -895,6 +895,9 @@ extern void open_url_nw(GtkWidget *, char *); extern void add_bookmark(GtkWidget *, char *); +/* Functions in multi.c */ +extern void account_editor(GtkWidget *, GtkWidget *); + /* fucntions in ticker.c */ void SetTickerPrefs(); void BuddyTickerSignOff(); Index: multi.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.h,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- multi.h 2001/09/30 19:48:44 1.32 +++ multi.h 2001/10/01 07:16:27 1.33 @@ -22,12 +22,11 @@ #ifndef _GAIMMULTI_H_ #define _GAIMMULTI_H_ -#include <gtk/gtk.h> #include "gaim.h" /* ok. now the fun begins. first we create a connection structure */ struct gaim_connection { - int edittype; + int edittype; /* CUI: this is ui-specific and should be removed */ /* we need to do either oscar or TOC */ /* we make this as an int in case if we want to add more protocols later */ @@ -58,7 +57,7 @@ int options; /* same as aim_user options */ guint keepalive; /* stuff needed for per-connection idle times */ - guint idle_timer; + guint idle_timer; /* CUI: we need to figure out what to do about idle reporting */ time_t login_time; time_t lastsent; int is_idle; @@ -74,10 +73,6 @@ int evil; gboolean wants_to_die; /* defaults to FALSE */ - - /* email notification (MSN and Yahoo) */ - GtkWidget *email_win; - GtkWidget *email_label; }; struct proto_user_opt { @@ -107,7 +102,6 @@ struct gaim_connection *new_gaim_conn(struct aim_user *); void destroy_gaim_conn(struct gaim_connection *); -void account_editor(GtkWidget *, GtkWidget *); void regenerate_user_list(); void account_online(struct gaim_connection *); Index: prpl.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prpl.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- prpl.c 2001/09/27 19:17:11 1.34 +++ prpl.c 2001/10/01 07:16:27 1.35 @@ -341,82 +341,105 @@ } } -static void des_email_win(GtkWidget *w, struct gaim_connection *yd) +struct mail_notify { + struct gaim_connection *gc; + GtkWidget *email_win; + GtkWidget *email_label; +}; +GSList *mailnots = NULL; + +static struct mail_notify *find_mail_notify(struct gaim_connection *gc) { - gtk_widget_destroy(yd->email_win); - if (yd->email_win == w) - yd->email_win = NULL; - yd->email_label = NULL; + GSList *m = mailnots; + while (m) { + if (((struct mail_notify *)m->data)->gc == gc) + return m->data; + m = m->next; + } + return NULL; +} + +static void des_email_win(GtkWidget *w, struct mail_notify *mn) +{ + gtk_widget_destroy(mn->email_win); + mailnots = g_slist_remove(mailnots, mn); + g_free(mn); } void connection_has_mail(struct gaim_connection *gc, int count, const char *from, const char *subject) { + struct mail_notify *mn; char buf[2048]; if (!(gc->user->options & OPT_USR_MAIL_CHECK)) return; + if (!(mn = find_mail_notify(gc))) { + mn = g_new0(struct mail_notify, 1); + mn->gc = gc; + } + if (count < 0 && from && subject) { g_snprintf(buf, sizeof buf, "%s has mail from %s: %s", gc->username, from, subject); - if (!gc->email_win) { + if (!mn->email_win) { GtkWidget *close; - gc->email_win = gtk_dialog_new(); - gtk_window_set_policy(GTK_WINDOW(gc->email_win), 0, 0, 1); - gtk_container_set_border_width(GTK_CONTAINER(gc->email_win), 5); - gtk_window_set_title(GTK_WINDOW(gc->email_win), "New Mail"); - gtk_signal_connect(GTK_OBJECT(gc->email_win), "destroy", - GTK_SIGNAL_FUNC(des_email_win), gc); - gtk_widget_realize(gc->email_win); - aol_icon(gc->email_win->window); + mn->email_win = gtk_dialog_new(); + gtk_window_set_policy(GTK_WINDOW(mn->email_win), 0, 0, 1); + gtk_container_set_border_width(GTK_CONTAINER(mn->email_win), 5); + gtk_window_set_title(GTK_WINDOW(mn->email_win), "New Mail"); + gtk_signal_connect(GTK_OBJECT(mn->email_win), "destroy", + GTK_SIGNAL_FUNC(des_email_win), mn); + gtk_widget_realize(mn->email_win); + aol_icon(mn->email_win->window); - gc->email_label = gtk_label_new(buf); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(gc->email_win)->vbox), - gc->email_label, 0, 0, 5); - gtk_widget_show(gc->email_label); + mn->email_label = gtk_label_new(buf); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(mn->email_win)->vbox), + mn->email_label, 0, 0, 5); + gtk_widget_show(mn->email_label); - close = picture_button(gc->email_win, _("Close"), cancel_xpm); - gtk_window_set_focus(GTK_WINDOW(gc->email_win), close); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(gc->email_win)->action_area), + close = picture_button(mn->email_win, _("Close"), cancel_xpm); + gtk_window_set_focus(GTK_WINDOW(mn->email_win), close); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(mn->email_win)->action_area), close, 0, 0, 5); gtk_signal_connect(GTK_OBJECT(close), "clicked", - GTK_SIGNAL_FUNC(des_email_win), gc); + GTK_SIGNAL_FUNC(des_email_win), mn); - gtk_widget_show(gc->email_win); + gtk_widget_show(mn->email_win); } - gtk_label_set_text(GTK_LABEL(gc->email_label), buf); + gtk_label_set_text(GTK_LABEL(mn->email_label), buf); } else if (count) { g_snprintf(buf, sizeof buf, "%s has %d new message%s.", gc->username, count, count == 1 ? "" : "s"); - if (!gc->email_win) { + if (!mn->email_win) { GtkWidget *close; - gc->email_win = gtk_dialog_new(); - gtk_window_set_policy(GTK_WINDOW(gc->email_win), 0, 0, 1); - gtk_container_set_border_width(GTK_CONTAINER(gc->email_win), 5); - gtk_window_set_title(GTK_WINDOW(gc->email_win), "New Mail"); - gtk_signal_connect(GTK_OBJECT(gc->email_win), "destroy", - GTK_SIGNAL_FUNC(des_email_win), gc); - gtk_widget_realize(gc->email_win); - aol_icon(gc->email_win->window); + mn->email_win = gtk_dialog_new(); + gtk_window_set_policy(GTK_WINDOW(mn->email_win), 0, 0, 1); + gtk_container_set_border_width(GTK_CONTAINER(mn->email_win), 5); + gtk_window_set_title(GTK_WINDOW(mn->email_win), "New Mail"); + gtk_signal_connect(GTK_OBJECT(mn->email_win), "destroy", + GTK_SIGNAL_FUNC(des_email_win), mn); + gtk_widget_realize(mn->email_win); + aol_icon(mn->email_win->window); - gc->email_label = gtk_label_new(buf); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(gc->email_win)->vbox), - gc->email_label, 0, 0, 5); - gtk_widget_show(gc->email_label); + mn->email_label = gtk_label_new(buf); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(mn->email_win)->vbox), + mn->email_label, 0, 0, 5); + gtk_widget_show(mn->email_label); - close = picture_button(gc->email_win, _("Close"), cancel_xpm); - gtk_window_set_focus(GTK_WINDOW(gc->email_win), close); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(gc->email_win)->action_area), + close = picture_button(mn->email_win, _("Close"), cancel_xpm); + gtk_window_set_focus(GTK_WINDOW(mn->email_win), close); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(mn->email_win)->action_area), close, 0, 0, 5); gtk_signal_connect(GTK_OBJECT(close), "clicked", - GTK_SIGNAL_FUNC(des_email_win), gc); + GTK_SIGNAL_FUNC(des_email_win), mn); - gtk_widget_show(gc->email_win); + gtk_widget_show(mn->email_win); } - gtk_label_set_text(GTK_LABEL(gc->email_label), buf); - } else if (gc->email_win) - gtk_widget_destroy(gc->email_win); + gtk_label_set_text(GTK_LABEL(mn->email_label), buf); + } else if (mn->email_win) + gtk_widget_destroy(mn->email_win); } struct icon_data { |
From: Rob F. <rob...@us...> - 2001-10-01 07:09:12
|
Update of /cvsroot/gaim/gaim/po In directory usw-pr-cvs1:/tmp/cvs-serv22619/po Added Files: pl.po Log Message: lalala Start of the polish translation. Thanks Przemyslaw Sulek! --- NEW FILE: pl.po --- # GAIM polish translation . # Copyright (C) YEAR Free Software Foundation, Inc. # Przemys³aw Su³ek <pb...@li...> <ps...@pl...>, 2001. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2001-09-29 00:00-0700\n" "PO-Revision-Date: 2001-09-29 22:00+0002\n" "Last-Translator: Przemys³aw Su³ek <pb...@li...>\n" "Language-Team: POLISH <ps...@pl...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso8859-2\n" "Content-Transfer-Encoding: 8bit\n" #: src/protocols/icq/gaim_icq.c:435 src/protocols/jabber/jabber.c:1642 #: src/protocols/oscar/oscar.c:2525 src/protocols/toc/toc.c:1193 msgid "Get Info" msgstr "Pobierz informacjê" [...2372 lines suppressed...] #: src/server.c:515 #, c-format msgid "(%d messages)" msgstr "(%d wiadomo¶ci)" #: src/server.c:521 msgid "(1 message)" msgstr "(1 wiadomo¶æ)" #: src/server.c:738 msgid "Warned" msgstr "Ostrze¿ono" #: src/server.c:809 msgid "Yes" msgstr "Tak" #: src/server.c:810 msgid "No" msgstr "Nie" |
From: Rob F. <rob...@us...> - 2001-10-01 07:09:11
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv22619 Modified Files: configure.ac Log Message: lalala Start of the polish translation. Thanks Przemyslaw Sulek! Index: configure.ac =================================================================== RCS file: /cvsroot/gaim/gaim/configure.ac,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- configure.ac 2001/09/29 23:06:29 1.15 +++ configure.ac 2001/10/01 07:09:09 1.16 @@ -13,7 +13,7 @@ AC_PROG_INSTALL -ALL_LINGUAS="de es fr ko ru zh_CN" +ALL_LINGUAS="de es fr ko ru zh_CN pl" AM_GNU_GETTEXT AC_CYGWIN |
From: Eric W. <war...@us...> - 2001-10-01 06:56:37
|
Update of /cvsroot/gaim/gaim/src/protocols/gg In directory usw-pr-cvs1:/tmp/cvs-serv20376 Modified Files: libgg.c libgg.h Log Message: libgg updates. Index: libgg.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/libgg.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- libgg.c 2001/09/29 23:06:30 1.1 +++ libgg.c 2001/10/01 06:56:34 1.2 @@ -31,7 +31,7 @@ #include <string.h> #include <stdarg.h> #include <pwd.h> -#include "endian.h" +#include <glib.h> #include "libgg.h" int gg_debug_level = 0; @@ -68,12 +68,14 @@ */ static inline unsigned long fix32(unsigned long x) { -#if __BYTE_ORDER == __LITTLE_ENDIAN +#if G_BYTE_ORDER == G_LITTLE_ENDIAN return x; #else - char *y = &x; - - return (y[0] << 24 + y[1] << 16 + y[2] << 8 + y[3]); + return (unsigned long) + (((x & (unsigned long) 0x000000ffU) << 24) | + ((x & (unsigned long) 0x0000ff00U) << 8) | + ((x & (unsigned long) 0x00ff0000U) >> 8) | + ((x & (unsigned long) 0xff000000U) >> 24)); #endif } @@ -84,13 +86,13 @@ */ static inline unsigned short fix16(unsigned short x) { -#if __BYTE_ORDER == __LITTLE_ENDIAN +#if G_BYTE_ORDER == G_LITTLE_ENDIAN return x; #else - char *y = &x; - - return (y[0] << 8 + y[1]); -#endif + return (unsigned short) + (((x & (unsigned short) 0x00ffU) << 8) | + ((x & (unsigned short) 0xff00U) >> 8)); +#endif } /* @@ -343,7 +345,7 @@ return NULL; } if (errno != EINTR) { - /* errno = EINVAL; */ +// errno = EINVAL; free(buf); return NULL; } @@ -838,6 +840,7 @@ if (h->type == GG_NOTIFY_REPLY) { struct gg_notify_reply *n = p; + int count, i; gg_debug(GG_DEBUG_MISC, "-- received a notify reply\n"); @@ -847,8 +850,13 @@ free(h); return -1; } + count = h->length / sizeof(*n); memcpy(e->event.notify, p, h->length); - e->event.notify[h->length / sizeof(*n)].uin = 0; + e->event.notify[count].uin = 0; + for (i = 0; i < count; i++) { + e->event.notify[i].uin = fix32(e->event.notify[i].uin); + e->event.notify[i].status = fix32(e->event.notify[i].status); + } } if (h->type == GG_STATUS) { @@ -859,6 +867,8 @@ if (h->length >= sizeof(*s)) { e->type = GG_EVENT_STATUS; memcpy(&e->event.status, p, h->length); + e->event.status.uin = fix32(e->event.status.uin); + e->event.status.status = fix32(e->event.status.status); } } Index: libgg.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/libgg.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 |
From: Eric W. <war...@us...> - 2001-10-01 00:13:18
|
Update of /cvsroot/gaim/gaim/plugins In directory usw-pr-cvs1:/tmp/cvs-serv22143 Modified Files: autorecon.c Log Message: eh. Index: autorecon.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/autorecon.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- autorecon.c 2001/09/06 00:24:06 1.14 +++ autorecon.c 2001/10/01 00:13:13 1.15 @@ -19,7 +19,7 @@ static gboolean do_signon(gpointer data) { struct aim_user *u = data; - if (g_list_index(aim_users, u) < 0) + if (g_slist_index(aim_users, u) < 0) return FALSE; serv_login(u); tim = 0; |
From: Eric W. <war...@us...> - 2001-09-30 19:58:51
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv5462 Modified Files: aim.c dialogs.c gaim.h gaimrc.c multi.c perl.c util.c Log Message: changing aim_users to GSList. this works better for me since in gaim-core i had them as a GSList. besides, it saves memory. Index: aim.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/aim.c,v retrieving revision 1.160 retrieving revision 1.161 diff -u -d -r1.160 -r1.161 --- aim.c 2001/09/28 01:25:01 1.160 +++ aim.c 2001/09/30 19:58:48 1.161 @@ -181,7 +181,7 @@ static GList *combo_user_names() { - GList *usr = aim_users; + GSList *usr = aim_users; GList *tmp = NULL; struct aim_user *u; @@ -423,10 +423,10 @@ u = g_new0(struct aim_user, 1); g_snprintf(u->username, sizeof(u->username), "%s", name); u->protocol = DEFAULT_PROTO; - aim_users = g_list_prepend(aim_users, u); + aim_users = g_slist_prepend(aim_users, u); } else { /* user already exists */ - aim_users = g_list_remove(aim_users, u); - aim_users = g_list_prepend(aim_users, u); + aim_users = g_slist_remove(aim_users, u); + aim_users = g_slist_prepend(aim_users, u); } save_prefs(); } Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.254 retrieving revision 1.255 diff -u -d -r1.254 -r1.255 --- dialogs.c 2001/09/29 23:06:30 1.254 +++ dialogs.c 2001/09/30 19:58:48 1.255 @@ -963,7 +963,7 @@ GtkWidget *optmenu; GtkWidget *menu; GtkWidget *opt; - GList *u = aim_users; + GSList *u = aim_users; struct aim_user *a; hbox = gtk_hbox_new(FALSE, 5); @@ -998,7 +998,7 @@ gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu); gtk_option_menu_set_history(GTK_OPTION_MENU(optmenu), - g_list_index(aim_users, + g_slist_index(aim_users, ((struct gaim_connection *)connections->data)->user)); b->user = ((struct gaim_connection *)connections->data)->user; Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.271 retrieving revision 1.272 diff -u -d -r1.271 -r1.272 --- gaim.h 2001/09/29 23:06:30 1.271 +++ gaim.h 2001/09/30 19:58:48 1.272 @@ -580,7 +580,7 @@ extern int report_idle; extern int web_browser; -extern GList *aim_users; +extern GSList *aim_users; extern GSList *message_queue; extern GSList *away_time_queue; extern char sound_cmd[2048]; Index: gaimrc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaimrc.c,v retrieving revision 1.85 retrieving revision 1.86 diff -u -d -r1.85 -r1.86 --- gaimrc.c 2001/09/29 00:18:50 1.85 +++ gaimrc.c 2001/09/30 19:58:48 1.86 @@ -39,7 +39,7 @@ #define BORING_DEFAULT_AWAY_MSG "sorry, i ran out for a while. bbl" #define MAX_VALUES 10 -GList *aim_users = NULL; +GSList *aim_users = NULL; guint misc_options; guint logging_options; guint blist_options; @@ -599,13 +599,13 @@ u = gaimrc_read_user(f); - aim_users = g_list_append(aim_users, u); + aim_users = g_slist_append(aim_users, u); } } static void gaimrc_write_users(FILE *f) { - GList *usr = aim_users; + GSList *usr = aim_users; struct aim_user *u; fprintf(f, "users {\n"); Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- multi.c 2001/09/30 19:48:44 1.82 +++ multi.c 2001/09/30 19:58:48 1.83 @@ -139,7 +139,7 @@ void regenerate_user_list() { char *titles[4]; - GList *u = aim_users; + GSList *u = aim_users; struct aim_user *a; int i; @@ -645,7 +645,7 @@ while (l) { row = (int)l->data; if (row != -1) { - u = g_list_nth_data(aim_users, row); + u = g_slist_nth_data(aim_users, row); if (u) show_acct_mod(u); } @@ -744,7 +744,7 @@ struct aim_user *u; while (l) { row = (int)l->data; - u = g_list_nth_data(aim_users, row); + u = g_slist_nth_data(aim_users, row); if (!u->gc) { struct prpl *p = find_prpl(u->protocol); if (p && !(p->options & OPT_PROTO_NO_PASSWORD) && !u->password[0]) { @@ -770,8 +770,8 @@ u->gc->wants_to_die = TRUE; signoff(u->gc); } - gtk_clist_remove(GTK_CLIST(list), g_list_index(aim_users, u)); - aim_users = g_list_remove(aim_users, u); + gtk_clist_remove(GTK_CLIST(list), g_slist_index(aim_users, u)); + aim_users = g_slist_remove(aim_users, u); save_prefs(); } @@ -783,7 +783,7 @@ struct aim_user *u; while (l) { row = (int)l->data; - u = g_list_nth_data(aim_users, row); + u = g_slist_nth_data(aim_users, row); if (!u) return; @@ -795,7 +795,7 @@ static void sel_auto(gpointer w, gpointer d) { - GList *l = aim_users; + GSList *l = aim_users; struct aim_user *u; int i = 0; /* faster than doing g_list_index each time */ while (l) { @@ -965,7 +965,7 @@ void auto_login() { - GList *u = aim_users; + GSList *u = aim_users; struct aim_user *a = NULL; while (u) { @@ -1123,7 +1123,7 @@ g_snprintf(u->user_info, sizeof(u->user_info), "%s", DEFAULT_INFO); u->protocol = proto; u->options = opts; - aim_users = g_list_append(aim_users, u); + aim_users = g_slist_append(aim_users, u); if (list) { titles[0] = u->username; Index: perl.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/perl.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- perl.c 2001/09/27 09:20:47 1.58 +++ perl.c 2001/09/30 19:58:48 1.59 @@ -346,14 +346,14 @@ struct gaim_connection *gc = (struct gaim_connection *)SvIV(ST(1)); debug_printf("%lu %lu\n", connections->data, gc); if (g_slist_find(connections, gc)) - XST_mIV(i++, g_list_index(aim_users, gc->user)); + XST_mIV(i++, g_slist_index(aim_users, gc->user)); else XST_mIV(i++, -1); } break; case 5: { - GList *a = aim_users; + GSList *a = aim_users; while (a) { struct aim_user *u = a->data; XST_mPV(i++, u->username); @@ -363,7 +363,7 @@ break; case 6: { - GList *a = aim_users; + GSList *a = aim_users; while (a) { struct aim_user *u = a->data; XST_mIV(i++, u->protocol); @@ -470,8 +470,8 @@ if (!command) XSRETURN(0); if (!strncasecmp(command, "signon", 6)) { int index = SvIV(ST(1)); - if (g_list_nth_data(aim_users, index)) - serv_login(g_list_nth_data(aim_users, index)); + if (g_slist_nth_data(aim_users, index)) + serv_login(g_slist_nth_data(aim_users, index)); } else if (!strncasecmp(command, "signoff", 7)) { struct gaim_connection *gc = (struct gaim_connection *)SvIV(ST(1)); if (g_slist_find(connections, gc)) signoff(gc); Index: util.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/util.c,v retrieving revision 1.106 retrieving revision 1.107 diff -u -d -r1.106 -r1.107 --- util.c 2001/09/28 07:46:36 1.106 +++ util.c 2001/09/30 19:58:48 1.107 @@ -640,7 +640,7 @@ struct aim_user *find_user(const char *name, int protocol) { char *who = g_strdup(normalize(name)); - GList *usr = aim_users; + GSList *usr = aim_users; struct aim_user *u; while (usr) { |
From: Eric W. <war...@us...> - 2001-09-30 19:48:47
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv3902 Modified Files: multi.c multi.h Log Message: this was evil Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- multi.c 2001/09/28 07:46:36 1.81 +++ multi.c 2001/09/30 19:48:44 1.82 @@ -107,25 +107,6 @@ #endif } -struct gaim_connection *find_gaim_conn_by_name(char *name) -{ - char *who = g_strdup(normalize(name)); - GSList *c = connections; - struct gaim_connection *g = NULL; - - while (c) { - g = (struct gaim_connection *)c->data; - if (!strcmp(normalize(g->username), who)) { - g_free(who); - return g; - } - c = c->next; - } - - g_free(who); - return NULL; -} - static void delete_acctedit(GtkWidget *w, gpointer d) { if (acctedit) { Index: multi.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.h,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- multi.h 2001/09/09 11:33:07 1.31 +++ multi.h 2001/09/30 19:48:44 1.32 @@ -107,8 +107,6 @@ struct gaim_connection *new_gaim_conn(struct aim_user *); void destroy_gaim_conn(struct gaim_connection *); -struct gaim_connection *find_gaim_conn_by_name(char *); - void account_editor(GtkWidget *, GtkWidget *); void regenerate_user_list(); |
From: Eric W. <war...@us...> - 2001-09-30 05:31:17
|
Update of /cvsroot/gaim/gaim/plugins In directory usw-pr-cvs1:/tmp/cvs-serv24578 Modified Files: iconaway.c Log Message: this is better. Index: iconaway.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/iconaway.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- iconaway.c 2001/08/01 17:52:38 1.12 +++ iconaway.c 2001/09/30 05:31:14 1.13 @@ -16,7 +16,7 @@ #endif void iconify_windows(struct gaim_connection *gc, char *state, char *message, void *data) { - if (!imaway) + if (!imaway || !gc->away) return; XIconifyWindow(GDK_DISPLAY(), GDK_WINDOW_XWINDOW(imaway->window), |
From: Eric W. <war...@us...> - 2001-09-30 05:16:33
|
Update of /cvsroot/gaim/gaim/src/protocols/irc In directory usw-pr-cvs1:/tmp/cvs-serv22544/protocols/irc Modified Files: irc.c Log Message: hi Index: irc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/irc.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- irc.c 2001/09/29 23:06:30 1.37 +++ irc.c 2001/09/30 05:16:30 1.38 @@ -1320,12 +1320,11 @@ char buf[IRC_BUF_LEN]; if (gc->away) - g_free(gc->away); - gc->away = NULL; + gc->away = NULL; if (msg) { g_snprintf(buf, sizeof(buf), "AWAY :%s\r\n", msg); - gc->away = g_strdup(msg); + gc->away = ""; } else g_snprintf(buf, sizeof(buf), "AWAY\r\n"); irc_write(idata->fd, buf, strlen(buf)); |
From: Eric W. <war...@us...> - 2001-09-29 23:06:33
|
Update of /cvsroot/gaim/gaim/src/protocols/irc In directory usw-pr-cvs1:/tmp/cvs-serv5211/src/protocols/irc Modified Files: irc.c Log Message: Arkadiusz Miskiewicz\'s Gadu-Gadu plugin. I was able to figure out enough polish to be able to download Gadu-Gadu, create an account, and test the plugin. Imagine my shock when I got my info and it said I was a woman. Whoops. Also splitting plugins.c so that non-gtk stuff is in modules.c. gaim-core is almost ready for protocol implantaion. Also fixing an IRC bug. Also patiently waiting for anoncvs_gaim's lock in /cvsroot/gaim/gaim/pixmaps Index: irc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/irc.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- irc.c 2001/09/28 07:46:36 1.36 +++ irc.c 2001/09/29 23:06:30 1.37 @@ -1319,9 +1319,14 @@ struct irc_data *idata = gc->proto_data; char buf[IRC_BUF_LEN]; - if (msg) + if (gc->away) + g_free(gc->away); + gc->away = NULL; + + if (msg) { g_snprintf(buf, sizeof(buf), "AWAY :%s\r\n", msg); - else + gc->away = g_strdup(msg); + } else g_snprintf(buf, sizeof(buf), "AWAY\r\n"); irc_write(idata->fd, buf, strlen(buf)); } |
From: Eric W. <war...@us...> - 2001-09-29 23:06:33
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv5211/src Modified Files: Makefile.am buddy.c dialogs.c gaim.h plugins.c Added Files: module.c Log Message: Arkadiusz Miskiewicz\'s Gadu-Gadu plugin. I was able to figure out enough polish to be able to download Gadu-Gadu, create an account, and test the plugin. Imagine my shock when I got my info and it said I was a woman. Whoops. Also splitting plugins.c so that non-gtk stuff is in modules.c. gaim-core is almost ready for protocol implantaion. Also fixing an IRC bug. Also patiently waiting for anoncvs_gaim's lock in /cvsroot/gaim/gaim/pixmaps --- NEW FILE: module.c --- /* * gaim * * Copyright (C) 1998-1999, Mark Spencer <mar...@ma...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * ---------------- * The Plug-in plug * * Plugin support is currently being maintained by Mike Saraf * ms...@dw... * * Well, I didn't see any work done on it for a while, so I'm going to try * my hand at it. - Eric war...@ya... * * Mike is my roomate. I can assure you that he's lazy :-P -- Rob ro...@ma... * */ #ifdef HAVE_CONFIG_H #include <config.h> #endif #ifdef GAIM_PLUGINS #include <string.h> #include <sys/time.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include "gaim.h" /* ------------------ Global Variables ----------------------- */ GList *plugins = NULL; GList *callbacks = NULL; /* --------------- Function Declarations --------------------- */ struct gaim_plugin * load_plugin(char *); void unload_plugin(struct gaim_plugin *p); struct gaim_plugin *reload_plugin(struct gaim_plugin *p); void gaim_signal_connect(GModule *, enum gaim_event, void *, void *); void gaim_signal_disconnect(GModule *, enum gaim_event, void *); void gaim_plugin_unload(GModule *); /* --------------- Static Function Declarations ------------- */ static void plugin_remove_callbacks(GModule *); /* ------------------ Code Below ---------------------------- */ struct gaim_plugin *load_plugin(char *filename) { struct gaim_plugin *plug; GList *c = plugins; char *(*gaim_plugin_init)(GModule *); char *(*cfunc)(); char *error; char *retval; if (!g_module_supported()) return NULL; if (filename && !strlen(filename)) return NULL; while (filename && c) { plug = (struct gaim_plugin *)c->data; if (!strcmp(filename, g_module_name(plug->handle))) { /* just need to reload plugin */ return reload_plugin(plug); } else c = g_list_next(c); } plug = g_malloc(sizeof *plug); debug_printf("Loading %s\n", filename); plug->handle = g_module_open(filename, 0); if (!plug->handle) { error = (char *)g_module_error(); do_error_dialog(error, _("Plugin Error")); g_free(plug); return NULL; } if (!g_module_symbol(plug->handle, "gaim_plugin_init", (gpointer *)&gaim_plugin_init)) { do_error_dialog(g_module_error(), _("Plugin Error")); g_module_close(plug->handle); g_free(plug); return NULL; } retval = (*gaim_plugin_init)(plug->handle); debug_printf("loaded plugin returned %s\n", retval ? retval : "NULL"); if (retval) { plugin_remove_callbacks(plug->handle); do_error_dialog(retval, _("Plugin Error")); g_module_close(plug->handle); g_free(plug); return NULL; } plugins = g_list_append(plugins, plug); if (g_module_symbol(plug->handle, "name", (gpointer *)&cfunc)) { plug->name = (*cfunc)(); } else { plug->name = NULL; } if (g_module_symbol(plug->handle, "description", (gpointer *)&cfunc)) plug->description = (*cfunc)(); else plug->description = NULL; save_prefs(); return plug; } static void unload_gaim_plugin(struct gaim_plugin *p) { void (*gaim_plugin_remove)(); debug_printf("Unloading %s\n", g_module_name(p->handle)); /* Attempt to call the plugin's remove function (if there) */ if (g_module_symbol(p->handle, "gaim_plugin_remove", (gpointer *)&gaim_plugin_remove)) (*gaim_plugin_remove)(); plugin_remove_callbacks(p->handle); plugins = g_list_remove(plugins, p); g_free(p); save_prefs(); } void unload_plugin(struct gaim_plugin *p) { GModule *handle = p->handle; unload_gaim_plugin(p); g_module_close(handle); } static gboolean unload_timeout(gpointer handle) { g_module_close(handle); return FALSE; } void gaim_plugin_unload(GModule *handle) { g_timeout_add(5000, unload_timeout, handle); } /* Do unload/load cycle of plugin. */ struct gaim_plugin *reload_plugin(struct gaim_plugin *p) { char file[1024]; GModule *handle = p->handle; strncpy(file, g_module_name(handle), sizeof(file)); file[sizeof(file) - 1] = '\0'; debug_printf("Reloading %s\n", file); /* Unload */ unload_plugin(p); /* Load */ return load_plugin(file); } /* Remove all callbacks associated with plugin handle */ static void plugin_remove_callbacks(GModule *handle) { GList *c = callbacks; struct gaim_callback *g; debug_printf("%d callbacks to search\n", g_list_length(callbacks)); while (c) { g = (struct gaim_callback *)c->data; if (g->handle == handle) { c = g_list_next(c); callbacks = g_list_remove(callbacks, (gpointer)g); debug_printf("Removing callback, %d remain\n", g_list_length(callbacks)); } else c = g_list_next(c); } } void gaim_signal_connect(GModule *handle, enum gaim_event which, void *func, void *data) { struct gaim_callback *call = g_new0(struct gaim_callback, 1); call->handle = handle; call->event = which; call->function = func; call->data = data; callbacks = g_list_append(callbacks, call); debug_printf("Adding callback %d\n", g_list_length(callbacks)); } void gaim_signal_disconnect(GModule *handle, enum gaim_event which, void *func) { GList *c = callbacks; struct gaim_callback *g = NULL; while (c) { g = (struct gaim_callback *)c->data; if (handle == g->handle && func == g->function) { callbacks = g_list_remove(callbacks, c->data); g_free(g); c = callbacks; if (c == NULL) break; } c = g_list_next(c); } } #endif /* GAIM_PLUGINS */ static char *event_name(enum gaim_event event) { static char buf[128]; switch (event) { case event_signon: sprintf(buf, "event_signon"); break; case event_signoff: sprintf(buf, "event_signoff"); break; case event_away: sprintf(buf, "event_away"); break; case event_back: sprintf(buf, "event_back"); break; case event_im_recv: sprintf(buf, "event_im_recv"); break; case event_im_send: sprintf(buf, "event_im_send"); break; case event_buddy_signon: sprintf(buf, "event_buddy_signon"); break; case event_buddy_signoff: sprintf(buf, "event_buddy_signoff"); break; case event_buddy_away: sprintf(buf, "event_buddy_away"); break; case event_buddy_back: sprintf(buf, "event_buddy_back"); break; case event_buddy_idle: sprintf(buf, "event_buddy_idle"); break; case event_buddy_unidle: sprintf(buf, "event_buddy_unidle"); break; case event_blist_update: sprintf(buf, "event_blist_update"); break; case event_chat_invited: sprintf(buf, "event_chat_invited"); break; case event_chat_join: sprintf(buf, "event_chat_join"); break; case event_chat_leave: sprintf(buf, "event_chat_leave"); break; case event_chat_buddy_join: sprintf(buf, "event_chat_buddy_join"); break; case event_chat_buddy_leave: sprintf(buf, "event_chat_buddy_leave"); break; case event_chat_recv: sprintf(buf, "event_chat_recv"); break; case event_chat_send: sprintf(buf, "event_chat_send"); break; case event_warned: sprintf(buf, "event_warned"); break; case event_error: sprintf(buf, "event_error"); break; case event_quit: sprintf(buf, "event_quit"); break; case event_new_conversation: sprintf(buf, "event_new_conversation"); break; case event_set_info: sprintf(buf, "event_set_info"); break; case event_draw_menu: sprintf(buf, "event_draw_menu"); break; case event_im_displayed_sent: sprintf(buf, "event_im_displayed_sent"); break; case event_im_displayed_rcvd: sprintf(buf, "event_im_displayed_rcvd"); break; case event_chat_send_invite: sprintf(buf, "event_chat_send_invite"); break; default: sprintf(buf, "event_unknown"); break; } return buf; } int plugin_event(enum gaim_event event, void *arg1, void *arg2, void *arg3, void *arg4) { #ifdef USE_PERL char buf[BUF_LONG]; #endif #ifdef GAIM_PLUGINS GList *c = callbacks; struct gaim_callback *g; while (c) { void (*zero)(void *); void (*one)(void *, void *); void (*two)(void *, void *, void *); void (*three)(void *, void *, void *, void *); void (*four)(void *, void *, void *, void *, void *); g = (struct gaim_callback *)c->data; if (g->event == event && g->function !=NULL) { switch (event) { /* no args */ case event_blist_update: case event_quit: zero = g->function; (*zero)(g->data); break; /* one arg */ case event_signon: case event_signoff: case event_new_conversation: case event_error: one = g->function; (*one)(arg1, g->data); break; /* two args */ case event_buddy_signon: case event_buddy_signoff: case event_buddy_away: case event_buddy_back: case event_buddy_idle: case event_buddy_unidle: case event_chat_leave: case event_set_info: case event_draw_menu: two = g->function; (*two)(arg1, arg2, g->data); break; /* three args */ case event_im_send: case event_im_displayed_sent: case event_chat_join: case event_chat_buddy_join: case event_chat_buddy_leave: case event_chat_send: case event_away: case event_back: case event_warned: three = g->function; (*three)(arg1, arg2, arg3, g->data); break; /* four args */ case event_im_recv: case event_chat_recv: case event_im_displayed_rcvd: case event_chat_send_invite: case event_chat_invited: four = g->function; (*four)(arg1, arg2, arg3, arg4, g->data); break; default: debug_printf("unknown event %d\n", event); break; } } c = c->next; } #endif /* GAIM_PLUGINS */ #ifdef USE_PERL switch (event) { case event_signon: case event_signoff: case event_away: case event_back: g_snprintf(buf, sizeof buf, "%lu", (unsigned long)arg1); break; case event_im_recv: g_snprintf(buf, sizeof buf, "%lu \"%s\" %s", (unsigned long)arg1, *(char **)arg2 ? *(char **)arg2 : "(null)", *(char **)arg3 ? *(char **)arg3 : "(null)"); break; case event_im_send: g_snprintf(buf, sizeof buf, "%lu \"%s\" %s", (unsigned long)arg1, (char *)arg2, *(char **)arg3 ? *(char **)arg3 : "(null)"); break; case event_buddy_signon: case event_buddy_signoff: case event_set_info: case event_buddy_away: case event_buddy_back: case event_buddy_idle: case event_buddy_unidle: g_snprintf(buf, sizeof buf, "%lu \"%s\"", (unsigned long)arg1, (char *)arg2); break; case event_chat_invited: g_snprintf(buf, sizeof buf, "%lu \"%s\" \"%s\" %s", (unsigned long)arg1, (char *)arg2, (char *)arg3, arg4 ? (char *)arg4 : ""); break; case event_chat_join: case event_chat_buddy_join: case event_chat_buddy_leave: g_snprintf(buf, sizeof buf, "%lu %d \"%s\"", (unsigned long)arg1, (int)arg2, (char *)arg3); break; case event_chat_leave: g_snprintf(buf, sizeof buf, "%lu %d", (unsigned long)arg1, (int)arg2); break; case event_chat_recv: g_snprintf(buf, sizeof buf, "%lu %d \"%s\" %s", (unsigned long)arg1, (int)arg2, (char *)arg3, (char *)arg4 ? (char *)arg4 : "(null)"); break; case event_chat_send_invite: g_snprintf(buf, sizeof buf, "%lu %d \"%s\" %s", (unsigned long)arg1, (int)arg2, (char *)arg3, *(char **)arg4 ? *(char **)arg4 : "(null)"); break; case event_chat_send: g_snprintf(buf, sizeof buf, "%lu %d %s", (unsigned long)arg1, (int)arg2, *(char **)arg3 ? *(char **)arg3 : "(null)"); break; case event_warned: g_snprintf(buf, sizeof buf, "%lu \"%s\" %d", (unsigned long)arg1, arg2 ? (char *)arg2 : "", (int)arg3); break; case event_quit: buf[0] = 0; break; case event_new_conversation: g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg1); break; case event_im_displayed_sent: g_snprintf(buf, sizeof buf, "%lu \"%s\" %s", (unsigned long)arg1, (char *)arg2, *(char **)arg3 ? *(char **)arg3 : "(null)"); break; case event_im_displayed_rcvd: g_snprintf(buf, sizeof buf, "%lu \"%s\" %s", (unsigned long)arg1, (char *)arg2, (char *)arg3 ? (char *)arg3 : "(null)"); break; default: return 0; } return perl_event(event_name(event), buf); #else return 0; #endif } /* Calls the gaim_plugin_remove function in any loaded plugin that has one */ #ifdef GAIM_PLUGINS void remove_all_plugins() { GList *c = plugins; struct gaim_plugin *p; void (*gaim_plugin_remove)(); while (c) { p = (struct gaim_plugin *)c->data; if (g_module_symbol(p->handle, "gaim_plugin_remove", (gpointer *)&gaim_plugin_remove)) (*gaim_plugin_remove)(); g_free(p); c = c->next; } } #endif Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/Makefile.am,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- Makefile.am 2001/09/28 07:46:35 1.39 +++ Makefile.am 2001/09/29 23:06:30 1.40 @@ -18,6 +18,7 @@ html.c \ idle.c \ list.c \ + module.c \ multi.c \ perl.c \ plugins.c \ @@ -49,6 +50,7 @@ html.c \ idle.c \ list.c \ + module.c \ multi.c \ perl.c \ plugins.c \ Index: buddy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy.c,v retrieving revision 1.247 retrieving revision 1.248 diff -u -d -r1.247 -r1.248 --- buddy.c 2001/09/28 07:46:35 1.247 +++ buddy.c 2001/09/29 23:06:30 1.248 @@ -2389,7 +2389,8 @@ gtk_widget_show(menuitem); menuitem = gtk_menu_item_new_with_label(_("by Dir Info")); gtk_menu_append(GTK_MENU(findmenu), menuitem); - gtk_signal_connect(GTK_OBJECT(menuitem), "activate", GTK_SIGNAL_FUNC(show_find_info), NULL); + gtk_signal_connect(GTK_OBJECT(menuitem), "activate", GTK_SIGNAL_FUNC(show_find_info), + connections->data); gtk_widget_show(menuitem); setmenu = gtk_menu_new(); Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.253 retrieving revision 1.254 diff -u -d -r1.253 -r1.254 --- dialogs.c 2001/09/28 07:46:36 1.253 +++ dialogs.c 2001/09/29 23:06:30 1.254 @@ -150,6 +150,7 @@ }; struct findbyinfo { + struct gaim_connection *gc; GtkWidget *window; GtkWidget *firstentry; GtkWidget *middleentry; @@ -2058,10 +2059,7 @@ state = gtk_entry_get_text(GTK_ENTRY(b->stateentry)); country = gtk_entry_get_text(GTK_ENTRY(b->countryentry)); - /* FIXME : dir search. not sure if even works; not important */ - if (connections) - serv_dir_search(connections->data, first, middle, last, maiden, city, state, country, - ""); + serv_dir_search(b->gc, first, middle, last, maiden, city, state, country, ""); destroy_dialog(NULL, b->window); } @@ -2079,7 +2077,7 @@ destroy_dialog(NULL, b->window); } -void show_find_info() +void show_find_info(struct gaim_connection *gc) { GtkWidget *cancel; GtkWidget *ok; @@ -2091,6 +2089,7 @@ GtkWidget *frame; struct findbyinfo *b = g_new0(struct findbyinfo, 1); + b->gc = gc; b->window = gtk_window_new(GTK_WINDOW_DIALOG); gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, TRUE, TRUE); gtk_window_set_wmclass(GTK_WINDOW(b->window), "find_info", "Gaim"); Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.270 retrieving revision 1.271 diff -u -d -r1.270 -r1.271 --- gaim.h 2001/09/28 12:15:54 1.270 +++ gaim.h 2001/09/29 23:06:30 1.271 @@ -807,7 +807,9 @@ /* Functions in plugins.c */ #ifdef GAIM_PLUGINS extern void show_plugins(GtkWidget *, gpointer); -extern void load_plugin (char *); +extern struct gaim_plugin *load_plugin(char *); +extern void unload_plugin(struct gaim_plugin *); +extern struct gaim_plugin *reload_plugin(struct gaim_plugin *); extern void gaim_signal_connect(GModule *, enum gaim_event, void *, void *); extern void gaim_signal_disconnect(GModule *, enum gaim_event, void *); extern void gaim_plugin_unload(GModule *); @@ -857,8 +859,8 @@ extern void show_new_bp(); extern void show_log(char *); extern void show_log_dialog(struct conversation *); -extern void show_find_email(struct gaim_connection *gc); -extern void show_find_info(); +extern void show_find_email(struct gaim_connection *); +extern void show_find_info(struct gaim_connection *); extern void g_show_info_text(char *, ...); extern void show_set_info(struct gaim_connection *); extern void show_set_dir(); Index: plugins.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/plugins.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- plugins.c 2001/09/27 19:17:10 1.82 +++ plugins.c 2001/09/29 23:06:30 1.83 @@ -34,6 +34,8 @@ #include <config.h> #endif +#ifdef GAIM_PLUGINS + #include <string.h> #include <sys/time.h> @@ -46,10 +48,6 @@ #include <gtk/gtk.h> #include "gaim.h" -#ifdef GAIM_PLUGINS - -#include <dlfcn.h> - #include "pixmaps/gnome_add.xpm" #include "pixmaps/gnome_remove.xpm" #include "pixmaps/gnome_preferences.xpm" @@ -59,11 +57,6 @@ #define PATHSIZE 1024 /* XXX: stolen from dialogs.c */ -/* ------------------ Global Variables ----------------------- */ - -GList *plugins = NULL; -GList *callbacks = NULL; - /* ------------------ Local Variables ------------------------ */ static GtkWidget *plugin_dialog = NULL; @@ -84,25 +77,16 @@ /* --------------- Function Declarations --------------------- */ void show_plugins(GtkWidget *, gpointer); -void load_plugin(char *); - -void gaim_signal_connect(GModule *, enum gaim_event, void *, void *); -void gaim_signal_disconnect(GModule *, enum gaim_event, void *); -void gaim_plugin_unload(GModule *); /* UI button callbacks */ +static void unload_plugin_cb(GtkWidget *, gpointer); static void plugin_reload_cb(GtkWidget *, gpointer); static const gchar *plugin_makelistname(GModule *); -static void plugin_remove_callbacks(GModule *); - -static void plugin_reload(struct gaim_plugin *p); static void destroy_plugins(GtkWidget *, gpointer); static void load_file(GtkWidget *, gpointer); static void load_which_plugin(GtkWidget *, gpointer); -static void unload_plugin(GtkWidget *, gpointer); -static void unload_immediate(GModule *); static void list_clicked(GtkWidget *, struct gaim_plugin *); static void update_show_plugins(); static void hide_plugins(GtkWidget *, gpointer); @@ -166,80 +150,8 @@ if (plugin_dialog) gtk_widget_destroy(plugin_dialog); plugin_dialog = NULL; -} - -void load_plugin(char *filename) -{ - struct gaim_plugin *plug; - GList *c = plugins; - char *(*gaim_plugin_init)(GModule *); - char *(*cfunc)(); - char *error; - char *retval; - - if (!g_module_supported()) - return; - if (filename && !strlen(filename)) - return; - - while (filename && c) { - plug = (struct gaim_plugin *)c->data; - if (!strcmp(filename, g_module_name(plug->handle))) { - /* just need to reload plugin */ - plugin_reload(plug); - return; - } else - c = g_list_next(c); - } - plug = g_malloc(sizeof *plug); - - 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); - if (!plug->handle) { - error = (char *)g_module_error(); - do_error_dialog(error, _("Plugin Error")); - g_free(plug); - return; - } - - if (!g_module_symbol(plug->handle, "gaim_plugin_init", (gpointer *)&gaim_plugin_init)) { - do_error_dialog(g_module_error(), _("Plugin Error")); - g_module_close(plug->handle); - g_free(plug); - return; - } - - retval = (*gaim_plugin_init)(plug->handle); - debug_printf("loaded plugin returned %s\n", retval ? retval : "NULL"); - if (retval) { - plugin_remove_callbacks(plug->handle); - do_error_dialog(retval, _("Plugin Error")); - g_module_close(plug->handle); - g_free(plug); - return; - } - plugins = g_list_append(plugins, plug); - - if (g_module_symbol(plug->handle, "name", (gpointer *)&cfunc)) { - plug->name = (*cfunc)(); - } else { - plug->name = NULL; - } - - if (g_module_symbol(plug->handle, "description", (gpointer *)&cfunc)) - plug->description = (*cfunc)(); - else - plug->description = NULL; - update_show_plugins(); - save_prefs(); } void show_plugins(GtkWidget *w, gpointer data) @@ -358,7 +270,7 @@ gtk_tooltips_set_tip(tooltips, reload, _("Reload the selected plugin"), ""); unload = picture_button(plugwindow, _("Unload"), gnome_remove_xpm); - gtk_signal_connect(GTK_OBJECT(unload), "clicked", GTK_SIGNAL_FUNC(unload_plugin), pluglist); + gtk_signal_connect(GTK_OBJECT(unload), "clicked", GTK_SIGNAL_FUNC(unload_plugin_cb), pluglist); gtk_box_pack_start(GTK_BOX(bothbox), unload, TRUE, TRUE, 0); gtk_tooltips_set_tip(tooltips, unload, _("Unload the selected plugin"), ""); @@ -415,11 +327,10 @@ } } -static void unload_plugin(GtkWidget *w, gpointer data) +static void unload_plugin_cb(GtkWidget *w, gpointer data) { GList *i; struct gaim_plugin *p; - void (*gaim_plugin_remove)(); i = GTK_LIST(pluglist)->selection; @@ -427,106 +338,29 @@ return; p = gtk_object_get_user_data(GTK_OBJECT(i->data)); - - /* Attempt to call the plugin's remove function (if there) */ - if (g_module_symbol(p->handle, "gaim_plugin_remove", (gpointer *)&gaim_plugin_remove)) - (*gaim_plugin_remove)(); - - unload_immediate(p->handle); - update_show_plugins(); -} - -static void unload_for_real(void *handle) -{ - GList *i; - struct gaim_plugin *p = NULL; - - i = plugins; - while (i) { - p = (struct gaim_plugin *)i->data; - if (handle == p->handle) - break; - p = NULL; - i = g_list_next(i); - } - - if (!p) - return; - - debug_printf("Unloading %s\n", g_module_name(p->handle)); - - plugin_remove_callbacks(p->handle); - plugins = g_list_remove(plugins, p); - g_free(p); + unload_plugin(p); update_show_plugins(); - save_prefs(); -} - -static void unload_immediate(GModule *handle) -{ - unload_for_real(handle); - g_module_close(handle); -} - -static gboolean unload_timeout(gpointer handle) -{ - g_module_close(handle); - return FALSE; } -void gaim_plugin_unload(GModule *handle) -{ - unload_for_real(handle); - g_timeout_add(5000, unload_timeout, handle); -} - static void plugin_reload_cb(GtkWidget *w, gpointer data) { GList *i; + struct gaim_plugin *p; i = GTK_LIST(pluglist)->selection; if (i == NULL) return; /* Just pass off plugin to the actual function */ - plugin_reload(gtk_object_get_user_data(GTK_OBJECT(i->data))); -} - -/* Do unload/load cycle of plugin. */ -static void plugin_reload(struct gaim_plugin *p) -{ - char file[PATHSIZE]; - void (*gaim_plugin_remove)(); - GModule *handle = p->handle; - struct gaim_plugin *plug; - GList *plugs; - - strncpy(file, g_module_name(handle), sizeof(file)); - file[sizeof(file) - 1] = '\0'; - - debug_printf("Reloading %s\n", file); - - /* Unload */ - if (g_module_symbol(handle, "gaim_plugin_remove", (gpointer *)&gaim_plugin_remove)) - (*gaim_plugin_remove)(); - unload_immediate(handle); + p = reload_plugin(gtk_object_get_user_data(GTK_OBJECT(i->data))); - /* Load */ - load_plugin(file); + update_show_plugins(); /* Try and reselect the plugin in list */ if (!pluglist) return; - plugs = plugins; - while (plugs) { - plug = plugs->data; - if (!strcmp(file, g_module_name(plug->handle))) { - gtk_list_select_item(GTK_LIST(pluglist), g_list_index(plugins, plug)); - return; - } - plugs = plugs->next; - } + gtk_list_select_item(GTK_LIST(pluglist), g_list_index(plugins, p)); } static void list_clicked(GtkWidget *w, struct gaim_plugin *p) @@ -594,330 +428,5 @@ return filename; } - -/* Remove all callbacks associated with plugin handle */ -static void plugin_remove_callbacks(GModule *handle) -{ - GList *c = callbacks; - struct gaim_callback *g; - debug_printf("%d callbacks to search\n", g_list_length(callbacks)); - - while (c) { - g = (struct gaim_callback *)c->data; - if (g->handle == handle) { - c = g_list_next(c); - callbacks = g_list_remove(callbacks, (gpointer)g); - debug_printf("Removing callback, %d remain\n", g_list_length(callbacks)); - } else - c = g_list_next(c); - } -} - -void gaim_signal_connect(GModule *handle, enum gaim_event which, void *func, void *data) -{ - struct gaim_callback *call = g_new0(struct gaim_callback, 1); - call->handle = handle; - call->event = which; - call->function = func; - call->data = data; - - callbacks = g_list_append(callbacks, call); - debug_printf("Adding callback %d\n", g_list_length(callbacks)); -} - -void gaim_signal_disconnect(GModule *handle, enum gaim_event which, void *func) -{ - GList *c = callbacks; - struct gaim_callback *g = NULL; - - while (c) { - g = (struct gaim_callback *)c->data; - if (handle == g->handle && func == g->function) { - callbacks = g_list_remove(callbacks, c->data); - g_free(g); - c = callbacks; - if (c == NULL) - break; - } - c = g_list_next(c); - } -} - -#endif /* GAIM_PLUGINS */ - -static char *event_name(enum gaim_event event) -{ - static char buf[128]; - switch (event) { - case event_signon: - sprintf(buf, "event_signon"); - break; - case event_signoff: - sprintf(buf, "event_signoff"); - break; - case event_away: - sprintf(buf, "event_away"); - break; - case event_back: - sprintf(buf, "event_back"); - break; - case event_im_recv: - sprintf(buf, "event_im_recv"); - break; - case event_im_send: - sprintf(buf, "event_im_send"); - break; - case event_buddy_signon: - sprintf(buf, "event_buddy_signon"); - break; - case event_buddy_signoff: - sprintf(buf, "event_buddy_signoff"); - break; - case event_buddy_away: - sprintf(buf, "event_buddy_away"); - break; - case event_buddy_back: - sprintf(buf, "event_buddy_back"); - break; - case event_buddy_idle: - sprintf(buf, "event_buddy_idle"); - break; - case event_buddy_unidle: - sprintf(buf, "event_buddy_unidle"); - break; - case event_blist_update: - sprintf(buf, "event_blist_update"); - break; - case event_chat_invited: - sprintf(buf, "event_chat_invited"); - break; - case event_chat_join: - sprintf(buf, "event_chat_join"); - break; - case event_chat_leave: - sprintf(buf, "event_chat_leave"); - break; - case event_chat_buddy_join: - sprintf(buf, "event_chat_buddy_join"); - break; - case event_chat_buddy_leave: - sprintf(buf, "event_chat_buddy_leave"); - break; - case event_chat_recv: - sprintf(buf, "event_chat_recv"); - break; - case event_chat_send: - sprintf(buf, "event_chat_send"); - break; - case event_warned: - sprintf(buf, "event_warned"); - break; - case event_error: - sprintf(buf, "event_error"); - break; - case event_quit: - sprintf(buf, "event_quit"); - break; - case event_new_conversation: - sprintf(buf, "event_new_conversation"); - break; - case event_set_info: - sprintf(buf, "event_set_info"); - break; - case event_draw_menu: - sprintf(buf, "event_draw_menu"); - break; - case event_im_displayed_sent: - sprintf(buf, "event_im_displayed_sent"); - break; - case event_im_displayed_rcvd: - sprintf(buf, "event_im_displayed_rcvd"); - break; - case event_chat_send_invite: - sprintf(buf, "event_chat_send_invite"); - break; - default: - sprintf(buf, "event_unknown"); - break; - } - return buf; -} - -int plugin_event(enum gaim_event event, void *arg1, void *arg2, void *arg3, void *arg4) -{ -#ifdef USE_PERL - char buf[BUF_LONG]; -#endif -#ifdef GAIM_PLUGINS - GList *c = callbacks; - struct gaim_callback *g; - - while (c) { - void (*zero)(void *); - void (*one)(void *, void *); - void (*two)(void *, void *, void *); - void (*three)(void *, void *, void *, void *); - void (*four)(void *, void *, void *, void *, void *); - - g = (struct gaim_callback *)c->data; - if (g->event == event && g->function !=NULL) { - switch (event) { - - /* no args */ - case event_blist_update: - case event_quit: - zero = g->function; - (*zero)(g->data); - break; - - /* one arg */ - case event_signon: - case event_signoff: - case event_new_conversation: - case event_error: - one = g->function; - (*one)(arg1, g->data); - break; - - /* two args */ - case event_buddy_signon: - case event_buddy_signoff: - case event_buddy_away: - case event_buddy_back: - case event_buddy_idle: - case event_buddy_unidle: - case event_chat_leave: - case event_set_info: - case event_draw_menu: - two = g->function; - (*two)(arg1, arg2, g->data); - break; - - /* three args */ - case event_im_send: - case event_im_displayed_sent: - case event_chat_join: - case event_chat_buddy_join: - case event_chat_buddy_leave: - case event_chat_send: - case event_away: - case event_back: - case event_warned: - three = g->function; - (*three)(arg1, arg2, arg3, g->data); - break; - - /* four args */ - case event_im_recv: - case event_chat_recv: - case event_im_displayed_rcvd: - case event_chat_send_invite: - case event_chat_invited: - four = g->function; - (*four)(arg1, arg2, arg3, arg4, g->data); - break; - - default: - debug_printf("unknown event %d\n", event); - break; - } - } - c = c->next; - } -#endif /* GAIM_PLUGINS */ -#ifdef USE_PERL - switch (event) { - case event_signon: - case event_signoff: - case event_away: - case event_back: - g_snprintf(buf, sizeof buf, "%lu", (unsigned long)arg1); - break; - case event_im_recv: - g_snprintf(buf, sizeof buf, "%lu \"%s\" %s", (unsigned long)arg1, - *(char **)arg2 ? *(char **)arg2 : "(null)", - *(char **)arg3 ? *(char **)arg3 : "(null)"); - break; - case event_im_send: - g_snprintf(buf, sizeof buf, "%lu \"%s\" %s", (unsigned long)arg1, - (char *)arg2, *(char **)arg3 ? *(char **)arg3 : "(null)"); - break; - case event_buddy_signon: - case event_buddy_signoff: - case event_set_info: - case event_buddy_away: - case event_buddy_back: - case event_buddy_idle: - case event_buddy_unidle: - g_snprintf(buf, sizeof buf, "%lu \"%s\"", (unsigned long)arg1, (char *)arg2); - break; - case event_chat_invited: - g_snprintf(buf, sizeof buf, "%lu \"%s\" \"%s\" %s", (unsigned long)arg1, - (char *)arg2, (char *)arg3, arg4 ? (char *)arg4 : ""); - break; - case event_chat_join: - case event_chat_buddy_join: - case event_chat_buddy_leave: - g_snprintf(buf, sizeof buf, "%lu %d \"%s\"", (unsigned long)arg1, - (int)arg2, (char *)arg3); - break; - case event_chat_leave: - g_snprintf(buf, sizeof buf, "%lu %d", (unsigned long)arg1, (int)arg2); - break; - case event_chat_recv: - g_snprintf(buf, sizeof buf, "%lu %d \"%s\" %s", (unsigned long)arg1, - (int)arg2, (char *)arg3, (char *)arg4 ? (char *)arg4 : "(null)"); - break; - case event_chat_send_invite: - g_snprintf(buf, sizeof buf, "%lu %d \"%s\" %s", (unsigned long)arg1, - (int)arg2, (char *)arg3, *(char **)arg4 ? *(char **)arg4 : "(null)"); - break; - case event_chat_send: - g_snprintf(buf, sizeof buf, "%lu %d %s", (unsigned long)arg1, (int)arg2, - *(char **)arg3 ? *(char **)arg3 : "(null)"); - break; - case event_warned: - g_snprintf(buf, sizeof buf, "%lu \"%s\" %d", (unsigned long)arg1, - arg2 ? (char *)arg2 : "", (int)arg3); - break; - case event_quit: - buf[0] = 0; - break; - case event_new_conversation: - g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg1); - break; - case event_im_displayed_sent: - g_snprintf(buf, sizeof buf, "%lu \"%s\" %s", (unsigned long)arg1, - (char *)arg2, *(char **)arg3 ? *(char **)arg3 : "(null)"); - break; - case event_im_displayed_rcvd: - g_snprintf(buf, sizeof buf, "%lu \"%s\" %s", (unsigned long)arg1, - (char *)arg2, (char *)arg3 ? (char *)arg3 : "(null)"); - break; - default: - return 0; - } - return perl_event(event_name(event), buf); -#else - return 0; -#endif -} - -/* Calls the gaim_plugin_remove function in any loaded plugin that has one */ -#ifdef GAIM_PLUGINS -void remove_all_plugins() -{ - GList *c = plugins; - struct gaim_plugin *p; - void (*gaim_plugin_remove)(); - - while (c) { - p = (struct gaim_plugin *)c->data; - if (g_module_symbol(p->handle, "gaim_plugin_remove", (gpointer *)&gaim_plugin_remove)) - (*gaim_plugin_remove)(); - g_free(p); - c = c->next; - } -} #endif |
From: Eric W. <war...@us...> - 2001-09-29 23:06:33
|
Update of /cvsroot/gaim/gaim/src/protocols/gg In directory usw-pr-cvs1:/tmp/cvs-serv5211/src/protocols/gg Added Files: .cvsignore Makefile.am gg.c libgg.c libgg.h protocol.txt Log Message: Arkadiusz Miskiewicz\'s Gadu-Gadu plugin. I was able to figure out enough polish to be able to download Gadu-Gadu, create an account, and test the plugin. Imagine my shock when I got my info and it said I was a woman. Whoops. Also splitting plugins.c so that non-gtk stuff is in modules.c. gaim-core is almost ready for protocol implantaion. Also fixing an IRC bug. Also patiently waiting for anoncvs_gaim's lock in /cvsroot/gaim/gaim/pixmaps --- NEW FILE: .cvsignore --- .deps .libs Makefile Makefile.in gg.lo libgg.la libgg.lo --- NEW FILE: Makefile.am --- EXTRA_DIST = protocol.txt pkgdir = $(libdir)/gaim CFLAGS += -I\$(top_srcdir)/src $(st) $(DEBUG_CFLAGS) libgg_la_LDFLAGS = -avoid-version if STATIC_GG st = -DSTATIC pkg_LTLIBRARIES = noinst_LIBRARIES = libgg.a libgg_a_SOURCES = libgg.c \ libgg.h \ gg.c else st = pkg_LTLIBRARIES = libgg.la noinst_LIBRARIES = libgg_la_SOURCES = libgg.c \ libgg.h \ gg.c endif --- NEW FILE: gg.c --- /* * gaim - Gadu-Gadu Protocol Plugin * $Id: gg.c,v 1.1 2001/09/29 23:06:30 warmenhoven Exp $ * * Copyright (C) 2001, Arkadiusz Mi¶kiewicz <mi...@pl...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA [...1001 lines suppressed...] } void gaim_plugin_remove() { struct prpl *p = find_prpl(PROTO_GADUGADU); if (p == my_protocol) unload_protocol(p); } char *name() { return "Gadu-Gadu"; } char *description() { return PRPL_DESC("Gadu-Gadu"); } #endif --- NEW FILE: libgg.c --- /* $Id: libgg.c,v 1.1 2001/09/29 23:06:30 warmenhoven Exp $ */ /* * (C) Copyright 2001 Wojtek Kaniewski <woj...@ir...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License Version 2 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ [...1208 lines suppressed...] if (errno == EAGAIN) { e->type = GG_EVENT_NONE; res = 0; } else res = -1; } break; } } if (res == -1) { free(e); e = NULL; } return e; } --- NEW FILE: libgg.h --- /* $Id: libgg.h,v 1.1 2001/09/29 23:06:30 warmenhoven Exp $ */ /* * (C) Copyright 2001 Wojtek Kaniewski <woj...@ir...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License Version 2 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __LIBGG_H #define __LIBGG_H #ifdef __cplusplus extern "C" { #endif #define GG_DEBUG 1 /* * typ zmiennej okre¶laj±cej numerek danej osoby. */ typedef unsigned int uin_t; /* * co¶tam. */ struct gg_session { int state, check; int fd, pid; int port; int seq, async; uin_t uin; char *password; char *recv_buf; int recv_done, recv_left; }; /* * ró¿ne stany asynchronicznej maszynki. */ enum { GG_STATE_IDLE = 0, /* wspólne */ GG_STATE_RESOLVING, GG_STATE_CONNECTING_HTTP, GG_STATE_WRITING_HTTP, /* gg_login */ GG_STATE_CONNECTING_GG, GG_STATE_WAITING_FOR_KEY, GG_STATE_SENDING_KEY, GG_STATE_CONNECTED, GG_STATE_READING_HEADER, /* gg_search */ GG_STATE_READING_DATA, GG_STATE_PARSING, GG_STATE_FINISHED, }; /* * co proces klienta powinien sprawdzaæ w deskryptorach? */ enum { GG_CHECK_NONE = 0, GG_CHECK_WRITE = 1, GG_CHECK_READ = 2, }; struct gg_session *gg_login(uin_t uin, char *password, int async); void gg_free_session(struct gg_session *sess); void gg_logoff(struct gg_session *sess); int gg_change_status(struct gg_session *sess, int status); int gg_send_message(struct gg_session *sess, int msgclass, uin_t recipient, unsigned char *message); int gg_ping(struct gg_session *sess); struct gg_notify_reply { uin_t uin; /* numerek */ int status; /* status danej osoby */ int remote_ip; /* adres ip delikwenta */ short remote_port; /* port, na którym s³ucha klient */ int dunno1; /* == 0x0b */ short dunno2; /* znowu port? */ } __attribute__ ((packed)); struct gg_status { uin_t uin; /* numerek */ int status; /* nowy stan */ } __attribute__ ((packed)); enum { GG_EVENT_NONE = 0, GG_EVENT_MSG, GG_EVENT_NOTIFY, GG_EVENT_STATUS, GG_EVENT_ACK, GG_EVENT_CONN_FAILED, GG_EVENT_CONN_SUCCESS, }; enum { GG_FAILURE_RESOLVING = 1, GG_FAILURE_CONNECTING, GG_FAILURE_INVALID, GG_FAILURE_READING, GG_FAILURE_WRITING, GG_FAILURE_PASSWORD, }; struct gg_event { int type; union { struct { uin_t sender; int msgclass; unsigned char *message; } msg; struct gg_notify_reply *notify; struct gg_status status; struct { uin_t recipient; int status; int seq; } ack; int failure; } event; }; struct gg_event *gg_watch_fd(struct gg_session *sess); void gg_free_event(struct gg_event *e); int gg_notify(struct gg_session *sess, uin_t *userlist, int count); int gg_add_notify(struct gg_session *sess, uin_t uin); int gg_remove_notify(struct gg_session *sess, uin_t uin); /* * jakie¶tam bzdurki dotycz±ce szukania userów. */ struct gg_search_result { uin_t uin; char *first_name; char *last_name; char *nickname; int born; int gender; char *city; int active; }; struct gg_search_request { /* czy ma szukaæ tylko aktywnych? */ int active; /* mode 0 */ char *nickname, *first_name, *last_name, *city; int gender, min_birth, max_birth; /* mode 1 */ char *email; /* mode 2 */ char *phone; /* mode 3 */ uin_t uin; }; struct gg_search { struct gg_search_request request; /* bzdurki */ int mode, fd, async, state, check, error, pid; char *header_buf, *data_buf; int header_size, data_size; /* wyniki */ int count; struct gg_search_result *results; }; #define GG_GENDER_NONE 0 #define GG_GENDER_FEMALE 1 #define GG_GENDER_MALE 2 struct gg_search *gg_search(struct gg_search_request *r, int async); int gg_search_watch_fd(struct gg_search *f); void gg_free_search(struct gg_search *f); void gg_search_cancel(struct gg_search *f); /* * je¶li chcemy sobie podebugowaæ, wystarczy zdefiniowaæ GG_DEBUG. */ int gg_debug_level; #ifdef GG_DEBUG # define GG_DEBUG_NET 1 # define GG_DEBUG_TRAFFIC 2 # define GG_DEBUG_DUMP 4 # define GG_DEBUG_FUNCTION 8 # define GG_DEBUG_MISC 16 void gg_debug_real(int level, char *format, ...); # define gg_debug(x, y...) gg_debug_real(x, y) #else # define gg_debug(x, y...) while(0) { }; #endif /* GG_DEBUG */ /* * ------------------------------------------------------------------------- * poni¿ej znajduj± siê wewnêtrzne sprawy biblioteki. zwyk³y klient nie * powinien ich w ogóle ruszaæ, bo i nie ma po co. wszystko mo¿na za³atwiæ * procedurami wy¿szego poziomu, których definicje znajduj± siê na pocz±tku * tego pliku. * ------------------------------------------------------------------------- */ int gg_resolve(int *fd, int *pid, char *hostname); int gg_connect(void *addr, int port, int async); char *gg_alloc_sprintf(char *format, ...); #define GG_APPMSG_HOST "appmsg.gadu-gadu.pl" #define GG_APPMSG_PORT 80 #define GG_PUBDIR_HOST "pubdir.gadu-gadu.pl" #define GG_PUBDIR_PORT 80 #define GG_DEFAULT_PORT 8074 struct gg_header { int type; /* typ pakietu */ int length; /* d³ugo¶æ reszty pakietu */ } __attribute__ ((packed)); #define GG_WELCOME 0x0001 struct gg_welcome { int key; /* klucz szyfrowania has³a */ } __attribute__ ((packed)); #define GG_LOGIN 0x000c struct gg_login { uin_t uin; /* twój numerek */ int hash; /* hash has³a */ int status; /* status na dzieñ dobry */ int dunno; /* == 0x0b */ int local_ip; /* mój adres ip */ short local_port; /* port, na którym s³ucham */ } __attribute__ ((packed)); #define GG_LOGIN_OK 0x0003 #define GG_LOGIN_FAILED 0x0009 #define GG_NEW_STATUS 0x0002 #define GG_STATUS_NOT_AVAIL 0x0001 /* roz³±czony */ #define GG_STATUS_AVAIL 0x0002 /* dostêpny */ #define GG_STATUS_BUSY 0x0003 /* zajêty */ #define GG_STATUS_INVISIBLE 0x0014 /* niewidoczny (GG 4.6) */ #define GG_STATUS_FRIENDS_MASK 0x8000 /* tylko dla znajomych (GG 4.6) */ struct gg_new_status { int status; /* na jaki zmieniæ? */ } __attribute__ ((packed)); #define GG_NOTIFY 0x0010 struct gg_notify { uin_t uin; /* numerek danej osoby */ char dunno1; /* == 3 */ } __attribute__ ((packed)); #define GG_NOTIFY_REPLY 0x000c /* tak, to samo co GG_LOGIN */ /* struct gg_notify_reply zadeklarowane wy¿ej */ #define GG_ADD_NOTIFY 0x000d #define GG_REMOVE_NOTIFY 0x000e struct gg_add_remove { uin_t uin; /* numerek */ char dunno1; /* == 3 */ } __attribute__ ((packed)); #define GG_STATUS 0x0002 /* struct gg_status zadeklarowane wcze¶niej */ #define GG_SEND_MSG 0x000b #define GG_CLASS_MSG 0x0004 #define GG_CLASS_CHAT 0x0008 struct gg_send_msg { int recipient; int seq; int msgclass; } __attribute__ ((packed)); #define GG_SEND_MSG_ACK 0x0005 #define GG_ACK_DELIVERED 0x0002 #define GG_ACK_QUEUED 0x0003 struct gg_send_msg_ack { int status; int recipient; int seq; } __attribute__ ((packed)); #define GG_RECV_MSG 0x000a struct gg_recv_msg { int sender; int dunno1; int dunno2; int msgclass; } __attribute__ ((packed)); #define GG_PING 0x0008 #define GG_PONG 0x0007 #ifdef __cplusplus } #endif #endif --- NEW FILE: protocol.txt --- --------------------------------------------------------------------------- protokó³ g*du-g*du 4.x (c) copyright 2001 by wojtek kaniewski <woj...@ir...> --- 0) disclaimer --------------------------------------------------------- wszystkie informacje bazuj± na do¶wiadczeniach przeprowadzonych na moim domowym komputerze. ¿aden klient g*du-g*du nie zosta³ skrzywdzony podczas przeprowadzania badañ, blabla. --- 1) transmisja, format wszystkich pakietów ----------------------------- w przeciwieñstwie do zabawek typu icq, g*du-g*du korzysta z protoko³u tcp. ka¿dy pakiet zawiera dwa sta³e pola: struct gg_header { int type; /* typ pakietu */ int length; /* d³ugo¶æ reszty pakietu */ }; dla u³atwienia przyjmujê nastêpuj±ce d³ugo¶ci zmiennych: sizeof(char) = 1, sizeof(short) = 2, sizeof(int) = 4. oczywi¶cie wszystkie liczby s± zgodnie z intelowym endianem. zak³adam te¿, ¿e wszystkie zmienne s± bez znaku. nie chce mi siê wszêdzie pisaæ `unsigned'. pola, co do których znaczenia nie mam pewno¶ci, lub w ogóle nie mam pojêcia, sk±d siê tam wziê³y, oznaczam `dunno'. --- 2) zanim siê po³±czymy ------------------------------------------------- ¿eby wiedzieæ, z jakim serwerem mamy siê po³±czyæ, nale¿y poudawaæ przez chwilê Internet Explorera, po³±czyæ siê z hostem `appmsg.gadu-gadu.pl'. GET /appsvc/appmsg.asp?fmnumber=<tutaj_numerek_gg> HTTP/1.0 Host: appmsg.gadu-gadu.pl User-Agent: Mozilla/4.7 [en] (Win98; I) Pragma: no-cache na co powinni¶my dostaæ odpowied¼ w stylu: HTTP/1.0 200 OK 0 1 0 217.17.33.21:8074 217.17.33.21 217.17.33.21 co to oznacza? nie mam pojêcia ;) wygl±da na to, ¿e ca³y g*du-g*du jest przemy¶lany i w przysz³o¶ci bêdzie mo¿na u¿ywaæ ró¿nych serwerów do ró¿nych rzeczy, typu szukanie, obs³uga klientów itd. póki co, ³±czyæ siê trzeba na pierwszy adres (tak, ten z portem). --- 3) logowanie siê ------------------------------------------------------- po po³±czeniu siê portem 8074 serwera g*du-g*du, dostajemy pakiet typu 0x0001, który na potrzeby tego dokumentu nazwiemy: #define GG_WELCOME 0x0001 reszta pakietu zawiera liczbê, na podstawie której liczony jest hash z has³a klienta: struct gg_welcome { int key; /* klucz szyfrowania has³a */ }; kiedy mamy ju¿ t± warto¶æ mo¿emy odes³aæ pakiet logowania #define GG_LOGIN 0x000c musimy podaæ kilka informacji: struct gg_login { int uin; /* twój numerek */ int hash; /* hash has³a */ int status; /* status na dzieñ dobry */ int dunno1; /* == 0x0b */ int local_ip; /* mój adres ip */ short local_port; /* port, na którym s³ucham */ }; jak obliczyæ hash has³a? hmm... nic prostszego. do ka¿dej literki has³a dodaje siê jedynkê, mno¿y wszystko razem, a potem przez liczbê podan± przez serwer. for (hash = 1; *passwd; passwd++) hash *= (*passwd) + 1; zrozumia³e, racja? je¶li wszystko siê powiedzie, dostaniemy w odpowiedzi pakiet typu #define GG_LOGIN_OK 0x0003 z polem header->length = 0, lub pakiet #define GG_LOGIN_FAILED 0x0009 --- 4) zmiana statusu ----------------------------------------------------- g*du-g*du przewiduje trzy stany klienta, które zmieniamy pakietem #define GG_NEW_STATUS 0x0002 #define GG_STATUS_NOT_AVAIL 0x0001 /* roz³±czony */ #define GG_STATUS_AVAIL 0x0002 /* dostêpny */ #define GG_STATUS_BUSY 0x0003 /* zajêty */ #define GG_STATUS_INVISIBLE 0x0014 /* niewidoczny */ #define GG_STATUS_FRIENDS_MASK 0x8000 /* tylko dla przyjació³ */ struct gg_new_status { int status; /* na jaki zmieniæ? */ } nale¿y pamiêtaæ, ¿eby przed roz³±czeniem siê z serwerem nale¿y zmieniæ stan na GG_STATUS_NOT_AVAIL. je¶li ma byæ widoczny tylko dla przyjació³, nale¿y dodaæ GG_STATUS_FRIENDS do normalnej warto¶ci stanu. --- 5) ludzie przychodz±, ludzie odchodz± --------------------------------- zaraz po zalogowaniu mo¿emy wys³aæ serwerowi listê ludzików w naszej li¶cie kontaktów, ¿eby dowiedzieæ siê, czy s± w tej chwili dostêpni. pakiet zawiera dowoln± ilo¶æ struktur gg_notify: #define GG_NOTIFY 0x0010 struct gg_notify { int uin; /* numerek danej osoby */ char dunno1; /* == 3 */ }; je¶li kto¶ jest, serwer odpowie pakietem zawieraj±cym jedn± lub wiêcej struktur gg_notify_reply: #define GG_NOTIFY_REPLY 0x000c /* tak, to samo co GG_LOGIN */ struct gg_notify_reply { int uin; /* numerek */ int status; /* status danej osoby */ int remote_ip; /* adres ip delikwenta */ short remote_port; /* port, na którym s³ucha klient */ int dunno1; /* == 0x0b */ short dunno2; /* znowu port? */ }; je¶li klient nie obs³uguje po³±czeñ miêdzy klientami (np. g*du-g*du 3.x) zamiast adresu ip jest 0, zamiast portu jest 2. niewa¿ne ;) w ka¿dym razie, je¶li kto¶ siê pojawi w trakcie pracy, równie¿ zostanie przys³any ten pakiet. proste? proste :) ¿eby dodaæ kogo¶ do listy w trakcie pracy, trzeba wys³aæ ni¿ej opisany pakiet. jego format jest identyczny jak przy GG_NOTIFY. #define GG_ADD 0x000d struct gg_add { int uin; /* numerek */ char dunno1; /* == 3 */ }; je¶li kto¶ opu¶ci g*du-g*du lub zmieni stan, otrzymamy pakiet #define GG_STATUS 0x0002 struct gg_status { int uin; /* numerek */ int status; /* nowy stan */ }; --- 6) wysy³anie wiadomo¶ci ------------------------------------------------ przejd¼my do sedna sprawy ;) #define GG_SEND_MSG 0x000b #define GG_CLASS_MSG 0x0004 #define GG_CLASS_CHAT 0x0008 struct gg_send_msg { int recipient; int seq; int class; char message[]; }; wiadomo, odbiorca. numer sekwencyjny, który wykorzystujemy potem do potwierdzenia. nie wykluczone, ¿e w jakis sposób odró¿nia siê ró¿ne rozmowy za pomoc± czê¶ci bajtów, ale raczej nie ma znaczenia. klasa wiadomo¶ci pozwala odró¿niæ, czy wiadomo¶æ ma siê pokazaæ w osobym okienku czy jako kolejna linijka w okienku rozmowy. wygl±da na to, ¿e to jaka¶ bitmapa, wiêc najlepiej olaæ inne bity ni¿ 0x0f. (czasem klienty wysy³aj± 0x04, czasem 0x24) serwer po otrzymaniu wiadomo¶ci odsy³a informacjê o tym. przy okazji mówi, czy wiadomo¶æ dotar³a do odbiorcy (status == GG_ACK_DELIVERED), czy mo¿e jest offline i zosta³a zakolejkowana (GG_ACK_QUEUED): #define GG_SEND_MSG_ACK 0x0005 #define GG_ACK_DELIVERED 0x0002 #define GG_ACK_QUEUED 0x0003 struct gg_send_msg_ack { int status; int recipient; int seq; }; numer sekwencyjny i adresat ten sam, co przy wysy³aniu. --- 7) otrzymywanie wiadomo¶ci --------------------------------------------- zbyt wiele wyja¶nieñ chyba nie trzeba. wiadomo od kogo. nieznane pola to co¶ a'la numer sekwencyjny albo identyfikator okienka z rozmow± albo nowe dane dla setiathome. klasa wiadomo¶ci taka sama jak przy wysy³aniu: #define GG_RECV_MSG 0x000a struct gg_recv_msg { int sender; int dunno1; int dunno2; int class; char message[]; }; --- 8) otrzymywanie wiadomo¶ci --------------------------------------------- od czasu do czasu klient wysy³a pakiet a'la ping do serwera i dostaje pust± odpowied¼. ciê¿ko stwierdziæ, czy serwer wywala, je¶li nie dostanie pinga przez jaki¶ czas, czy klient siê roz³±cza, je¶li serwer mu nie odpowie. jako¶ nie chce mi siê sprawdzaæ ;) #define GG_PING 0x0008 /* nie ma niczego */ #define GG_PONG 0x0007 /* nie ma niczego */ --- 9) podziêkowania ------------------------------------------------------- swój wk³ad w poznanie protoko³u mia³ Robert Wo¼ny, który opisa³ nowo¶ci w GG 4.6. ---------------------------------------------------------------------------- $Id: protocol.txt,v 1.1 2001/09/29 23:06:30 warmenhoven Exp $ |