Changeset - 9f0f649c96e9
[Not reviewed]
Merge
0 3 0
Jan Kaluza - 12 years ago 2013-01-17 08:59:59
hanzz.k@gmail.com
merge
2 files changed with 14 insertions and 6 deletions:
0 comments (0 inline, 0 general)
CMakeLists.txt
Show inline comments
 
@@ -387,22 +387,23 @@ if (PROTOBUF_FOUND)
 
	else()
 
		message("Frotz plugin      : no (does not run on Win32)")
 
		message("SMSTools3 plugin  : no (does not run on Win32)")
 
		message("Skype plugin      : no (does not run on Win32)")
 
	endif()
 

	
 
 	if(YAHOO2_FOUND)
 
		message("Libyahoo2 plugin  : yes")
 
 		include_directories(${YAHOO2_INCLUDE_DIR})
 
	else()
 
#  	if(YAHOO2_FOUND)
 
# 		message("Libyahoo2 plugin  : yes")
 
#  		include_directories(${YAHOO2_INCLUDE_DIR})
 
# 	else()
 
		if(ENABLE_YAHOO2)
 
			message("Libyahoo2 plugin  : no (install libyahoo2-devel)")
 
			set(YAHOO2_FOUND 1)
 
			message("Libyahoo2 plugin  : yes")
 
		else(ENABLE_YAHOO2)
 
			message("Libyahoo2 plugin  : no (user disabled)")
 
		endif()
 
 	endif()
 
#  	endif()
 

	
 
	if(ENABLE_SWIFTEN)
 
		message("Swiften plugin    : yes")
 
	else()
 
		message("Swiften plugin    : no (user disabled)")
 
	endif()
backends/libpurple/main.cpp
Show inline comments
 
@@ -336,15 +336,18 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
 
			purple_account_set_bool_wrapped(account, "direct_connect", FALSE);
 

	
 
			setDefaultAccountOptions(account);
 

	
 
			// Enable account + privacy lists
 
			purple_account_set_enabled_wrapped(account, "spectrum", TRUE);
 

	
 
#if PURPLE_MAJOR_VERSION >= 2 && PURPLE_MINOR_VERSION >= 7
 
			if (CONFIG_BOOL(config, "service.enable_privacy_lists")) {
 
				purple_account_set_privacy_type_wrapped(account, PURPLE_PRIVACY_DENY_USERS);
 
			}
 
#endif
 

	
 
			// Set the status
 
			const PurpleStatusType *status_type = purple_account_get_status_type_with_primitive_wrapped(account, PURPLE_STATUS_AVAILABLE);
 
			if (status_type != NULL) {
 
				purple_account_set_status_wrapped(account, purple_status_type_get_id_wrapped(status_type), TRUE, NULL);
 
			}
 
@@ -480,13 +483,15 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
 
		}
 

	
 
		void handleVCardUpdatedRequest(const std::string &user, const std::string &image, const std::string &nickname) {
 
			PurpleAccount *account = m_sessions[user];
 
			if (account) {
 
				purple_account_set_alias_wrapped(account, nickname.c_str());
 
#if PURPLE_MAJOR_VERSION >= 2 && PURPLE_MINOR_VERSION >= 7
 
				purple_account_set_public_alias_wrapped(account, nickname.c_str(), NULL, NULL);
 
#endif
 
				gssize size = image.size();
 
				// this will be freed by libpurple
 
				guchar *photo = (guchar *) g_malloc(size * sizeof(guchar));
 
				memcpy(photo, image.c_str(), size);
 

	
 
				if (!photo)
 
@@ -1112,15 +1117,17 @@ static void *notify_user_info(PurpleConnection *gc, const char *who, PurpleNotif
 
	}
 

	
 
	bool ownInfo = name == purple_account_get_username_wrapped(account);
 

	
 
	if (ownInfo) {
 
		const gchar *displayname = purple_connection_get_display_name_wrapped(gc);
 
#if PURPLE_MAJOR_VERSION >= 2 && PURPLE_MINOR_VERSION >= 7
 
		if (!displayname) {
 
			displayname = purple_account_get_name_for_display_wrapped(account);
 
		}
 
#endif
 

	
 
		if (displayname && nickname.empty()) {
 
			nickname = displayname;
 
		}
 

	
 
		// avatar
0 comments (0 inline, 0 general)