/soc/2013/ankitkv/gobjectification: eaf8156d3c5e: Renamed purple...

Ankit Vani a at nevitus.org
Sat Oct 12 11:26:37 EDT 2013


Changeset: eaf8156d3c5e4495f9d34bf6b2aad365ace0bac0
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-10-12 20:53 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/eaf8156d3c5e

Description:

Renamed purple_roomlist_room_get_type to *_get_room_type, purple_roomlist_field_get_type to *_get_field_type

diffstat:

 ChangeLog.API                         |   4 ++++
 finch/gntroomlist.c                   |   8 ++++----
 libpurple/protocols/yahoo/yahoochat.c |   2 +-
 libpurple/roomlist.c                  |   4 ++--
 libpurple/roomlist.h                  |   4 ++--
 pidgin/gtkroomlist.c                  |  20 ++++++++++----------
 6 files changed, 23 insertions(+), 19 deletions(-)

diffs (197 lines):

diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -208,6 +208,10 @@ version 3.0.0 (??/??/????):
 		  purple_notify_user_info_prepend_pair_html
 		* PurpleRoomlist is now a GObject. Please see the documentation for
 		  details.
+		* purple_roomlist_room_get_type is now
+		  purple_roomlist_room_get_room_type
+		* purple_roomlist_field_get_type is now
+		  purple_roomlist_field_get_field_type
 		* purple_srv_resolve now takes a PurpleAccount as the first parameter
 		* PurpleStatus is now a GObject. Please see the documentation for
 		  details.
diff --git a/finch/gntroomlist.c b/finch/gntroomlist.c
--- a/finch/gntroomlist.c
+++ b/finch/gntroomlist.c
@@ -142,7 +142,7 @@ roomlist_activated(GntWidget *widget)
 	if (!room)
 		return;
 
-	switch (purple_roomlist_room_get_type(room)) {
+	switch (purple_roomlist_room_get_room_type(room)) {
 		case PURPLE_ROOMLIST_ROOMTYPE_ROOM:
 			purple_roomlist_room_join(froomlist.roomlist, room);
 			break;
@@ -187,7 +187,7 @@ roomlist_selection_changed(GntWidget *wi
 				purple_roomlist_field_get_label(f), GNT_TEXT_FLAG_BOLD);
 		gnt_text_view_append_text_with_flags(tv, ": ", GNT_TEXT_FLAG_BOLD);
 
-		switch (purple_roomlist_field_get_type(f)) {
+		switch (purple_roomlist_field_get_field_type(f)) {
 			case PURPLE_ROOMLIST_FIELD_BOOL:
 				label = g_strdup(iter->data ? "True" : "False");
 				break;
@@ -203,7 +203,7 @@ roomlist_selection_changed(GntWidget *wi
 		first = FALSE;
 	}
 
-	if (purple_roomlist_room_get_type(room) == PURPLE_ROOMLIST_ROOMTYPE_CATEGORY) {
+	if (purple_roomlist_room_get_room_type(room) == PURPLE_ROOMLIST_ROOMTYPE_CATEGORY) {
 		if (!first)
 			gnt_text_view_append_text_with_flags(tv, "\n", GNT_TEXT_FLAG_NORMAL);
 		gnt_text_view_append_text_with_flags(tv,
@@ -361,7 +361,7 @@ fl_add_room(PurpleRoomlist *roomlist, Pu
 	if (froomlist.roomlist != roomlist)
 		return;
 
-	category = (purple_roomlist_room_get_type(room) == PURPLE_ROOMLIST_ROOMTYPE_CATEGORY);
+	category = (purple_roomlist_room_get_room_type(room) == PURPLE_ROOMLIST_ROOMTYPE_CATEGORY);
 	gnt_tree_remove(GNT_TREE(froomlist.tree), room);
 	gnt_tree_add_row_after(GNT_TREE(froomlist.tree), room,
 			gnt_tree_create_row(GNT_TREE(froomlist.tree),
diff --git a/libpurple/protocols/yahoo/yahoochat.c b/libpurple/protocols/yahoo/yahoochat.c
--- a/libpurple/protocols/yahoo/yahoochat.c
+++ b/libpurple/protocols/yahoo/yahoochat.c
@@ -1528,7 +1528,7 @@ void yahoo_roomlist_expand_category(Purp
 	const char *rll;
 	GList *proto_data;
 
-	if (purple_roomlist_room_get_type(category) != PURPLE_ROOMLIST_ROOMTYPE_CATEGORY)
+	if (purple_roomlist_room_get_room_type(category) != PURPLE_ROOMLIST_ROOMTYPE_CATEGORY)
 		return;
 
 	if (!(id = g_list_nth_data(purple_roomlist_room_get_fields(category), 1))) {
diff --git a/libpurple/roomlist.c b/libpurple/roomlist.c
--- a/libpurple/roomlist.c
+++ b/libpurple/roomlist.c
@@ -510,7 +510,7 @@ void purple_roomlist_room_join(PurpleRoo
 	g_hash_table_destroy(components);
 }
 
-PurpleRoomlistRoomType purple_roomlist_room_get_type(PurpleRoomlistRoom *room)
+PurpleRoomlistRoomType purple_roomlist_room_get_room_type(PurpleRoomlistRoom *room)
 {
 	return room->type;
 }
@@ -622,7 +622,7 @@ PurpleRoomlistField *purple_roomlist_fie
 	return f;
 }
 
-PurpleRoomlistFieldType purple_roomlist_field_get_type(PurpleRoomlistField *field)
+PurpleRoomlistFieldType purple_roomlist_field_get_field_type(PurpleRoomlistField *field)
 {
 	return field->type;
 }
diff --git a/libpurple/roomlist.h b/libpurple/roomlist.h
--- a/libpurple/roomlist.h
+++ b/libpurple/roomlist.h
@@ -328,7 +328,7 @@ void purple_roomlist_room_join(PurpleRoo
  * @param room  The room, which must not be @c NULL.
  * @return The type of the room.
  */
-PurpleRoomlistRoomType purple_roomlist_room_get_type(PurpleRoomlistRoom *room);
+PurpleRoomlistRoomType purple_roomlist_room_get_room_type(PurpleRoomlistRoom *room);
 
 /**
  * Get the name of a room.
@@ -403,7 +403,7 @@ PurpleRoomlistField *purple_roomlist_fie
  *
  * @return  The type of the field.
  */
-PurpleRoomlistFieldType purple_roomlist_field_get_type(PurpleRoomlistField *field);
+PurpleRoomlistFieldType purple_roomlist_field_get_field_type(PurpleRoomlistField *field);
 
 /**
  * Get the label of a field.
diff --git a/pidgin/gtkroomlist.c b/pidgin/gtkroomlist.c
--- a/pidgin/gtkroomlist.c
+++ b/pidgin/gtkroomlist.c
@@ -203,7 +203,7 @@ selection_changed_cb(GtkTreeSelection *s
 		val.g_type = 0;
 		gtk_tree_model_get_value(GTK_TREE_MODEL(grl->model), &iter, ROOM_COLUMN, &val);
 		room = g_value_get_pointer(&val);
-		if (!room || !(purple_roomlist_room_get_type(room) & PURPLE_ROOMLIST_ROOMTYPE_ROOM)) {
+		if (!room || !(purple_roomlist_room_get_room_type(room) & PURPLE_ROOMLIST_ROOMTYPE_ROOM)) {
 			gtk_widget_set_sensitive(dialog->join_button, FALSE);
 			gtk_widget_set_sensitive(dialog->add_button, FALSE);
 			return;
@@ -283,7 +283,7 @@ static void row_activated_cb(GtkTreeView
 	val.g_type = 0;
 	gtk_tree_model_get_value(GTK_TREE_MODEL(grl->model), &iter, ROOM_COLUMN, &val);
 	room = g_value_get_pointer(&val);
-	if (!room || !(purple_roomlist_room_get_type(room) & PURPLE_ROOMLIST_ROOMTYPE_ROOM))
+	if (!room || !(purple_roomlist_room_get_room_type(room) & PURPLE_ROOMLIST_ROOMTYPE_ROOM))
 		return;
 
 	info.list = list;
@@ -314,7 +314,7 @@ static gboolean room_click_cb(GtkWidget 
 	gtk_tree_model_get_value (GTK_TREE_MODEL(grl->model), &iter, ROOM_COLUMN, &val);
 	room = g_value_get_pointer(&val);
 
-	if (!room || !(purple_roomlist_room_get_type(room) & PURPLE_ROOMLIST_ROOMTYPE_ROOM))
+	if (!room || !(purple_roomlist_room_get_room_type(room) & PURPLE_ROOMLIST_ROOMTYPE_ROOM))
 		return FALSE;
 
 	info.list = list;
@@ -453,7 +453,7 @@ static gboolean pidgin_roomlist_create_t
 	gtk_tree_model_get_value(GTK_TREE_MODEL(grl->model), &iter, ROOM_COLUMN, &val);
 	room = g_value_get_pointer(&val);
 
-	if (!room || !(purple_roomlist_room_get_type(room) & PURPLE_ROOMLIST_ROOMTYPE_ROOM))
+	if (!room || !(purple_roomlist_room_get_room_type(room) & PURPLE_ROOMLIST_ROOMTYPE_ROOM))
 		return FALSE;
 
 	tooltip_text = g_string_new("");
@@ -469,7 +469,7 @@ static gboolean pidgin_roomlist_create_t
 		if (purple_roomlist_field_get_hidden(f))
 			continue;
 		label = g_markup_escape_text(purple_roomlist_field_get_label(f), -1);
-		switch (purple_roomlist_field_get_type(f)) {
+		switch (purple_roomlist_field_get_field_type(f)) {
 			case PURPLE_ROOMLIST_FIELD_BOOL:
 				g_string_append_printf(tooltip_text, "%s<b>%s:</b> %s", first ? "" : "\n", label, l->data ? "True" : "False");
 				break;
@@ -754,7 +754,7 @@ static void pidgin_roomlist_set_fields(P
 	for (j = NUM_OF_COLUMNS, l = fields; l; l = l->next, j++) {
 		PurpleRoomlistField *f = l->data;
 
-		switch (purple_roomlist_field_get_type(f)) {
+		switch (purple_roomlist_field_get_field_type(f)) {
 		case PURPLE_ROOMLIST_FIELD_BOOL:
 			types[j] = G_TYPE_BOOLEAN;
 			break;
@@ -808,7 +808,7 @@ static void pidgin_roomlist_set_fields(P
 		gtk_tree_view_column_set_resizable(GTK_TREE_VIEW_COLUMN(column), TRUE);
 		gtk_tree_view_column_set_sort_column_id(GTK_TREE_VIEW_COLUMN(column), j);
 		gtk_tree_view_column_set_reorderable(GTK_TREE_VIEW_COLUMN(column), TRUE);
-		if (purple_roomlist_field_get_type(f) == PURPLE_ROOMLIST_FIELD_INT) {
+		if (purple_roomlist_field_get_field_type(f) == PURPLE_ROOMLIST_FIELD_INT) {
 			gtk_tree_view_column_set_cell_data_func(column, renderer, int_cell_data_func,
 			                                        GINT_TO_POINTER(j), NULL);
 			gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(model), j, int_sort_func,
@@ -862,7 +862,7 @@ static void pidgin_roomlist_add_room(Pur
 	gboolean append = TRUE;
 
 	rl->total_rooms++;
-	if (purple_roomlist_room_get_type(room) == PURPLE_ROOMLIST_ROOMTYPE_ROOM)
+	if (purple_roomlist_room_get_room_type(room) == PURPLE_ROOMLIST_ROOMTYPE_ROOM)
 		rl->num_rooms++;
 
 	if (rl->dialog) {
@@ -896,12 +896,12 @@ static void pidgin_roomlist_add_room(Pur
 	else
 		iter = child;
 
-	if (purple_roomlist_room_get_type(room) & PURPLE_ROOMLIST_ROOMTYPE_CATEGORY)
+	if (purple_roomlist_room_get_room_type(room) & PURPLE_ROOMLIST_ROOMTYPE_CATEGORY)
 		gtk_tree_store_append(rl->model, &child, &iter);
 
 	path = gtk_tree_model_get_path(GTK_TREE_MODEL(rl->model), &iter);
 
-	if (purple_roomlist_room_get_type(room) & PURPLE_ROOMLIST_ROOMTYPE_CATEGORY) {
+	if (purple_roomlist_room_get_room_type(room) & PURPLE_ROOMLIST_ROOMTYPE_CATEGORY) {
 		rr = gtk_tree_row_reference_new(GTK_TREE_MODEL(rl->model), path);
 		g_hash_table_insert(rl->cats, room, rr);
 	}



More information about the Commits mailing list