Mercurial > pidgin.yaz
changeset 6322:dd2be7cd66df
[gaim-migrate @ 6821]
This is:
-Alphabetize the translation things in ChangeLog
-Spell Brian Tarricone's name correctly (I hope...)
-A fix for a crash when renaming a group containing a chat, thanks to
javabsp. Me gusta this change.
-Make the rename group dialog use gaim_request_input(). The old dialog
may be a bit prettier, but this one uses the request code, which means
less work for UIs, which rocks.
-Change the TRUE and FALSE defines in aim.h to be more compatible with c++.
Thanks to Zack Rusin for this change.
-Declare aim.h as a C file when it is used in a c++ program. This should
let libfaim be used in C++ programs such as kopete. Thanks again to
Zack Rusin.
-Rename aimutil_itemidx() to aimutil_itemindex(). "idx" is not a standard
abbreviation, and code is written once and read many times--it should be
easily readable.
-Not an automatic laundry folding machine. So I'm going to do that.
(Fold my laundry)
(Not automatically)
(yet)
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 29 Jul 2003 04:27:31 +0000 |
parents | 3613007cbb6e |
children | 5d7063e137da |
files | ChangeLog plugins/notify.c src/blist.c src/dialogs.c src/protocols/oscar/aim.h src/protocols/oscar/bos.c src/protocols/oscar/util.c |
diffstat | 7 files changed, 32 insertions(+), 76 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Jul 29 02:27:33 2003 +0000 +++ b/ChangeLog Tue Jul 29 04:27:31 2003 +0000 @@ -13,13 +13,13 @@ * Danish translation updated (Morten Brix Pedersen) * Dutch translation updated (Vincent van Adrighem) * German translation updated (Bjoern Voigt) + * Hindi translation added (Guntupalli Karunakar) * Hungarian translation updated (Zoltan Sutto) * Italian translation updated (Luca Beltrame, Claudio Satriano) * Portuguese (Brazilian) translation updated (Mauricio de Lemos Rodrigues Collares Neto) * Serbian translation updated (Danilo Segan) * Spanish translation updated (Javier Fernandez-Sanguino Pena) - * Hindi translation added (Guntupalli Karunakar) version 0.66 (07/18/2003): * Freebsd compile fix (Matthew Luckie)
--- a/plugins/notify.c Tue Jul 29 02:27:33 2003 +0000 +++ b/plugins/notify.c Tue Jul 29 04:27:31 2003 +0000 @@ -4,7 +4,7 @@ * Copyright (C) 2000-2001, Eric Warmenhoven (original code) * Copyright (C) 2002, Etan Reisner <deryni@eden.rutgers.edu> (rewritten code) * Copyright (C) 2003, Christian Hammond (update for changed API) - * Copyright (C) 2003, Brian Tarricon <bjt23@cornell.edu> (mostly rewritten) + * Copyright (C) 2003, Brian Tarricone <bjt23@cornell.edu> (mostly rewritten) * Copyright (C) 2003, Mark Doliner (minor cleanup) * * This program is free software; you can redistribute it and/or modify
--- a/src/blist.c Tue Jul 29 02:27:33 2003 +0000 +++ b/src/blist.c Tue Jul 29 04:27:31 2003 +0000 @@ -875,8 +875,13 @@ GaimBlistNode *child = ((GaimBlistNode *)g)->child; while (child) { - if (!g_slist_find(l, ((struct buddy*)child)->account)) - l = g_slist_append(l, ((struct buddy*)child)->account); + GaimAccount *account = NULL; + if (GAIM_BLIST_NODE_IS_BUDDY(child)) + account = ((struct buddy *)child)->account; + else if (GAIM_BLIST_NODE_IS_CHAT(child)) + account = ((struct chat *)child)->account; + if (!g_slist_find(l, account)) + l = g_slist_append(l, account); child = child->next; } return l;
--- a/src/dialogs.c Tue Jul 29 02:27:33 2003 +0000 +++ b/src/dialogs.c Tue Jul 29 04:27:31 2003 +0000 @@ -4263,80 +4263,20 @@ /* The dialog for renaming groups */ /*------------------------------------------------------------------------*/ -static void do_rename_group(GtkObject *obj, int resp, GtkWidget *entry) +static void do_rename_group(struct group *g, const char *new_name) { - const char *new_name; - struct group *g; - - if (resp == GTK_RESPONSE_OK) { - new_name = gtk_entry_get_text(GTK_ENTRY(entry)); - g = g_object_get_data(G_OBJECT(entry), "group"); - - gaim_blist_rename_group(g, new_name); - gaim_blist_save(); - } - destroy_dialog(rename_dialog, rename_dialog); + gaim_blist_rename_group(g, new_name); + gaim_blist_save(); } void show_rename_group(GtkWidget *unused, struct group *g) { - - GtkWidget *hbox, *vbox; - GtkWidget *label; - struct gaim_gtk_buddy_list *gtkblist; - GtkWidget *img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG); - GtkWidget *name_entry = NULL; - - gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); - - if (!rename_dialog) { - rename_dialog = gtk_dialog_new_with_buttons(_("Rename Group"), GTK_WINDOW(gtkblist->window), 0, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); - gtk_dialog_set_default_response (GTK_DIALOG(rename_dialog), GTK_RESPONSE_OK); - gtk_container_set_border_width (GTK_CONTAINER(rename_dialog), 6); - gtk_window_set_resizable(GTK_WINDOW(rename_dialog), FALSE); - gtk_dialog_set_has_separator(GTK_DIALOG(rename_dialog), FALSE); - gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(rename_dialog)->vbox), 12); - gtk_container_set_border_width (GTK_CONTAINER(GTK_DIALOG(rename_dialog)->vbox), 6); - - hbox = gtk_hbox_new(FALSE, 12); - gtk_container_add(GTK_CONTAINER(GTK_DIALOG(rename_dialog)->vbox), hbox); - gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); - gtk_misc_set_alignment(GTK_MISC(img), 0, 0); - - vbox = gtk_vbox_new(FALSE, 0); - gtk_container_add(GTK_CONTAINER(hbox), vbox); - - label = gtk_label_new(_("Please enter a new name for the selected group.\n")); - gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0); - gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); - - hbox = gtk_hbox_new(FALSE, 6); - gtk_container_add(GTK_CONTAINER(vbox), hbox); - - label = gtk_label_new(NULL); - gtk_label_set_markup_with_mnemonic(GTK_LABEL(label), _("_Group:")); - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); - - name_entry = gtk_entry_new(); - gtk_entry_set_activates_default (GTK_ENTRY(name_entry), TRUE); - g_object_set_data(G_OBJECT(name_entry), "group", g); - gtk_entry_set_text(GTK_ENTRY(name_entry), g->name); - gtk_box_pack_start(GTK_BOX(hbox), name_entry, FALSE, FALSE, 0); - gtk_entry_set_activates_default (GTK_ENTRY(name_entry), TRUE); - gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(name_entry)); - - g_signal_connect(G_OBJECT(rename_dialog), "response", G_CALLBACK(do_rename_group), name_entry); - - } - - gtk_widget_show_all(rename_dialog); - if(name_entry) - gtk_widget_grab_focus(GTK_WIDGET(name_entry)); + gaim_request_input(NULL, _("Rename Group"), _("New Group Name:\n"), + NULL, g->name, FALSE, FALSE, + GTK_STOCK_OK, G_CALLBACK(do_rename_group), + GTK_STOCK_CANCEL, NULL, g); } - GtkWidget *gaim_pixbuf_toolbar_button_from_stock(char *icon) { GtkWidget *button, *image, *bbox;
--- a/src/protocols/oscar/aim.h Tue Jul 29 02:27:33 2003 +0000 +++ b/src/protocols/oscar/aim.h Tue Jul 29 04:27:31 2003 +0000 @@ -35,6 +35,10 @@ #include <winsock.h> #endif +#ifdef __cplusplus +extern "C" { +#endif + /* XXX adjust these based on autoconf-detected platform */ typedef unsigned char fu8_t; typedef unsigned short fu16_t; @@ -67,9 +71,12 @@ #define faim_internal #endif +#ifndef FALSE +#define FALSE (0) +#endif + #ifndef TRUE -#define TRUE 1 -#define FALSE 0 +#define TRUE (!FALSE) #endif /* @@ -1433,11 +1440,15 @@ faim_export int aim_util_getlocalip(fu8_t *ip); faim_export int aimutil_tokslen(char *toSearch, int index, char dl); faim_export int aimutil_itemcnt(char *toSearch, char dl); -faim_export char *aimutil_itemidx(char *toSearch, int index, char dl); +faim_export char *aimutil_itemindex(char *toSearch, int index, char dl); faim_export int aim_snlen(const char *sn); faim_export int aim_sncmp(const char *sn1, const char *sn2); #include <aim_internal.h> +#ifdef __cplusplus +} +#endif + #endif /* __AIM_H__ */
--- a/src/protocols/oscar/bos.c Tue Jul 29 02:27:33 2003 +0000 +++ b/src/protocols/oscar/bos.c Tue Jul 29 04:27:31 2003 +0000 @@ -129,7 +129,7 @@ aim_putsnac(&fr->data, 0x0009, subtype, 0x00, snacid); for (i = 0; (i < (listcount - 1)) && (i < 99); i++) { - tmpptr = aimutil_itemidx(localcpy, i, '&'); + tmpptr = aimutil_itemindex(localcpy, i, '&'); aimbs_put8(&fr->data, strlen(tmpptr)); aimbs_putraw(&fr->data, tmpptr, strlen(tmpptr));
--- a/src/protocols/oscar/util.c Tue Jul 29 02:27:33 2003 +0000 +++ b/src/protocols/oscar/util.c Tue Jul 29 04:27:31 2003 +0000 @@ -81,7 +81,7 @@ return curCount; } -faim_export char *aimutil_itemidx(char *toSearch, int index, char dl) +faim_export char *aimutil_itemindex(char *toSearch, int index, char dl) { int curCount; char *next;