changeset 23105:3fee7e01e51c

merge of '0df1437fe05dad8b69aac22bcd7cb8851ca4ebeb' and '6a973c8f7b76929a8de62bbfd78b7aa36551c809'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 30 Apr 2008 11:28:23 +0000
parents 01e375e9b681 (diff) 133798922e2d (current diff)
children ebf8c74960bc
files libpurple/protocols/msn/msn.c libpurple/protocols/msnp9/msn.c libpurple/protocols/myspace/myspace.c libpurple/prpl.h pidgin/gtkaccount.c
diffstat 5 files changed, 8 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c	Wed Apr 30 11:28:19 2008 +0000
+++ b/libpurple/protocols/msn/msn.c	Wed Apr 30 11:28:23 2008 +0000
@@ -132,9 +132,6 @@
 	return list;
 }
 
-const char *msn_get_login_label() {
-	return _("E-mail Address...");
-}
 
 static PurpleCmdRet
 msn_cmd_nudge(PurpleConversation *conv, const gchar *cmd, gchar **args, gchar **error, void *data)
@@ -2309,7 +2306,9 @@
 	NULL,					/* unregister_user */
 	msn_send_attention,                     /* send_attention */
 	msn_attention_types,                    /* attention_types */
-	msn_get_login_label			/* account_login_label */
+
+	/* padding */
+	NULL
 };
 
 static PurplePluginInfo info =
--- a/libpurple/protocols/msnp9/msn.c	Wed Apr 30 11:28:19 2008 +0000
+++ b/libpurple/protocols/msnp9/msn.c	Wed Apr 30 11:28:23 2008 +0000
@@ -134,10 +134,6 @@
 }
 
 
-const char *msn_get_login_label() {
-	return _("E-mail Address...");
-}
-
 static PurpleCmdRet
 msn_cmd_nudge(PurpleConversation *conv, const gchar *cmd, gchar **args, gchar **error, void *data)
 {
@@ -2151,7 +2147,9 @@
 	NULL,					/* unregister_user */
 	msn_send_attention,                     /* send_attention */
 	msn_attention_types,                    /* attention_types */
-	msn_get_login_label			/* account_login_label */
+
+	/* padding */
+	NULL
 };
 
 static PurplePluginInfo info =
--- a/libpurple/protocols/myspace/myspace.c	Wed Apr 30 11:28:19 2008 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Wed Apr 30 11:28:23 2008 +0000
@@ -2449,10 +2449,6 @@
 	return normalized;
 }
 
-const char *msim_get_login_label() {
-	return _("E-mail Address...");
-}
-
 /** Return whether the buddy can be messaged while offline.
  *
  * The protocol supports offline messages in just the same way as online
@@ -3135,7 +3131,7 @@
 	NULL,                  /* unregister_user */
 	msim_send_attention,   /* send_attention */
 	msim_attention_types,  /* attention_types */
-	msim_get_login_label /* get screen name field title */
+	NULL                /* _purple_reserved4 */
 };
 
 
--- a/libpurple/prpl.h	Wed Apr 30 11:28:19 2008 +0000
+++ b/libpurple/prpl.h	Wed Apr 30 11:28:23 2008 +0000
@@ -398,11 +398,7 @@
 	gboolean (*send_attention)(PurpleConnection *gc, const char *username, guint type);
 	GList *(*get_attention_types)(PurpleAccount *acct);
 
-	/* This allows protocols to specify a more specific term for the "ScreenName" field
-	 * in the add account window. This helps avoid confusion for users using protocols
-	 * such as MySpace or MSN
-	 */
-	const char *(*account_login_label)(void);
+	void (*_purple_reserved4)(void);
 };
 
 #define PURPLE_IS_PROTOCOL_PLUGIN(plugin) \
--- a/pidgin/gtkaccount.c	Wed Apr 30 11:28:19 2008 +0000
+++ b/pidgin/gtkaccount.c	Wed Apr 30 11:28:23 2008 +0000
@@ -255,16 +255,6 @@
 	}
 }
 
-static gboolean
-screenname_focus_cb(GtkWidget *widget, GdkEventFocus *event, AccountPrefsDialog *dialog)
-{
-	if (!strcmp(gtk_entry_get_text(GTK_ENTRY(widget)),dialog->prpl_info->account_login_label())) {
-		gtk_entry_set_text(GTK_ENTRY(widget),"");
-		gtk_widget_modify_text(widget,GTK_STATE_NORMAL,NULL);
-	}
-	return FALSE;
-}
-
 static void
 screenname_changed_cb(GtkEntry *entry, AccountPrefsDialog *dialog)
 {
@@ -280,23 +270,6 @@
 	}
 }
 
-static gboolean
-screenname_nofocus_cb(GtkWidget *widget, GdkEventFocus *event, AccountPrefsDialog *dialog)
-{
-	GdkColor color = {0, 34952, 35466, 34181};
-	if (*gtk_entry_get_text(GTK_ENTRY(widget)) == '\0') {
-		/* We have to avoid hitting the screenname_changed_cb function 
-		 * because it enables buttons we don't want enabled yet ;)
-		 */
-		g_signal_handlers_block_by_func(widget, G_CALLBACK(screenname_changed_cb), dialog);
-		gtk_entry_set_text(GTK_ENTRY(widget),dialog->prpl_info->account_login_label());
-		/* Make sure we can hit it again */
-		g_signal_handlers_unblock_by_func(widget, G_CALLBACK(screenname_changed_cb), dialog);
-		gtk_widget_modify_text(widget,GTK_STATE_NORMAL,&color);
-	}
-	return FALSE;
-}
-
 static void
 icon_filesel_choose_cb(const char *filename, gpointer data)
 {
@@ -391,7 +364,6 @@
 	GList *user_splits;
 	GList *l, *l2;
 	char *username = NULL;
-	GdkColor color = {0, 34952, 35466, 34181};
 
 	if (dialog->protocol_menu != NULL)
 	{
@@ -438,15 +410,6 @@
 
 	add_pref_box(dialog, vbox, _("Screen _name:"), dialog->screenname_entry);
 
-	if (dialog->prpl_info->account_login_label) {
-		gtk_entry_set_text(dialog->screenname_entry,dialog->prpl_info->account_login_label());
-		g_signal_connect(G_OBJECT(dialog->screenname_entry), "focus-in-event",
-						G_CALLBACK(screenname_focus_cb), dialog);
-		g_signal_connect(G_OBJECT(dialog->screenname_entry), "focus-out-event",
-						G_CALLBACK(screenname_nofocus_cb), dialog);
-		gtk_widget_modify_text(dialog->screenname_entry,GTK_STATE_NORMAL,&color);
-	}
-
 	g_signal_connect(G_OBJECT(dialog->screenname_entry), "changed",
 					 G_CALLBACK(screenname_changed_cb), dialog);