changeset 23109:ebf8c74960bc

merge of '88d15a78416cbab803d3b60b47292506e763d5d0' and '8cbfaca9b4aa3bfb454400bbaf91faa1bddbdc8c'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 30 Apr 2008 16:50:06 +0000
parents 568a0957e835 (current diff) 3fee7e01e51c (diff)
children 53bf3c21b79d
files
diffstat 5 files changed, 8 insertions(+), 108 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c	Wed Apr 30 14:06:03 2008 +0000
+++ b/libpurple/protocols/msn/msn.c	Wed Apr 30 16:50:06 2008 +0000
@@ -132,17 +132,6 @@
 	return list;
 }
 
-static GHashTable *
-msn_get_account_text_table()
-{
-	GHashTable *table;
-	
-	table = g_hash_table_new(g_str_hash, g_str_equal);
-	
-	g_hash_table_insert(table, "login_label", (gpointer)_("E-mail Address..."));
-
-	return table;
-}
 
 static PurpleCmdRet
 msn_cmd_nudge(PurpleConversation *conv, const gchar *cmd, gchar **args, gchar **error, void *data)
@@ -2317,7 +2306,9 @@
 	NULL,					/* unregister_user */
 	msn_send_attention,                     /* send_attention */
 	msn_attention_types,                    /* attention_types */
-	msn_get_account_text_table			/* get_account_text_table */
+
+	/* padding */
+	NULL
 };
 
 static PurplePluginInfo info =
--- a/libpurple/protocols/msnp9/msn.c	Wed Apr 30 14:06:03 2008 +0000
+++ b/libpurple/protocols/msnp9/msn.c	Wed Apr 30 16:50:06 2008 +0000
@@ -133,17 +133,6 @@
 	return list;
 }
 
-static GHashTable *
-msn_get_account_text_table()
-{
-	GHashTable *table;
-
-	table = g_hash_table_new(g_str_hash, g_str_equal);
-
-	g_hash_table_insert(table, "login_label", (gpointer)_("E-mail Address..."));
-
-	return table;
-}
 
 static PurpleCmdRet
 msn_cmd_nudge(PurpleConversation *conv, const gchar *cmd, gchar **args, gchar **error, void *data)
@@ -2158,7 +2147,9 @@
 	NULL,					/* unregister_user */
 	msn_send_attention,                     /* send_attention */
 	msn_attention_types,                    /* attention_types */
-	msn_get_account_text_table			/* get_account_text_table */
+
+	/* padding */
+	NULL
 };
 
 static PurplePluginInfo info =
--- a/libpurple/protocols/myspace/myspace.c	Wed Apr 30 14:06:03 2008 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Wed Apr 30 16:50:06 2008 +0000
@@ -2449,18 +2449,6 @@
 	return normalized;
 }
 
-static GHashTable *
-msim_get_account_text_table()
-{
-	GHashTable *table;
-
-	table = g_hash_table_new(g_str_hash, g_str_equal);
-
-	g_hash_table_insert(table, "login_label", (gpointer)_("E-mail Address..."));
-
-	return table;
-}
-
 /** Return whether the buddy can be messaged while offline.
  *
  * The protocol supports offline messages in just the same way as online
@@ -3143,7 +3131,7 @@
 	NULL,                  /* unregister_user */
 	msim_send_attention,   /* send_attention */
 	msim_attention_types,  /* attention_types */
-	msim_get_account_text_table /* get_account_text_table */
+	NULL                /* _purple_reserved4 */
 };
 
 
--- a/libpurple/prpl.h	Wed Apr 30 14:06:03 2008 +0000
+++ b/libpurple/prpl.h	Wed Apr 30 16:50:06 2008 +0000
@@ -398,15 +398,7 @@
 	gboolean (*send_attention)(PurpleConnection *gc, const char *username, guint type);
 	GList *(*get_attention_types)(PurpleAccount *acct);
 
-	/** This allows protocols to specify additional strings to be used for
-	 * various purposes.  The idea is to stuff a bunch of strings in this hash
-	 * table instead of expanding the struct for every addition.  This hash
-	 * table is allocated every call and MUST be unrefed by the caller.
-	 *
-	 * @param account The account to specify.  This can be NULL.
-	 * @return The protocol's string hash table.
-	 */
-	GHashTable *(*get_account_text_table)(PurpleAccount *account);
+	void (*_purple_reserved4)(void);
 };
 
 #define PURPLE_IS_PROTOCOL_PLUGIN(plugin) \
--- a/pidgin/gtkaccount.c	Wed Apr 30 14:06:03 2008 +0000
+++ b/pidgin/gtkaccount.c	Wed Apr 30 16:50:06 2008 +0000
@@ -255,25 +255,6 @@
 	}
 }
 
-static gboolean
-screenname_focus_cb(GtkWidget *widget, GdkEventFocus *event, AccountPrefsDialog *dialog)
-{
-	GHashTable *table;
-	const char *label;
-	
-	table = dialog->prpl_info->get_account_text_table(NULL);
-	label = g_hash_table_lookup(table, "login_label");
-
-	if(!strcmp(gtk_entry_get_text(GTK_ENTRY(widget)), label)) {
-		gtk_entry_set_text(GTK_ENTRY(widget), "");
-		gtk_widget_modify_text(widget, GTK_STATE_NORMAL,NULL);
-	}
-
-	g_hash_table_unref(table);
-
-	return FALSE;
-}
-
 static void
 screenname_changed_cb(GtkEntry *entry, AccountPrefsDialog *dialog)
 {
@@ -289,32 +270,6 @@
 	}
 }
 
-static gboolean
-screenname_nofocus_cb(GtkWidget *widget, GdkEventFocus *event, AccountPrefsDialog *dialog)
-{
-	GdkColor color = {0, 34952, 35466, 34181};
-	GHashTable *table;
-	const char *label;
-
-	table = dialog->prpl_info->get_account_text_table(NULL);
-	label = g_hash_table_lookup(table, "login_label");
-
-	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), 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);
-	}
-
-	g_hash_table_unref(table);
-
-	return FALSE;
-}
-
 static void
 icon_filesel_choose_cb(const char *filename, gpointer data)
 {
@@ -409,9 +364,6 @@
 	GList *user_splits;
 	GList *l, *l2;
 	char *username = NULL;
-	GdkColor color = {0, 34952, 35466, 34181};
-	GHashTable *table;
-	const char *label;
 
 	if (dialog->protocol_menu != NULL)
 	{
@@ -458,20 +410,6 @@
 
 	add_pref_box(dialog, vbox, _("Screen _name:"), dialog->screenname_entry);
 
-	if (dialog->prpl_info->get_account_text_table) {
-		table = dialog->prpl_info->get_account_text_table(NULL);
-		label = g_hash_table_lookup(table, "login_label");
-
-		gtk_entry_set_text(GTK_ENTRY(dialog->screenname_entry), 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_hash_table_unref(table);
-	}
-
 	g_signal_connect(G_OBJECT(dialog->screenname_entry), "changed",
 					 G_CALLBACK(screenname_changed_cb), dialog);