Mercurial > pidgin.yaz
changeset 27419:552b5292f36f
merge of '67e253d9bff41f028ffc609c776f70dae52b614b'
and 'ff9044771e996cfc4b88e228d53ac790086251fc'
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Thu, 25 Jun 2009 05:38:35 +0000 |
parents | afcb1d41e557 (current diff) 48b59f34b0f8 (diff) |
children | 4475e746a34e |
files | ChangeLog.API configure.ac libpurple/plugin.c libpurple/plugin.h libpurple/protocols/jabber/jabber.c pidgin/gtkaccount.c pidgin/gtkconv.c pidgin/plugins/disco/Makefile.am |
diffstat | 19 files changed, 97 insertions(+), 61 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog.API Thu Jun 25 03:10:46 2009 +0000 +++ b/ChangeLog.API Thu Jun 25 05:38:35 2009 +0000 @@ -40,6 +40,7 @@ * purple_network_get_stun_ip * purple_network_get_turn_ip * purple_network_remove_port_mapping + * purple_plugins_get_search_paths * purple_proxy_connect_udp * purple_prpl_get_media_caps * purple_prpl_got_account_actions
--- a/configure.ac Thu Jun 25 03:10:46 2009 +0000 +++ b/configure.ac Thu Jun 25 05:38:35 2009 +0000 @@ -1563,30 +1563,6 @@ AC_MSG_RESULT(no) fi - if test "x$prefix" != "xNONE"; then - prefix=`eval echo $prefix` - PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=$prefix" - fi - - AC_ARG_WITH(perl-lib, - [AC_HELP_STRING([--with-perl-lib=[site|vendor|DIR]], - [specify where to install the Perl libraries for pidgin. Default is site.])], - [ - if test "x$withval" = xsite; then - PERL_MM_PARAMS="" - elif test "x$withval" = xvendor; then - if test -z "`$perlpath -v | grep '5\.0'`"; then - PERL_MM_PARAMS="INSTALLDIRS=vendor" - else - PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=`perl -e 'use Config; print $Config{prefix}'`" - fi - else - PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=$withval" - fi - ]) - - AC_SUBST(PERL_MM_PARAMS) - AC_MSG_CHECKING(for DynaLoader.a) DYNALOADER_A=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*([[^ ]]*DynaLoader\.a).*/\2/'`
--- a/doc/notify-signals.dox Thu Jun 25 03:10:46 2009 +0000 +++ b/doc/notify-signals.dox Thu Jun 25 05:38:35 2009 +0000 @@ -30,7 +30,7 @@ const char *url); @endsignalproto @signaldesc - Emitted before email notification is handed to the UI to display. + Emitted before notification of a single email is handed to the UI to display. @param subject Subject of email being notified of. @param from Who the email is from. @param to Who the email is to.
--- a/libpurple/account.c Thu Jun 25 03:10:46 2009 +0000 +++ b/libpurple/account.c Thu Jun 25 05:38:35 2009 +0000 @@ -1132,29 +1132,32 @@ purple_account_connect(PurpleAccount *account) { PurplePlugin *prpl; + const char *password, *username; PurplePluginProtocolInfo *prpl_info; - const char *password; g_return_if_fail(account != NULL); - purple_debug_info("account", "Connecting to account %s\n", - purple_account_get_username(account)); - - if (!purple_account_get_enabled(account, purple_core_get_ui())) + username = purple_account_get_username(account); + + if (!purple_account_get_enabled(account, purple_core_get_ui())) { + purple_debug_info("account", + "Account %s not enabled, not connecting.\n", + username); return; + } prpl = purple_find_prpl(purple_account_get_protocol_id(account)); - if (prpl == NULL) - { + if (prpl == NULL) { gchar *message; - message = g_strdup_printf(_("Missing protocol plugin for %s"), - purple_account_get_username(account)); + message = g_strdup_printf(_("Missing protocol plugin for %s"), username); purple_notify_error(account, _("Connection Error"), message, NULL); g_free(message); return; } + purple_debug_info("account", "Connecting to account %s.\n", username); + prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); password = purple_account_get_password(account); if ((password == NULL) &&
--- a/libpurple/buddyicon.h Thu Jun 25 03:10:46 2009 +0000 +++ b/libpurple/buddyicon.h Thu Jun 25 05:38:35 2009 +0000 @@ -189,8 +189,6 @@ * takes ownership of and will free. * @param icon_len The length of the icon data. * @param checksum A protocol checksum from the prpl or @c NULL. - * - * @return The buddy icon set, or NULL if no icon was set. */ void purple_buddy_icons_set_for_user(PurpleAccount *account, const char *username,
--- a/libpurple/log.c Thu Jun 25 03:10:46 2009 +0000 +++ b/libpurple/log.c Thu Jun 25 05:38:35 2009 +0000 @@ -1129,7 +1129,7 @@ /* set->buddy is always set below */ set->normalized_name = g_strdup(purple_normalize(account, name)); - /* Chat for .chat or .system at the end of the name to determine the type. */ + /* Check for .chat or .system at the end of the name to determine the type. */ if (len >= 7) { gchar *tmp = &name[len - 7]; if (purple_strequal(tmp, ".system")) {
--- a/libpurple/plugin.c Thu Jun 25 03:10:46 2009 +0000 +++ b/libpurple/plugin.c Thu Jun 25 05:38:35 2009 +0000 @@ -1222,6 +1222,12 @@ search_paths = g_list_append(search_paths, g_strdup(path)); } +GList * +purple_plugins_get_search_paths() +{ + return search_paths; +} + void purple_plugins_unload_all(void) {
--- a/libpurple/plugin.h Thu Jun 25 03:10:46 2009 +0000 +++ b/libpurple/plugin.h Thu Jun 25 05:38:35 2009 +0000 @@ -512,6 +512,15 @@ void purple_plugins_add_search_path(const char *path); /** + * Returns a list of plugin search paths. + * + * @constreturn A list of searched paths. + * + * @since 2.6.0 + */ +GList *purple_plugins_get_search_paths(void); + +/** * Unloads all loaded plugins. */ void purple_plugins_unload_all(void);
--- a/libpurple/plugins/perl/Makefile.am Thu Jun 25 03:10:46 2009 +0000 +++ b/libpurple/plugins/perl/Makefile.am Thu Jun 25 05:38:35 2009 +0000 @@ -99,7 +99,7 @@ ${LN_S} -f $$srcloc/$$f $$f; \ done; \ fi - @cd common && $(perlpath) Makefile.PL $(PERL_MM_PARAMS) + @cd common && $(perlpath) Makefile.PL common/Makefile.PL: common/Makefile.PL.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) @@ -108,7 +108,7 @@ @for dir in $(perl_dirs); do \ cd $$dir && \ if [ ! -f Makefile ]; then \ - $(perlpath) Makefile.PL $(PERL_MM_PARAMS); \ + $(perlpath) Makefile.PL; \ fi && \ ($(MAKE) CC="$(CC)" CCFLAGS="$(PERL_CFLAGS) $(CFLAGS)" $(PERL_EXTRA_OPTS) || \ $(MAKE) CC="$(CC)" CCFLAGS="$(PERL_CFLAGS) $(CFLAGS)" $(PERL_EXTRA_OPTS)) && \ @@ -164,6 +164,7 @@ -I$(top_srcdir) \ -I$(top_srcdir)/libpurple \ -I$(top_builddir)/libpurple \ + -DLIBDIR=\"$(libdir)/purple-$(PURPLE_MAJOR_VERSION)\" \ $(DEBUG_CFLAGS) \ $(GLIB_CFLAGS) \ $(PLUGIN_CFLAGS) \
--- a/libpurple/plugins/perl/common/Makefile.PL.in Thu Jun 25 03:10:46 2009 +0000 +++ b/libpurple/plugins/perl/common/Makefile.PL.in Thu Jun 25 05:38:35 2009 +0000 @@ -13,4 +13,16 @@ '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 + 'INSTALLDIRS' => 'vendor', + 'INSTALL_BASE' => '$(prefix)', + 'INSTALLVENDORARCH' => '$(libdir)/purple-$(PURPLE_MAJOR_VERSION)/perl', + 'INSTALLVENDORMAN3DIR' => '$(mandir)/man3', + 'macro' => { + 'prefix' => '@prefix@', + 'exec_prefix' => '@exec_prefix@', + 'libdir' => '@libdir@', + 'mandir' => '@mandir@', + 'datarootdir' => '@datarootdir@', + 'PURPLE_MAJOR_VERSION' => '@PURPLE_MAJOR_VERSION@', + }, );
--- a/libpurple/plugins/perl/perl.c Thu Jun 25 03:10:46 2009 +0000 +++ b/libpurple/plugins/perl/perl.c Thu Jun 25 05:38:35 2009 +0000 @@ -131,6 +131,7 @@ #endif { char *file = __FILE__; + GList *search_paths = purple_plugins_get_search_paths(); dXSUB_SYS; /* This one allows dynamic loading of perl modules in perl scripts by @@ -139,6 +140,17 @@ #ifdef _WIN32 newXS("Win32CORE::bootstrap", boot_Win32CORE, file); #endif + + while (search_paths != NULL) { + gchar *uselib; + const gchar *search_path = search_paths->data; + search_paths = g_list_next(search_paths); + + uselib = g_strdup_printf("unshift @INC, \"%s%cperl\";", + search_path, G_DIR_SEPARATOR); + eval_pv(uselib, TRUE); + g_free(uselib); + } } static void
--- a/libpurple/protocols/jabber/jabber.c Thu Jun 25 03:10:46 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Thu Jun 25 05:38:35 2009 +0000 @@ -907,8 +907,8 @@ if (type == JABBER_IQ_RESULT) { if(js->registration) { - buf = g_strdup_printf(_("Registration of %s@%s successful"), - js->user->node, js->user->domain); + buf = g_strdup_printf(_("Registration of %s@%s successful"), + js->user->node, js->user->domain); if(account->registration_cb) (account->registration_cb)(account, TRUE, account->registration_cb_user_data); } else {
--- a/libpurple/purple-remote Thu Jun 25 03:10:46 2009 +0000 +++ b/libpurple/purple-remote Thu Jun 25 05:38:35 2009 +0000 @@ -161,7 +161,6 @@ purple.PurpleSavedstatusSetSubstatus(current, account, type, message) purple.PurpleSavedstatusActivateForAccount(current, account) else: - accounts = purple.PurpleAccountsGetAllActive() saved = purple.PurpleSavedstatusNew("", status_type) purple.PurpleSavedstatusSetMessage(saved, message) purple.PurpleSavedstatusActivate(saved)
--- a/pidgin/gtkaccount.c Thu Jun 25 03:10:46 2009 +0000 +++ b/pidgin/gtkaccount.c Thu Jun 25 05:38:35 2009 +0000 @@ -1990,8 +1990,9 @@ /* This is for when set_account() is called for a single account */ const char *path; path = purple_prefs_get_path(PIDGIN_PREFS_ROOT "/accounts/buddyicon"); - if (path != NULL) + if ((path != NULL) && (*path != '\0')) { img = purple_imgstore_new_from_file(path); + } } } else { img = purple_buddy_icons_find_account_icon(account);
--- a/pidgin/gtkblist.c Thu Jun 25 03:10:46 2009 +0000 +++ b/pidgin/gtkblist.c Thu Jun 25 05:38:35 2009 +0000 @@ -1575,7 +1575,7 @@ if (!(purple_blist_node_get_flags(node) & PURPLE_BLIST_NODE_FLAG_NO_SAVE)) { show_offline = purple_blist_node_get_bool(node, "show_offline"); - pidgin_new_item_from_stock(menu, show_offline ? _("Hide when offline") : _("Show when offline"), + pidgin_new_item_from_stock(menu, show_offline ? _("Hide When Offline") : _("Show When Offline"), NULL, G_CALLBACK(gtk_blist_menu_showoffline_cb), node, 0, 0, NULL); } @@ -1759,7 +1759,7 @@ G_CALLBACK(gtk_blist_menu_alias_cb), node, 0, 0, NULL); if (!(purple_blist_node_get_flags(node) & PURPLE_BLIST_NODE_FLAG_NO_SAVE)) { gboolean show_offline = purple_blist_node_get_bool(node, "show_offline"); - pidgin_new_item_from_stock(menu, show_offline ? _("Hide when offline") : _("Show when offline"), + pidgin_new_item_from_stock(menu, show_offline ? _("Hide When Offline") : _("Show When Offline"), NULL, G_CALLBACK(gtk_blist_menu_showoffline_cb), node, 0, 0, NULL); } @@ -6300,7 +6300,7 @@ selected = (gnode == selected_node); if (!expanded) { - g_snprintf(group_count, sizeof(group_count), " (%d/%d)", + g_snprintf(group_count, sizeof(group_count), "%d/%d", purple_blist_get_group_online_count(group), purple_blist_get_group_size(group, FALSE)); } @@ -6319,11 +6319,18 @@ esc = g_markup_escape_text(group->name, -1); if (text_color) { - mark = g_strdup_printf("<span foreground='%s' font_desc='%s'><b>%s</b>%s</span>", - text_color, text_font, esc ? esc : "", group_count); + mark = g_strdup_printf("<span foreground='%s' font_desc='%s'><b>%s</b>%s%s%s</span>", + text_color, text_font, + esc ? esc : "", + !expanded ? " <span font_weight='light'>(</span>" : "", + group_count, + !expanded ? "<span font_weight='light'>)</span>" : ""); } else { - mark = g_strdup_printf("<span font_desc='%s'><b>%s</b>%s</span>", - text_font, esc ? esc : "", group_count); + mark = g_strdup_printf("<span font_desc='%s'><b>%s</b>%s%s%s</span>", + text_font, esc ? esc : "", + !expanded ? " <span font_weight='light'>(</span>" : "", + group_count, + !expanded ? "<span font_weight='light'>)</span>" : ""); } g_free(esc);
--- a/pidgin/gtkconv.c Thu Jun 25 03:10:46 2009 +0000 +++ b/pidgin/gtkconv.c Thu Jun 25 05:38:35 2009 +0000 @@ -1770,7 +1770,7 @@ g_object_set_data_full(G_OBJECT(button), "user_data", g_strdup(who), g_free); } - button = pidgin_new_item_from_stock(menu, _("Last said"), GTK_STOCK_INDEX, + button = pidgin_new_item_from_stock(menu, _("Last Said"), GTK_STOCK_INDEX, G_CALLBACK(menu_last_said_cb), PIDGIN_CONVERSATION(conv), 0, 0, NULL); g_object_set_data_full(G_OBJECT(button), "user_data", g_strdup(who), g_free); if (!get_mark_for_user(PIDGIN_CONVERSATION(conv), who))
--- a/pidgin/gtkprefs.c Thu Jun 25 03:10:46 2009 +0000 +++ b/pidgin/gtkprefs.c Thu Jun 25 05:38:35 2009 +0000 @@ -1231,9 +1231,9 @@ _("Never"), "never", NULL); gtk_size_group_add_widget(sg, label); - gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); - - vbox = pidgin_make_frame(ret, _("Conversation Window Hiding")); + gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); + + vbox = pidgin_make_frame(ret, _("Conversation Window")); label = pidgin_prefs_dropdown(vbox, _("_Hide new IM conversations:"), PURPLE_PREF_STRING, PIDGIN_PREFS_ROOT "/conversations/im/hide_new", _("Never"), "never", @@ -1241,8 +1241,11 @@ _("Always"), "always", NULL); gtk_size_group_add_widget(sg, label); - gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); - + gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); + +#ifdef _WIN32 + pidgin_prefs_checkbox(_("Minimi_ze new conversation windows"), PIDGIN_PREFS_ROOT "/win32/minimize_new_convs", vbox); +#endif /* All the tab options! */ vbox = pidgin_make_frame(ret, _("Tabs")); @@ -1353,8 +1356,6 @@ #ifdef _WIN32 pidgin_prefs_checkbox(_("F_lash window when IMs are received"), PIDGIN_PREFS_ROOT "/win32/blink_im", vbox); - - pidgin_prefs_checkbox(_("Minimi_ze new conversation windows"), PIDGIN_PREFS_ROOT "/win32/minimize_new_convs", vbox); #endif pidgin_prefs_labeled_spin_button(vbox, @@ -1362,7 +1363,6 @@ PIDGIN_PREFS_ROOT "/conversations/minimum_entry_lines", 1, 8, NULL); - #if GTK_CHECK_VERSION(2,4,0) vbox = pidgin_make_frame(ret, _("Font")); if (purple_running_gnome())
--- a/pidgin/plugins/perl/Makefile.am Thu Jun 25 03:10:46 2009 +0000 +++ b/pidgin/plugins/perl/Makefile.am Thu Jun 25 05:38:35 2009 +0000 @@ -44,7 +44,7 @@ ${LN_S} -f $$srcloc/$$f $$f; \ done; \ fi - @cd common && $(perlpath) Makefile.PL $(PERL_MM_PARAMS) + @cd common && $(perlpath) Makefile.PL common/Makefile.PL: common/Makefile.PL.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) @@ -53,7 +53,7 @@ @for dir in $(perl_dirs); do \ cd $$dir && \ if [ ! -f Makefile ]; then \ - $(perlpath) Makefile.PL $(PERL_MM_PARAMS); \ + $(perlpath) Makefile.PL; \ fi && \ ($(MAKE) CC="$(CC)" CCFLAGS="$(PERL_CFLAGS) $(CFLAGS)" $(PERL_EXTRA_OPTS) || \ $(MAKE) CC="$(CC)" CCFLAGS="$(PERL_CFLAGS) $(CFLAGS)" $(PERL_EXTRA_OPTS)) && \
--- a/pidgin/plugins/perl/common/Makefile.PL.in Thu Jun 25 03:10:46 2009 +0000 +++ b/pidgin/plugins/perl/common/Makefile.PL.in Thu Jun 25 05:38:35 2009 +0000 @@ -13,4 +13,15 @@ 'OBJECT' => '$(O_FILES)', # link all the C files too 'TYPEMAPS' => ["@top_srcdir@/libpurple/plugins/perl/common/typemap"], # 'OPTIMIZE' => '-g', # For debugging. + 'INSTALLDIRS' => 'vendor', + 'INSTALL_BASE' => '$(prefix)', + 'INSTALLVENDORARCH' => '$(libdir)/pidgin/perl', + 'INSTALLVENDORMAN3DIR' => '$(mandir)/man3', + 'macro' => { + 'prefix' => '@prefix@', + 'exec_prefix' => '@exec_prefix@', + 'libdir' => '@libdir@', + 'mandir' => '@mandir@', + 'datarootdir' => '@datarootdir@', + }, );