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: <ro...@us...> - 2006-06-16 03:24:49
|
Revision: 16267 Author: roast Date: 2006-06-15 20:24:46 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16267&view=rev Log Message: ----------- xml logger can now read the stuff it writes. no event support yet. Modified Paths: -------------- branches/soc-2006-file-loggers/src/log.c Modified: branches/soc-2006-file-loggers/src/log.c =================================================================== --- branches/soc-2006-file-loggers/src/log.c 2006-06-16 03:24:25 UTC (rev 16266) +++ branches/soc-2006-file-loggers/src/log.c 2006-06-16 03:24:46 UTC (rev 16267) @@ -52,7 +52,7 @@ static void xml_logger_finalize(GaimLog *log); static GList *xml_logger_list(GaimLogType type, const char *sn, GaimAccount *account); static GList *xml_logger_list_syslog(GaimAccount *account); -//static char *xml_logger_read(GaimLog *log, GaimLogReadFlags *flags); +static char *xml_logger_read(GaimLog *log, GaimLogReadFlags *flags); static int xml_logger_total_size(GaimLogType type, const char *name, GaimAccount *account); static gsize html_logger_write(GaimLog *log, GaimMessageFlags type, @@ -572,7 +572,7 @@ xml_logger_write, xml_logger_finalize, xml_logger_list, - txt_logger_read, + xml_logger_read, gaim_log_common_sizer, xml_logger_total_size, xml_logger_list_syslog); @@ -1086,8 +1086,25 @@ return gaim_log_common_lister(type, sn, account, ".chatlog", xml_logger); } -// xml_logger_Read +static char *xml_logger_read(GaimLog *log, GaimLogReadFlags *flags) +{ + char *read; + GaimLogCommonLoggerData *data = log->logger_data; + *flags = GAIM_LOG_READ_NO_NEWLINE; + if (!data || !data->path) + return g_strdup(_("<font color=\"red\"><b>Unable to find log path!</b></font>")); + if (g_file_get_contents(data->path, &read, NULL, NULL)) { + gboolean bad_formatting; + char *processed; + bad_formatting = gaim_ufl_to_xhtml(read, &processed); + + return processed; + } + return g_strdup_printf(_("<font color=\"red\"><b>Could not read file: %s</b></font>"), data->path); + +} + static int xml_logger_total_size(GaimLogType type, const char *name, GaimAccount *account) { return gaim_log_common_total_sizer(type, name, account, ".chatlog"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ro...@us...> - 2006-06-16 03:24:29
|
Revision: 16266 Author: roast Date: 2006-06-15 20:24:25 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16266&view=rev Log Message: ----------- added a unified xml logging format to gtk imhtml parser Modified Paths: -------------- branches/soc-2006-file-loggers/src/util.c branches/soc-2006-file-loggers/src/util.h Modified: branches/soc-2006-file-loggers/src/util.c =================================================================== --- branches/soc-2006-file-loggers/src/util.c 2006-06-16 03:06:31 UTC (rev 16265) +++ branches/soc-2006-file-loggers/src/util.c 2006-06-16 03:24:25 UTC (rev 16266) @@ -1512,6 +1512,310 @@ g_string_free(plain, TRUE); } +gboolean +gaim_ufl_to_xhtml(const char *ufl, char **xhtml_out) +{ + GString *xhtml = g_string_new(""); + GList *tags = NULL, *tag; + const char *c = ufl; + + GString *loggedby = NULL; + gboolean bad_formatting = FALSE; + + while(!bad_formatting && c && *c) { + if(*c == '<') { + if (*(c+1) == '/') { /* list all expected closing tags */ + if(!g_ascii_strncasecmp(c, "</chat", 6)) { + const char *p = c; + while(*p && *p != '>') { + p++; + } + if (*p == '>') { + p++; + /* get rid of new lines */ + if (*p == '\n') + p++; + } + c = p; + } + } else { /* opening tag */ + if(!g_ascii_strncasecmp(c, "<?xml", 5)) { + const char *p = c; + while(*p && *p != '>') { + p++; + } + if (*p == '>') { + p++; + /* get rid of new lines */ + if (*p == '\n') + p++; + } + c = p; + } else if(!g_ascii_strncasecmp(c, "<event", 6)) { + /* TODO: the event tag parsing. will do after message is done */ + const char *p = c; + while (*p && *p != '>') { + p++; + } + if (*p == '>') { + p++; + /* get rid of new lines */ + if (*p == '\n') + p++; + } + c = p; + } else if(!g_ascii_strncasecmp(c, "<chat", 5)) { + const char *p = c; + bad_formatting = TRUE; + + while(*p && *p != '>') { + bad_formatting = FALSE; + if(!g_ascii_strncasecmp(p, "account=", strlen("account="))) { + const char *q = p + strlen("account="); + char delim = 0; + if (loggedby == NULL) + loggedby = g_string_new(""); + else { + bad_formatting = TRUE; + continue; + } + if(*q == '\'' || *q == '\"') { + delim = *q; + q++; + } + while(*q && ((delim != 0 && *q != delim) || + (delim == 0 && *q != ' '))) { + loggedby = g_string_append_c(loggedby, *q); + q++; + } + p = q; + } + p++; + } + if (*p == '>') { + p++; + /* get rid of new lines */ + if (*p == '\n') + p++; + } + c = p; + } else if(!g_ascii_strncasecmp(c, "<message", 8)) { + const char *p = c; + GString *msgdata = g_string_new(""); + gboolean self_closing = FALSE; + char *msgfixed = NULL; + GString *timestamp = g_string_new(""); + GString *sender = g_string_new(""); + gboolean selfsent = FALSE, autoresp = FALSE, meify = FALSE; + struct tm tm; + + /* assume bad formatting. attributes must exist */ + bad_formatting = TRUE; + + while(*p && *p != '>') { + bad_formatting = FALSE; + if (!g_ascii_strncasecmp(p, "time=", strlen("time="))) { + const char *q = p + strlen("time="); + char delim = 0; + + if(*q == '\'' || *q == '\"') { + delim = *q; + q++; + } else { + bad_formatting = TRUE; + break; + } + + while(*q && *q != delim) { + timestamp = g_string_append_c(timestamp, *q); + q++; + } + /* q is now pointing at the delim, hopefully */ + p = q; + } else if(!g_ascii_strncasecmp(p, "sender=", strlen("sender="))) { + const char *q = p + strlen("sender="); + char delim = 0; + + if(*q == '\'' || *q == '\"') { + delim = *q; + q++; + } else { + bad_formatting = TRUE; + break; + } + + while(*q && *q != delim) { + sender = g_string_append_c(sender, *q); + q++; + } + /* q is now pointing at the delim, hopefully */ + p = q; + } else if(!g_ascii_strncasecmp(p, "data=", strlen("data="))) { + /* TODO: this may NOT be ratified. removed if deemed illegal! */ + const char *q = p + strlen("data="); + char delim = 0; + + if(*q == '\'' || *q == '\"') { + delim = *q; + q++; + } else { + bad_formatting = TRUE; + break; + } + + while(*q && *q != delim) { + msgdata = g_string_append_c(msgdata, *q); + q++; + } + /* q is now pointing at the delim, hopefully */ + p = q; + } else if(!g_ascii_strncasecmp(p, "self=\"true\"", strlen("self=\"true\"")) || + !g_ascii_strncasecmp(p, "self='true'", strlen("self='true'"))) { + /* p now points to the delim, not the end of the string */ + p += strlen("self='true"); + selfsent = TRUE; + } else if(!g_ascii_strncasecmp(p, "auto=\"true\"", strlen("auto=\"true\"")) || + !g_ascii_strncasecmp(p, "auto='true'", strlen("auto='true'"))) { + /* p now points to the delim, not the end of the string */ + p += strlen("auto='true"); + autoresp = TRUE; + } else if(!g_ascii_strncasecmp(p, "type=\"action\"", strlen("type=\"action\"")) || + !g_ascii_strncasecmp(p, "type='action'", strlen("type='action'"))) { + /* p now points to the delim, not the end of the string */ + p += strlen("type='action'"); + meify = TRUE; + } else if(!g_ascii_strncasecmp(p, "/>", strlen("/>"))) { + /* we want *p == '>' at the end of this while loop */ + self_closing = TRUE; + } + p++; + } + if (*p == '>') { + p++; + /* get rid of new lines */ + if (*p == '\n') + p++; + } + + /* check that all required attributes were set + or if the msgdata was not set and it self-closed */ + if (timestamp->len == 0 || sender->len == 0 || + (self_closing && msgdata->len == 0)) { + bad_formatting = TRUE; + continue; + } + + if (!self_closing) { + while(*p) { + if (!g_ascii_strncasecmp(p, "</message>", strlen("</message>"))) { + p += strlen("</message>"); + break; + } + msgdata = g_string_append_c(msgdata, *p); + + p++; + } + /* get rid of new lines */ + if (*p == '\n') + p++; + + c = p; + } + + /* now create the gaim markup for this */ + /* we have access to: message.timestamp, message.sender, selfsent, message.auto msgdata/msgfixed, chat's loggedby */ + gaim_str_to_time(timestamp->str, FALSE, &tm, NULL, NULL); + + if (meify) { + g_string_append_printf(xhtml, "<font color=\"062585\"><font size=\"2\">(%s)</font> <b>***%s</b></font> %s<br />\n", gaim_time_format(&tm), sender->str, msgdata->str); + } else if (!strncmp(sender->str, loggedby->str, strlen(sender->str)) && !selfsent) { + g_string_append_printf(xhtml, "<font color=\"16569E\"><font size=\"2\">(%s)</font> <b>%s%s: </b></font> %s<br />\n", gaim_time_format(&tm), (autoresp)?"Auto-response from ":"", sender->str, msgdata->str); + } else { + g_string_append_printf(xhtml, "<font color=\"A82F2F\"><font size=\"2\">(%s)</font> <b>%s%s: </b></font> %s<br />\n", gaim_time_format(&tm), (autoresp)?"Auto-response from ":"", sender->str, msgdata->str); + } + + g_string_free(msgdata, TRUE); + g_free(msgfixed); + } else if(!g_ascii_strncasecmp(c, "<!--", strlen("<!--"))) { + char *p = strstr(c + strlen("<!--"), "-->"); + if(p) { + xhtml = g_string_append(xhtml, "<!--"); + c += strlen("<!--"); + continue; + } + } + } + } else if(*c == '&') { + char buf[7]; + char *pln; + int len = 1; + guint pound; + if(!g_ascii_strncasecmp(c, "&", 5)) { + pln = "&"; + len = 5; + } else if(!g_ascii_strncasecmp(c, "<", 4)) { + pln = "<"; + len = 4; + } else if(!g_ascii_strncasecmp(c, ">", 4)) { + pln = ">"; + len = 4; + } else if(!g_ascii_strncasecmp(c, " ", 6)) { + pln = " "; + len = 6; + } else if(!g_ascii_strncasecmp(c, "©", 6)) { + pln = "©"; + len = 6; + } else if(!g_ascii_strncasecmp(c, """, 6)) { + pln = "\""; + len = 6; + } else if(!g_ascii_strncasecmp(c, "®", 5)) { + pln = "®"; + len = 5; + } else if(!g_ascii_strncasecmp(c, "'", 6)) { + pln = "\'"; + len = 6; + } else if(*(c+1) == '#' && (sscanf(c, "&#%u;", £) == 1) && + pound != 0 && *(c+3+(gint)log10(pound)) == ';') { + int buflen = g_unichar_to_utf8((gunichar)pound, buf); + buf[buflen] = '\0'; + pln = buf; + + + len = 2; + while(isdigit((gint) c [len])) len++; + if(c [len] == ';') len++; + } else { + len = 1; + g_snprintf(buf, sizeof(buf), "%c", *c); + pln = buf; + } + xhtml = g_string_append_len(xhtml, c, len); + c += len; + } else { + if (*c != ' ' && *c != '\t' && *c != '\n') { + /* don't copy over the whitespace in the XML file */ + xhtml = g_string_append_c(xhtml, *c); + } + c++; + } + } + tag = tags; + while(tag) { + struct gaim_parse_tag *pt = tag->data; + if(!pt->ignore) + g_string_append_printf(xhtml, "</%s>", pt->dest_tag); + tag = tag->next; + } + g_list_free(tags); + if(xhtml_out) + *xhtml_out = g_strdup(xhtml->str); + g_string_free(xhtml, TRUE); + + /* notify caller if bad formatting was encountered */ + return bad_formatting == TRUE; +} + + /* The following are probably reasonable changes: * - \n should be converted to a normal space * - in addition to <br>, <p> and <div> etc. should also be converted into \n Modified: branches/soc-2006-file-loggers/src/util.h =================================================================== --- branches/soc-2006-file-loggers/src/util.h 2006-06-16 03:06:31 UTC (rev 16265) +++ branches/soc-2006-file-loggers/src/util.h 2006-06-16 03:24:25 UTC (rev 16266) @@ -396,6 +396,15 @@ char **dest_plain); /** + * Converts Unified Logging Format XML to GTK IMHTML. + * + * @param ufl The ULF XML. + * @param xhtml_out The destination GTK IMHTML output. + * @return TRUE if input was well formatted, FALSE if input was not well formatted (and expect faulty output). + */ +gboolean gaim_ufl_to_xhtml(const char *ulf, char **xhtml_out); + +/** * Strips HTML tags from a string. * * @param str The string to strip HTML from. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ro...@us...> - 2006-06-16 03:06:35
|
Revision: 16265 Author: roast Date: 2006-06-15 20:06:31 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16265&view=rev Log Message: ----------- corrected the closing tag in the ULF logger Modified Paths: -------------- branches/soc-2006-file-loggers/src/log.c Modified: branches/soc-2006-file-loggers/src/log.c =================================================================== --- branches/soc-2006-file-loggers/src/log.c 2006-06-15 01:51:10 UTC (rev 16264) +++ branches/soc-2006-file-loggers/src/log.c 2006-06-16 03:06:31 UTC (rev 16265) @@ -1071,7 +1071,7 @@ if (data->file) { const char *date = gaim_utf8_strftime("%F %T%z", localtime(NULL)); fprintf(data->file, "\t<event time=\"%s\" type=\"logEnd\" />\n", date); - fprintf(data->file, "</conversation>\n"); + fprintf(data->file, "</chat>\n"); fclose(data->file); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-06-15 01:51:20
|
Revision: 16264 Author: rlaager Date: 2006-06-14 18:51:10 -0700 (Wed, 14 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16264&view=rev Log Message: ----------- (20:48:41) notsmack: http://gaim.sourceforge.net/protocol.php#jabber - "Gaim can act as a Jabber client thanks to libxode and libjabber, which are Open Source and provided by Jabber."... i think that's out of date? Modified Paths: -------------- web/htdocs/protocol.php Modified: web/htdocs/protocol.php =================================================================== --- web/htdocs/protocol.php 2006-06-12 13:24:10 UTC (rev 16263) +++ web/htdocs/protocol.php 2006-06-15 01:51:10 UTC (rev 16264) @@ -78,8 +78,7 @@ Jabber.org website). Originally designed by Jeremie Miller, Jabber has grown to be the largest and most successful Open Source IM System available. The Jabber servers and source code are available for download, - as are clients for nearly every OS. Gaim can act as a Jabber client thanks - to libxode and libjabber, which are Open Source and provided by Jabber. + as are clients for nearly every OS. Gaim can act as a Jabber client. </p> <p> Jabber usernames are reminiscent of email addresses: a typical Jabber This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-06-12 13:24:18
|
Revision: 16263 Author: rlaager Date: 2006-06-12 06:24:10 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16263&view=rev Log Message: ----------- Fix SF Bug #1504509 "in file trunk/plugins/tcl/Makefile.mingw is forgotten to add the new file tcl_ref.c to the source list." Modified Paths: -------------- trunk/plugins/tcl/Makefile.mingw Modified: trunk/plugins/tcl/Makefile.mingw =================================================================== --- trunk/plugins/tcl/Makefile.mingw 2006-06-12 04:43:43 UTC (rev 16262) +++ trunk/plugins/tcl/Makefile.mingw 2006-06-12 13:24:10 UTC (rev 16263) @@ -63,6 +63,7 @@ C_SRC = tcl.c \ tcl_cmds.c \ tcl_glib.c \ + tcl_ref.c \ tcl_signals.c This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aar...@us...> - 2006-06-12 04:43:57
|
Revision: 16262 Author: aaronsheldon Date: 2006-06-11 21:43:43 -0700 (Sun, 11 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16262&view=rev Log Message: ----------- Calls update contact with a buddy instead of a contact (faster), switches a check order for to be better in average case, removes the possibility of a double-gtk-blist-update, greatly improves the performance of group-update, and corrects a bunch of style issues. 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-12 04:23:04 UTC (rev 16261) +++ branches/soc-2006-blist-efficiency/src/gtkblist.c 2006-06-12 04:43:43 UTC (rev 16262) @@ -121,6 +121,7 @@ static void gaim_gtk_blist_update_buddy(GaimBuddyList *list, GaimBlistNode *node); static void gaim_gtk_blist_selection_changed(GtkTreeSelection *selection, gpointer data); static void gaim_gtk_blist_update(GaimBuddyList *list, GaimBlistNode *node); +static void gaim_gtk_blist_update_contact(GaimBuddyList *list, GaimBlistNode *node); static char *gaim_get_tooltip_text(GaimBlistNode *node, gboolean full); static const char *item_factory_translate_func (const char *path, gpointer func_data); static gboolean get_iter_from_node(GaimBlistNode *node, GtkTreeIter *iter); @@ -877,8 +878,7 @@ gtk_main_iteration(); gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW(gtkblist->treeview), path, NULL, FALSE, 0, 0); - - gaim_gtk_blist_update(NULL, node); + gaim_gtk_blist_update_contact(NULL, node->child); gtk_tree_path_free(path); } @@ -3063,7 +3063,7 @@ if (buddy && gaim_presence_is_idle(gaim_buddy_get_presence(buddy))) - gaim_gtk_blist_update(list, cnode); + gaim_gtk_blist_update_contact(list, (GaimBlistNode*)buddy); } } } @@ -3903,7 +3903,7 @@ while (node) { - if (!GAIM_BLIST_NODE_IS_GROUP(node) && remove) + if (remove && !GAIM_BLIST_NODE_IS_GROUP(node)) gaim_gtk_blist_hide_node(list, node); gaim_gtk_blist_update(list, node); @@ -3995,7 +3995,7 @@ gtkblist->selected_node = new_selection; if(new_selection) gaim_gtk_blist_update(NULL, new_selection); - if(old_selection) + else if(old_selection) gaim_gtk_blist_update(NULL, old_selection); } @@ -4088,7 +4088,9 @@ if (GAIM_BLIST_NODE_IS_GROUP(node)) gnode = node; - else if (GAIM_BLIST_NODE_IS_BUDDY(node)) + else if (GAIM_BLIST_NODE_IS_CONTACT(node)) + gnode = node->parent; + else if (GAIM_BLIST_NODE_IS_BUDDY(node)) //maybe OR'ed with IS_CHAT? gnode = node->parent->parent; g_return_if_fail(GAIM_BLIST_NODE_IS_GROUP(gnode)); @@ -4101,23 +4103,9 @@ if (count > 0 || gaim_prefs_get_bool("/gaim/gtk/blist/show_empty_groups")) show = TRUE; - else if (GAIM_BLIST_NODE_IS_BUDDY(node)){ + else if (GAIM_BLIST_NODE_IS_BUDDY(node)){ /* Or chat? */ if (buddy_is_displayable((GaimBuddy*)node)) - show = TRUE; - /* Fallback loop */ - } else { - GaimBlistNode *n; - n = gnode->child; - while (n && !GAIM_BLIST_NODE_IS_GROUP(n)) { - if (GAIM_BLIST_NODE_IS_BUDDY(n)) { - if (buddy_is_displayable((GaimBuddy*)n)) { - show = TRUE; - break; - } - } - n = gaim_blist_node_next(n, FALSE); - } - } + show = TRUE;} if (show) { char *mark, *esc; @@ -4162,7 +4150,8 @@ mark = gaim_gtk_blist_get_name_markup(buddy, selected); if (gaim_prefs_get_bool("/gaim/gtk/blist/show_idle_time") && - gaim_presence_is_idle(presence)) + gaim_presence_is_idle(presence) && + !gaim_prefs_get_bool("/gaim/gtk/blist/show_buddy_icons")) { time_t idle_secs = gaim_presence_get_idle_time(presence); @@ -4173,7 +4162,6 @@ time(&t); ihrs = (t - idle_secs) / 3600; imin = ((t - idle_secs) / 60) % 60; - if (ihrs > 0) idle = g_strdup_printf("%d:%02d", ihrs, imin); else @@ -4211,41 +4199,41 @@ can know in advance which buddy has changed so we can just update that */ static void gaim_gtk_blist_update_contact(GaimBuddyList *list, GaimBlistNode *node) { - GaimBlistNode *bnode; + GaimBlistNode *cnode; GaimContact *contact; GaimBuddy *buddy; struct _gaim_gtk_blist_node *gtknode; if (GAIM_BLIST_NODE_IS_BUDDY(node)) - bnode = node->parent; + cnode = node->parent; else - bnode = node; + cnode = node; - g_return_if_fail(GAIM_BLIST_NODE_IS_CONTACT(bnode)); + g_return_if_fail(GAIM_BLIST_NODE_IS_CONTACT(cnode)); /* First things first, update the group */ if (GAIM_BLIST_NODE_IS_BUDDY(node)) gaim_gtk_blist_update_group(list, node); else - gaim_gtk_blist_update_group(list, bnode->parent); + gaim_gtk_blist_update_group(list, cnode->parent); - contact = (GaimContact*)bnode; + contact = (GaimContact*)cnode; buddy = gaim_contact_get_priority_buddy(contact); if (buddy_is_displayable(buddy)) { GtkTreeIter iter; - if(!insert_node(list, bnode, &iter)) + if(!insert_node(list, cnode, &iter)) return; - gtknode = (struct _gaim_gtk_blist_node *)bnode->ui_data; + gtknode = (struct _gaim_gtk_blist_node *)cnode->ui_data; if(gtknode->contact_expanded) { GdkPixbuf *status; char *mark; - status = gaim_gtk_blist_get_status_icon(bnode, + status = gaim_gtk_blist_get_status_icon(cnode, (gaim_prefs_get_bool("/gaim/gtk/blist/show_buddy_icons") ? GAIM_STATUS_ICON_LARGE : GAIM_STATUS_ICON_SMALL)); @@ -4262,10 +4250,10 @@ if(status) g_object_unref(status); } else { - buddy_node(buddy, &iter, bnode); + buddy_node(buddy, &iter, cnode); } } else { - gaim_gtk_blist_hide_node(list, bnode); + gaim_gtk_blist_hide_node(list, cnode); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aar...@us...> - 2006-06-12 04:23:13
|
Revision: 16261 Author: aaronsheldon Date: 2006-06-11 21:23:04 -0700 (Sun, 11 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16261&view=rev Log Message: ----------- Saves 1 (pointless) check/loop through blist_node_next. Modified Paths: -------------- branches/soc-2006-blist-efficiency/src/blist.c Modified: branches/soc-2006-blist-efficiency/src/blist.c =================================================================== --- branches/soc-2006-blist-efficiency/src/blist.c 2006-06-11 21:48:41 UTC (rev 16260) +++ branches/soc-2006-blist-efficiency/src/blist.c 2006-06-12 04:23:04 UTC (rev 16261) @@ -731,13 +731,15 @@ GaimBlistNode *gaim_blist_node_next(GaimBlistNode *node, gboolean offline) { GaimBlistNode *ret = node; - + + if (offline) + return get_next_node(ret, TRUE); do { ret = get_next_node(ret, TRUE); - } while (ret && !offline && GAIM_BLIST_NODE_IS_BUDDY(ret) && + } while (ret && GAIM_BLIST_NODE_IS_BUDDY(ret) && !gaim_account_is_connected(gaim_buddy_get_account((GaimBuddy *)ret))); - + return ret; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ro...@us...> - 2006-06-11 21:48:47
|
Revision: 16260 Author: roast Date: 2006-06-11 14:48:41 -0700 (Sun, 11 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16260&view=rev Log Message: ----------- added support for gaim:message.self for conversations that are with yourself Modified Paths: -------------- branches/soc-2006-file-loggers/src/log.c Modified: branches/soc-2006-file-loggers/src/log.c =================================================================== --- branches/soc-2006-file-loggers/src/log.c 2006-06-11 19:28:26 UTC (rev 16259) +++ branches/soc-2006-file-loggers/src/log.c 2006-06-11 21:48:41 UTC (rev 16260) @@ -1029,10 +1029,26 @@ written += fprintf(data->file, "\t<message time=\"%s\" sender=\"%s\" gaim:type=\"whisper\">%s</message>\n", date, from, msg_fixed); } else if (type & GAIM_MESSAGE_AUTO_RESP && (type & GAIM_MESSAGE_SEND || type & GAIM_MESSAGE_RECV)) { - written += fprintf(data->file, "\t<message time=\"%s\" sender=\"%s\" auto=\"true\">%s</message>\n", date, from, msg_fixed); + gboolean selfsending = FALSE; + if (!g_ascii_strncasecmp(gaim_account_get_username(log->account), + gaim_account_get_username(log->conv->account), + strlen(gaim_account_get_username(log->account)))) { + selfsending = (type & GAIM_MESSAGE_RECV); + } + + written += fprintf(data->file, "\t<message time=\"%s\" sender=\"%s\"%s auto=\"true\">%s</message>\n", + date, from, selfsending ? " gaim:self=\"true\"" : "", msg_fixed); } else if (type & GAIM_MESSAGE_SEND || type & GAIM_MESSAGE_RECV) { - written += fprintf(data->file, "\t<message time=\"%s\" sender=\"%s\">%s</message>\n", date, from, msg_fixed); + gboolean selfsending = FALSE; + if (!g_ascii_strncasecmp(gaim_account_get_username(log->account), + gaim_account_get_username(log->conv->account), + strlen(gaim_account_get_username(log->account)))) { + selfsending = (type & GAIM_MESSAGE_RECV); + } + + written += fprintf(data->file, "\t<message time=\"%s\" sender=\"%s\"%s>%s</message>\n", + date, from, selfsending ? " gaim:self=\"true\"" : "", msg_fixed); } else { gaim_debug_error("log", "Unhandled message type."); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ro...@us...> - 2006-06-11 19:28:33
|
Revision: 16259 Author: roast Date: 2006-06-11 12:28:26 -0700 (Sun, 11 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16259&view=rev Log Message: ----------- merged patch #1504436 Modified Paths: -------------- branches/soc-2006-file-loggers/src/gtkdialogs.c Modified: branches/soc-2006-file-loggers/src/gtkdialogs.c =================================================================== --- branches/soc-2006-file-loggers/src/gtkdialogs.c 2006-06-11 19:08:12 UTC (rev 16258) +++ branches/soc-2006-file-loggers/src/gtkdialogs.c 2006-06-11 19:28:26 UTC (rev 16259) @@ -792,6 +792,9 @@ gaim_request_field_group_add_field(group, field); field = gaim_request_field_account_new("account", _("_Account"), NULL); + if (gaim_accounts_get_all() != NULL) { + gaim_request_field_account_set_value(field, gaim_accounts_get_all()->data); + } gaim_request_field_set_type_hint(field, "account"); gaim_request_field_account_set_show_all(field, TRUE); gaim_request_field_set_visible(field, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-06-11 19:08:19
|
Revision: 16258 Author: rlaager Date: 2006-06-11 12:08:12 -0700 (Sun, 11 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16258&view=rev Log Message: ----------- Merging my last two days' changes from trunk to v2_0_0. In case anyone else is having trouble figuring it out, merges in SVN are apparently handled like this: svn merge -r 16256:16257 https://svn.sourceforge.net/svnroot/gaim/trunk/src/gtkdialogs.c src/gtkdialogs.c Modified Paths: -------------- branches/v2_0_0/configure.ac branches/v2_0_0/pixmaps/smileys/THEMES-HOWTO branches/v2_0_0/src/gtkblist.c branches/v2_0_0/src/gtkdialogs.c Modified: branches/v2_0_0/configure.ac =================================================================== --- branches/v2_0_0/configure.ac 2006-06-11 19:05:45 UTC (rev 16257) +++ branches/v2_0_0/configure.ac 2006-06-11 19:08:12 UTC (rev 16258) @@ -318,8 +318,8 @@ dnl ####################################################################### dnl # Check for Gadu-Gadu client includes and libraries dnl ####################################################################### -AC_ARG_WITH(gadu-includes, [AC_HELP_STRING([--with-gadu-includes=DIR], [compile the GaduGadu plugin against includes in DIR])], [ac_gadu_includes="$withval"], [ac_gadu_includes="no"]) -AC_ARG_WITH(gadu-libs, [AC_HELP_STRING([--with-gadu-libs=DIR], [compile the GaduGadu plugin against the libs in DIR])], [ac_gadu_libs="$withval"], [ac_gadu_libs="no"]) +AC_ARG_WITH(gadu-includes, [AC_HELP_STRING([--with-gadu-includes=DIR], [compile the Gadu-Gadu plugin against includes in DIR])], [ac_gadu_includes="$withval"], [ac_gadu_includes="no"]) +AC_ARG_WITH(gadu-libs, [AC_HELP_STRING([--with-gadu-libs=DIR], [compile the Gadu-Gadu plugin against the libs in DIR])], [ac_gadu_libs="$withval"], [ac_gadu_libs="no"]) GADU_CFLAGS="" GADU_LIBS="" if test -n "$with_gadu_includes" || test -n "$with_gadu_libs"; then @@ -1072,7 +1072,7 @@ dnl These two are inverses of each other <-- stolen from evolution! AC_ARG_ENABLE(gnutls, - [ --enable-gnutls=[yes,no] attempt to use GNUTLS for SSL support (preferred) [default=yes]], + [ --enable-gnutls=[yes,no] attempt to use GnuTLS for SSL support (preferred) [default=yes]], [enable_gnutls="$enableval"], [enable_gnutls="yes"]) @@ -1084,14 +1084,14 @@ msg_ssl="None (MSN will not work without SSL!)" dnl # -dnl # Check for GNUTLS if it's specified. +dnl # Check for GnuTLS if it's specified. dnl # if test "x$enable_gnutls" != "xno"; then enable_gnutls="no" prefix=`eval echo $prefix` AC_ARG_WITH(gnutls-includes, - [ --with-gnutls-includes=PREFIX location of GNUTLS includes.], + [ --with-gnutls-includes=PREFIX location of GnuTLS includes.], [ with_gnutls_includes="$withval" ], [ with_gnutls_includes="$prefix/include" ]) @@ -1100,7 +1100,7 @@ if test "x$with_gnutls_includes" != "xno"; then CPPFLAGS_save="$CPPFLAGS" - AC_MSG_CHECKING(for GNUTLS includes) + AC_MSG_CHECKING(for GnuTLS includes) AC_MSG_RESULT("") CPPFLAGS="$CPPFLAGS -I$with_gnutls_includes" @@ -1116,12 +1116,12 @@ GNUTLS_CFLAGS="" fi else - AC_MSG_CHECKING(for GNUTLS includes) + AC_MSG_CHECKING(for GnuTLS includes) AC_MSG_RESULT(no) fi AC_ARG_WITH(gnutls-libs, - [ --with-gnutls-libs=PREFIX location of GNUTLS libraries.], + [ --with-gnutls-libs=PREFIX location of GnuTLS libraries.], [ with_gnutls_libs="$withval" ]) if test "x$with_gnutls_libs" != "xno" -a \ @@ -1134,7 +1134,7 @@ *) with_gnutls_libs="-L$with_gnutls_libs" ;; esac - AC_CACHE_CHECK([for GNUTLS libraries], gnutls_libs, + AC_CACHE_CHECK([for GnuTLS libraries], gnutls_libs, [ LDFLAGS="$LDFLAGS $with_gnutls_libs -lgnutls -lgcrypt" AC_TRY_LINK_FUNC(gnutls_init, gnutls_libs="yes", gnutls_libs="no") @@ -1142,9 +1142,9 @@ ]) if test "x$gnutls_libs" != "xno"; then - AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GNUTLS]) + AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GnuTLS]) AC_DEFINE(HAVE_SSL) - msg_gnutls="GNUTLS" + msg_gnutls="GnuTLS" GNUTLS_LIBS="$with_gnutls_libs -lgnutls -lgcrypt" enable_gnutls="yes" @@ -1153,7 +1153,7 @@ GNUTLS_LIBS="" fi else - AC_MSG_CHECKING(for GNUTLS libraries) + AC_MSG_CHECKING(for GnuTLS libraries) AC_MSG_RESULT(no) fi else @@ -1168,7 +1168,7 @@ dnl # -dnl # Check for NSS if it's specified, or if GNUTLS checks failed. +dnl # Check for NSS if it's specified, or if GnuTLS checks failed. dnl # if test "x$enable_nss" != "xno"; then Modified: branches/v2_0_0/pixmaps/smileys/THEMES-HOWTO =================================================================== --- branches/v2_0_0/pixmaps/smileys/THEMES-HOWTO 2006-06-11 19:05:45 UTC (rev 16257) +++ branches/v2_0_0/pixmaps/smileys/THEMES-HOWTO 2006-06-11 19:08:12 UTC (rev 16258) @@ -4,10 +4,8 @@ Version 0.60 of Gaim brings up all themable smileys. In the preferences dialog, a user can choose from a selection of looks his smileys will take. This guide is to serve as a reference to those interested in creating third-party smiley themes. -(SME: I'm doing this at 6:30AM; I'm tired, but I can't sleep. Someone make sure I fix this up to make sure it all makes sense when I'm not tired anymore. Right now it's mostly just unassembled thoughts) +Your theme should be contained in a single directory. This directory will be installed in the Gaim smiley theme directory ($HOME/.gaim/smileys/). This directory will contain a file called `theme' that specifies the theme metadata and image files that are used by the theme. The format of the `theme' file is as follows. -Your theme should be contained in a single directory. This directory will be installed in the Gaim smiley theme directory (SME: There should probably be a $HOME/.gaim/smileys/ that the theme could go in too.). This directory will contain a file called `theme' that specifies the theme and image (SME: And possibly sound) files that are used by the theme. The format of the `theme' file is as follows. - The beginning of the file contains some metainformation about the theme in the format Key=Value @@ -19,10 +17,16 @@ Author - The author's name Following this meta-information are "sml" groups. A "sml" group is a group of smileys that will be shown together. For example, each protocol has its own "sml" group (MSN, Yahoo, Gadu-Gadu, etc.). The name of the group is surrounded in square brackets, and each line beneath it (until the next sml group or the end of the file) defines a smiley. -Each line of the group starts with a filename of the icon (SME: Or sound?) followed by a space-delimited list of the characters that represent it. +Each line of the group starts with a filename of the icon followed by a space-delimited list of the characters that represent it. Example: [AIM/ICQ] smiley.png :) :-) In the smiley selector UI, each icon will only be shown once, and the first string representing it will be used. To keep a smiley out of the selector altogether, make the first two characters of the line "! " followed by the filename and emoticons. + +As of 2.0.0beta2, spaces and backslashes in the "list of characters" (see above) must be escaped by prepending them with a backslash. For example, to define a smiley that is represented by ":-/" and ":-\", use: + +[AIM/ICQ] +think.png :-/ :-\\ + Modified: branches/v2_0_0/src/gtkblist.c =================================================================== --- branches/v2_0_0/src/gtkblist.c 2006-06-11 19:05:45 UTC (rev 16257) +++ branches/v2_0_0/src/gtkblist.c 2006-06-11 19:08:12 UTC (rev 16258) @@ -4162,10 +4162,7 @@ ihrs = (t - idle_secs) / 3600; imin = ((t - idle_secs) / 60) % 60; - if (ihrs > 0) - idle = g_strdup_printf("%d:%02d", ihrs, imin); - else - idle = g_strdup_printf("%d", imin); + idle = g_strdup_printf("%d:%02d", ihrs, imin); } } Modified: branches/v2_0_0/src/gtkdialogs.c =================================================================== --- branches/v2_0_0/src/gtkdialogs.c 2006-06-11 19:05:45 UTC (rev 16257) +++ branches/v2_0_0/src/gtkdialogs.c 2006-06-11 19:08:12 UTC (rev 16258) @@ -798,6 +798,16 @@ gaim_request_field_group_add_field(group, field); field = gaim_request_field_account_new("account", _("_Account"), NULL); + + /* gaim_request_field_account_new() only sets a default value if you're + * connected, and it sets it from the list of connected accounts. Since + * we're going to set show_all here, it makes sense to use the first + * account, not the first connected account. */ + if (gaim_accounts_get_all() != NULL) { + gaim_request_field_account_set_default_value(field, gaim_accounts_get_all()->data); + gaim_request_field_account_set_value(field, gaim_accounts_get_all()->data); + } + gaim_request_field_set_type_hint(field, "account"); gaim_request_field_account_set_show_all(field, TRUE); gaim_request_field_set_visible(field, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-06-11 19:05:49
|
Revision: 16257 Author: rlaager Date: 2006-06-11 12:05:45 -0700 (Sun, 11 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16257&view=rev Log Message: ----------- SF Patch #1504436 from roast, with changes by me "gaim_gtkdialogs_log() doesn't set initial account value, but shows an initial account. This is confusing because if the user does not use the hint list to select an account (e.g. he types a name in), gaim_gtkdialogs_log_cb() services an empty call. This patch fixes this." Modified Paths: -------------- trunk/src/gtkdialogs.c Modified: trunk/src/gtkdialogs.c =================================================================== --- trunk/src/gtkdialogs.c 2006-06-11 17:50:47 UTC (rev 16256) +++ trunk/src/gtkdialogs.c 2006-06-11 19:05:45 UTC (rev 16257) @@ -798,6 +798,16 @@ gaim_request_field_group_add_field(group, field); field = gaim_request_field_account_new("account", _("_Account"), NULL); + + /* gaim_request_field_account_new() only sets a default value if you're + * connected, and it sets it from the list of connected accounts. Since + * we're going to set show_all here, it makes sense to use the first + * account, not the first connected account. */ + if (gaim_accounts_get_all() != NULL) { + gaim_request_field_account_set_default_value(field, gaim_accounts_get_all()->data); + gaim_request_field_account_set_value(field, gaim_accounts_get_all()->data); + } + gaim_request_field_set_type_hint(field, "account"); gaim_request_field_account_set_show_all(field, TRUE); gaim_request_field_set_visible(field, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ro...@us...> - 2006-06-11 17:50:51
|
Revision: 16256 Author: roast Date: 2006-06-11 10:50:47 -0700 (Sun, 11 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16256&view=rev Log Message: ----------- a small out of order execution when trying to eliminate warnings Modified Paths: -------------- branches/soc-2006-file-loggers/src/log.c Modified: branches/soc-2006-file-loggers/src/log.c =================================================================== --- branches/soc-2006-file-loggers/src/log.c 2006-06-11 17:23:51 UTC (rev 16255) +++ branches/soc-2006-file-loggers/src/log.c 2006-06-11 17:50:47 UTC (rev 16256) @@ -743,10 +743,11 @@ #if defined (HAVE_TM_GMTOFF) && defined (HAVE_STRUCT_TM_TM_ZONE) long tz_off; const char *rest; - time_t stamp = gaim_str_to_time(gaim_unescape_filename(thetimestamp), FALSE, &tm, &tz_off, &rest); + time_t stamp; char *end; thetimestamp = (thetimestamp != NULL) ? thetimestamp + sizeof(gchar) : filename; + stamp = gaim_str_to_time(gaim_unescape_filename(thetimestamp), FALSE, &tm, &tz_off, &rest); /* As zero is a valid offset, GAIM_NO_TZ_OFF means no offset was * provided. See util.h. Yes, it's kinda ugly. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ro...@us...> - 2006-06-11 17:23:57
|
Revision: 16255 Author: roast Date: 2006-06-11 10:23:51 -0700 (Sun, 11 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16255&view=rev Log Message: ----------- logging timestamps are corrected Modified Paths: -------------- branches/soc-2006-file-loggers/src/log.c Modified: branches/soc-2006-file-loggers/src/log.c =================================================================== --- branches/soc-2006-file-loggers/src/log.c 2006-06-11 06:05:09 UTC (rev 16254) +++ branches/soc-2006-file-loggers/src/log.c 2006-06-11 17:23:51 UTC (rev 16255) @@ -738,12 +738,16 @@ GaimLog *log; GaimLogCommonLoggerData *data; struct tm tm; + const char *thetimestamp = (const char *)g_strrstr(filename, "_"); + #if defined (HAVE_TM_GMTOFF) && defined (HAVE_STRUCT_TM_TM_ZONE) long tz_off; const char *rest; - time_t stamp = gaim_str_to_time(gaim_unescape_filename(filename), FALSE, &tm, &tz_off, &rest); + time_t stamp = gaim_str_to_time(gaim_unescape_filename(thetimestamp), FALSE, &tm, &tz_off, &rest); char *end; + thetimestamp = (thetimestamp != NULL) ? thetimestamp + sizeof(gchar) : filename; + /* As zero is a valid offset, GAIM_NO_TZ_OFF means no offset was * provided. See util.h. Yes, it's kinda ugly. */ if (tz_off != GAIM_NO_TZ_OFF) @@ -761,8 +765,10 @@ g_free(tmp); } #else - time_t stamp = gaim_str_to_time(filename, FALSE, &tm, NULL, NULL); + thetimestamp = (thetimestamp != NULL) ? thetimestamp + sizeof(gchar) : filename; + time_t stamp = gaim_str_to_time(thetimestamp, FALSE, &tm, NULL, NULL); + log = gaim_log_new(type, name, account, NULL, stamp, &tm); #endif @@ -968,12 +974,11 @@ const char *from, time_t time, const char *message) { char *msg_fixed; - const char *date = gaim_utf8_strftime("%F %T%z", localtime(&log->time)); + const char *date = gaim_utf8_strftime("%F %T%z", localtime(&time)); GaimPlugin *plugin = gaim_find_prpl(gaim_account_get_protocol_id(log->account)); GaimLogCommonLoggerData *data = log->logger_data; gsize written = 0; - GaimLogType original_type = log->type; /* This log is new. We could use the loggers 'new' function, but * creating a new file there would result in empty files in the case @@ -981,6 +986,7 @@ */ if (!log->logger_data) { const char *prpl = GAIM_PLUGIN_PROTOCOL_INFO(plugin)->list_icon(log->account, NULL); + gaim_log_common_writer(log, ".chatlog"); data = log->logger_data; @@ -988,6 +994,10 @@ // if file doesn't exist, die if (!data->file) return 0; + // because gaim_utf8_strftime returns a pointer to static data, + // and was called in gaim_log_common_writer + date = gaim_utf8_strftime("%F %T%z", localtime(&time)); + fprintf(data->file, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"); if (log->type == GAIM_LOG_SYSTEM) @@ -996,7 +1006,7 @@ else written += fprintf(data->file, "<chat service=\"%s\" account=\"%s\" version=\"0.3.1-04\">\n", prpl, gaim_account_get_username(log->account)); - written += fprintf(data->file, "\t<event time=\"%s\" type=\"logStart\" \/>\n", date); + written += fprintf(data->file, "\t<event time=\"%s\" type=\"logStart\" />\n", date); } /* if we can't write to the file, give up before we hurt ourselves */ @@ -1028,11 +1038,12 @@ written += fprintf(data->file, "\t<message time=\"%s\" sender=\"%s\">%s</message>\n", date, from, msg_fixed); } - // TODO: haven't written end of file and seeked back - g_free(msg_fixed); fflush(data->file); + // TODO: haven't written end of file and seeked back + // TODO: this is to keep a valid XML document out of the user space buffer + return written; } @@ -1041,8 +1052,8 @@ GaimLogCommonLoggerData *data = log->logger_data; if (data) { if (data->file) { - const char *date = gaim_utf8_strftime("%F %T%z", localtime(&log->time)); - fprintf(data->file, "\t<event time=\"%s\" type=\"logEnd\" \/>\n", date); + const char *date = gaim_utf8_strftime("%F %T%z", localtime(NULL)); + fprintf(data->file, "\t<event time=\"%s\" type=\"logEnd\" />\n", date); fprintf(data->file, "</conversation>\n"); fclose(data->file); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ebl...@us...> - 2006-06-11 06:05:18
|
Revision: 16254 Author: eblanton Date: 2006-06-10 23:05:09 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16254&view=rev Log Message: ----------- Work proceeds apace on the Tcl status API, this time with GaimPresence Modified Paths: -------------- trunk/plugins/tcl/tcl.c trunk/plugins/tcl/tcl_cmds.c trunk/plugins/tcl/tcl_gaim.h Modified: trunk/plugins/tcl/tcl.c =================================================================== --- trunk/plugins/tcl/tcl.c 2006-06-11 00:42:41 UTC (rev 16253) +++ trunk/plugins/tcl/tcl.c 2006-06-11 06:05:09 UTC (rev 16254) @@ -54,6 +54,7 @@ GaimStringref *GaimTclRefConnection; GaimStringref *GaimTclRefConversation; GaimStringref *GaimTclRefPointer; +GaimStringref *GaimTclRefPresence; GaimStringref *GaimTclRefStatus; GaimStringref *GaimTclRefStatusAttr; GaimStringref *GaimTclRefStatusType; @@ -131,6 +132,7 @@ Tcl_CreateObjCommand(interp, "::gaim::debug", tcl_cmd_debug, (ClientData)NULL, NULL); Tcl_CreateObjCommand(interp, "::gaim::notify", tcl_cmd_notify, (ClientData)NULL, NULL); Tcl_CreateObjCommand(interp, "::gaim::prefs", tcl_cmd_prefs, (ClientData)NULL, NULL); + Tcl_CreateObjCommand(interp, "::gaim::presence", tcl_cmd_presence, (ClientData)NULL, NULL); Tcl_CreateObjCommand(interp, "::gaim::send_im", tcl_cmd_send_im, (ClientData)NULL, NULL); Tcl_CreateObjCommand(interp, "::gaim::signal", tcl_cmd_signal, (ClientData)NULL, NULL); Tcl_CreateObjCommand(interp, "::gaim::status", tcl_cmd_status_type, (ClientData)NULL, NULL); @@ -346,6 +348,7 @@ GaimTclRefConnection = gaim_stringref_new("Connection"); GaimTclRefConversation = gaim_stringref_new("Conversation"); GaimTclRefPointer = gaim_stringref_new("Pointer"); + GaimTclRefPresence = gaim_stringref_new("Presence"); GaimTclRefStatus = gaim_stringref_new("Status"); GaimTclRefStatusAttr = gaim_stringref_new("StatusAttr"); GaimTclRefStatusType = gaim_stringref_new("StatusType"); @@ -368,6 +371,7 @@ gaim_stringref_unref(GaimTclRefConnection); gaim_stringref_unref(GaimTclRefConversation); gaim_stringref_unref(GaimTclRefPointer); + gaim_stringref_unref(GaimTclRefPresence); gaim_stringref_unref(GaimTclRefStatus); gaim_stringref_unref(GaimTclRefStatusAttr); gaim_stringref_unref(GaimTclRefStatusType); Modified: trunk/plugins/tcl/tcl_cmds.c =================================================================== --- trunk/plugins/tcl/tcl_cmds.c 2006-06-11 00:42:41 UTC (rev 16253) +++ trunk/plugins/tcl/tcl_cmds.c 2006-06-11 06:05:09 UTC (rev 16254) @@ -99,12 +99,14 @@ Tcl_Obj *result = Tcl_GetObjResult(interp), *list, *elem; const char *cmds[] = { "active_status", "alias", "connect", "connection", "disconnect", "enabled", "find", - "handle", "isconnected", "list", "protocol", - "status_type", "status_types", "username", NULL }; + "handle", "isconnected", "list", "presence", + "protocol", "status_type", "status_types", + "username", NULL }; enum { CMD_ACCOUNT_ACTIVE_STATUS, CMD_ACCOUNT_ALIAS, CMD_ACCOUNT_CONNECT, CMD_ACCOUNT_CONNECTION, CMD_ACCOUNT_DISCONNECT, CMD_ACCOUNT_ENABLED, CMD_ACCOUNT_FIND, CMD_ACCOUNT_HANDLE, CMD_ACCOUNT_ISCONNECTED, CMD_ACCOUNT_LIST, + CMD_ACCOUNT_PRESENCE, CMD_ACCOUNT_PROTOCOL, CMD_ACCOUNT_STATUS_TYPE, CMD_ACCOUNT_STATUS_TYPES, CMD_ACCOUNT_USERNAME } cmd; const char *listopts[] = { "-all", "-online", NULL }; @@ -243,6 +245,16 @@ } Tcl_SetObjResult(interp, list); break; + case CMD_ACCOUNT_PRESENCE: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "account"); + return TCL_ERROR; + } + if ((account = tcl_validate_account(objv[2], interp)) == NULL) + return TCL_ERROR; + Tcl_SetObjResult(result, gaim_tcl_ref_new(GaimTclRefPresence, + gaim_account_get_presence(account))); + break; case CMD_ACCOUNT_PROTOCOL: if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "account"); @@ -882,6 +894,212 @@ return TCL_OK; } +int tcl_cmd_presence(ClientData unused, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) +{ + const char *cmds[] = { "account", "active_status", "available", + "chat_user", "context", "conversation", "idle", + "login", "online", "status", "statuses", NULL }; + enum { CMD_PRESENCE_ACCOUNT, CMD_PRESENCE_ACTIVE_STATUS, + CMD_PRESENCE_AVAILABLE, CMD_PRESENCE_CHAT_USER, + CMD_PRESENCE_CONTEXT, CMD_PRESENCE_CONVERSATION, + CMD_PRESENCE_IDLE, CMD_PRESENCE_LOGIN, CMD_PRESENCE_ONLINE, + CMD_PRESENCE_STATUS, CMD_PRESENCE_STATUSES } cmd; + Tcl_Obj *result = Tcl_GetObjResult(interp); + Tcl_Obj *list, *elem; + GaimPresence *presence; + const GList *cur; + int error, idle, idle_time, login_time; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?args?"); + return TCL_ERROR; + } + + if ((error = Tcl_GetIndexFromObj(interp, objv[1], cmds, "subcommand", 0, (int *)&cmd)) != TCL_OK) + return error; + + switch (cmd) { + case CMD_PRESENCE_ACCOUNT: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "presence"); + return TCL_ERROR; + } + if ((presence = gaim_tcl_ref_get(interp, objv[2], GaimTclRefPresence)) == NULL) + return TCL_ERROR; + Tcl_SetObjResult(interp, gaim_tcl_ref_new(GaimTclRefAccount, + gaim_presence_get_account(presence))); + break; + case CMD_PRESENCE_ACTIVE_STATUS: + if (objc != 3 && objc != 4 && objc != 5) { + Tcl_WrongNumArgs(interp, 2, objv, "presence [?status_id? | ?-primitive primitive?]"); + return TCL_ERROR; + } + if ((presence = gaim_tcl_ref_get(interp, objv[2], GaimTclRefPresence)) == NULL) + return TCL_ERROR; + if (objc == 3) { + Tcl_SetObjResult(interp, + gaim_tcl_ref_new(GaimTclRefStatus, + gaim_presence_get_active_status(presence))); + } else if (objc == 4) { + Tcl_SetBooleanObj(result, + gaim_presence_is_status_active(presence, + Tcl_GetString(objv[3]))); + } else { + GaimStatusPrimitive primitive; + if (strcmp(Tcl_GetString(objv[3]), "-primitive")) { + Tcl_SetStringObj(result, "bad option \"", -1); + Tcl_AppendObjToObj(result, objv[3]); + Tcl_AppendToObj(result, + "\": should be -primitive", -1); + return TCL_ERROR; + } + primitive = gaim_primitive_get_type_from_id(Tcl_GetString(objv[4])); + if (primitive == GAIM_STATUS_UNSET) { + Tcl_SetStringObj(result, "invalid primitive ", -1); + Tcl_AppendObjToObj(result, objv[4]); + return TCL_ERROR; + } + Tcl_SetBooleanObj(result, gaim_presence_is_status_primitive_active(presence, primitive)); + break; + } + break; + case CMD_PRESENCE_AVAILABLE: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "presence"); + return TCL_ERROR; + } + if ((presence = gaim_tcl_ref_get(interp, objv[2], GaimTclRefPresence)) == NULL) + return TCL_ERROR; + Tcl_SetBooleanObj(result, gaim_presence_is_available(presence)); + break; + case CMD_PRESENCE_CHAT_USER: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "presence"); + return TCL_ERROR; + } + if ((presence = gaim_tcl_ref_get(interp, objv[2], GaimTclRefPresence)) == NULL) + return TCL_ERROR; + Tcl_SetStringObj(result, gaim_presence_get_chat_user(presence), -1); + break; + case CMD_PRESENCE_CONTEXT: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "presence"); + return TCL_ERROR; + } + if ((presence = gaim_tcl_ref_get(interp, objv[2], GaimTclRefPresence)) == NULL) + return TCL_ERROR; + switch (gaim_presence_get_context(presence)) { + case GAIM_PRESENCE_CONTEXT_UNSET: + Tcl_SetStringObj(result, "unset", -1); + break; + case GAIM_PRESENCE_CONTEXT_ACCOUNT: + Tcl_SetStringObj(result, "account", -1); + break; + case GAIM_PRESENCE_CONTEXT_CONV: + Tcl_SetStringObj(result, "conversation", -1); + break; + case GAIM_PRESENCE_CONTEXT_BUDDY: + Tcl_SetStringObj(result, "buddy", -1); + break; + } + break; + case CMD_PRESENCE_CONVERSATION: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "presence"); + return TCL_ERROR; + } + if ((presence = gaim_tcl_ref_get(interp, objv[2], GaimTclRefPresence)) == NULL) + return TCL_ERROR; + Tcl_SetObjResult(interp, gaim_tcl_ref_new(GaimTclRefConversation, + gaim_presence_get_conversation(presence))); + break; + case CMD_PRESENCE_IDLE: + if (objc < 3 || objc > 5) { + Tcl_WrongNumArgs(interp, 2, objv, "presence ?idle? ?time?"); + return TCL_ERROR; + } + if ((presence = gaim_tcl_ref_get(interp, objv[2], GaimTclRefPresence)) == NULL) + return TCL_ERROR; + if (objc == 3) { + if (gaim_presence_is_idle(presence)) { + idle_time = gaim_presence_get_idle_time (presence); + Tcl_SetIntObj(result, idle_time); + } else { + result = Tcl_NewListObj(0, NULL); + Tcl_SetObjResult(interp, result); + } + break; + } + if ((error = Tcl_GetBooleanFromObj(interp, objv[3], &idle)) != TCL_OK) + return TCL_ERROR; + if (objc == 4) { + gaim_presence_set_idle(presence, idle, time(NULL)); + } else if (objc == 5) { + if ((error = Tcl_GetIntFromObj(interp, + objv[4], + &idle_time)) != TCL_OK) + return TCL_ERROR; + gaim_presence_set_idle(presence, idle, idle_time); + } + break; + case CMD_PRESENCE_LOGIN: + if (objc != 3 && objc != 4) { + Tcl_WrongNumArgs(interp, 2, objv, "presence ?time?"); + return TCL_ERROR; + } + if ((presence = gaim_tcl_ref_get(interp, objv[2], GaimTclRefPresence)) == NULL) + return TCL_ERROR; + if (objc == 3) { + Tcl_SetIntObj(result, gaim_presence_get_login_time(presence)); + } else { + if ((error == Tcl_GetIntFromObj(interp, + objv[3], + &login_time)) != TCL_OK) + return TCL_ERROR; + gaim_presence_set_login_time(presence, login_time); + } + break; + case CMD_PRESENCE_ONLINE: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "presence"); + return TCL_ERROR; + } + if ((presence = gaim_tcl_ref_get(interp, objv[2], GaimTclRefPresence)) == NULL) + return TCL_ERROR; + Tcl_SetBooleanObj(result, gaim_presence_is_online(presence)); + break; + case CMD_PRESENCE_STATUS: + if (objc != 4) { + Tcl_WrongNumArgs(interp, 2, objv, "presence status_id"); + return TCL_ERROR; + } + if ((presence = gaim_tcl_ref_get(interp, objv[2], GaimTclRefPresence)) == NULL) + return TCL_ERROR; + Tcl_SetObjResult(interp, + gaim_tcl_ref_new(GaimTclRefStatus, + gaim_presence_get_status(presence, + Tcl_GetString(objv[3])))); + break; + case CMD_PRESENCE_STATUSES: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "presence"); + return TCL_ERROR; + } + if ((presence = gaim_tcl_ref_get(interp, objv[2], GaimTclRefPresence)) == NULL) + return TCL_ERROR; + list = Tcl_NewListObj(0, NULL); + for (cur = gaim_presence_get_statuses(presence); cur != NULL; + cur = g_list_next(cur)) { + elem = gaim_tcl_ref_new(GaimTclRefStatus, cur->data); + Tcl_ListObjAppendElement(interp, list, elem); + } + Tcl_SetObjResult(interp, list); + break; + } + + return TCL_OK; +} + int tcl_cmd_send_im(ClientData unused, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { GaimConnection *gc; Modified: trunk/plugins/tcl/tcl_gaim.h =================================================================== --- trunk/plugins/tcl/tcl_gaim.h 2006-06-11 00:42:41 UTC (rev 16253) +++ trunk/plugins/tcl/tcl_gaim.h 2006-06-11 06:05:09 UTC (rev 16254) @@ -52,6 +52,7 @@ extern GaimStringref *GaimTclRefConnection; extern GaimStringref *GaimTclRefConversation; extern GaimStringref *GaimTclRefPointer; +extern GaimStringref *GaimTclRefPresence; extern GaimStringref *GaimTclRefStatus; extern GaimStringref *GaimTclRefStatusAttr; extern GaimStringref *GaimTclRefStatusType; @@ -77,6 +78,7 @@ Tcl_ObjCmdProc tcl_cmd_debug; Tcl_ObjCmdProc tcl_cmd_notify; Tcl_ObjCmdProc tcl_cmd_prefs; +Tcl_ObjCmdProc tcl_cmd_presence; Tcl_ObjCmdProc tcl_cmd_send_im; Tcl_ObjCmdProc tcl_cmd_signal; Tcl_ObjCmdProc tcl_cmd_status; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aar...@us...> - 2006-06-11 00:42:46
|
Revision: 16253 Author: aaronsheldon Date: 2006-06-10 17:42:41 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16253&view=rev Log Message: ----------- Mostly style corrections, but also corrects a bug that causes right-clicking groups to have incorrect behavior. 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-11 00:35:52 UTC (rev 16252) +++ branches/soc-2006-blist-efficiency/src/gtkblist.c 2006-06-11 00:42:41 UTC (rev 16253) @@ -4083,19 +4083,17 @@ GaimGroup *group; int count; gboolean show = FALSE; - gboolean buddy_node_true = FALSE; - GaimBlistNode* bnode; - - - buddy_node_true = GAIM_BLIST_NODE_IS_BUDDY(node); + GaimBlistNode* gnode; + + if (GAIM_BLIST_NODE_IS_GROUP(node)) - bnode = node; - else if (buddy_node_true) - bnode = node->parent->parent; - g_return_if_fail(GAIM_BLIST_NODE_IS_GROUP(bnode)); - - group = (GaimGroup*)bnode; + gnode = node; + else if (GAIM_BLIST_NODE_IS_BUDDY(node)) + gnode = node->parent->parent; + g_return_if_fail(GAIM_BLIST_NODE_IS_GROUP(gnode)); + group = (GaimGroup*)gnode; + if(gaim_prefs_get_bool("/gaim/gtk/blist/show_offline_buddies")) count = gaim_blist_get_group_size(group, FALSE); else @@ -4103,13 +4101,13 @@ if (count > 0 || gaim_prefs_get_bool("/gaim/gtk/blist/show_empty_groups")) show = TRUE; - else if (buddy_node_true) + else if (GAIM_BLIST_NODE_IS_BUDDY(node)){ if (buddy_is_displayable((GaimBuddy*)node)) show = TRUE; /* Fallback loop */ - else { + } else { GaimBlistNode *n; - n = bnode->child; + n = gnode->child; while (n && !GAIM_BLIST_NODE_IS_GROUP(n)) { if (GAIM_BLIST_NODE_IS_BUDDY(n)) { if (buddy_is_displayable((GaimBuddy*)n)) { @@ -4120,12 +4118,12 @@ n = gaim_blist_node_next(n, FALSE); } } - + if (show) { char *mark, *esc; GtkTreeIter iter; - if(!insert_node(list, bnode, &iter)) + if(!insert_node(list, gnode, &iter)) return; esc = g_markup_escape_text(group->name, -1); @@ -4138,11 +4136,11 @@ STATUS_ICON_COLUMN, NULL, STATUS_ICON_VISIBLE_COLUMN, FALSE, NAME_COLUMN, mark, - NODE_COLUMN, node, + NODE_COLUMN, gnode, -1); g_free(mark); } else { - gaim_gtk_blist_hide_node(list, bnode); + gaim_gtk_blist_hide_node(list, gnode); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-06-11 00:36:08
|
Revision: 16252 Author: rlaager Date: 2006-06-10 17:35:52 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16252&view=rev Log Message: ----------- Update the smiley theme HOWTO, even though I'm contemplating changing this format anyway. Modified Paths: -------------- trunk/pixmaps/smileys/THEMES-HOWTO Modified: trunk/pixmaps/smileys/THEMES-HOWTO =================================================================== --- trunk/pixmaps/smileys/THEMES-HOWTO 2006-06-11 00:11:00 UTC (rev 16251) +++ trunk/pixmaps/smileys/THEMES-HOWTO 2006-06-11 00:35:52 UTC (rev 16252) @@ -4,10 +4,8 @@ Version 0.60 of Gaim brings up all themable smileys. In the preferences dialog, a user can choose from a selection of looks his smileys will take. This guide is to serve as a reference to those interested in creating third-party smiley themes. -(SME: I'm doing this at 6:30AM; I'm tired, but I can't sleep. Someone make sure I fix this up to make sure it all makes sense when I'm not tired anymore. Right now it's mostly just unassembled thoughts) +Your theme should be contained in a single directory. This directory will be installed in the Gaim smiley theme directory ($HOME/.gaim/smileys/). This directory will contain a file called `theme' that specifies the theme metadata and image files that are used by the theme. The format of the `theme' file is as follows. -Your theme should be contained in a single directory. This directory will be installed in the Gaim smiley theme directory (SME: There should probably be a $HOME/.gaim/smileys/ that the theme could go in too.). This directory will contain a file called `theme' that specifies the theme and image (SME: And possibly sound) files that are used by the theme. The format of the `theme' file is as follows. - The beginning of the file contains some metainformation about the theme in the format Key=Value @@ -19,10 +17,16 @@ Author - The author's name Following this meta-information are "sml" groups. A "sml" group is a group of smileys that will be shown together. For example, each protocol has its own "sml" group (MSN, Yahoo, Gadu-Gadu, etc.). The name of the group is surrounded in square brackets, and each line beneath it (until the next sml group or the end of the file) defines a smiley. -Each line of the group starts with a filename of the icon (SME: Or sound?) followed by a space-delimited list of the characters that represent it. +Each line of the group starts with a filename of the icon followed by a space-delimited list of the characters that represent it. Example: [AIM/ICQ] smiley.png :) :-) In the smiley selector UI, each icon will only be shown once, and the first string representing it will be used. To keep a smiley out of the selector altogether, make the first two characters of the line "! " followed by the filename and emoticons. + +As of 2.0.0beta2, spaces and backslashes in the "list of characters" (see above) must be escaped by prepending them with a backslash. For example, to define a smiley that is represented by ":-/" and ":-\", use: + +[AIM/ICQ] +think.png :-/ :-\\ + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-06-11 00:11:13
|
Revision: 16251 Author: rlaager Date: 2006-06-10 17:11:00 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16251&view=rev Log Message: ----------- Having the idle time in the buddy list mean minutes without a colon and hours:minutes with confuses me. It's quite possible I'm just dumb. Let me know if you object. I know I talked about this a couple months ago and nobody objected strongly, but I apparently never committed it. Modified Paths: -------------- trunk/src/gtkblist.c Modified: trunk/src/gtkblist.c =================================================================== --- trunk/src/gtkblist.c 2006-06-11 00:06:02 UTC (rev 16250) +++ trunk/src/gtkblist.c 2006-06-11 00:11:00 UTC (rev 16251) @@ -4162,10 +4162,7 @@ ihrs = (t - idle_secs) / 3600; imin = ((t - idle_secs) / 60) % 60; - if (ihrs > 0) - idle = g_strdup_printf("%d:%02d", ihrs, imin); - else - idle = g_strdup_printf("%d", imin); + idle = g_strdup_printf("%d:%02d", ihrs, imin); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-06-11 00:06:19
|
Revision: 16250 Author: rlaager Date: 2006-06-10 17:06:02 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16250&view=rev Log Message: ----------- Some cosmetic cleanups that have been sitting in my tree for a while. I wouldn't be committing this now, except SVN is being a real pain. Apparently having changes in your tree when someone else commits changes is a conflict, even when they're in totally different parts of the file? Modified Paths: -------------- trunk/configure.ac Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2006-06-10 19:51:32 UTC (rev 16249) +++ trunk/configure.ac 2006-06-11 00:06:02 UTC (rev 16250) @@ -318,8 +318,8 @@ dnl ####################################################################### dnl # Check for Gadu-Gadu client includes and libraries dnl ####################################################################### -AC_ARG_WITH(gadu-includes, [AC_HELP_STRING([--with-gadu-includes=DIR], [compile the GaduGadu plugin against includes in DIR])], [ac_gadu_includes="$withval"], [ac_gadu_includes="no"]) -AC_ARG_WITH(gadu-libs, [AC_HELP_STRING([--with-gadu-libs=DIR], [compile the GaduGadu plugin against the libs in DIR])], [ac_gadu_libs="$withval"], [ac_gadu_libs="no"]) +AC_ARG_WITH(gadu-includes, [AC_HELP_STRING([--with-gadu-includes=DIR], [compile the Gadu-Gadu plugin against includes in DIR])], [ac_gadu_includes="$withval"], [ac_gadu_includes="no"]) +AC_ARG_WITH(gadu-libs, [AC_HELP_STRING([--with-gadu-libs=DIR], [compile the Gadu-Gadu plugin against the libs in DIR])], [ac_gadu_libs="$withval"], [ac_gadu_libs="no"]) GADU_CFLAGS="" GADU_LIBS="" if test -n "$with_gadu_includes" || test -n "$with_gadu_libs"; then @@ -1072,7 +1072,7 @@ dnl These two are inverses of each other <-- stolen from evolution! AC_ARG_ENABLE(gnutls, - [ --enable-gnutls=[yes,no] attempt to use GNUTLS for SSL support (preferred) [default=yes]], + [ --enable-gnutls=[yes,no] attempt to use GnuTLS for SSL support (preferred) [default=yes]], [enable_gnutls="$enableval"], [enable_gnutls="yes"]) @@ -1084,14 +1084,14 @@ msg_ssl="None (MSN will not work without SSL!)" dnl # -dnl # Check for GNUTLS if it's specified. +dnl # Check for GnuTLS if it's specified. dnl # if test "x$enable_gnutls" != "xno"; then enable_gnutls="no" prefix=`eval echo $prefix` AC_ARG_WITH(gnutls-includes, - [ --with-gnutls-includes=PREFIX location of GNUTLS includes.], + [ --with-gnutls-includes=PREFIX location of GnuTLS includes.], [ with_gnutls_includes="$withval" ], [ with_gnutls_includes="$prefix/include" ]) @@ -1100,7 +1100,7 @@ if test "x$with_gnutls_includes" != "xno"; then CPPFLAGS_save="$CPPFLAGS" - AC_MSG_CHECKING(for GNUTLS includes) + AC_MSG_CHECKING(for GnuTLS includes) AC_MSG_RESULT("") CPPFLAGS="$CPPFLAGS -I$with_gnutls_includes" @@ -1116,12 +1116,12 @@ GNUTLS_CFLAGS="" fi else - AC_MSG_CHECKING(for GNUTLS includes) + AC_MSG_CHECKING(for GnuTLS includes) AC_MSG_RESULT(no) fi AC_ARG_WITH(gnutls-libs, - [ --with-gnutls-libs=PREFIX location of GNUTLS libraries.], + [ --with-gnutls-libs=PREFIX location of GnuTLS libraries.], [ with_gnutls_libs="$withval" ]) if test "x$with_gnutls_libs" != "xno" -a \ @@ -1134,7 +1134,7 @@ *) with_gnutls_libs="-L$with_gnutls_libs" ;; esac - AC_CACHE_CHECK([for GNUTLS libraries], gnutls_libs, + AC_CACHE_CHECK([for GnuTLS libraries], gnutls_libs, [ LDFLAGS="$LDFLAGS $with_gnutls_libs -lgnutls -lgcrypt" AC_TRY_LINK_FUNC(gnutls_init, gnutls_libs="yes", gnutls_libs="no") @@ -1142,9 +1142,9 @@ ]) if test "x$gnutls_libs" != "xno"; then - AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GNUTLS]) + AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GnuTLS]) AC_DEFINE(HAVE_SSL) - msg_gnutls="GNUTLS" + msg_gnutls="GnuTLS" GNUTLS_LIBS="$with_gnutls_libs -lgnutls -lgcrypt" enable_gnutls="yes" @@ -1153,7 +1153,7 @@ GNUTLS_LIBS="" fi else - AC_MSG_CHECKING(for GNUTLS libraries) + AC_MSG_CHECKING(for GnuTLS libraries) AC_MSG_RESULT(no) fi else @@ -1168,7 +1168,7 @@ dnl # -dnl # Check for NSS if it's specified, or if GNUTLS checks failed. +dnl # Check for NSS if it's specified, or if GnuTLS checks failed. dnl # if test "x$enable_nss" != "xno"; then This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ebl...@us...> - 2006-06-10 19:51:38
|
Revision: 16249 Author: eblanton Date: 2006-06-10 12:51:32 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16249&view=rev Log Message: ----------- This has no functional effect, but it should eliminate some compiler crying. Modified Paths: -------------- trunk/plugins/tcl/tcl.c trunk/plugins/tcl/tcl_gaim.h trunk/plugins/tcl/tcl_signals.c Modified: trunk/plugins/tcl/tcl.c =================================================================== --- trunk/plugins/tcl/tcl.c 2006-06-10 19:27:21 UTC (rev 16248) +++ trunk/plugins/tcl/tcl.c 2006-06-10 19:51:32 UTC (rev 16249) @@ -53,6 +53,7 @@ GaimStringref *GaimTclRefAccount; GaimStringref *GaimTclRefConnection; GaimStringref *GaimTclRefConversation; +GaimStringref *GaimTclRefPointer; GaimStringref *GaimTclRefStatus; GaimStringref *GaimTclRefStatusAttr; GaimStringref *GaimTclRefStatusType; @@ -344,6 +345,7 @@ GaimTclRefAccount = gaim_stringref_new("Account"); GaimTclRefConnection = gaim_stringref_new("Connection"); GaimTclRefConversation = gaim_stringref_new("Conversation"); + GaimTclRefPointer = gaim_stringref_new("Pointer"); GaimTclRefStatus = gaim_stringref_new("Status"); GaimTclRefStatusAttr = gaim_stringref_new("StatusAttr"); GaimTclRefStatusType = gaim_stringref_new("StatusType"); @@ -365,6 +367,7 @@ gaim_stringref_unref(GaimTclRefAccount); gaim_stringref_unref(GaimTclRefConnection); gaim_stringref_unref(GaimTclRefConversation); + gaim_stringref_unref(GaimTclRefPointer); gaim_stringref_unref(GaimTclRefStatus); gaim_stringref_unref(GaimTclRefStatusAttr); gaim_stringref_unref(GaimTclRefStatusType); Modified: trunk/plugins/tcl/tcl_gaim.h =================================================================== --- trunk/plugins/tcl/tcl_gaim.h 2006-06-10 19:27:21 UTC (rev 16248) +++ trunk/plugins/tcl/tcl_gaim.h 2006-06-10 19:51:32 UTC (rev 16249) @@ -51,6 +51,7 @@ extern GaimStringref *GaimTclRefAccount; extern GaimStringref *GaimTclRefConnection; extern GaimStringref *GaimTclRefConversation; +extern GaimStringref *GaimTclRefPointer; extern GaimStringref *GaimTclRefStatus; extern GaimStringref *GaimTclRefStatusAttr; extern GaimStringref *GaimTclRefStatusType; Modified: trunk/plugins/tcl/tcl_signals.c =================================================================== --- trunk/plugins/tcl/tcl_signals.c 2006-06-10 19:27:21 UTC (rev 16248) +++ trunk/plugins/tcl/tcl_signals.c 2006-06-10 19:51:32 UTC (rev 16249) @@ -186,14 +186,9 @@ case GAIM_TYPE_OBJECT: case GAIM_TYPE_BOXED: /* These are all "pointer" types to us */ - if (gaim_value_is_outgoing(handler->argtypes[i])) { - vals[i] = va_arg(args, void **); - Tcl_LinkVar(handler->interp, name->str, - vals[i], TCL_LINK_INT); - arg = Tcl_NewStringObj(name->str, -1); - } else { - arg = Tcl_NewIntObj((int)va_arg(args, void *)); - } + if (gaim_value_is_outgoing(handler->argtypes[i])) + gaim_debug_error("tcl", "pointer types do not currently support outgoing arguments\n"); + arg = gaim_tcl_ref_new(GaimTclRefPointer, va_arg(args, void *)); break; case GAIM_TYPE_BOOLEAN: if (gaim_value_is_outgoing(handler->argtypes[i])) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ebl...@us...> - 2006-06-10 19:27:25
|
Revision: 16248 Author: eblanton Date: 2006-06-10 12:27:21 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16248&view=rev Log Message: ----------- Fix some 64-bit nonos in tcl_glib Modified Paths: -------------- trunk/plugins/tcl/tcl_glib.c Modified: trunk/plugins/tcl/tcl_glib.c =================================================================== --- trunk/plugins/tcl/tcl_glib.c 2006-06-10 19:16:58 UTC (rev 16247) +++ trunk/plugins/tcl/tcl_glib.c 2006-06-10 19:27:21 UTC (rev 16248) @@ -1,7 +1,7 @@ /* * Tcl/Glib glue * - * Copyright (C) 2003, 2004 Ethan Blanton <ebl...@cs...> + * Copyright (C) 2003, 2004, 2006 Ethan Blanton <ebl...@cs...> * * This file is dual-licensed under the two sets of terms below. You may * use, redistribute, or modify it pursuant to either the set of conditions @@ -157,8 +157,8 @@ GIOChannel *channel; GIOCondition cond = 0; - if (g_hash_table_lookup(tcl_file_handlers, (gpointer)fd)) - tcl_delete_file_handler(fd); + if (g_hash_table_lookup(tcl_file_handlers, GINT_TO_POINTER(fd))) + tcl_delete_file_handler(fd); if (mask & TCL_READABLE) cond |= G_IO_IN; @@ -176,7 +176,7 @@ tfh->source = g_io_add_watch_full(channel, G_PRIORITY_DEFAULT, cond, tcl_file_callback, tfh, g_free); g_io_channel_unref(channel); - g_hash_table_insert(tcl_file_handlers, (gpointer)fd, tfh); + g_hash_table_insert(tcl_file_handlers, GINT_TO_POINTER(fd), tfh); Tcl_ServiceAll(); } @@ -189,7 +189,7 @@ return; g_source_remove(tfh->source); - g_hash_table_remove(tcl_file_handlers, (gpointer)fd); + g_hash_table_remove(tcl_file_handlers, GINT_TO_POINTER(fd)); Tcl_ServiceAll(); } @@ -241,7 +241,7 @@ return 0; } - tfh = g_hash_table_lookup(tcl_file_handlers, (gpointer)fev->fd); + tfh = g_hash_table_lookup(tcl_file_handlers, GINT_TO_POINTER(fev->fd)); if (tfh == NULL) return 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ebl...@us...> - 2006-06-10 19:17:05
|
Revision: 16247 Author: eblanton Date: 2006-06-10 12:16:58 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16247&view=rev Log Message: ----------- This cleans up a few missed account and conversation cases, and moves GaimConnections to the typed pointer references. Modified Paths: -------------- trunk/plugins/tcl/tcl.c trunk/plugins/tcl/tcl_cmds.c trunk/plugins/tcl/tcl_gaim.h trunk/plugins/tcl/tcl_signals.c Modified: trunk/plugins/tcl/tcl.c =================================================================== --- trunk/plugins/tcl/tcl.c 2006-06-10 19:04:04 UTC (rev 16246) +++ trunk/plugins/tcl/tcl.c 2006-06-10 19:16:58 UTC (rev 16247) @@ -51,6 +51,7 @@ }; GaimStringref *GaimTclRefAccount; +GaimStringref *GaimTclRefConnection; GaimStringref *GaimTclRefConversation; GaimStringref *GaimTclRefStatus; GaimStringref *GaimTclRefStatusAttr; @@ -341,6 +342,7 @@ gaim_tcl_ref_init(); GaimTclRefAccount = gaim_stringref_new("Account"); + GaimTclRefConnection = gaim_stringref_new("Connection"); GaimTclRefConversation = gaim_stringref_new("Conversation"); GaimTclRefStatus = gaim_stringref_new("Status"); GaimTclRefStatusAttr = gaim_stringref_new("StatusAttr"); @@ -361,6 +363,7 @@ tcl_plugins = NULL; gaim_stringref_unref(GaimTclRefAccount); + gaim_stringref_unref(GaimTclRefConnection); gaim_stringref_unref(GaimTclRefConversation); gaim_stringref_unref(GaimTclRefStatus); gaim_stringref_unref(GaimTclRefStatusAttr); Modified: trunk/plugins/tcl/tcl_cmds.c =================================================================== --- trunk/plugins/tcl/tcl_cmds.c 2006-06-10 19:04:04 UTC (rev 16246) +++ trunk/plugins/tcl/tcl_cmds.c 2006-06-10 19:16:58 UTC (rev 16247) @@ -37,7 +37,7 @@ static GaimAccount *tcl_validate_account(Tcl_Obj *obj, Tcl_Interp *interp); static GaimConversation *tcl_validate_conversation(Tcl_Obj *obj, Tcl_Interp *interp); -static gboolean tcl_validate_gc(GaimConnection *gc); +static GaimConnection *tcl_validate_gc(Tcl_Obj *obj, Tcl_Interp *interp); static GaimAccount *tcl_validate_account(Tcl_Obj *obj, Tcl_Interp *interp) { @@ -77,14 +77,21 @@ return NULL; } -static gboolean tcl_validate_gc(GaimConnection *gc) +static GaimConnection *tcl_validate_gc(Tcl_Obj *obj, Tcl_Interp *interp) { + GaimConnection *gc; GList *cur; + + gc = gaim_tcl_ref_get(interp, obj, GaimTclRefConnection); + + if (gc == NULL) + return NULL; + for (cur = gaim_connections_get_all(); cur != NULL; cur = g_list_next(cur)) { if (gc == cur->data) - return TRUE; + return gc; } - return FALSE; + return NULL; } int tcl_cmd_account(ClientData unused, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) @@ -148,7 +155,9 @@ return TCL_ERROR; if (!gaim_account_is_connected(account)) gaim_account_connect(account); - Tcl_SetIntObj(result, (int)gaim_account_get_connection(account)); + Tcl_SetObjResult(interp, + gaim_tcl_ref_new(GaimTclRefConnection, + gaim_account_get_connection(account))); break; case CMD_ACCOUNT_CONNECTION: if (objc != 3) { @@ -158,7 +167,9 @@ if ((account = tcl_validate_account(objv[2], interp)) == NULL) return TCL_ERROR; - Tcl_SetIntObj(result, (int)gaim_account_get_connection(account)); + Tcl_SetObjResult(interp, + gaim_tcl_ref_new(GaimTclRefConnection, + gaim_account_get_connection(account))); break; case CMD_ACCOUNT_DISCONNECT: if (objc != 3) { @@ -191,8 +202,10 @@ Tcl_WrongNumArgs(interp, 2, objv, "username protocol"); return TCL_ERROR; } - Tcl_SetIntObj(result, (int)gaim_accounts_find(Tcl_GetString(objv[2]), - Tcl_GetString(objv[3]))); + account = gaim_accounts_find(Tcl_GetString(objv[2]), + Tcl_GetString(objv[3])); + Tcl_SetObjResult(interp, + gaim_tcl_ref_new(GaimTclRefAccount, account)); break; case CMD_ACCOUNT_HANDLE: if (objc != 2) { @@ -490,23 +503,19 @@ Tcl_WrongNumArgs(interp, 2, objv, "gc"); return TCL_ERROR; } - error = Tcl_GetIntFromObj(interp, objv[2], (int *)&gc); - if (error || !tcl_validate_gc(gc)) { - Tcl_SetStringObj(result, "invalid gc", -1); + if ((gc = tcl_validate_gc(objv[2], interp)) == NULL) return TCL_ERROR; - } - Tcl_SetIntObj(result, (int)gaim_connection_get_account(gc)); + Tcl_SetObjResult(interp, + gaim_tcl_ref_new(GaimTclRefAccount, + gaim_connection_get_account(gc))); break; case CMD_CONN_DISPLAYNAME: if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "gc"); return TCL_ERROR; } - error = Tcl_GetIntFromObj(interp, objv[2], (int *)&gc); - if (error || !tcl_validate_gc(gc)) { - Tcl_SetStringObj(result, "invalid gc", -1); + if ((gc = tcl_validate_gc(objv[2], interp)) == NULL) return TCL_ERROR; - } Tcl_SetStringObj(result, (char *)gaim_connection_get_display_name(gc), -1); break; case CMD_CONN_HANDLE: @@ -523,7 +532,7 @@ } list = Tcl_NewListObj(0, NULL); for (cur = gaim_connections_get_all(); cur != NULL; cur = g_list_next(cur)) { - elem = Tcl_NewIntObj((int)cur->data); + elem = gaim_tcl_ref_new(GaimTclRefConnection, cur->data); Tcl_ListObjAppendElement(interp, list, elem); } Tcl_SetObjResult(interp, list); @@ -569,7 +578,7 @@ convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, Tcl_GetString(objv[3]), account); - Tcl_SetIntObj(result, (int)convo); + Tcl_SetObjResult(interp, gaim_tcl_ref_new(GaimTclRefConversation, convo)); break; case CMD_CONV_HANDLE: if (objc != 2) { @@ -581,7 +590,7 @@ case CMD_CONV_LIST: list = Tcl_NewListObj(0, NULL); for (cur = gaim_get_conversations(); cur != NULL; cur = g_list_next(cur)) { - elem = Tcl_NewIntObj((int)cur->data); + elem = gaim_tcl_ref_new(GaimTclRefConversation, cur->data); Tcl_ListObjAppendElement(interp, list, elem); } Tcl_SetObjResult(interp, list); @@ -619,7 +628,7 @@ if ((account = tcl_validate_account(objv[argsused++], interp)) == NULL) return TCL_ERROR; convo = gaim_conversation_new(type, account, Tcl_GetString(objv[argsused])); - Tcl_SetIntObj(result, (int)convo); + Tcl_SetObjResult(interp, gaim_tcl_ref_new(GaimTclRefConversation, convo)); break; case CMD_CONV_WRITE: if (objc != 6) { @@ -877,21 +886,14 @@ { GaimConnection *gc; char *who, *text; - int error; - Tcl_Obj *result; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, "gc who text"); return TCL_ERROR; } - if ((error = Tcl_GetIntFromObj(interp, objv[1], (int *)&gc)) != TCL_OK) - return error; - if (!tcl_validate_gc(gc)) { - result = Tcl_GetObjResult(interp); - Tcl_SetStringObj(result, "invalid gc", -1); + if ((gc = tcl_validate_gc(objv[1], interp)) == NULL) return TCL_ERROR; - } who = Tcl_GetString(objv[2]); text = Tcl_GetString(objv[3]); Modified: trunk/plugins/tcl/tcl_gaim.h =================================================================== --- trunk/plugins/tcl/tcl_gaim.h 2006-06-10 19:04:04 UTC (rev 16246) +++ trunk/plugins/tcl/tcl_gaim.h 2006-06-10 19:16:58 UTC (rev 16247) @@ -49,6 +49,7 @@ /* Capitalized this way because these are "types" */ extern GaimStringref *GaimTclRefAccount; +extern GaimStringref *GaimTclRefConnection; extern GaimStringref *GaimTclRefConversation; extern GaimStringref *GaimTclRefStatus; extern GaimStringref *GaimTclRefStatusAttr; Modified: trunk/plugins/tcl/tcl_signals.c =================================================================== --- trunk/plugins/tcl/tcl_signals.c 2006-06-10 19:04:04 UTC (rev 16246) +++ trunk/plugins/tcl/tcl_signals.c 2006-06-10 19:16:58 UTC (rev 16247) @@ -134,6 +134,22 @@ tcl_callbacks = g_list_remove_all(tcl_callbacks, NULL); } +static GaimStringref *ref_type(GaimSubType type) +{ + switch (type) { + case GAIM_SUBTYPE_ACCOUNT: + return GaimTclRefAccount; + case GAIM_SUBTYPE_CONNECTION: + return GaimTclRefConnection; + case GAIM_SUBTYPE_CONVERSATION: + return GaimTclRefConversation; + case GAIM_SUBTYPE_STATUS: + return GaimTclRefStatus; + default: + return NULL; + } +} + static void *tcl_signal_callback(va_list args, struct tcl_signal_handler *handler) { GString *name, *val; @@ -256,12 +272,13 @@ case GAIM_SUBTYPE_UNKNOWN: gaim_debug(GAIM_DEBUG_ERROR, "tcl", "subtype unknown\n"); case GAIM_SUBTYPE_ACCOUNT: + case GAIM_SUBTYPE_CONNECTION: case GAIM_SUBTYPE_CONVERSATION: + case GAIM_SUBTYPE_STATUS: if (gaim_value_is_outgoing(handler->argtypes[i])) gaim_debug_error("tcl", "pointer subtypes do not currently support outgoing arguments\n"); - arg = gaim_tcl_ref_new(GaimTclRefAccount, va_arg(args, void *)); + arg = gaim_tcl_ref_new(ref_type(gaim_value_get_subtype(handler->argtypes[i])), va_arg(args, void *)); break; - case GAIM_SUBTYPE_CONNECTION: case GAIM_SUBTYPE_PLUGIN: case GAIM_SUBTYPE_XFER: /* pointers again */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-06-10 19:04:08
|
Revision: 16246 Author: rlaager Date: 2006-06-10 12:04:04 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16246&view=rev Log Message: ----------- Backport the XML debug line changes to 2.0.0. Modified Paths: -------------- branches/v2_0_0/src/gtkdialogs.c Modified: branches/v2_0_0/src/gtkdialogs.c =================================================================== --- branches/v2_0_0/src/gtkdialogs.c 2006-06-10 19:03:24 UTC (rev 16245) +++ branches/v2_0_0/src/gtkdialogs.c 2006-06-10 19:04:04 UTC (rev 16246) @@ -438,12 +438,6 @@ #endif #endif -#ifdef HAVE_LIBXML - g_string_append_printf(str, " <b>XML Parser:</b> libxml2<br/>"); -#else - g_string_append_printf(str, " <b>XML Parser:</b> GMarkup<br/>"); -#endif - #ifdef HAVE_LIBGADU #ifdef _WIN32 g_string_append(str, " <b>Gadu-Gadu library (libgadu):</b> Internal<br/>"); @@ -512,6 +506,12 @@ g_string_append(str, " <b>Tk:</b> Disabled<br/>"); #endif +#ifdef HAVE_LIBXML + g_string_append(str, " <b>XML Parser:</b> libxml2<br/>"); +#else + g_string_append(str, " <b>XML Parser:</b> GMarkup<br/>"); +#endif + #ifndef _WIN32 #ifdef USE_SM g_string_append(str, " <b>X Session Management:</b> Enabled<br/>"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-06-10 19:03:28
|
Revision: 16245 Author: rlaager Date: 2006-06-10 12:03:24 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16245&view=rev Log Message: ----------- We don't really need to use the _printf() version of g_string_append() to append a plain string. Modified Paths: -------------- trunk/src/gtkdialogs.c Modified: trunk/src/gtkdialogs.c =================================================================== --- trunk/src/gtkdialogs.c 2006-06-10 19:01:40 UTC (rev 16244) +++ trunk/src/gtkdialogs.c 2006-06-10 19:03:24 UTC (rev 16245) @@ -507,9 +507,9 @@ #endif #ifdef HAVE_LIBXML - g_string_append_printf(str, " <b>XML Parser:</b> libxml2<br/>"); + g_string_append(str, " <b>XML Parser:</b> libxml2<br/>"); #else - g_string_append_printf(str, " <b>XML Parser:</b> GMarkup<br/>"); + g_string_append(str, " <b>XML Parser:</b> GMarkup<br/>"); #endif #ifndef _WIN32 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2006-06-10 19:01:51
|
Revision: 16244 Author: rlaager Date: 2006-06-10 12:01:40 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16244&view=rev Log Message: ----------- XML does NOT alphabetize between Evolution and Gadu-Gadu. Modified Paths: -------------- trunk/src/gtkdialogs.c Modified: trunk/src/gtkdialogs.c =================================================================== --- trunk/src/gtkdialogs.c 2006-06-10 18:20:46 UTC (rev 16243) +++ trunk/src/gtkdialogs.c 2006-06-10 19:01:40 UTC (rev 16244) @@ -438,12 +438,6 @@ #endif #endif -#ifdef HAVE_LIBXML - g_string_append_printf(str, " <b>XML Parser:</b> libxml2<br/>"); -#else - g_string_append_printf(str, " <b>XML Parser:</b> GMarkup<br/>"); -#endif - #ifdef HAVE_LIBGADU #ifdef _WIN32 g_string_append(str, " <b>Gadu-Gadu library (libgadu):</b> Internal<br/>"); @@ -512,6 +506,12 @@ g_string_append(str, " <b>Tk:</b> Disabled<br/>"); #endif +#ifdef HAVE_LIBXML + g_string_append_printf(str, " <b>XML Parser:</b> libxml2<br/>"); +#else + g_string_append_printf(str, " <b>XML Parser:</b> GMarkup<br/>"); +#endif + #ifndef _WIN32 #ifdef USE_SM g_string_append(str, " <b>X Session Management:</b> Enabled<br/>"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ebl...@us...> - 2006-06-10 18:20:51
|
Revision: 16243 Author: eblanton Date: 2006-06-10 11:20:46 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16243&view=rev Log Message: ----------- Forgot to add tcl_ref.c That's OK, because subversion is really, really bad and didn't want to let me do it anyway. Can we please get a real revision control system, as opposed to one which was clearly designed by and for monkeys who liked CVS but couldn't stand all the working-ness? Added Paths: ----------- trunk/plugins/tcl/tcl_ref.c Added: trunk/plugins/tcl/tcl_ref.c =================================================================== --- trunk/plugins/tcl/tcl_ref.c (rev 0) +++ trunk/plugins/tcl/tcl_ref.c 2006-06-10 18:20:46 UTC (rev 16243) @@ -0,0 +1,152 @@ +/** + * @file tcl_ref.c Gaim Tcl typed references API + * + * gaim + * + * Copyright (C) 2006 Ethan Blanton <ebl...@cs...> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <tcl.h> +#include <glib.h> + +#include "tcl_gaim.h" +#include "stringref.h" + +/* Instead of all that internal representation mumbo jumbo, use these + * macros to access the internal representation of a GaimTclRef */ +#define OBJ_REF_TYPE(obj) (obj->internalRep.twoPtrValue.ptr1) +#define OBJ_REF_VALUE(obj) (obj->internalRep.twoPtrValue.ptr2) + +static Tcl_FreeInternalRepProc gaim_tcl_ref_free; +static Tcl_DupInternalRepProc gaim_tcl_ref_dup; +static Tcl_UpdateStringProc gaim_tcl_ref_update; +static Tcl_SetFromAnyProc gaim_tcl_ref_set; + +static Tcl_ObjType gaim_tcl_ref = { + "GaimTclRef", + gaim_tcl_ref_free, + gaim_tcl_ref_dup, + gaim_tcl_ref_update, + gaim_tcl_ref_set +}; + +void gaim_tcl_ref_init() +{ + Tcl_RegisterObjType(&gaim_tcl_ref); +} + +void *gaim_tcl_ref_get(Tcl_Interp *interp, Tcl_Obj *obj, GaimStringref *type) +{ + if (obj->typePtr != &gaim_tcl_ref) { + if (Tcl_ConvertToType(interp, obj, &gaim_tcl_ref) != TCL_OK) + return NULL; + } + if (strcmp(gaim_stringref_value(OBJ_REF_TYPE(obj)), + gaim_stringref_value(type))) { + if (interp) { + Tcl_Obj *error = Tcl_NewStringObj("Bad Gaim reference type: expected ", -1); + Tcl_AppendToObj(error, gaim_stringref_value(type), -1); + Tcl_AppendToObj(error, "but got ", -1); + Tcl_AppendToObj(error, gaim_stringref_value(OBJ_REF_TYPE(obj)), -1); + Tcl_SetObjResult(interp, error); + } + return NULL; + } + return OBJ_REF_VALUE(obj); +} + +Tcl_Obj *gaim_tcl_ref_new(GaimStringref *type, void *value) +{ + Tcl_Obj *obj = Tcl_NewObj(); + obj->typePtr = &gaim_tcl_ref; + OBJ_REF_TYPE(obj) = gaim_stringref_ref(type); + OBJ_REF_VALUE(obj) = value; + Tcl_InvalidateStringRep(obj); + return obj; +} + +static void gaim_tcl_ref_free(Tcl_Obj *obj) +{ + gaim_stringref_unref(OBJ_REF_TYPE(obj)); +} + +static void gaim_tcl_ref_dup(Tcl_Obj *obj1, Tcl_Obj *obj2) +{ + OBJ_REF_TYPE(obj2) = gaim_stringref_ref(OBJ_REF_TYPE(obj1)); + OBJ_REF_VALUE(obj2) = OBJ_REF_VALUE(obj1); +} + +static void gaim_tcl_ref_update(Tcl_Obj *obj) +{ + /* This is ugly on memory, but we pretty much have to either + * do this or guesstimate lengths or introduce a varargs + * function in here ... ugh. */ + char *bytes = g_strdup_printf("gaim-%s:%p", + gaim_stringref_value(OBJ_REF_TYPE(obj)), + OBJ_REF_VALUE(obj)); + + obj->length = strlen(bytes); + obj->bytes = ckalloc(obj->length + 1); + strcpy(obj->bytes, bytes); + g_free(bytes); +} + +/* This isn't as memory-efficient as setting could be, because we + * essentially have to synthesize the Stringref here, where we would + * really rather dup it. Oh, well. */ +static int gaim_tcl_ref_set(Tcl_Interp *interp, Tcl_Obj *obj) +{ + char *bytes = Tcl_GetStringFromObj(obj, NULL); + char *ptr; + GaimStringref *type; + void *value; + + if (strlen(bytes) < 7 + || strncmp(bytes, "gaim-", 5) + || (ptr = strchr(bytes, ':')) == NULL + || (ptr - bytes) == 5) + goto badobject; + + /* Bad Ethan */ + *ptr = '\0'; + type = gaim_stringref_new(bytes + 5); + *ptr = ':'; + ptr++; + + if (sscanf(ptr, "%p", &value) == 0) { + gaim_stringref_unref(type); + goto badobject; + } + + /* At this point we know we have a good object; free the old and + * install our internal representation. */ + if (obj->typePtr != NULL && obj->typePtr->freeIntRepProc != NULL) + obj->typePtr->freeIntRepProc(obj); + + obj->typePtr = &gaim_tcl_ref; + OBJ_REF_TYPE(obj) = type; + OBJ_REF_VALUE(obj) = value; + + return TCL_OK; + +badobject: + if (interp) { + Tcl_SetObjResult(interp, + Tcl_NewStringObj("invalid GaimTclRef representation", -1)); + } + return TCL_ERROR; +} Property changes on: trunk/plugins/tcl/tcl_ref.c ___________________________________________________________________ Name: svn:mime-type + text/x-csrc Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |