| 246 box->icon_box_menu = gtk_menu_new(); |
246 box->icon_box_menu = gtk_menu_new(); |
| 247 |
247 |
| 248 menu_item = gaim_new_item_from_stock(box->icon_box_menu, _("Remove"), GTK_STOCK_REMOVE, |
248 menu_item = gaim_new_item_from_stock(box->icon_box_menu, _("Remove"), GTK_STOCK_REMOVE, |
| 249 G_CALLBACK(remove_buddy_icon_cb), |
249 G_CALLBACK(remove_buddy_icon_cb), |
| 250 box, 0, 0, NULL); |
250 box, 0, 0, NULL); |
| 251 if (gaim_prefs_get_string("/gaim/gtk/accounts/buddyicon") == NULL) |
251 if (gaim_prefs_get_path("/gaim/gtk/accounts/buddyicon") == NULL) |
| 252 gtk_widget_set_sensitive(menu_item, FALSE); |
252 gtk_widget_set_sensitive(menu_item, FALSE); |
| 253 |
253 |
| 254 gtk_menu_popup(GTK_MENU(box->icon_box_menu), NULL, NULL, NULL, NULL, |
254 gtk_menu_popup(GTK_MENU(box->icon_box_menu), NULL, NULL, NULL, NULL, |
| 255 event->button, event->time); |
255 event->button, event->time); |
| 256 |
256 |
| 337 gtk_gaim_status_box_set_buddy_icon(status_box, string); |
337 gtk_gaim_status_box_set_buddy_icon(status_box, string); |
| 338 g_free(string); |
338 g_free(string); |
| 339 } |
339 } |
| 340 else |
340 else |
| 341 { |
341 { |
| 342 gtk_gaim_status_box_set_buddy_icon(status_box, gaim_prefs_get_string("/gaim/gtk/accounts/buddyicon")); |
342 gtk_gaim_status_box_set_buddy_icon(status_box, gaim_prefs_get_path("/gaim/gtk/accounts/buddyicon")); |
| 343 } |
343 } |
| 344 |
344 |
| 345 status_box->hand_cursor = gdk_cursor_new (GDK_HAND2); |
345 status_box->hand_cursor = gdk_cursor_new (GDK_HAND2); |
| 346 status_box->arrow_cursor = gdk_cursor_new (GDK_LEFT_PTR); |
346 status_box->arrow_cursor = gdk_cursor_new (GDK_LEFT_PTR); |
| 347 |
347 |
| 1380 static void |
1380 static void |
| 1381 remove_buddy_icon_cb(GtkWidget *w, GtkGaimStatusBox *box) |
1381 remove_buddy_icon_cb(GtkWidget *w, GtkGaimStatusBox *box) |
| 1382 { |
1382 { |
| 1383 if (box->account == NULL) |
1383 if (box->account == NULL) |
| 1384 /* The pref-connect callback does the actual work */ |
1384 /* The pref-connect callback does the actual work */ |
| 1385 gaim_prefs_set_string("/gaim/gtk/accounts/buddyicon", NULL); |
1385 gaim_prefs_set_path("/gaim/gtk/accounts/buddyicon", NULL); |
| 1386 else |
1386 else |
| 1387 buddy_icon_set_cb(NULL, box); |
1387 buddy_icon_set_cb(NULL, box); |
| 1388 |
1388 |
| 1389 gtk_widget_destroy(box->icon_box_menu); |
1389 gtk_widget_destroy(box->icon_box_menu); |
| 1390 box->icon_box_menu = NULL; |
1390 box->icon_box_menu = NULL; |
| 1395 { |
1395 { |
| 1396 GtkGaimStatusBox *box = data; |
1396 GtkGaimStatusBox *box = data; |
| 1397 if (filename) { |
1397 if (filename) { |
| 1398 if (box->account == NULL) |
1398 if (box->account == NULL) |
| 1399 /* The pref-connect callback does the actual work */ |
1399 /* The pref-connect callback does the actual work */ |
| 1400 gaim_prefs_set_string("/gaim/gtk/accounts/buddyicon", filename); |
1400 gaim_prefs_set_path("/gaim/gtk/accounts/buddyicon", filename); |
| 1401 else |
1401 else |
| 1402 buddy_icon_set_cb(filename, box); |
1402 buddy_icon_set_cb(filename, box); |
| 1403 } |
1403 } |
| 1404 |
1404 |
| 1405 box->buddy_icon_sel = NULL; |
1405 box->buddy_icon_sel = NULL; |