# HG changeset patch # User Luke Schierer # Date 1174233660 0 # Node ID d8f98ce1cef04a756ab688bdf23c337918d5790b # Parent ab9aada65ac2ada6d09a5563c56fd8bab807a9cf# Parent 71b017348c39369d930dcbf002fc62f9637a0f55 merge of '26a511ef6be2c20a09d0fd93527980c97169c67e' and 'f44067bee9c00d12f10b7bd4635f6240935bb18e' diff -r ab9aada65ac2 -r d8f98ce1cef0 configure.ac --- a/configure.ac Sun Mar 18 02:23:48 2007 +0000 +++ b/configure.ac Sun Mar 18 16:01:00 2007 +0000 @@ -416,9 +416,6 @@ GNT_LIBS="" GNT_CFLAGS="" enable_consoleui=no - AC_MSG_RESULT([no]) - else - AC_MSG_RESULT([yes]) fi else # ncursesw was not found. Look for plain old ncurses @@ -721,7 +718,7 @@ oscar) static_oscar=yes ;; aim) static_oscar=yes ;; icq) static_oscar=yes ;; - qq) static_qq=yes ;; + qq) static_qq=yes ;; sametime) static_sametime=yes ;; silc) static_silc=yes ;; simple) static_simple=yes ;; @@ -774,7 +771,7 @@ oscar) dynamic_oscar=yes ;; aim) dynamic_oscar=yes ;; icq) dynamic_oscar=yes ;; - qq) dynamic_qq=yes ;; + qq) dynamic_qq=yes ;; sametime) dynamic_sametime=yes ;; silc) dynamic_silc=yes ;; simple) dynamic_simple=yes ;; @@ -825,7 +822,7 @@ dnl dnl Consider adding -Wfloat-equal. dnl This leads to warnings with Perl. - dnl Perhaps we could write ugly configure magic and pass -Wno-float-equal down to that subdirectory. + dnl Perhaps we could write ugly configure magic and pass -Wno-float-equal down to that subdirectory. dnl On the other hand, it's probably actually broken, so maybe the Perl folks should fix that? dnl dnl Consider removing -Wno-sign-compare (from the -Wextra set) and fixing all those cases. @@ -915,7 +912,7 @@ LIBNM_LIBS="" PKG_CHECK_MODULES(LIBNM, libnm_glib, [ - AC_DEFINE(HAVE_LIBNM, 1, [Check to see if we have NetworkManager]) + AC_DEFINE(HAVE_LIBNM, 1, [Define if you have NetworkManager]) enable_libnm=yes ], [ @@ -1018,7 +1015,7 @@ fi fi AC_MSG_RESULT([$DBUS_SERVICES_DIR]) - AC_DEFINE(HAVE_DBUS, 1, [Define if we are re using D-Bus.]) + AC_DEFINE(HAVE_DBUS, 1, [Define if we are using D-Bus.]) fi AC_SUBST(DBUS_SERVICES_DIR) @@ -1035,17 +1032,15 @@ dnl ####################################################################### AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support (experimental)])], , enable_mono=no) if test x"$enable_mono" = x"yes" ; then - AC_MSG_CHECKING(for Mono compile flags) - MONO_CFLAGS=`pkg-config --cflags mono 2> /dev/null` - if test $? != 0 ; then - AC_MSG_RESULT([not found, building without mono.]) - MONO_CFLAGS= - MONO_LIBS= + PKG_CHECK_MODULES(MONO, mono, [ + AC_SUBST(MONO_CFLAGS) + AC_SUBST(MONO_LIBS) + enable_mono=yes + ], [ + AC_MSG_RESULT(no) enable_mono=no - else - MONO_LIBS=`pkg-config --libs mono 2> /dev/null` - AC_MSG_RESULT(ok) - + ]) + if test x"$enable_mono" = x"yes"; then oldLIBS="$LIBS" LIBS="$LIBS $MONO_LIBS" AC_MSG_CHECKING(for libmono) @@ -1254,7 +1249,9 @@ "x$gnutls_includes" != "x"; then have_gnutls_includes="yes" - GNUTLS_CFLAGS="-I$with_gnutls_includes" + if test "x$with_gnutls_includes" != "xNONE/include"; then + GNUTLS_CFLAGS="-I$with_gnutls_includes" + fi else GNUTLS_CFLAGS="" fi @@ -1836,8 +1833,12 @@ dnl ####################################################################### dnl # Check for check dnl ####################################################################### -PKG_CHECK_MODULES(CHECK, check >= 0.9.4, have_check=yes, have_check=no) -AM_CONDITIONAL(HAVE_CHECK, test "x$have_check" = "xyes") +PKG_CHECK_MODULES(CHECK,[check >= 0.9.4],:,[ + ifdef([AM_PATH_CHECK], + [AM_PATH_CHECK], + [AC_MSG_RESULT([no, testing is disabled])]) + ]) +AM_CONDITIONAL(HAVE_CHECK, [test "x$CHECK_LIBS" != "x"]) AC_SUBST(CHECK_CFLAGS) AC_SUBST(CHECK_LIBS) diff -r ab9aada65ac2 -r d8f98ce1cef0 console/libgnt/gntkeys.c --- a/console/libgnt/gntkeys.c Sun Mar 18 02:23:48 2007 +0000 +++ b/console/libgnt/gntkeys.c Sun Mar 18 16:01:00 2007 +0000 @@ -10,9 +10,15 @@ char *gnt_key_cright; static const char *term; +static GHashTable *specials; void gnt_init_keys() { + const char *controls[] = {"", "c-", "ctrl-", "ctr-", "ctl-", NULL}; + const char *alts[] = {"", "alt-", "a-", "m-", "meta-", NULL}; + int c, a, ch; + char key[32]; + if (term == NULL) { term = getenv("TERM"); if (!term) @@ -30,6 +36,82 @@ gnt_key_cright = "\033" "Oc"; gnt_key_cleft = "\033" "Od"; } + + specials = g_hash_table_new(g_str_hash, g_str_equal); + +#define INSERT_KEY(k, code) do { \ + g_hash_table_insert(specials, g_strdup(k), g_strdup(code)); \ + gnt_keys_add_combination(code); \ + } while (0) + + INSERT_KEY("home", GNT_KEY_HOME); + INSERT_KEY("end", GNT_KEY_END); + INSERT_KEY("pageup", GNT_KEY_PGUP); + INSERT_KEY("pagedown", GNT_KEY_PGDOWN); + INSERT_KEY("insert", GNT_KEY_INS); + INSERT_KEY("delete", GNT_KEY_DEL); + + INSERT_KEY("left", GNT_KEY_LEFT); + INSERT_KEY("right", GNT_KEY_RIGHT); + INSERT_KEY("up", GNT_KEY_UP); + INSERT_KEY("down", GNT_KEY_DOWN); + + INSERT_KEY("tab", "\t"); + INSERT_KEY("menu", GNT_KEY_POPUP); + + INSERT_KEY("f1", GNT_KEY_F1); + INSERT_KEY("f2", GNT_KEY_F2); + INSERT_KEY("f3", GNT_KEY_F3); + INSERT_KEY("f4", GNT_KEY_F4); + INSERT_KEY("f5", GNT_KEY_F5); + INSERT_KEY("f6", GNT_KEY_F6); + INSERT_KEY("f7", GNT_KEY_F7); + INSERT_KEY("f8", GNT_KEY_F8); + INSERT_KEY("f9", GNT_KEY_F9); + INSERT_KEY("f10", GNT_KEY_F10); + INSERT_KEY("f11", GNT_KEY_F11); + INSERT_KEY("f12", GNT_KEY_F12); + +#define REM_LENGTH (sizeof(key) - (cur - key)) +#define INSERT_COMB(k, code) do { \ + snprintf(key, sizeof(key), "%s%s%s", controls[c], alts[a], k); \ + INSERT_KEY(key, code); \ + } while (0); + + /* Lower-case alphabets */ + for (a = 0, c = 0; controls[c]; c++, a = 0) { + if (c) { + INSERT_COMB("up", gnt_key_cup); + INSERT_COMB("down", gnt_key_cdown); + INSERT_COMB("left", gnt_key_cleft); + INSERT_COMB("right", gnt_key_cright); + } + + for (a = 0; alts[a]; a++) { + if (a == 0 && c == 0) continue; + for (ch = 0; ch < 26; ch++) { + char str[2] = {'a' + ch, 0}, code[4] = "\0\0\0\0"; + int ind = 0; + if (a) + code[ind++] = '\033'; + code[ind] = (c ? 1 : 'a') + ch; + INSERT_COMB(str, code); + } + } + } + c = 0; + for (a = 1; alts[a]; a++) { + /* Upper-case alphabets */ + for (ch = 0; ch < 26; ch++) { + char str[2] = {'A' + ch, 0}, code[] = {'\033', 'A' + ch, 0}; + INSERT_COMB(str, code); + } + /* Digits */ + for (ch = 0; ch < 10; ch++) { + char str[2] = {'0' + ch, 0}, code[] = {'\033', '0' + ch, 0}; + INSERT_COMB(str, code); + } + } } void gnt_keys_refine(char *text) @@ -48,6 +130,11 @@ } } +const char *gnt_key_translate(const char *name) +{ + return g_hash_table_lookup(specials, name); +} + /** * The key-bindings will be saved in a tree. When a keystroke happens, GNT will * find the sequence that matches a binding and return the length. @@ -120,6 +207,7 @@ int depth = 0; struct _node *n = &root; + root.flags &= ~IS_END; while (*path && n->next[*path] && !(n->flags & IS_END)) { if (g_utf8_find_next_char(path, NULL) - path > 1) return 0; @@ -138,7 +226,7 @@ int i; for (i = 0; i < SIZE; i++) { if (node->next[i]) { - g_printerr("%*c (%d:%d)\n", depth, i, node->next[i]->ref, + g_printerr("%*c (%d:%d)\n", depth * 4, i, node->next[i]->ref, node->next[i]->flags); print_path(node->next[i], depth + 1); } diff -r ab9aada65ac2 -r d8f98ce1cef0 console/libgnt/gntkeys.h --- a/console/libgnt/gntkeys.h Sun Mar 18 02:23:48 2007 +0000 +++ b/console/libgnt/gntkeys.h Sun Mar 18 16:01:00 2007 +0000 @@ -81,6 +81,7 @@ */ void gnt_init_keys(); void gnt_keys_refine(char *text); +const char *gnt_key_translate(const char *name); void gnt_keys_add_combination(const char *path); void gnt_keys_del_combination(const char *path); diff -r ab9aada65ac2 -r d8f98ce1cef0 console/libgnt/gntmain.c --- a/console/libgnt/gntmain.c Sun Mar 18 02:23:48 2007 +0000 +++ b/console/libgnt/gntmain.c Sun Mar 18 16:01:00 2007 +0000 @@ -7,6 +7,9 @@ #include +#include +#include + #include "gnt.h" #include "gntbox.h" #include "gntcolors.h" @@ -29,9 +32,6 @@ #include #include -#include -#include - /** * Notes: Interesting functions to look at: * scr_dump, scr_init, scr_restore: for workspaces @@ -360,6 +360,7 @@ noecho(); curs_set(0); + gnt_init_keys(); gnt_init_styles(); filename = g_build_filename(g_get_home_dir(), ".gntrc", NULL); @@ -367,7 +368,6 @@ g_free(filename); gnt_init_colors(); - gnt_init_keys(); wbkgdset(stdscr, '\0' | COLOR_PAIR(GNT_COLOR_NORMAL)); refresh(); diff -r ab9aada65ac2 -r d8f98ce1cef0 console/libgnt/gntmenu.c --- a/console/libgnt/gntmenu.c Sun Mar 18 02:23:48 2007 +0000 +++ b/console/libgnt/gntmenu.c Sun Mar 18 16:01:00 2007 +0000 @@ -134,7 +134,8 @@ int current = menu->selected; if (menu->submenu) { - return (gnt_widget_key_pressed(GNT_WIDGET(menu->submenu), text)); + do menu = menu->submenu; while (menu->submenu); + return (gnt_widget_key_pressed(GNT_WIDGET(menu), text)); } if (text[0] == 27 && text[1] == 0) { diff -r ab9aada65ac2 -r d8f98ce1cef0 console/libgnt/gntstyle.c --- a/console/libgnt/gntstyle.c Sun Mar 18 02:23:48 2007 +0000 +++ b/console/libgnt/gntstyle.c Sun Mar 18 16:01:00 2007 +0000 @@ -84,82 +84,7 @@ static char * parse_key(const char *key) { - char *ret = NULL; - int ctrl = 0, alt = 0; - char k; - - /* XXX: Need to do something about ctrl/alt+home, end etc. */ - -#define SPECIAL_KEY(k, code) do { \ - if (strcasecmp(key, k) == 0) \ - return g_strdup(code); \ - } while (0) - - SPECIAL_KEY("home", GNT_KEY_HOME); - SPECIAL_KEY("end", GNT_KEY_END); - SPECIAL_KEY("pageup", GNT_KEY_PGUP); - SPECIAL_KEY("pagedown", GNT_KEY_PGDOWN); - SPECIAL_KEY("insert", GNT_KEY_INS); - SPECIAL_KEY("delete", GNT_KEY_DEL); - - SPECIAL_KEY("left", GNT_KEY_LEFT); - SPECIAL_KEY("right", GNT_KEY_RIGHT); - SPECIAL_KEY("up", GNT_KEY_UP); - SPECIAL_KEY("down", GNT_KEY_DOWN); - - SPECIAL_KEY("tab", "\t"); - SPECIAL_KEY("menu", GNT_KEY_POPUP); - - SPECIAL_KEY("f1", GNT_KEY_F1); - SPECIAL_KEY("f2", GNT_KEY_F2); - SPECIAL_KEY("f3", GNT_KEY_F3); - SPECIAL_KEY("f4", GNT_KEY_F4); - SPECIAL_KEY("f5", GNT_KEY_F5); - SPECIAL_KEY("f6", GNT_KEY_F6); - SPECIAL_KEY("f7", GNT_KEY_F7); - SPECIAL_KEY("f8", GNT_KEY_F8); - SPECIAL_KEY("f9", GNT_KEY_F9); - SPECIAL_KEY("f10", GNT_KEY_F10); - SPECIAL_KEY("f11", GNT_KEY_F11); - SPECIAL_KEY("f12", GNT_KEY_F12); - -#undef SPECIAL_KEY - -#define MATCH(string, var) do { \ - if (strncasecmp(key, string, sizeof(string) - 1) == 0) { \ - key += sizeof(string) - 1; \ - var = 1; \ - } \ - }while (0) - - MATCH("c-", ctrl); - MATCH("ctl-", ctrl); - MATCH("ctr-", ctrl); - MATCH("ctrl-", ctrl); - - MATCH("alt-", alt); - MATCH("a-", alt); - MATCH("m-", alt); - MATCH("meta-", alt); - - if (strlen(key) != 1) /* We can only have stuff like "ctrl-alt-a" */ - return NULL; - - if (ctrl && !isalpha(*key)) { - /* These keys cannot be used with ctrl */ - return NULL; - } - - if (ctrl) - k = *key | 0x20; - else - k = *key; - - ret = g_strdup_printf("%s%c", alt ? "\033" : "", ctrl ? k - 0x60 : k); - -#undef MATCH - - return ret; + return gnt_key_translate(key); } void gnt_style_read_actions(GType type, GntBindableClass *klass) @@ -199,12 +124,11 @@ } else { - char *keycode = parse_key(key); + const char *keycode = parse_key(key); if (keycode == NULL) { g_printerr("GntStyle: Invalid key-binding %s\n", key); } else { gnt_bindable_register_binding(klass, action, keycode, NULL); - g_free(keycode); } } g_free(key); diff -r ab9aada65ac2 -r d8f98ce1cef0 console/libgnt/gnttextview.c --- a/console/libgnt/gnttextview.c Sun Mar 18 02:23:48 2007 +0000 +++ b/console/libgnt/gnttextview.c Sun Mar 18 16:01:00 2007 +0000 @@ -223,7 +223,7 @@ gunichar *u; pos = g_utf8_next_char(pos); u = g_utf8_to_ucs4(pos, -1, NULL, NULL, NULL); - if (u && g_unichar_iswide_cjk(*u)) + if (u && g_unichar_iswide(*u)) i++; g_free(u); } diff -r ab9aada65ac2 -r d8f98ce1cef0 console/libgnt/gntwm.c --- a/console/libgnt/gntwm.c Sun Mar 18 02:23:48 2007 +0000 +++ b/console/libgnt/gntwm.c Sun Mar 18 16:01:00 2007 +0000 @@ -5,6 +5,10 @@ #include "config.h" +#include +#include +#include + #include "gntwm.h" #include "gntstyle.h" #include "gntmarshal.h" @@ -15,10 +19,6 @@ #include "gnttree.h" #include "gntutils.h" -#include -#include -#include - #define IDLE_CHECK_INTERVAL 5 /* 5 seconds */ enum diff -r ab9aada65ac2 -r d8f98ce1cef0 console/libgnt/wms/s.c --- a/console/libgnt/wms/s.c Sun Mar 18 02:23:48 2007 +0000 +++ b/console/libgnt/wms/s.c Sun Mar 18 16:01:00 2007 +0000 @@ -1,3 +1,6 @@ +#include +#include + #include "gnt.h" #include "gntbox.h" #include "gntmenu.h" @@ -8,8 +11,6 @@ #include "blist.h" -#include - #define TYPE_S (s_get_gtype()) typedef struct _S diff -r ab9aada65ac2 -r d8f98ce1cef0 doc/C-HOWTO.dox --- a/doc/C-HOWTO.dox Sun Mar 18 02:23:48 2007 +0000 +++ b/doc/C-HOWTO.dox Sun Mar 18 16:01:00 2007 +0000 @@ -22,13 +22,10 @@ generally set the prefix to /usr/local. This shouldn't be a problem, except that most packages compile and install Gaim with /usr as the prefix. - All plugins must have @c GAIM_PLUGINS defined. You can choose to include - @c internal.h to do this, but if you choose to do it this way it must be - included before any other Gaim files. Likewise, if you choose to manually - define @c GAIM_PLUGINS, the definition must be before including any Gaim - files. Failure to do so will produce the 'plugin foo could not be loaded for - an unknown reason'. This is one of the hardest unknown reasons to track - down, so let's try to avoid it at all costs ;) + All plugins must have @c GAIM_PLUGINS defined, the definition must be before + including any Gaim files. Failure to do so will produce the 'plugin foo + could not be loaded for an unknown reason'. This is one of the hardest + unknown reasons to track down, so let's try to avoid it at all costs ;) @section hello_world Hello World! I know every tutorial has a hello world, so why should Gaim be any different? diff -r ab9aada65ac2 -r d8f98ce1cef0 libpurple/connection.c --- a/libpurple/connection.c Sun Mar 18 02:23:48 2007 +0000 +++ b/libpurple/connection.c Sun Mar 18 16:01:00 2007 +0000 @@ -446,10 +446,8 @@ ops = gaim_connections_get_ui_ops(); - if (ops != NULL) { - if (ops->report_disconnect != NULL) - ops->report_disconnect(gc, text); - } + if (ops != NULL && ops->report_disconnect != NULL) + ops->report_disconnect(gc, text); gc->disconnect_timeout = gaim_timeout_add(0, gaim_connection_disconnect_cb, gaim_connection_get_account(gc)); diff -r ab9aada65ac2 -r d8f98ce1cef0 libpurple/plugins/ssl/Makefile.am --- a/libpurple/plugins/ssl/Makefile.am Sun Mar 18 02:23:48 2007 +0000 +++ b/libpurple/plugins/ssl/Makefile.am Sun Mar 18 16:01:00 2007 +0000 @@ -30,6 +30,7 @@ -I$(top_srcdir)/libpurple \ $(DEBUG_CFLAGS) \ $(GLIB_CFLAGS) \ - $(PLUGIN_CFLAGS) \ - $(NSS_CFLAGS) \ - $(GNUTLS_CFLAGS) + $(PLUGIN_CFLAGS) + +ssl_gnutls_la_CFLAGS = $(AM_CPPFLAGS) $(GNUTLS_CFLAGS) +ssl_nss_la_CFLAGS = $(AM_CPPFLAGS) $(NSS_CFLAGS) diff -r ab9aada65ac2 -r d8f98ce1cef0 libpurple/protocols/bonjour/bonjour.c --- a/libpurple/protocols/bonjour/bonjour.c Sun Mar 18 02:23:48 2007 +0000 +++ b/libpurple/protocols/bonjour/bonjour.c Sun Mar 18 16:01:00 2007 +0000 @@ -297,7 +297,7 @@ presence = gaim_buddy_get_presence(buddy); if (gaim_presence_is_online(presence) && !gaim_presence_is_available(presence)) - return g_strdup("Away"); + return g_strdup(_("Away")); return NULL; } @@ -346,7 +346,7 @@ /* {"png", 0, 0, 96, 96, 0, GAIM_ICON_SCALE_DISPLAY}, */ /* icon_spec */ NO_BUDDY_ICONS, /* not yet */ /* icon_spec */ bonjour_list_icon, /* list_icon */ - NULL, /* list_emblem */ + NULL, /* list_emblem */ bonjour_status_text, /* status_text */ bonjour_tooltip_text, /* tooltip_text */ bonjour_status_types, /* status_types */ diff -r ab9aada65ac2 -r d8f98ce1cef0 libpurple/protocols/bonjour/jabber.c --- a/libpurple/protocols/bonjour/jabber.c Sun Mar 18 02:23:48 2007 +0000 +++ b/libpurple/protocols/bonjour/jabber.c Sun Mar 18 16:01:00 2007 +0000 @@ -531,10 +531,10 @@ xmlnode *message_x_node = NULL; GaimBuddy *gb = NULL; BonjourBuddy *bb = NULL; - char *conv_message = NULL; GaimConversation *conversation = NULL; char *message_from_ui = NULL; char *stripped_message = NULL; + gint ret; gb = gaim_find_buddy(data->account, to); if (gb == NULL) @@ -547,9 +547,11 @@ message_body_node = xmlnode_new("body"); stripped_message = gaim_markup_strip_html(body); xmlnode_insert_data(message_body_node, stripped_message, strlen(stripped_message)); + g_free(stripped_message); message_from_ui = g_strconcat("", body, "", NULL); message_html_body_font_node = xmlnode_from_str(message_from_ui, strlen(message_from_ui)); + g_free(message_from_ui); message_html_body_node = xmlnode_new("body"); xmlnode_insert_child(message_html_body_node, message_html_body_font_node); @@ -571,6 +573,7 @@ xmlnode_insert_child(message_node, message_x_node); message = xmlnode_to_str(message_node, &message_length); + xmlnode_free(message_node); /* Check if there is a previously open conversation */ if (bb->conversation == NULL) @@ -591,9 +594,10 @@ { gaim_debug_error("bonjour", "Unable to start a conversation\n"); gaim_debug_warning("bonjour", "send error: %s\n", strerror(errno)); - conv_message = g_strdup(_("Unable to send the message, the conversation couldn't be started.")); conversation = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, bb->name, data->account); - gaim_conversation_write(conversation, NULL, conv_message, GAIM_MESSAGE_SYSTEM, time(NULL)); + gaim_conversation_write(conversation, NULL, + _("Unable to send the message, the conversation couldn't be started."), + GAIM_MESSAGE_SYSTEM, time(NULL)); close(bb->conversation->socket); gaim_input_remove(bb->conversation->watcher_id); @@ -601,6 +605,7 @@ g_free(bb->conversation->buddy_name); g_free(bb->conversation); bb->conversation = NULL; + g_free(message); return 0; } @@ -608,7 +613,10 @@ } /* Send the message */ - if (_send_data(bb->conversation->socket, message) == -1) + ret = _send_data(bb->conversation->socket, message) == -1; + g_free(message); + + if (ret == -1) return -10000; return 1; diff -r ab9aada65ac2 -r d8f98ce1cef0 libpurple/protocols/msn/object.c --- a/libpurple/protocols/msn/object.c Sun Mar 18 02:23:48 2007 +0000 +++ b/libpurple/protocols/msn/object.c Sun Mar 18 16:01:00 2007 +0000 @@ -125,19 +125,24 @@ msn_object_to_string(const MsnObject *obj) { char *str; + const char *sha1c; g_return_val_if_fail(obj != NULL, NULL); + sha1c = msn_object_get_sha1c(obj); + str = g_strdup_printf("", + "Location=\"%s\" Friendly=\"%s\" SHA1D=\"%s\"" + "%s%s%s/>", msn_object_get_creator(obj), msn_object_get_size(obj), msn_object_get_type(obj), msn_object_get_location(obj), msn_object_get_friendly(obj), msn_object_get_sha1d(obj), - msn_object_get_sha1c(obj)); + sha1c ? " SHA1C=\"" : "", + sha1c ? sha1c : "", + sha1c ? "\"" : ""); return str; } diff -r ab9aada65ac2 -r d8f98ce1cef0 libpurple/tests/Makefile.am --- a/libpurple/tests/Makefile.am Sun Mar 18 02:23:48 2007 +0000 +++ b/libpurple/tests/Makefile.am Sun Mar 18 16:01:00 2007 +0000 @@ -1,26 +1,26 @@ if HAVE_CHECK -TESTS=check_libgaim +TESTS=check_libpurple -check_PROGRAMS=check_libgaim +check_PROGRAMS=check_libpurple -check_libgaim_SOURCES=\ - check_libgaim.c \ +check_libpurple_SOURCES=\ + check_libpurple.c \ tests.h \ test_cipher.c \ test_jabber_jutil.c \ test_util.c \ $(top_builddir)/libpurple/util.h -check_libgaim_CFLAGS=\ +check_libpurple_CFLAGS=\ @CHECK_CFLAGS@ \ $(GLIB_CFLAGS) \ -I.. \ -DBUILDDIR=\"$(top_builddir)\" -check_libgaim_LDADD=\ +check_libpurple_LDADD=\ @CHECK_LIBS@ \ $(GLIB_LIBS) \ $(top_builddir)/libpurple/protocols/jabber/libjabber.la \ - $(top_builddir)/libpurple/libgaim.la + $(top_builddir)/libpurple/libpurple.la endif diff -r ab9aada65ac2 -r d8f98ce1cef0 libpurple/tests/check_libgaim.c --- a/libpurple/tests/check_libgaim.c Sun Mar 18 02:23:48 2007 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -#include -#include - -#include "../core.h" -#include "../eventloop.h" - -#include "tests.h" - -/****************************************************************************** - * libgaim goodies - *****************************************************************************/ -static guint -gaim_check_input_add(gint fd, GaimInputCondition condition, - GaimInputFunction function, gpointer data) -{ - /* this is a no-op for now, feel free to implement it */ - return 0; -} - -static GaimEventLoopUiOps eventloop_ui_ops = { - g_timeout_add, - (guint (*)(guint))g_source_remove, - gaim_check_input_add, - (guint (*)(guint))g_source_remove, -}; - -static void -gaim_check_init(void) { - gchar *home_dir; - - gaim_eventloop_set_ui_ops(&eventloop_ui_ops); - - /* build our fake home directory */ - home_dir = g_build_path(BUILDDIR, "libgaim", "tests", "home", NULL); - gaim_util_set_user_dir(home_dir); - g_free(home_dir); - - gaim_core_init("check"); -} - -/****************************************************************************** - * Check meat and potatoes - *****************************************************************************/ -Suite* -master_suite(void) -{ - Suite *s = suite_create("Master Suite"); - - return s; -} - -int main(void) -{ - int number_failed; - SRunner *sr = srunner_create (master_suite()); - - srunner_add_suite(sr, cipher_suite()); - srunner_add_suite(sr, jabber_jutil_suite()); - srunner_add_suite(sr, util_suite()); - - /* make this a libgaim "ui" */ - gaim_check_init(); - - srunner_run_all (sr, CK_NORMAL); - number_failed = srunner_ntests_failed (sr); - srunner_free (sr); - - gaim_core_quit(); - - return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; -} diff -r ab9aada65ac2 -r d8f98ce1cef0 libpurple/tests/check_libpurple.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libpurple/tests/check_libpurple.c Sun Mar 18 16:01:00 2007 +0000 @@ -0,0 +1,71 @@ +#include +#include + +#include "../core.h" +#include "../eventloop.h" + +#include "tests.h" + +/****************************************************************************** + * libpurple goodies + *****************************************************************************/ +static guint +gaim_check_input_add(gint fd, GaimInputCondition condition, + GaimInputFunction function, gpointer data) +{ + /* this is a no-op for now, feel free to implement it */ + return 0; +} + +static GaimEventLoopUiOps eventloop_ui_ops = { + g_timeout_add, + (guint (*)(guint))g_source_remove, + gaim_check_input_add, + (guint (*)(guint))g_source_remove, +}; + +static void +gaim_check_init(void) { + gchar *home_dir; + + gaim_eventloop_set_ui_ops(&eventloop_ui_ops); + + /* build our fake home directory */ + home_dir = g_build_path(BUILDDIR, "libpurple", "tests", "home", NULL); + gaim_util_set_user_dir(home_dir); + g_free(home_dir); + + gaim_core_init("check"); +} + +/****************************************************************************** + * Check meat and potatoes + *****************************************************************************/ +Suite* +master_suite(void) +{ + Suite *s = suite_create("Master Suite"); + + return s; +} + +int main(void) +{ + int number_failed; + SRunner *sr = srunner_create (master_suite()); + + srunner_add_suite(sr, cipher_suite()); + srunner_add_suite(sr, jabber_jutil_suite()); + srunner_add_suite(sr, util_suite()); + + /* make this a libpurple "ui" */ + gaim_check_init(); + + srunner_run_all (sr, CK_NORMAL); + number_failed = srunner_ntests_failed (sr); + srunner_free (sr); + + gaim_core_quit(); + + return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; +} diff -r ab9aada65ac2 -r d8f98ce1cef0 libpurple/tests/tests.h --- a/libpurple/tests/tests.h Sun Mar 18 02:23:48 2007 +0000 +++ b/libpurple/tests/tests.h Sun Mar 18 16:01:00 2007 +0000 @@ -5,7 +5,7 @@ #include /* define the test suites here */ -/* remember to add the suite to the runner in check_libgaim.c */ +/* remember to add the suite to the runner in check_libpurple.c */ Suite * cipher_suite(void); Suite * jabber_jutil_suite(void); Suite * util_suite(void); diff -r ab9aada65ac2 -r d8f98ce1cef0 pidgin/gtkimhtml.c --- a/pidgin/gtkimhtml.c Sun Mar 18 02:23:48 2007 +0000 +++ b/pidgin/gtkimhtml.c Sun Mar 18 16:01:00 2007 +0000 @@ -477,8 +477,8 @@ pango_font_metrics_get_descent(font_metrics)); gtk_widget_set_size_request (imhtml->tip_window, w, h); + gtk_window_move (GTK_WINDOW(imhtml->tip_window), x, y); gtk_widget_show (imhtml->tip_window); - gtk_window_move (GTK_WINDOW(imhtml->tip_window), x, y); pango_font_metrics_unref(font_metrics); g_object_unref(layout);