comparison src/layout_util.c @ 523:0717bcc4f2b7

Handle the case of reduction of the number of view directory types. Previously it was leading to a segfault.
author zas_
date Fri, 25 Apr 2008 08:07:22 +0000
parents 985fdfebd89e
children fe675761d091
comparison
equal deleted inserted replaced
522:fd4208f8b5f3 523:0717bcc4f2b7
1412 0, G_CALLBACK(layout_menu_list_cb), lw); 1412 0, G_CALLBACK(layout_menu_list_cb), lw);
1413 gtk_action_group_add_radio_actions(lw->action_group, 1413 gtk_action_group_add_radio_actions(lw->action_group,
1414 menu_split_radio_entries, G_N_ELEMENTS(menu_split_radio_entries), 1414 menu_split_radio_entries, G_N_ELEMENTS(menu_split_radio_entries),
1415 0, G_CALLBACK(layout_menu_split_cb), lw); 1415 0, G_CALLBACK(layout_menu_split_cb), lw);
1416 gtk_action_group_add_radio_actions(lw->action_group, 1416 gtk_action_group_add_radio_actions(lw->action_group,
1417 menu_view_dir_radio_entries, G_N_ELEMENTS(menu_view_dir_radio_entries), 1417 menu_view_dir_radio_entries, VIEW_DIR_TYPES_COUNT,
1418 0, G_CALLBACK(layout_menu_view_dir_as_cb), lw); 1418 0, G_CALLBACK(layout_menu_view_dir_as_cb), lw);
1419 1419
1420 lw->ui_manager = gtk_ui_manager_new(); 1420 lw->ui_manager = gtk_ui_manager_new();
1421 gtk_ui_manager_set_add_tearoffs(lw->ui_manager, TRUE); 1421 gtk_ui_manager_set_add_tearoffs(lw->ui_manager, TRUE);
1422 gtk_ui_manager_insert_action_group(lw->ui_manager, lw->action_group, 0); 1422 gtk_ui_manager_insert_action_group(lw->ui_manager, lw->action_group, 0);