void workshop_frame_sensitivities( VerbSense *vs) /* list of verbs to (de)sensitize */ { VerbSense *vp; /* iterate through vs */ char *menu_name; /* used in menu lookup */ int cnt; /* count of verbs to skip */ int len; /* length of nonvariant part of command */ char cbuf[4096]; #ifdef WSDEBUG_TRACE if (WSDLEVEL(WS_TRACE_VERBOSE) || WSDLEVEL(4)) { wsdebug("workshop_frame_sensitivities(\n"); for (vp = vs; vp->verb != NULL; vp++) wsdebug("\t%-25s%d\n", vp->verb, vp->sense); wsdebug(")\n"); } else if (WSDLEVEL(WS_TRACE)) wstrace("workshop_frame_sensitivities()\n"); #endif #ifdef WSDEBUG_SENSE if (ws_debug) for (vp = vs; vp->verb != NULL; vp++) wsdebug("change: %-21.20s%-21.20s(%s)\n", "", vp->verb, vp->sense == 1 ? "Sensitive" : "Insensitive"); #endif /* * Look for all matching menu entries for the verb. There may be more * than one if the verb has both a menu and toolbar entry. */ for (vp = vs; vp->verb != NULL; vp++) { cnt = 0; strcpy(cbuf, "amenu"); strcat(cbuf, " "); strcat(cbuf, vp->sense ? "enable" : "disable"); strcat(cbuf, " "); len = strlen(cbuf); while ((menu_name = lookupVerb(vp->verb, cnt++)) != NULL) { strcpy(&cbuf[len], menu_name); coloncmd(cbuf, FALSE); } } gui_update_menus(0); gui_mch_flush(); }
//----------------------------------------------------------------------------- // gui_update () // Update the GUI //----------------------------------------------------------------------------- void gui_update (void) { t_list *boxes; // Update mous data gui_update_mouse (); // Theme effects (blood/snow/hearts) : saving data from the framebuffer if (Skins_GetCurrentSkin()->effect != SKIN_EFFECT_NONE) special_effects_update_before (); // Skins update Skins_Update(); // Menus update // Note: must be done before updating applets gui_update_menus (); // Boxes update (move / compute dirtyness) gui_update_boxes (); // Process box deletion for (boxes = gui.boxes; boxes != NULL; ) { t_gui_box *box = boxes->elem; boxes = boxes->next; if (box->flags & GUI_BOX_FLAGS_DELETE) gui_box_delete(box); } // Widgets update widgets_call_update (); // Call applets handlers // Note: Must be done after updating widgets gui_update_applets (); }