diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/Makefile.config | 2 | ||||
-rw-r--r-- | perl-install/NEWS | 2 | ||||
-rwxr-xr-x | perl-install/standalone/display_help | 66 |
3 files changed, 69 insertions, 1 deletions
diff --git a/perl-install/Makefile.config b/perl-install/Makefile.config index 030152699..68ddecdec 100644 --- a/perl-install/Makefile.config +++ b/perl-install/Makefile.config @@ -9,7 +9,7 @@ SO_FILES = c/blib/arch/auto/c/c.so PMS_DIRS = c diskdrake harddrake interactive modules partition_table resize_fat security fs fs/remote PMS = *.pm $(PMS_DIRS:%=%/*.pm) install/*.pm install/help/*.pm install/commands install/install2 -STANDALONEPMS_ = adduserdrake bootloader-config diskdrake drakauth drakboot drakbug drakbug_report drakclock drakedm drakdvb drakfont drakhelp drakperm draksec draksound draksplash drakupdate_fstab drakups drakxservices drakxtv fileshareset finish-install harddrake2 localedrake logdrake lsnetdrake notify-x11-free-driver-switch remove-unused-packages scannerdrake service_harddrake service_harddrake_confirm +STANDALONEPMS_ = adduserdrake bootloader-config display_help diskdrake drakauth drakboot drakbug drakbug_report drakclock drakedm drakdvb drakfont drakhelp drakperm draksec draksound draksplash drakupdate_fstab drakups drakxservices drakxtv fileshareset finish-install harddrake2 localedrake logdrake lsnetdrake notify-x11-free-driver-switch remove-unused-packages scannerdrake service_harddrake service_harddrake_confirm STANDALONEPMS = $(STANDALONEPMS_:%=standalone/%) ALLPMS = $(PMS) $(STANDALONEPMS) diff --git a/perl-install/NEWS b/perl-install/NEWS index 5fc5aa2c7..cfc8da2eb 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,5 @@ +- display_help + o new small webkit based browser for rendering help and for FTW - harddrake: o fix detecting some memory card readers as unknown diff --git a/perl-install/standalone/display_help b/perl-install/standalone/display_help new file mode 100755 index 000000000..611a6a839 --- /dev/null +++ b/perl-install/standalone/display_help @@ -0,0 +1,66 @@ +#!/usr/bin/perl + +# DrakBoot +# $Id: display_release_notes 242795 2008-05-29 15:38:07Z tv $ +# Copyright (C) 2009 Mandriva +# Thierry Vignaud +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +use lib qw(/usr/lib/libDrakX); +use common; +use any; +use mygtk2 qw(gtknew); +use ugtk2 qw(:wrappers :create); +use Gtk2::WebKit; + +my $view = gtknew('WebKit_View'); + +$view->open($ARGV[0]); + +# FIXME: merge this with mcc code into new mygtk2::set_standalone_main_window_size()? +my ($rootwin_width, $rootwin_height) = gtkroot()->get_size; +my ($default_width, $default_height); +my $wm = any::running_window_manager(); + +if ($wm) { + # wide enough to embedd help snapshots: + $default_width = $rootwin_width <= 800 ? 720 : 840; + $default_height = $rootwin_height <= 480 ? 420 : $rootwin_height <= 600 ? 523 : 600; +} else { + # full screen mode for First Time Wizard and the like: + ($default_width, $default_height) = ($rootwin_width, $rootwin_height); +} + +# TODO: got XID from mcc/... ? (transient & modal hints?) +my $w = ugtk2->new(N("Help"), width => $default_width, height => $default_height); + +gtkadd($w->{rwindow}, + gtkpack_(Gtk2::VBox->new, + if_($wm, 0, gtknew('Title2', label => N("Help"))), + 0, Gtk2::HSeparator->new, + 1, create_scrolled_window(gtkset_border_width($view, 5), [ 'never', 'automatic' ]), + #1, gtknew('ScrolledWindow', child => $view, border_width => 5, h_policy => 'never'); + 0, Gtk2::HSeparator->new, + #if_($wm, # We have JavaScritp issues for now, so let's keep the "close" button: + 0, gtkpack(create_hbox('end'), + gtknew('Button', text => N("Close"), clicked => sub { Gtk2->main_quit }) + ), + #), + ), + ); + +$w->{real_window}->show_all; +$w->main; |