changeset 10487:659edfcac14e

[gaim-migrate @ 11777] Removed protocol preferences. MSN will display closed conversation messages but not timeouts. Jabber will not display your OS. I left the preferences for OSCAR, but removed them from the UI. OSCAR is complicated because it stores prefs on the server. I'll let Mark figure out a smarter way to handle that. As with all slashed prefs, feel free to voice objections. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sat, 08 Jan 2005 20:30:41 +0000
parents 84bc372a621e
children 47366cf2792b
files src/protocols/jabber/iq.c src/protocols/jabber/jabber.c src/protocols/msn/msn.c src/protocols/msn/switchboard.c src/protocols/oscar/oscar.c
diffstat 5 files changed, 24 insertions(+), 76 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/iq.c	Sat Jan 08 18:58:19 2005 +0000
+++ b/src/protocols/jabber/iq.c	Sat Jan 08 20:30:41 2005 +0000
@@ -202,12 +202,11 @@
 	JabberIq *iq;
 	const char *type, *from, *id;
 	xmlnode *query;
-	char *os = NULL;
 
 	type = xmlnode_get_attrib(packet, "type");
 
 	if(type && !strcmp(type, "get")) {
-
+#if 0
 		if(!gaim_prefs_get_bool("/plugins/prpl/jabber/hide_os")) {
 			struct utsname osinfo;
 
@@ -215,7 +214,7 @@
 			os = g_strdup_printf("%s %s %s", osinfo.sysname, osinfo.release,
 					osinfo.machine);
 		}
-
+#endif
 		from = xmlnode_get_attrib(packet, "from");
 		id = xmlnode_get_attrib(packet, "id");
 
@@ -227,11 +226,12 @@
 
 		xmlnode_insert_data(xmlnode_new_child(query, "name"), PACKAGE, -1);
 		xmlnode_insert_data(xmlnode_new_child(query, "version"), VERSION, -1);
+#if 0
 		if(os) {
 			xmlnode_insert_data(xmlnode_new_child(query, "os"), os, -1);
 			g_free(os);
 		}
-
+#endif
 		jabber_iq_send(iq);
 	}
 }
--- a/src/protocols/jabber/jabber.c	Sat Jan 08 18:58:19 2005 +0000
+++ b/src/protocols/jabber/jabber.c	Sat Jan 08 20:30:41 2005 +0000
@@ -1501,27 +1501,6 @@
 	                  NULL);
 }
 
-static GaimPluginPrefFrame *
-get_plugin_pref_frame(GaimPlugin *plugin) {
-	GaimPluginPrefFrame *frame;
-	GaimPluginPref *ppref;
-
-	frame = gaim_plugin_pref_frame_new();
-
-	ppref = gaim_plugin_pref_new_with_label(_("Privacy"));
-	gaim_plugin_pref_frame_add(frame, ppref);
-
-	ppref = gaim_plugin_pref_new_with_name_and_label("/plugins/prpl/jabber/hide_os",
-													 _("Hide Operating System"));
-	gaim_plugin_pref_frame_add(frame, ppref);
-
-	return frame;
-}
-
-static GaimPluginUiInfo prefs_info = {
-	get_plugin_pref_frame
-};
-
 static GaimPluginProtocolInfo prpl_info =
 {
 	OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME,
@@ -1611,7 +1590,7 @@
 
 	NULL,                                             /**< ui_info        */
 	&prpl_info,                                       /**< extra_info     */
-	&prefs_info,                                      /**< prefs_info     */
+	NULL,                                             /**< prefs_info     */
 	jabber_actions
 };
 
@@ -1653,8 +1632,7 @@
 
 	my_protocol = plugin;
 
-	gaim_prefs_add_none("/plugins/prpl/jabber");
-	gaim_prefs_add_bool("/plugins/prpl/jabber/hide_os", FALSE);
+	gaim_prefs_remove("/plugins/prpl/jabber");
 
 	jabber_register_commands();
 }
--- a/src/protocols/msn/msn.c	Sat Jan 08 18:58:19 2005 +0000
+++ b/src/protocols/msn/msn.c	Sat Jan 08 20:30:41 2005 +0000
@@ -1775,34 +1775,6 @@
 	return TRUE;
 }
 
