summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Dupont <sdupont@mandriva.com>2001-10-23 10:02:44 +0000
committerSebastien Dupont <sdupont@mandriva.com>2001-10-23 10:02:44 +0000
commitf7989ab12e3439e6873afdf230d3e17347dd002c (patch)
tree5bb1b7b6b7cc46a34047e3be2858b67cc71bb850
parent4fd1a2e4b25b726090f5fffa0010517c1aa058bc (diff)
downloaddrakx-f7989ab12e3439e6873afdf230d3e17347dd002c.tar
drakx-f7989ab12e3439e6873afdf230d3e17347dd002c.tar.gz
drakx-f7989ab12e3439e6873afdf230d3e17347dd002c.tar.bz2
drakx-f7989ab12e3439e6873afdf230d3e17347dd002c.tar.xz
drakx-f7989ab12e3439e6873afdf230d3e17347dd002c.zip
gui supported.
-rwxr-xr-xperl-install/standalone/drakfont64
1 files changed, 61 insertions, 3 deletions
diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont
index 9d069f607..0bae27d0d 100755
--- a/perl-install/standalone/drakfont
+++ b/perl-install/standalone/drakfont
@@ -46,8 +46,8 @@
use Gtk;
use lib qw(/usr/lib/libDrakX);
-#use interactive;
-#use standalone;
+use interactive;
+use standalone;
use my_gtk qw(:helpers :wrappers);
use common;
use strict;
@@ -70,7 +70,7 @@ if ("@ARGV" =~ /--help|-h/) {
exit(0);
}
-my $xlsfonts;
+my $xlsfonts = 0;
my $windows;
my $strong;
my $replace;
@@ -347,6 +347,12 @@ sub remove_fonts {
}
+sub lisence_msg {
+ print _("Before installing any fonts, be sure that you have the right to use and install them on your system.\n\n-You can install the fonts using the normal way. In rare cases, bogus fonts may hang up your X Server.\n-You can install the fonts with strong verification. In this case, bogus fonts won't be installed, but some useable fonts won't be too.\n\nIf you have many fonts, or exotic fonts, I recommend strong verification mode.")."\n";
+}
+
+
+
$xlsfonts || $windows || @install || @uninstall ? backend_mod() : interactive_mode();
@@ -355,6 +361,7 @@ sub backend_mod {
system ("xlsfonts");
}
if ($windows) {
+ lisence_msg();
print "........Windows fonts Installation........\n\n";
search_installed_fonts();
if(search_windows_font()) {
@@ -365,6 +372,7 @@ sub backend_mod {
}
if (@install) {
+ lisence_msg();
print ".......Install Specifics Fonts...........\n\n";
search_installed_fonts();
search_dir_font $_ foreach (@install);
@@ -375,6 +383,7 @@ sub backend_mod {
}
if (@uninstall) {
+ lisence_msg();
print "........Uninstall Specifics Fonts........\n\n";
search_installed_fonts_full_path();
search_dir_font_uninstall $_ foreach (@uninstall);
@@ -384,10 +393,59 @@ sub backend_mod {
}
sub interactive_mode {
+
+init Gtk;
+
+my $window1 = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel;
+$window1->signal_connect ( delete_event => sub { Gtk->exit(0); });
+$window1->set_position(1);
+$window1->set_title(_("Network Monitoring"));
+$window1->set_policy(1, 1, 1);
+$window1->set_border_width(5);
+
+my $netcnx = {};
+my $doit;
+
+sub main_quit {}
+
+gtkadd($window1,
+ gtkpack_(new Gtk::HBox(0,6),
+ 1, my $notebook = new Gtk::FontSelection,
+ 0, gtkadd(gtkset_layout(new Gtk::VButtonBox, -end),
+ _("DrakFont"),
+ gtksignal_connect(new Gtk::Button(_("Windows Importation")), clicked => sub { $doit=1; Gtk->main_quit() }),
+ gtksignal_connect(new Gtk::Button(_("Advanced Importation")), clicked => sub { Gtk->main_quit() }),
+ gtksignal_connect(new Gtk::Button(_("Uninstall Fonts")), clicked => sub { Gtk->main_quit() }),
+ gtksignal_connect(new Gtk::Button(_("Close")), clicked => sub { Gtk->main_quit() }),
+ )
+ ),
+ );
+
+
+sub test {
+ print "test\n";
+
+}
+
+$window1->show_all;
+$window1->realize;
+$window1->show_all();
+Gtk->main;
+Gtk->exit(0);
+
+
#gtk
}
+
+
+
+
+
+
# interface graphique a faire
# option strong: verifier strong ttmkfdir -c ???
# gestion abiword, netscape, gimp....
# xlsfonts | less pour verifier l'installation des polices.
+
+