rem: op = WMGetOpenPanel(WMWidgetScreen(panel->pbrowB)); if (WMRunModalOpenPanelForDirectory(op, NULL, "/usr/local", NULL, NULL)) {
add: op = WMGetOpenPanel(WMWidgetScreen(panel->pbrowB)); if (WMRunModalFilePanelForDirectory(op, NULL, "/usr/local", NULL, NULL)) {
context: buttonCallback(WMWidget *self, void *data){  _TexturePanel *panel = (_TexturePanel*)data;  char *text, *color;  WMOpenPanel *op;  int itemRow;    WMSetButtonEnabled(panel->okB, True);    /* Global Buttons */  if (self == panel->okB) {    if (panel->okAction) {      (*panel->okAction)(self, panel->okData);    } else {     wwarning ("Texture panel OK button undefined");    }  } else if (self == panel->cancB) {    if (panel->cancelAction) {      (*panel->cancelAction)(self, panel->cancelData);    } else {     wwarning ("Texture panel CANCEL button undefined");    }  } else if (self == panel->tsoliB) {    WMMapWidget(panel->scolorF);    WMUnmapWidget(panel->gcolorF);    WMUnmapWidget(panel->gdirF);    WMUnmapWidget(panel->pimagF);    WMUnmapWidget(panel->pcolorF);    WMUnmapWidget(panel->pmodeF);	  } else if (self == panel->tgradB) {    WMMapWidget(panel->gcolorF);    WMMapWidget(panel->gdirF);    WMUnmapWidget(panel->scolorF);    WMUnmapWidget(panel->pimagF);    WMUnmapWidget(panel->pcolorF);    WMUnmapWidget(panel->pmodeF);  } else if (self == panel->tpixmB) {    WMMapWidget(panel->pimagF);    WMMapWidget(panel->pcolorF);    WMMapWidget(panel->pmodeF);    WMUnmapWidget(panel->gcolorF);    WMUnmapWidget(panel->gdirF);    WMUnmapWidget(panel->scolorF);        text = WMGetTextFieldText(panel->pimagT);    if (!strlen(text)) {      WMSetButtonEnabled(panel->okB, False);    }    free(text);    /* Gradient Panel Buttons */  } else if (self == panel->gaddB) {    color = WMGetColorWellRGBString(panel->gcolorW);    itemRow = WMGetListSelectedItemRow(panel->gcolorLs);    WMInsertListItem(panel->gcolorLs,itemRow, color);    free(color);    renderTextureButtons(panel);  } else if (self == panel->gremB) {    if (WMGetListNumberOfRows(panel->gcolorLs) != 1) {      itemRow = WMGetListSelectedItemRow(panel->gcolorLs);      WMRemoveListItem(panel->gcolorLs,itemRow);      renderTextureButtons(panel);    }      } else if (self == panel->gupdB) {    color = WMGetColorWellRGBString(panel->gcolorW);    itemRow = WMGetListSelectedItemRow(panel->gcolorLs);    WMRemoveListItem(panel->gcolorLs,itemRow);    WMInsertListItem(panel->gcolorLs,itemRow, color);    free(color);    renderTextureButtons(panel);  /* Pixmap Panel Buttons */    } else if (self == panel->pbrowB) {        op = WMGetOpenPanel(WMWidgetScreen(panel->pbrowB));        if (WMRunModalOpenPanelForDirectory(op, NULL, "/usr/local", NULL, NULL)) {      char *path;      path = WMGetFilePanelFileName(op);      WMSetTextFieldText(panel->pimagT, path);      if (strlen(path)) {	WMSetButtonEnabled(panel->okB, True);      }      free(path);      }    WMFreeFilePanel(op);  }  }