/pidgin/main: 4a3c6a2f80e7: Remove unneeded function.

Mark Doliner mark at kingant.net
Sat Jan 26 21:36:33 EST 2013


Changeset: 4a3c6a2f80e70487b5f6af054ffea8931f581899
Author:	 Mark Doliner <mark at kingant.net>
Date:	 2013-01-26 18:35 -0800
Branch:	 default
URL: http://hg.pidgin.im/pidgin/main/rev/4a3c6a2f80e7

Description:

Remove unneeded function.

It always returns TRUE now that we require newer gtk2.

diffstat:

 ChangeLog.API       |   1 +
 pidgin/gtkaccount.c |  49 ++++++++++++++++++-------------------------------
 pidgin/minidialog.c |   6 ------
 pidgin/minidialog.h |   5 -----
 4 files changed, 19 insertions(+), 42 deletions(-)

diffs (108 lines):

diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -161,6 +161,7 @@ version 3.0.0 (??/??/????):
 		* pidgin_check_if_dir
 		* PIDGIN_DIALOG
 		* pidgin_dialogs_alias_contact
+		* pidgin_mini_dialog_links_supported
 		* pidgin_set_custom_buddy_icon
 		* pidgin_setup_screenname_autocomplete
 		* PidginBuddyList.connection_errors
diff --git a/pidgin/gtkaccount.c b/pidgin/gtkaccount.c
--- a/pidgin/gtkaccount.c
+++ b/pidgin/gtkaccount.c
@@ -2635,33 +2635,22 @@ pidgin_accounts_request_authorization(Pu
 			(purple_connection_get_display_name(gc) != NULL) ? purple_connection_get_display_name(gc) :
 			purple_account_get_username(account);
 
-	if (pidgin_mini_dialog_links_supported()) {
-		char *escaped_remote_user = g_markup_escape_text(remote_user, -1);
-		char *escaped_alias = alias != NULL ? g_markup_escape_text(alias, -1) : g_strdup("");
-		char *escaped_our_name = g_markup_escape_text(our_name, -1);
-		char *escaped_message = message != NULL ? g_markup_escape_text(message, -1) : g_strdup("");
-		buffer = g_strdup_printf(_("<a href=\"viewinfo\">%s</a>%s%s%s wants to add you (%s) to his or her buddy list%s%s"),
-					escaped_remote_user,
-					(have_valid_alias ? " ("  : ""),
-					escaped_alias,
-					(have_valid_alias ? ")"   : ""),
-					escaped_our_name,
-					(have_valid_alias ? ": " : "."),
-					escaped_message);
-		g_free(escaped_remote_user);
-		g_free(escaped_alias);
-		g_free(escaped_our_name);
-		g_free(escaped_message);
-	} else {
-		buffer = g_strdup_printf(_("%s%s%s%s wants to add you (%s) to his or her buddy list%s%s"),
-					remote_user,
-					(have_valid_alias ? " ("  : ""),
-					(have_valid_alias ? alias : ""),
-					(have_valid_alias ? ")"   : ""),
-					our_name,
-					(message != NULL ? ": " : "."),
-					(message != NULL ? message  : ""));
-	}
+	char *escaped_remote_user = g_markup_escape_text(remote_user, -1);
+	char *escaped_alias = alias != NULL ? g_markup_escape_text(alias, -1) : g_strdup("");
+	char *escaped_our_name = g_markup_escape_text(our_name, -1);
+	char *escaped_message = message != NULL ? g_markup_escape_text(message, -1) : g_strdup("");
+	buffer = g_strdup_printf(_("<a href=\"viewinfo\">%s</a>%s%s%s wants to add you (%s) to his or her buddy list%s%s"),
+				escaped_remote_user,
+				(have_valid_alias ? " ("  : ""),
+				escaped_alias,
+				(have_valid_alias ? ")"   : ""),
+				escaped_our_name,
+				(have_valid_alias ? ": " : "."),
+				escaped_message);
+	g_free(escaped_remote_user);
+	g_free(escaped_alias);
+	g_free(escaped_our_name);
+	g_free(escaped_message);
 
 	prpl_icon = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL);
 
@@ -2682,10 +2671,8 @@ pidgin_accounts_request_authorization(Pu
 		NULL);
 
 	dialog = PIDGIN_MINI_DIALOG(alert);
-	if (pidgin_mini_dialog_links_supported()) {
-		pidgin_mini_dialog_enable_description_markup(dialog);
-		pidgin_mini_dialog_set_link_callback(dialog, G_CALLBACK(get_user_info_cb), aa);
-	}
+	pidgin_mini_dialog_enable_description_markup(dialog);
+	pidgin_mini_dialog_set_link_callback(dialog, G_CALLBACK(get_user_info_cb), aa);
 	pidgin_mini_dialog_set_description(dialog, buffer);
 	pidgin_mini_dialog_add_non_closing_button(dialog, _("Send Instant Message"), send_im_cb, aa);
 
diff --git a/pidgin/minidialog.c b/pidgin/minidialog.c
--- a/pidgin/minidialog.c
+++ b/pidgin/minidialog.c
@@ -145,12 +145,6 @@ pidgin_mini_dialog_enable_description_ma
 	g_object_set(G_OBJECT(mini_dialog), "enable-description-markup", TRUE, NULL);
 }
 
-gboolean
-pidgin_mini_dialog_links_supported()
-{
-	return TRUE;
-}
-
 void pidgin_mini_dialog_set_link_callback(PidginMiniDialog *mini_dialog, GCallback cb, gpointer user_data)
 {
 	g_signal_connect(PIDGIN_MINI_DIALOG_GET_PRIVATE(mini_dialog)->desc, "activate-link", cb, user_data);
diff --git a/pidgin/minidialog.h b/pidgin/minidialog.h
--- a/pidgin/minidialog.h
+++ b/pidgin/minidialog.h
@@ -144,11 +144,6 @@ void pidgin_mini_dialog_set_description(
  */
 void pidgin_mini_dialog_enable_description_markup(PidginMiniDialog *mini_dialog);
 
-/** Mini-dialogs support hyperlinks in their description
- *  (you should first call pidgin_mini_dialog_enable_description_markup() on a given
- *  dialog to enable them). */
-gboolean pidgin_mini_dialog_links_supported(void);
-
 /** Sets a callback which gets invoked when a hyperlink in the dialog's description is clicked on.
  *  @param mini_dialog a mini-dialog
  *  @param cb the callback to invoke



More information about the Commits mailing list