Mon, 23 Apr 2007 21:25:06 +0000
merge of '35928c2d830682c844682f0727adadb577da6766'
and 'f3d9a36467356f0bc81394f00de96a82c4103e5b'
| PROGRAMMING_NOTES | file | annotate | diff | comparison | revisions | |
| libpurple/protocols/yahoo/yahoo.c | file | annotate | diff | comparison | revisions | |
| libpurple/version.h | file | annotate | diff | comparison | revisions | |
| libpurple/version.h.in | file | annotate | diff | comparison | revisions | |
| pidgin/plugins/perl/common/GtkUI.pm | file | annotate | diff | comparison | revisions | |
| pidgin/plugins/perl/common/GtkUI.xs | file | annotate | diff | comparison | revisions | |
| pidgin/plugins/perl/common/Pidgin.pm | file | annotate | diff | comparison | revisions | |
| pidgin/plugins/perl/common/Pidgin.xs | file | annotate | diff | comparison | revisions |
--- a/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -6,7 +6,6 @@ HACKING \ Makefile.mingw \ PLUGIN_HOWTO \ - PROGRAMMING_NOTES \ README.MTN \ README.mingw \ config.h.mingw \
--- a/PROGRAMMING_NOTES Mon Apr 23 02:44:04 2007 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -Notes on keeping Pidgin, Finch, and libpurple OS independant ------------------------------------------------------------- - -General -------- -- Use G_DIR_SEPARATOR_S and G_DIR_SEPARATOR for paths - -- Use g_getenv, g_snprintf, g_vsnprintf - -- Use purple_home_dir instead of g_get_home_dir or g_getenv("HOME") - -- Make sure when including win32dep.h that it is the last header to - be included. - -- Open binary files when reading or writing with 'b' mode. - - e.g: fopen("somefile", "wb"); - - Not doing so will open files in windows using default translation mode. - i.e. newline -> <CR><LF> - -Paths ------ - -- DATADIR, LOCALEDIR & LIBDIR are defined as functions in the win32 build - Doing the following will therefore break the windows build: - - printf("File in DATADIR is: %s\n", DATADIR G_DIR_SEPARATOR_S "pic.png"); - - it should be: - - printf("File in DATADIR is: %s%s%s\n", DATADIR, G_DIR_SEPARATOR_S, "pic.png"); - -PLUGINS & PROTOS ----------------- - -- G_MODULE_EXPORT all functions which are to be accessed from outside the - scope of its "dll" or "so". (E.G. purple_plugin_init) - -- G_MODULE_IMPORT all global variables which are located outside your - dynamic library. (E.G. connections) - - (Not doing this will cause "Memory Access Violations" in win32)
--- a/configure.ac Mon Apr 23 02:44:04 2007 +0000 +++ b/configure.ac Mon Apr 23 21:25:06 2007 +0000 @@ -1,11 +1,46 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([pidgin], [2.0.0beta7devel], [devel@pidgin.im]) +AC_PREREQ([2.50]) + +# Making releases: +# purple_micro_version += 1 +# if any functions have been added: +# purple_micro_version = 0 +# purple_minor_version += 1 +# if backwards compatibility has been broken +# purple_minor_version = 0 +# purple_micro_version = 0 +# purple_major_version += 1; +# +m4_define([purple_major_version], [2]) +m4_define([purple_minor_version], [0]) +m4_define([purple_micro_version], [0]) +m4_define([purple_version_suffix], [devel]) +m4_define([purple_version], + [purple_major_version.purple_minor_version.purple_micro_version]) +m4_define([purple_display_version], purple_version[]m4_ifdef([purple_version_suffix],[purple_version_suffix])) + +AC_INIT([pidgin], [purple_display_version], [devel@pidgin.im]) + AC_CANONICAL_SYSTEM AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) #AM_INIT_AUTOMAKE([foreign dist-bzip2]) -AC_PREREQ([2.50]) +PURPLE_MAJOR_VERSION=purple_major_version +PURPLE_MINOR_VERSION=purple_minor_version +PURPLE_MICRO_VERSION=purple_micro_version +PURPLE_VERSION=[purple_display_version] +AC_SUBST(PURPLE_MAJOR_VERSION) +AC_SUBST(PURPLE_MINOR_VERSION) +AC_SUBST(PURPLE_MICRO_VERSION) +AC_SUBST(PURPLE_VERSION) + +m4_define([lt_current], [m4_eval(100 * purple_major_version + purple_minor_version)]) +m4_define([lt_age], [purple_minor_version]) +m4_define([lt_revision], [purple_micro_version]) +LT_VERSION_INFO="lt_current:lt_revision:lt_age" +AC_SUBST(LT_VERSION_INFO) + AC_DEFINE(PIDGIN_NAME, "Pidgin", [The user-visible application name]) @@ -807,7 +842,22 @@ AC_CHECK_HEADER(sys/utsname.h) AC_CHECK_FUNC(uname) -AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], , enable_fortify=yes) +AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], enable_fortify="$enableval", enable_fortify=yes) + +AC_ARG_ENABLE(mcheck, [AC_HELP_STRING([--enable-mcheck], [compile with mcheck (malloc debugging) support])], enable_mcheck="$enableval", enable_mcheck="$enable_debug") +if test "x$enable_mcheck" = "xyes" ; then + orig_LIBS="$LIBS" + LIBS="$LIBS -lmcheck" + AC_MSG_CHECKING(for mcheck support) + AC_TRY_COMPILE([], [ + int main() {return 0;} + ], [ + AC_MSG_RESULT(yes) + ], [ + AC_MSG_RESULT(no) + LIBS="$orig_LIBS" + ]) +fi if test "x$GCC" = "xyes"; then dnl We enable -Wall later. @@ -835,10 +885,12 @@ "-Waggregate-return" \ "-Wcast-align" \ "-Wdeclaration-after-statement" \ + "-Wendif-labels" \ "-Werror-implicit-function-declaration" \ "-Wextra -Wno-sign-compare -Wno-unused-parameter" \ "-Winit-self" \ "-Wmissing-declarations" \ + "-Wmissing-noreturn" \ "-Wmissing-prototypes" \ "-Wnested-externs" \ "-Wpointer-arith" \ @@ -875,7 +927,7 @@ } ], [ AC_MSG_RESULT(yes) - DEBUG_CFLAGS="$DEBUG_CFLAGS -D_FORTIFY_SOURCE=2" + DEBUG_CFLAGS="$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2" ], [ AC_MSG_RESULT(no) ]) @@ -1996,6 +2048,7 @@ libpurple/protocols/yahoo/Makefile libpurple/protocols/zephyr/Makefile libpurple/tests/Makefile + libpurple/version.h finch/Makefile finch/libgnt/Makefile finch/libgnt/gnt.pc
--- a/finch/finch.c Mon Apr 23 02:44:04 2007 +0000 +++ b/finch/finch.c Mon Apr 23 21:25:06 2007 +0000 @@ -202,6 +202,11 @@ {0, 0, 0, 0} }; +#ifdef PURPLE_FATAL_ASSERTS + /* Make g_return_... functions fatal. */ + g_log_set_always_fatal(G_LOG_LEVEL_CRITICAL); +#endif + #ifdef ENABLE_NLS bindtextdomain(PACKAGE, LOCALEDIR); bind_textdomain_codeset(PACKAGE, "UTF-8"); @@ -323,8 +328,7 @@ /* TODO: Move prefs loading into purple_prefs_init() */ purple_prefs_load(); purple_prefs_update_old(); - purple_prefs_rename("/gaim/gnt", "/finch"); - purple_prefs_rename("/purple/gnt", "/finch"); + finch_prefs_update_old(); /* load plugins we had when we quit */ purple_plugins_load_saved("/finch/plugins/loaded");
--- a/finch/gntblist.c Mon Apr 23 02:44:04 2007 +0000 +++ b/finch/gntblist.c Mon Apr 23 21:25:06 2007 +0000 @@ -110,6 +110,7 @@ static const char * get_display_name(PurpleBlistNode *node); static void savedstatus_changed(PurpleSavedStatus *now, PurpleSavedStatus *old); static void blist_show(PurpleBuddyList *list); +static void update_node_display(PurpleBlistNode *buddy, FinchBlist *ggblist); static void update_buddy_display(PurpleBuddy *buddy, FinchBlist *ggblist); static void account_signed_on_cb(void); @@ -187,13 +188,16 @@ if ((!purple_prefs_get_bool(PREF_ROOT "/showoffline") && !is_contact_online(contact)) || contact->currentsize < 1) node_remove(list, (PurpleBlistNode*)contact); - } else if (PURPLE_BLIST_NODE_IS_CONTACT(node)) { + } else if (!PURPLE_BLIST_NODE_IS_GROUP(node)) { PurpleGroup *group = (PurpleGroup*)node->parent; if ((!purple_prefs_get_bool(PREF_ROOT "/showoffline") && !is_group_online(group)) || group->currentsize < 1) node_remove(list, node->parent); for (node = node->child; node; node = node->next) node->ui_data = NULL; + } else { + for (node = node->child; node; node = node->next) + node_remove(list, node); } draw_tooltip(ggblist); @@ -232,13 +236,20 @@ if ((!purple_prefs_get_bool(PREF_ROOT "/showoffline") && !is_contact_online(contact)) || contact->currentsize < 1) node_remove(purple_get_blist(), node); - else - add_node(node, list->ui_data); + else { + if (node->ui_data == NULL) { + /* The core seems to expect the UI to add the buddies. */ + for (node = node->child; node; node = node->next) + add_node(node, list->ui_data); + } + } } else if (PURPLE_BLIST_NODE_IS_GROUP(node)) { PurpleGroup *group = (PurpleGroup*)node; if ((!purple_prefs_get_bool(PREF_ROOT "/showoffline") && !is_group_online(group)) || group->currentsize < 1) node_remove(list, node); + else + add_node(node, list->ui_data); } } @@ -1044,8 +1055,6 @@ GList *iter; if (node == NULL) return; - if (PURPLE_BLIST_NODE_IS_CHAT(node) || PURPLE_BLIST_NODE_IS_GROUP(node)) - return; if (ggblist->tagged && (iter = g_list_find(ggblist->tagged, node)) != NULL) { ggblist->tagged = g_list_delete_link(ggblist->tagged, iter); } else { @@ -1053,7 +1062,10 @@ } if (PURPLE_BLIST_NODE_IS_CONTACT(node)) node = (PurpleBlistNode*)purple_contact_get_priority_buddy((PurpleContact*)node); - update_buddy_display((PurpleBuddy*)node, ggblist); + if (PURPLE_BLIST_NODE_IS_BUDDY(node)) + update_buddy_display((PurpleBuddy*)node, ggblist); + else + update_node_display(node, ggblist); } static void @@ -1065,37 +1077,61 @@ if (target == NULL) return; - /* This target resolution probably needs more clarification; for - * example, if I tag a buddy in a contact, then place on - * another buddy in the same contact, I probably intend to - * place the tagged buddy immediately after (before?) the - * target buddy -- this will simply move the tagged buddy - * within the same contact without reference to position. */ if (PURPLE_BLIST_NODE_IS_GROUP(target)) tg = (PurpleGroup*)target; - else if (PURPLE_BLIST_NODE_IS_CONTACT(target)) - tc = (PurpleContact*)target; - else /* Buddy or Chat */ + else if (PURPLE_BLIST_NODE_IS_BUDDY(target)) { tc = (PurpleContact*)target->parent; + tg = (PurpleGroup*)target->parent->parent; + } else { + if (PURPLE_BLIST_NODE_IS_CONTACT(target)) + tc = (PurpleContact*)target; + tg = (PurpleGroup*)target->parent; + } if (ggblist->tagged) { GList *list = ggblist->tagged; ggblist->tagged = NULL; - while (list) { PurpleBlistNode *node = list->data; list = g_list_delete_link(list, list); - if (tg) { - if (PURPLE_BLIST_NODE_IS_CONTACT(node)) + + if (PURPLE_BLIST_NODE_IS_GROUP(node)) { + update_node_display(node, ggblist); + /* Add the group after the current group */ + purple_blist_add_group((PurpleGroup*)node, (PurpleBlistNode*)tg); + } else if (PURPLE_BLIST_NODE_IS_CONTACT(node)) { + update_buddy_display(purple_contact_get_priority_buddy((PurpleContact*)node), ggblist); + if ((PurpleBlistNode*)tg == target) { + /* The target is a group, just add the contact to the group. */ purple_blist_add_contact((PurpleContact*)node, tg, NULL); - else + } else if (tc) { + /* The target is either a buddy, or a contact. Merge with that contact. */ + purple_blist_merge_contact((PurpleContact*)node, (PurpleBlistNode*)tc); + } else { + /* The target is a chat. Add the contact to the group after this chat. */ + purple_blist_add_contact((PurpleContact*)node, NULL, target); + } + } else if (PURPLE_BLIST_NODE_IS_BUDDY(node)) { + update_buddy_display((PurpleBuddy*)node, ggblist); + if ((PurpleBlistNode*)tg == target) { + /* The target is a group. Add this buddy in a new contact under this group. */ purple_blist_add_buddy((PurpleBuddy*)node, NULL, tg, NULL); - } else { - if (PURPLE_BLIST_NODE_IS_BUDDY(node)) - purple_blist_add_buddy((PurpleBuddy*)node, tc, - purple_buddy_get_group(purple_contact_get_priority_buddy(tc)), NULL); - else if (PURPLE_BLIST_NODE_IS_CONTACT(node)) - purple_blist_merge_contact((PurpleContact*)node, target); + } else if (PURPLE_BLIST_NODE_IS_CONTACT(target)) { + /* Add to the contact. */ + purple_blist_add_buddy((PurpleBuddy*)node, tc, NULL, NULL); + } else if (PURPLE_BLIST_NODE_IS_BUDDY(target)) { + /* Add to the contact after the selected buddy. */ + purple_blist_add_buddy((PurpleBuddy*)node, NULL, NULL, target); + } else if (PURPLE_BLIST_NODE_IS_CHAT(target)) { + /* Add to the selected chat's group. */ + purple_blist_add_buddy((PurpleBuddy*)node, NULL, tg, NULL); + } + } else if (PURPLE_BLIST_NODE_IS_CHAT(node)) { + update_node_display(node, ggblist); + if ((PurpleBlistNode*)tg == target) + purple_blist_add_chat((PurpleChat*)node, tg, NULL); + else + purple_blist_add_chat((PurpleChat*)node, NULL, target); } } } @@ -1419,6 +1455,15 @@ } static void +update_node_display(PurpleBlistNode *node, FinchBlist *ggblist) +{ + GntTextFormatFlags flag = 0; + if (ggblist->tagged && g_list_find(ggblist->tagged, node)) + flag |= GNT_TEXT_FLAG_BOLD; + gnt_tree_set_row_flags(GNT_TREE(ggblist->tree), node, flag); +} + +static void update_buddy_display(PurpleBuddy *buddy, FinchBlist *ggblist) { PurpleContact *contact; @@ -1439,10 +1484,16 @@ if (purple_presence_is_idle(purple_buddy_get_presence(buddy))) { gnt_tree_set_row_flags(GNT_TREE(ggblist->tree), buddy, bflag | GNT_TEXT_FLAG_DIM); - gnt_tree_set_row_flags(GNT_TREE(ggblist->tree), contact, cflag | GNT_TEXT_FLAG_DIM); + if (buddy == purple_contact_get_priority_buddy(contact)) + gnt_tree_set_row_flags(GNT_TREE(ggblist->tree), contact, cflag | GNT_TEXT_FLAG_DIM); + else + update_buddy_display(purple_contact_get_priority_buddy(contact), ggblist); } else { gnt_tree_set_row_flags(GNT_TREE(ggblist->tree), buddy, bflag); - gnt_tree_set_row_flags(GNT_TREE(ggblist->tree), contact, cflag); + if (buddy == purple_contact_get_priority_buddy(contact)) + gnt_tree_set_row_flags(GNT_TREE(ggblist->tree), contact, cflag); + else + update_buddy_display(purple_contact_get_priority_buddy(contact), ggblist); } } @@ -1890,7 +1941,6 @@ break; default: return blist_node_compare_position(n1, n2); - break; } ret = blist_node_compare_text(n1, n2); return ret;
--- a/finch/gntprefs.c Mon Apr 23 02:44:04 2007 +0000 +++ b/finch/gntprefs.c Mon Apr 23 21:25:06 2007 +0000 @@ -42,9 +42,19 @@ purple_prefs_add_none("/finch/conversations"); purple_prefs_add_bool("/finch/conversations/timestamps", TRUE); - purple_prefs_add_bool("/finch/conversations/notify_typing", FALSE); /* XXX: Not functional yet */ + purple_prefs_add_bool("/finch/conversations/notify_typing", FALSE); +} + +void finch_prefs_update_old() +{ + const char *str = NULL; + purple_prefs_rename("/gaim/gnt", "/finch"); purple_prefs_rename("/purple/gnt", "/finch"); + + if ((str = purple_prefs_get_string("/purple/away/idle_reporting")) && + strcmp(str, "gaim") == 0) + purple_prefs_set_string("/purple/away/idle_reporting", "purple"); } typedef struct
--- a/finch/gntprefs.h Mon Apr 23 02:44:04 2007 +0000 +++ b/finch/gntprefs.h Mon Apr 23 21:25:06 2007 +0000 @@ -40,6 +40,10 @@ */ void finch_prefs_show_all(void); +/** + * You don't need to know about this. + */ +void finch_prefs_update_old(void); /*@}*/ #endif
--- a/finch/libgnt/gnttree.c Mon Apr 23 02:44:04 2007 +0000 +++ b/finch/libgnt/gnttree.c Mon Apr 23 21:25:06 2007 +0000 @@ -152,9 +152,7 @@ while(row->next) row = row->next; - if (!row->collapsed && row->child) - row = get_last_child(row->child); - return row; + return get_last_child(row); } static GntTreeRow *
--- a/finch/libgnt/gntwm.c Mon Apr 23 02:44:04 2007 +0000 +++ b/finch/libgnt/gntwm.c Mon Apr 23 21:25:06 2007 +0000 @@ -905,6 +905,32 @@ return FALSE; } +static gboolean +toggle_clipboard(GntBindable *bindable, GList *n) +{ + static GntWidget *clip; + gchar *text; + int maxx, maxy; + if (clip) { + gnt_widget_destroy(clip); + clip = NULL; + return TRUE; + } + getmaxyx(stdscr, maxy, maxx); + text = gnt_get_clipboard_string(); + clip = gnt_hwindow_new(FALSE); + GNT_WIDGET_SET_FLAGS(clip, GNT_WIDGET_TRANSIENT); + GNT_WIDGET_SET_FLAGS(clip, GNT_WIDGET_NO_BORDER); + gnt_box_set_pad(GNT_BOX(clip), 0); + gnt_box_add_widget(GNT_BOX(clip), gnt_label_new(" ")); + gnt_box_add_widget(GNT_BOX(clip), gnt_label_new(text)); + gnt_box_add_widget(GNT_BOX(clip), gnt_label_new(" ")); + gnt_widget_set_position(clip, 0, 0); + gnt_widget_draw(clip); + g_free(text); + return TRUE; +} + static void gnt_wm_class_init(GntWMClass *klass) { @@ -1039,6 +1065,8 @@ "\033" GNT_KEY_CTRL_K, NULL); gnt_bindable_class_register_action(GNT_BINDABLE_CLASS(klass), "help-for-widget", help_for_widget, "\033" "/", NULL); + gnt_bindable_class_register_action(GNT_BINDABLE_CLASS(klass), "toggle-clipboard", + toggle_clipboard, "\033" "C", NULL); gnt_style_read_actions(G_OBJECT_CLASS_TYPE(klass), GNT_BINDABLE_CLASS(klass));
--- a/finch/libgnt/wms/s.c Mon Apr 23 02:44:04 2007 +0000 +++ b/finch/libgnt/wms/s.c Mon Apr 23 21:25:06 2007 +0000 @@ -168,32 +168,6 @@ return TRUE; } -static gboolean -toggle_clipboard(GntBindable *bindable, GList *n) -{ - static GntWidget *clip; - gchar *text; - int maxx, maxy; - if (clip) { - gnt_widget_destroy(clip); - clip = NULL; - return TRUE; - } - getmaxyx(stdscr, maxy, maxx); - text = gnt_get_clipboard_string(); - clip = gnt_hwindow_new(FALSE); - GNT_WIDGET_SET_FLAGS(clip, GNT_WIDGET_TRANSIENT); - GNT_WIDGET_SET_FLAGS(clip, GNT_WIDGET_NO_BORDER); - gnt_box_set_pad(GNT_BOX(clip), 0); - gnt_box_add_widget(GNT_BOX(clip), gnt_label_new(" ")); - gnt_box_add_widget(GNT_BOX(clip), gnt_label_new(text)); - gnt_box_add_widget(GNT_BOX(clip), gnt_label_new(" ")); - gnt_widget_set_position(clip, 0, 0); - gnt_widget_draw(clip); - g_free(text); - return TRUE; -} - static void s_class_init(SClass *klass) { @@ -208,8 +182,6 @@ gnt_bindable_class_register_action(GNT_BINDABLE_CLASS(klass), "toggle-buddylist", toggle_buddylist, "\033" "b", NULL); - gnt_bindable_class_register_action(GNT_BINDABLE_CLASS(klass), "toggle-clipboard", - toggle_clipboard, "\033" "C", NULL); gnt_style_read_actions(G_OBJECT_CLASS_TYPE(klass), GNT_BINDABLE_CLASS(klass)); GNTDEBUG; }
--- a/libpurple/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -8,6 +8,7 @@ purple-url-handler \ purple.pc.in \ purple-uninstalled.pc.in \ + version.h.in \ Makefile.mingw \ win32/global.mak \ win32/libc_interface.c \ @@ -75,6 +76,7 @@ upnp.c \ util.c \ value.c \ + version.c \ xmlnode.c \ whiteboard.c @@ -219,7 +221,7 @@ $(dbus_headers) libpurple_la_DEPENDENCIES = $(STATIC_LINK_LIBS) -libpurple_la_LDFLAGS = -export-dynamic +libpurple_la_LDFLAGS = -export-dynamic -version-info $(LT_VERSION_INFO) -no-undefined libpurple_la_LIBADD = \ $(DBUS_LIBS) \ $(GLIB_LIBS) \ @@ -232,7 +234,7 @@ AM_CPPFLAGS = \ -DBR_PTHREADS=0 \ -DDATADIR=\"$(datadir)\" \ - -DLIBDIR=\"$(libdir)/purple/\" \ + -DLIBDIR=\"$(libdir)/purple-$(PURPLE_MAJOR_VERSION)/\" \ -DLOCALEDIR=\"$(datadir)/locale\" \ -DSYSCONFDIR=\"$(sysconfdir)\" \ $(GLIB_CFLAGS) \
--- a/libpurple/account.c Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/account.c Mon Apr 23 21:25:06 2007 +0000 @@ -749,6 +749,15 @@ { purple_buddy_icons_set_account_icon(ret, (guchar *)contents, len); } + else + { + /* Try to see if the icon got left behind in the old cache. */ + g_free(filename); + filename = g_build_filename(g_get_home_dir(), ".gaim", "icons", data, NULL); + if (g_file_get_contents(filename, &contents, &len, NULL)) { + purple_buddy_icons_set_account_icon(ret, (guchar*)contents, len); + } + } g_free(filename); g_free(data);
--- a/libpurple/blist.c Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/blist.c Mon Apr 23 21:25:06 2007 +0000 @@ -2334,7 +2334,6 @@ buddy = (PurpleBuddy *)bnode; if (account == buddy->account) { PurplePresence *presence; - recompute = TRUE; presence = purple_buddy_get_presence(buddy); @@ -2354,8 +2353,14 @@ if (!g_list_find(list, presence)) list = g_list_prepend(list, presence); - if (ops && ops->remove) + if (contact->priority == buddy) + purple_contact_invalidate_priority_buddy(contact); + else + recompute = TRUE; + + if (ops && ops->remove) { ops->remove(purplebuddylist, bnode); + } } } if (recompute) {
--- a/libpurple/buddyicon.c Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/buddyicon.c Mon Apr 23 21:25:06 2007 +0000 @@ -848,6 +848,18 @@ } static void +delete_buddy_icon_settings(PurpleBlistNode *node, const char *setting_name) +{ + purple_blist_node_remove_setting(node, setting_name); + + if (!strcmp(setting_name, "buddy_icon")) + { + purple_blist_node_remove_setting(node, "avatar_hash"); + purple_blist_node_remove_setting(node, "icon_checksum"); + } +} + +static void migrate_buddy_icon(PurpleBlistNode *node, const char *setting_name, const char *dirname, const char *filename) { @@ -875,8 +887,10 @@ FILE *file; char *new_filename; - if (!read_icon_file(path, &icon_data, &icon_len)) + if (!read_icon_file(path, &icon_data, &icon_len) || + icon_data == NULL || icon_len > 0) { + delete_buddy_icon_settings(node, setting_name); g_free(path); return; } @@ -886,6 +900,7 @@ new_filename = purple_buddy_icon_data_calculate_filename(icon_data, icon_len); if (new_filename == NULL) { + delete_buddy_icon_settings(node, setting_name); return; } @@ -908,6 +923,8 @@ path, strerror(errno)); g_free(new_filename); g_free(path); + + delete_buddy_icon_settings(node, setting_name); return; } g_free(path); @@ -931,13 +948,19 @@ } else { - int checksum = purple_blist_node_get_int(node, "icon_checksum"); - if (checksum != 0) + PurpleAccount *account = purple_buddy_get_account((PurpleBuddy *)node); + const char *prpl_id = purple_account_get_protocol_id(account); + + if (!strcmp(prpl_id, "prpl-yahoo")) { - char *checksum_str = g_strdup_printf("%i", checksum); - purple_blist_node_remove_setting(node, "icon_checksum"); - purple_blist_node_set_string(node, "icon_checksum", checksum_str); - g_free(checksum_str); + int checksum = purple_blist_node_get_int(node, "icon_checksum"); + if (checksum != 0) + { + char *checksum_str = g_strdup_printf("%i", checksum); + purple_blist_node_remove_setting(node, "icon_checksum"); + purple_blist_node_set_string(node, "icon_checksum", checksum_str); + g_free(checksum_str); + } } } } @@ -945,16 +968,7 @@ else { /* If the icon is gone, drop the setting... */ - purple_blist_node_remove_setting(node, - setting_name); - - if (!strcmp(setting_name, "buddy_icon")) - { - purple_blist_node_remove_setting(node, - "avatar_hash"); - purple_blist_node_remove_setting(node, - "icon_checksum"); - } + delete_buddy_icon_settings(node, setting_name); g_free(path); } } @@ -1006,7 +1020,7 @@ } } - while (node != NULL) + while (node != NULL) { if (PURPLE_BLIST_NODE_IS_BUDDY(node)) { @@ -1048,7 +1062,7 @@ { migrate_buddy_icon(node, "custom_buddy_icon", - dirname, filename); + dirname, filename); } else { @@ -1065,7 +1079,7 @@ } } node = purple_blist_node_next(node, TRUE); - } + } } void
--- a/libpurple/core.c Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/core.c Mon Apr 23 21:25:06 2007 +0000 @@ -116,6 +116,8 @@ purple_dbus_init(); #endif + purple_ciphers_init(); + /* Initialize all static protocols. */ static_proto_init(); @@ -134,7 +136,6 @@ purple_accounts_init(); purple_savedstatuses_init(); - purple_ciphers_init(); purple_notify_init(); purple_connections_init(); purple_conversations_init(); @@ -310,7 +311,6 @@ gboolean purple_core_migrate(void) { -#error You probably want to back up your .gaim directory right now. This revision is going to destroy it, potentially not in the way we've intended const char *user_dir = purple_user_dir(); char *old_user_dir = g_strconcat(purple_home_dir(), G_DIR_SEPARATOR_S ".gaim", NULL);
--- a/libpurple/example/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/example/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -14,7 +14,7 @@ -DSTANDALONE \ -DBR_PTHREADS=0 \ -DDATADIR=\"$(datadir)\" \ - -DLIBDIR=\"$(libdir)/libpurple/\" \ + -DLIBDIR=\"$(libdir)/purple-$(PURPLE_MAJOR_VERSION)/\" \ -DLOCALEDIR=\"$(datadir)/locale\" \ -DSYSCONFDIR=\"$(sysconfdir)\" \ -I$(top_srcdir)/libpurple/ \
--- a/libpurple/gaim-compat.h Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/gaim-compat.h Mon Apr 23 21:25:06 2007 +0000 @@ -27,6 +27,8 @@ #ifndef _GAIM_COMPAT_H_ #define _GAIM_COMPAT_H_ +#include <glib.h> + /* from account.h */ #define GaimAccountUiOps PurpleAccountUiOps #define GaimAccount PurpleAccount @@ -51,7 +53,6 @@ #define gaim_account_set_password purple_account_set_password #define gaim_account_set_alias purple_account_set_alias #define gaim_account_set_user_info purple_account_set_user_info -#define gaim_account_set_buddy_icon purple_account_set_buddy_icon #define gaim_account_set_buddy_icon_path purple_account_set_buddy_icon_path #define gaim_account_set_protocol_id purple_account_set_protocol_id #define gaim_account_set_connection purple_account_set_connection @@ -81,7 +82,6 @@ #define gaim_account_get_password purple_account_get_password #define gaim_account_get_alias purple_account_get_alias #define gaim_account_get_user_info purple_account_get_user_info -#define gaim_account_get_buddy_icon purple_account_get_buddy_icon #define gaim_account_get_buddy_icon_path purple_account_get_buddy_icon_path #define gaim_account_get_protocol_id purple_account_get_protocol_id #define gaim_account_get_protocol_name purple_account_get_protocol_name @@ -338,22 +338,22 @@ #define GaimBuddyIcon PurpleBuddyIcon -#define gaim_buddy_icon_new purple_buddy_icon_new -#define gaim_buddy_icon_destroy purple_buddy_icon_destroy +#define gaim_buddy_icon_new(account, username, icon_data, icon_len)\ + purple_buddy_icon_new(account, username, g_memdup(icon_data, icon_len), icon_len) #define gaim_buddy_icon_ref purple_buddy_icon_ref #define gaim_buddy_icon_unref purple_buddy_icon_unref #define gaim_buddy_icon_update purple_buddy_icon_update -#define gaim_buddy_icon_set_account purple_buddy_icon_set_account -#define gaim_buddy_icon_set_username purple_buddy_icon_set_username -#define gaim_buddy_icon_set_data purple_buddy_icon_set_protocol_data +#define gaim_buddy_icon_set_data(icon, data, len) \ + purple_buddy_icon_set_protocol_data(icon, g_memdup(data, len), len, NULL); #define gaim_buddy_icon_get_account purple_buddy_icon_get_account #define gaim_buddy_icon_get_username purple_buddy_icon_get_username #define gaim_buddy_icon_get_data purple_buddy_icon_get_data #define gaim_buddy_icon_get_type purple_buddy_icon_get_extension -#define gaim_buddy_icons_set_for_user purple_buddy_icons_set_for_user +#define gaim_buddy_icons_set_for_user(icon, data, len) \ + purple_buddy_icons_set_for_user(icon, g_memdup(data, len), len) #define gaim_buddy_icons_find purple_buddy_icons_find #define gaim_buddy_icons_set_caching purple_buddy_icons_set_caching #define gaim_buddy_icons_is_caching purple_buddy_icons_is_caching @@ -944,7 +944,6 @@ /* from gaim-client.h */ -/* XXX: should this be purple_init, or pidgin_init */ #define gaim_init purple_init /* from idle.h */ @@ -962,7 +961,7 @@ #define GaimStoredImage PurpleStoredImage -#define gaim_imgstore_add purple_imgstore_add_with_id +#define gaim_imgstore_add(data, size, filename) purple_imgstore_add_with_id(g_memdup(data, size), size, filename) #define gaim_imgstore_get purple_imgstore_find_by_id #define gaim_imgstore_get_data purple_imgstore_get_data #define gaim_imgstore_get_size purple_imgstore_get_size
--- a/libpurple/imgstore.c Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/imgstore.c Mon Apr 23 21:25:06 2007 +0000 @@ -71,13 +71,13 @@ PurpleStoredImage *img = purple_imgstore_add(data, size, filename); img->id = ++nextid; - g_hash_table_insert(imgstore, GINT_TO_POINTER(img->id), img); + g_hash_table_insert(imgstore, &(img->id), img); return img->id; } PurpleStoredImage *purple_imgstore_find_by_id(int id) { - PurpleStoredImage *img = g_hash_table_lookup(imgstore, GINT_TO_POINTER(id)); + PurpleStoredImage *img = g_hash_table_lookup(imgstore, &id); if (img != NULL) purple_debug_misc("imgstore", "retrieved image id %d\n", img->id); @@ -155,11 +155,12 @@ purple_signal_emit(purple_imgstore_get_handle(), "image-deleting", img); if (img->id) - g_hash_table_remove(imgstore, GINT_TO_POINTER(img->id)); + g_hash_table_remove(imgstore, &img->id); g_free(img->data); g_free(img->filename); g_free(img); + img = NULL; } return img; @@ -192,5 +193,5 @@ { g_hash_table_destroy(imgstore); - purple_signals_unregister_by_instance(purple_blist_get_handle()); + purple_signals_unregister_by_instance(purple_imgstore_get_handle()); }
--- a/libpurple/imgstore.h Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/imgstore.h Mon Apr 23 21:25:06 2007 +0000 @@ -100,7 +100,7 @@ * @return The size of the data that the pointer returned by * purple_imgstore_get_data points to. */ -size_t purple_imgstore_get_size(PurpleStoredImage *i); +size_t purple_imgstore_get_size(PurpleStoredImage *img); /** * Retrieves a pointer to the image's filename.
--- a/libpurple/plugins/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/plugins/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -22,7 +22,7 @@ ssl \ $(TCL_DIR) -plugindir = $(libdir)/purple +plugindir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) autoaccept_la_LDFLAGS = -module -avoid-version buddynote_la_LDFLAGS = -module -avoid-version
--- a/libpurple/plugins/mono/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/plugins/mono/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -5,7 +5,7 @@ EXTRA_DIST = $(mono_sources) -monodir = $(libdir)/purple +monodir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) mono_SCRIPTS = MPlugin.dll GetBuddyBack.dll mono_build_sources = $(addprefix $(srcdir)/, $(mono_sources))
--- a/libpurple/plugins/mono/api/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/plugins/mono/api/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -1,4 +1,4 @@ -monodir=$(libdir)/purple +monodir=$(libdir)/purple-$(PURPLE_MAJOR_VERSION) mono_sources = \ BlistNode.cs \
--- a/libpurple/plugins/mono/loader/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/plugins/mono/loader/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -1,4 +1,4 @@ -plugindir = $(libdir)/purple +plugindir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) plugin_LTLIBRARIES = mono.la
--- a/libpurple/plugins/perl/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/plugins/perl/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -1,13 +1,11 @@ -plugindir = $(libdir)/purple -hackdir = $(plugindir)/private +plugindir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) perl_dirs = common plugin_LTLIBRARIES = perl.la -hack_LTLIBRARIES = libpurpleperl.la perl_la_LDFLAGS = -module -avoid-version -perl_la_LIBADD = $(GLIB_LIBS) $(PERL_LIBS) libpurpleperl.la +perl_la_LIBADD = $(GLIB_LIBS) $(PERL_LIBS) perl_la_SOURCES = \ perl.c \ perl-common.c \ @@ -17,12 +15,7 @@ perl_la_DEPENDENCIES = \ .libs/libperl_orig.a \ - .libs/DynaLoader.a \ - libpurpleperl.la - -libpurpleperl_la_LDFLAGS = -module -avoid-version -libpurpleperl_la_LIBADD = $(GLIB_LIBS) -libpurpleperl_la_SOURCES = libpurpleperl.c + .libs/DynaLoader.a .libs/libperl_orig.a: @mkdir -p .libs @@ -42,55 +35,52 @@ $(LN_S) $(DYNALOADER_A) .libs/DynaLoader.a; \ fi - common_sources = \ - common/Account.xs \ - common/AccountOpts.xs \ - common/BuddyIcon.xs \ - common/BuddyList.xs \ - common/Cipher.xs \ - common/Cmds.xs \ - common/Core.xs \ - common/Connection.xs \ - common/Conversation.xs \ - common/Debug.xs \ - common/FT.xs \ - common/ImgStore.xs \ - common/Log.xs \ - common/Makefile.PL.in \ - common/Network.xs \ - common/Notify.xs \ - common/Plugin.xs \ - common/PluginPref.xs \ - common/Pounce.xs \ - common/Prefs.xs \ - common/Privacy.xs \ - common/Proxy.xs \ - common/Prpl.xs \ - common/Purple.pm \ - common/Purple.xs \ - common/Request.xs \ - common/Roomlist.xs \ - common/SSLConn.xs \ - common/SavedStatuses.xs \ - common/Server.xs \ - common/Signal.xs \ - common/Sound.xs \ - common/Status.xs \ - common/Stringref.xs \ - common/Util.xs \ - common/XMLNode.xs \ - common/fallback/const-c.inc \ - common/fallback/const-xs.inc \ - common/module.h \ - common/typemap - + common/Account.xs \ + common/AccountOpts.xs \ + common/BuddyIcon.xs \ + common/BuddyList.xs \ + common/Cipher.xs \ + common/Cmds.xs \ + common/Core.xs \ + common/Connection.xs \ + common/Conversation.xs \ + common/Debug.xs \ + common/FT.xs \ + common/ImgStore.xs \ + common/Log.xs \ + common/Makefile.PL.in \ + common/Network.xs \ + common/Notify.xs \ + common/Plugin.xs \ + common/PluginPref.xs \ + common/Pounce.xs \ + common/Prefs.xs \ + common/Privacy.xs \ + common/Proxy.xs \ + common/Prpl.xs \ + common/Purple.pm \ + common/Purple.xs \ + common/Request.xs \ + common/Roomlist.xs \ + common/SSLConn.xs \ + common/SavedStatuses.xs \ + common/Server.xs \ + common/Signal.xs \ + common/Sound.xs \ + common/Status.xs \ + common/Stringref.xs \ + common/Util.xs \ + common/XMLNode.xs \ + common/module.h \ + common/typemap \ + common/fallback/const-c.inc \ + common/fallback/const-xs.inc EXTRA_DIST = \ Makefile.mingw \ common/Makefile.mingw \ - $(common_sources) \ - libpurpleperl.c + $(common_sources) common/Makefile: common/Makefile.PL @if test "x${top_srcdir}" != "x${top_builddir}"; then \ @@ -157,7 +147,6 @@ done; \ fi - AM_CPPFLAGS = \ -DVERSION=\"$(VERSION)\" \ -I$(top_srcdir) \
--- a/libpurple/plugins/perl/common/Makefile.PL.in Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/plugins/perl/common/Makefile.PL.in Mon Apr 23 21:25:06 2007 +0000 @@ -1,18 +1,18 @@ use 5.006; use ExtUtils::MakeMaker; -# See lib/ExtUtils/MakeMaker.pm for details of how to influence -# the contents of the Makefile that is written. +# See lib/ExtUtils/MakeMaker.pm for details of how to influence the contents +# of the Makefile that is written. WriteMakefile( - 'NAME' => 'Purple', - 'VERSION_FROM' => '@srcdir@/Purple.pm', # finds $VERSION - 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 - ($] >= 5.005 ? ## Add these new keywords supported since 5.005 - (ABSTRACT_FROM => '@srcdir@/Purple.pm', # retrieve abstract from module - AUTHOR => 'Purple <http://pidgin.im/>') : ()), - 'LIBS' => [''], # e.g., '-lm' - 'DEFINE' => '@DEBUG_CFLAGS@', # e.g., '-DHAVE_SOMETHING' - 'INC' => '-I. -I@srcdir@ -I@top_srcdir@ -I@top_srcdir@/libpurple @GLIB_CFLAGS@', # e.g., '-I. -I/usr/include/other' - 'OBJECT' => '$(O_FILES)', # link all the C files too + 'NAME' => 'Purple', + 'VERSION_FROM' => '@srcdir@/Purple.pm', # finds $VERSION + 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 + ($] >= 5.005 ? ## Add these new keywords supported since 5.005 + (ABSTRACT_FROM => '@srcdir@/Purple.pm', # finds $ABSTRACT + AUTHOR => 'Purple <http://pidgin.im/>') : ()), + 'DEFINE' => '@DEBUG_CFLAGS@', + 'INC' => '-I. -I@srcdir@ -I@top_srcdir@ -I@top_srcdir@/libpurple @GLIB_CFLAGS@', + 'OBJECT' => '$(O_FILES)', # link all the C files too +# 'OPTIMIZE' => '-g', # For debugging ); if (eval {require ExtUtils::Constant; 1}) {
--- a/libpurple/plugins/perl/common/Makefile.mingw Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/plugins/perl/common/Makefile.mingw Mon Apr 23 21:25:06 2007 +0000 @@ -66,7 +66,7 @@ Status.xs \ Stringref.xs \ Util.xs \ - XMLNode.xs \ + XMLNode.xs FALLBACKS = const-c.inc const-xs.inc C_FILES = $(XS_FILES:%.xs=%.c)
--- a/libpurple/plugins/perl/common/Purple.pm Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/plugins/perl/common/Purple.pm Mon Apr 23 21:25:06 2007 +0000 @@ -58,7 +58,7 @@ =head1 NAME -libpurple - Perl extension to the libpurple instant messenger library. +Purple - Perl extension to the libpurple instant messenger library. =head1 SYNOPSIS
--- a/libpurple/plugins/perl/perl.c Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/plugins/perl/perl.c Mon Apr 23 21:25:06 2007 +0000 @@ -93,6 +93,8 @@ #include "perl-common.h" #include "perl-handlers.h" +#include <gmodule.h> + #define PERL_PLUGIN_ID "core-perl" PerlInterpreter *my_perl = NULL; @@ -578,11 +580,11 @@ PURPLE_PLUGIN_MAGIC, PURPLE_MAJOR_VERSION, PURPLE_MINOR_VERSION, - PURPLE_PLUGIN_LOADER, /**< type */ + PURPLE_PLUGIN_LOADER, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ - PURPLE_PRIORITY_DEFAULT, /**< priority */ + PURPLE_PRIORITY_DEFAULT, /**< priority */ PERL_PLUGIN_ID, /**< id */ N_("Perl Plugin Loader"), /**< name */ @@ -590,7 +592,7 @@ N_("Provides support for loading perl plugins."), /**< summary */ N_("Provides support for loading perl plugins."), /**< description */ "Christian Hammond <chipx86@gnupdate.org>", /**< author */ - PURPLE_WEBSITE, /**< homepage */ + PURPLE_WEBSITE, /**< homepage */ plugin_load, /**< load */ plugin_unload, /**< unload */ @@ -608,4 +610,23 @@ loader_info.exts = g_list_append(loader_info.exts, "pl"); } +#ifdef __SUNPRO_C +#pragma init (my_init) +#else +void __attribute__ ((constructor)) my_init(void); +#endif + +void +my_init(void) +{ + /* Mostly evil hack... puts perl.so's symbols in the global table but + * does not create a circular dependency because g_module_open will + * only open the library once. */ + /* Do we need to keep track of the returned GModule here so that we + * can g_module_close it when this plugin gets unloaded? + * At the moment I don't think this plugin can ever get unloaded but + * in case that becomes possible this wants to get noted. */ + g_module_open("perl.so", 0); +} + PURPLE_INIT_PLUGIN(perl, init_plugin, info)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libpurple/plugins/perl/scripts/function_list.pl Mon Apr 23 21:25:06 2007 +0000 @@ -0,0 +1,69 @@ +$MODULE_NAME = "List all Purple:: (and Pidgin::) functions"; +use Purple; +# Uncomment this to print the Pidgin:: functions as well. +#use Pidgin; + +# All the information Purple gets about our nifty plugin +%PLUGIN_INFO = ( + perl_api_version => 2, + name => "Perl: $MODULE_NAME", + version => "0.1", + summary => "Print to standard output all the functions under the Purple:: (and Pidgin::) packages", + description => "Print to standard output all the functions under the Purple:: (and Pidgin::) packages", + author => "Etan Reisner <deryni\@gmail.com>", + url => "http://sourceforge.net/users/deryni9/", + id => "functionlist", + + load => "plugin_load", + unload => "plugin_unload" +); + +sub plugin_init { + return %PLUGIN_INFO; +} + +sub print_array { + my $array = shift; + + my @arr = sort @$array; + foreach $mod (@arr) { + my @sub; + + foreach $key (sort keys %{$mod}) { + if ($key =~ /::$/) { + push @sub, "$mod$key"; + } else { + print "$mod$key\n"; + } + } + print_array(\@sub); + } +} + +sub plugin_load { + my $plugin = shift; + my @purplearray; + my @pidginarray; + + foreach $key (sort keys %Purple::) { + if ($key =~ /::$/) { + push @purplearray, "Purple::$key"; + } else { + print "Purple::$key\n"; + } + } + print_array(\@purplearray); + + foreach $key (sort keys %Pidgin::) { + if ($key =~ /::$/) { + push @pidginarray, "Pidgin::$key"; + } else { + print "Pidgin::$key\n"; + } + } + print_array(\@pidginarray); +} + +sub plugin_unload { + my $plugin = shift; +}
--- a/libpurple/plugins/ssl/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/plugins/ssl/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -1,7 +1,7 @@ EXTRA_DIST = \ Makefile.mingw -plugindir = $(libdir)/purple +plugindir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) ssl_la_LDFLAGS = -module -avoid-version ssl_gnutls_la_LDFLAGS = -module -avoid-version
--- a/libpurple/plugins/tcl/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/plugins/tcl/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -1,4 +1,4 @@ -plugindir = $(libdir)/purple +plugindir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) tcl_la_LDFLAGS = -module -avoid-version
--- a/libpurple/prefs.c Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/prefs.c Mon Apr 23 21:25:06 2007 +0000 @@ -1102,13 +1102,14 @@ static void purple_prefs_rename_node(struct purple_pref *oldpref, struct purple_pref *newpref) { - struct purple_pref *child; + struct purple_pref *child, *next; char *oldname, *newname; /* if we're a parent, rename the kids first */ - for(child = oldpref->first_child; child != NULL; child = child->sibling) + for(child = oldpref->first_child; child != NULL; child = next) { struct purple_pref *newchild; + next = child->sibling; for(newchild = newpref->first_child; newchild != NULL; newchild = newchild->sibling) { if(!strcmp(child->name, newchild->name)) @@ -1120,7 +1121,7 @@ if(newchild == NULL) { /* no rename happened, we weren't able to find the new pref */ char *tmpname = pref_full_name(child); - purple_debug_error("prefs", "Unable to find rename pref for %s", tmpname); + purple_debug_error("prefs", "Unable to find rename pref for %s\n", tmpname); g_free(tmpname); } } @@ -1327,6 +1328,8 @@ void purple_prefs_update_old() { + purple_prefs_rename("/core", "/purple"); + /* Remove some no-longer-used prefs */ purple_prefs_remove("/purple/away/auto_response/enabled"); purple_prefs_remove("/purple/away/auto_response/idle_only"); @@ -1360,7 +1363,6 @@ purple_prefs_set_int("/purple/sound/while_status", 3); } purple_prefs_remove("/purple/sound/while_away"); - purple_prefs_rename("/core", "/purple"); } void *
--- a/libpurple/protocols/bonjour/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/bonjour/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -1,7 +1,7 @@ EXTRA_DIST = \ Makefile.mingw -pkgdir = $(libdir)/purple +pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) BONJOURSOURCES = \ bonjour.c \
--- a/libpurple/protocols/gg/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/gg/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -13,7 +13,7 @@ lib/pubdir50.c \ lib/pubdir.c -pkgdir = $(libdir)/purple +pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) if USE_INTERNAL_LIBGADU INTGGSOURCES = \
--- a/libpurple/protocols/irc/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/irc/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -1,6 +1,6 @@ EXTRA_DIST = PROTOCOL Makefile.mingw -pkgdir = $(libdir)/purple +pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) IRCSOURCES = irc.c parse.c cmds.c msgs.c irc.h dcc_send.c
--- a/libpurple/protocols/jabber/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/jabber/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -3,7 +3,7 @@ win32/posix.uname.c \ win32/utsname.h -pkgdir = $(libdir)/purple +pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) JABBERSOURCES = auth.c \ auth.h \
--- a/libpurple/protocols/jabber/Makefile.mingw Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/jabber/Makefile.mingw Mon Apr 23 21:25:06 2007 +0000 @@ -89,7 +89,7 @@ $(OBJECTS): $(PURPLE_CONFIG_H) -$(TARGET).dll: $(PURPLE_DLL).a $(OBJECTS) +$(TARGET).dll $(TARGET).dll.a: $(PURPLE_DLL).a $(OBJECTS) $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -Wl,--out-implib,$(TARGET).dll.a -o $(TARGET).dll $(XMPP_TARGET).dll: $(TARGET).dll.a $(XMPP_OBJECTS)
--- a/libpurple/protocols/jabber/buddy.c Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/jabber/buddy.c Mon Apr 23 21:25:06 2007 +0000 @@ -955,22 +955,23 @@ gboolean photo = (strcmp(child->name, "PHOTO") == 0); data = purple_base64_decode(bintext, &size); - - jbi->vcard_imgids = g_slist_prepend(jbi->vcard_imgids, GINT_TO_POINTER(purple_imgstore_add_with_id(g_memdup(data, size), size, "logo.png"))); - g_string_append_printf(info_text, - "<b>%s:</b> <img id='%d'><br/>", - photo ? _("Photo") : _("Logo"), - GPOINTER_TO_INT(jbi->vcard_imgids->data)); + if (data) { + jbi->vcard_imgids = g_slist_prepend(jbi->vcard_imgids, GINT_TO_POINTER(purple_imgstore_add_with_id(g_memdup(data, size), size, "logo.png"))); + g_string_append_printf(info_text, + "<b>%s:</b> <img id='%d'><br/>", + photo ? _("Photo") : _("Logo"), + GPOINTER_TO_INT(jbi->vcard_imgids->data)); + + purple_cipher_digest_region("sha1", (guchar *)data, size, + sizeof(hashval), hashval, NULL); + p = hash; + for(i=0; i<20; i++, p+=2) + snprintf(p, 3, "%02x", hashval[i]); - purple_cipher_digest_region("sha1", (guchar *)data, size, - sizeof(hashval), hashval, NULL); - p = hash; - for(i=0; i<20; i++, p+=2) - snprintf(p, 3, "%02x", hashval[i]); - - purple_buddy_icons_set_for_user(js->gc->account, bare_jid, - data, size, hash); - g_free(bintext); + purple_buddy_icons_set_for_user(js->gc->account, bare_jid, + data, size, hash); + g_free(bintext); + } } } g_free(text);
--- a/libpurple/protocols/msn/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/msn/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -1,7 +1,7 @@ EXTRA_DIST = \ Makefile.mingw -pkgdir = $(libdir)/purple +pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) MSNSOURCES = \ cmdproc.c \
--- a/libpurple/protocols/msn/slp.c Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/msn/slp.c Mon Apr 23 21:25:06 2007 +0000 @@ -955,7 +955,7 @@ if (obj == NULL) { - purple_buddy_icons_set_for_user(account, user->passport, NULL, 0, NULL); +/* purple_buddy_icons_set_for_user(account, user->passport, NULL, 0, NULL); */ return; }
--- a/libpurple/protocols/msn/slpmsg.c Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/msn/slpmsg.c Mon Apr 23 21:25:06 2007 +0000 @@ -106,9 +106,9 @@ long long size) { /* We can only have one data source at a time. */ - g_return_if_fail(slpmsg->buffer); - g_return_if_fail(slpmsg->img); - g_return_if_fail(slpmsg->fp); + g_return_if_fail(slpmsg->buffer == NULL); + g_return_if_fail(slpmsg->img == NULL); + g_return_if_fail(slpmsg->fp == NULL); if (body != NULL) slpmsg->buffer = g_memdup(body, size); @@ -122,9 +122,9 @@ msn_slpmsg_set_image(MsnSlpMessage *slpmsg, PurpleStoredImage *img) { /* We can only have one data source at a time. */ - g_return_if_fail(slpmsg->buffer); - g_return_if_fail(slpmsg->img); - g_return_if_fail(slpmsg->fp); + g_return_if_fail(slpmsg->buffer == NULL); + g_return_if_fail(slpmsg->img == NULL); + g_return_if_fail(slpmsg->fp == NULL); slpmsg->img = purple_imgstore_ref(img); slpmsg->buffer = (guchar *)purple_imgstore_get_data(img); @@ -137,9 +137,9 @@ struct stat st; /* We can only have one data source at a time. */ - g_return_if_fail(slpmsg->buffer); - g_return_if_fail(slpmsg->img); - g_return_if_fail(slpmsg->fp); + g_return_if_fail(slpmsg->buffer == NULL); + g_return_if_fail(slpmsg->img == NULL); + g_return_if_fail(slpmsg->fp == NULL); slpmsg->fp = g_fopen(file_name, "rb");
--- a/libpurple/protocols/novell/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/novell/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -1,7 +1,7 @@ EXTRA_DIST = \ Makefile.mingw -pkgdir = $(libdir)/purple +pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) NOVELLSOURCES = \ nmfield.h \
--- a/libpurple/protocols/oscar/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/oscar/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -3,7 +3,7 @@ AUTHORS \ Makefile.mingw -pkgdir = $(libdir)/purple +pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) OSCARSOURCES = \ bstream.c \
--- a/libpurple/protocols/oscar/family_feedbag.c Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/oscar/family_feedbag.c Mon Apr 23 21:25:06 2007 +0000 @@ -112,7 +112,7 @@ */ static struct aim_ssi_item *aim_ssi_itemlist_add(struct aim_ssi_item **list, const char *name, guint16 gid, guint16 bid, guint16 type, aim_tlvlist_t *data) { - int i; + gboolean exists; struct aim_ssi_item *cur, *new; new = (struct aim_ssi_item *)malloc(sizeof(struct aim_ssi_item)); @@ -131,34 +131,37 @@ if ((new->gid == 0xFFFF) && name) { do { new->gid += 0x0001; - for (cur=*list, i=0; ((cur) && (!i)); cur=cur->next) + exists = FALSE; + for (cur = *list; cur != NULL; cur = cur->next) if ((cur->type == AIM_SSI_TYPE_GROUP) && (cur->gid == new->gid)) { - i=1; + exists = TRUE; break; } - } while (i); + } while (exists); } } else if (new->gid == 0x0000) { if (new->bid == 0xFFFF) { do { new->bid += 0x0001; - for (cur=*list, i=0; ((cur) && (!i)); cur=cur->next) + exists = FALSE; + for (cur = *list; cur != NULL; cur = cur->next) if (((cur->bid == new->bid) && (cur->gid == new->gid)) || (cur->gid == new->bid)) { - i=1; + exists = TRUE; break; } - } while (i); + } while (exists); } } else { if (new->bid == 0xFFFF) { do { new->bid += 0x0001; - for (cur=*list, i=0; ((cur) && (!i)); cur=cur->next) + exists = FALSE; + for (cur = *list; cur != NULL; cur = cur->next) if ((cur->bid == new->bid) && (cur->gid == new->gid)) { - i=1; + exists = TRUE; break; } - } while (i); + } while (exists); } }
--- a/libpurple/protocols/qq/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/qq/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -1,7 +1,7 @@ EXTRA_DIST = \ Makefile.mingw -pkgdir = $(libdir)/purple +pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) QQSOURCES = \ buddy_info.c \
--- a/libpurple/protocols/sametime/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/sametime/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -2,7 +2,7 @@ EXTRA_DIST = Makefile.mingw -pkgdir = $(libdir)/purple +pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) noinst_HEADERS = sametime.h
--- a/libpurple/protocols/silc/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/silc/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -1,6 +1,6 @@ EXTRA_DIST = README TODO Makefile.mingw -pkgdir = $(libdir)/purple +pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) SILCSOURCES = silc.c silcpurple.h buddy.c chat.c ft.c ops.c pk.c util.c wb.c wb.h
--- a/libpurple/protocols/simple/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/simple/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -1,7 +1,7 @@ EXTRA_DIST = \ Makefile.mingw -pkgdir = $(libdir)/purple +pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) SIMPLESOURCES = \ simple.c \
--- a/libpurple/protocols/toc/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/toc/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -2,7 +2,7 @@ PROTOCOL \ Makefile.mingw -pkgdir = $(libdir)/purple +pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) TOCSOURCES = toc.c
--- a/libpurple/protocols/yahoo/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/yahoo/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -1,7 +1,7 @@ EXTRA_DIST = \ Makefile.mingw -pkgdir = $(libdir)/purple +pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) YAHOOSOURCES = \ util.c \
--- a/libpurple/protocols/yahoo/yahoo.c Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Mon Apr 23 21:25:06 2007 +0000 @@ -346,6 +346,7 @@ /* FIXME: Please, if you know this protocol, * FIXME: fix up the strtol() stuff if possible. */ int cksum = strtol(pair->value, NULL, 10); + const char *locksum = NULL; PurpleBuddy *b; if (!name) @@ -364,7 +365,8 @@ break; yahoo_friend_set_buddy_icon_need_request(f, FALSE); - if (b && cksum != strtol(purple_buddy_icons_get_checksum_for_user(b), NULL, 10)) + if (b && (locksum = purple_buddy_icons_get_checksum_for_user(b)) != NULL && + cksum != strtol(locksum, NULL, 10)) yahoo_send_picture_request(gc, name); break;
--- a/libpurple/protocols/yahoo/yahoo_picture.c Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo_picture.c Mon Apr 23 21:25:06 2007 +0000 @@ -115,9 +115,11 @@ PurpleUtilFetchUrlData *url_data; struct yahoo_fetch_picture_data *data; PurpleBuddy *b = purple_find_buddy(gc->account, who); + const char *locksum = NULL; /* FIXME: Cleanup this strtol() stuff if possible. */ - if (b && (checksum == strtol(purple_buddy_icons_get_checksum_for_user(b), NULL, 10))) + if (b && (locksum = purple_buddy_icons_get_checksum_for_user(b)) != NULL && + (checksum == strtol(locksum, NULL, 10))) return; data = g_new0(struct yahoo_fetch_picture_data, 1); @@ -200,9 +202,11 @@ if (who) { PurpleBuddy *b = purple_find_buddy(gc->account, who); + const char *locksum = NULL; /* FIXME: Cleanup this strtol() stuff if possible. */ - if (b && (checksum != strtol(purple_buddy_icons_get_checksum_for_user(b), NULL, 10))) + if (b && (locksum = purple_buddy_icons_get_checksum_for_user(b)) != NULL && + (checksum != strtol(locksum, NULL, 10))) yahoo_send_picture_request(gc, who); } }
--- a/libpurple/protocols/zephyr/Makefile.am Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/protocols/zephyr/Makefile.am Mon Apr 23 21:25:06 2007 +0000 @@ -1,4 +1,4 @@ -pkgdir = $(libdir)/purple +pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) ZEPHYRSOURCES = \ ZAsyncLocate.c \
--- a/libpurple/purple.pc.in Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/purple.pc.in Mon Apr 23 21:25:06 2007 +0000 @@ -11,4 +11,3 @@ Requires: glib-2.0 Cflags: -I${includedir}/libpurple Libs: -L${libdir} -lpurple -
--- a/libpurple/request.h Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/request.h Mon Apr 23 21:25:06 2007 +0000 @@ -1332,7 +1332,7 @@ * @param cancel_text The text for the @c Cancel button. * @param cancel_cb The callback for the @c Cancel button. * @param account The PurpleAccount associated with this request, or NULL if none is - * @param who The username of the buddy assocaited with this request, or NULL if none is + * @param who The username of the buddy associated with this request, or NULL if none is * @param conv The PurpleConversation associated with this request, or NULL if none is * @param user_data The data to pass to the callback. *
--- a/libpurple/status.c Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/status.c Mon Apr 23 21:25:06 2007 +0000 @@ -597,8 +597,6 @@ notify_buddy_status_update(PurpleBuddy *buddy, PurplePresence *presence, PurpleStatus *old_status, PurpleStatus *new_status) { - PurpleBlistUiOps *ops = purple_blist_get_ui_ops(); - if (purple_prefs_get_bool("/purple/logging/log_system")) { time_t current_time = time(NULL); @@ -637,9 +635,6 @@ g_free(tmp); } - - if (ops != NULL && ops->update != NULL) - ops->update(purple_get_blist(), (PurpleBlistNode*)buddy); } static void
--- a/libpurple/tests/check_libpurple.c Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/tests/check_libpurple.c Mon Apr 23 21:25:06 2007 +0000 @@ -54,7 +54,14 @@ int main(void) { int number_failed; - SRunner *sr = srunner_create (master_suite()); + SRunner *sr; + + /* Make g_return_... functions fatal, ALWAYS. + * As this is the test code, this is NOT controlled + * by PURPLE_FATAL_ASSERTS. */ + g_log_set_always_fatal(G_LOG_LEVEL_CRITICAL); + + sr = srunner_create (master_suite()); srunner_add_suite(sr, cipher_suite()); srunner_add_suite(sr, jabber_jutil_suite());
--- a/libpurple/util.c Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/util.c Mon Apr 23 21:25:06 2007 +0000 @@ -2696,6 +2696,7 @@ purple_normalize(const PurpleAccount *account, const char *str) { const char *ret = NULL; + static char buf[BUF_LEN]; if (account != NULL) { @@ -2712,7 +2713,6 @@ if (ret == NULL) { - static char buf[BUF_LEN]; char *tmp; tmp = g_utf8_normalize(str, -1, G_NORMALIZE_DEFAULT);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libpurple/version.c Mon Apr 23 21:25:06 2007 +0000 @@ -0,0 +1,43 @@ +/* + * @file version.c Version Functions + * @ingroup core + * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * + * 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 "internal.h" + +#include "version.h" + +const guint purple_major_version = PURPLE_MAJOR_VERSION; +const guint purple_minor_version = PURPLE_MINOR_VERSION; +const guint purple_micro_version = PURPLE_MICRO_VERSION; + +const char *purple_version_check(guint required_major, guint required_minor, guint required_micro) +{ + if (required_major > PURPLE_MAJOR_VERSION) + return "libpurple version too old (major mismatch)"; + if (required_major < PURPLE_MAJOR_VERSION) + return "libpurple version too new (major mismatch)"; + if (required_minor > PURPLE_MINOR_VERSION) + return "libpurple version too old (minor mismatch)"; + if ((required_minor == PURPLE_MINOR_VERSION) && (required_micro > PURPLE_MICRO_VERSION)) + return "libpurple version too old (micro mismatch)"; + return NULL; +}
--- a/libpurple/version.h Mon Apr 23 02:44:04 2007 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/** - * @file version.h Purple Versioning - * - * purple - * - * Purple is the legal property of its developers, whose names are too numerous - * to list here. Please refer to the COPYRIGHT file distributed with this - * source distribution. - * - * 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 - */ -#ifndef _PURPLE_VERSION_H_ -#define _PURPLE_VERSION_H_ - -#define PURPLE_MAJOR_VERSION 2 -#define PURPLE_MINOR_VERSION 0 -#define PURPLE_MICRO_VERSION 0 - -#define PURPLE_VERSION_CHECK(x,y,z) ((x) == PURPLE_MAJOR_VERSION && ((y) < PURPLE_MINOR_VERSION || ((y) == PURPLE_MINOR_VERSION && (z) <= PURPLE_MICRO_VERSION))) - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _PURPLE_VERSION_H_ */ -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libpurple/version.h.in Mon Apr 23 21:25:06 2007 +0000 @@ -0,0 +1,61 @@ +/** + * @file version.h Purple Versioning + * + * purple + * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * + * 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 + */ +#ifndef _PURPLE_VERSION_H_ +#define _PURPLE_VERSION_H_ + +#define PURPLE_MAJOR_VERSION (@PURPLE_MAJOR_VERSION@) +#define PURPLE_MINOR_VERSION (@PURPLE_MINOR_VERSION@) +#define PURPLE_MICRO_VERSION (@PURPLE_MICRO_VERSION@) + +#define PURPLE_VERSION_CHECK(x,y,z) ((x) == PURPLE_MAJOR_VERSION && \ + ((y) < PURPLE_MINOR_VERSION || \ + ((y) == PURPLE_MINOR_VERSION && (z) <= PURPLE_MICRO_VERSION))) + +#ifdef __cplusplus +extern "C" { +#endif + +const guint purple_major_version; +const guint purple_minor_version; +const guint purple_micro_version; + +/** + * Checks that the libpurple version is compatible with the requested + * version + * + * @param required_major: the required major version. + * @param required_minor: the required minor version. + * @param required_micro: the required micro version. + * + * @return NULL if the versions are compatible, or a string describing + * the version mismatch if not compatible. + */ +const char *purple_version_check(guint required_major, guint required_minor, guint required_micro); + +#ifdef __cplusplus +} +#endif + +#endif /* _PURPLE_VERSION_H_ */ +
--- a/libpurple/win32/global.mak Mon Apr 23 02:44:04 2007 +0000 +++ b/libpurple/win32/global.mak Mon Apr 23 21:25:06 2007 +0000 @@ -57,10 +57,13 @@ GCCWARNINGS := -Waggregate-return -Wcast-align -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wextra -Wno-sign-compare -Wno-unused-parameter -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wundef # parse the version number from the configure.ac file if it is newer -#AC_INIT([pidgin], [2.0.0dev], [devel@pidgin.im]) +#m4_define([purple_major_version], [2]) +#m4_define([purple_minor_version], [0]) +#m4_define([purple_micro_version], [0]) +#m4_define([purple_version_suffix], [devel]) PIDGIN_VERSION := $(shell \ if [ ! $(PIDGIN_TREE_TOP)/VERSION -nt $(PIDGIN_TREE_TOP)/configure.ac ]; then \ - awk 'BEGIN {FS="\\] *, *\\["} /^AC_INIT\(.+\)/ {printf("%s",$$2); exit}' \ + awk 'BEGIN {FS="[\\(\\)\\[\\]]"} /^m4_define..purple_(major|minor)_version/ {printf("%s.",$$5);} /^m4_define..purple_micro_version/ {printf("%s",$$5);} /^m4_define..purple_version_suffix/ {printf("%s",$$5); exit}' \ $(PIDGIN_TREE_TOP)/configure.ac > $(PIDGIN_TREE_TOP)/VERSION; \ fi; \ cat $(PIDGIN_TREE_TOP)/VERSION \
--- a/pidgin.spec.in Mon Apr 23 02:44:04 2007 +0000 +++ b/pidgin.spec.in Mon Apr 23 21:25:06 2007 +0000 @@ -227,8 +227,10 @@ # Delete files that we don't want to put in any of the RPMs rm -f $RPM_BUILD_ROOT%{_libdir}/finch/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/pidgin/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/libpurple/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/libpurple/private/*.la +rm -f $RPM_BUILD_ROOT%{_libdir}/purple/*.la +rm -f $RPM_BUILD_ROOT%{_libdir}/purple/liboscar.so +rm -f $RPM_BUILD_ROOT%{_libdir}/purple/libjabber.so +rm -f $RPM_BUILD_ROOT%{_libdir}/purple/private/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' @@ -348,7 +350,7 @@ %defattr(-, root, root) %{_libdir}/libpurple.so.* -%dir %{_libdir}/purple +%dir %{_libdir}/purple-2 %attr(755, root, root) %{perl_vendorarch}/Purple.pm %dir %{perl_vendorarch}/auto/Purple %attr(755, root, root) %{perl_vendorarch}/auto/Purple/Purple.so
--- a/pidgin/gtkaccount.c Mon Apr 23 02:44:04 2007 +0000 +++ b/pidgin/gtkaccount.c Mon Apr 23 21:25:06 2007 +0000 @@ -194,11 +194,11 @@ } static void -set_dialog_icon(AccountPrefsDialog *dialog, gpointer *data, size_t len, gchar *new_icon_path) +set_dialog_icon(AccountPrefsDialog *dialog, gpointer data, size_t len, gchar *new_icon_path) { GdkPixbuf *pixbuf = NULL; - purple_imgstore_unref(dialog->icon_img); + dialog->icon_img = purple_imgstore_unref(dialog->icon_img); if (data != NULL) { if (len > 0)
--- a/pidgin/gtkblist.c Mon Apr 23 02:44:04 2007 +0000 +++ b/pidgin/gtkblist.c Mon Apr 23 21:25:06 2007 +0000 @@ -2163,7 +2163,6 @@ const guchar *data = NULL; gsize len; PurpleBuddy *buddy = NULL; - PurpleChat *chat = NULL; PurpleAccount *account = NULL; PurplePluginProtocolInfo *prpl_info = NULL; PurpleStoredImage *custom_img; @@ -2172,16 +2171,14 @@ buddy = purple_contact_get_priority_buddy((PurpleContact*)node); } else if(PURPLE_BLIST_NODE_IS_BUDDY(node)) { buddy = (PurpleBuddy*)node; - } else if(PURPLE_BLIST_NODE_IS_CHAT(node)) { - chat = (PurpleChat*)node; } else { return NULL; } - if(buddy != NULL) - account = purple_buddy_get_account(buddy); - else if(chat != NULL) - account = chat->account; + if(buddy == NULL) + return NULL; + + account = purple_buddy_get_account(buddy); if(account && account->gc) prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(account->gc->prpl); @@ -2199,18 +2196,14 @@ } if (data == NULL) { - if(buddy != NULL) { - if (!(icon = purple_buddy_get_icon(buddy))) - if (!(icon = purple_buddy_icons_find(buddy->account, buddy->name))) /* Not sure I like this...*/ - return NULL; - data = purple_buddy_icon_get_data(icon, &len); - if (data == NULL) + if (!(icon = purple_buddy_get_icon(buddy))) + if (!(icon = purple_buddy_icons_find(buddy->account, buddy->name))) /* Not sure I like this...*/ return NULL; - } - } - - if(data == NULL) - return NULL; + data = purple_buddy_icon_get_data(icon, &len); + + if(data == NULL) + return NULL; + } loader = gdk_pixbuf_loader_new(); gdk_pixbuf_loader_write(loader, data, len, NULL);
--- a/pidgin/gtkconv.c Mon Apr 23 02:44:04 2007 +0000 +++ b/pidgin/gtkconv.c Mon Apr 23 21:25:06 2007 +0000 @@ -3134,7 +3134,10 @@ gtk_widget_hide(gtkwin->menu.typing_icon); } - if (!im || (purple_conv_im_get_typing_state(im) == PURPLE_NOT_TYPING)) { + if (im == NULL) + return; + + if (purple_conv_im_get_typing_state(im) == PURPLE_NOT_TYPING) { if (gtkconv->u.im->typing_timer != 0) g_source_remove(gtkconv->u.im->typing_timer); return;
--- a/pidgin/gtkdocklet-x11.c Mon Apr 23 02:44:04 2007 +0000 +++ b/pidgin/gtkdocklet-x11.c Mon Apr 23 21:25:06 2007 +0000 @@ -25,6 +25,7 @@ #include "internal.h" #include "pidgin.h" #include "debug.h" +#include "prefs.h" #include "pidginstock.h" #include "gtkdialogs.h" @@ -32,7 +33,8 @@ #include "eggtrayicon.h" #include "gtkdocklet.h" -#define EMBED_TIMEOUT 5000 +#define SHORT_EMBED_TIMEOUT 5000 +#define LONG_EMBED_TIMEOUT 15000 /* globals */ static EggTrayIcon *docklet = NULL; @@ -44,12 +46,12 @@ static int docklet_height = 0; /* protos */ -static void docklet_x11_create(void); +static void docklet_x11_create(gboolean); static gboolean -docklet_x11_create_cb() +docklet_x11_recreate_cb() { - docklet_x11_create(); + docklet_x11_create(TRUE); return FALSE; /* for when we're called by the glib idle handler */ } @@ -62,6 +64,7 @@ g_source_remove(embed_timeout); embed_timeout = 0; pidgin_docklet_embedded(); + purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/docklet/x11/embedded", FALSE); } static void @@ -74,7 +77,7 @@ g_object_unref(G_OBJECT(docklet)); docklet = NULL; - g_idle_add(docklet_x11_create_cb, NULL); + g_idle_add(docklet_x11_recreate_cb, NULL); } static void @@ -236,7 +239,7 @@ } static void -docklet_x11_create() +docklet_x11_create(gboolean recreate) { GtkWidget *box; @@ -272,17 +275,35 @@ * previous visibility state. If the docklet does not get embedded within * the timeout, it will be removed as a visibility manager until it does * get embedded. Ideally, we would only call docklet_embedded() when the - * icon was actually embedded. + * icon was actually embedded. This only happens when the docklet is first + * created, not when being recreated. + * + * The x11 docklet tracks whether it successfully embedded in a pref and + * allows for a longer timeout period if it successfully embedded the last + * time it was run. This should hopefully solve problems with the buddy + * list not properly starting hidden when gaim is started on login. */ - pidgin_docklet_embedded(); - embed_timeout = g_timeout_add(EMBED_TIMEOUT, docklet_x11_embed_timeout_cb, NULL); + if(!recreate) { + pidgin_docklet_embedded(); + if(purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/docklet/x11/embedded")) { + embed_timeout = g_timeout_add(LONG_EMBED_TIMEOUT, docklet_x11_embed_timeout_cb, NULL); + } else { + embed_timeout = g_timeout_add(SHORT_EMBED_TIMEOUT, docklet_x11_embed_timeout_cb, NULL); + } + } purple_debug(PURPLE_DEBUG_INFO, "docklet", "created\n"); } +static void +docklet_x11_create_ui_op() +{ + docklet_x11_create(FALSE); +} + static struct docklet_ui_ops ui_ops = { - docklet_x11_create, + docklet_x11_create_ui_op, docklet_x11_destroy, docklet_x11_update_icon, docklet_x11_blank_icon, @@ -298,4 +319,6 @@ docklet_ui_init() { pidgin_docklet_set_ui_ops(&ui_ops); + purple_prefs_add_none(PIDGIN_PREFS_ROOT "/docklet/x11"); + purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/docklet/x11/embedded", FALSE); }
--- a/pidgin/gtkprefs.c Mon Apr 23 02:44:04 2007 +0000 +++ b/pidgin/gtkprefs.c Mon Apr 23 21:25:06 2007 +0000 @@ -2029,8 +2029,6 @@ void pidgin_prefs_init(void) { - /* only change this when we have a sane prefs migration path */ - purple_prefs_add_none("/gaim"); purple_prefs_add_none(PIDGIN_PREFS_ROOT ""); purple_prefs_add_none("/plugins/gtk"); @@ -2061,7 +2059,12 @@ smiley_theme_pref_cb, NULL); } -void pidgin_prefs_update_old() { +void pidgin_prefs_update_old() +{ + const char *str; + + purple_prefs_rename("/gaim/gtk", PIDGIN_PREFS_ROOT); + /* Rename some old prefs */ purple_prefs_rename(PIDGIN_PREFS_ROOT "/logging/log_ims", "/purple/logging/log_ims"); purple_prefs_rename(PIDGIN_PREFS_ROOT "/logging/log_chats", "/purple/logging/log_chats"); @@ -2076,6 +2079,9 @@ /* this string pref moved into the core, try to be friendly */ purple_prefs_rename(PIDGIN_PREFS_ROOT "/idle/reporting_method", "/purple/away/idle_reporting"); + if ((str = purple_prefs_get_string("/purple/away/idle_reporting")) && + strcmp(str, "gaim") == 0) + purple_prefs_set_string("/purple/away/idle_reporting", "purple"); /* Remove some no-longer-used prefs */ purple_prefs_remove(PIDGIN_PREFS_ROOT "/blist/auto_expand_contacts"); @@ -2125,5 +2131,4 @@ purple_prefs_remove(PIDGIN_PREFS_ROOT "/away/queue_messages"); purple_prefs_remove(PIDGIN_PREFS_ROOT "/away"); purple_prefs_remove("/plugins/gtk/docklet/queue_messages"); - purple_prefs_rename("/gaim/gtk", "/pidgin"); }
--- a/pidgin/gtkstatusbox.c Mon Apr 23 02:44:04 2007 +0000 +++ b/pidgin/gtkstatusbox.c Mon Apr 23 21:25:06 2007 +0000 @@ -2014,6 +2014,17 @@ } static void +pixbuf_size_prepared_cb(GdkPixbufLoader *loader, int width, int height, gpointer data) +{ +#if GTK_CHECK_VERSION(2,2,0) + int w, h; + GtkIconSize icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_MEDIUM); + gtk_icon_size_lookup(icon_size, &w, &h); + gdk_pixbuf_loader_set_size(loader, w, h); +#endif +} + +static void pidgin_status_box_redisplay_buddy_icon(PidginStatusBox *status_box) { @@ -2031,6 +2042,7 @@ if (status_box->buddy_icon_img != NULL) { GdkPixbufLoader *loader = gdk_pixbuf_loader_new(); + g_signal_connect(G_OBJECT(loader), "size-prepared", G_CALLBACK(pixbuf_size_prepared_cb), NULL); gdk_pixbuf_loader_write(loader, purple_imgstore_get_data(status_box->buddy_icon_img), purple_imgstore_get_size(status_box->buddy_icon_img), NULL); gdk_pixbuf_loader_close(loader, NULL); @@ -2047,7 +2059,7 @@ } if (status_box->buddy_icon != NULL) { - status_box->icon_opaque = pidgin_gdk_pixbuf_is_opaque(status_box->buddy_icon); + status_box->icon_opaque = pidgin_gdk_pixbuf_is_opaque(status_box->buddy_icon); gtk_image_set_from_pixbuf(GTK_IMAGE(status_box->icon), status_box->buddy_icon); status_box->buddy_icon_hover = gdk_pixbuf_copy(status_box->buddy_icon); do_colorshift(status_box->buddy_icon_hover, status_box->buddy_icon_hover, 32);
--- a/pidgin/gtkutils.c Mon Apr 23 02:44:04 2007 +0000 +++ b/pidgin/gtkutils.c Mon Apr 23 21:25:06 2007 +0000 @@ -2860,16 +2860,16 @@ void *user_data, ...) { GtkWidget *vbox; - GtkWidget *hbox; - GtkWidget *hbox2; - GtkWidget *label; - GtkWidget *button; - GtkWidget *img = NULL; + GtkWidget *hbox; + GtkWidget *hbox2; + GtkWidget *label; + GtkWidget *button; + GtkWidget *img = NULL; GtkSizeGroup *sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); char label_text[2048]; const char *button_text; GCallback callback; - char *primary_esc, *secondary_esc; + char *primary_esc, *secondary_esc = NULL; va_list args; static gboolean first_call = TRUE; @@ -2877,7 +2877,7 @@ gtk_misc_set_alignment(GTK_MISC(img), 0, 0); vbox = gtk_vbox_new(FALSE,0); - gtk_container_set_border_width(GTK_CONTAINER(vbox), PIDGIN_HIG_BOX_SPACE); + gtk_container_set_border_width(GTK_CONTAINER(vbox), PIDGIN_HIG_BOX_SPACE); g_object_set_data(G_OBJECT(vbox), "gc" ,gc); minidialogs = g_slist_prepend(minidialogs, vbox); @@ -2890,10 +2890,10 @@ PURPLE_CALLBACK(connection_signed_off_cb), NULL); } - hbox = gtk_hbox_new(FALSE, 0); - gtk_container_add(GTK_CONTAINER(vbox), hbox); - - if (img != NULL) + hbox = gtk_hbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(vbox), hbox); + + if (img != NULL) gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); primary_esc = g_markup_escape_text(primary, -1); @@ -2902,14 +2902,15 @@ secondary_esc = g_markup_escape_text(secondary, -1); g_snprintf(label_text, sizeof(label_text), "<span weight=\"bold\" size=\"smaller\">%s</span>%s<span size=\"smaller\">%s</span>", - primary_esc, secondary ? "\n" : "", secondary?secondary_esc:""); + primary_esc, secondary ? "\n" : "", secondary_esc ? secondary_esc : ""); g_free(primary_esc); + g_free(secondary_esc); label = gtk_label_new(NULL); gtk_widget_set_size_request(label, purple_prefs_get_int(PIDGIN_PREFS_ROOT "/blist/width")-25,-1); gtk_label_set_markup(GTK_LABEL(label), label_text); - gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0); - gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0); + gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0); + gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0); hbox2 = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); gtk_box_pack_start(GTK_BOX(vbox), hbox2, FALSE, FALSE, 0);
--- a/pidgin/pidginstock.c Mon Apr 23 02:44:04 2007 +0000 +++ b/pidgin/pidginstock.c Mon Apr 23 21:25:06 2007 +0000 @@ -237,7 +237,7 @@ /* Altered from do_colorshift in gnome-panel */ static void -do_alphashift (GdkPixbuf *dest, GdkPixbuf *src, int shift) +do_alphashift (GdkPixbuf *dest, GdkPixbuf *src) { gint i, j; gint width, height, has_alpha, srcrowstride, destrowstride; @@ -245,7 +245,6 @@ guchar *original_pixels; guchar *pixsrc; guchar *pixdest; - int val; guchar a; has_alpha = gdk_pixbuf_get_has_alpha (src); @@ -267,8 +266,7 @@ *(pixdest++) = *(pixsrc++); *(pixdest++) = *(pixsrc++); a = *(pixsrc++); - val = a - shift; - *(pixdest++) = CLAMP(val, 0, 255); + *(pixdest++) = a / 2; } } } @@ -286,7 +284,7 @@ filename = g_build_filename(DATADIR, "pixmaps", "pidgin", dir, size, file, NULL); pixbuf = gdk_pixbuf_new_from_file(filename, NULL); - do_alphashift(pixbuf, pixbuf, 128); + do_alphashift(pixbuf, pixbuf); source = gtk_icon_source_new(); gtk_icon_source_set_pixbuf(source, pixbuf); @@ -314,7 +312,7 @@ if (rtl) { filename = g_build_filename(DATADIR, "pixmaps", "pidgin", dir, size, "rtl", file, NULL); pixbuf = gdk_pixbuf_new_from_file(filename, NULL); - do_alphashift(pixbuf, pixbuf, 128); + do_alphashift(pixbuf, pixbuf); source = gtk_icon_source_new(); gtk_icon_source_set_pixbuf(source, pixbuf); gtk_icon_source_set_direction(source, GTK_TEXT_DIR_RTL);
--- a/pidgin/pixmaps/emblems/16/scalable/secure.svg Mon Apr 23 02:44:04 2007 +0000 +++ b/pidgin/pixmaps/emblems/16/scalable/secure.svg Mon Apr 23 21:25:06 2007 +0000 @@ -7,96 +7,81 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/s odipodi-0.dtd" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="16" - height="16" - id="svg2" + width="16px" + height="16px" + id="svg4220" sodipodi:version="0.32" - inkscape:version="0.43" - version="1.0" - sodipodi:docbase="/home/hbons/Desktop/Gaim Refresh/emblems/scalable" + inkscape:version="0.44.1" + sodipodi:docbase="/home/hbons/code/pidgin-mtn/pidgin/pixmaps/emblems/16/scalable" sodipodi:docname="secure.svg" - inkscape:export-filename="/home/hbons/Desktop/Gaim Refresh/emblems/secure.png" + inkscape:export-filename="/home/hbons/code/pidgin-mtn/pidgin/pixmaps/emblems/16/secure.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90"> <defs - id="defs4"> + id="defs4222"> <linearGradient inkscape:collect="always" - id="linearGradient2193"> - <stop - style="stop-color:#555753;stop-opacity:1;" - offset="0" - id="stop2195" /> - <stop - style="stop-color:#555753;stop-opacity:0;" - offset="1" - id="stop2197" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - id="linearGradient2351"> + id="linearGradient5170"> <stop style="stop-color:#eeeeec;stop-opacity:1;" offset="0" - id="stop2353" /> + id="stop5172" /> <stop style="stop-color:#eeeeec;stop-opacity:0;" offset="1" - id="stop2355" /> + id="stop5174" /> + </linearGradient> + <linearGradient + id="linearGradient5160"> + <stop + style="stop-color:#c4a000;stop-opacity:1;" + offset="0" + id="stop5162" /> + <stop + style="stop-color:#c4a000;stop-opacity:0;" + offset="1" + id="stop5164" /> </linearGradient> <linearGradient inkscape:collect="always" - id="linearGradient2343"> + id="linearGradient5127"> <stop - style="stop-color:#babdb6;stop-opacity:1;" + style="stop-color:white;stop-opacity:1;" offset="0" - id="stop2345" /> + id="stop5129" /> <stop - style="stop-color:#babdb6;stop-opacity:0;" + style="stop-color:white;stop-opacity:0;" offset="1" - id="stop2347" /> - </linearGradient> - <linearGradient - id="linearGradient2276"> - <stop - style="stop-color:#f57900;stop-opacity:1;" - offset="0" - id="stop2278" /> - <stop - style="stop-color:#fcaf3e;stop-opacity:1;" - offset="1" - id="stop2280" /> + id="stop5131" /> </linearGradient> <linearGradient inkscape:collect="always" - xlink:href="#linearGradient2343" - id="linearGradient2349" - x1="12.515625" - y1="8.7261219" - x2="12.515625" - y2="0.68458056" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.661626,0,0,0.669831,0.220067,-0.15079)" /> + xlink:href="#linearGradient5127" + id="linearGradient5133" + x1="-8.5730524" + y1="8.1949167" + x2="-8.5730524" + y2="14.091002" + gradientUnits="userSpaceOnUse" /> <linearGradient inkscape:collect="always" - xlink:href="#linearGradient2351" - id="linearGradient2357" - x1="12.488563" - y1="5.8544211" - x2="12.488563" - y2="19.066195" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.571617,0,0,0.664095,1.361509,-0.130758)" /> + xlink:href="#linearGradient5160" + id="linearGradient5166" + x1="-5.2575259" + y1="14.311456" + x2="-10.187596" + y2="11.560035" + gradientUnits="userSpaceOnUse" /> <linearGradient inkscape:collect="always" - xlink:href="#linearGradient2193" - id="linearGradient2199" - x1="8.5" - y1="11.038469" - x2="8.5" - y2="13" + xlink:href="#linearGradient5170" + id="linearGradient5176" + x1="-7.5400991" + y1="0.79740471" + x2="-7.5400991" + y2="4.7783289" gradientUnits="userSpaceOnUse" /> </defs> <sodipodi:namedview @@ -106,20 +91,21 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="39.000666" - inkscape:cx="12.56383" - inkscape:cy="9.2861054" - inkscape:document-units="px" + inkscape:zoom="22.197802" + inkscape:cx="8.5405941" + inkscape:cy="8.0965274" inkscape:current-layer="layer1" showgrid="true" - fill="#eeeeec" - inkscape:window-width="1268" - inkscape:window-height="972" - inkscape:window-x="6" - inkscape:window-y="21" - inkscape:grid-points="true" /> + inkscape:grid-bbox="true" + inkscape:document-units="px" + showguides="true" + inkscape:guide-bbox="true" + inkscape:window-width="872" + inkscape:window-height="625" + inkscape:window-x="47" + inkscape:window-y="150" /> <metadata - id="metadata7"> + id="metadata4225"> <rdf:RDF> <cc:Work rdf:about=""> @@ -130,47 +116,46 @@ </rdf:RDF> </metadata> <g + id="layer1" inkscape:label="Layer 1" - inkscape:groupmode="layer" - id="layer1"> - <path - style="fill:url(#linearGradient2349);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:0.99999934;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="M 6.1333463,1.5028569 C 5.2074147,1.597488 4.4999578,2.402644 4.4999578,3.3658261 L 4.4999578,7.656935 C 4.4999578,8.6843293 5.3046208,9.4989715 6.3194286,9.4989715 L 10.661348,9.4989715 C 11.676156,9.4989715 12.501495,8.6843293 12.501495,7.656935 L 12.501495,3.3658261 C 12.501495,2.3384316 11.676156,1.5028569 10.661348,1.5028569 L 6.3194286,1.5028569 C 6.256003,1.5028569 6.1950751,1.496548 6.1333463,1.5028569 z M 7.2911913,3.5332839 C 7.3292999,3.5284078 7.3757891,3.5332839 7.4152465,3.5332839 L 9.5862055,3.5332839 C 9.8150574,3.5332839 10.026054,3.623525 10.185805,3.7635385 C 10.201979,3.7784151 10.232757,3.8103245 10.247831,3.8263353 C 10.272321,3.8536261 10.309391,3.9008527 10.330534,3.9309964 C 10.428638,4.0782548 10.49594,4.2625583 10.49594,4.4543024 L 10.49594,6.5893908 C 10.49594,7.1007088 10.091261,7.5104093 9.5862055,7.5104093 L 7.4152465,7.5104093 C 7.1232614,7.5104093 6.8582226,7.3694453 6.691593,7.1545613 C 6.5780448,7.000656 6.5055108,6.7971136 6.5055108,6.5893908 L 6.5055108,4.4543024 C 6.5055108,4.2625583 6.5728119,4.0782548 6.6709171,3.9309964 C 6.7301189,3.8465936 6.8149822,3.7606775 6.8983509,3.7007419 C 7.0135024,3.6221117 7.1463786,3.5518132 7.2911913,3.5332839 z " - id="rect1437" /> + inkscape:groupmode="layer"> <rect - style="fill:#edd400;fill-opacity:1;fill-rule:evenodd;stroke:#c4a000;stroke-width:0.97247171;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect1435" - width="10.030794" - height="8.0158854" - x="3.4845238" - y="6.4937477" - ry="2.1756756" - rx="2.1756771" /> + style="opacity:1;fill:#fce94f;fill-opacity:1;stroke:#c4a000;stroke-width:0.52907252;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect4238" + width="5.7297029" + height="6.3509903" + x="-6" + y="6" + transform="matrix(2.268879,0,0,1.574557,15.11327,-3.947338)" + rx="0.44198585" + ry="0.60082906" /> <rect - style="opacity:0.4;fill:url(#linearGradient2357);fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000024;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect2312" - width="8.0056992" - height="5.982585" - x="4.4973445" - y="7.5063467" - ry="1.1603612" - rx="1.1603615" /> + style="opacity:1;fill:url(#linearGradient5166);fill-opacity:1.0;stroke:url(#linearGradient5133);stroke-width:0.50402278;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect5125" + width="5.6391087" + height="2.9732673" + x="-11" + y="10.458911" + transform="matrix(1.950662,0,0,2.017983,23.95729,-12.6059)" /> + <rect + style="opacity:0.56331877;fill:#eeeeec;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect5156" + width="5.1252475" + height="2.6569307" + x="-14" + y="6" + transform="matrix(2.34135,0,0,0.752748,34.7789,1.48351)" /> <path - sodipodi:type="arc" - style="fill:#555753;fill-opacity:1;stroke:none;stroke-width:0.86272454;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="path2325" - sodipodi:cx="12.265541" - sodipodi:cy="14" - sodipodi:rx="0.73445857" - sodipodi:ry="1" - d="M 13 14 A 0.73445857 1 0 1 1 11.531083,14 A 0.73445857 1 0 1 1 13 14 z" - transform="matrix(2.042319,0,0,1.5,-16.55015,-11.5)" /> - <rect - style="fill:url(#linearGradient2199);fill-opacity:1.0;stroke:none;stroke-width:0.99999994;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect2333" - width="1" - height="3" - x="8" - y="10" /> + transform="translate(15,0)" + style="fill:#babdb6;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1" + d="M -9.4188119,0.5 C -10.500938,0.5 -11.5,1.4812151 -11.5,2.4460396 L -11.5,7.5 L -9.5,7.5 L -9.4549505,4.0089109 C -9.4549505,2.4726571 -9.4588865,2.5 -8.1034653,2.5 L -5.9866337,2.5 C -4.4993176,2.5 -4.5,2.5177763 -4.5,4.0539604 L -4.5,7.5 L -2.5,7.5 L -2.5,2.4910891 C -2.5,1.6080661 -3.5388679,0.54504951 -4.4460396,0.54504951 L -9.4188119,0.5 z " + id="path5168" + sodipodi:nodetypes="ccccccccccccc" /> + <path + transform="translate(15,0)" + style="fill:url(#linearGradient5176);fill-opacity:1.0;stroke:#888a85;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1" + d="M -9.4188119,0.5 C -10.500938,0.5 -11.5,1.4812151 -11.5,2.4460396 L -11.5,6.4638614 C -11.5,7.8729886 -9.5,7.6557806 -9.5,6.5089109 L -9.4549505,4.0089109 C -9.4549505,2.4726571 -9.4588865,2.5 -8.1034653,2.5 L -5.9866337,2.5 C -4.4993176,2.5 -4.5,2.5177763 -4.5,4.0539604 L -4.5,6.5539604 C -4.5450495,7.8163699 -2.5,7.594009 -2.5,6.5539604 L -2.5,2.4910891 C -2.5,1.6080661 -3.5388679,0.54504951 -4.4460396,0.54504951 L -9.4188119,0.5 z "