Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
9dae5d5d
Commit
9dae5d5d
authored
16 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
change table add to do the style copy itself.
parent
11ea45be
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zmapWindow/zmapWindowUtils.c
+20
-11
20 additions, 11 deletions
src/zmapWindow/zmapWindowUtils.c
with
20 additions
and
11 deletions
src/zmapWindow/zmapWindowUtils.c
+
20
−
11
View file @
9dae5d5d
...
...
@@ -26,9 +26,9 @@
*
* Exported functions: See ZMap/zmapWindow.h
* HISTORY:
* Last edited:
Dec 10 17:51
200
8
(edgrif)
* Last edited:
Feb 6 14:13
200
9
(edgrif)
* Created: Thu Jan 20 14:43:12 2005 (edgrif)
* CVS info: $Id: zmapWindowUtils.c,v 1.4
5
200
8-12-11 09:44:2
2 edgrif Exp $
* CVS info: $Id: zmapWindowUtils.c,v 1.4
6
200
9-02-06 14:22:0
2 edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -278,9 +278,13 @@ void zMapWindowGetVisible(ZMapWindow window, double *top_out, double *bottom_out
/*
* Style table functions
*
*/
/* Set of functions for managing hash tables of styles for features. Each column in zmap has
* a hash table of styles for all the features it displays. */
GHashTable
*
zmapWindowStyleTableCreate
(
void
)
{
GHashTable
*
style_table
=
NULL
;
...
...
@@ -291,24 +295,27 @@ GHashTable *zmapWindowStyleTableCreate(void)
}
/* Adds a style to the list of feature styles using the styles unique_id as the key.
/* Adds a
_copy_ of the
style to the list of feature styles using the styles unique_id as the key.
* NOTE that if the style is already there it is not added as this would overwrite
* the existing style. */
gboolean
zmapWindowStyleTableAdd
(
GHashTable
*
style_table
,
ZMapFeatureTypeStyle
new_style
)
* the existing style.
*
* If the style was there or was added successfully then a pointer to the style is returned,
* otherwise NULL is returned.
* */
ZMapFeatureTypeStyle
zmapWindowStyleTableAddCopy
(
GHashTable
*
style_table
,
ZMapFeatureTypeStyle
new_style
)
{
gboolean
result
=
FALSE
;
ZMapFeatureTypeStyle
style
;
ZMapFeatureTypeStyle
style
=
NULL
;
zMapAssert
(
style_table
&&
new_style
)
;
if
(
!
(
style
=
g_hash_table_lookup
(
style_table
,
GINT_TO_POINTER
(
zMapStyleGetUniqueID
(
new_style
)))))
{
g_hash_table_insert
(
style_table
,
GINT_TO_POINTER
(
zMapStyleGetUniqueID
(
new_style
)),
new_style
)
;
style
=
zMapFeatureStyleCopy
(
new_style
)
;
result
=
TRUE
;
g_hash_table_insert
(
style_table
,
GINT_TO_POINTER
(
zMapStyleGetUniqueID
(
new_style
)),
style
)
;
}
return
result
;
return
style
;
}
...
...
@@ -354,6 +361,8 @@ void zmapWindowStyleTableDestroy(GHashTable *style_table)
}
char
*
zmapWindowGetDialogText
(
ZMapWindowDialogType
dialog_type
)
{
char
*
dialog_text
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment