summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-01-09 09:51:23 +0000
committerNorbert Preining <preining@logic.at>2008-01-09 09:51:23 +0000
commit8fd0661535168fd7720c263009507890c2b5ae3c (patch)
treeaeade97d0ff9045b0a77698957b1ba50e800b856 /Master/tlpkg
parentea341a12e816631bdc6442ab40ec46c50ec368ed (diff)
start on tk menu system
git-svn-id: svn://tug.org/texlive/trunk@6162 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/TeXLive/install-menu-perltk.pl44
1 files changed, 44 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/install-menu-perltk.pl b/Master/tlpkg/TeXLive/install-menu-perltk.pl
new file mode 100644
index 00000000000..adc8c064bd0
--- /dev/null
+++ b/Master/tlpkg/TeXLive/install-menu-perltk.pl
@@ -0,0 +1,44 @@
+#!/usr/bin/env perl
+#
+# $Id$
+#
+# Copyright 2008 Norbert Preining
+# This file is licensed under the GNU General Public License version 2
+# or any later version.
+#
+# This file WILL implements the text based menu system for the TeX Live installer.
+#
+
+our %vars;
+our $tlpdb;
+our @collections_std;
+our @collections_lang;
+our @collections_lang_doc;
+our $texlive_release;
+our $trynet;
+our $max_bins_on_CD;
+
+our $MENU_INSTALL = 0;
+our $MENU_ABORT = 1;
+our $MENU_QUIT = 2;
+
+my $return = $MENU_INSTALL;
+
+require Tk;
+
+sub run_menu {
+ my $mw = MainWindow->new;
+ $mw->Label(-text => 'Hello, world!')->pack;
+ $mw->Button(
+ -text => 'Quit',
+ -command => sub { $return = $MENU_QUIT; $mw->destroy },
+ )->pack;
+ $mw->Button(
+ -text => 'Cancel',
+ -command => sub { $return = $MENU_ABORT; $mw->destroy }
+ )->pack;
+ Tk::MainLoop();
+ print "return value = $return\n";
+ return $MENU_ABORT;
+}
+