| 89 static void |
89 static void |
| 90 pidgin_widget_decorate_account(GtkWidget *cont, PurpleAccount *account) |
90 pidgin_widget_decorate_account(GtkWidget *cont, PurpleAccount *account) |
| 91 { |
91 { |
| 92 GtkWidget *image; |
92 GtkWidget *image; |
| 93 GdkPixbuf *pixbuf; |
93 GdkPixbuf *pixbuf; |
| 94 #if !GTK_CHECK_VERSION(2,12,0) |
|
| 95 GtkTooltips *tips; |
|
| 96 #endif |
|
| 97 |
94 |
| 98 if (!account) |
95 if (!account) |
| 99 return; |
96 return; |
| 100 |
97 |
| 101 pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL); |
98 pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL); |
| 102 image = gtk_image_new_from_pixbuf(pixbuf); |
99 image = gtk_image_new_from_pixbuf(pixbuf); |
| 103 g_object_unref(G_OBJECT(pixbuf)); |
100 g_object_unref(G_OBJECT(pixbuf)); |
| 104 |
101 |
| 105 #if GTK_CHECK_VERSION(2,12,0) |
|
| 106 gtk_widget_set_tooltip_text(image, purple_account_get_username(account)); |
102 gtk_widget_set_tooltip_text(image, purple_account_get_username(account)); |
| 107 #else |
|
| 108 tips = gtk_tooltips_new(); |
|
| 109 gtk_tooltips_set_tip(tips, image, purple_account_get_username(account), NULL); |
|
| 110 #endif |
|
| 111 |
103 |
| 112 if (GTK_IS_DIALOG(cont)) { |
104 if (GTK_IS_DIALOG(cont)) { |
| 113 gtk_box_pack_start(GTK_BOX(gtk_dialog_get_action_area(GTK_DIALOG(cont))), |
105 gtk_box_pack_start(GTK_BOX(gtk_dialog_get_action_area(GTK_DIALOG(cont))), |
| 114 image, FALSE, TRUE, 0); |
106 image, FALSE, TRUE, 0); |
| 115 gtk_box_reorder_child(GTK_BOX(gtk_dialog_get_action_area(GTK_DIALOG(cont))), |
107 gtk_box_reorder_child(GTK_BOX(gtk_dialog_get_action_area(GTK_DIALOG(cont))), |