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: <sa...@us...> - 2006-06-28 19:12:48
|
Revision: 16369 Author: sadrul Date: 2006-06-28 12:12:38 -0700 (Wed, 28 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16369&view=rev Log Message: ----------- Get rid of a whole lot of compile warnings. Modified Paths: -------------- trunk/console/libgnt/Makefile trunk/console/libgnt/gnt.h trunk/console/libgnt/gntbox.c trunk/console/libgnt/gntbutton.c trunk/console/libgnt/gntentry.c trunk/console/libgnt/gntlabel.c trunk/console/libgnt/gntmain.c trunk/console/libgnt/gnttextview.c trunk/console/libgnt/gnttree.c trunk/console/libgnt/gntwidget.h Modified: trunk/console/libgnt/Makefile =================================================================== --- trunk/console/libgnt/Makefile 2006-06-28 18:50:33 UTC (rev 16368) +++ trunk/console/libgnt/Makefile 2006-06-28 19:12:38 UTC (rev 16369) @@ -55,7 +55,7 @@ gntmain.o: gntmain.c $(HEADERS) libgnt: $(OBJECTS) - $(CC) --shared -o libgnt.so $(OBJECTS) + $(CC) --shared -o libgnt.so $(OBJECTS) $(LDFLAGS) clean: rm -f *.o Modified: trunk/console/libgnt/gnt.h =================================================================== --- trunk/console/libgnt/gnt.h 2006-06-28 18:50:33 UTC (rev 16368) +++ trunk/console/libgnt/gnt.h 2006-06-28 19:12:38 UTC (rev 16369) @@ -11,4 +11,6 @@ void gnt_screen_release(GntWidget *widget); -void gnt_scree_update(GntWidget *widget); +void gnt_screen_update(GntWidget *widget); + +void gnt_screen_take_focus(GntWidget *widget); Modified: trunk/console/libgnt/gntbox.c =================================================================== --- trunk/console/libgnt/gntbox.c 2006-06-28 18:50:33 UTC (rev 16368) +++ trunk/console/libgnt/gntbox.c 2006-06-28 19:12:38 UTC (rev 16369) @@ -1,5 +1,7 @@ #include "gntbox.h" +#include <string.h> + enum { SIGS = 1, @@ -238,7 +240,6 @@ static void gnt_box_lost_focus(GntWidget *widget) { - GntBox *box = GNT_BOX(widget); GntWidget *p = widget; while (p->parent) @@ -277,8 +278,6 @@ static void gnt_box_class_init(GntBoxClass *klass) { - GObjectClass *obj_class = G_OBJECT_CLASS(klass); - parent_class = GNT_WIDGET_CLASS(klass); parent_class->destroy = gnt_box_destroy; parent_class->draw = gnt_box_draw; Modified: trunk/console/libgnt/gntbutton.c =================================================================== --- trunk/console/libgnt/gntbutton.c 2006-06-28 18:50:33 UTC (rev 16368) +++ trunk/console/libgnt/gntbutton.c 2006-06-28 19:12:38 UTC (rev 16369) @@ -1,3 +1,5 @@ +#include <string.h> + #include "gntbutton.h" enum @@ -54,8 +56,6 @@ static void gnt_button_class_init(GntWidgetClass *klass) { - GObjectClass *obj_class = G_OBJECT_CLASS(klass); - parent_class = GNT_WIDGET_CLASS(klass); parent_class->draw = gnt_button_draw; parent_class->map = gnt_button_map; Modified: trunk/console/libgnt/gntentry.c =================================================================== --- trunk/console/libgnt/gntentry.c 2006-06-28 18:50:33 UTC (rev 16368) +++ trunk/console/libgnt/gntentry.c 2006-06-28 19:12:38 UTC (rev 16369) @@ -1,4 +1,6 @@ +#include <ctype.h> #include <string.h> + #include "gntentry.h" enum @@ -28,8 +30,6 @@ static void gnt_entry_size_request(GntWidget *widget) { - GntEntry *entry = GNT_ENTRY(widget); - if (!GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_MAPPED)) { widget->priv.height = 1; @@ -150,8 +150,6 @@ static void gnt_entry_class_init(GntEntryClass *klass) { - GObjectClass *obj_class = G_OBJECT_CLASS(klass); - parent_class = GNT_WIDGET_CLASS(klass); parent_class->destroy = gnt_entry_destroy; parent_class->draw = gnt_entry_draw; Modified: trunk/console/libgnt/gntlabel.c =================================================================== --- trunk/console/libgnt/gntlabel.c 2006-06-28 18:50:33 UTC (rev 16368) +++ trunk/console/libgnt/gntlabel.c 2006-06-28 19:12:38 UTC (rev 16369) @@ -58,8 +58,6 @@ static void gnt_label_class_init(GntLabelClass *klass) { - GObjectClass *obj_class = G_OBJECT_CLASS(klass); - parent_class = GNT_WIDGET_CLASS(klass); parent_class->destroy = gnt_label_destroy; parent_class->draw = gnt_label_draw; Modified: trunk/console/libgnt/gntmain.c =================================================================== --- trunk/console/libgnt/gntmain.c 2006-06-28 18:50:33 UTC (rev 16368) +++ trunk/console/libgnt/gntmain.c 2006-06-28 19:12:38 UTC (rev 16369) @@ -1,9 +1,13 @@ #include "gnt.h" +#include "gntbox.h" #include "gntkeys.h" #include "gntcolors.h" + #include <stdio.h> #include <stdlib.h> #include <locale.h> +#include <unistd.h> +#include <string.h> static GList *focus_list; static int max_x; @@ -248,7 +252,7 @@ widget = widget->parent; } - gnt_box_sync_children(widget); + gnt_box_sync_children(GNT_BOX(widget)); node = g_hash_table_lookup(nodes, widget); win = dupwin(widget->window); Modified: trunk/console/libgnt/gnttextview.c =================================================================== --- trunk/console/libgnt/gnttextview.c 2006-06-28 18:50:33 UTC (rev 16368) +++ trunk/console/libgnt/gnttextview.c 2006-06-28 19:12:38 UTC (rev 16369) @@ -50,8 +50,6 @@ static void gnt_text_view_class_init(GntTextViewClass *klass) { - GObjectClass *obj_class = G_OBJECT_CLASS(klass); - parent_class = GNT_WIDGET_CLASS(klass); parent_class->destroy = gnt_text_view_destroy; parent_class->draw = gnt_text_view_draw; Modified: trunk/console/libgnt/gnttree.c =================================================================== --- trunk/console/libgnt/gnttree.c 2006-06-28 18:50:33 UTC (rev 16368) +++ trunk/console/libgnt/gnttree.c 2006-06-28 19:12:38 UTC (rev 16369) @@ -47,7 +47,7 @@ get_next(GntTreeRow *row) { if (row == NULL) - return; + return NULL; return _get_next(row, !row->collapsed); } @@ -229,7 +229,6 @@ gnt_tree_draw(GntWidget *widget) { GntTree *tree = GNT_TREE(widget); - int bottom; scrollok(widget->window, TRUE); wsetscrreg(widget->window, 0, widget->priv.height - 1); @@ -330,8 +329,6 @@ static void gnt_tree_class_init(GntTreeClass *klass) { - GObjectClass *obj_class = G_OBJECT_CLASS(klass); - parent_class = GNT_WIDGET_CLASS(klass); parent_class->destroy = gnt_tree_destroy; parent_class->draw = gnt_tree_draw; @@ -432,7 +429,8 @@ GntWidget *widget = GNT_WIDGET(tree); int ret = widget->priv.height; if (!GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_NO_BORDER)) - widget->priv.height -= 2; + ret -= 2; + return ret; } void gnt_tree_scroll(GntTree *tree, int count) Modified: trunk/console/libgnt/gntwidget.h =================================================================== --- trunk/console/libgnt/gntwidget.h 2006-06-28 18:50:33 UTC (rev 16368) +++ trunk/console/libgnt/gntwidget.h 2006-06-28 19:12:38 UTC (rev 16369) @@ -117,6 +117,7 @@ * Applications should just call gnt_widget_draw instead of this. */ void gnt_widget_queue_update(GntWidget *widget); +void gnt_widget_set_take_focus(GntWidget *widget, gboolean set); G_END_DECLS #endif /* GNT_WIDGET_H */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aar...@us...> - 2006-06-28 17:28:11
|
Revision: 16367 Author: aaronsheldon Date: 2006-06-28 10:28:06 -0700 (Wed, 28 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16367&view=rev Log Message: ----------- Formatting (indentation) correction Modified Paths: -------------- branches/soc-2006-blist-efficiency/src/gtkblist.c Modified: branches/soc-2006-blist-efficiency/src/gtkblist.c =================================================================== --- branches/soc-2006-blist-efficiency/src/gtkblist.c 2006-06-28 16:01:42 UTC (rev 16366) +++ branches/soc-2006-blist-efficiency/src/gtkblist.c 2006-06-28 17:28:06 UTC (rev 16367) @@ -3004,21 +3004,21 @@ else if (!selected && !text) { text = g_strdup_printf("%s\n" - "<span color='%s' size='smaller'>%s%s%s</span>", - esc, dim_grey(), - idletime != NULL ? idletime : "", - (idletime != NULL && statustext != NULL) ? " - " : "", - statustext != NULL ? statustext : ""); + "<span color='%s' size='smaller'>%s%s%s</span>", + esc, dim_grey(), + idletime != NULL ? idletime : "", + (idletime != NULL && statustext != NULL) ? " - " : "", + statustext != NULL ? statustext : ""); } /* It is selected. */ if ((selected && !text) || (selected && idletime)) text = g_strdup_printf("%s\n" - "<span size='smaller'>%s%s%s</span>", - esc, - idletime != NULL ? idletime : "", - (idletime != NULL && statustext != NULL) ? " - " : "", - statustext != NULL ? statustext : ""); + "<span size='smaller'>%s%s%s</span>", + esc, + idletime != NULL ? idletime : "", + (idletime != NULL && statustext != NULL) ? " - " : "", + statustext != NULL ? statustext : ""); g_free(idletime); g_free(statustext); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-06-28 16:01:56
|
Revision: 16366 Author: sadrul Date: 2006-06-28 09:01:42 -0700 (Wed, 28 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16366&view=rev Log Message: ----------- Fix a typo ("chat" -> "conv"), plug a memory leak, and auto-scroll the conversation history. Modified Paths: -------------- trunk/console/gntconv.c Modified: trunk/console/gntconv.c =================================================================== --- trunk/console/gntconv.c 2006-06-28 05:52:23 UTC (rev 16365) +++ trunk/console/gntconv.c 2006-06-28 16:01:42 UTC (rev 16366) @@ -134,6 +134,7 @@ gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), strip, (flags & GAIM_MESSAGE_NICK) ? GNT_TEXT_FLAG_UNDERLINE : 0); gnt_text_view_next_line(GNT_TEXT_VIEW(ggconv->tv)); + gnt_text_view_scroll(GNT_TEXT_VIEW(ggconv->tv), 0); g_free(name); g_free(strip); @@ -167,13 +168,15 @@ gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), (strip = gaim_markup_strip_html(message)), 0); gnt_text_view_next_line(GNT_TEXT_VIEW(ggconv->tv)); + gnt_text_view_scroll(GNT_TEXT_VIEW(ggconv->tv), 0); + g_free(strip); g_free(name); } static void -gg_write_conv(GaimConversation *conv, const char *who, const char *message, - GaimMessageFlags flags, time_t mtime) +gg_write_conv(GaimConversation *conv, const char *who, const char *alias, + const char *message, GaimMessageFlags flags, time_t mtime) { GGConv *ggconv = g_hash_table_lookup(ggconvs, conv); char *strip; @@ -182,15 +185,22 @@ g_return_if_fail(ggconv != NULL); strip = gaim_markup_strip_html(message); - name = g_strdup_printf("%s: ", who); + if (alias && *alias) + name = g_strdup_printf("%s: ", alias); + else if (who && *who) + name = g_strdup_printf("%s: ", who); + else + name = g_strdup(""); gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), name, GNT_TEXT_FLAG_BOLD); gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), strip, 0); gnt_text_view_next_line(GNT_TEXT_VIEW(ggconv->tv)); + gnt_text_view_scroll(GNT_TEXT_VIEW(ggconv->tv), 0); g_free(strip); + g_free(name); } static void @@ -215,7 +225,7 @@ .destroy_conversation = gg_destroy_conversation, .write_chat = gg_write_chat, .write_im = gg_write_im, - .write_chat = gg_write_conv, + .write_conv = gg_write_conv, .chat_add_users = gg_chat_add_users, .chat_rename_user = gg_chat_rename_user, .chat_remove_users = gg_chat_remove_user, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-06-28 05:52:32
|
Revision: 16365 Author: sadrul Date: 2006-06-27 22:52:23 -0700 (Tue, 27 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16365&view=rev Log Message: ----------- Add ui for conversation. It 'works', but it's broken. So don't use it just yet. I probably will not be able to touch it in the next couple of days. So feel free to fix the brokenness :) Modified Paths: -------------- trunk/console/Makefile trunk/console/gntblist.c trunk/console/gntui.c trunk/console/libgnt/gntcolors.h trunk/console/libgnt/gntmain.c Added Paths: ----------- trunk/console/gntconv.c trunk/console/gntconv.h Modified: trunk/console/Makefile =================================================================== --- trunk/console/Makefile 2006-06-28 01:46:41 UTC (rev 16364) +++ trunk/console/Makefile 2006-06-28 05:52:23 UTC (rev 16365) @@ -3,14 +3,17 @@ GG_SOURCES = \ gntblist.c \ + gntconv.c \ gntui.c GG_HEADERS = \ gntblist.h \ + gntconv.h \ gntui.h GG_OBJECTS = \ gntblist.o \ + gntconv.o \ gntui.o all: @@ -20,6 +23,7 @@ gntgaim: gntgaim.o $(GG_OBJECTS) $(CC) -o gntgaim gntgaim.o $(GG_OBJECTS) $(LDFLAGS) gntblist.o: gntblist.c $(GG_HEADERS) +gntconv.o: gntconv.c $(GG_HEADERS) gntgaim.o: gntgaim.c gntgaim.h $(GG_HEADERS) gntui.o: gntui.c $(GG_HEADERS) Modified: trunk/console/gntblist.c =================================================================== --- trunk/console/gntblist.c 2006-06-28 01:46:41 UTC (rev 16364) +++ trunk/console/gntblist.c 2006-06-28 05:52:23 UTC (rev 16365) @@ -179,6 +179,8 @@ { GaimChat *chat = (GaimChat*)node; name = gaim_chat_get_name(chat); + + strncpy(status, "~", sizeof(status) - 1); } snprintf(text, sizeof(text) - 1, "%s %s", status, name); @@ -363,6 +365,25 @@ return TRUE; } } + else if (text[0] == '\r' && text[1] == '\0') + { + GntTree *tree = GNT_TREE(ggblist->tree); + GaimBlistNode *node = gnt_tree_get_selection_data(tree); + + if (GAIM_BLIST_NODE_IS_BUDDY(node)) + { + GaimBuddy *buddy = (GaimBuddy *)node; + gaim_conversation_new(GAIM_CONV_TYPE_IM, + gaim_buddy_get_account(buddy), + gaim_buddy_get_name(buddy)); + } + else if (GAIM_BLIST_NODE_IS_CHAT(node)) + { + GaimChat *chat = (GaimChat*)node; + serv_join_chat(chat->account->gc, chat->components); + } + } + return FALSE; } Added: trunk/console/gntconv.c =================================================================== --- trunk/console/gntconv.c (rev 0) +++ trunk/console/gntconv.c 2006-06-28 05:52:23 UTC (rev 16365) @@ -0,0 +1,248 @@ +#include <util.h> + +#include "gntgaim.h" +#include "gntconv.h" + +#include "gnt.h" +#include "gntbox.h" +#include "gntentry.h" +#include "gnttextview.h" + +GHashTable *ggconvs; + +typedef struct _GGConv GGConv; +typedef struct _GGConvChat GGConvChat; +typedef struct _GGConvIm GGConvIm; + +struct _GGConv +{ + GaimConversation *conv; + + GntWidget *window; /* the container */ + GntWidget *entry; /* entry */ + GntWidget *tv; /* text-view */ + + union + { + GGConvChat *chat; + GGConvIm *im; + } u; +}; + +struct _GGConvChat +{ + GntWidget *userlist; /* the userlist */ +}; + +struct _GGConvIm +{ + void *nothing_for_now; +}; + +static gboolean +entry_key_pressed(GntWidget *w, const char *key, GGConv *ggconv) +{ + if (key[0] == '\r' && key[1] == 0) + { + const char *text = gnt_entry_get_text(GNT_ENTRY(ggconv->entry)); + switch (gaim_conversation_get_type(ggconv->conv)) + { + case GAIM_CONV_TYPE_IM: + gaim_conv_im_send_with_flags(GAIM_CONV_IM(ggconv->conv), text, GAIM_MESSAGE_SEND); + break; + case GAIM_CONV_TYPE_CHAT: + gaim_conv_chat_send(GAIM_CONV_CHAT(ggconv->conv), text); + break; + default: + g_return_val_if_reached(FALSE); + } + gnt_entry_clear(GNT_ENTRY(ggconv->entry)); + return TRUE; + } + + return FALSE; +} + +static void +closing_window(GntWidget *window, GGConv *ggconv) +{ + ggconv->window = NULL; + gaim_conversation_destroy(ggconv->conv); +} + +static void +gg_create_conversation(GaimConversation *conv) +{ + GGConv *ggc = g_hash_table_lookup(ggconvs, conv); + char *title; + GaimConversationType type; + + if (ggc) + return; + + ggc = g_new0(GGConv, 1); + g_hash_table_insert(ggconvs, conv, ggc); + + ggc->conv = conv; + + type = gaim_conversation_get_type(conv); + title = g_strdup_printf(_("Conversation: %s"), gaim_conversation_get_name(conv)); + ggc->window = gnt_box_new(FALSE, TRUE); + gnt_box_set_title(GNT_BOX(ggc->window), title); + gnt_box_set_toplevel(GNT_BOX(ggc->window), TRUE); + gnt_widget_set_name(ggc->window, "conversation-window"); + + ggc->tv = gnt_text_view_new(); + gnt_box_add_widget(GNT_BOX(ggc->window), ggc->tv); + gnt_widget_set_name(ggc->tv, "conversation-window-textview"); + gnt_widget_set_size(ggc->tv, getmaxx(stdscr) - 40, getmaxy(stdscr) - 15); + + ggc->entry = gnt_entry_new(NULL); + gnt_box_add_widget(GNT_BOX(ggc->window), ggc->entry); + gnt_widget_set_name(ggc->entry, "conversation-window-entry"); + gnt_widget_set_size(ggc->entry, getmaxx(stdscr) - 40, 1); + + g_signal_connect(G_OBJECT(ggc->entry), "key_pressed", G_CALLBACK(entry_key_pressed), ggc); + g_signal_connect(G_OBJECT(ggc->window), "destroy", G_CALLBACK(closing_window), ggc); + + gnt_widget_set_position(ggc->window, 32, 0); + gnt_widget_show(ggc->window); + + g_free(title); +} + +static void +gg_destroy_conversation(GaimConversation *conv) +{ + g_hash_table_remove(ggconvs, conv); +} + +static void +gg_write_chat(GaimConversation *conv, const char *who, const char *message, + GaimMessageFlags flags, time_t mtime) +{ + GGConv *ggconv = g_hash_table_lookup(ggconvs, conv); + char *name, *strip; + + g_return_if_fail(ggconv != NULL); + + name = g_strdup_printf("%s: ", who); + strip = gaim_markup_strip_html(message); + + gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), + name, GNT_TEXT_FLAG_BOLD); + gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), + strip, (flags & GAIM_MESSAGE_NICK) ? GNT_TEXT_FLAG_UNDERLINE : 0); + gnt_text_view_next_line(GNT_TEXT_VIEW(ggconv->tv)); + + g_free(name); + g_free(strip); +} + +static void +gg_write_im(GaimConversation *conv, const char *who, const char *message, + GaimMessageFlags flags, time_t mtime) +{ + GGConv *ggconv = g_hash_table_lookup(ggconvs, conv); + char *strip; + char *name; + + g_return_if_fail(ggconv != NULL); + + if (flags & GAIM_MESSAGE_SEND) + { + who = gaim_connection_get_display_name(conv->account->gc); + if (!who) + who = gaim_account_get_alias(conv->account); + if (!who) + who = gaim_account_get_username(conv->account); + } + else if (flags & GAIM_MESSAGE_RECV) + who = gaim_conversation_get_name(conv); + + name = g_strdup_printf("%s: ", who); + + gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), + name, GNT_TEXT_FLAG_BOLD); + gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), + (strip = gaim_markup_strip_html(message)), 0); + gnt_text_view_next_line(GNT_TEXT_VIEW(ggconv->tv)); + g_free(strip); + g_free(name); +} + +static void +gg_write_conv(GaimConversation *conv, const char *who, const char *message, + GaimMessageFlags flags, time_t mtime) +{ + GGConv *ggconv = g_hash_table_lookup(ggconvs, conv); + char *strip; + char *name; + + g_return_if_fail(ggconv != NULL); + + strip = gaim_markup_strip_html(message); + name = g_strdup_printf("%s: ", who); + + gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), + name, GNT_TEXT_FLAG_BOLD); + gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), + strip, 0); + gnt_text_view_next_line(GNT_TEXT_VIEW(ggconv->tv)); + + g_free(strip); +} + +static void +gg_chat_add_users(GaimConversation *conv, GList *users, GList *flags, GList *aliases, gboolean new_arrivals) +{} + +static void +gg_chat_rename_user(GaimConversation *conv, const char *old, const char *new_n, const char *new_a) +{} + +static void +gg_chat_remove_user(GaimConversation *conv, GList *list) +{} + +static void +gg_chat_update_user(GaimConversation *conv, const char *user) +{} + +static GaimConversationUiOps conv_ui_ops = +{ + .create_conversation = gg_create_conversation, + .destroy_conversation = gg_destroy_conversation, + .write_chat = gg_write_chat, + .write_im = gg_write_im, + .write_chat = gg_write_conv, + .chat_add_users = gg_chat_add_users, + .chat_rename_user = gg_chat_rename_user, + .chat_remove_users = gg_chat_remove_user, + .chat_update_user = gg_chat_update_user, + .present = NULL, + .has_focus = NULL, + .custom_smiley_add = NULL, + .custom_smiley_write = NULL, + .custom_smiley_close = NULL +}; + +static void +destroy_ggconv(gpointer data) +{ + GGConv *conv = data; + gnt_widget_destroy(conv->window); + g_free(conv); +} + +GaimConversationUiOps *gg_conv_get_ui_ops() +{ + return &conv_ui_ops; +} + + +void gg_conversation_init() +{ + ggconvs = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, destroy_ggconv); +} + Property changes on: trunk/console/gntconv.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/console/gntconv.h =================================================================== --- trunk/console/gntconv.h (rev 0) +++ trunk/console/gntconv.h 2006-06-28 05:52:23 UTC (rev 16365) @@ -0,0 +1,5 @@ +#include "conversation.h" + +GaimConversationUiOps *gg_conv_get_ui_ops(); + +void gg_conversation_init(); Property changes on: trunk/console/gntconv.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Modified: trunk/console/gntui.c =================================================================== --- trunk/console/gntui.c 2006-06-28 01:46:41 UTC (rev 16364) +++ trunk/console/gntui.c 2006-06-28 05:52:23 UTC (rev 16365) @@ -13,6 +13,8 @@ gaim_blist_set_ui_ops(gg_blist_get_ui_ops()); /* Now the conversations */ + gg_conversation_init(); + gaim_conversations_set_ui_ops(gg_conv_get_ui_ops()); gnt_main(); } Modified: trunk/console/libgnt/gntcolors.h =================================================================== --- trunk/console/libgnt/gntcolors.h 2006-06-28 01:46:41 UTC (rev 16364) +++ trunk/console/libgnt/gntcolors.h 2006-06-28 05:52:23 UTC (rev 16365) @@ -18,7 +18,7 @@ enum { - GNT_COLOR_BLACK = 1, + GNT_COLOR_BLACK = 0, GNT_COLOR_RED, GNT_COLOR_GREEN, GNT_COLOR_BLUE, Modified: trunk/console/libgnt/gntmain.c =================================================================== --- trunk/console/libgnt/gntmain.c 2006-06-28 01:46:41 UTC (rev 16364) +++ trunk/console/libgnt/gntmain.c 2006-06-28 05:52:23 UTC (rev 16365) @@ -49,7 +49,6 @@ if (focus_list) { gboolean ret = FALSE; - /*g_signal_emit_by_name(focus_list->data, "key_pressed", buffer, &ret);*/ ret = gnt_widget_key_pressed(focus_list->data, buffer); } @@ -57,22 +56,35 @@ { /* Some special key has been pressed */ if (strcmp(buffer+1, GNT_KEY_POPUP) == 0) + {} + else if (strcmp(buffer + 1, "c") == 0) { - /*printf("popup\n");*/ + /* Alt + c was pressed. I am going to use it to close a window. */ + if (focus_list) + { + gnt_widget_destroy(focus_list->data); + gnt_screen_remove_widget(focus_list->data); + } } - else + else if (strcmp(buffer + 1, "q") == 0) { - /*printf("Unknown: %s\n", buffer+1);*/ - } - } - else - { - if (buffer[0] == 'q') - { + /* I am going to use Alt + q to quit. */ endwin(); exit(1); } - /*printf("%s\n", buffer);*/ + else if (strcmp(buffer + 1, "n") == 0) + { + /* Alt + n to go to the next window */ + if (focus_list && focus_list->next) + focus_list = focus_list->next; + else + focus_list = g_list_first(focus_list); + if (focus_list) + { + /* XXX: Need a way to bring it on top */ + gnt_widget_draw(focus_list->data); + } + } } refresh(); @@ -184,7 +196,7 @@ WINDOW *win; GList *iter; GntNode *node = g_hash_table_lookup(nodes, widget); - if (node == NULL || node->below == NULL) /* Yay! Nothing to do. */ + if (node == NULL) /* Yay! Nothing to do. */ return; win = dupwin(widget->window); @@ -212,6 +224,12 @@ n->above = g_list_remove(n->above, node); } + for (iter = node->above; iter; iter = iter->next) + { + GntNode *n = iter->data; + n->below = g_list_remove(n->below, node); + } + wrefresh(win); delwin(win); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-06-28 01:46:49
|
Revision: 16364 Author: sadrul Date: 2006-06-27 18:46:41 -0700 (Tue, 27 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16364&view=rev Log Message: ----------- Let's have chats in the buddylist. Modified Paths: -------------- trunk/console/Makefile trunk/console/gntblist.c trunk/console/gntui.c trunk/console/libgnt/Makefile Modified: trunk/console/Makefile =================================================================== --- trunk/console/Makefile 2006-06-28 00:21:38 UTC (rev 16363) +++ trunk/console/Makefile 2006-06-28 01:46:41 UTC (rev 16364) @@ -25,6 +25,6 @@ clean: cd libgnt && make clean - rm *.o - rm gntgaim + rm -f *.o + rm -f gntgaim Modified: trunk/console/gntblist.c =================================================================== --- trunk/console/gntblist.c 2006-06-28 00:21:38 UTC (rev 16363) +++ trunk/console/gntblist.c 2006-06-28 01:46:41 UTC (rev 16364) @@ -24,6 +24,7 @@ static void add_buddy(GaimBuddy *buddy, GGBlist *ggblist); static void add_group(GaimGroup *group, GGBlist *ggblist); +static void add_chat(GaimChat *chat, GGBlist *ggblist); static void add_node(GaimBlistNode *node, GGBlist *ggblist); static void draw_tooltip(GGBlist *ggblist); @@ -38,6 +39,8 @@ add_buddy((GaimBuddy*)node, ggblist); else if (GAIM_BLIST_NODE_IS_GROUP(node)) add_group((GaimGroup*)node, ggblist); + else if (GAIM_BLIST_NODE_IS_CHAT(node)) + add_chat((GaimChat *)node, ggblist); draw_tooltip(ggblist); } @@ -81,6 +84,10 @@ else node_remove(gaim_get_blist(), node); } + else if (GAIM_BLIST_NODE_IS_CHAT(node)) + { + add_chat((GaimChat *)node, list->ui_data); + } } static void @@ -121,52 +128,80 @@ } static const char * -get_buddy_display_name(GaimBuddy *buddy) +get_display_name(GaimBlistNode *node) { static char text[2096]; - char status[8]; - GaimStatusPrimitive prim; - GaimPresence *presence; - GaimStatus *now; + char status[8] = " "; + const char *name = NULL; - presence = gaim_buddy_get_presence(buddy); - now = gaim_presence_get_active_status(presence); + if (GAIM_BLIST_NODE_IS_BUDDY(node)) + { + GaimBuddy *buddy = (GaimBuddy *)node; + GaimStatusPrimitive prim; + GaimPresence *presence; + GaimStatus *now; - prim = gaim_status_type_get_primitive(gaim_status_get_type(now)); + + presence = gaim_buddy_get_presence(buddy); + now = gaim_presence_get_active_status(presence); - switch(prim) - { + prim = gaim_status_type_get_primitive(gaim_status_get_type(now)); + + switch(prim) + { #if 1 - case GAIM_STATUS_OFFLINE: - strncpy(status, "x", sizeof(status) - 1); - break; - case GAIM_STATUS_AVAILABLE: - strncpy(status, "o", sizeof(status) - 1); - break; - default: - strncpy(status, ".", sizeof(status) - 1); - break; + case GAIM_STATUS_OFFLINE: + strncpy(status, "x", sizeof(status) - 1); + break; + case GAIM_STATUS_AVAILABLE: + strncpy(status, "o", sizeof(status) - 1); + break; + default: + strncpy(status, ".", sizeof(status) - 1); + break; #else - /* XXX: Let's use these some time */ - case GAIM_STATUS_OFFLINE: - strncpy(status, "⊗", sizeof(status) - 1); - break; - case GAIM_STATUS_AVAILABLE: - /* XXX: Detect idleness */ - strncpy(status, "◯", sizeof(status) - 1); - break; - default: - strncpy(status, "⊖", sizeof(status) - 1); - break; + /* XXX: Let's use these some time */ + case GAIM_STATUS_OFFLINE: + strncpy(status, "⊗", sizeof(status) - 1); + break; + case GAIM_STATUS_AVAILABLE: + /* XXX: Detect idleness */ + strncpy(status, "◯", sizeof(status) - 1); + break; + default: + strncpy(status, "⊖", sizeof(status) - 1); + break; #endif + } + name = gaim_buddy_get_alias(buddy); } + else if (GAIM_BLIST_NODE_IS_CHAT(node)) + { + GaimChat *chat = (GaimChat*)node; + name = gaim_chat_get_name(chat); + } - snprintf(text, sizeof(text) - 1, "%s %s", status, gaim_buddy_get_alias(buddy)); + snprintf(text, sizeof(text) - 1, "%s %s", status, name); return text; } static void +add_chat(GaimChat *chat, GGBlist *ggblist) +{ + GaimGroup *group; + GaimBlistNode *node = (GaimBlistNode *)chat; + if (node->ui_data) + return; + + group = gaim_chat_get_group(chat); + add_node((GaimBlistNode*)group, ggblist); + + node->ui_data = gnt_tree_add_row_after(GNT_TREE(ggblist->tree), chat, + get_display_name(node), group, NULL); +} + +static void add_buddy(GaimBuddy *buddy, GGBlist *ggblist) { GaimGroup *group; @@ -178,7 +213,7 @@ add_node((GaimBlistNode*)group, ggblist); node->ui_data = gnt_tree_add_row_after(GNT_TREE(ggblist->tree), buddy, - get_buddy_display_name(buddy), group, NULL); + get_display_name(node), group, NULL); } static void @@ -268,6 +303,15 @@ title = g_strdup(group->name); } + else if (GAIM_BLIST_NODE_IS_CHAT(node)) + { + GaimChat *chat = (GaimChat *)node; + GaimAccount *account = chat->account; + + g_string_append_printf(str, _("Account: %s"), gaim_account_get_username(account)); + + title = g_strdup(gaim_chat_get_name(chat)); + } else { g_string_free(str, TRUE); @@ -325,7 +369,7 @@ static void buddy_status_changed(GaimBuddy *buddy, GaimStatus *old, GaimStatus *now, GGBlist *ggblist) { - gnt_tree_change_text(GNT_TREE(ggblist->tree), buddy, get_buddy_display_name(buddy)); + gnt_tree_change_text(GNT_TREE(ggblist->tree), buddy, get_display_name((GaimBlistNode*)buddy)); if (ggblist->tnode == (GaimBlistNode*)buddy) draw_tooltip(ggblist); } Modified: trunk/console/gntui.c =================================================================== --- trunk/console/gntui.c 2006-06-28 00:21:38 UTC (rev 16363) +++ trunk/console/gntui.c 2006-06-28 01:46:41 UTC (rev 16364) @@ -12,6 +12,8 @@ gg_blist_init(); gaim_blist_set_ui_ops(gg_blist_get_ui_ops()); + /* Now the conversations */ + gnt_main(); } Modified: trunk/console/libgnt/Makefile =================================================================== --- trunk/console/libgnt/Makefile 2006-06-28 00:21:38 UTC (rev 16363) +++ trunk/console/libgnt/Makefile 2006-06-28 01:46:41 UTC (rev 16364) @@ -57,6 +57,6 @@ $(CC) --shared -o libgnt.so $(OBJECTS) clean: - rm *.o - rm libgnt.so + rm -f *.o + rm -f libgnt.so This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-06-28 00:21:47
|
Revision: 16363 Author: sadrul Date: 2006-06-27 17:21:38 -0700 (Tue, 27 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16363&view=rev Log Message: ----------- Some examples so other people can try things out. I am planning on making the conversation-pane behave like test/tv .. comments? Added Paths: ----------- trunk/console/libgnt/test/ trunk/console/libgnt/test/Makefile trunk/console/libgnt/test/focus.c trunk/console/libgnt/test/multiwin.c trunk/console/libgnt/test/tv.c Added: trunk/console/libgnt/test/Makefile =================================================================== --- trunk/console/libgnt/test/Makefile (rev 0) +++ trunk/console/libgnt/test/Makefile 2006-06-28 00:21:38 UTC (rev 16363) @@ -0,0 +1,13 @@ +CFLAGS=`pkg-config --cflags gobject-2.0` -g -I../ +LDFLAGS=`pkg-config --libs gobject-2.0` -lncursesw -pg -lgnt -L../ + +EXAMPLES=focus tv multiwin + +all: + cd .. && make + make examples + +clean: + rm -f $(EXAMPLES) + +examples: $(EXAMPLES) Property changes on: trunk/console/libgnt/test/Makefile ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/console/libgnt/test/focus.c =================================================================== --- trunk/console/libgnt/test/focus.c (rev 0) +++ trunk/console/libgnt/test/focus.c 2006-06-28 00:21:38 UTC (rev 16363) @@ -0,0 +1,49 @@ +#include "gntbutton.h" +#include "gnt.h" +#include "gntkeys.h" +#include "gnttree.h" +#include "gntbox.h" +#include "gntentry.h" +#include "gntlabel.h" + +int main() +{ + gnt_init(); + + GntWidget *label = gnt_label_new("So wassup dudes and dudettes!!\nSo this is, like,\nthe third line!! \\o/"); + GntWidget *vbox, *hbox, *tree; + WINDOW *test; + + box(stdscr, 0, 0); + wrefresh(stdscr); + + vbox = gnt_box_new(FALSE, FALSE); + hbox = gnt_box_new(FALSE, TRUE); + + gnt_widget_set_name(vbox, "vbox"); + gnt_widget_set_name(hbox, "hbox"); + + gnt_box_add_widget(GNT_BOX(hbox), label); + gnt_box_add_widget(GNT_BOX(hbox), vbox); + + gnt_box_add_widget(GNT_BOX(hbox), gnt_entry_new("a")); + + tree = gnt_tree_new(); + gnt_box_add_widget(GNT_BOX(hbox), tree); + + gnt_tree_add_row_after(GNT_TREE(tree), "a", "a", NULL, NULL); + gnt_tree_add_row_after(GNT_TREE(tree), "c", "c", NULL, NULL); + gnt_tree_add_row_after(GNT_TREE(tree), "d", "d", NULL, NULL); + gnt_tree_add_row_after(GNT_TREE(tree), "e", "e", "a", NULL); + gnt_tree_add_row_after(GNT_TREE(tree), "b", "b", "d", NULL); + + GNT_WIDGET_UNSET_FLAGS(hbox, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW); + gnt_box_set_title(GNT_BOX(hbox), "This is the title …"); + + gnt_widget_show(hbox); + + gnt_main(); + + return 0; +} + Property changes on: trunk/console/libgnt/test/focus.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/console/libgnt/test/multiwin.c =================================================================== --- trunk/console/libgnt/test/multiwin.c (rev 0) +++ trunk/console/libgnt/test/multiwin.c 2006-06-28 00:21:38 UTC (rev 16363) @@ -0,0 +1,64 @@ +#include "gntbutton.h" +#include "gnt.h" +#include "gntkeys.h" +#include "gnttree.h" +#include "gntbox.h" + +gboolean show(GntWidget *w) +{ + gnt_widget_draw(w); + + return TRUE; +} + +int main() +{ + gnt_init(); + + GntWidget *hbox, *tree, *box2; + + box(stdscr, 0, 0); + wrefresh(stdscr); + + hbox = gnt_box_new(FALSE, TRUE); + box2 = gnt_box_new(FALSE, TRUE); + + gnt_widget_set_name(hbox, "hbox"); + gnt_widget_set_name(box2, "box2"); + + tree = gnt_tree_new(); + gnt_widget_set_name(tree, "tree"); + gnt_box_add_widget(GNT_BOX(hbox), tree); + + gnt_box_set_toplevel(GNT_BOX(hbox), TRUE); + gnt_box_set_title(GNT_BOX(hbox), "Testing the tree widget"); + + gnt_box_set_toplevel(GNT_BOX(box2), TRUE); + gnt_box_set_title(GNT_BOX(box2), "On top"); + + gnt_box_add_widget(GNT_BOX(box2), GNT_WIDGET(gnt_label_new("asdasd"))); + + gnt_widget_show(hbox); + gnt_widget_set_position(box2, 5, 5); + gnt_widget_show(box2); + + gnt_tree_add_row_after(GNT_TREE(tree), "a", "a", NULL, NULL); + gnt_tree_add_row_after(GNT_TREE(tree), "c", "c", NULL, NULL); + gnt_tree_add_row_after(GNT_TREE(tree), "d", "d", NULL, NULL); + gnt_tree_add_row_after(GNT_TREE(tree), "e", "e", "a", NULL); + gnt_tree_add_row_after(GNT_TREE(tree), "b", "b", "d", NULL); + + gnt_tree_add_row_after(GNT_TREE(tree), "1", "1", NULL, NULL); + gnt_tree_add_row_after(GNT_TREE(tree), "2", "2", NULL, NULL); + gnt_tree_add_row_after(GNT_TREE(tree), "3", "3", NULL, NULL); + gnt_tree_add_row_after(GNT_TREE(tree), "4", "4", "a", NULL); + gnt_tree_add_row_after(GNT_TREE(tree), "5", "5", "d", NULL); + + gnt_tree_add_row_after(GNT_TREE(tree), "6", "6", "4", NULL); + g_timeout_add(1000, (GSourceFunc)show, hbox); + + gnt_main(); + + return 0; +} + Property changes on: trunk/console/libgnt/test/multiwin.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/console/libgnt/test/tv.c =================================================================== --- trunk/console/libgnt/test/tv.c (rev 0) +++ trunk/console/libgnt/test/tv.c 2006-06-28 00:21:38 UTC (rev 16363) @@ -0,0 +1,71 @@ +#include "gntbutton.h" +#include "gnt.h" +#include "gntkeys.h" +#include "gnttree.h" +#include "gntbox.h" +#include "gntentry.h" +#include "gnttextview.h" + +static gboolean +key_pressed(GntWidget *w, const char *key, GntWidget *view) +{ + if (key[0] == '\r' && key[1] == 0) + { + gnt_text_view_next_line(GNT_TEXT_VIEW(view)); + gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(view), + gnt_entry_get_text(GNT_ENTRY(w)), + GNT_TEXT_FLAG_BOLD); + gnt_entry_clear(GNT_ENTRY(w)); + gnt_text_view_scroll(GNT_TEXT_VIEW(view), 0); + + return TRUE; + } + else if (key[0] == 27) + { + if (strcmp(key+1, GNT_KEY_UP)) + gnt_text_view_scroll(GNT_TEXT_VIEW(view), 1); + else if (strcmp(key+1, GNT_KEY_DOWN)) + gnt_text_view_scroll(GNT_TEXT_VIEW(view), -1); + } + + return FALSE; +} + +int main() +{ + GntWidget *hbox, *entry, *view; + + freopen(".error", "w", stderr); + + gnt_init(); + + box(stdscr, 0, 0); + wrefresh(stdscr); + + hbox = gnt_box_new(FALSE, TRUE); + gnt_widget_set_name(hbox, "hbox"); + gnt_box_set_toplevel(GNT_BOX(hbox), TRUE); + gnt_box_set_title(GNT_BOX(hbox), "Textview test"); + + entry = gnt_entry_new(NULL); + gnt_widget_set_name(entry, "entry"); + GNT_WIDGET_SET_FLAGS(entry, GNT_WIDGET_CAN_TAKE_FOCUS); + + view = gnt_text_view_new(); + gnt_widget_set_name(view, "view"); + + gnt_widget_set_size(view, getmaxx(stdscr) - 3, 15); + gnt_widget_set_size(entry, getmaxx(stdscr) - 3, 1); + + gnt_box_add_widget(GNT_BOX(hbox), view); + gnt_box_add_widget(GNT_BOX(hbox), entry); + + gnt_widget_show(hbox); + + g_signal_connect(G_OBJECT(entry), "key_pressed", G_CALLBACK(key_pressed), view); + + gnt_main(); + + return 0; +} + Property changes on: trunk/console/libgnt/test/tv.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-06-28 00:17:45
|
Revision: 16362 Author: sadrul Date: 2006-06-27 17:17:35 -0700 (Tue, 27 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16362&view=rev Log Message: ----------- New widget GntTextView. It's really simple as it is. But it 'works'. Modified Paths: -------------- trunk/console/libgnt/Makefile trunk/console/libgnt/gntbox.c trunk/console/libgnt/gntcolors.c trunk/console/libgnt/gntentry.c trunk/console/libgnt/gntentry.h trunk/console/libgnt/gnttree.c trunk/console/libgnt/gntwidget.c Added Paths: ----------- trunk/console/libgnt/gnttextview.c trunk/console/libgnt/gnttextview.h Modified: trunk/console/libgnt/Makefile =================================================================== --- trunk/console/libgnt/Makefile 2006-06-27 21:55:47 UTC (rev 16361) +++ trunk/console/libgnt/Makefile 2006-06-28 00:17:35 UTC (rev 16362) @@ -8,6 +8,7 @@ gntcolors.h \ gntentry.h \ gntlabel.h \ + gnttextview.h \ gnttree.h \ gntutils.h \ gnt.h @@ -19,6 +20,7 @@ gntcolors.c \ gntentry.c \ gntlabel.c \ + gnttextview.c \ gnttree.c \ gntutils.c \ gntmain.c @@ -30,6 +32,7 @@ gntcolors.o \ gntentry.o \ gntlabel.o \ + gnttextview.o \ gnttree.o \ gntutils.o \ gntmain.o @@ -45,6 +48,7 @@ gntcolors.o: gntcolors.c $(HEADERS) gntentry.o: gntentry.c $(HEADERS) gntlabel.o: gntlabel.c $(HEADERS) +gnttextview.o: gnttextview.c $(HEADERS) gnttree.o: gnttree.c $(HEADERS) gntutils.o: gntutils.c $(HEADERS) gntmain.o: gntmain.c $(HEADERS) Modified: trunk/console/libgnt/gntbox.c =================================================================== --- trunk/console/libgnt/gntbox.c 2006-06-27 21:55:47 UTC (rev 16361) +++ trunk/console/libgnt/gntbox.c 2006-06-28 00:17:35 UTC (rev 16362) @@ -374,11 +374,17 @@ GList *iter; GntWidget *widget = GNT_WIDGET(box); + /* XXX: werase first? */ + for (iter = box->list; iter; iter = iter->next) { GntWidget *w = GNT_WIDGET(iter->data); - copywin(w->window, widget->window, 0, 0, w->priv.y - widget->priv.y, w->priv.x - widget->priv.x, - w->priv.height, w->priv.width, FALSE); + copywin(w->window, widget->window, 0, 0, + w->priv.y - widget->priv.y, + w->priv.x - widget->priv.x, + w->priv.y - widget->priv.y + w->priv.height - 1, + w->priv.x - widget->priv.x + w->priv.width - 1, + FALSE); } } Modified: trunk/console/libgnt/gntcolors.c =================================================================== --- trunk/console/libgnt/gntcolors.c 2006-06-27 21:55:47 UTC (rev 16361) +++ trunk/console/libgnt/gntcolors.c 2006-06-28 00:17:35 UTC (rev 16362) @@ -20,14 +20,16 @@ init_pair(GNT_COLOR_SHADOW, GNT_COLOR_BLACK, GNT_COLOR_DARK_GRAY); init_pair(GNT_COLOR_TITLE, GNT_COLOR_WHITE, GNT_COLOR_DARK_GRAY); init_pair(GNT_COLOR_TEXT_NORMAL, GNT_COLOR_BLACK, GNT_COLOR_GRAY); + init_pair(GNT_COLOR_HIGHLIGHT_D, GNT_COLOR_BLACK, GNT_COLOR_GRAY); } else { init_pair(GNT_COLOR_NORMAL, COLOR_BLACK, COLOR_WHITE); - init_pair(GNT_COLOR_HIGHLIGHT, COLOR_CYAN, COLOR_BLACK); + init_pair(GNT_COLOR_HIGHLIGHT, COLOR_YELLOW, COLOR_BLACK); init_pair(GNT_COLOR_SHADOW, COLOR_BLACK, COLOR_BLACK); init_pair(GNT_COLOR_TITLE, COLOR_WHITE, COLOR_BLACK); init_pair(GNT_COLOR_TEXT_NORMAL, COLOR_BLACK, COLOR_WHITE); + init_pair(GNT_COLOR_HIGHLIGHT_D, COLOR_CYAN, COLOR_BLACK); } } Modified: trunk/console/libgnt/gntentry.c =================================================================== --- trunk/console/libgnt/gntentry.c 2006-06-27 21:55:47 UTC (rev 16361) +++ trunk/console/libgnt/gntentry.c 2006-06-28 00:17:35 UTC (rev 16362) @@ -29,8 +29,12 @@ gnt_entry_size_request(GntWidget *widget) { GntEntry *entry = GNT_ENTRY(widget); - widget->priv.height = 1; - widget->priv.width = 20; + + if (!GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_MAPPED)) + { + widget->priv.height = 1; + widget->priv.width = 20; + } } static void @@ -41,6 +45,13 @@ DEBUG; } +static void +entry_redraw(GntWidget *widget) +{ + gnt_entry_draw(widget); + gnt_widget_queue_update(widget); +} + static gboolean gnt_entry_key_pressed(GntWidget *widget, const char *text) { @@ -52,21 +63,21 @@ { memmove(entry->cursor, entry->cursor + 1, entry->end - entry->cursor + 1); entry->end--; - gnt_entry_draw(widget); + entry_redraw(widget); } else if (strcmp(text + 1, GNT_KEY_LEFT) == 0 && entry->cursor > entry->start) { entry->cursor--; if (entry->cursor < entry->scroll) entry->scroll--; - gnt_entry_draw(widget); + entry_redraw(widget); } else if (strcmp(text + 1, GNT_KEY_RIGHT) == 0 && entry->cursor < entry->end) { entry->cursor++; if (entry->cursor - entry->scroll > widget->priv.width) entry->scroll++; - gnt_entry_draw(widget); + entry_redraw(widget); } /* XXX: handle other keys, like home/end, and ctrl+ goodness */ } @@ -106,7 +117,8 @@ if (entry->cursor - entry->scroll > widget->priv.width) entry->scroll++; } - gnt_entry_draw(widget); + entry_redraw(widget); + return TRUE; } else { @@ -120,7 +132,7 @@ if (entry->scroll > entry->start) entry->scroll--; - gnt_entry_draw(widget); + entry_redraw(widget); } } } @@ -233,7 +245,8 @@ entry->scroll = entry->start + scroll; entry->cursor = entry->end - cursor; - /* XXX: redraw if necessary? */ + if (GNT_WIDGET_IS_FLAG_SET(GNT_WIDGET(entry), GNT_WIDGET_MAPPED)) + entry_redraw(GNT_WIDGET(entry)); } void gnt_entry_set_max(GntEntry *entry, int max) @@ -247,3 +260,16 @@ /* XXX: Check the existing string to make sure the flags are respected? */ } +const char *gnt_entry_get_text(GntEntry *entry) +{ + return entry->start; +} + +void gnt_entry_clear(GntEntry *entry) +{ + gnt_entry_set_text(entry, NULL); + entry->scroll = entry->cursor = entry->end = entry->start; + entry_redraw(GNT_WIDGET(entry)); +} + + Modified: trunk/console/libgnt/gntentry.h =================================================================== --- trunk/console/libgnt/gntentry.h 2006-06-27 21:55:47 UTC (rev 16361) +++ trunk/console/libgnt/gntentry.h 2006-06-28 00:17:35 UTC (rev 16362) @@ -69,10 +69,15 @@ void gnt_entry_set_max(GntEntry *entry, int max); +/* XXX: For now, call gnt_entry_clear before calling this */ void gnt_entry_set_text(GntEntry *entry, const char *text); void gnt_entry_set_flag(GntEntry *entry, GntEntryFlag flag); +const char *gnt_entry_get_text(GntEntry *entry); + +void gnt_entry_clear(GntEntry *entry); + G_END_DECLS #endif /* GNT_ENTRY_H */ Added: trunk/console/libgnt/gnttextview.c =================================================================== --- trunk/console/libgnt/gnttextview.c (rev 0) +++ trunk/console/libgnt/gnttextview.c 2006-06-28 00:17:35 UTC (rev 16362) @@ -0,0 +1,177 @@ +#include "gnttextview.h" + +enum +{ + SIGS = 1, +}; + +static GntWidgetClass *parent_class = NULL; +static guint signals[SIGS] = { 0 }; + +static void +gnt_text_view_draw(GntWidget *widget) +{ + GntTextView *view = GNT_TEXT_VIEW(widget); + + copywin(view->scroll, widget->window, view->pos, 0, 0, 0, + widget->priv.height - 1, widget->priv.width - 1, FALSE); + + DEBUG; +} + +static void +gnt_text_view_size_request(GntWidget *widget) +{ + if (!GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_MAPPED)) + { + gnt_widget_set_size(widget, 64, 24); + } +} + +static void +gnt_text_view_map(GntWidget *widget) +{ + if (widget->priv.width == 0 || widget->priv.height == 0) + gnt_widget_size_request(widget); + DEBUG; +} + +static gboolean +gnt_text_view_key_pressed(GntWidget *widget, const char *text) +{ + return FALSE; +} + +static void +gnt_text_view_destroy(GntWidget *widget) +{ +} + +static void +gnt_text_view_class_init(GntTextViewClass *klass) +{ + GObjectClass *obj_class = G_OBJECT_CLASS(klass); + + parent_class = GNT_WIDGET_CLASS(klass); + parent_class->destroy = gnt_text_view_destroy; + parent_class->draw = gnt_text_view_draw; + parent_class->map = gnt_text_view_map; + parent_class->size_request = gnt_text_view_size_request; + parent_class->key_pressed = gnt_text_view_key_pressed; + + DEBUG; +} + +static void +gnt_text_view_init(GTypeInstance *instance, gpointer class) +{ + DEBUG; +} + +/****************************************************************************** + * GntTextView API + *****************************************************************************/ +GType +gnt_text_view_get_gtype(void) +{ + static GType type = 0; + + if(type == 0) + { + static const GTypeInfo info = { + sizeof(GntTextViewClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc)gnt_text_view_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof(GntTextView), + 0, /* n_preallocs */ + gnt_text_view_init, /* instance_init */ + }; + + type = g_type_register_static(GNT_TYPE_WIDGET, + "GntTextView", + &info, 0); + } + + return type; +} + +GntWidget *gnt_text_view_new() +{ + GntWidget *widget = g_object_new(GNT_TYPE_TEXTVIEW, NULL); + GntTextView *view = GNT_TEXT_VIEW(widget); + + view->scroll = newwin(255, widget->priv.width, widget->priv.y, widget->priv.x); + scrollok(view->scroll, TRUE); + wsetscrreg(view->scroll, 0, 254); + wbkgd(view->scroll, COLOR_PAIR(GNT_COLOR_NORMAL)); + werase(view->scroll); + GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_NO_BORDER); + + return widget; +} + +void gnt_text_view_append_text_with_flags(GntTextView *view, const char *text, GntTextViewFlags flags) +{ + GntWidget *widget = GNT_WIDGET(view); + int fl = 0; + char **split; + int i; + + if (text == NULL || *text == '\0') + return; + + if (flags & GNT_TEXT_FLAG_BOLD) + fl |= A_BOLD; + if (flags & GNT_TEXT_FLAG_UNDERLINE) + fl |= A_UNDERLINE; + if (flags & GNT_TEXT_FLAG_BLINK) + fl |= A_BLINK; + + wattrset(view->scroll, fl | COLOR_PAIR(GNT_COLOR_NORMAL)); + + split = g_strsplit(text, "\n", 0); + for (i = 0; split[i + 1]; i++) + { + /* XXX: Do something if the strlen of split[i] is big + * enough to cause the text to wrap. */ + wprintw(view->scroll, "%s\n", split[i]); + view->lines++; + } + wprintw(view->scroll, "%s", split[i]); + g_strfreev(split); + + gnt_widget_draw(widget); +} + +void gnt_text_view_scroll(GntTextView *view, int scroll) +{ + GntWidget *widget = GNT_WIDGET(view); + int height; + + if (scroll == 0) + { + view->pos = view->lines - widget->priv.height + 1; + } + else + { + view->pos += scroll; + } + + if (view->pos + (height = widget->priv.height) > view->lines) + view->pos = view->lines - height + 1; + + if (view->pos < 0) + view->pos = 0; + + gnt_widget_draw(GNT_WIDGET(view)); +} + +void gnt_text_view_next_line(GntTextView *view) +{ + wclrtoeol(view->scroll); + gnt_text_view_append_text_with_flags(view, "\n", 0); +} + Property changes on: trunk/console/libgnt/gnttextview.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/console/libgnt/gnttextview.h =================================================================== --- trunk/console/libgnt/gnttextview.h (rev 0) +++ trunk/console/libgnt/gnttextview.h 2006-06-28 00:17:35 UTC (rev 16362) @@ -0,0 +1,69 @@ +#ifndef GNT_TEXT_VIEW_H +#define GNT_TEXT_VIEW_H + +#include "gntwidget.h" +#include "gnt.h" +#include "gntcolors.h" +#include "gntkeys.h" + +#define GNT_TYPE_TEXTVIEW (gnt_text_view_get_gtype()) +#define GNT_TEXT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_TEXTVIEW, GntTextView)) +#define GNT_TEXT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_TEXTVIEW, GntTextViewClass)) +#define GNT_IS_TEXTVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_TEXTVIEW)) +#define GNT_IS_TEXTVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_TEXTVIEW)) +#define GNT_TEXT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_TEXTVIEW, GntTextViewClass)) + +#define GNT_TEXT_VIEW_FLAGS(obj) (GNT_TEXT_VIEW(obj)->priv.flags) +#define GNT_TEXT_VIEW_SET_FLAGS(obj, flags) (GNT_TEXT_VIEW_FLAGS(obj) |= flags) +#define GNT_TEXT_VIEW_UNSET_FLAGS(obj, flags) (GNT_TEXT_VIEW_FLAGS(obj) &= ~(flags)) + +typedef struct _GnTextView GntTextView; +typedef struct _GnTextViewPriv GntTextViewPriv; +typedef struct _GnTextViewClass GntTextViewClass; + +struct _GnTextView +{ + GntWidget parent; + + WINDOW *scroll; /* XXX: For now, let's do with this. */ + int pos; /* Scroll position. */ + int lines; /* No. of lines of text. */ +}; + +typedef enum +{ + GNT_TEXT_FLAG_BOLD = 1 << 0, + GNT_TEXT_FLAG_UNDERLINE = 1 << 1, + GNT_TEXT_FLAG_BLINK = 1 << 2, +} GntTextViewFlags; + +struct _GnTextViewClass +{ + GntWidgetClass parent; + + void (*gnt_reserved1)(void); + void (*gnt_reserved2)(void); + void (*gnt_reserved3)(void); + void (*gnt_reserved4)(void); +}; + +G_BEGIN_DECLS + +GType gnt_text_view_get_gtype(void); + +/* XXX: For now, don't set a textview to have any border. + * If you want borders real bad, put it in a box. */ +GntWidget *gnt_text_view_new(); + +/* scroll > 0 means scroll up, < 0 means scroll down, == 0 means scroll to the end */ +void gnt_text_view_scroll(GntTextView *view, int scroll); + +void gnt_text_view_append_text_with_flags(GntTextView *view, const char *text, GntTextViewFlags flags); + +/* Move the cursor to the beginning of the next line and resets text-attributes. + * It first completes the current line with the current text-attributes. */ +void gnt_text_view_next_line(GntTextView *view); + +G_END_DECLS + +#endif /* GNT_TEXT_VIEW_H */ Property changes on: trunk/console/libgnt/gnttextview.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Modified: trunk/console/libgnt/gnttree.c =================================================================== --- trunk/console/libgnt/gnttree.c 2006-06-27 21:55:47 UTC (rev 16361) +++ trunk/console/libgnt/gnttree.c 2006-06-28 00:17:35 UTC (rev 16362) @@ -203,7 +203,10 @@ if (row == tree->current) { - wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_HIGHLIGHT)); + if (GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_HAS_FOCUS)) + wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_HIGHLIGHT)); + else + wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_HIGHLIGHT_D)); /* XXX: This, somehow, doesn't work */ mvwprintw(widget->window, start, pos, str); wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_NORMAL)); } Modified: trunk/console/libgnt/gntwidget.c =================================================================== --- trunk/console/libgnt/gntwidget.c 2006-06-27 21:55:47 UTC (rev 16361) +++ trunk/console/libgnt/gntwidget.c 2006-06-28 00:17:35 UTC (rev 16362) @@ -267,13 +267,13 @@ widget->window = newwin(widget->priv.height, widget->priv.width, widget->priv.y, widget->priv.x); wbkgd(widget->window, COLOR_PAIR(GNT_COLOR_NORMAL)); + + if (!(GNT_WIDGET_FLAGS(widget) & GNT_WIDGET_NO_BORDER)) + box(widget->window, 0, 0); + else + werase(widget->window); } - if (!(GNT_WIDGET_FLAGS(widget) & GNT_WIDGET_NO_BORDER)) - box(widget->window, 0, 0); - else - werase(widget->window); - #if 0 /* XXX: No shadow for now :( */ if (!(GNT_WIDGET_FLAGS(widget) & GNT_WIDGET_NO_SHADOW)) @@ -358,6 +358,7 @@ { widget->priv.width = width; widget->priv.height = height; + GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_MAPPED); } gboolean This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ebl...@us...> - 2006-06-27 21:55:56
|
Revision: 16361 Author: eblanton Date: 2006-06-27 14:55:47 -0700 (Tue, 27 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16361&view=rev Log Message: ----------- ------------------------------------------------------------------------ r16360 | eblanton | 2006-06-27 17:54:44 -0400 (Tue, 27 Jun 2006) | 1 line IRC support for CTCP VERSION from Andrej Krivul?\196?\141?\195?\173k ------------------------------------------------------------------------ Modified Paths: -------------- trunk/ChangeLog trunk/src/protocols/irc/cmds.c trunk/src/protocols/irc/irc.h trunk/src/protocols/irc/parse.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-06-27 21:54:44 UTC (rev 16360) +++ trunk/ChangeLog 2006-06-27 21:55:47 UTC (rev 16361) @@ -130,6 +130,7 @@ channel or change your nick * Added /nickserv, /memoserv, /chanserv and /operserv commands (Joao Luís Marques Pinto) + * Added CTCP VERSION via /version (Andrej Krivulčík) Jabber Features: * Support for SRV lookups Modified: trunk/src/protocols/irc/cmds.c =================================================================== --- trunk/src/protocols/irc/cmds.c 2006-06-27 21:54:44 UTC (rev 16360) +++ trunk/src/protocols/irc/cmds.c 2006-06-27 21:55:47 UTC (rev 16361) @@ -127,6 +127,21 @@ return 1; } +int irc_cmd_ctcp_version(struct irc_conn *irc, const char *cmd, const char *target, const char **args) +{ + char *buf; + + + if (!args || !args[0]) + return 0; + + buf = irc_format(irc, "vn:", "PRIVMSG", args[0], "\001VERSION\001"); + irc_send(irc, buf); + g_free(buf); + + return 0; +} + int irc_cmd_invite(struct irc_conn *irc, const char *cmd, const char *target, const char **args) { char *buf; Modified: trunk/src/protocols/irc/irc.h =================================================================== --- trunk/src/protocols/irc/irc.h 2006-06-27 21:54:44 UTC (rev 16360) +++ trunk/src/protocols/irc/irc.h 2006-06-27 21:55:47 UTC (rev 16361) @@ -152,6 +152,7 @@ int irc_cmd_default(struct irc_conn *irc, const char *cmd, const char *target, const char **args); int irc_cmd_away(struct irc_conn *irc, const char *cmd, const char *target, const char **args); int irc_cmd_ctcp_action(struct irc_conn *irc, const char *cmd, const char *target, const char **args); +int irc_cmd_ctcp_version(struct irc_conn *irc, const char *cmd, const char *target, const char **args); int irc_cmd_invite(struct irc_conn *irc, const char *cmd, const char *target, const char **args); int irc_cmd_join(struct irc_conn *irc, const char *cmd, const char *target, const char **args); int irc_cmd_kick(struct irc_conn *irc, const char *cmd, const char *target, const char **args); Modified: trunk/src/protocols/irc/parse.c =================================================================== --- trunk/src/protocols/irc/parse.c 2006-06-27 21:54:44 UTC (rev 16360) +++ trunk/src/protocols/irc/parse.c 2006-06-27 21:55:47 UTC (rev 16361) @@ -140,6 +140,7 @@ { "time", "", irc_cmd_time, N_("time: Displays the current local time at the IRC server.") }, { "topic", ":", irc_cmd_topic, N_("topic [new topic]: View or change the channel topic.") }, { "umode", ":", irc_cmd_mode, N_("umode <+|-><A-Za-z>: Set or unset a user mode.") }, + { "version", ":", irc_cmd_ctcp_version, N_("version [nick]: send CTCP VERSION request to a user") }, { "voice", ":", irc_cmd_op, N_("voice <nick1> [nick2] ...: Grant channel voice status to someone. You must be a channel operator to do this.") }, { "wallops", ":", irc_cmd_wallops, N_("wallops <message>: If you don't know what this is, you probably can't use it.") }, { "whois", "tt", irc_cmd_whois, N_("whois [server] <nick>: Get information on a user.") }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ebl...@us...> - 2006-06-27 21:54:53
|
Revision: 16360 Author: eblanton Date: 2006-06-27 14:54:44 -0700 (Tue, 27 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16360&view=rev Log Message: ----------- IRC support for CTCP VERSION from Andrej Krivul?\196?\141?\195?\173k Modified Paths: -------------- branches/v2_0_0/ChangeLog branches/v2_0_0/src/protocols/irc/cmds.c branches/v2_0_0/src/protocols/irc/irc.h branches/v2_0_0/src/protocols/irc/parse.c Modified: branches/v2_0_0/ChangeLog =================================================================== --- branches/v2_0_0/ChangeLog 2006-06-27 16:29:17 UTC (rev 16359) +++ branches/v2_0_0/ChangeLog 2006-06-27 21:54:44 UTC (rev 16360) @@ -130,6 +130,7 @@ channel or change your nick * Added /nickserv, /memoserv, /chanserv and /operserv commands (Joao Luís Marques Pinto) + * Added CTCP VERSION via /version (Andrej Krivulčík) Jabber Features: * Support for SRV lookups Modified: branches/v2_0_0/src/protocols/irc/cmds.c =================================================================== --- branches/v2_0_0/src/protocols/irc/cmds.c 2006-06-27 16:29:17 UTC (rev 16359) +++ branches/v2_0_0/src/protocols/irc/cmds.c 2006-06-27 21:54:44 UTC (rev 16360) @@ -127,6 +127,21 @@ return 1; } +int irc_cmd_ctcp_version(struct irc_conn *irc, const char *cmd, const char *target, const char **args) +{ + char *buf; + + + if (!args || !args[0]) + return 0; + + buf = irc_format(irc, "vn:", "PRIVMSG", args[0], "\001VERSION\001"); + irc_send(irc, buf); + g_free(buf); + + return 0; +} + int irc_cmd_invite(struct irc_conn *irc, const char *cmd, const char *target, const char **args) { char *buf; Modified: branches/v2_0_0/src/protocols/irc/irc.h =================================================================== --- branches/v2_0_0/src/protocols/irc/irc.h 2006-06-27 16:29:17 UTC (rev 16359) +++ branches/v2_0_0/src/protocols/irc/irc.h 2006-06-27 21:54:44 UTC (rev 16360) @@ -152,6 +152,7 @@ int irc_cmd_default(struct irc_conn *irc, const char *cmd, const char *target, const char **args); int irc_cmd_away(struct irc_conn *irc, const char *cmd, const char *target, const char **args); int irc_cmd_ctcp_action(struct irc_conn *irc, const char *cmd, const char *target, const char **args); +int irc_cmd_ctcp_version(struct irc_conn *irc, const char *cmd, const char *target, const char **args); int irc_cmd_invite(struct irc_conn *irc, const char *cmd, const char *target, const char **args); int irc_cmd_join(struct irc_conn *irc, const char *cmd, const char *target, const char **args); int irc_cmd_kick(struct irc_conn *irc, const char *cmd, const char *target, const char **args); Modified: branches/v2_0_0/src/protocols/irc/parse.c =================================================================== --- branches/v2_0_0/src/protocols/irc/parse.c 2006-06-27 16:29:17 UTC (rev 16359) +++ branches/v2_0_0/src/protocols/irc/parse.c 2006-06-27 21:54:44 UTC (rev 16360) @@ -140,6 +140,7 @@ { "time", "", irc_cmd_time, N_("time: Displays the current local time at the IRC server.") }, { "topic", ":", irc_cmd_topic, N_("topic [new topic]: View or change the channel topic.") }, { "umode", ":", irc_cmd_mode, N_("umode <+|-><A-Za-z>: Set or unset a user mode.") }, + { "version", ":", irc_cmd_ctcp_version, N_("version [nick]: send CTCP VERSION request to a user") }, { "voice", ":", irc_cmd_op, N_("voice <nick1> [nick2] ...: Grant channel voice status to someone. You must be a channel operator to do this.") }, { "wallops", ":", irc_cmd_wallops, N_("wallops <message>: If you don't know what this is, you probably can't use it.") }, { "whois", "tt", irc_cmd_whois, N_("whois [server] <nick>: Get information on a user.") }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-27 16:29:19
|
Revision: 16359 Author: thekingant Date: 2006-06-27 09:29:17 -0700 (Tue, 27 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16359&view=rev Log Message: ----------- Backport SVN revision #16358 from HEAD To v2_0_0 Original commit message: Fix an assertion failure when adding a buddy to your buddy list and you have an open conversation with that buddy and you don't have an icon for them. ViewCVS Links: ------------- http://svn.sourceforge.net/gaim/?rev=16358&view=rev Modified Paths: -------------- branches/v2_0_0/src/gtkblist.c Modified: branches/v2_0_0/src/gtkblist.c =================================================================== --- branches/v2_0_0/src/gtkblist.c 2006-06-27 16:28:20 UTC (rev 16358) +++ branches/v2_0_0/src/gtkblist.c 2006-06-27 16:29:17 UTC (rev 16359) @@ -4461,9 +4461,10 @@ add_buddy_cb(GtkWidget *w, int resp, GaimGtkAddBuddyData *data) { const char *grp, *who, *whoalias; + GaimGroup *g; + GaimBuddy *b; GaimConversation *c; - GaimBuddy *b; - GaimGroup *g; + GaimBuddyIcon *icon; if (resp == GTK_RESPONSE_OK) { @@ -4500,7 +4501,9 @@ c = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, who, data->account); if (c != NULL) { - gaim_buddy_icon_update(gaim_conv_im_get_icon(GAIM_CONV_IM(c))); + icon = gaim_conv_im_get_icon(GAIM_CONV_IM(c)); + if (icon != NULL) + gaim_buddy_icon_update(icon); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-27 16:28:27
|
Revision: 16358 Author: thekingant Date: 2006-06-27 09:28:20 -0700 (Tue, 27 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16358&view=rev Log Message: ----------- Fix an assertion failure when adding a buddy to your buddy list and you have an open conversation with that buddy and you don't have an icon for them. Modified Paths: -------------- trunk/src/gtkblist.c Modified: trunk/src/gtkblist.c =================================================================== --- trunk/src/gtkblist.c 2006-06-27 06:52:23 UTC (rev 16357) +++ trunk/src/gtkblist.c 2006-06-27 16:28:20 UTC (rev 16358) @@ -4461,9 +4461,10 @@ add_buddy_cb(GtkWidget *w, int resp, GaimGtkAddBuddyData *data) { const char *grp, *who, *whoalias; + GaimGroup *g; + GaimBuddy *b; GaimConversation *c; - GaimBuddy *b; - GaimGroup *g; + GaimBuddyIcon *icon; if (resp == GTK_RESPONSE_OK) { @@ -4500,7 +4501,9 @@ c = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, who, data->account); if (c != NULL) { - gaim_buddy_icon_update(gaim_conv_im_get_icon(GAIM_CONV_IM(c))); + icon = gaim_conv_im_get_icon(GAIM_CONV_IM(c)); + if (icon != NULL) + gaim_buddy_icon_update(icon); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-27 06:52:29
|
Revision: 16357 Author: thekingant Date: 2006-06-26 23:52:23 -0700 (Mon, 26 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16357&view=rev Log Message: ----------- Backport SVN revision #16356 from HEAD to v2_0_0 Original commit message: Fix coverity CID #200: Remove unused code ViewCVS Links: ------------- http://svn.sourceforge.net/gaim/?rev=16356&view=rev Modified Paths: -------------- branches/v2_0_0/src/protocols/yahoo/yahoo.c Modified: branches/v2_0_0/src/protocols/yahoo/yahoo.c =================================================================== --- branches/v2_0_0/src/protocols/yahoo/yahoo.c 2006-06-27 06:50:52 UTC (rev 16356) +++ branches/v2_0_0/src/protocols/yahoo/yahoo.c 2006-06-27 06:52:23 UTC (rev 16357) @@ -2676,7 +2676,6 @@ struct yahoo_data *yd; YahooFriend *f; GaimPresence *presence; - GaimStatus *status; if (!b || !(account = b->account) || !(gc = gaim_account_get_connection(account)) || !(yd = gc->proto_data)) @@ -2689,7 +2688,6 @@ } presence = gaim_buddy_get_presence(b); - status = gaim_presence_get_active_status(presence); if (gaim_presence_is_online(presence) == FALSE) { *se = "offline"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-27 06:50:55
|
Revision: 16356 Author: thekingant Date: 2006-06-26 23:50:52 -0700 (Mon, 26 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16356&view=rev Log Message: ----------- Fix coverity CID #200: Remove unused code Modified Paths: -------------- trunk/src/protocols/yahoo/yahoo.c Modified: trunk/src/protocols/yahoo/yahoo.c =================================================================== --- trunk/src/protocols/yahoo/yahoo.c 2006-06-27 02:33:55 UTC (rev 16355) +++ trunk/src/protocols/yahoo/yahoo.c 2006-06-27 06:50:52 UTC (rev 16356) @@ -2676,7 +2676,6 @@ struct yahoo_data *yd; YahooFriend *f; GaimPresence *presence; - GaimStatus *status; if (!b || !(account = b->account) || !(gc = gaim_account_get_connection(account)) || !(yd = gc->proto_data)) @@ -2689,7 +2688,6 @@ } presence = gaim_buddy_get_presence(b); - status = gaim_presence_get_active_status(presence); if (gaim_presence_is_online(presence) == FALSE) { *se = "offline"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-06-27 02:34:06
|
Revision: 16355 Author: sadrul Date: 2006-06-26 19:33:55 -0700 (Mon, 26 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16355&view=rev Log Message: ----------- Change the behaviour of the widgets about how they update themselves. This makes things a little better, and hopefully easier to build more stuff on top of this. Modified Paths: -------------- trunk/console/libgnt/gnt.h trunk/console/libgnt/gntbox.c trunk/console/libgnt/gntbox.h trunk/console/libgnt/gntbutton.c trunk/console/libgnt/gntentry.c trunk/console/libgnt/gntlabel.c trunk/console/libgnt/gntmain.c trunk/console/libgnt/gnttree.c trunk/console/libgnt/gntwidget.c trunk/console/libgnt/gntwidget.h Modified: trunk/console/libgnt/gnt.h =================================================================== --- trunk/console/libgnt/gnt.h 2006-06-26 19:54:53 UTC (rev 16354) +++ trunk/console/libgnt/gnt.h 2006-06-27 02:33:55 UTC (rev 16355) @@ -11,3 +11,4 @@ void gnt_screen_release(GntWidget *widget); +void gnt_scree_update(GntWidget *widget); Modified: trunk/console/libgnt/gntbox.c =================================================================== --- trunk/console/libgnt/gntbox.c 2006-06-26 19:54:53 UTC (rev 16354) +++ trunk/console/libgnt/gntbox.c 2006-06-27 02:33:55 UTC (rev 16355) @@ -12,15 +12,11 @@ gnt_box_draw(GntWidget *widget) { GntBox *box = GNT_BOX(widget); - GList *iter; - for (iter = box->list; iter; iter = iter->next) - { - GntWidget *w = GNT_WIDGET(iter->data); - gnt_widget_draw(w); - overwrite(w->window, widget->window); - } + g_list_foreach(box->list, (GFunc)gnt_widget_draw, NULL); + gnt_box_sync_children(box); + if (box->title) { gchar *title = g_strdup(box->title); @@ -40,9 +36,6 @@ mvwprintw(widget->window, 0, pos, title); g_free(title); } - wrefresh(widget->window); - - gnt_screen_occupy(widget); DEBUG; } @@ -376,3 +369,16 @@ GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW); } +void gnt_box_sync_children(GntBox *box) +{ + GList *iter; + GntWidget *widget = GNT_WIDGET(box); + + for (iter = box->list; iter; iter = iter->next) + { + GntWidget *w = GNT_WIDGET(iter->data); + copywin(w->window, widget->window, 0, 0, w->priv.y - widget->priv.y, w->priv.x - widget->priv.x, + w->priv.height, w->priv.width, FALSE); + } +} + Modified: trunk/console/libgnt/gntbox.h =================================================================== --- trunk/console/libgnt/gntbox.h 2006-06-26 19:54:53 UTC (rev 16354) +++ trunk/console/libgnt/gntbox.h 2006-06-27 02:33:55 UTC (rev 16355) @@ -57,6 +57,8 @@ void gnt_box_set_toplevel(GntBox *box, gboolean set); +void gnt_box_sync_children(GntBox *box); + G_END_DECLS #endif /* GNT_BOX_H */ Modified: trunk/console/libgnt/gntbutton.c =================================================================== --- trunk/console/libgnt/gntbutton.c 2006-06-26 19:54:53 UTC (rev 16354) +++ trunk/console/libgnt/gntbutton.c 2006-06-27 02:33:55 UTC (rev 16355) @@ -21,8 +21,6 @@ wbkgdset(widget->window, '\0' | COLOR_PAIR(type)); mvwprintw(widget->window, 1, 1, button->priv->text); - wrefresh(widget->window); - DEBUG; } Modified: trunk/console/libgnt/gntentry.c =================================================================== --- trunk/console/libgnt/gntentry.c 2006-06-26 19:54:53 UTC (rev 16354) +++ trunk/console/libgnt/gntentry.c 2006-06-27 02:33:55 UTC (rev 16355) @@ -22,8 +22,6 @@ if (stop < widget->priv.width) mvwhline(widget->window, 0, stop, ENTRY_CHAR, widget->priv.width - stop); - wrefresh(widget->window); - DEBUG; } Modified: trunk/console/libgnt/gntlabel.c =================================================================== --- trunk/console/libgnt/gntlabel.c 2006-06-26 19:54:53 UTC (rev 16354) +++ trunk/console/libgnt/gntlabel.c 2006-06-27 02:33:55 UTC (rev 16355) @@ -24,7 +24,6 @@ wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_NORMAL)); mvwprintw(widget->window, 0, 0, label->text); - wrefresh(widget->window); DEBUG; } Modified: trunk/console/libgnt/gntmain.c =================================================================== --- trunk/console/libgnt/gntmain.c 2006-06-26 19:54:53 UTC (rev 16354) +++ trunk/console/libgnt/gntmain.c 2006-06-27 02:33:55 UTC (rev 16355) @@ -142,6 +142,8 @@ if (value == NULL) return; + if (n->me == nu->me) + return; if (n->me->priv.x + n->me->priv.width < nu->me->priv.x) return; @@ -153,15 +155,24 @@ if (nu->me->priv.y + nu->me->priv.height < n->me->priv.y) return; - n->above = g_list_prepend(n->above, nu->me); - nu->below = g_list_prepend(nu->below, n->me); + n->above = g_list_prepend(n->above, nu); + nu->below = g_list_prepend(nu->below, n); } void gnt_screen_occupy(GntWidget *widget) { - /* XXX: what happens if this is called more than once for the same widget? - * perhaps _release first? */ - GntNode *node = g_new0(GntNode, 1); + GntNode *node; + + if (widget->parent) + { + while (widget->parent) + widget = widget->parent; + } + + if (g_hash_table_lookup(nodes, widget)) + return; /* XXX: perhaps _update instead? */ + + node = g_new0(GntNode, 1); node->me = widget; g_hash_table_foreach(nodes, check_intersection, node); @@ -170,16 +181,21 @@ void gnt_screen_release(GntWidget *widget) { + WINDOW *win; GList *iter; GntNode *node = g_hash_table_lookup(nodes, widget); if (node == NULL || node->below == NULL) /* Yay! Nothing to do. */ return; + win = dupwin(widget->window); + werase(win); + /* XXX: This is not going to work. * It will be necessary to build a topology and go from there. */ for (iter = node->below; iter; iter = iter->next) { - GntWidget *w = iter->data; + GntNode *n = iter->data; + GntWidget *w = n->me; int left, right, top, bottom; left = MAX(widget->priv.x, w->priv.x) - w->priv.x; @@ -188,9 +204,61 @@ top = MAX(widget->priv.y, w->priv.y) - w->priv.y; bottom = MIN(widget->priv.y + widget->priv.height, w->priv.y + w->priv.height) - w->priv.y; - gnt_widget_expose(w, left, top, right - left, bottom - top); + copywin(w->window, win, top, left, + w->priv.y + top, + w->priv.x + left, + w->priv.y + bottom - top - 1, + w->priv.x + right - left - 1, FALSE); + n->above = g_list_remove(n->above, node); } + wrefresh(win); + delwin(win); + g_hash_table_remove(nodes, widget); } +void gnt_screen_update(GntWidget *widget) +{ + GList *iter; + WINDOW *win; + GntNode *node; + + if (widget->parent) + { + while (widget->parent) + widget = widget->parent; + } + + gnt_box_sync_children(widget); + node = g_hash_table_lookup(nodes, widget); + + win = dupwin(widget->window); + + if (node && node->above) + { + /* XXX: Same here: need to build a topology first. */ + for (iter = node->above; iter; iter = iter->next) + { + GntNode *n = iter->data; + GntWidget *w = n->me; + int left, right, top, bottom; + + left = MAX(widget->priv.x, w->priv.x) - w->priv.x; + right = MIN(widget->priv.x + widget->priv.width, w->priv.x + w->priv.width) - w->priv.x; + + top = MAX(widget->priv.y, w->priv.y) - w->priv.y; + bottom = MIN(widget->priv.y + widget->priv.height, w->priv.y + w->priv.height) - w->priv.y; + + copywin(w->window, win, top, left, + w->priv.y + top, + w->priv.x + left, + w->priv.y + bottom - top - 1, + w->priv.x + right - left - 1, FALSE); + } + } + + wrefresh(win); + delwin(win); +} + Modified: trunk/console/libgnt/gnttree.c =================================================================== --- trunk/console/libgnt/gnttree.c 2006-06-26 19:54:53 UTC (rev 16354) +++ trunk/console/libgnt/gnttree.c 2006-06-27 02:33:55 UTC (rev 16355) @@ -219,7 +219,7 @@ start++; } - wrefresh(widget->window); + gnt_widget_queue_update(widget); } static void @@ -231,8 +231,6 @@ scrollok(widget->window, TRUE); wsetscrreg(widget->window, 0, widget->priv.height - 1); - tree->top = tree->root; - redraw_tree(tree); DEBUG; Modified: trunk/console/libgnt/gntwidget.c =================================================================== --- trunk/console/libgnt/gntwidget.c 2006-06-26 19:54:53 UTC (rev 16354) +++ trunk/console/libgnt/gntwidget.c 2006-06-27 02:33:55 UTC (rev 16355) @@ -219,8 +219,15 @@ void gnt_widget_destroy(GntWidget *obj) { + int id; g_return_if_fail(GNT_IS_WIDGET(obj)); + if ((id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(obj), "gnt:queue_update")))) + { + g_source_remove(id); + g_object_set_data(G_OBJECT(obj), "gnt:queue_update", NULL); + } + gnt_widget_hide(obj); delwin(obj->window); if(!(GNT_WIDGET_FLAGS(obj) & GNT_WIDGET_DESTROYING)) @@ -244,24 +251,29 @@ { /* Draw the widget */ DEBUG; + if (GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_DRAWING)) + return; + + GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_DRAWING); if (!(GNT_WIDGET_FLAGS(widget) & GNT_WIDGET_MAPPED)) + { gnt_widget_map(widget); + gnt_screen_occupy(widget); + } - if (widget->window) + if (widget->window == NULL) { - delwin(widget->window); + /* XXX: It may be necessary to make sure the size hasn't changed */ + widget->window = newwin(widget->priv.height, widget->priv.width, + widget->priv.y, widget->priv.x); + wbkgd(widget->window, COLOR_PAIR(GNT_COLOR_NORMAL)); } - - widget->window = newwin(widget->priv.height, widget->priv.width, - widget->priv.y, widget->priv.x); - wbkgd(widget->window, COLOR_PAIR(GNT_COLOR_NORMAL)); + if (!(GNT_WIDGET_FLAGS(widget) & GNT_WIDGET_NO_BORDER)) - { box(widget->window, 0, 0); - } else werase(widget->window); - + #if 0 /* XXX: No shadow for now :( */ if (!(GNT_WIDGET_FLAGS(widget) & GNT_WIDGET_NO_SHADOW)) @@ -276,10 +288,12 @@ touchline(widget->back, 0, widget->priv.height); wrefresh(widget->back); } -#endif wrefresh(widget->window); +#endif g_signal_emit(widget, signals[SIG_DRAW], 0); + gnt_widget_queue_update(widget); + GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_DRAWING); } gboolean @@ -301,16 +315,9 @@ void gnt_widget_hide(GntWidget *widget) { - int i; - - /* XXX: Currently it simply empties the window. Ideally, it will - * detect what windows are immediately beneath this one, and cause - * those windows to redraw themselves by emitting the approrpiate - * expose signal. */ - wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_NORMAL)); werase(widget->window); - wrefresh(widget->window); + gnt_screen_release(widget); } void @@ -387,3 +394,27 @@ g_signal_emit(widget, signals[SIG_ACTIVATE], 0); } +static gboolean +update_queue_callback(gpointer data) +{ + GntWidget *widget = GNT_WIDGET(data); + + if (!g_object_get_data(G_OBJECT(widget), "gnt:queue_update")) + return FALSE; + gnt_screen_update(widget); + g_object_set_data(G_OBJECT(widget), "gnt:queue_update", GINT_TO_POINTER(FALSE)); + return FALSE; +} + +void gnt_widget_queue_update(GntWidget *widget) +{ + while (widget->parent) + widget = widget->parent; + + if (!g_object_get_data(G_OBJECT(widget), "gnt:queue_update")) + { + int id = g_timeout_add(0, update_queue_callback, widget); + g_object_set_data(G_OBJECT(widget), "gnt:queue_update", GINT_TO_POINTER(id)); + } +} + Modified: trunk/console/libgnt/gntwidget.h =================================================================== --- trunk/console/libgnt/gntwidget.h 2006-06-26 19:54:53 UTC (rev 16354) +++ trunk/console/libgnt/gntwidget.h 2006-06-27 02:33:55 UTC (rev 16355) @@ -17,8 +17,7 @@ #define GNT_WIDGET_SET_FLAGS(obj, flags) (GNT_WIDGET_FLAGS(obj) |= flags) #define GNT_WIDGET_UNSET_FLAGS(obj, flags) (GNT_WIDGET_FLAGS(obj) &= ~(flags)) #define GNT_WIDGET_IS_FLAG_SET(obj, flags) (GNT_WIDGET_FLAGS(obj) & (flags)) -#define DEBUG -//#define DEBUG printf("%s\n", __FUNCTION__) +#define DEBUG fprintf(stderr, "%s\n", __FUNCTION__) typedef struct _GnWidget GntWidget; typedef struct _GnWidgetPriv GntWidgetPriv; @@ -28,16 +27,18 @@ typedef enum _GnWidgetFlags { - GNT_WIDGET_DESTROYING = 1 << 0, - GNT_WIDGET_CAN_TAKE_FOCUS= 1 << 1, - GNT_WIDGET_MAPPED = 1 << 2, + GNT_WIDGET_DESTROYING = 1 << 0, + GNT_WIDGET_CAN_TAKE_FOCUS = 1 << 1, + GNT_WIDGET_MAPPED = 1 << 2, /* XXX: Need to set the following two as properties, and setup a callback whenever these * get chnaged. */ - GNT_WIDGET_NO_BORDER = 1 << 3, - GNT_WIDGET_NO_SHADOW = 1 << 4, - GNT_WIDGET_HAS_FOCUS = 1 << 5 + GNT_WIDGET_NO_BORDER = 1 << 3, + GNT_WIDGET_NO_SHADOW = 1 << 4, + GNT_WIDGET_HAS_FOCUS = 1 << 5, + GNT_WIDGET_DRAWING = 1 << 6 } GntWidgetFlags; +/* XXX: I'll have to ask grim what he's using this for in guifications. */ typedef enum _GnParamFlags { GNT_PARAM_SERIALIZABLE = 1 << G_PARAM_USER_SHIFT @@ -112,6 +113,10 @@ void gnt_widget_set_name(GntWidget *widget, const char *name); +/* Widget-subclasses should call this from the draw-callback. + * Applications should just call gnt_widget_draw instead of this. */ +void gnt_widget_queue_update(GntWidget *widget); + G_END_DECLS #endif /* GNT_WIDGET_H */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-06-26 19:55:06
|
Revision: 16354 Author: sadrul Date: 2006-06-26 12:54:53 -0700 (Mon, 26 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16354&view=rev Log Message: ----------- Paco-Paco spake unto me the following wisdom: sadrul: your console UI looks for gaim/*.h, but uses pkg-config --cflags gaim, which returns include/gaim I have fixed it by changing the #include-s. Modified Paths: -------------- trunk/console/gntblist.c Modified: trunk/console/gntblist.c =================================================================== --- trunk/console/gntblist.c 2006-06-26 19:38:29 UTC (rev 16353) +++ trunk/console/gntblist.c 2006-06-26 19:54:53 UTC (rev 16354) @@ -1,8 +1,8 @@ -#include <gaim/account.h> -#include <gaim/blist.h> +#include <account.h> +#include <blist.h> +#include <server.h> #include <signal.h> -#include <gaim/util.h> -#include <gaim/server.h> +#include <util.h> #include "gntgaim.h" #include "gntbox.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lsc...@us...> - 2006-06-26 19:47:54
|
Revision: 16353 Author: lschiere Date: 2006-06-26 12:38:29 -0700 (Mon, 26 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16353&view=rev Log Message: ----------- (15:33:14) SimGuy: LSchiere2: also, I noticed the FAQ links to 2.0.0beta3 to the beta1 files (15:35:49) LSchiere2: is this in faq.txt or faq2.txt? (15:36:08) LSchiere2: (faq.php and faq2.php respectively) (15:36:29) SimGuy: I think it's actually in faq.php (15:36:44) SimGuy: it's in the reference to faq2.php on faq.php Modified Paths: -------------- web/htdocs/faq.php Modified: web/htdocs/faq.php =================================================================== --- web/htdocs/faq.php 2006-06-26 17:55:17 UTC (rev 16352) +++ web/htdocs/faq.php 2006-06-26 19:38:29 UTC (rev 16353) @@ -7,7 +7,7 @@ <h1>Frequently Asked Questions</h1> <p><i>Frequently asked questions specific to Windows have their own <a href="/win32">FAQ</a>.</i></p> -<p><i>For those users testing <a href="http://sourceforge.net/project/showfiles.php?group_id=235&package_id=253&release_id=378940">2.0.0beta3</a>, we have an updated <a href="faq2.php">FAQ</a>.</i></p> +<p><i>For those users testing <a href="http://sourceforge.net/project/showfiles.php?group_id=235&package_id=253&release_id=405479">2.0.0beta3</a>, we have an updated <a href="faq2.php">FAQ</a>.</i></p> <? /* The Q&A begins here */ $faq = file("./faq.txt"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ebl...@us...> - 2006-06-26 17:55:21
|
Revision: 16352 Author: eblanton Date: 2006-06-26 10:55:17 -0700 (Mon, 26 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16352&view=rev Log Message: ----------- ------------------------------------------------------------------------ r16351 | eblanton | 2006-06-26 13:52:26 -0400 (Mon, 26 Jun 2006) | 1 line Focus newly created IRC tabs created with /join and /query ------------------------------------------------------------------------ Modified Paths: -------------- branches/v2_0_0/src/protocols/irc/cmds.c branches/v2_0_0/src/protocols/irc/msgs.c Modified: branches/v2_0_0/src/protocols/irc/cmds.c =================================================================== --- branches/v2_0_0/src/protocols/irc/cmds.c 2006-06-26 17:52:26 UTC (rev 16351) +++ branches/v2_0_0/src/protocols/irc/cmds.c 2006-06-26 17:55:17 UTC (rev 16352) @@ -402,6 +402,7 @@ return 0; convo = gaim_conversation_new(GAIM_CONV_TYPE_IM, irc->account, args[0]); + gaim_conversation_present(convo); if (args[1]) { gc = gaim_account_get_connection(irc->account); Modified: branches/v2_0_0/src/protocols/irc/msgs.c =================================================================== --- branches/v2_0_0/src/protocols/irc/msgs.c 2006-06-26 17:52:26 UTC (rev 16351) +++ branches/v2_0_0/src/protocols/irc/msgs.c 2006-06-26 17:55:17 UTC (rev 16352) @@ -675,6 +675,14 @@ /* We are joining a channel for the first time */ serv_got_joined_chat(gc, id++, args[0]); g_free(nick); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, + args[0], + irc->account); + if (convo == NULL) { + gaim_debug_error("irc", "tried to join %s but couldn't\n", args[0]); + return; + } + gaim_conversation_present(convo); return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ebl...@us...> - 2006-06-26 17:52:31
|
Revision: 16351 Author: eblanton Date: 2006-06-26 10:52:26 -0700 (Mon, 26 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16351&view=rev Log Message: ----------- Focus newly created IRC tabs created with /join and /query Modified Paths: -------------- trunk/src/protocols/irc/cmds.c trunk/src/protocols/irc/msgs.c Modified: trunk/src/protocols/irc/cmds.c =================================================================== --- trunk/src/protocols/irc/cmds.c 2006-06-26 09:04:41 UTC (rev 16350) +++ trunk/src/protocols/irc/cmds.c 2006-06-26 17:52:26 UTC (rev 16351) @@ -402,6 +402,7 @@ return 0; convo = gaim_conversation_new(GAIM_CONV_TYPE_IM, irc->account, args[0]); + gaim_conversation_present(convo); if (args[1]) { gc = gaim_account_get_connection(irc->account); Modified: trunk/src/protocols/irc/msgs.c =================================================================== --- trunk/src/protocols/irc/msgs.c 2006-06-26 09:04:41 UTC (rev 16350) +++ trunk/src/protocols/irc/msgs.c 2006-06-26 17:52:26 UTC (rev 16351) @@ -675,6 +675,14 @@ /* We are joining a channel for the first time */ serv_got_joined_chat(gc, id++, args[0]); g_free(nick); + convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, + args[0], + irc->account); + if (convo == NULL) { + gaim_debug_error("irc", "tried to join %s but couldn't\n", args[0]); + return; + } + gaim_conversation_present(convo); return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-26 09:04:44
|
Revision: 16350 Author: thekingant Date: 2006-06-26 02:04:41 -0700 (Mon, 26 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16350&view=rev Log Message: ----------- Backport SVN revision 16349 from HEAD to v2_0_0 Original commit message: Three changes: 1. When you try to sign on with an oscar screen name that is not valid ("123abc" for example), the PRPL will set gc->wants_to_die to TRUE so that the account will not be auto-reconnected. 2. When we get an AIM userinfo packet about someone in our buddy list, if the person has some kind of screen name formatting set ("Mark Doliner" instead of "markdoliner") then we set the buddies server_nick to that formatted name. 3. Add a "Get AIM Info" to the context menu for ICQ buddies who are in the buddy list of an ICQ user. ViewCVS Links: ------------- http://svn.sourceforge.net/gaim/?rev=16349&view=rev Modified Paths: -------------- branches/v2_0_0/src/protocols/oscar/oscar.c Modified: branches/v2_0_0/src/protocols/oscar/oscar.c =================================================================== --- branches/v2_0_0/src/protocols/oscar/oscar.c 2006-06-26 09:03:54 UTC (rev 16349) +++ branches/v2_0_0/src/protocols/oscar/oscar.c 2006-06-26 09:04:41 UTC (rev 16350) @@ -1225,6 +1225,7 @@ if (!aim_snvalid(gaim_account_get_username(account))) { gchar *buf; buf = g_strdup_printf(_("Unable to login: Could not sign on as %s because the screen name is invalid. Screen names must either start with a letter and contain only letters, numbers and spaces, or contain only numbers."), gaim_account_get_username(account)); + gc->wants_to_die = TRUE; gaim_connection_error(gc, buf); g_free(buf); } @@ -2914,6 +2915,11 @@ if (b == NULL) return 1; + if (strcmp(gaim_buddy_get_name(b), userinfo->sn)) + serv_got_alias(gc, gaim_buddy_get_name(b), userinfo->sn); + else + serv_got_alias(gc, gaim_buddy_get_name(b), NULL); + presence = gaim_buddy_get_presence(b); status = gaim_presence_get_active_status(presence); @@ -4226,6 +4232,11 @@ return ret; } +/* + * As of 26 June 2006, ICQ users can request AIM info from + * everyone, and can request ICQ info from ICQ users, and + * AIM users can only request AIM info. + */ static void oscar_get_info(GaimConnection *gc, const char *name) { OscarData *od = (OscarData *)gc->proto_data; @@ -5759,6 +5770,20 @@ g_free(buf); } +static void +oscar_get_aim_info_cb(GaimBlistNode *node, gpointer ignore) +{ + GaimBuddy *buddy; + GaimConnection *gc; + + g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY(node)); + + buddy = (GaimBuddy *)node; + gc = gaim_account_get_connection(buddy->account); + + aim_locate_getinfoshort(gc->proto_data, gaim_buddy_get_name(buddy), 0x00000003); +} + static GList *oscar_buddy_menu(GaimBuddy *buddy) { GaimConnection *gc; @@ -5772,6 +5797,14 @@ userinfo = aim_locate_finduserinfo(od, buddy->name); m = NULL; + if (od->icq && aim_sn_is_icq(gaim_buddy_get_name(buddy))) + { + act = gaim_menu_action_new(_("Get AIM Info"), + GAIM_CALLBACK(oscar_get_aim_info_cb), + NULL, NULL); + m = g_list_append(m, act); + } + act = gaim_menu_action_new(_("Edit Buddy Comment"), GAIM_CALLBACK(oscar_buddycb_edit_comment), NULL, NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-26 09:03:58
|
Revision: 16349 Author: thekingant Date: 2006-06-26 02:03:54 -0700 (Mon, 26 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16349&view=rev Log Message: ----------- Three changes: 1. When you try to sign on with an oscar screen name that is not valid ("123abc" for example), the PRPL will set gc->wants_to_die to TRUE so that the account will not be auto-reconnected. 2. When we get an AIM userinfo packet about someone in our buddy list, if the person has some kind of screen name formatting set ("Mark Doliner" instead of "markdoliner") then we set the buddies server_nick to that formatted name. 3. Add a "Get AIM Info" to the context menu for ICQ buddies who are in the buddy list of an ICQ user. Modified Paths: -------------- trunk/src/protocols/oscar/oscar.c Modified: trunk/src/protocols/oscar/oscar.c =================================================================== --- trunk/src/protocols/oscar/oscar.c 2006-06-26 08:07:37 UTC (rev 16348) +++ trunk/src/protocols/oscar/oscar.c 2006-06-26 09:03:54 UTC (rev 16349) @@ -1225,6 +1225,7 @@ if (!aim_snvalid(gaim_account_get_username(account))) { gchar *buf; buf = g_strdup_printf(_("Unable to login: Could not sign on as %s because the screen name is invalid. Screen names must either start with a letter and contain only letters, numbers and spaces, or contain only numbers."), gaim_account_get_username(account)); + gc->wants_to_die = TRUE; gaim_connection_error(gc, buf); g_free(buf); } @@ -2915,6 +2916,11 @@ if (b == NULL) return 1; + if (strcmp(gaim_buddy_get_name(b), userinfo->sn)) + serv_got_alias(gc, gaim_buddy_get_name(b), userinfo->sn); + else + serv_got_alias(gc, gaim_buddy_get_name(b), NULL); + presence = gaim_buddy_get_presence(b); status = gaim_presence_get_active_status(presence); @@ -4227,6 +4233,11 @@ return ret; } +/* + * As of 26 June 2006, ICQ users can request AIM info from + * everyone, and can request ICQ info from ICQ users, and + * AIM users can only request AIM info. + */ static void oscar_get_info(GaimConnection *gc, const char *name) { OscarData *od = (OscarData *)gc->proto_data; @@ -5760,6 +5771,20 @@ g_free(buf); } +static void +oscar_get_aim_info_cb(GaimBlistNode *node, gpointer ignore) +{ + GaimBuddy *buddy; + GaimConnection *gc; + + g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY(node)); + + buddy = (GaimBuddy *)node; + gc = gaim_account_get_connection(buddy->account); + + aim_locate_getinfoshort(gc->proto_data, gaim_buddy_get_name(buddy), 0x00000003); +} + static GList *oscar_buddy_menu(GaimBuddy *buddy) { GaimConnection *gc; @@ -5773,6 +5798,14 @@ userinfo = aim_locate_finduserinfo(od, buddy->name); m = NULL; + if (od->icq && aim_sn_is_icq(gaim_buddy_get_name(buddy))) + { + act = gaim_menu_action_new(_("Get AIM Info"), + GAIM_CALLBACK(oscar_get_aim_info_cb), + NULL, NULL); + m = g_list_append(m, act); + } + act = gaim_menu_action_new(_("Edit Buddy Comment"), GAIM_CALLBACK(oscar_buddycb_edit_comment), NULL, NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-26 08:07:40
|
Revision: 16348 Author: thekingant Date: 2006-06-26 01:07:37 -0700 (Mon, 26 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16348&view=rev Log Message: ----------- Minor change to the ignore property on the qq directory Property Changed: ---------------- trunk/src/protocols/qq/ Property changes on: trunk/src/protocols/qq ___________________________________________________________________ Name: svn:ignore - Makefile.in Makefile .deps/ .libs/ + Makefile.in Makefile .deps .libs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-26 04:24:27
|
Revision: 16347 Author: thekingant Date: 2006-06-25 21:24:24 -0700 (Sun, 25 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16347&view=rev Log Message: ----------- I think I figured out the svn:ignore property. I'm so money! Property Changed: ---------------- trunk/src/protocols/qq/ Property changes on: trunk/src/protocols/qq ___________________________________________________________________ Name: svn:ignore - .deps/ Makefile + Makefile.in Makefile .deps/ .libs/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-26 04:21:06
|
Revision: 16346 Author: thekingant Date: 2006-06-25 21:21:04 -0700 (Sun, 25 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16346&view=rev Log Message: ----------- Makefile.in should not be in the repository, and Makefile and .deps should be ignored (I'm not sure I did this right... we'll see :-) ) Removed Paths: ------------- trunk/src/protocols/qq/Makefile.in Property Changed: ---------------- trunk/src/protocols/qq/ Property changes on: trunk/src/protocols/qq ___________________________________________________________________ Name: svn:ignore + .deps/ Makefile Deleted: trunk/src/protocols/qq/Makefile.in =================================================================== --- trunk/src/protocols/qq/Makefile.in 2006-06-26 03:57:19 UTC (rev 16345) +++ trunk/src/protocols/qq/Makefile.in 2006-06-26 04:21:04 UTC (rev 16346) @@ -1,576 +0,0 @@ -# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am - -# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DESTDIR = - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ - -top_builddir = ../../.. - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_alias = @build_alias@ -build_triplet = @build@ -host_alias = @host_alias@ -host_triplet = @host@ -target_alias = @target_alias@ -target_triplet = @target@ -ALL_LINGUAS = @ALL_LINGUAS@ -AO_CFLAGS = @AO_CFLAGS@ -AO_LIBS = @AO_LIBS@ -AR = @AR@ -AS = @AS@ -AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@ -AUDIOFILE_CONFIG = @AUDIOFILE_CONFIG@ -AUDIOFILE_LIBS = @AUDIOFILE_LIBS@ -BINRELOC_CFLAGS = @BINRELOC_CFLAGS@ -BINRELOC_LIBS = @BINRELOC_LIBS@ -BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -CFLAGS = @CFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -DATADIRNAME = @DATADIRNAME@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ -DEBUG_CFLAGS = @DEBUG_CFLAGS@ -DLLTOOL = @DLLTOOL@ -DOT = @DOT@ -DOXYGEN = @DOXYGEN@ -DYNALOADER_A = @DYNALOADER_A@ -DYNAMIC_PRPLS = @DYNAMIC_PRPLS@ -ECHO = @ECHO@ -EGREP = @EGREP@ -EVOLUTION_ADDRESSBOOK_CFLAGS = @EVOLUTION_ADDRESSBOOK_CFLAGS@ -EVOLUTION_ADDRESSBOOK_LIBS = @EVOLUTION_ADDRESSBOOK_LIBS@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -GADU_CFLAGS = @GADU_CFLAGS@ -GADU_LIBS = @GADU_LIBS@ -GCJ = @GCJ@ -GCJFLAGS = @GCJFLAGS@ -GENCAT = @GENCAT@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GLIBC2 = @GLIBC2@ -GLIBC21 = @GLIBC21@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ -GLIB_LIBS = @GLIB_LIBS@ -GLIB_MKENUMS = @GLIB_MKENUMS@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ -GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ -GNUTLS_LIBS = @GNUTLS_LIBS@ -GOBJECT_QUERY = @GOBJECT_QUERY@ -GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ -GSTREAMER_LIBS = @GSTREAMER_LIBS@ -GTKSPELL_CFLAGS = @GTKSPELL_CFLAGS@ -GTKSPELL_LIBS = @GTKSPELL_LIBS@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_ASPRINTF = @HAVE_ASPRINTF@ -HAVE_LIB = @HAVE_LIB@ -HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ -HAVE_SNPRINTF = @HAVE_SNPRINTF@ -HAVE_WPRINTF = @HAVE_WPRINTF@ -HOWL_CFLAGS = @HOWL_CFLAGS@ -HOWL_LIBS = @HOWL_LIBS@ -INSTOBJEXT = @INSTOBJEXT@ -INTLBISON = @INTLBISON@ -INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ -INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_ICONV = @INTLTOOL_ICONV@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ -INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ -INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ -INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ -INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ -INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -KRB4_CFLAGS = @KRB4_CFLAGS@ -KRB4_LDFLAGS = @KRB4_LDFLAGS@ -KRB4_LIBS = @KRB4_LIBS@ -LDADD = @LDADD@ -LIB = @LIB@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBPERL_A = @LIBPERL_A@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBXML_CFLAGS = @LIBXML_CFLAGS@ -LIBXML_LIBS = @LIBXML_LIBS@ -LN_S = @LN_S@ -LTLIB = @LTLIB@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -MAKEINFO = @MAKEINFO@ -MEANWHILE_CFLAGS = @MEANWHILE_CFLAGS@ -MEANWHILE_LIBS = @MEANWHILE_LIBS@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MONO_CFLAGS = @MONO_CFLAGS@ -MONO_LIBS = @MONO_LIBS@ -NSS_CFLAGS = @NSS_CFLAGS@ -NSS_LIBS = @NSS_LIBS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PERL = @PERL@ -PERL_CFLAGS = @PERL_CFLAGS@ -PERL_LIBS = @PERL_LIBS@ -PERL_MM_PARAMS = @PERL_MM_PARAMS@ -PKG_CONFIG = @PKG_CONFIG@ -POFILES = @POFILES@ -POSUB = @POSUB@ -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ -PYTHON = @PYTHON@ -RANLIB = @RANLIB@ -RC = @RC@ -SASL_LIBS = @SASL_LIBS@ -SILC_CFLAGS = @SILC_CFLAGS@ -SILC_LIBS = @SILC_LIBS@ -SM_LIBS = @SM_LIBS@ -STARTUP_NOTIFICATION_CFLAGS = @STARTUP_NOTIFICATION_CFLAGS@ -STARTUP_NOTIFICATION_LIBS = @STARTUP_NOTIFICATION_LIBS@ -STATIC_LINK_LIBS = @STATIC_LINK_LIBS@ -STATIC_PRPLS = @STATIC_PRPLS@ -STRIP = @STRIP@ -TCL_CFLAGS = @TCL_CFLAGS@ -TCL_LIBS = @TCL_LIBS@ -TK_LIBS = @TK_LIBS@ -USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -XSS_LIBS = @XSS_LIBS@ -ZEPHYR_CFLAGS = @ZEPHYR_CFLAGS@ -ZEPHYR_LDFLAGS = @ZEPHYR_LDFLAGS@ -ZEPHYR_LIBS = @ZEPHYR_LIBS@ -enable_dbus = @enable_dbus@ -enable_dot = @enable_dot@ -enable_doxygen = @enable_doxygen@ -gaimpath = @gaimpath@ -perlpath = @perlpath@ -sedpath = @sedpath@ - -EXTRA_DIST = Makefile.mingw - - -pkgdir = $(libdir)/gaim - -QQSOURCES = utils.c utils.h packet_parse.c packet_parse.h buddy_info.c buddy_info.h buddy_list.c buddy_list.h buddy_opt.c buddy_opt.h buddy_status.c buddy_status.h qq.c char_conv.c char_conv.h crypt.c crypt.h group_admindlg.c group_admindlg.h group.c group_conv.c group_conv.h group_find.c group_find.h group_free.c group_free.h group.h group_hash.c group_hash.h group_im.c group_im.h group_info.c group_info.h group_join.c group_join.h group_misc.c group_misc.h group_network.c group_network.h group_opt.c group_opt.h group_search.c group_search.h qq.h header_info.c header_info.h im.c im.h infodlg.c infodlg.h ip_location.c ip_location.h keep_alive.c keep_alive.h login_logout.c login_logout.h qq_proxy.c qq_proxy.h recv_core.c recv_core.h send_core.c send_core.h sendqueue.c sendqueue.h show.c show.h sys_msg.c sys_msg.h udp_proxy_s5.c udp_proxy_s5.h send_file.c send_file.h file_trans.c file_trans.h - - -AM_CFLAGS = $(st) - -libqq_la_LDFLAGS = -module -avoid-version - -@STATIC_QQ_TRUE@st = -DGAIM_STATIC_PRPL -@STATIC_QQ_FALSE@st = -@STATIC_QQ_TRUE@noinst_LIBRARIES = libqq.a -@STATIC_QQ_TRUE@libqq_a_SOURCES = $(QQSOURCES) -@STATIC_QQ_TRUE@libqq_a_CFLAGS = $(AM_CFLAGS) -@STATIC_QQ_FALSE@pkg_LTLIBRARIES = libqq.la -@STATIC_QQ_FALSE@libqq_la_SOURCES = $(QQSOURCES) - -AM_CPPFLAGS = -I$(top_srcdir)/src -DDATADIR=\"${datadir}\" -DVERSION=\"$(VERSION)\" $(DEBUG_CFLAGS) $(GTK_CFLAGS) $(GLIB_CFLAGS) $(GAIM_CFLAGS) - -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = ../../../config.h -CONFIG_CLEAN_FILES = -LIBRARIES = $(noinst_LIBRARIES) - - -DEFS = @DEFS@ -I. -I$(srcdir) -I../../.. -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -X_CFLAGS = @X_CFLAGS@ -X_LIBS = @X_LIBS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -libqq_a_LIBADD = -@STATIC_QQ_TRUE@libqq_a_OBJECTS = utils.$(OBJEXT) \ -@STATIC_QQ_TRUE@packet_parse.$(OBJEXT) buddy_info.$(OBJEXT) \ -@STATIC_QQ_TRUE@buddy_list.$(OBJEXT) buddy_opt.$(OBJEXT) \ -@STATIC_QQ_TRUE@buddy_status.$(OBJEXT) qq.$(OBJEXT) char_conv.$(OBJEXT) \ -@STATIC_QQ_TRUE@crypt.$(OBJEXT) group_admindlg.$(OBJEXT) \ -@STATIC_QQ_TRUE@group.$(OBJEXT) group_conv.$(OBJEXT) \ -@STATIC_QQ_TRUE@group_find.$(OBJEXT) group_free.$(OBJEXT) \ -@STATIC_QQ_TRUE@group_hash.$(OBJEXT) group_im.$(OBJEXT) \ -@STATIC_QQ_TRUE@group_info.$(OBJEXT) group_join.$(OBJEXT) \ -@STATIC_QQ_TRUE@group_misc.$(OBJEXT) group_network.$(OBJEXT) \ -@STATIC_QQ_TRUE@group_opt.$(OBJEXT) group_search.$(OBJEXT) \ -@STATIC_QQ_TRUE@header_info.$(OBJEXT) im.$(OBJEXT) infodlg.$(OBJEXT) \ -@STATIC_QQ_TRUE@ip_location.$(OBJEXT) keep_alive.$(OBJEXT) \ -@STATIC_QQ_TRUE@login_logout.$(OBJEXT) qq_proxy.$(OBJEXT) \ -@STATIC_QQ_TRUE@recv_core.$(OBJEXT) send_core.$(OBJEXT) \ -@STATIC_QQ_TRUE@sendqueue.$(OBJEXT) show.$(OBJEXT) sys_msg.$(OBJEXT) \ -@STATIC_QQ_TRUE@udp_proxy_s5.$(OBJEXT) send_file.$(OBJEXT) \ -@STATIC_QQ_TRUE@file_trans.$(OBJEXT) -LTLIBRARIES = $(pkg_LTLIBRARIES) - -libqq_la_LIBADD = -@STATIC_QQ_FALSE@libqq_la_OBJECTS = utils.lo packet_parse.lo \ -@STATIC_QQ_FALSE@buddy_info.lo buddy_list.lo buddy_opt.lo \ -@STATIC_QQ_FALSE@buddy_status.lo qq.lo char_conv.lo crypt.lo \ -@STATIC_QQ_FALSE@group_admindlg.lo group.lo group_conv.lo group_find.lo \ -@STATIC_QQ_FALSE@group_free.lo group_hash.lo group_im.lo group_info.lo \ -@STATIC_QQ_FALSE@group_join.lo group_misc.lo group_network.lo \ -@STATIC_QQ_FALSE@group_opt.lo group_search.lo header_info.lo im.lo \ -@STATIC_QQ_FALSE@infodlg.lo ip_location.lo keep_alive.lo \ -@STATIC_QQ_FALSE@login_logout.lo qq_proxy.lo recv_core.lo send_core.lo \ -@STATIC_QQ_FALSE@sendqueue.lo show.lo sys_msg.lo udp_proxy_s5.lo \ -@STATIC_QQ_FALSE@send_file.lo file_trans.lo -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ -DIST_COMMON = Makefile.am Makefile.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = tar -GZIP_ENV = --best -DEP_FILES = .deps/buddy_info.P .deps/buddy_list.P .deps/buddy_opt.P \ -.deps/buddy_status.P .deps/char_conv.P .deps/crypt.P .deps/file_trans.P \ -.deps/group.P .deps/group_admindlg.P .deps/group_conv.P \ -.deps/group_find.P .deps/group_free.P .deps/group_hash.P \ -.deps/group_im.P .deps/group_info.P .deps/group_join.P \ -.deps/group_misc.P .deps/group_network.P .deps/group_opt.P \ -.deps/group_search.P .deps/header_info.P .deps/im.P .deps/infodlg.P \ -.deps/ip_location.P .deps/keep_alive.P .deps/login_logout.P \ -.deps/packet_parse.P .deps/qq.P .deps/qq_proxy.P .deps/recv_core.P \ -.deps/send_core.P .deps/send_file.P .deps/sendqueue.P .deps/show.P \ -.deps/sys_msg.P .deps/udp_proxy_s5.P .deps/utils.P -SOURCES = $(libqq_a_SOURCES) $(libqq_la_SOURCES) -OBJECTS = $(libqq_a_OBJECTS) $(libqq_la_OBJECTS) - -all: all-redirect -.SUFFIXES: -.SUFFIXES: .S .c .lo .o .obj .s -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu src/protocols/qq/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - - -mostlyclean-noinstLIBRARIES: - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) - -distclean-noinstLIBRARIES: - -maintainer-clean-noinstLIBRARIES: - -# FIXME: We should only use cygpath when building on Windows, -# and only if it is available. -.c.obj: - $(COMPILE) -c `cygpath -w $<` - -.s.o: - $(COMPILE) -c $< - -.S.o: - $(COMPILE) -c $< - -mostlyclean-compile: - -rm -f *.o core *.core - -rm -f *.$(OBJEXT) - -clean-compile: - -distclean-compile: - -rm -f *.tab.c - -maintainer-clean-compile: - -.s.lo: - $(LIBTOOL) --mode=compile $(COMPILE) -c $< - -.S.lo: - $(LIBTOOL) --mode=compile $(COMPILE) -c $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -maintainer-clean-libtool: - -libqq.a: $(libqq_a_OBJECTS) $(libqq_a_DEPENDENCIES) - -rm -f libqq.a - $(AR) cru libqq.a $(libqq_a_OBJECTS) $(libqq_a_LIBADD) - $(RANLIB) libqq.a - -mostlyclean-pkgLTLIBRARIES: - -clean-pkgLTLIBRARIES: - -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) - -distclean-pkgLTLIBRARIES: - -maintainer-clean-pkgLTLIBRARIES: - -install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(pkgdir) - @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(pkgdir)/$$p"; \ - $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(pkgdir)/$$p; \ - else :; fi; \ - done - -uninstall-pkgLTLIBRARIES: - @$(NORMAL_UNINSTALL) - list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ - $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(pkgdir)/$$p; \ - done - -libqq.la: $(libqq_la_OBJECTS) $(libqq_la_DEPENDENCIES) - $(LINK) -rpath $(pkgdir) $(libqq_la_LDFLAGS) $(libqq_la_OBJECTS) $(libqq_la_LIBADD) $(LIBS) - -tags: TAGS - -ID: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - here=`pwd` && cd $(srcdir) \ - && mkid -f$$here/ID $$unique $(LISP) - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP)) - -mostlyclean-tags: - -clean-tags: - -distclean-tags: - -rm -f TAGS ID - -maintainer-clean-tags: - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) - -subdir = src/protocols/qq - -distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/protocols/qq/Makefile - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ - else \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done - -DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) - --include $(DEP_FILES) - -mostlyclean-depend: - -clean-depend: - -distclean-depend: - -rm -rf .deps - -maintainer-clean-depend: - -%.o: %.c - @echo '$(COMPILE) -c $<'; \ - $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< - @-cp .deps/$(*F).pp .deps/$(*F).P; \ - tr ' ' '\012' < .deps/$(*F).pp \ - | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ - >> .deps/$(*F).P; \ - rm .deps/$(*F).pp - -%.lo: %.c - @echo '$(LTCOMPILE) -c $<'; \ - $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< - @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ - < .deps/$(*F).pp > .deps/$(*F).P; \ - tr ' ' '\012' < .deps/$(*F).pp \ - | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ - >> .deps/$(*F).P; \ - rm -f .deps/$(*F).pp -info-am: -info: info-am -dvi-am: -dvi: dvi-am -check-am: all-am -check: check-am -installcheck-am: -installcheck: installcheck-am -install-exec-am: -install-exec: install-exec-am - -install-data-am: install-pkgLTLIBRARIES -install-data: install-data-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-am -uninstall-am: uninstall-pkgLTLIBRARIES -uninstall: uninstall-am -all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) -all-redirect: all-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: - $(mkinstalldirs) $(DESTDIR)$(pkgdir) - - -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -maintainer-clean-generic: -mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \ - mostlyclean-libtool mostlyclean-pkgLTLIBRARIES \ - mostlyclean-tags mostlyclean-depend mostlyclean-generic - -mostlyclean: mostlyclean-am - -clean-am: clean-noinstLIBRARIES clean-compile clean-libtool \ - clean-pkgLTLIBRARIES clean-tags clean-depend \ - clean-generic mostlyclean-am - -clean: clean-am - -distclean-am: distclean-noinstLIBRARIES distclean-compile \ - distclean-libtool distclean-pkgLTLIBRARIES \ - distclean-tags distclean-depend distclean-generic \ - clean-am - -rm -f libtool - -distclean: distclean-am - -maintainer-clean-am: maintainer-clean-noinstLIBRARIES \ - maintainer-clean-compile maintainer-clean-libtool \ - maintainer-clean-pkgLTLIBRARIES maintainer-clean-tags \ - maintainer-clean-depend maintainer-clean-generic \ - distclean-am - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -maintainer-clean: maintainer-clean-am - -.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \ -clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \ -mostlyclean-compile distclean-compile clean-compile \ -maintainer-clean-compile mostlyclean-libtool distclean-libtool \ -clean-libtool maintainer-clean-libtool mostlyclean-pkgLTLIBRARIES \ -distclean-pkgLTLIBRARIES clean-pkgLTLIBRARIES \ -maintainer-clean-pkgLTLIBRARIES uninstall-pkgLTLIBRARIES \ -install-pkgLTLIBRARIES tags mostlyclean-tags distclean-tags clean-tags \ -maintainer-clean-tags distdir mostlyclean-depend distclean-depend \ -clean-depend maintainer-clean-depend info-am info dvi-am dvi check \ -check-am installcheck-am installcheck install-exec-am install-exec \ -install-data-am install-data install-am install uninstall-am uninstall \ -all-redirect all-am all installdirs mostlyclean-generic \ -distclean-generic clean-generic maintainer-clean-generic clean \ -mostlyclean distclean maintainer-clean - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-26 03:57:21
|
Revision: 16345 Author: thekingant Date: 2006-06-25 20:57:19 -0700 (Sun, 25 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16345&view=rev Log Message: ----------- Backport SVN revision 16344 from HEAD to v2_0_0 Original commit message: Fix some bugs that Relan (resver) tracked down. Basically we were attempting to convert various strings from some encoding to UTF8 twice. The strings were mostly in ICQ buddy info. He submitted sf patch #1503955, but I like my approach better. ViewCVS Links: ------------- http://svn.sourceforge.net/gaim/?rev=16344&view=rev Modified Paths: -------------- branches/v2_0_0/src/protocols/oscar/oscar.c Modified: branches/v2_0_0/src/protocols/oscar/oscar.c =================================================================== --- branches/v2_0_0/src/protocols/oscar/oscar.c 2006-06-26 03:55:24 UTC (rev 16344) +++ branches/v2_0_0/src/protocols/oscar/oscar.c 2006-06-26 03:57:19 UTC (rev 16345) @@ -726,9 +726,18 @@ } static void -oscar_string_append(GaimAccount *account, GString *str, const char *newline, +oscar_string_append(GString *str, const char *newline, const char *name, const char *value) { + if (value && value[0]) { + g_string_append_printf(str, "%s<b>%s:</b> %s", newline, name, value); + } +} + +static void +oscar_string_convert_and_append(GaimAccount *account, GString *str, const char *newline, + const char *name, const char *value) +{ gchar *utf8; if (value && value[0] && (utf8 = oscar_utf8_try_convert(account, value))) { @@ -772,16 +781,16 @@ if (gaim_presence_is_online(presence)) { if (aim_sn_is_icq(b->name)) { GaimStatus *status = gaim_presence_get_active_status(presence); - oscar_string_append(gc->account, str, newline, _("Status"), + oscar_string_append(str, newline, _("Status"), gaim_status_get_name(status)); } } else { tmp = aim_ssi_itemlist_findparentname(od->ssi.local, b->name); if (aim_ssi_waitingforauth(od->ssi.local, tmp, b->name)) - oscar_string_append(gc->account, str, newline, _("Status"), + oscar_string_append(str, newline, _("Status"), _("Not Authorized")); else - oscar_string_append(gc->account, str, newline, _("Status"), + oscar_string_append(str, newline, _("Status"), _("Offline")); } } @@ -792,14 +801,14 @@ (bi->ipaddr & 0x00ff0000) >> 16, (bi->ipaddr & 0x0000ff00) >> 8, (bi->ipaddr & 0x000000ff)); - oscar_string_append(gc->account, str, newline, _("IP Address"), tmp); + oscar_string_append(str, newline, _("IP Address"), tmp); g_free(tmp); } if ((userinfo != NULL) && (userinfo->warnlevel != 0)) { tmp = g_strdup_printf("%d", (int)(userinfo->warnlevel/10.0 + .5)); - oscar_string_append(gc->account, str, newline, _("Warning Level"), tmp); + oscar_string_append(str, newline, _("Warning Level"), tmp); g_free(tmp); } @@ -808,7 +817,7 @@ if (tmp != NULL) { char *tmp2 = g_markup_escape_text(tmp, strlen(tmp)); g_free(tmp); - oscar_string_append(gc->account, str, newline, _("Buddy Comment"), tmp2); + oscar_string_convert_and_append(account, str, newline, _("Buddy Comment"), tmp2); g_free(tmp2); } } @@ -2823,23 +2832,23 @@ if (userinfo->present & AIM_USERINFO_PRESENT_ONLINESINCE) { time_t t = userinfo->onlinesince - od->timeoffset; - oscar_string_append(gc->account, str, "\n<br>", _("Online Since"), gaim_date_format_full(localtime(&t))); + oscar_string_append(str, "\n<br>", _("Online Since"), gaim_date_format_full(localtime(&t))); } if (userinfo->present & AIM_USERINFO_PRESENT_MEMBERSINCE) { time_t t = userinfo->membersince - od->timeoffset; - oscar_string_append(gc->account, str, "\n<br>", _("Member Since"), gaim_date_format_full(localtime(&t))); + oscar_string_append(str, "\n<br>", _("Member Since"), gaim_date_format_full(localtime(&t))); } if (userinfo->capabilities != 0) { tmp = oscar_caps_to_string(userinfo->capabilities); - oscar_string_append(gc->account, str, "\n<br>", _("Capabilities"), tmp); + oscar_string_append(str, "\n<br>", _("Capabilities"), tmp); g_free(tmp); } if (userinfo->present & AIM_USERINFO_PRESENT_IDLE) { tmp = gaim_str_seconds_to_string(userinfo->idletime*60); - oscar_string_append(gc->account, str, "\n<br>", _("Idle"), tmp); + oscar_string_append(str, "\n<br>", _("Idle"), tmp); g_free(tmp); } @@ -2851,7 +2860,7 @@ if (userinfo->status[0] != '\0') tmp = oscar_encoding_to_utf8(userinfo->status_encoding, userinfo->status, userinfo->status_len); - oscar_string_append(gc->account, str, "\n<br>", _("Available Message"), tmp); + oscar_string_convert_and_append(account, str, "\n<br>", _("Available Message"), tmp); g_free(tmp); } @@ -3597,9 +3606,10 @@ static int gaim_icqinfo(OscarData *od, FlapConnection *conn, FlapFrame *fr, ...) { - GaimConnection *gc = od->gc; + GaimConnection *gc; + GaimAccount *account; GaimBuddy *buddy; - struct buddyinfo *bi = NULL; + struct buddyinfo *bi; gchar who[16]; GString *str; gchar *utf8; @@ -3607,6 +3617,9 @@ va_list ap; struct aim_icq_info *info; + gc = od->gc; + account = gaim_connection_get_account(gc); + va_start(ap, fr); info = va_arg(ap, struct aim_icq_info *); va_end(ap); @@ -3619,20 +3632,22 @@ buddy = gaim_find_buddy(gaim_connection_get_account(gc), who); if (buddy != NULL) bi = g_hash_table_lookup(od->buddyinfo, gaim_normalize(buddy->account, buddy->name)); + else + bi = NULL; g_string_append_printf(str, "<b>%s:</b> %s", _("UIN"), who); - oscar_string_append(gc->account, str, "\n<br>", _("Nick"), info->nick); + oscar_string_convert_and_append(account, str, "\n<br>", _("Nick"), info->nick); if ((bi != NULL) && (bi->ipaddr != 0)) { char *tstr = g_strdup_printf("%hhu.%hhu.%hhu.%hhu", (bi->ipaddr & 0xff000000) >> 24, (bi->ipaddr & 0x00ff0000) >> 16, (bi->ipaddr & 0x0000ff00) >> 8, (bi->ipaddr & 0x000000ff)); - oscar_string_append(gc->account, str, "\n<br>", _("IP Address"), tstr); + oscar_string_append(str, "\n<br>", _("IP Address"), tstr); g_free(tstr); } - oscar_string_append(gc->account, str, "\n<br>", _("First Name"), info->first); - oscar_string_append(gc->account, str, "\n<br>", _("Last Name"), info->last); + oscar_string_convert_and_append(account, str, "\n<br>", _("First Name"), info->first); + oscar_string_convert_and_append(account, str, "\n<br>", _("Last Name"), info->last); if (info->email && info->email[0] && (utf8 = oscar_utf8_try_convert(gc->account, info->email))) { g_string_append_printf(str, "\n<br><b>%s:</b> <a href=\"mailto:%s\">%s</a>", _("E-Mail Address"), utf8, utf8); g_free(utf8); @@ -3646,9 +3661,9 @@ } } } - oscar_string_append(gc->account, str, "\n<br>", _("Mobile Phone"), info->mobile); + oscar_string_convert_and_append(account, str, "\n<br>", _("Mobile Phone"), info->mobile); if (info->gender != 0) - oscar_string_append(gc->account, str, "\n<br>", _("Gender"), info->gender == 1 ? _("Female") : _("Male")); + oscar_string_append(str, "\n<br>", _("Gender"), info->gender == 1 ? _("Female") : _("Male")); if ((info->birthyear > 1900) && (info->birthmonth > 0) && (info->birthday > 0)) { /* Initialize the struct properly or strftime() will crash * under some conditions (e.g. Debian sarge w/ LANG=en_HK). */ @@ -3664,13 +3679,13 @@ * feel free to remove it. --rlaager */ mktime(tm); - oscar_string_append(gc->account, str, "\n<br>", _("Birthday"), + oscar_string_append(str, "\n<br>", _("Birthday"), gaim_date_format_short(tm)); } if ((info->age > 0) && (info->age < 255)) { char age[5]; snprintf(age, sizeof(age), "%hhd", info->age); - oscar_string_append(gc->account, str, "\n<br>", _("Age"), age); + oscar_string_append(str, "\n<br>", _("Age"), age); } if (info->personalwebpage && info->personalwebpage[0] && (utf8 = oscar_utf8_try_convert(gc->account, info->personalwebpage))) { g_string_append_printf(str, "\n<br><b>%s:</b> <a href=\"%s\">%s</a>", _("Personal Web Page"), utf8, utf8); @@ -3683,25 +3698,25 @@ g_string_append_printf(str, "<hr>"); if ((info->homeaddr && (info->homeaddr[0])) || (info->homecity && info->homecity[0]) || (info->homestate && info->homestate[0]) || (info->homezip && info->homezip[0])) { g_string_append_printf(str, "<b>%s:</b>", _("Home Address")); - oscar_string_append(gc->account, str, "\n<br>", _("Address"), info->homeaddr); - oscar_string_append(gc->account, str, "\n<br>", _("City"), info->homecity); - oscar_string_append(gc->account, str, "\n<br>", _("State"), info->homestate); - oscar_string_append(gc->account, str, "\n<br>", _("Zip Code"), info->homezip); + oscar_string_convert_and_append(account, str, "\n<br>", _("Address"), info->homeaddr); + oscar_string_convert_and_append(account, str, "\n<br>", _("City"), info->homecity); + oscar_string_convert_and_append(account, str, "\n<br>", _("State"), info->homestate); + oscar_string_convert_and_append(account, str, "\n<br>", _("Zip Code"), info->homezip); g_string_append_printf(str, "\n<hr>"); } if ((info->workaddr && info->workaddr[0]) || (info->workcity && info->workcity[0]) || (info->workstate && info->workstate[0]) || (info->workzip && info->workzip[0])) { g_string_append_printf(str, "<b>%s:</b>", _("Work Address")); - oscar_string_append(gc->account, str, "\n<br>", _("Address"), info->workaddr); - oscar_string_append(gc->account, str, "\n<br>", _("City"), info->workcity); - oscar_string_append(gc->account, str, "\n<br>", _("State"), info->workstate); - oscar_string_append(gc->account, str, "\n<br>", _("Zip Code"), info->workzip); + oscar_string_convert_and_append(account, str, "\n<br>", _("Address"), info->workaddr); + oscar_string_convert_and_append(account, str, "\n<br>", _("City"), info->workcity); + oscar_string_convert_and_append(account, str, "\n<br>", _("State"), info->workstate); + oscar_string_convert_and_append(account, str, "\n<br>", _("Zip Code"), info->workzip); g_string_append_printf(str, "\n<hr>"); } if ((info->workcompany && info->workcompany[0]) || (info->workdivision && info->workdivision[0]) || (info->workposition && info->workposition[0]) || (info->workwebpage && info->workwebpage[0])) { g_string_append_printf(str, "<b>%s:</b>", _("Work Information")); - oscar_string_append(gc->account, str, "\n<br>", _("Company"), info->workcompany); - oscar_string_append(gc->account, str, "\n<br>", _("Division"), info->workdivision); - oscar_string_append(gc->account, str, "\n<br>", _("Position"), info->workposition); + oscar_string_convert_and_append(account, str, "\n<br>", _("Company"), info->workcompany); + oscar_string_convert_and_append(account, str, "\n<br>", _("Division"), info->workdivision); + oscar_string_convert_and_append(account, str, "\n<br>", _("Position"), info->workposition); if (info->workwebpage && info->workwebpage[0] && (utf8 = oscar_utf8_try_convert(gc->account, info->workwebpage))) { g_string_append_printf(str, "\n<br><b>%s:</b> <a href=\"%s\">%s</a>", _("Web Page"), utf8, utf8); g_free(utf8); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-06-26 03:55:26
|
Revision: 16344 Author: thekingant Date: 2006-06-25 20:55:24 -0700 (Sun, 25 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16344&view=rev Log Message: ----------- Fix some bugs that Relan (resver) tracked down. Basically we were attempting to convert various strings from some encoding to UTF8 twice. The strings were mostly in ICQ buddy info. He submitted sf patch #1503955, but I like my approach better. Modified Paths: -------------- trunk/src/protocols/oscar/oscar.c Modified: trunk/src/protocols/oscar/oscar.c =================================================================== --- trunk/src/protocols/oscar/oscar.c 2006-06-26 03:53:13 UTC (rev 16343) +++ trunk/src/protocols/oscar/oscar.c 2006-06-26 03:55:24 UTC (rev 16344) @@ -726,9 +726,18 @@ } static void -oscar_string_append(GaimAccount *account, GString *str, const char *newline, +oscar_string_append(GString *str, const char *newline, const char *name, const char *value) { + if (value && value[0]) { + g_string_append_printf(str, "%s<b>%s:</b> %s", newline, name, value); + } +} + +static void +oscar_string_convert_and_append(GaimAccount *account, GString *str, const char *newline, + const char *name, const char *value) +{ gchar *utf8; if (value && value[0] && (utf8 = oscar_utf8_try_convert(account, value))) { @@ -772,16 +781,16 @@ if (gaim_presence_is_online(presence)) { if (aim_sn_is_icq(b->name)) { GaimStatus *status = gaim_presence_get_active_status(presence); - oscar_string_append(gc->account, str, newline, _("Status"), + oscar_string_append(str, newline, _("Status"), gaim_status_get_name(status)); } } else { tmp = aim_ssi_itemlist_findparentname(od->ssi.local, b->name); if (aim_ssi_waitingforauth(od->ssi.local, tmp, b->name)) - oscar_string_append(gc->account, str, newline, _("Status"), + oscar_string_append(str, newline, _("Status"), _("Not Authorized")); else - oscar_string_append(gc->account, str, newline, _("Status"), + oscar_string_append(str, newline, _("Status"), _("Offline")); } } @@ -792,14 +801,14 @@ (bi->ipaddr & 0x00ff0000) >> 16, (bi->ipaddr & 0x0000ff00) >> 8, (bi->ipaddr & 0x000000ff)); - oscar_string_append(gc->account, str, newline, _("IP Address"), tmp); + oscar_string_append(str, newline, _("IP Address"), tmp); g_free(tmp); } if ((userinfo != NULL) && (userinfo->warnlevel != 0)) { tmp = g_strdup_printf("%d", (int)(userinfo->warnlevel/10.0 + .5)); - oscar_string_append(gc->account, str, newline, _("Warning Level"), tmp); + oscar_string_append(str, newline, _("Warning Level"), tmp); g_free(tmp); } @@ -808,7 +817,7 @@ if (tmp != NULL) { char *tmp2 = g_markup_escape_text(tmp, strlen(tmp)); g_free(tmp); - oscar_string_append(gc->account, str, newline, _("Buddy Comment"), tmp2); + oscar_string_convert_and_append(account, str, newline, _("Buddy Comment"), tmp2); g_free(tmp2); } } @@ -2824,23 +2833,23 @@ if (userinfo->present & AIM_USERINFO_PRESENT_ONLINESINCE) { time_t t = userinfo->onlinesince - od->timeoffset; - oscar_string_append(gc->account, str, "\n<br>", _("Online Since"), gaim_date_format_full(localtime(&t))); + oscar_string_append(str, "\n<br>", _("Online Since"), gaim_date_format_full(localtime(&t))); } if (userinfo->present & AIM_USERINFO_PRESENT_MEMBERSINCE) { time_t t = userinfo->membersince - od->timeoffset; - oscar_string_append(gc->account, str, "\n<br>", _("Member Since"), gaim_date_format_full(localtime(&t))); + oscar_string_append(str, "\n<br>", _("Member Since"), gaim_date_format_full(localtime(&t))); } if (userinfo->capabilities != 0) { tmp = oscar_caps_to_string(userinfo->capabilities); - oscar_string_append(gc->account, str, "\n<br>", _("Capabilities"), tmp); + oscar_string_append(str, "\n<br>", _("Capabilities"), tmp); g_free(tmp); } if (userinfo->present & AIM_USERINFO_PRESENT_IDLE) { tmp = gaim_str_seconds_to_string(userinfo->idletime*60); - oscar_string_append(gc->account, str, "\n<br>", _("Idle"), tmp); + oscar_string_append(str, "\n<br>", _("Idle"), tmp); g_free(tmp); } @@ -2852,7 +2861,7 @@ if (userinfo->status[0] != '\0') tmp = oscar_encoding_to_utf8(userinfo->status_encoding, userinfo->status, userinfo->status_len); - oscar_string_append(gc->account, str, "\n<br>", _("Available Message"), tmp); + oscar_string_convert_and_append(account, str, "\n<br>", _("Available Message"), tmp); g_free(tmp); } @@ -3598,9 +3607,10 @@ static int gaim_icqinfo(OscarData *od, FlapConnection *conn, FlapFrame *fr, ...) { - GaimConnection *gc = od->gc; + GaimConnection *gc; + GaimAccount *account; GaimBuddy *buddy; - struct buddyinfo *bi = NULL; + struct buddyinfo *bi; gchar who[16]; GString *str; gchar *utf8; @@ -3608,6 +3618,9 @@ va_list ap; struct aim_icq_info *info; + gc = od->gc; + account = gaim_connection_get_account(gc); + va_start(ap, fr); info = va_arg(ap, struct aim_icq_info *); va_end(ap); @@ -3620,20 +3633,22 @@ buddy = gaim_find_buddy(gaim_connection_get_account(gc), who); if (buddy != NULL) bi = g_hash_table_lookup(od->buddyinfo, gaim_normalize(buddy->account, buddy->name)); + else + bi = NULL; g_string_append_printf(str, "<b>%s:</b> %s", _("UIN"), who); - oscar_string_append(gc->account, str, "\n<br>", _("Nick"), info->nick); + oscar_string_convert_and_append(account, str, "\n<br>", _("Nick"), info->nick); if ((bi != NULL) && (bi->ipaddr != 0)) { char *tstr = g_strdup_printf("%hhu.%hhu.%hhu.%hhu", (bi->ipaddr & 0xff000000) >> 24, (bi->ipaddr & 0x00ff0000) >> 16, (bi->ipaddr & 0x0000ff00) >> 8, (bi->ipaddr & 0x000000ff)); - oscar_string_append(gc->account, str, "\n<br>", _("IP Address"), tstr); + oscar_string_append(str, "\n<br>", _("IP Address"), tstr); g_free(tstr); } - oscar_string_append(gc->account, str, "\n<br>", _("First Name"), info->first); - oscar_string_append(gc->account, str, "\n<br>", _("Last Name"), info->last); + oscar_string_convert_and_append(account, str, "\n<br>", _("First Name"), info->first); + oscar_string_convert_and_append(account, str, "\n<br>", _("Last Name"), info->last); if (info->email && info->email[0] && (utf8 = oscar_utf8_try_convert(gc->account, info->email))) { g_string_append_printf(str, "\n<br><b>%s:</b> <a href=\"mailto:%s\">%s</a>", _("E-Mail Address"), utf8, utf8); g_free(utf8); @@ -3647,9 +3662,9 @@ } } } - oscar_string_append(gc->account, str, "\n<br>", _("Mobile Phone"), info->mobile); + oscar_string_convert_and_append(account, str, "\n<br>", _("Mobile Phone"), info->mobile); if (info->gender != 0) - oscar_string_append(gc->account, str, "\n<br>", _("Gender"), info->gender == 1 ? _("Female") : _("Male")); + oscar_string_append(str, "\n<br>", _("Gender"), info->gender == 1 ? _("Female") : _("Male")); if ((info->birthyear > 1900) && (info->birthmonth > 0) && (info->birthday > 0)) { /* Initialize the struct properly or strftime() will crash * under some conditions (e.g. Debian sarge w/ LANG=en_HK). */ @@ -3665,13 +3680,13 @@ * feel free to remove it. --rlaager */ mktime(tm); - oscar_string_append(gc->account, str, "\n<br>", _("Birthday"), + oscar_string_append(str, "\n<br>", _("Birthday"), gaim_date_format_short(tm)); } if ((info->age > 0) && (info->age < 255)) { char age[5]; snprintf(age, sizeof(age), "%hhd", info->age); - oscar_string_append(gc->account, str, "\n<br>", _("Age"), age); + oscar_string_append(str, "\n<br>", _("Age"), age); } if (info->personalwebpage && info->personalwebpage[0] && (utf8 = oscar_utf8_try_convert(gc->account, info->personalwebpage))) { g_string_append_printf(str, "\n<br><b>%s:</b> <a href=\"%s\">%s</a>", _("Personal Web Page"), utf8, utf8); @@ -3684,25 +3699,25 @@ g_string_append_printf(str, "<hr>"); if ((info->homeaddr && (info->homeaddr[0])) || (info->homecity && info->homecity[0]) || (info->homestate && info->homestate[0]) || (info->homezip && info->homezip[0])) { g_string_append_printf(str, "<b>%s:</b>", _("Home Address")); - oscar_string_append(gc->account, str, "\n<br>", _("Address"), info->homeaddr); - oscar_string_append(gc->account, str, "\n<br>", _("City"), info->homecity); - oscar_string_append(gc->account, str, "\n<br>", _("State"), info->homestate); - oscar_string_append(gc->account, str, "\n<br>", _("Zip Code"), info->homezip); + oscar_string_convert_and_append(account, str, "\n<br>", _("Address"), info->homeaddr); + oscar_string_convert_and_append(account, str, "\n<br>", _("City"), info->homecity); + oscar_string_convert_and_append(account, str, "\n<br>", _("State"), info->homestate); + oscar_string_convert_and_append(account, str, "\n<br>", _("Zip Code"), info->homezip); g_string_append_printf(str, "\n<hr>"); } if ((info->workaddr && info->workaddr[0]) || (info->workcity && info->workcity[0]) || (info->workstate && info->workstate[0]) || (info->workzip && info->workzip[0])) { g_string_append_printf(str, "<b>%s:</b>", _("Work Address")); - oscar_string_append(gc->account, str, "\n<br>", _("Address"), info->workaddr); - oscar_string_append(gc->account, str, "\n<br>", _("City"), info->workcity); - oscar_string_append(gc->account, str, "\n<br>", _("State"), info->workstate); - oscar_string_append(gc->account, str, "\n<br>", _("Zip Code"), info->workzip); + oscar_string_convert_and_append(account, str, "\n<br>", _("Address"), info->workaddr); + oscar_string_convert_and_append(account, str, "\n<br>", _("City"), info->workcity); + oscar_string_convert_and_append(account, str, "\n<br>", _("State"), info->workstate); + oscar_string_convert_and_append(account, str, "\n<br>", _("Zip Code"), info->workzip); g_string_append_printf(str, "\n<hr>"); } if ((info->workcompany && info->workcompany[0]) || (info->workdivision && info->workdivision[0]) || (info->workposition && info->workposition[0]) || (info->workwebpage && info->workwebpage[0])) { g_string_append_printf(str, "<b>%s:</b>", _("Work Information")); - oscar_string_append(gc->account, str, "\n<br>", _("Company"), info->workcompany); - oscar_string_append(gc->account, str, "\n<br>", _("Division"), info->workdivision); - oscar_string_append(gc->account, str, "\n<br>", _("Position"), info->workposition); + oscar_string_convert_and_append(account, str, "\n<br>", _("Company"), info->workcompany); + oscar_string_convert_and_append(account, str, "\n<br>", _("Division"), info->workdivision); + oscar_string_convert_and_append(account, str, "\n<br>", _("Position"), info->workposition); if (info->workwebpage && info->workwebpage[0] && (utf8 = oscar_utf8_try_convert(gc->account, info->workwebpage))) { g_string_append_printf(str, "\n<br><b>%s:</b> <a href=\"%s\">%s</a>", _("Web Page"), utf8, utf8); g_free(utf8); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |