diff console/gntblist.c @ 14132:2c85b0f97dd0

[gaim-migrate @ 16774] Add a new custom status dialog, and a corresponding entry in the status-selector in the buddylist. But you cannot set any per-account status yet. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 15 Aug 2006 20:23:58 +0000
parents db2311999862
children c65ed4f6eea8
line wrap: on
line diff
--- a/console/gntblist.c	Tue Aug 15 18:05:14 2006 +0000
+++ b/console/gntblist.c	Tue Aug 15 20:23:58 2006 +0000
@@ -45,6 +45,7 @@
 	STATUS_PRIMITIVE = 0,
 	STATUS_SAVED_POPULAR,
 	STATUS_SAVED_ALL,
+	STATUS_SAVED_NEW
 } StatusType;
 
 typedef struct
@@ -1065,6 +1066,13 @@
 				gaim_savedstatus_get_title(iter->data));
 	}
 
+	/* New savedstatus */
+	item = g_new0(StatusBoxItem, 1);
+	item->type = STATUS_SAVED_NEW;
+	items = g_list_prepend(items, item);
+	gnt_combo_box_add_data(GNT_COMBO_BOX(ggblist->status), item,
+			_("New..."));
+
 	/* More savedstatuses */
 	item = g_new0(StatusBoxItem, 1);
 	item->type = STATUS_SAVED_ALL;
@@ -1156,6 +1164,12 @@
 		gnt_box_give_focus_to_child(GNT_BOX(ggblist->window), ggblist->tree);
 		gg_savedstatus_show_all();
 	}
+	else if (now->type == STATUS_SAVED_NEW)
+	{
+		savedstatus_changed(gaim_savedstatus_get_current(), NULL);
+		gnt_box_give_focus_to_child(GNT_BOX(ggblist->window), ggblist->tree);
+		gg_savedstatus_edit(NULL);
+	}
 	else
 		g_return_if_reached();
 }