Mercurial > pidgin.yaz
comparison src/gtkutils.c @ 8218:4beaf6b35483
[gaim-migrate @ 8941]
prevent a possible crash when passing NULL as a protocol ID to
gaim_gtk_protocol_option_menu_new().
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 07 Feb 2004 23:24:31 +0000 |
parents | 83830cb8467e |
children | 4a6448907382 |
comparison
equal
deleted
inserted
replaced
8217:423453c1cf2b | 8218:4beaf6b35483 |
---|---|
721 | 721 |
722 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); | 722 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); |
723 gtk_widget_show(item); | 723 gtk_widget_show(item); |
724 gaim_set_accessible_label (item, label); | 724 gaim_set_accessible_label (item, label); |
725 | 725 |
726 if (!strcmp(plugin->info->id, id)) | 726 if (id != NULL && !strcmp(plugin->info->id, id)) |
727 selected_index = i; | 727 selected_index = i; |
728 } | 728 } |
729 | 729 |
730 gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu); | 730 gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu); |
731 | 731 |
1561 gint ythickness = GTK_WIDGET(menu)->style->ythickness; | 1561 gint ythickness = GTK_WIDGET(menu)->style->ythickness; |
1562 | 1562 |
1563 gdk_window_get_origin (widget->window, x, y); | 1563 gdk_window_get_origin (widget->window, x, y); |
1564 gtk_tree_view_get_cursor (tv, &path, &col); | 1564 gtk_tree_view_get_cursor (tv, &path, &col); |
1565 gtk_tree_view_get_cell_area (tv, path, col, &rect); | 1565 gtk_tree_view_get_cell_area (tv, path, col, &rect); |
1566 | 1566 |
1567 *x += rect.x+rect.width; | 1567 *x += rect.x+rect.width; |
1568 *y += rect.y+rect.height+ythickness; | 1568 *y += rect.y+rect.height+ythickness; |
1569 gaim_gtk_menu_position_func (menu, x, y, push_in, data); | 1569 gaim_gtk_menu_position_func (menu, x, y, push_in, data); |
1570 } | 1570 } |