changeset 32781:8878ea011fa1

Hide struct PurpleNotifySearchColumn.
author andrew.victor@mxit.com
date Fri, 21 Oct 2011 21:29:33 +0000
parents 75104780b1a3
children 83c8b752993b
files ChangeLog.API finch/gntnotify.c libpurple/notify.c libpurple/notify.h pidgin/gtknotify.c
diffstat 5 files changed, 34 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog.API	Fri Oct 21 20:39:29 2011 +0000
+++ b/ChangeLog.API	Fri Oct 21 21:29:33 2011 +0000
@@ -18,6 +18,7 @@
 		* purple_conversation_set_ui_data
 		* purple_conversation_message_get_alias
 		* purple_conversation_message_get_conv
+		* purple_notify_searchresult_column_get_title
 		* purple_notify_searchresult_column_is_visible
 		* purple_notify_searchresult_column_set_visible
 		* purple_notify_user_info_prepend_pair_plaintext
@@ -228,6 +229,7 @@
 		* struct _PurpleRoomlistRoom
 		* struct PurpleAccountOption
 		* struct PurpleAccountUserSplit
+		* struct PurpleNotifySearchColumn
 		* wpurple_g_access
 		* xmlnode_set_attrib_with_namespace
 		* xmlnode_set_attrib_with_prefix
--- a/finch/gntnotify.c	Fri Oct 21 20:39:29 2011 +0000
+++ b/finch/gntnotify.c	Fri Oct 21 21:29:33 2011 +0000
@@ -429,7 +429,7 @@
 	for (iter = results->columns; iter; iter = iter->next)
 	{
 		PurpleNotifySearchColumn *column = iter->data;
-		gnt_tree_set_column_title(GNT_TREE(tree), i, column->title);
+		gnt_tree_set_column_title(GNT_TREE(tree), i, purple_notify_searchresult_column_get_title(column));
 
 		if (!purple_notify_searchresult_column_is_visible(column))
 			gnt_tree_set_column_visible(GNT_TREE(tree), i, FALSE);
--- a/libpurple/notify.c	Fri Oct 21 20:39:29 2011 +0000
+++ b/libpurple/notify.c	Fri Oct 21 21:29:33 2011 +0000
@@ -56,6 +56,16 @@
 	GQueue entries;
 };
 
+/**
+ * Single column of a search result.
+ */
+struct _PurpleNotifySearchColumn
+{
+	char *title;           /**< Title of the column. */
+	gboolean visible;      /**< Should the column be visible to the user. Defaults to TRUE. */
+
+};
+
 void *
 purple_notify_message(void *handle, PurpleNotifyMsgType type,
 					const char *title, const char *primary,
@@ -368,6 +378,13 @@
 	return sc;
 }
 
+const char *purple_notify_searchresult_column_get_title(const PurpleNotifySearchColumn *column)
+{
+	g_return_val_if_fail(column != NULL, NULL);
+	
+	return column->title;
+}
+
 void purple_notify_searchresult_column_set_visible(PurpleNotifySearchColumn *column, gboolean visible)
 {
 	g_return_if_fail(column != NULL);
--- a/libpurple/notify.h	Fri Oct 21 20:39:29 2011 +0000
+++ b/libpurple/notify.h	Fri Oct 21 21:29:33 2011 +0000
@@ -32,10 +32,13 @@
 #include <glib.h>
 
 typedef struct _PurpleNotifyUserInfoEntry	PurpleNotifyUserInfoEntry;
-typedef struct _PurpleNotifyUserInfo	PurpleNotifyUserInfo;
+typedef struct _PurpleNotifyUserInfo		PurpleNotifyUserInfo;
+/** @copydoc _PurpleNotifySearchColumn */
+typedef struct _PurpleNotifySearchColumn	PurpleNotifySearchColumn;
 
 #include "connection.h"
 
+
 /**
  * Notification close callbacks.
  */
@@ -106,15 +109,6 @@
 	PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER
 } PurpleNotifyUserInfoEntryType;
 
-/**
- * Single column of a search result.
- */
-typedef struct
-{
-	char *title;           /**< Title of the column. */
-	gboolean visible;      /**< Should the column be visible to the user. Defaults to TRUE. */
-
-} PurpleNotifySearchColumn;
 
 
 /**
@@ -277,6 +271,15 @@
 PurpleNotifySearchColumn *purple_notify_searchresults_column_new(const char *title);
 
 /**
+ * Returns the title of the column
+ *
+ * @param column The search column object.
+ *
+ * @return The title of the column
+ */
+const char *purple_notify_searchresult_column_get_title(const PurpleNotifySearchColumn *column);
+
+/**
  * Sets whether or not a search result column is visible.
  *
  * @param column  The search column object.
--- a/pidgin/gtknotify.c	Fri Oct 21 20:39:29 2011 +0000
+++ b/pidgin/gtknotify.c	Fri Oct 21 21:29:33 2011 +0000
@@ -1017,7 +1017,7 @@
 		renderer = gtk_cell_renderer_text_new();
 
 		gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(treeview), -1,
-				column->title, renderer, "text", i, NULL);
+				purple_notify_searchresult_column_get_title(column), renderer, "text", i, NULL);
 
 		if (!purple_notify_searchresult_column_is_visible(column))
 			gtk_tree_view_column_set_visible(gtk_tree_view_get_column(GTK_TREE_VIEW(treeview), i), FALSE);