-static GaimPluginPrefFrame *
-get_plugin_pref_frame(GaimPlugin *plugin)
-{
-	GaimPluginPrefFrame *frame;
-	GaimPluginPref *ppref;
-
-	frame = gaim_plugin_pref_frame_new();
-
-	ppref = gaim_plugin_pref_new_with_label(_("Conversations"));
-	gaim_plugin_pref_frame_add(frame, ppref);
-
-	ppref = gaim_plugin_pref_new_with_name_and_label(
-								"/plugins/prpl/msn/conv_close_notice",
-								_("Display conversation closed notices"));
-	gaim_plugin_pref_frame_add(frame, ppref);
-
-	ppref = gaim_plugin_pref_new_with_name_and_label(
-								"/plugins/prpl/msn/conv_timeout_notice",
-								_("Display timeout notices"));
-	gaim_plugin_pref_frame_add(frame, ppref);
-
-	return frame;
-}
-
-static GaimPluginUiInfo prefs_info = {
-	get_plugin_pref_frame
-};
-
 static GaimPluginProtocolInfo prpl_info =
 {
 	OPT_PROTO_MAIL_CHECK,
@@ -1892,7 +1864,7 @@
 
 	NULL,                                             /**< ui_info        */
 	&prpl_info,                                       /**< extra_info     */
-	&prefs_info,                                      /**< prefs_info     */
+	NULL,                                             /**< prefs_info     */
 	msn_actions
 };
 
@@ -1915,9 +1887,7 @@
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
 											   option);
 
-	gaim_prefs_add_none("/plugins/prpl/msn");
-	gaim_prefs_add_bool("/plugins/prpl/msn/conv_close_notice",   TRUE);
-	gaim_prefs_add_bool("/plugins/prpl/msn/conv_timeout_notice", TRUE);
+	gaim_prefs_remove("/plugins/prpl/msn");
 }
 
 GAIM_INIT_PLUGIN(msn, init_plugin, info);
--- a/src/protocols/msn/switchboard.c	Sat Jan 08 18:58:19 2005 +0000
+++ b/src/protocols/msn/switchboard.c	Sat Jan 08 20:30:41 2005 +0000
@@ -626,32 +626,32 @@
 
 		if (cmd->param_count == 2 && atoi(cmd->params[1]) == 1)
 		{
+#if 0
 			if (gaim_prefs_get_bool("/plugins/prpl/msn/conv_timeout_notice"))
 			{
 				str = g_strdup_printf(_("The conversation has become "
 										"inactive and timed out."));
 			}
+#endif
 		}
 		else
 		{
-			if (gaim_prefs_get_bool("/plugins/prpl/msn/conv_close_notice"))
-			{
-				char *username;
-				GaimAccount *account;
-				GaimBuddy *b;
+			char *username;
+			GaimAccount *account;
+			GaimBuddy *b;
 
-				account = cmdproc->session->account;
+			account = cmdproc->session->account;
 
-				if ((b = gaim_find_buddy(account, user)) != NULL)
-					username = gaim_escape_html(gaim_buddy_get_alias(b));
-				else
-					username = gaim_escape_html(user);
+			if ((b = gaim_find_buddy(account, user)) != NULL)
+				username = gaim_escape_html(gaim_buddy_get_alias(b));
+			else
+				username = gaim_escape_html(user);
 
-				str = g_strdup_printf(_("%s has closed the conversation "
-										"window."), username);
-
-				g_free(username);
-			}
+			str = g_strdup_printf(_("%s has closed the conversation "
+						"window."), username);
+		      
+			g_free(username);
+			
 		}
 
 		if (str != NULL)
--- a/src/protocols/oscar/oscar.c	Sat Jan 08 18:58:19 2005 +0000
+++ b/src/protocols/oscar/oscar.c	Sat Jan 08 20:30:41 2005 +0000
@@ -7607,7 +7607,7 @@
 
 	NULL,                                             /**< ui_info        */
 	&prpl_info,                                       /**< extra_info     */
-	&prefs_info,                                      /**< prefs_info     */
+	NULL,                                             /**< prefs_info     */
 	oscar_actions
 };