[gaim-migrate @ 11764]

Thu, 06 Jan 2005 01:27:34 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Thu, 06 Jan 2005 01:27:34 +0000
changeset 10477
7d0641ba585c
parent 10476
7c4035135c73
child 10478
1a8324926c03

[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.

doc/gtkblist-signals.dox file | annotate | diff | comparison | revisions
plugins/ChangeLog.API file | annotate | diff | comparison | revisions
src/gtkblist.c file | annotate | diff | comparison | revisions
src/value.h file | annotate | diff | comparison | revisions
--- 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

mercurial