changeset 11018:04f280376f06

[gaim-migrate @ 12888] sf patch #1223909, from Richard Laager New Accessor Method: gaim_gtk_blist_node_is_contact_expanded committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 22 Jun 2005 22:41:59 +0000
parents 829ab6b71ffe
children 86725cfe0550
files ChangeLog plugins/ChangeLog.API src/gtkblist.c src/gtkblist.h
diffstat 4 files changed, 26 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jun 22 21:36:23 2005 +0000
+++ b/ChangeLog	Wed Jun 22 22:41:59 2005 +0000
@@ -39,6 +39,8 @@
 	* Yahoo! Stealth Settings have been implemented.
 	* The modify account dialog now contains two tabs, which should display
 	  better at lower resolutions (Sadrul Habib Chowdhury)
+	* GNOME users can open received files by clicking on "Open" in the file
+	  transfer window
 
 	Bug fixes:
 	* People using input methods can now use Enter again.
--- a/plugins/ChangeLog.API	Wed Jun 22 21:36:23 2005 +0000
+++ b/plugins/ChangeLog.API	Wed Jun 22 22:41:59 2005 +0000
@@ -57,6 +57,9 @@
 	* Removed: Window flashing support in the core: gaim_conv_window_flash,
 	           and flash UI operation for conversations.  Use signal
 	           "received-im-msg" or similar.
+	* Added:   gaim_gtk_blist_node_is_contact_expanded, returns TRUE if
+	           the given blist node is a buddy inside an expanded contact,
+	           or is itself an expanded contact
 
 	Signals:
 	* Changed: "received-im-msg" and "received-chat-msg" to match, both
--- a/src/gtkblist.c	Wed Jun 22 21:36:23 2005 +0000
+++ b/src/gtkblist.c	Wed Jun 22 22:41:59 2005 +0000
@@ -3342,6 +3342,16 @@
 	node->ui_data = g_new0(struct _gaim_gtk_blist_node, 1);
 }
 
+gboolean gaim_gtk_blist_node_is_contact_expanded(GaimBlistNode *node)
+{
+	if GAIM_BLIST_NODE_IS_BUDDY(node)
+		node = node->parent;
+
+	g_return_val_if_fail(GAIM_BLIST_NODE_IS_CONTACT(node), FALSE);
+
+	return ((struct _gaim_gtk_blist_node *)node->ui_data)->contact_expanded;
+}
+
 void gaim_gtk_blist_update_columns()
 {
 	if(!gtkblist)
--- a/src/gtkblist.h	Wed Jun 22 21:36:23 2005 +0000
+++ b/src/gtkblist.h	Wed Jun 22 22:41:59 2005 +0000
@@ -184,6 +184,17 @@
 GdkPixbuf *gaim_gtk_blist_get_status_icon(GaimBlistNode *node,
 		GaimStatusIconSize size);
 
+/**
+ * Returns a boolean indicating if @a node is part of an expanded contact.
+ *
+ * This only makes sense for contact and buddy nodes. @c FALSE is returned
+ * for other types of nodes.
+ *
+ * @param node The node in question.
+ * @return A boolean indicating if @a node is part of an expanded contact.
+ */
+gboolean gaim_gtk_blist_node_is_contact_expanded(GaimBlistNode *node);
+
 /**************************************************************************
  * @name GTK+ Buddy List sorting functions
  **************************************************************************/