# HG changeset patch # User andrew.victor@mxit.com # Date 1319232573 0 # Node ID 8878ea011fa1eec7a56fe8844cd1272d54b4e538 # Parent 75104780b1a31a46298de14ae021dad1ae078fd1 Hide struct PurpleNotifySearchColumn. diff -r 75104780b1a3 -r 8878ea011fa1 ChangeLog.API --- 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 diff -r 75104780b1a3 -r 8878ea011fa1 finch/gntnotify.c --- 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); diff -r 75104780b1a3 -r 8878ea011fa1 libpurple/notify.c --- 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); diff -r 75104780b1a3 -r 8878ea011fa1 libpurple/notify.h --- 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 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. diff -r 75104780b1a3 -r 8878ea011fa1 pidgin/gtknotify.c --- 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);