Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TSG QC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
US191
TSG QC
Commits
fd17b33b
Commit
fd17b33b
authored
Mar 13, 2008
by
jacques.grelet_ird.fr
Browse files
Options
Downloads
Patches
Plain Diff
met fid =-2 pour desactiver la gestion des preferences
parent
62619e4d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tsg_util/tsg_preferences.m
+90
-62
90 additions, 62 deletions
tsg_util/tsg_preferences.m
with
90 additions
and
62 deletions
tsg_util/tsg_preferences.m
+
90
−
62
View file @
fd17b33b
...
...
@@ -16,29 +16,57 @@ function tsg_preferences(hTsgGUI, app_name, DEFAULT_PATH_FILE)
% $Id$
%
% global variable VERSION, update revision number when tsg structure change
% -------------------------------------------------------------------------
global
VERSION
% init empty tsg structure
% ------------------------
tsg
=
[];
% Construct config file path
% --------------------------
config_file
=
[
prefdir
,
filesep
,
app_name
,
'.mat'
];
% Open config file
% ----------------
% config = fopen( config_file, 'r' );
config
=
-
1
;
% desactive la gestion des preferences, car la classe tsg.qc.hash (tsg_nc)
% est transformee en structure lors de l'ecriture, a verifier
% -----------------------------------------------------------
% fid = fopen( config_file, 'r' );
fid
=
-
2
;
% test fopen return value
% -----------------------
if
config
==
-
1
switch
fid
% call new config private function
% ---------------------------------
% preference file is missing
% --------------------------
case
-
1
% create new tsg structure and save it to appdata
% -----------------------------------------------
new_config
;
else
% disactive the preference mode (for test or bug)
% -----------------------------------------------
case
-
2
% init root structure to default values
% -------------------------------------
root
.
preference
.
autoload
=
'off'
;
root
.
version
=
VERSION
;
% call default tsg_initialisation
% -------------------------------
tsg_initialisation
(
hTsgGUI
);
% save root in root object for next use
% -------------------------------------
set
(
0
,
'userdata'
,
root
);
return
;
% file exist and is open, fid > 2
% -------------------------------
otherwise
% Pointer set to watch during loading preference file
% ---------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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
sign in
to comment