changeset 10477:5cb55bcad11b

[gaim-migrate @ 11764] The Ever-Vigilant Stu pointed out that it probably wasn't a good idea to allow plugins to modify the internals of a GString. This should take care of that. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 06 Jan 2005 01:27:34 +0000
parents d02e70b5d197
children d497f3a2686f
files doc/gtkblist-signals.dox plugins/ChangeLog.API src/gtkblist.c src/value.h
diffstat 4 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/doc/gtkblist-signals.dox	Wed Jan 05 20:08:18 2005 +0000
+++ b/doc/gtkblist-signals.dox	Thu Jan 06 01:27:34 2005 +0000
@@ -18,11 +18,11 @@
 
  @signaldef drawing-tooltip
   @signalproto
-void (*drawing-tooltip)(GaimBlistNode *node, char **text);
+void (*drawing-tooltip)(GaimBlistNode *node, GString *text);
   @endsignalproto
   @signaldesc
    Emitted just before a tooltip is displayed.
-   @a text is a pointer to a string, so the plugin can replace the text that
+   @a text is a standard GString, so the plugin can modify the text that
    will be displayed.
   @note
    Make sure to free @a *text before you replace it!
--- a/plugins/ChangeLog.API	Wed Jan 05 20:08:18 2005 +0000
+++ b/plugins/ChangeLog.API	Thu Jan 06 01:27:34 2005 +0000
@@ -13,9 +13,11 @@
 
 	Signals:
 	* Changed: "received-im-msg and "received-chat-msg" to match, both
-		   now pass a conversation pointer and flags
+			   now pass a conversation pointer and flags
 	* Changed: "receiving-im-msg" and "receving-chat-msg" to match, both
-		   now pass a conversation pointer and a pointer to the flags.
+			   now pass a conversation pointer and a pointer to the flags.
+	* Changed: "drawing-tooltip," the second argument is now a GString*
+			   instead of a char**
 
 version 1.0.0 (09/17/2004):
 	* Added: get_chat_name to the GaimPluginProtocolInfo struct
--- a/src/gtkblist.c	Wed Jan 05 20:08:18 2005 +0000
+++ b/src/gtkblist.c	Thu Jan 06 01:27:34 2005 +0000
@@ -2688,7 +2688,7 @@
 	}
 
 	gaim_signal_emit(gaim_gtk_blist_get_handle(),
-			 "drawing-tooltip", node, &str->str);
+			 "drawing-tooltip", node, str);
 
 	return g_string_free(str, FALSE);
 }
@@ -4728,7 +4728,7 @@
 	gaim_signal_register(gtk_blist_handle, "drawing-tooltip",
 						 gaim_marshal_VOID__POINTER_POINTER, NULL, 2,
 						 gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_BLIST_NODE),
-						 gaim_value_new_outgoing(GAIM_TYPE_STRING));
+						 gaim_value_new_outgoing(GAIM_TYPE_BOXED, "GString *"));
 }
 
 void
--- a/src/value.h	Wed Jan 05 20:08:18 2005 +0000
+++ b/src/value.h	Thu Jan 06 01:27:34 2005 +0000
@@ -120,7 +120,7 @@
  * This function takes a type and, depending on that type, a sub-type
  * or specific type.
  *
- * If @a type is GAIM_TYPE_POINTER, the next parameter must be a
+ * If @a type is GAIM_TYPE_BOXED, the next parameter must be a
  * string representing the specific type.
  *
  * If @a type is GAIM_TYPE_SUBTYPE, the next parameter must be a
@@ -136,12 +136,13 @@
 GaimValue *gaim_value_new(GaimType type, ...);
 
 /**
- * Creates a new outgoing GaimValue.
+ * Creates a new outgoing GaimValue.  If a value is an "outgoing" value
+ * it means the value can be modified by plugins and scripts.
  *
  * This function takes a type and, depending on that type, a sub-type
  * or specific type.
  *
- * If @a type is GAIM_TYPE_POINTER, the next parameter must be a
+ * If @a type is GAIM_TYPE_BOXED, the next parameter must be a
  * string representing the specific type.
  *
  * If @a type is GAIM_TYPE_SUBTYPE, the next parameter must be a