comparison libpurple/protocols/gg/gg.c @ 21061:1d92b85ef5d9

gg: Properly display your status in the buddylist.
author Bartoz Oler <bartosz@pidgin.im>
date Sun, 04 Nov 2007 22:17:45 +0000
parents 3cc856ca2338
children 6de09629f091
comparison
equal deleted inserted replaced
21058:647b841ea945 21061:1d92b85ef5d9
826 /* static void ggp_callback_add_to_chat_ok(PurpleConnection *gc, PurpleRequestFields *fields) {{{ */ 826 /* static void ggp_callback_add_to_chat_ok(PurpleConnection *gc, PurpleRequestFields *fields) {{{ */
827 static void ggp_callback_add_to_chat_ok(PurpleConnection *gc, PurpleRequestFields *fields) 827 static void ggp_callback_add_to_chat_ok(PurpleConnection *gc, PurpleRequestFields *fields)
828 { 828 {
829 GGPInfo *info = gc->proto_data; 829 GGPInfo *info = gc->proto_data;
830 PurpleRequestField *field; 830 PurpleRequestField *field;
831 /* TODO: sel may be null. */
831 GList *sel; 832 GList *sel;
832 833
833 field = purple_request_fields_get_field(fields, "name"); 834 field = purple_request_fields_get_field(fields, "name");
834 sel = purple_request_field_list_get_selected(field); 835 sel = purple_request_field_list_get_selected(field);
835 836
1866 g_free(tmp); 1867 g_free(tmp);
1867 1868
1868 gg_change_status_descr(info->session, new_status_descr, new_msg); 1869 gg_change_status_descr(info->session, new_status_descr, new_msg);
1869 g_free(new_msg); 1870 g_free(new_msg);
1870 } 1871 }
1872
1873 ggp_status_fake_to_self(account);
1874
1871 } 1875 }
1872 /* }}} */ 1876 /* }}} */
1873 1877
1874 /* static void ggp_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) {{{ */ 1878 /* static void ggp_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) {{{ */
1875 static void ggp_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) 1879 static void ggp_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group)
1876 { 1880 {
1881 PurpleAccount *account;
1877 GGPInfo *info = gc->proto_data; 1882 GGPInfo *info = gc->proto_data;
1878 1883
1879 gg_add_notify(info->session, ggp_str_to_uin(buddy->name)); 1884 gg_add_notify(info->session, ggp_str_to_uin(buddy->name));
1885
1886 account = purple_connection_get_account(gc);
1887 if (strcmp(purple_account_get_username(account), buddy->name) == 0) {
1888 ggp_status_fake_to_self(account);
1889 }
1880 } 1890 }
1881 /* }}} */ 1891 /* }}} */
1882 1892
1883 /* static void ggp_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) {{{ */ 1893 /* static void ggp_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) {{{ */
1884 static void ggp_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, 1894 static void ggp_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy,