From 5cf350fa281febcc2046818926344c09842fdedc Mon Sep 17 00:00:00 2001 From: Andreas Proschofsky Date: Sat, 24 Sep 2005 08:07:22 +0000 Subject: [PATCH] update for the wrapper Package-Manager: portage-2.0.52-r1 --- app-office/openoffice-bin/Manifest | 2 +- .../openoffice-bin/files/1.9/ooo-wrapper2 | 70 +++++++------------ 2 files changed, 26 insertions(+), 46 deletions(-) diff --git a/app-office/openoffice-bin/Manifest b/app-office/openoffice-bin/Manifest index a661461cfd89..6af6b4771754 100644 --- a/app-office/openoffice-bin/Manifest +++ b/app-office/openoffice-bin/Manifest @@ -10,7 +10,7 @@ MD5 2b70af485f57d1db6983b006f16a0587 files/digest-openoffice-bin-1.1.1 171 MD5 5828bbd9e0139dae2ff43c23a65a844b files/digest-openoffice-bin-1.1.5 82 MD5 ff3f24d27e7a0cf0b541503caeedc201 files/digest-openoffice-bin-1.9.128 2688 MD5 c8d7b48fff85b181fcb793aab5a23b67 files/digest-openoffice-bin-1.9.130 2760 -MD5 2ae2e1567fa01ef52c0c5234339f6c8f files/1.9/ooo-wrapper2 4878 +MD5 5dda7100c72b8c59a43001c9a39fba77 files/1.9/ooo-wrapper2 3950 MD5 4b2f3102e273ff72e281ed0d481b1526 files/1.1.1/ooffice-wrapper-1.3 9166 MD5 4045e7a45d5209ff0ac93c5c5db0114b files/1.1.4/ooffice-wrapper-1.3 6659 MD5 475dbfca78a66962143b39d3aac7915a files/1.1.5/ooffice-wrapper-1.3 6659 diff --git a/app-office/openoffice-bin/files/1.9/ooo-wrapper2 b/app-office/openoffice-bin/files/1.9/ooo-wrapper2 index f7ee2e0ea9ba..8222add9ae93 100644 --- a/app-office/openoffice-bin/files/1.9/ooo-wrapper2 +++ b/app-office/openoffice-bin/files/1.9/ooo-wrapper2 @@ -54,16 +54,11 @@ if ($Debug && $BinSuffix =~ /^\@/) { # Parse command line arguments my @ooo_argv; my $session_quickstart; -my $icons_set; my $widgets_set; while ($ARGV[0]) { $_ = shift; if (m/^--session-quickstart/) { $session_quickstart = 1; - } elsif (m/^--icons-set/) { - $icons_set = shift; - (defined $icons_set) || die "Error: The option --icons-set requires a value\n" . - "For example: --icons-set kde\n"; } elsif (m/^--widgets-set/) { $widgets_set = shift; (defined $widgets_set) || die "Error: The option --widgets-set requires a value\n" . @@ -96,52 +91,37 @@ if (defined $widgets_set) { $ENV{SAL_USE_VCLPLUGIN} = $widgets_set; } -# select the preferred icons set by the running windowmanager -unless (defined $icons_set) { - if ((exists $ENV{GNOME_DESKTOP_SESSION_ID}) && (-d "$SystemInstallDir/program/resource.gnome")) { - $icons_set="gnome"; - } elsif ((exists $ENV{KDE_FULL_SESSION}) && (-d "$SystemInstallDir/program/resource.kde")) { - $icons_set="kde"; - } - - if (not defined $icons_set) { - if ((exists $ENV{WINDOWMANAGER}) && (-d "$SystemInstallDir/program/resource.kde") && - ("$ENV{WINDOWMANAGER}" =~ ".*kde\$")) { - $icons_set="kde"; - } elsif ((exists $ENV{WINDOWMANAGER}) && (-d "$SystemInstallDir/program/resource.gnome") && - ("$ENV{WINDOWMANAGER}" =~ ".*gnome\$")) { - $icons_set="gnome"; - } elsif (-d "$SystemInstallDir/program/resource.default") { - $icons_set="default"; - } elsif (-d "$SystemInstallDir/program/resource.kde") { - $icons_set="kde"; - } elsif (-d "$SystemInstallDir/program/resource.gnome") { - $icons_set="gnome"; - } else { - $icons_set="default"; - } - } -} - -# FIXME - re-enable for icon .zip files in due course -# if (defined $icons_set) { -# if (-d "$SystemInstallDir/program/resource.$icons_set") { -# $ENV{OOO_PREFERRED_RESOURCE_PATH} = "$SystemInstallDir/program/resource.$icons_set"; -# } else { -# print STDERR "\n\n --- Warning - Your installation of OpenOffice.org does not provide\n"; -# print STDERR " the selected icons set \"$icons_set\". ---\n\n\n"; -# } -# } - -if (defined $widgets_set) { - $ENV{SAL_USE_VCLPLUGIN} = $widgets_set; -} +# overcome ghastly up-stream evilness +$ENV{SAL_NOEXPANDFPICKER}='TRUE'; if ($session_quickstart) { $Debug && print "Execute quickstarter\n"; push @ooo_argv, '-quickstart'; } +# FIXME: the following two fixes should be done by OOo itself +# create the user config directory with safe rights 700 if it we find +# the right path and the directory does not exist +if (open BOOTSTRAPRC, "/usr/lib/openoffice/program/bootstraprc") { + while (my $line = ) { + chomp $line; + if (($line =~ m/^\s*UserInstallation\s*=\s*([^\s]*)\s*$/) && ($1)) { + my $userConfDir=$1; + $userConfDir =~ s|\$SYSUSERCONFIG|$ENV{HOME}|; + $userConfDir =~ s|file://||; + mkdir ($userConfDir,0700) unless (-d $userConfDir); + last; + } + } + close BOOTSTRAPRC; +} +# touch ~/.recently-used with safe rights 700 if it does not exist +if (! -f "$ENV{HOME}/.recently-used") { + open (RECENTLY_USED, ">$ENV{HOME}/.recently-used") && + close RECENTLY_USED && + chmod 0600, "$ENV{HOME}/.recently-used"; +} + if (!(-f '/proc/version')) { print STDERR "\n\n --- Warning - OO.o will not work without a mounted /proc filesystem --- \n\n\n"; } -- 2.26.2