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
7a57a8f3
Commit
7a57a8f3
authored
15 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
move predefined styles stuff to zmapView, seems more correct there.
parent
b93efce5
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/zmapServer/zmapServerProtocolHandler.c
+10
-50
10 additions, 50 deletions
src/zmapServer/zmapServerProtocolHandler.c
with
10 additions
and
50 deletions
src/zmapServer/zmapServerProtocolHandler.c
+
10
−
50
View file @
7a57a8f3
...
...
@@ -25,9 +25,9 @@
* Description:
* Exported functions: See ZMap/zmapServerProtocol.h
* HISTORY:
* Last edited:
Apr 16 10:09
2009 (edgrif)
* Last edited:
Jun 12 08:47
2009 (edgrif)
* Created: Thu Jan 27 13:17:43 2005 (edgrif)
* CVS info: $Id: zmapServerProtocolHandler.c,v 1.4
1
2009-0
4
-1
6
0
9:11
:2
7
edgrif Exp $
* CVS info: $Id: zmapServerProtocolHandler.c,v 1.4
2
2009-0
6
-1
2
0
7:49
:2
4
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -727,11 +727,6 @@ static gboolean getStylesFromFile(char *styles_list, char *styles_file, GData **
gboolean
result
=
FALSE
;
GData
*
styles
=
NULL
;
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
if
(
zMapFileAccess
(
styles_file
,
"r"
)
&&
!
(
styles
=
zMapFeatureTypeGetFromFile
(
styles_list
,
styles_file
)))
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
if
((
styles
=
zMapFeatureTypeGetFromFile
(
styles_list
,
styles_file
)))
{
*
styles_out
=
styles
;
...
...
@@ -753,8 +748,6 @@ ZMapThreadReturnCode getStyles(ZMapServer server, ZMapServerReqStyles styles, ch
if
(
thread_rc
==
ZMAPTHREAD_RETURNCODE_OK
)
{
/* I THINK WE NEED TO GET THE PREDEFINED HERE FIRST AND THEN MERGE.... */
/* If there's a styles file get the styles from that, otherwise get them from the source.
* At the moment we don't merge styles from files and sources, perhaps we should... */
if
(
styles
->
styles_list_in
&&
styles
->
styles_file_in
)
...
...
@@ -771,16 +764,6 @@ ZMapThreadReturnCode getStyles(ZMapServer server, ZMapServerReqStyles styles, ch
thread_rc
=
ZMAPTHREAD_RETURNCODE_REQFAIL
;
}
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
else
{
*
err_msg_out
=
g_strdup
(
"No styles available."
)
;
thread_rc
=
ZMAPTHREAD_RETURNCODE_REQFAIL
;
}
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
if
(
thread_rc
==
ZMAPTHREAD_RETURNCODE_OK
)
{
...
...
@@ -803,22 +786,21 @@ ZMapThreadReturnCode getStyles(ZMapServer server, ZMapServerReqStyles styles, ch
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
/* Some styles are predefined and do not have to be in the server,
* do a merge of styles from the server with these predefined ones. */
tmp_styles
=
zMapStyleGetAllPredefined
()
;
tmp_styles
=
zMapStyleMergeStyles
(
tmp_styles
,
styles
->
styles_out
,
ZMAPSTYLE_MERGE_MERGE
)
;
tmp_styles
=
styles
->
styles_out
;
/* dummy code for now.... */
zMapStyleDestroyStyles
(
&
(
styles
->
styles_out
))
;
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
zMapStyleSetPrintAll
(
tmp_styles
,
"Before inherit"
)
;
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
/* Now we have all the styles do the inheritance for them all. */
if
(
!
zMapStyleInheritAllStyles
(
&
(
tmp_styles
)))
zMapLogWarning
(
"%s"
,
"There were errors in inheriting styles."
)
;
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
zMapStyleSetPrintAll
(
tmp_styles
,
"After inherit"
)
;
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
...
...
@@ -839,8 +821,9 @@ ZMapThreadReturnCode getStyles(ZMapServer server, ZMapServerReqStyles styles, ch
thread_rc
=
ZMAPTHREAD_RETURNCODE_REQFAIL
;
}
else
if
(
missing_styles
)
g_free
(
missing_styles
);
/* haveRequiredStyles return == TRUE doesn't mean missing_styles == NULL */
{
g_free
(
missing_styles
);
/* haveRequiredStyles return == TRUE doesn't mean missing_styles == NULL */
}
/* Find out if the styles will need to have their mode set from the features.
* I'm feeling like this is a bit hacky because it's really an acedb issue. */
...
...
@@ -855,30 +838,6 @@ ZMapThreadReturnCode getStyles(ZMapServer server, ZMapServerReqStyles styles, ch
}
}
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
/* AGH...I KNOW...BECAUSE IT SETS MODE....SIGH..... */
/* TRY THIS HERE.. IN OPENSERV...IT CAME AT THE END...NOT SURE WHY.... */
/* Make styles drawable.....if they are set to displayable..... */
if
(
thread_rc
==
ZMAPTHREAD_RETURNCODE_OK
)
{
if
(
!
makeStylesDrawable
(
tmp_styles
,
&
missing_styles
))
{
*
err_msg_out
=
g_strdup_printf
(
"Failed to make following styles drawable: %s"
,
missing_styles
)
;
thread_rc
=
ZMAPTHREAD_RETURNCODE_REQFAIL
;
}
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
zMapFeatureTypePrintAll
(
context
->
context
->
styles
,
"After makeStylesDrawable"
)
;
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
}
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
/* return the styles in the styles struct... */
styles
->
styles_out
=
tmp_styles
;
...
...
@@ -888,3 +847,4 @@ ZMapThreadReturnCode getStyles(ZMapServer server, ZMapServerReqStyles styles, ch
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