# HG changeset patch # User Sean Egan # Date 1185397289 0 # Node ID 9e55f853a6fa395e36a8bb10e65ca438564c380e # Parent 3597903cf8ff6656b1aad19c9fe6526015c4a0e2# Parent a5b37b3f02c6a163b63937b84665fc7bee5c2282 merge of '7099b827f2d0a6de2abb5d567f444adc1d13fc03' and 'aa3ef1b650f50d978cde30fae0ff6690b83bd877' diff -r 3597903cf8ff -r 9e55f853a6fa libpurple/plugins/perl/common/Account.xs --- a/libpurple/plugins/perl/common/Account.xs Wed Jul 25 20:57:24 2007 +0000 +++ b/libpurple/plugins/perl/common/Account.xs Wed Jul 25 21:01:29 2007 +0000 @@ -307,6 +307,9 @@ } g_list_free(list); +void +purple_accounts_restore_current_statuses() + Purple::Account purple_accounts_find(name, protocol) const char * name diff -r 3597903cf8ff -r 9e55f853a6fa libpurple/plugins/perl/common/BuddyIcon.xs --- a/libpurple/plugins/perl/common/BuddyIcon.xs Wed Jul 25 20:57:24 2007 +0000 +++ b/libpurple/plugins/perl/common/BuddyIcon.xs Wed Jul 25 21:01:29 2007 +0000 @@ -45,6 +45,10 @@ int *width int *height +char * +purple_buddy_icon_get_full_path(icon); + Purple::Buddy::Icon icon + MODULE = Purple::Buddy::Icon PACKAGE = Purple::Buddy::Icons PREFIX = purple_buddy_icons_ PROTOTYPES: ENABLE diff -r 3597903cf8ff -r 9e55f853a6fa libpurple/protocols/oscar/oscar.c --- a/libpurple/protocols/oscar/oscar.c Wed Jul 25 20:57:24 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.c Wed Jul 25 21:01:29 2007 +0000 @@ -6606,7 +6606,7 @@ if (message) { /* Spaces are encoded as '+' */ g_strdelimit(message, "+", ' '); - purple_conv_im_send(PURPLE_CONV_IM(conv), message); + purple_conv_send_confirm(conv, message); } } /*else diff -r 3597903cf8ff -r 9e55f853a6fa libpurple/protocols/yahoo/yahoo.c --- a/libpurple/protocols/yahoo/yahoo.c Wed Jul 25 20:57:24 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Wed Jul 25 21:01:29 2007 +0000 @@ -3915,7 +3915,7 @@ if (message) { /* Spaces are encoded as '+' */ g_strdelimit(message, "+", ' '); - purple_conv_im_send(PURPLE_CONV_IM(conv), message); + purple_conv_send_confirm(conv, message); } } /*else diff -r 3597903cf8ff -r 9e55f853a6fa pidgin/gtkconv.c --- a/pidgin/gtkconv.c Wed Jul 25 20:57:24 2007 +0000 +++ b/pidgin/gtkconv.c Wed Jul 25 21:01:29 2007 +0000 @@ -239,7 +239,6 @@ if (!PIDGIN_IS_PIDGIN_CONVERSATION(conv)) return FALSE; - if (gtkconv->auto_resize) { return FALSE; } @@ -264,7 +263,6 @@ if (w == gtkconv->lower_hbox) purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/chat/entry_height", allocation->height); } - return FALSE; } @@ -4260,12 +4258,12 @@ height = (oneline.height + pad_top + pad_bottom) * lines; height += (oneline.height + pad_inside) * (wrapped_lines - lines); + gtkconv->auto_resize = TRUE; + g_idle_add(reset_auto_resize_cb, gtkconv); gtk_widget_size_request(gtkconv->lower_hbox, &sr); if (sr.height < height + PIDGIN_HIG_BOX_SPACE) { - gtkconv->auto_resize = TRUE; gtkconv->entry_growing = TRUE; - gtk_widget_set_size_request(gtkconv->entry, -1, height); - g_idle_add(reset_auto_resize_cb, gtkconv); + gtk_widget_set_size_request(gtkconv->lower_hbox, -1, height + PIDGIN_HIG_BOX_SPACE); } } @@ -4412,6 +4410,9 @@ /* Setup the info pane */ event_box = gtk_event_box_new(); +#if GTK_CHECK_VERSION(2,4,0) + gtk_event_box_set_visible_window(GTK_EVENT_BOX(event_box), FALSE); +#endif gtk_widget_show(event_box); gtkconv->infopane_hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), event_box, FALSE, FALSE, 0); @@ -4547,7 +4548,6 @@ default_formatize(gtkconv); g_signal_connect_after(G_OBJECT(gtkconv->entry), "format_function_clear", G_CALLBACK(clear_formatting_cb), gtkconv); - return paned; } @@ -6522,7 +6522,6 @@ gtk_widget_show(event); gtkconv->u.im->icon = gtk_image_new_from_pixbuf(scale); - gtkconv->auto_resize = TRUE; gtk_container_add(GTK_CONTAINER(event), gtkconv->u.im->icon); gtk_widget_show(gtkconv->u.im->icon); diff -r 3597903cf8ff -r 9e55f853a6fa pidgin/gtkprefs.c --- a/pidgin/gtkprefs.c Wed Jul 25 20:57:24 2007 +0000 +++ b/pidgin/gtkprefs.c Wed Jul 25 21:01:29 2007 +0000 @@ -994,7 +994,7 @@ pidgin_prefs_checkbox(_("Show _formatting on incoming messages"), PIDGIN_PREFS_ROOT "/conversations/show_incoming_formatting", vbox); - iconpref1 = pidgin_prefs_checkbox(_("Show Buddy _Details"), + iconpref1 = pidgin_prefs_checkbox(strchr(_("/Buddies/Show Buddy _Details")+1,'/')+1, PIDGIN_PREFS_ROOT "/conversations/im/show_buddy_icons", vbox); iconpref2 = pidgin_prefs_checkbox(_("Enable buddy ic_on animation"), PIDGIN_PREFS_ROOT "/conversations/im/animate_buddy_icons", vbox); diff -r 3597903cf8ff -r 9e55f853a6fa pidgin/gtkutils.c --- a/pidgin/gtkutils.c Wed Jul 25 20:57:24 2007 +0000 +++ b/pidgin/gtkutils.c Wed Jul 25 21:01:29 2007 +0000 @@ -137,6 +137,10 @@ wnd = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); if (title) gtk_window_set_title(wnd, title); +#ifdef _WIN32 + else + gtk_window_set_title(wnd, PIDGIN_ALERT_TITLE); +#endif gtk_container_set_border_width(GTK_CONTAINER(wnd), border_width); if (role) gtk_window_set_role(wnd, role); diff -r 3597903cf8ff -r 9e55f853a6fa pidgin/plugins/cap/Makefile.am --- a/pidgin/plugins/cap/Makefile.am Wed Jul 25 20:57:24 2007 +0000 +++ b/pidgin/plugins/cap/Makefile.am Wed Jul 25 21:01:29 2007 +0000 @@ -25,3 +25,5 @@ $(DEBUG_CFLAGS) \ $(GTK_CFLAGS) \ $(SQLITE3_CFLAGS) + +EXTRA_DIST = Makefile.mingw diff -r 3597903cf8ff -r 9e55f853a6fa pidgin/plugins/cap/Makefile.mingw --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/plugins/cap/Makefile.mingw Wed Jul 25 21:01:29 2007 +0000 @@ -0,0 +1,82 @@ +# +# Makefile.mingw +# +# Description: Makefile for cap plugin. +# + +PIDGIN_TREE_TOP := ../../.. +include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak + +TARGET = cap + +# This is where sqlite3.[ch] from the sqlite "amalgamation" archive were extracted to +# This is available from http://www.sqlite.org/download.html +SQLITE_TOP ?= $(WIN32_DEV_TOP)/sqlite-3.4.1 + +## +## INCLUDE PATHS +## +INCLUDE_PATHS += -I. \ + -I$(SQLITE_TOP) \ + -I$(GTK_TOP)/include \ + -I$(GTK_TOP)/include/gtk-2.0 \ + -I$(GTK_TOP)/include/glib-2.0 \ + -I$(GTK_TOP)/include/pango-1.0 \ + -I$(GTK_TOP)/include/atk-1.0 \ + -I$(GTK_TOP)/include/cairo \ + -I$(GTK_TOP)/lib/glib-2.0/include \ + -I$(GTK_TOP)/lib/gtk-2.0/include \ + -I$(PURPLE_TOP) \ + -I$(PURPLE_TOP)/win32 \ + -I$(PIDGIN_TOP) \ + -I$(PIDGIN_TOP)/win32 \ + -I$(PIDGIN_TREE_TOP) + +LIB_PATHS += -L$(GTK_TOP)/lib \ + -L$(PURPLE_TOP) \ + -L$(PIDGIN_TOP) + +## +## SOURCES, OBJECTS +## +C_SRC = cap.c \ + $(SQLITE_TOP)/sqlite3.c + +OBJECTS = $(C_SRC:%.c=%.o) + +## +## LIBRARIES +## +LIBS = -lgtk-win32-2.0 \ + -lglib-2.0 \ + -lgdk-win32-2.0 \ + -lgobject-2.0 \ + -lintl \ + -lpurple \ + -lpidgin + +include $(PIDGIN_COMMON_RULES) + +## +## TARGET DEFINITIONS +## +.PHONY: all install clean + +all: $(TARGET).dll + +install: $(PIDGIN_INSTALL_PLUGINS_DIR) all + cp $(TARGET).dll $(PIDGIN_INSTALL_PLUGINS_DIR) + +$(OBJECTS): $(PIDGIN_CONFIG_H) + +$(TARGET).dll: $(PURPLE_DLL).a $(PIDGIN_DLL).a $(OBJECTS) + $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll + +## +## CLEAN RULES +## +clean: + rm -rf $(OBJECTS) + rm -rf $(TARGET).dll + +include $(PIDGIN_COMMON_TARGETS) diff -r 3597903cf8ff -r 9e55f853a6fa pidgin/plugins/cap/cap.c --- a/pidgin/plugins/cap/cap.c Wed Jul 25 20:57:24 2007 +0000 +++ b/pidgin/plugins/cap/cap.c Wed Jul 25 21:01:29 2007 +0000 @@ -107,25 +107,26 @@ } static CapStatistics * get_stats_for(PurpleBuddy *buddy) { - gchar *buddy_name; CapStatistics *stats; g_return_val_if_fail(buddy != NULL, NULL); - buddy_name = g_strdup(buddy->name); - stats = g_hash_table_lookup(_buddy_stats, buddy_name); + stats = g_hash_table_lookup(_buddy_stats, buddy->name); if(!stats) { stats = g_malloc(sizeof(CapStatistics)); stats->last_message = -1; stats->last_message_status_id = NULL; stats->last_status_id = NULL; stats->prediction = NULL; - g_hash_table_insert(_buddy_stats, buddy_name, stats); stats->buddy = buddy; stats->last_seen = -1; stats->last_status_id = ""; + + g_hash_table_insert(_buddy_stats, g_strdup(buddy->name), stats); } else { - g_free(buddy_name); + /* This may actually be a different PurpleBuddy than what is in stats. + * We replace stats->buddy to make sure we're looking at a valid pointer. */ + stats->buddy = buddy; } generate_prediction(stats); return stats; @@ -409,7 +410,7 @@ /* buddy-signed-on */ static void buddy_signed_on(PurpleBuddy *buddy) { CapStatistics *stats = get_stats_for(buddy); - + /* If the statistic object existed but doesn't have a buddy pointer associated * with it then reassociate one with it. The pointer being null is a result * of a buddy with existing stats signing off and Purple sticking around. */