From: Brian G. <ge...@us...> - 2007-10-08 11:24:38
|
Update of /cvsroot/playerstage/code/stage/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12111/src Modified Files: Tag: release-2-0-patches gui_menus.c model.c Log Message: applied patch for gui_disable option Index: gui_menus.c =================================================================== RCS file: /cvsroot/playerstage/code/stage/src/gui_menus.c,v retrieving revision 1.70 retrieving revision 1.70.2.1 diff -C2 -d -r1.70 -r1.70.2.1 *** gui_menus.c 10 Mar 2006 00:03:23 -0000 1.70 --- gui_menus.c 8 Oct 2007 18:24:40 -0000 1.70.2.1 *************** *** 7,10 **** --- 7,12 ---- #define TOGGLE_PATH "/Main/View" + extern int _stg_disable_gui; + extern stg_rtk_fig_t* fig_debug_geom; extern stg_rtk_fig_t* fig_debug_rays; *************** *** 658,661 **** --- 660,666 ---- gboolean enabled ) { + if (_stg_disable_gui) + return; + stg_property_toggle_args_t* args = calloc(sizeof(stg_property_toggle_args_t),1); Index: model.c =================================================================== RCS file: /cvsroot/playerstage/code/stage/src/model.c,v retrieving revision 1.152 retrieving revision 1.152.2.1 diff -C2 -d -r1.152 -r1.152.2.1 *** model.c 28 Mar 2006 23:27:59 -0000 1.152 --- model.c 8 Oct 2007 18:24:40 -0000 1.152.2.1 *************** *** 48,52 **** extern stg_type_record_t typetable[]; ! //extern int _stg_disable_gui; /** @ingroup stage --- 48,52 ---- extern stg_type_record_t typetable[]; ! extern int _stg_disable_gui; /** @ingroup stage *************** *** 421,465 **** /* mod->lines_count = 1; */ ! // now it's safe to create the GUI components ! if( mod->world->win ) ! gui_model_create( mod ); ! // GUI callbacks - draw changes ! // changes in any of these properties require a redraw of the model ! stg_model_add_callback( mod, &mod->polygons, gui_model_polygons, NULL ); ! stg_model_add_callback( mod, &mod->color, gui_model_polygons, NULL ); ! stg_model_add_callback( mod, &mod->gui_nose, gui_model_polygons, NULL ); ! stg_model_add_callback( mod, &mod->gui_outline, gui_model_polygons, NULL ); ! stg_model_add_callback( mod, &mod->parent, gui_model_polygons, NULL ); ! stg_model_add_callback( mod, &mod->lines, gui_model_lines, NULL ); ! // these changes can be handled without a complete redraw ! stg_model_add_callback( mod, &mod->gui_grid, gui_model_grid, NULL ); ! stg_model_add_callback( mod, &mod->pose, gui_model_move, NULL ); ! stg_model_add_callback( mod, &mod->gui_mask, gui_model_mask, NULL ); ! stg_model_add_callback( mod, &mod->parent, gui_model_mask, NULL ); ! // now we can add the basic square shape ! stg_polygon_t* square = stg_unit_polygon_create(); ! stg_model_set_polygons( mod, square, 1 ); #if INCLUDE_GNOME ! GnomeCanvasGroup* parent_grp = ! mod->parent ? mod->parent->grp : gnome_canvas_root( mod->world->win->gcanvas ); ! mod->grp = GNOME_CANVAS_GROUP( ! gnome_canvas_item_new( parent_grp, ! gnome_canvas_group_get_type(), ! "x", pose.x, ! "y", pose.y, ! NULL )); ! gnome_canvas_item_raise_to_top( GNOME_CANVAS_ITEM(mod->grp) ); #endif ! // exterimental: creates a menu of models ! gui_add_tree_item( mod ); PRINT_DEBUG3( "finished model %d.%d(%s)", --- 421,469 ---- /* mod->lines_count = 1; */ ! if (!_stg_disable_gui) ! { ! // now it's safe to create the GUI components ! if( mod->world->win ) ! gui_model_create( mod ); ! // GUI callbacks - draw changes ! ! // changes in any of these properties require a redraw of the model ! stg_model_add_callback( mod, &mod->polygons, gui_model_polygons, NULL ); ! stg_model_add_callback( mod, &mod->color, gui_model_polygons, NULL ); ! stg_model_add_callback( mod, &mod->gui_nose, gui_model_polygons, NULL ); ! stg_model_add_callback( mod, &mod->gui_outline, gui_model_polygons, NULL ); ! stg_model_add_callback( mod, &mod->parent, gui_model_polygons, NULL ); ! stg_model_add_callback( mod, &mod->lines, gui_model_lines, NULL ); ! // these changes can be handled without a complete redraw ! stg_model_add_callback( mod, &mod->gui_grid, gui_model_grid, NULL ); ! stg_model_add_callback( mod, &mod->pose, gui_model_move, NULL ); ! stg_model_add_callback( mod, &mod->gui_mask, gui_model_mask, NULL ); ! stg_model_add_callback( mod, &mod->parent, gui_model_mask, NULL ); ! // now we can add the basic square shape ! stg_polygon_t* square = stg_unit_polygon_create(); ! stg_model_set_polygons( mod, square, 1 ); #if INCLUDE_GNOME ! GnomeCanvasGroup* parent_grp = ! mod->parent ? mod->parent->grp : gnome_canvas_root( mod->world->win->gcanvas ); ! mod->grp = GNOME_CANVAS_GROUP( ! gnome_canvas_item_new( parent_grp, ! gnome_canvas_group_get_type(), ! "x", pose.x, ! "y", pose.y, ! NULL )); ! gnome_canvas_item_raise_to_top( GNOME_CANVAS_ITEM(mod->grp) ); #endif ! // exterimental: creates a menu of models ! gui_add_tree_item( mod ); ! } PRINT_DEBUG3( "finished model %d.%d(%s)", |