function addIconFile(ext, varargin)
%ADDICONFILE Add the icon file to the database of icons.
%   uiscopes.addIconFile(ext, Filename1, Filename2, etc.) add any number of
%   icon files to the database of icons.  The icon files must be valid
%   MAT-files storing the icons at the base level of the file.

%   Copyright 2012 The MathWorks, Inc.

icons = getAppData(ext, 'Core', 'General UI', 'Icons');

newIcons = spcwidgets.LoadIconFiles(varargin{:});

fn = fieldnames(newIcons);
for indx = 1:numel(fn)
    icons.(fn{indx}) = newIcons.(fn{indx});
end

setAppData(ext, 'Core', 'General UI', 'Icons', icons);

% [EOF]
