INTEGRATION: CWS c05v001 (1.9.22); FILE MERGED

2005/09/26 13:58:15 is 1.9.22.1: #125914# new startmenu entries for deinstallation and html files
This commit is contained in:
Kurt Zenker 2005-11-11 13:18:42 +00:00
parent 3301852b97
commit 0617951927

View file

@ -4,9 +4,9 @@
#
# $RCSfile: shortcut.pm,v $
#
# $Revision: 1.10 $
# $Revision: 1.11 $
#
# last change: $Author: rt $ $Date: 2005-09-08 09:22:05 $
# last change: $Author: kz $ $Date: 2005-11-11 14:18:42 $
#
# The Contents of this file are made available subject to
# the terms of GNU Lesser General Public License Version 2.1.
@ -158,6 +158,13 @@ sub get_shortcut_component
my $found = 0;
my $shortcut_fileid = $shortcut->{'FileID'};
my $absolute_filename = 0;
if ( $shortcut->{'Styles'} ) { $styles = $shortcut->{'Styles'}; }
if ( $styles =~ /\bABSOLUTE_FILENAME\b/ ) { $absolute_filename = 1; } # FileID contains an absolute filename
# if the FileID contains an absolute filename, therefore the entry for "ComponentIDFile" has to be used.
if ( $absolute_filename ) { $shortcut_fileid = $shortcut->{'ComponentIDFile'}; }
for ( my $i = 0; $i <= $#{$filesref}; $i++ )
{
$onefile = ${$filesref}[$i];
@ -377,6 +384,7 @@ sub get_folderitem_directory
########################################################################
# Returning the target (feature) for a folderitem for shortcut table.
# For non-advertised shortcuts this is a formatted string.
########################################################################
sub get_folderitem_target
@ -388,6 +396,20 @@ sub get_folderitem_target
my $found = 0;
my $shortcut_fileid = $shortcut->{'FileID'};
my $styles = "";
my $nonadvertised = 0;
my $absolute_filename = 0;
if ( $shortcut->{'Styles'} ) { $styles = $shortcut->{'Styles'}; }
if ( $styles =~ /\bNON_ADVERTISED\b/ ) { $nonadvertised = 1; } # this is a non-advertised shortcut
if ( $styles =~ /\bABSOLUTE_FILENAME\b/ ) { $absolute_filename = 1; } # FileID contains an absolute filename
# if the FileID contains an absolute filename this can simply be returned as target for the shortcut table.
if ( $absolute_filename )
{
$shortcut->{'target'} = $shortcut_fileid;
return $shortcut_fileid;
}
for ( my $i = 0; $i <= $#{$filesref}; $i++ )
{
$onefile = ${$filesref}[$i];
@ -405,6 +427,16 @@ sub get_folderitem_target
installer::exiter::exit_program("ERROR: Did not find FileID $shortcut_fileid in file collection for folderitem", "get_folderitem_target");
}
# Non advertised shortcuts do not return the feature, but the path to the file
if ( $nonadvertised )
{
$target = "\[" . $onefile->{'uniquedirname'} . "\]" . "\\" . $onefile->{'Name'};
$shortcut->{'target'} = $target;
return $target;
}
# the rest only for advertised shortcuts, which contain the feature in the shortcut table.
if ( $onefile->{'modules'} ) { $target = $onefile->{'modules'}; }
# If modules contains a list of modules, only taking the first one.
@ -446,6 +478,10 @@ sub get_folderitem_icon
{
my ($shortcut, $filesref, $iconfilecollector) = @_;
my $styles = "";
if ( $shortcut->{'Styles'} ) { $styles = $shortcut->{'Styles'}; }
if ( $styles =~ /\bNON_ADVERTISED\b/ ) { return ""; } # no icon for non-advertised shortcuts
my $iconfilegid = "";
if ( $shortcut->{'IconFile'} ) { $iconfilegid = $shortcut->{'IconFile'}; }
@ -493,6 +529,10 @@ sub get_folderitem_iconindex
{
my ($shortcut) = @_;
my $styles = "";
if ( $shortcut->{'Styles'} ) { $styles = $shortcut->{'Styles'}; }
if ( $styles =~ /\bNON_ADVERTISED\b/ ) { return ""; } # no iconindex for non-advertised shortcuts
my $iconid = 0;
if ( $shortcut->{'IconID'} ) { $iconid = $shortcut->{'IconID'}; }