comparison 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
comparison
equal deleted inserted replaced
14131:db2311999862 14132:2c85b0f97dd0
43 typedef enum 43 typedef enum
44 { 44 {
45 STATUS_PRIMITIVE = 0, 45 STATUS_PRIMITIVE = 0,
46 STATUS_SAVED_POPULAR, 46 STATUS_SAVED_POPULAR,
47 STATUS_SAVED_ALL, 47 STATUS_SAVED_ALL,
48 STATUS_SAVED_NEW
48 } StatusType; 49 } StatusType;
49 50
50 typedef struct 51 typedef struct
51 { 52 {
52 StatusType type; 53 StatusType type;
1063 items = g_list_prepend(items, item); 1064 items = g_list_prepend(items, item);
1064 gnt_combo_box_add_data(GNT_COMBO_BOX(ggblist->status), item, 1065 gnt_combo_box_add_data(GNT_COMBO_BOX(ggblist->status), item,
1065 gaim_savedstatus_get_title(iter->data)); 1066 gaim_savedstatus_get_title(iter->data));
1066 } 1067 }
1067 1068
1069 /* New savedstatus */
1070 item = g_new0(StatusBoxItem, 1);
1071 item->type = STATUS_SAVED_NEW;
1072 items = g_list_prepend(items, item);
1073 gnt_combo_box_add_data(GNT_COMBO_BOX(ggblist->status), item,
1074 _("New..."));
1075
1068 /* More savedstatuses */ 1076 /* More savedstatuses */
1069 item = g_new0(StatusBoxItem, 1); 1077 item = g_new0(StatusBoxItem, 1);
1070 item->type = STATUS_SAVED_ALL; 1078 item->type = STATUS_SAVED_ALL;
1071 items = g_list_prepend(items, item); 1079 items = g_list_prepend(items, item);
1072 gnt_combo_box_add_data(GNT_COMBO_BOX(ggblist->status), item, 1080 gnt_combo_box_add_data(GNT_COMBO_BOX(ggblist->status), item,
1153 { 1161 {
1154 /* Restore the selection to reflect current status. */ 1162 /* Restore the selection to reflect current status. */
1155 savedstatus_changed(gaim_savedstatus_get_current(), NULL); 1163 savedstatus_changed(gaim_savedstatus_get_current(), NULL);
1156 gnt_box_give_focus_to_child(GNT_BOX(ggblist->window), ggblist->tree); 1164 gnt_box_give_focus_to_child(GNT_BOX(ggblist->window), ggblist->tree);
1157 gg_savedstatus_show_all(); 1165 gg_savedstatus_show_all();
1166 }
1167 else if (now->type == STATUS_SAVED_NEW)
1168 {
1169 savedstatus_changed(gaim_savedstatus_get_current(), NULL);
1170 gnt_box_give_focus_to_child(GNT_BOX(ggblist->window), ggblist->tree);
1171 gg_savedstatus_edit(NULL);
1158 } 1172 }
1159 else 1173 else
1160 g_return_if_reached(); 1174 g_return_if_reached();
1161 } 1175 }
1162 1176