pidgin/gtkrequest.c

changeset 41962
f802660eaef2
parent 41947
7b3312d0760c
child 42094
2707c81648a0
equal deleted inserted replaced
41961:0da91f053305 41962:f802660eaef2
85 static GtkWidget * create_account_field(PurpleRequestField *field); 85 static GtkWidget * create_account_field(PurpleRequestField *field);
86 86
87 static void 87 static void
88 pidgin_widget_decorate_account(GtkWidget *cont, PurpleAccount *account) 88 pidgin_widget_decorate_account(GtkWidget *cont, PurpleAccount *account)
89 { 89 {
90 PurpleContactInfo *info = NULL;
90 PurpleProtocol *protocol = NULL; 91 PurpleProtocol *protocol = NULL;
91 GtkWidget *image; 92 GtkWidget *image;
92 const gchar *icon_name = NULL; 93 const gchar *icon_name = NULL;
93 94
94 if(!PURPLE_IS_ACCOUNT(account)) { 95 if(!PURPLE_IS_ACCOUNT(account)) {
95 return; 96 return;
96 } 97 }
97 98
99 info = PURPLE_CONTACT_INFO(account);
98 protocol = purple_account_get_protocol(account); 100 protocol = purple_account_get_protocol(account);
99 icon_name = purple_protocol_get_icon_name(protocol); 101 icon_name = purple_protocol_get_icon_name(protocol);
100 102
101 image = gtk_image_new_from_icon_name(icon_name); 103 image = gtk_image_new_from_icon_name(icon_name);
102 104
103 gtk_widget_set_tooltip_text(image, purple_account_get_username(account)); 105 gtk_widget_set_tooltip_text(image, purple_contact_info_get_username(info));
104 106
105 if (GTK_IS_BOX(cont)) { 107 if (GTK_IS_BOX(cont)) {
106 gtk_widget_set_halign(image, GTK_ALIGN_START); 108 gtk_widget_set_halign(image, GTK_ALIGN_START);
107 gtk_widget_set_valign(image, GTK_ALIGN_START); 109 gtk_widget_set_valign(image, GTK_ALIGN_START);
108 gtk_box_append(GTK_BOX(cont), image); 110 gtk_box_append(GTK_BOX(cont), image);

mercurial