Mercurial > pidgin
changeset 25277:b97d8001402d
merge of '5f39c0c7a9b42095bfdc5a3a637fc280da38d729'
and '8e99bf9be800f9578d7e94cc4d522d435cfc80dd'
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Wed, 07 Jan 2009 02:59:36 +0000 |
parents | 533d37757363 (current diff) 6a1f8309c805 (diff) |
children | 7bc52fed6fdb |
files | |
diffstat | 13 files changed, 74 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/Makefile.am Tue Jan 06 06:32:49 2009 +0000 +++ b/doc/Makefile.am Wed Jan 07 02:59:36 2009 +0000 @@ -1,4 +1,12 @@ -man_MANS = pidgin.1 finch.1 +man_MANS = + +if ENABLE_GTK +man_MANS += pidgin.1 +endif + +if ENABLE_GNT +man_MANS += finch.1 +endif EXTRA_DIST = \ C-HOWTO.dox \
--- a/finch/libgnt/gntmain.c Tue Jan 06 06:32:49 2009 +0000 +++ b/finch/libgnt/gntmain.c Wed Jan 07 02:59:36 2009 +0000 @@ -21,7 +21,7 @@ */ #define _GNU_SOURCE -#if (defined(__APPLE__) || defined(__unix__)) && !defined(__FreeBSD__) +#if (defined(__APPLE__) || defined(__unix__)) && !defined(__FreeBSD__) && !defined(__OpenBSD__) #define _XOPEN_SOURCE_EXTENDED #endif
--- a/finch/libgnt/gnttree.c Tue Jan 06 06:32:49 2009 +0000 +++ b/finch/libgnt/gnttree.c Wed Jan 07 02:59:36 2009 +0000 @@ -518,6 +518,7 @@ if (row == tree->current) { + attr |= A_BOLD; if (gnt_widget_has_focus(widget)) attr |= gnt_color_pair(GNT_COLOR_HIGHLIGHT); else
--- a/finch/libgnt/gntwindow.c Tue Jan 06 06:32:49 2009 +0000 +++ b/finch/libgnt/gntwindow.c Wed Jan 07 02:59:36 2009 +0000 @@ -49,7 +49,16 @@ { GntWindow *win = GNT_WINDOW(bind); if (win->menu) { - gnt_screen_menu_show(win->menu); + GntMenu *menu = win->menu; + + gnt_screen_menu_show(menu); + if (menu->type == GNT_MENU_TOPLEVEL) { + GntMenuItem *item; + item = g_list_nth_data(menu->list, menu->selected); + if (item && gnt_menuitem_get_submenu(item)) { + gnt_widget_activate(GNT_WIDGET(menu)); + } + } return TRUE; } return FALSE;
--- a/finch/libgnt/gntwm.c Tue Jan 06 06:32:49 2009 +0000 +++ b/finch/libgnt/gntwm.c Wed Jan 07 02:59:36 2009 +0000 @@ -26,7 +26,7 @@ #include <Python.h> #else #define _GNU_SOURCE -#if (defined(__APPLE__) || defined(__unix__)) && !defined(__FreeBSD__) +#if (defined(__APPLE__) || defined(__unix__)) && !defined(__FreeBSD__) && !defined(__OpenBSD__) #define _XOPEN_SOURCE_EXTENDED #endif #endif
--- a/finch/libgnt/wms/irssi.c Tue Jan 06 06:32:49 2009 +0000 +++ b/finch/libgnt/wms/irssi.c Wed Jan 07 02:59:36 2009 +0000 @@ -71,7 +71,12 @@ width = (getmaxx(stdscr) - irssi->buddylistwidth) / irssi->horiz; height = (getmaxy(stdscr) - 1) / irssi->vert; - rx = irssi->buddylistwidth; + if (width) { + rx = irssi->buddylistwidth; + } else { + rx = 0; + width = getmaxx(stdscr) / irssi->horiz; + } if (hor) rx += hor * width; if (rx) @@ -234,7 +239,7 @@ height = (getmaxy(stdscr) - 1) / irssi->vert; if (h) - *h = (x - irssi->buddylistwidth) / width; + *h = width ? (x - irssi->buddylistwidth) / width : x / (getmaxx(stdscr) / irssi->horiz); if (v) *v = y / height; } @@ -278,6 +283,7 @@ { int vert, hor; int x, y, w, h; + const char *name; if (!GNT_IS_WINDOW(widget)) return; @@ -286,10 +292,13 @@ return; } - find_window_position(irssi, widget, &hor, &vert); - get_xywh_for_frame(irssi, hor, vert, &x, &y, &w, &h); - gnt_wm_move_window(GNT_WM(irssi), widget, x, y); - gnt_wm_resize_window(GNT_WM(irssi), widget, w, h); + name = gnt_widget_get_name(widget); + if (name && strstr(name, "conversation-window")) { + find_window_position(irssi, widget, &hor, &vert); + get_xywh_for_frame(irssi, hor, vert, &x, &y, &w, &h); + gnt_wm_move_window(GNT_WM(irssi), widget, x, y); + gnt_wm_resize_window(GNT_WM(irssi), widget, w, h); + } } static void
--- a/libpurple/protocols/jabber/parser.c Tue Jan 06 06:32:49 2009 +0000 +++ b/libpurple/protocols/jabber/parser.c Wed Jan 07 02:59:36 2009 +0000 @@ -234,12 +234,22 @@ } else if ((ret = xmlParseChunk(js->context, buf, len, 0)) != XML_ERR_OK) { xmlError *err = xmlCtxtGetLastError(js->context); - purple_debug_error("jabber", "xmlParseChunk returned error %i\n", ret); - - if (err->level == XML_ERR_FATAL) { - purple_connection_error_reason (js->gc, - PURPLE_CONNECTION_ERROR_NETWORK_ERROR, - _("XML Parse error")); + switch (err->level) { + case XML_ERR_NONE: + purple_debug_info("jabber", "xmlParseChunk returned info %i\n", ret); + break; + case XML_ERR_WARNING: + purple_debug_warning("jabber", "xmlParseChunk returned warning %i\n", ret); + break; + case XML_ERR_ERROR: + purple_debug_error("jabber", "xmlParseChunk returned error %i\n", ret); + break; + case XML_ERR_FATAL: + purple_debug_error("jabber", "xmlParseChunk returned fatal %i\n", ret); + purple_connection_error_reason (js->gc, + PURPLE_CONNECTION_ERROR_NETWORK_ERROR, + _("XML Parse error")); + break; } } }
--- a/libpurple/protocols/myspace/myspace.c Tue Jan 06 06:32:49 2009 +0000 +++ b/libpurple/protocols/myspace/myspace.c Wed Jan 07 02:59:36 2009 +0000 @@ -2883,10 +2883,9 @@ } /* Strip spaces. */ - for (i=0, j=0; normalized[j]; i++, j++) { - while (normalized[j] == ' ') - j++; - normalized[i] = normalized[j]; + for (i=0, j=0; normalized[j]; j++) { + if (normalized[j] != ' ') + normalized[i++] = normalized[j]; } normalized[i] = '\0';
--- a/libpurple/protocols/qq/im.c Tue Jan 06 06:32:49 2009 +0000 +++ b/libpurple/protocols/qq/im.c Wed Jan 07 02:59:36 2009 +0000 @@ -467,7 +467,10 @@ /* qq_show_packet("text", (guint8 *)text, strlen(text)); */ g_return_val_if_fail(text != NULL && strlen(text) != 0, g_strdup("")); - segments = g_strsplit_set(text, "\x14\x15", 0); + while ((cur = strchr(text, '\x14')) != NULL) + *cur = '\x15'; + + segments = g_strsplit(text, "\x15", 0); if(segments == NULL) { return g_strdup(""); }
--- a/libpurple/protocols/qq/qq_network.c Tue Jan 06 06:32:49 2009 +0000 +++ b/libpurple/protocols/qq/qq_network.c Wed Jan 07 02:59:36 2009 +0000 @@ -214,7 +214,7 @@ qd->connect_retry = QQ_CONNECT_MAX; } - segments = g_strsplit_set(qd->curr_server, ":", 0); + segments = g_strsplit(qd->curr_server, ":", 0); tmp_server = g_strdup(segments[0]); if (NULL != segments[1]) { port = atoi(segments[1]);
--- a/libpurple/protocols/qq/qq_process.c Tue Jan 06 06:32:49 2009 +0000 +++ b/libpurple/protocols/qq/qq_process.c Wed Jan 07 02:59:36 2009 +0000 @@ -435,8 +435,8 @@ static void process_server_msg(PurpleConnection *gc, guint8 *data, gint data_len, guint16 seq) { qq_data *qd; - guint8 *data_str; - gchar **segments; + guint8 *data_str, i = 0; + gchar **segments, **seg; gchar *funct_str, *from, *to; gint bytes, funct; @@ -448,9 +448,11 @@ g_memmove(data_str, data, data_len); data_str[data_len] = 0x00; - segments = g_strsplit_set((gchar *) data_str, "\x1f", 0); + segments = g_strsplit((gchar *) data_str, "\x1f", 0); g_return_if_fail(segments != NULL); - if (g_strv_length(segments) < 3) { + for (seg = segments; *seg != NULL; seg++) + i++; + if (i < 3) { purple_debug_warning("QQ", "Server message segments is less than 3\n"); g_strfreev(segments); return;
--- a/libpurple/protocols/qq/utils.c Tue Jan 06 06:32:49 2009 +0000 +++ b/libpurple/protocols/qq/utils.c Wed Jan 07 02:59:36 2009 +0000 @@ -95,8 +95,8 @@ gchar **split_data(guint8 *data, gint len, const gchar *delimit, gint expected_fields) { guint8 *input; - gchar **segments; - gint count, j; + gchar **segments, **seg; + gint count = 0, j; g_return_val_if_fail(data != NULL && len != 0 && delimit != 0, NULL); @@ -106,11 +106,12 @@ g_memmove(input, data, len); input[len] = 0x00; - segments = g_strsplit_set((gchar *) input, delimit, 0); + segments = g_strsplit((gchar *) input, delimit, 0); if (expected_fields <= 0) return segments; - count = g_strv_length(segments); + for (seg = segments; *seg != NULL; seg++) + count++; if (count < expected_fields) { /* not enough fields */ purple_debug_error("QQ", "Less fields %d then %d\n", count, expected_fields); return NULL;