diff --git a/src/zmapWindow/zmapWindowFeature.c b/src/zmapWindow/zmapWindowFeature.c index 04464d2b98aac6974fe1a731b1fbf91a1b22c2d3..0e7e942e8d6295393a751b20d29a8f58c58d1369 100755 --- a/src/zmapWindow/zmapWindowFeature.c +++ b/src/zmapWindow/zmapWindowFeature.c @@ -28,9 +28,9 @@ * * Exported functions: See zmapWindow_P.h * HISTORY: - * Last edited: Apr 27 14:58 2009 (edgrif) + * Last edited: May 8 15:17 2009 (edgrif) * Created: Mon Jan 9 10:25:40 2006 (edgrif) - * CVS info: $Id: zmapWindowFeature.c,v 1.158 2009-04-28 14:33:40 edgrif Exp $ + * CVS info: $Id: zmapWindowFeature.c,v 1.159 2009-05-08 14:43:03 edgrif Exp $ *------------------------------------------------------------------- */ @@ -551,23 +551,41 @@ char *zmapWindowFeatureSetDescription(ZMapFeatureSet feature_set) } - -/* Get the features text stuff... */ -char *zmapWindowFeatureSourceDescription(ZMapFeature feature) +void zmapWindowFeatureGetSetTxt(ZMapFeature feature, char **set_name_out, char **set_description_out) { - char *description = NULL ; + if (feature->parent) + { + ZMapFeatureSet feature_set = (ZMapFeatureSet)feature->parent ; - zMapAssert(zMapFeatureIsValid((ZMapFeatureAny)feature)) ; + *set_name_out = g_strdup(g_quark_to_string(feature_set->original_id)) ; - description = g_strdup_printf("%s : %s%s%s", (char *)g_quark_to_string(feature->source_id), - feature->source_text ? "\"" : "", - feature->source_text ? (char *)g_quark_to_string(feature->source_text) - : "<no description available>", - feature->source_text ? "\"" : "") ; + if (feature_set->description) + *set_description_out = g_strdup(feature_set->description) ; + } - return description ; + return ; } + + + + +/* Get various aspects of features source... */ +void zmapWindowFeatureGetSourceTxt(ZMapFeature feature, char **source_name_out, char **source_description_out) +{ + if (feature->source_id) + *source_name_out = g_strdup(g_quark_to_string(feature->source_id)) ; + + if (feature->source_text) + *source_description_out = g_strdup(g_quark_to_string(feature->source_text)) ; + + return ; +} + + + + + char *zmapWindowFeatureDescription(ZMapFeature feature) { char *description = NULL ; diff --git a/src/zmapWindow/zmapWindow_P.h b/src/zmapWindow/zmapWindow_P.h index affbe1c63b866bbb9fac5419410bc00ad164c655..231a76f585d20c742c5d44d33673dd943dd15afc 100755 --- a/src/zmapWindow/zmapWindow_P.h +++ b/src/zmapWindow/zmapWindow_P.h @@ -25,9 +25,9 @@ * Description: Defines internal interfaces/data structures of zMapWindow. * * HISTORY: - * Last edited: May 7 12:10 2009 (rds) + * Last edited: May 8 15:42 2009 (edgrif) * Created: Fri Aug 1 16:45:58 2003 (edgrif) - * CVS info: $Id: zmapWindow_P.h,v 1.242 2009-05-07 21:36:37 rds Exp $ + * CVS info: $Id: zmapWindow_P.h,v 1.243 2009-05-08 14:43:03 edgrif Exp $ *------------------------------------------------------------------- */ #ifndef ZMAP_WINDOW_P_H @@ -1162,6 +1162,8 @@ FooCanvasItem *zmapWindowFeatureDrawScaled(ZMapWindow window, char *zmapWindowFeatureSetDescription(ZMapFeatureSet feature_set) ; char *zmapWindowFeatureSourceDescription(ZMapFeature feature) ; +void zmapWindowFeatureGetSetTxt(ZMapFeature feature, char **set_name_out, char **set_description_out) ; +void zmapWindowFeatureGetSourceTxt(ZMapFeature feature, char **source_name_out, char **source_description_out) ; char *zmapWindowFeatureDescription(ZMapFeature feature) ; void zmapWindowFeatureHighlightDNA(ZMapWindow window, ZMapFeature Feature, FooCanvasItem *item);