[Debian-live-changes] r2157 - in dists/trunk: . live-magic live-magic/debian live-magic/glade live-magic/pixmaps live-magic/src live-magic/src/controllers live-magic/src/model live-magic/src/views live-magic/tests

lamby-guest at alioth.debian.org lamby-guest at alioth.debian.org
Sun Jun 17 22:36:02 UTC 2007


Author: lamby-guest
Date: 2007-06-17 22:36:02 +0000 (Sun, 17 Jun 2007)
New Revision: 2157

Added:
   dists/trunk/live-magic/
   dists/trunk/live-magic/COPYING
   dists/trunk/live-magic/debian/
   dists/trunk/live-magic/debian/changelog
   dists/trunk/live-magic/debian/compat
   dists/trunk/live-magic/debian/control
   dists/trunk/live-magic/debian/copyright
   dists/trunk/live-magic/debian/rules
   dists/trunk/live-magic/glade/
   dists/trunk/live-magic/glade/main.glade
   dists/trunk/live-magic/pixmaps/
   dists/trunk/live-magic/pixmaps/debian_openlogo-nd-100.png
   dists/trunk/live-magic/src/
   dists/trunk/live-magic/src/controllers/
   dists/trunk/live-magic/src/controllers/__init__.py
   dists/trunk/live-magic/src/controllers/build.py
   dists/trunk/live-magic/src/controllers/hooks.py
   dists/trunk/live-magic/src/controllers/main.py
   dists/trunk/live-magic/src/main.py
   dists/trunk/live-magic/src/model/
   dists/trunk/live-magic/src/model/__init__.py
   dists/trunk/live-magic/src/model/folder_of_files.py
   dists/trunk/live-magic/src/model/key_var_config_file.py
   dists/trunk/live-magic/src/model/live_helper_configuration.py
   dists/trunk/live-magic/src/views/
   dists/trunk/live-magic/src/views/__init__.py
   dists/trunk/live-magic/src/views/build.py
   dists/trunk/live-magic/src/views/hooks.py
   dists/trunk/live-magic/src/views/main.py
   dists/trunk/live-magic/tests/
   dists/trunk/live-magic/tests/test_all.py
   dists/trunk/live-magic/tests/test_folder_of_files.py
   dists/trunk/live-magic/tests/test_key_var_config_file.py
   dists/trunk/live-magic/tests/test_live_helper_configuration.py
Log:
Current work-in-progress of 'live-magic': the GUI and wizard interface for Debian Live.



Added: dists/trunk/live-magic/COPYING
===================================================================
--- dists/trunk/live-magic/COPYING	                        (rev 0)
+++ dists/trunk/live-magic/COPYING	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,339 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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 of the License, 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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.

Added: dists/trunk/live-magic/debian/changelog
===================================================================
--- dists/trunk/live-magic/debian/changelog	                        (rev 0)
+++ dists/trunk/live-magic/debian/changelog	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,5 @@
+live-guihelper (0.1-1) UNRELEASED; urgency=low
+
+  * Initial release.
+
+ -- Chris Lamb <chris at chris-lamb.co.uk>  Mon, 28 May 2007 12:31:20 +0100

Added: dists/trunk/live-magic/debian/compat
===================================================================
--- dists/trunk/live-magic/debian/compat	                        (rev 0)
+++ dists/trunk/live-magic/debian/compat	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1 @@
+5

Added: dists/trunk/live-magic/debian/control
===================================================================
--- dists/trunk/live-magic/debian/control	                        (rev 0)
+++ dists/trunk/live-magic/debian/control	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,27 @@
+Source: live-guihelper
+Section: misc
+Priority: optional
+Maintainer: Debian Live <debian-live-devel at lists.alioth.debian.org>
+Uploaders: Chris Lamb <chris at chris-lamb.co.uk>, Daniel Baumann <daniel at debian.org>
+Build-Depends: python-central (>= 0.5), cdbs (>= 0.4.43), python-dev, debhelper (>= 5.0.37.2)
+Standards-Version: 3.7.2
+XS-Vcs-Svn: svn://svn.debian.org/debian-live/dists/trunk/live-guihelper/
+XS-VCS-Browse: http://svn.debian.org/wsvn/debian-live/dists/trunk/live-guihelper/
+
+Package: live-guihelper
+Architecture: all
+Depends: live-helper, python-gtk2 (>= 2.8), python-glade2 (>= 2.10), ${python:Depends}
+Recommends: python-gnome2-desktop
+Description: Debian Live helper programs (gui frontend)
+ Live-helper is a collection of programs that can be used to build Debian Live
+ system images. The philosophy behind live-helper is to provide a collection of
+ small, simple, and easily understood tools that can be used in your own program
+ to automate building of a Live system.
+ .
+ A typical program that uses live-helper will call several live-helper commands
+ in sequence. Live-helper commands are all named with a "lh_" prefix. Examples
+ of such a program that uses live-helper is make-live (included here).
+ .
+  Homepage: <http://debian-live.alioth.debian.org/>
+ .
+ This package contains the gui frontend.

Added: dists/trunk/live-magic/debian/copyright
===================================================================
--- dists/trunk/live-magic/debian/copyright	                        (rev 0)
+++ dists/trunk/live-magic/debian/copyright	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,34 @@
+This package was debianized by Chris Lamb <chris at chris-lamb.co.uk> on
+Mon, 28 May 2007 12:37:08 +0100.
+
+It was downloaded from:
+
+	<http://debian-live.alioth.debian.org/>
+
+Upstream contact:
+
+	Debian Live <debian-live-devel at lists.alioth.debian.org>
+
+License:
+
+	Copyright (C) 2007 Chris Lamb <chris at chris-lamb.co.uk>
+
+	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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in /usr/share/common-licenses/GPL file.
+
+The Debian packaging is (C) 2007, Daniel Baumann <daniel at debian.org> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.

Added: dists/trunk/live-magic/debian/rules
===================================================================
--- dists/trunk/live-magic/debian/rules	                        (rev 0)
+++ dists/trunk/live-magic/debian/rules	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,6 @@
+#!/usr/bin/make -f
+
+DEB_PYTHON_SYSTEM=pycentral
+
+include /usr/share/cdbs/1/rules/debhlper.mk
+include /usr/share/cdbs/1/class/python-distutils.mk


Property changes on: dists/trunk/live-magic/debian/rules
___________________________________________________________________
Name: svn:executable
   + *

Added: dists/trunk/live-magic/glade/main.glade
===================================================================
--- dists/trunk/live-magic/glade/main.glade	                        (rev 0)
+++ dists/trunk/live-magic/glade/main.glade	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,1385 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
+<glade-interface>
+  <widget class="GtkWindow" id="window_main">
+    <property name="visible">True</property>
+    <property name="title" translatable="yes">Debian Live Configuration Utility</property>
+    <property name="default_width">740</property>
+    <property name="default_height">540</property>
+    <property name="icon">debian_openlogo-nd-100.png</property>
+    <signal name="destroy" handler="gtk_main_quit"/>
+    <signal name="delete_event" handler="on_quit_request"/>
+    <child>
+      <widget class="GtkVBox" id="vbox_main">
+        <property name="visible">True</property>
+        <child>
+          <widget class="GtkMenuBar" id="menubar">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkMenuItem" id="file1">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_File</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="file1_menu">
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menu_new">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_New</property>
+                        <property name="use_underline">True</property>
+                        <signal name="activate" handler="on_new"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="menu-item-image9">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-new</property>
+                            <property name="icon_size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menu_open">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Open...</property>
+                        <property name="use_underline">True</property>
+                        <signal name="activate" handler="on_open"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image3891">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-open</property>
+                            <property name="icon_size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menu_save">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Save</property>
+                        <property name="use_underline">True</property>
+                        <signal name="activate" handler="on_save"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image3892">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-save</property>
+                            <property name="icon_size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menu_save_as">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Save _As...</property>
+                        <property name="use_underline">True</property>
+                        <signal name="activate" handler="on_save_as"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image3893">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-save-as</property>
+                            <property name="icon_size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separator10">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menu_quit">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Quit</property>
+                        <property name="use_underline">True</property>
+                        <signal name="activate" handler="on_quit_request"/>
+                        <accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image3894">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-quit</property>
+                            <property name="icon_size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="actions">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Actions</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="actions_menu">
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menu_build">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Build...</property>
+                        <property name="use_underline">True</property>
+                        <signal name="activate" handler="on_build_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="menu-item-image23">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-cdrom</property>
+                            <property name="icon_size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="help1">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Help</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="help1_menu">
+                    <child>
+                      <widget class="GtkImageMenuItem" id="item1">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Contents</property>
+                        <property name="use_underline">True</property>
+                        <signal name="activate" handler="on_help_activate"/>
+                        <accelerator key="F1" modifiers="" signal="activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image3910">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-help</property>
+                            <property name="icon_size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkMenuItem" id="quick_introduction1">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Quick Introduction</property>
+                        <property name="use_underline">True</property>
+                        <signal name="activate" handler="on_introduction_activate"/>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkMenuItem" id="icon_legend">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Icon _Legend</property>
+                        <property name="use_underline">True</property>
+                        <signal name="activate" handler="on_icon_legend_activate"/>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menu_about">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_About</property>
+                        <property name="use_underline">True</property>
+                        <signal name="activate" handler="on_about_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image3911">
+                            <property name="visible">True</property>
+                            <property name="pixbuf">stock_menu_about.png</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkHandleBox" id="handlebox_toolbar">
+            <property name="visible">True</property>
+            <property name="shadow_type">GTK_SHADOW_OUT</property>
+            <child>
+              <widget class="GtkToolbar" id="toolbar">
+                <property name="visible">True</property>
+                <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+                <child>
+                  <widget class="GtkToolButton" id="button_new">
+                    <property name="visible">True</property>
+                    <property name="is_important">True</property>
+                    <property name="label">New</property>
+                    <property name="use_underline">True</property>
+                    <property name="stock_id">gtk-new</property>
+                    <signal name="clicked" handler="on_new"/>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkToolButton" id="button_open">
+                    <property name="visible">True</property>
+                    <property name="is_important">True</property>
+                    <property name="label">Open</property>
+                    <property name="use_underline">True</property>
+                    <property name="stock_id">gtk-open</property>
+                    <signal name="clicked" handler="on_open"/>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkToolButton" id="btn_save">
+                    <property name="visible">True</property>
+                    <property name="is_important">True</property>
+                    <property name="label">Save</property>
+                    <property name="use_underline">True</property>
+                    <property name="stock_id">gtk-floppy</property>
+                    <signal name="clicked" handler="on_save"/>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkSeparatorToolItem" id="separator">
+                    <property name="visible">True</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkToolButton" id="button_build">
+                    <property name="visible">True</property>
+                    <property name="is_important">True</property>
+                    <property name="label">Build</property>
+                    <property name="use_underline">True</property>
+                    <property name="stock_id">gtk-cdrom</property>
+                    <signal name="clicked" handler="on_build_activate"/>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                  </packing>
+                </child>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkHPaned" id="hpaned_main">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="border_width">6</property>
+            <child>
+              <widget class="GtkVBox" id="vbox4">
+                <property name="width_request">100</property>
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <widget class="GtkButton" id="button_section_common">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">3</property>
+                    <property name="label" translatable="yes">Common</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="on_choose_section"/>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkButton" id="button_section_chroot">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">3</property>
+                    <property name="label" translatable="yes">Chroot</property>
+                    <property name="relief">GTK_RELIEF_NONE</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="on_choose_section"/>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkButton" id="button_section_binary">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">3</property>
+                    <property name="label" translatable="yes">Binary</property>
+                    <property name="relief">GTK_RELIEF_NONE</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="on_choose_section"/>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkButton" id="button_section_bootstrap">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">3</property>
+                    <property name="label" translatable="yes">Bootstrap</property>
+                    <property name="relief">GTK_RELIEF_NONE</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="on_choose_section"/>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkButton" id="button_section_source">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">3</property>
+                    <property name="label" translatable="yes">Source</property>
+                    <property name="relief">GTK_RELIEF_NONE</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="on_choose_section"/>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkButton" id="button_section_hooks">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">3</property>
+                    <property name="label" translatable="yes">Hooks</property>
+                    <property name="relief">GTK_RELIEF_NONE</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="on_choose_section"/>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">5</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="resize">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkNotebook" id="notebook">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="show_border">False</property>
+                <child>
+                  <widget class="GtkTable" id="table1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="n_rows">3</property>
+                    <property name="n_columns">2</property>
+                    <child>
+                      <widget class="GtkEntry" id="common/LH_INITRAMFS">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <signal name="changed" handler="on_live_helper_value_changed"/>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkEntry" id="common/LH_BOOTSTRAP">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <signal name="changed" handler="on_live_helper_value_changed"/>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkEntry" id="common/LH_APT">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <signal name="changed" handler="on_live_helper_value_changed"/>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="sdf1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">LH_APT</property>
+                      </widget>
+                      <packing>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="sdf2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">LH_BOOTSTRAP</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="lbl;1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">LH_INITRAMFS</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="y_options">GTK_FILL</property>
+                        <property name="y_padding">5</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="menu_label">fgfgfg</property>
+                    <property name="tab_expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">(Common)</property>
+                  </widget>
+                  <packing>
+                    <property name="type">tab</property>
+                    <property name="tab_expand">False</property>
+                    <property name="tab_fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkVBox" id="vbox5">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkLabel" id="label3">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;big&gt;&lt;b&gt;Chroot&lt;/b&gt;&lt;/big&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label11">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">This is a bit more instructive text</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkHSeparator" id="hseparator1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                    <property name="tab_expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label5">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">(Chroot)</property>
+                  </widget>
+                  <packing>
+                    <property name="type">tab</property>
+                    <property name="position">1</property>
+                    <property name="tab_expand">False</property>
+                    <property name="tab_fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkTable" id="table2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="n_rows">3</property>
+                    <property name="n_columns">3</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">2</property>
+                    <property name="tab_expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label7">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">(Binary)</property>
+                  </widget>
+                  <packing>
+                    <property name="type">tab</property>
+                    <property name="position">2</property>
+                    <property name="tab_expand">False</property>
+                    <property name="tab_fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFixed" id="fixed2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                  </widget>
+                  <packing>
+                    <property name="position">3</property>
+                    <property name="tab_expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label8">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">(Bootstrap)</property>
+                  </widget>
+                  <packing>
+                    <property name="type">tab</property>
+                    <property name="position">3</property>
+                    <property name="tab_expand">False</property>
+                    <property name="tab_fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFixed" id="fixed1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                  </widget>
+                  <packing>
+                    <property name="position">4</property>
+                    <property name="tab_expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label9">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">(Source)</property>
+                  </widget>
+                  <packing>
+                    <property name="type">tab</property>
+                    <property name="position">4</property>
+                    <property name="tab_expand">False</property>
+                    <property name="tab_fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkHBox" id="hbox_hooks">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkVBox" id="vbox_hooklist">
+                        <property name="width_request">174</property>
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="spacing">5</property>
+                        <child>
+                          <widget class="GtkTreeView" id="treeview_hooks">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="headers_visible">False</property>
+                            <property name="enable_grid_lines">GTK_TREE_VIEW_GRID_LINES_VERTICAL</property>
+                          </widget>
+                          <packing>
+                            <property name="padding">5</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkButton" id="button_hook_new">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">gtk-new</property>
+                            <property name="use_stock">True</property>
+                            <signal name="clicked" handler="on_button_hook_new_clicked"/>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkButton" id="button_hook_import">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">_Import...</property>
+                            <property name="use_underline">True</property>
+                            <signal name="clicked" handler="on_button_hook_import_clicked"/>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkButton" id="button_hook_rename">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">_Rename...</property>
+                            <property name="use_underline">True</property>
+                            <signal name="clicked" handler="on_button_hook_rename_clicked"/>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkButton" id="button_hook_delete">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">gtk-delete</property>
+                            <property name="use_stock">True</property>
+                            <signal name="clicked" handler="on_button_hook_delete_clicked"/>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">4</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="padding">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkScrolledWindow" id="scroll_hook_edit">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">5</property>
+                    <property name="tab_expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label10">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">(Hooks)</property>
+                  </widget>
+                  <packing>
+                    <property name="type">tab</property>
+                    <property name="position">5</property>
+                    <property name="tab_expand">False</property>
+                    <property name="tab_fill">False</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="shrink">False</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkScrolledWindow" id="scrolledwindow3">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+            <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
+            <child>
+              <widget class="GtkViewport" id="viewport1">
+                <property name="visible">True</property>
+                <property name="shadow_type">GTK_SHADOW_NONE</property>
+                <child>
+                  <widget class="GtkLabel" id="label_status">
+                    <property name="width_request">100</property>
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0</property>
+                    <property name="label" translatable="yes">
+</property>
+                    <property name="ellipsize">PANGO_ELLIPSIZE_END</property>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="padding">5</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+  <widget class="GtkAboutDialog" id="dialog_about">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">About Debian Live</property>
+    <property name="resizable">False</property>
+    <property name="modal">True</property>
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="has_separator">False</property>
+    <property name="name">Glade</property>
+    <property name="version">0.1</property>
+    <property name="copyright" translatable="yes">Copyright (C) Chris Lamb 2007</property>
+    <property name="comments" translatable="yes">GUI configuration tool to build Debian Live systems.</property>
+    <property name="website">http://debian-live.alioth.debian.org/</property>
+    <property name="website_label" translatable="yes">Debian Live homepage</property>
+    <property name="license" translatable="yes">		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    &lt;one line to give the program's name and a brief idea of what it does.&gt;
+    Copyright (C) &lt;year&gt;  &lt;name of author&gt;
+
+    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 of the License, 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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  &lt;signature of Ty Coon&gt;, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.</property>
+    <property name="authors"></property>
+    <property name="documenters"></property>
+    <property name="artists"></property>
+    <property name="logo">debian_openlogo-nd-100.png</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <property name="homogeneous">True</property>
+        <child>
+          <placeholder/>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+  <widget class="GtkWindow" id="window_build">
+    <property name="border_width">12</property>
+    <property name="title" translatable="yes">Window title</property>
+    <property name="resizable">False</property>
+    <property name="modal">True</property>
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="icon">debian_openlogo-nd-100.png</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <signal name="delete_event" handler="on_window_build_delete_event"/>
+    <child>
+      <widget class="GtkVBox" id="vbox_rgdebinstall_progress1">
+        <property name="visible">True</property>
+        <property name="spacing">12</property>
+        <child>
+          <widget class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="spacing">12</property>
+            <child>
+              <widget class="GtkHBox" id="hbox1">
+                <property name="visible">True</property>
+                <property name="spacing">12</property>
+                <child>
+                  <widget class="GtkImage" id="image_finished1">
+                    <property name="stock">gtk-cdrom</property>
+                    <property name="icon_size">6</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label_build_titles">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">&lt;big&gt;&lt;b&gt;Title&lt;/b&gt;&lt;/big&gt;
+
+Subtitle text.</property>
+                    <property name="use_markup">True</property>
+                    <property name="wrap">True</property>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkVBox" id="vbox2">
+                <property name="visible">True</property>
+                <property name="spacing">6</property>
+                <child>
+                  <widget class="GtkProgressBar" id="progress_build">
+                    <property name="visible">True</property>
+                    <property name="activity_mode">True</property>
+                    <property name="pulse_step">0.029999999329447746</property>
+                    <property name="text" translatable="yes"></property>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label_build_status">
+                    <property name="width_request">450</property>
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">&lt;i&gt;Status message goes here&lt;/i&gt;</property>
+                    <property name="use_markup">True</property>
+                    <property name="wrap">True</property>
+                    <property name="ellipsize">PANGO_ELLIPSIZE_END</property>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkCheckButton" id="checkbutton_build_auto_close">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="label" translatable="yes">Automatically close after Live system has been created</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkExpander" id="expander_terminal1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <child>
+                  <widget class="GtkHBox" id="hbox_vte">
+                    <property name="visible">True</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <widget class="GtkVScrollbar" id="vte_scrollbar">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="adjustment">90 0 100 1 10 10</property>
+                      </widget>
+                      <packing>
+                        <property name="pack_type">GTK_PACK_END</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Details</property>
+                  </widget>
+                  <packing>
+                    <property name="type">label_item</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <widget class="GtkHButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <widget class="GtkButton" id="button_build_cancel">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="label">gtk-cancel</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_button_build_cancel_clicked"/>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="button_build_close">
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="label">gtk-close</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_button_build_close_clicked"/>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>

Added: dists/trunk/live-magic/pixmaps/debian_openlogo-nd-100.png
===================================================================
(Binary files differ)


Property changes on: dists/trunk/live-magic/pixmaps/debian_openlogo-nd-100.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream


Property changes on: dists/trunk/live-magic/src
___________________________________________________________________
Name: svn:ignore
   + *.pyc



Property changes on: dists/trunk/live-magic/src/controllers
___________________________________________________________________
Name: svn:ignore
   + *.pyc


Added: dists/trunk/live-magic/src/controllers/__init__.py
===================================================================
--- dists/trunk/live-magic/src/controllers/__init__.py	                        (rev 0)
+++ dists/trunk/live-magic/src/controllers/__init__.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,3 @@
+from build import *
+from main import *
+from hooks import *

Added: dists/trunk/live-magic/src/controllers/build.py
===================================================================
--- dists/trunk/live-magic/src/controllers/build.py	                        (rev 0)
+++ dists/trunk/live-magic/src/controllers/build.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,75 @@
+import os
+import signal
+
+class BuildController(object):
+
+    # GTK callbacks
+
+    def on_build_activate(self, *_):
+        self.cancelled = False
+
+        # Save model if necessary
+        if self.model.altered():
+            self.model.save()
+
+        # Set initial titles and state
+        self.view.set_build_titles("Generating Debian Live system...", \
+            "Generating Debian Live system.", \
+            "Please wait while your Live system is generated for you.")
+        self.view.set_build_status("Forking build process..")
+        self.view.set_build_status_change(initial=True)
+
+        # Show window
+        self.view.do_show_window_build()
+
+        # Fork command
+        cmd = ['gksu', 'sleep 1005']
+        cmd = ['gksu', 'lh_build']
+        self.pid = self.view.vte_terminal.fork_command(cmd[0], cmd, None, self.model.dir)
+
+        if self.pid >= 0:
+            self.view.set_build_status("Build process forked (pid %d)..." % self.pid)
+        else:
+            self.view.set_build_titles("Error", "Error creating Debian Live system!", \
+                "Could not fork the build process!")
+            # Allow user to close window
+            self.view.set_build_status_change(initial=False)
+
+    def on_window_build_delete_event(self, *_):
+        # If no command is running, close the window
+        if self.pid < 0:
+            self.view.do_hide_window_build()
+        return True
+
+    def on_vte_child_exited(self, *_):
+        self.pid = -1
+
+        if self.view.get_build_auto_close():
+            self.view.do_hide_window_build()
+        else:
+            # Set UI state to finished
+            self.view.set_build_status_change(initial=False)
+
+            # Display a different message if build process was cancelled
+            if self.cancelled is True:
+                self.view.set_build_titles("Build process cancelled", "Cancelled", \
+                    "The creation of your Debian Live system was cancelled.")
+                self.view.set_build_status("Build process cancelled.")
+            else:
+                self.view.set_build_titles("Build process finished", "Finished", \
+                    "Your Debian Live system has been created successfully.")
+                self.view.set_build_status("Build process complete.")
+
+    def on_vte_contents_changed(self, *_):
+        self.view.do_build_pulse()
+
+    def on_button_build_close_clicked(self, *_):
+        # The build button is only sensitive when it is safe to close, so
+        # no check required.
+        self.view.do_hide_window_build()
+
+    def on_button_build_cancel_clicked(self, *_):
+        self.cancelled = True
+        os.kill(self.pid, signal.SIGKILL)
+
+

Added: dists/trunk/live-magic/src/controllers/hooks.py
===================================================================
--- dists/trunk/live-magic/src/controllers/hooks.py	                        (rev 0)
+++ dists/trunk/live-magic/src/controllers/hooks.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,26 @@
+
+class HooksController(object):
+    def __init__(self):
+        self.model.attach_load_observer(self.notify_load_hooks)
+
+    def notify_load_hooks(self):
+        self.view.do_hooks_clear()
+        for filename, contents in self.model.hooks.files.itervalues():
+            self.view.do_hook_add(filename, contents)
+
+    def on_button_hook_new_clicked(self, *_):
+        filename = self.view.do_show_new_hook_window()
+        if filename is not None:
+            if len(filename) > 0:
+                self.model.hooks['filename'] = ''
+            else:
+                self.view.do_show_new_hook_invalid_name()
+
+    def on_button_hook_import_clicked(self, *_):
+        print "import"
+
+    def on_button_hook_rename_clicked(self, *_):
+        print "rename"
+
+    def on_button_hook_delete_clicked(self, *_):
+        print "delete"

Added: dists/trunk/live-magic/src/controllers/main.py
===================================================================
--- dists/trunk/live-magic/src/controllers/main.py	                        (rev 0)
+++ dists/trunk/live-magic/src/controllers/main.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,87 @@
+import gtk
+from model import KeyVarConfigFile
+
+class MainController(object):
+    def __init__(self):
+        self.model.attach_load_observer(self.notify_load)
+
+    def notify_load(self):
+        for child in self.model.children:
+            # Check we are dealing with normal configuration values
+            if type(child) is KeyVarConfigFile:
+                for key in child:
+                    # Set the value in the view
+                    self.view.do_set_key_var(child.shortname, key, getattr(child, key))
+
+    def init_view(self):
+        """
+        Called by the view when it is ready for setup.
+        """
+        sections = ['common', 'chroot', 'binary', 'bootstrap', 'source', 'hooks']
+        self.view.setup_sections(sections)
+
+        # Notify all the observers that depend on the model
+        self.model.notify_load_observers()
+
+    # GTK callbacks
+    def on_live_helper_value_changed(self, widget):
+        namespace, key = widget.name.split("/")
+        value = widget.get_text()
+
+        # Call self.model.namespace.key = vaulue
+        ns = getattr(self.model, namespace)
+        setattr(ns, key, value)
+
+        # Variables have been tainted, allow saving
+        self.view.set_save_enabled(True)
+
+    def on_choose_section(self, button):
+        self.view.do_select_section(button)
+
+    def on_new(self, *_):
+        if self.model.altered():
+            print "Not newing as not saved"
+        else:
+            self.model.new()
+        self.view.set_save_enabled(True)
+
+    def on_open(self, *_):
+        def open_dialog(self):
+            res, filename = self.view.do_folder_open()
+            if res == gtk.RESPONSE_ACCEPT:
+                try:
+                    self.model.open(filename)
+                    self.view.set_save_enabled(False)
+                except IOError:
+                    self.view.do_show_loading_error()
+        return self._confirm_save(lambda: open_dialog(self), quit_dialog=False)
+
+    def on_save(self, *_):
+        self.view.set_save_enabled(False)
+        self.view.set_status_bar("Saving configuration to %s ..." % self.model.dir)
+        self.model.save()
+        self.view.set_status_bar("Saved configuration to %s" % self.model.dir)
+
+    def on_save_as(self, *_):
+        raise NotImplemented
+
+    def _confirm_save(self, fn, **kw):
+        if self.model.altered():
+            res = self.view.do_confirm_save(**kw)
+            if res == gtk.RESPONSE_ACCEPT: # Save
+                self.on_save(None)
+                fn()
+            elif res == gtk.RESPONSE_REJECT: # Don't save
+                fn()
+            else:
+                return True # Cancel
+        else:
+            # We are up to date
+            fn()
+
+    def on_quit_request(self, *_):
+        return self._confirm_save(lambda: gtk.main_quit(), quit_dialog=True)
+
+    def on_about_activate(self, *_):
+        self.view.do_show_about_dialog()
+

Added: dists/trunk/live-magic/src/main.py
===================================================================
--- dists/trunk/live-magic/src/main.py	                        (rev 0)
+++ dists/trunk/live-magic/src/main.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,37 @@
+#!/usr/bin/env python
+
+import pygtk
+pygtk.require('2.0')
+import gtk
+
+import model
+from views import *
+from controllers import *
+
+class Model(object):
+    def __init__(self, dir=None):
+        self.config = model.LiveHelperConfiguration(dir)
+    def __getattr__(self, k):
+        return getattr(self.config, k)
+    def __setattr__(self, k, v):
+        self.__dict__[k] = v
+
+class View(MainView, BuildView, HooksView):
+    def __init__(self, controller):
+        self.controller = controller
+        MainView.__init__(self)
+        BuildView.__init__(self)
+        HooksView.__init__(self)
+
+class Controller(MainController, BuildController, HooksController):
+    def __init__(self, model):
+        self.model = model
+        MainController.__init__(self)
+        BuildController.__init__(self)
+        HooksController.__init__(self)
+
+if __name__ == "__main__":
+    m = Model()
+    c = Controller(m)
+    v = View(c)
+    gtk.main()


Property changes on: dists/trunk/live-magic/src/main.py
___________________________________________________________________
Name: svn:executable
   + *


Property changes on: dists/trunk/live-magic/src/model
___________________________________________________________________
Name: svn:ignore
   + *.pyc


Added: dists/trunk/live-magic/src/model/__init__.py
===================================================================
--- dists/trunk/live-magic/src/model/__init__.py	                        (rev 0)
+++ dists/trunk/live-magic/src/model/__init__.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,3 @@
+from live_helper_configuration import LiveHelperConfiguration
+from key_var_config_file import KeyVarConfigFile
+from folder_of_files import FolderOfFiles

Added: dists/trunk/live-magic/src/model/folder_of_files.py
===================================================================
--- dists/trunk/live-magic/src/model/folder_of_files.py	                        (rev 0)
+++ dists/trunk/live-magic/src/model/folder_of_files.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,124 @@
+import glob
+import os
+from os.path import join
+
+class FolderOfFiles(object):
+    """
+    Represents a folder containing a number of files.
+    """
+
+    def __init__(self, dir):
+        self.dir = dir
+
+        self._stale = set()
+        self.files = {}
+
+        # No file has been deleted
+        self.file_deleted = False
+
+        self.load()
+
+    def __getitem__(self, k):
+        return self.files[k]
+
+    def __contains__(self, k):
+        return k in self.files
+
+    def __delitem__(self, k):
+        del self.files[k]
+
+    def __setitem__(self, k, v):
+        self._stale.add(k)
+        self.files[k] = v
+
+    def _config_exists(self, file):
+        try:
+            os.stat(join(self.dir, file))
+            return True
+        except OSError:
+            return False
+
+    def load(self):
+        """
+        Loads files.
+        """
+        self.deleted = False
+        self._stale.clear()
+        self.files.clear()
+        for name in glob.glob(join(self.dir, '*')):
+            key = name.split('/')[-1]
+            try:
+                f = open(name, 'r')
+                self.files[key] = f.read()
+                f.close()
+            except IOError, e:
+                # "Is a directory"
+                if e.errno == 21:
+                    continue
+                raise e
+
+    def altered(self):
+        """
+        Returns True if this configuration file has changed since last save.
+        """
+        return len(self._stale) > 0 or self.file_deleted == True
+
+    def save(self):
+        """
+        Update all updated files in this directory.
+        """
+        for filename in self._stale:
+            pathname = join(self.dir, filename)
+            f = open(pathname, 'w+')
+            f.write(self[filename])
+            f.close()
+
+        self._stale.clear()
+
+    def delete(self, filename):
+        if self._config_exists(filename):
+            os.remove(join(self.dir, filename))
+        del self[filename]
+        self.file_deleted = True
+
+    def rename(self, orig, new):
+        """
+        Throws ValueError if 'new' already exists.
+        """
+        if self._config_exists(new):
+            raise ValueError
+        if self._config_exists(orig):
+            os.rename(join(self.dir, orig), join(self.dir, new))
+        self[new] = self[orig]
+        del self[orig]
+
+    def import_file(self, source):
+        """
+        Imports the specified file into the current configuration, using a
+        unique name. The file is not saved.
+        """
+        f = open(source, 'r')
+        source_contents = f.read()
+        f.close()
+
+        target_name = self._gen_import_name(source)
+        self[target_name] = source_contents
+
+    def _gen_import_name(self, filename):
+        """
+        Generates a unique name of the imported file, based on the existing file.
+        """
+        # Use existing filename as the root
+        root = filename.split(os.sep)[-1]
+
+        if self._config_exists(root):
+            # Keep adding a number to the end until it doesn't exist.
+            i = 1
+            while True:
+                tmpnam = "%s-%d" % (root, i)
+                if not self._config_exists(tmpnam):
+                    return tmpnam
+                i += 1
+        else:
+            # Just use the root name
+            return root

Added: dists/trunk/live-magic/src/model/key_var_config_file.py
===================================================================
--- dists/trunk/live-magic/src/model/key_var_config_file.py	                        (rev 0)
+++ dists/trunk/live-magic/src/model/key_var_config_file.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,104 @@
+import re
+import os
+
+class KeyVarConfigFile(object):
+    """
+    Represents a shell KEY=VAR configuration file.
+    """
+
+    # Escape mappings (<unescaped>, <escaped>)
+    escapes = (
+        (r'\ '[:-1], r'\\ '[:-1]),
+        (r'"',  r'\"'),
+        (r'`', r'\`'),
+        (r'$', r'\$'),
+        (r"'", r'\''),
+    )
+
+    def __init__(self, filename):
+        self.filename = filename
+        self.shortname = filename.split(os.sep)[-1]
+        self._line_numbers = {}
+        self._stale = set()
+        self.load()
+
+    @staticmethod
+    def is_lh_variable(var):
+        """
+        Returns True if var is a configuration variable for Debian Live.
+        """
+        return var.startswith('LH_') or var.startswith('LIVE_')
+
+    def __setattr__(self, k, v):
+        if self.is_lh_variable(k):
+            self._stale.add(k)
+        self.__dict__[k] = v
+
+    def __iter__(self):
+        return filter(self.is_lh_variable, self.__dict__.keys()).__iter__()
+
+    def load(self):
+        """
+        Loads and parses file.
+        """
+        # Clear old state
+        self._line_numbers.clear()
+        self._stale.clear()
+        for var in self.__dict__.keys():
+            if self.is_lh_variable(var): del self.__dict__[var]
+
+        lineno = 1
+        regex = re.compile(r"""^\s*(\w+)=(?:(["\'])(([^\\\2]|\\.)*|)\2|((\w|\\["'])*))\s*(?:#.*)?$""")
+        f = open(self.filename, 'r')
+        for line in f:
+
+            # Check and parse key=value lines
+            match = regex.match(line)
+            if match:
+                key = match.groups()[0]
+
+                # Find the correct match group
+                for m in match.groups()[2:]:
+                    if m is not None:
+                        val = m
+                        break
+
+                # Unescape value
+                for to, from_ in self.escapes:
+                    val = val.replace(from_, to)
+
+                # Save value and line number
+                self._line_numbers[key] = lineno
+                self.__dict__[key] = val
+            lineno += 1
+
+    def altered(self):
+        """Returns True if this configuration file has changed since last save."""
+        return len(self._stale) != 0
+
+    def save(self):
+        """
+        Update all updated entries in the file.
+        """
+        if len(self._stale) > 0:
+            f = open(self.filename, 'r+')
+            lines = f.readlines()
+
+            for k in self._stale:
+                # Escape value
+                val = getattr(self, k)
+                for from_, to in self.escapes:
+                    val = val.replace(from_, to)
+
+                line = '%s="%s"\n' % (k, val)
+                try:
+                    # Overwrite original line in file
+                    lines[self._line_numbers[k] - 1] = line
+                except KeyError:
+                    # Append line to end of file
+                    lines.append("\n# The following option was added by live-guihelper\n")
+                    lines.append(line)
+            f.seek(0)
+            f.writelines(lines)
+            self._stale.clear()
+

Added: dists/trunk/live-magic/src/model/live_helper_configuration.py
===================================================================
--- dists/trunk/live-magic/src/model/live_helper_configuration.py	                        (rev 0)
+++ dists/trunk/live-magic/src/model/live_helper_configuration.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,87 @@
+import commands
+import tempfile
+
+from os.path import join
+
+from key_var_config_file import KeyVarConfigFile
+from folder_of_files import FolderOfFiles
+
+class LiveHelperConfiguration(object):
+    """
+    Represents a configuration for a Debian Live system.
+    """
+
+    _kv_files = ['common', 'bootstrap', 'binary', 'source', 'chroot']
+
+    def __init__(self, dir=None):
+        self._load_observers = []
+        self.first_load = True
+        if dir is None:
+            self.new()
+        else:
+            self.open(dir)
+
+    def new(self):
+        """
+        Creates and initialises a new configuration in a temporary folder.
+        """
+        self.dir = tempfile.mkdtemp('live-guihelper')
+        res, out = commands.getstatusoutput('LIVE_ROOT="%s" lh_config' % self.dir)
+        if res != 0: raise IOError, out
+        self._load()
+
+    def open(self, dir):
+        """
+        Discards the current configuration, and then loads and initialises
+        the configuration from the specified directory.
+        """
+        self.dir = dir
+        self._load()
+
+    def reload(self):
+        """
+        Reloads the current configuration.
+        """
+        self._load()
+
+    def save(self):
+        """
+        Saves the current configuration.
+        """
+        for conf in self.children:
+            conf.save()
+
+    def altered(self):
+        """
+        Returns True if the state of the configuration has changed since last save.
+        """
+        for conf in self.children:
+            if conf.altered() == True:
+                return True
+        return False
+
+    def _load(self):
+        self.children = []
+        for conf in self._kv_files:
+            conffile = KeyVarConfigFile(join(self.dir, 'config', conf))
+            self.children.append(conffile)
+            setattr(self, conf, conffile)
+
+        # chroot_local-hooks
+        fof_hooks = FolderOfFiles(join(self.dir, 'config', 'chroot_local-hooks'))
+        setattr(self, 'hooks', fof_hooks)
+        self.children.append(fof_hooks)
+
+        # Notify all the observers, but avoid double load when the view is ready
+        if not self.first_load:
+            self.notify_load_observers()
+        self.first_load = False
+
+    def notify_load_observers(self):
+        """
+        Notify all the registered observers that we have reloaded.
+        """
+        map(apply, self._load_observers)
+
+    def attach_load_observer(self, fn):
+        self._load_observers.append(fn)


Property changes on: dists/trunk/live-magic/src/views
___________________________________________________________________
Name: svn:ignore
   + *.pyc


Added: dists/trunk/live-magic/src/views/__init__.py
===================================================================
--- dists/trunk/live-magic/src/views/__init__.py	                        (rev 0)
+++ dists/trunk/live-magic/src/views/__init__.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,3 @@
+from build import *
+from main import *
+from hooks import *

Added: dists/trunk/live-magic/src/views/build.py
===================================================================
--- dists/trunk/live-magic/src/views/build.py	                        (rev 0)
+++ dists/trunk/live-magic/src/views/build.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,80 @@
+import vte
+import pango
+
+class BuildView(object):
+    def __init__(self):
+        # Init custom widgets
+        self.vte_terminal = None
+
+        try:
+            from gtksourceview import SourceBuffer, SourceView, SourceLanguagesManager
+
+            buffer = SourceBuffer()
+            editor = SourceView(buffer)
+            editor.set_show_line_numbers(True)
+
+            buffer.set_highlight(True)
+            lang = SourceLanguagesManager().get_language_from_mime_type("application/x-shellscript")
+            buffer.set_language(lang)
+
+        except ImportError:
+            editor = gtk.TextView()
+
+        font_desc = pango.FontDescription('Monospace 8')
+        if font_desc:
+            editor.modify_font(font_desc)
+
+        self['scroll_hook_edit'].add_with_viewport(editor)
+        editor.show()
+
+    def do_show_window_build(self):
+        self['window_main'].set_sensitive(False)
+
+        # Configure VteTerminal component if necessary
+        if self.vte_terminal is None:
+            t = vte.Terminal()
+            t.set_font_from_string('Monospace 8')
+            self['vte_scrollbar'].set_adjustment(t.get_adjustment())
+            self['hbox_vte'].pack_end(t)
+            self['hbox_vte'].show_all()
+
+            # Connect signals from VteTerminal
+            t.connect('child-exited', self.controller.on_vte_child_exited)
+            t.connect('contents-changed', self.controller.on_vte_contents_changed)
+
+            self.vte_terminal = t
+
+        self.vte_terminal.reset(True, True)
+        self['window_build'].show()
+
+    def do_hide_window_build(self):
+        self['window_build'].hide()
+        self['window_main'].set_sensitive(True)
+
+    def set_build_titles(self, title, heading, subheading):
+        self['window_build'].set_title(title)
+        self['label_build_titles'].set_label('<big><b>%s</b></big>\n\n%s' % (heading, subheading))
+
+    def set_build_status(self, msg):
+        self['label_build_status'].set_label('<i>%s</i>' % msg)
+
+    def do_build_pulse(self):
+        self['progress_build'].pulse()
+
+    def set_build_status_change(self, initial=True):
+        """
+        If initial is True, the GUI is adjusted to its initial conditions, otherwise
+        it is adjusted to that it the build window can be closed.
+        """
+        self['button_build_cancel'].set_sensitive(initial)
+        self['button_build_close'].set_sensitive(not initial)
+        self['checkbutton_build_auto_close'].set_sensitive(initial)
+        self['progress_build'].set_fraction({True: 0, False: 1}[initial])
+
+    def get_build_auto_close(self):
+        """
+        Returns True if the build window should automatically close after a successful
+        build, and False otherwise.
+        """
+        return self['checkbutton_build_auto_close'].get_active()
+

Added: dists/trunk/live-magic/src/views/hooks.py
===================================================================
--- dists/trunk/live-magic/src/views/hooks.py	                        (rev 0)
+++ dists/trunk/live-magic/src/views/hooks.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,40 @@
+import gtk
+import gobject
+
+class HooksView(object):
+
+    def do_hooks_clear(self):
+        self.hook_liststore = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
+
+    def do_show_new_hook_window(self):
+        dialog = gtk.Dialog(
+            "Choose filename",
+            self['window_main'],
+            gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
+            (   gtk.STOCK_OK, gtk.RESPONSE_ACCEPT,
+                gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT))
+
+        entry = gtk.Entry(256)
+        dialog.vbox.pack_start(entry)
+        dialog.vbox.show_all()
+        res = dialog.run()
+        dialog.destroy()
+
+        if res == gtk.RESPONSE_ACCEPT:
+            return entry.get_text().strip()
+        else:
+            return None
+
+    def do_show_new_hook_invalid_name(self):
+        dialog = gtk.MessageDialog(
+            self['window_main'],
+            gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
+            gtk.MESSAGE_ERROR,
+            gtk.BUTTONS_CLOSE,
+            "Invalid name for hook"
+            )
+        dialog.run()
+        dialog.destroy()
+
+    def do_hook_add(self, file, contents):
+        self.hook_liststore.append((file, contents))

Added: dists/trunk/live-magic/src/views/main.py
===================================================================
--- dists/trunk/live-magic/src/views/main.py	                        (rev 0)
+++ dists/trunk/live-magic/src/views/main.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,123 @@
+import gtk
+import gtk.glade
+import gobject
+
+class MainView(object):
+    def __init__(self):
+        self.controller.view = self
+
+        self.xml = gtk.glade.XML('../glade/main.glade')
+        self.xml.signal_autoconnect(self.controller)
+
+        self.controller.init_view()
+
+       # Hide tabs
+        self['notebook'].set_show_tabs(False)
+
+    def __getitem__(self, key):
+        widget = self.xml.get_widget(key)
+        if widget is None:
+            raise KeyError, "Widget not found: %s" % key
+        return widget
+
+    def __contains__(self, key):
+        try:
+            _ = self[key]
+        except KeyError:
+            return False
+        return True
+
+    # Application-specific calls
+
+    def do_select_section(self, button):
+        # Move to new section tab
+        _, _, name = button.get_name().split('_')
+        tab = self.sections.index(name)
+        self['notebook'].set_current_page(tab)
+
+        # Set section buttons
+        for section in self.sections:
+            self['button_section_%s' % section].set_relief(gtk.RELIEF_NONE)
+        button.set_relief(gtk.RELIEF_NORMAL)
+
+    def setup_sections(self, sections):
+        # Save sections
+        self.sections = sections
+
+        section_model = gtk.ListStore(gobject.TYPE_PYOBJECT, gobject.TYPE_STRING)
+        for s in sections:
+            section_model.append((None, s))
+
+        col = gtk.TreeViewColumn("Section", gtk.CellRendererText(), text=1)
+
+        #self['treeview_sections'].set_model(section_model)
+        #self['treeview_sections'].append_column(col)
+
+    def set_save_enabled(self, status):
+        self['btn_save'].set_sensitive(status)
+        self['menu_save'].set_sensitive(status)
+        self['menu_save_as'].set_sensitive(status)
+
+    def set_status_bar(self, msg):
+        self['label_status'].set_text(msg)
+
+    def do_confirm_save(self, quit_dialog=None):
+        # Show a quit button if we are quitting, and a close
+        # button if we are closing
+        btn = quit_dialog and gtk.STOCK_QUIT or gtk.STOCK_CLOSE
+
+        dialog = gtk.Dialog("",
+            self['window_main'],
+            gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
+            (
+                gtk.STOCK_SAVE, gtk.RESPONSE_ACCEPT,
+                btn, gtk.RESPONSE_REJECT,
+                gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
+            ))
+        label = gtk.Label()
+        label.set_markup("""<big><b>Save the changes to your configuration\nbefore continuing?</b></big>\n\nIf you don't save, changes will be permanently lost.""")
+        dialog.vbox.pack_start(label, True, True, 25)
+        label.show()
+        dialog.set_size_request(400, 200)
+        res = dialog.run()
+        dialog.destroy()
+        return res
+
+    def do_folder_open(self):
+        dialog = gtk.FileChooserDialog("Open Configuration",
+            self['window_main'],
+            gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER,
+            (
+                gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
+                gtk.STOCK_OPEN, gtk.RESPONSE_ACCEPT,
+            ))
+
+        res = dialog.run()
+        filename = dialog.get_filename()
+        dialog.destroy()
+        return res, filename
+
+    def do_show_loading_error(self):
+        dialog = gtk.MessageDialog(
+            self['window_main'],
+            gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
+            gtk.MESSAGE_ERROR,
+            gtk.BUTTONS_CLOSE,
+            "There was an error loading the configuration.")
+
+        dialog.format_secondary_markup("Please ensure that you selected a directory containing a Debian Live configuration.")
+        dialog.run()
+        dialog.destroy()
+
+    def do_show_about_dialog(self):
+        self['dialog_about'].set_name("Debian Live Gui")
+        self['dialog_about'].show()
+
+    def do_set_key_var(self, namespace, key, value):
+        try:
+            self['%s/%s' % (namespace, key)].set_text(value)
+        except KeyError:
+            # We either haven't got around to making a widget for this
+            # key, or it is new.
+            pass
+


Property changes on: dists/trunk/live-magic/tests
___________________________________________________________________
Name: svn:ignore
   + *.pyc


Added: dists/trunk/live-magic/tests/test_all.py
===================================================================
--- dists/trunk/live-magic/tests/test_all.py	                        (rev 0)
+++ dists/trunk/live-magic/tests/test_all.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+
+import os
+import unittest
+
+def suite():
+    suite = unittest.TestSuite()
+    for _, _, files in os.walk('.'):
+        for name in filter(is_test, files):
+            tests = unittest.defaultTestLoader.loadTestsFromName(name[:-3])
+            suite.addTests(tests)
+    return suite
+
+def is_test(filename):
+    return filename.startswith('test_') and filename.endswith('.py')
+
+if __name__ == "__main__":
+    unittest.main(defaultTest="suite")


Property changes on: dists/trunk/live-magic/tests/test_all.py
___________________________________________________________________
Name: svn:executable
   + *

Added: dists/trunk/live-magic/tests/test_folder_of_files.py
===================================================================
--- dists/trunk/live-magic/tests/test_folder_of_files.py	                        (rev 0)
+++ dists/trunk/live-magic/tests/test_folder_of_files.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,167 @@
+#!/usr/bin/env python
+
+import unittest
+import tempfile
+import os
+
+import sys
+sys.path.append('../src')
+import model
+
+class TestFolderOfFiles(unittest.TestCase):
+    def setUp(self):
+        self.dir = tempfile.mkdtemp('live-guihelper')
+        self.fof = model.FolderOfFiles(self.dir)
+
+    def f_c(self, filename):
+        return open("%s/%s" % (self.dir, filename), 'r').read()
+
+    def write(self, filename, contents):
+        f = open("%s/%s" % (self.dir, filename), 'w+')
+        f.write(contents)
+        f.close()
+
+    def testEmptyFolder(self):
+        assert len(self.fof.files) == 0
+
+    def testSmallFiles(self):
+        self.write('one', 'Contents of file one')
+        self.write('two', 'Contents of file two')
+        self.fof.load()
+        assert self.fof['one'] == 'Contents of file one'
+        assert self.fof['two'] == 'Contents of file two'
+
+    def testnewfile(self):
+        self.fof['spam'] = 'eggs'
+        self.assertRaises(IOError, self.f_c, 'spam')
+
+    def testSave(self):
+        self.fof['spam'] = 'eggs'
+        self.fof.save()
+        assert self.f_c('spam') == 'eggs'
+
+    def testEditFile(self):
+        self.write('spam', 'eggs')
+        self.fof.load()
+        assert self.f_c('spam') == 'eggs'
+        self.fof['spam'] = 'moreeggs'
+        self.fof.save()
+        assert self.f_c('spam') == 'moreeggs'
+
+    def testAlteredState(self):
+        assert self.fof.altered() == False
+        self.fof['spam'] = 'eggs'
+        assert self.fof.altered() == True
+        self.fof.save()
+        assert self.fof.altered() == False
+
+    def testNewRename(self):
+        self.fof['spam'] = 'eggs'
+        self.fof.rename('spam', 'morespam')
+        assert 'morespam' in self.fof
+        assert 'spam' not in self.fof
+        self.assertRaises(IOError, self.f_c, 'morespam')
+        self.assertRaises(IOError, self.f_c, 'spam')
+
+    def testAlteredStateNewRename(self):
+        self.fof['spam'] = 'eggs'
+        assert self.fof.altered() == True
+        self.fof.rename('spam', 'morespam')
+        assert self.fof.altered() == True
+
+    def testExistingRename(self):
+        self.fof['spam'] = 'eggs'
+        self.fof.save()
+        self.fof.rename('spam', 'morespam')
+        assert 'morespam' in self.fof
+        assert 'spam' not in self.fof
+        assert self.f_c('morespam') == 'eggs'
+        self.assertRaises(IOError, self.f_c, 'spam')
+
+    def testRenameFileExists(self):
+        self.fof['spam'] = 'eggs'
+        self.fof['morespam'] = 'moreeggs'
+        self.fof.save()
+        try:
+            self.fof.rename('spam', 'morespam')
+            self.fail(msg="Should have thrown ValueError on a renaming overwrite")
+        except ValueError:
+            pass
+
+    def testAlteredStateRename(self):
+        self.fof['spam'] = 'eggs'
+        assert self.fof.altered() == True
+        self.fof.save()
+        assert self.fof.altered() == False
+        self.fof.rename('spam', 'morespam')
+        assert self.fof.altered() == True
+
+    def testDeleteNotSaved(self):
+        self.fof['spam'] = 'eggs'
+        self.assertRaises(IOError, self.f_c, 'spam')
+        assert 'spam' in self.fof
+        self.fof.delete('spam')
+        assert 'spam' not in self.fof
+
+    def testDeleteNotSavedAlteredState(self):
+        assert self.fof.altered() == False
+        self.fof['spam'] = 'eggs'
+        assert self.fof.altered() == True
+        self.fof.delete('spam')
+        assert self.fof.altered() == True
+
+    def testDeleteSaved(self):
+        self.fof['spam'] = 'eggs'
+        self.fof.save()
+        assert self.f_c('spam') == 'eggs'
+        self.fof.delete('spam')
+        self.assertRaises(IOError, self.f_c, 'spam')
+
+    def testDeleteSavedAlteredState(self):
+        self.fof['spam'] = 'eggs'
+        self.fof.save()
+        assert self.fof.altered() == False
+        self.fof.delete('spam')
+        assert self.fof.altered() == True
+        self.assertRaises(IOError, self.f_c, 'spam')
+
+    def testIgnoreFoldersInDir(self):
+        os.mkdir("%s/spam" % self.dir,)
+        self.fof.load()
+        assert len(self.fof.files) == 0
+
+    def testImportFile(self):
+        fd, filename = tempfile.mkstemp('live-guihelper')
+        conf_name = filename.split(os.sep)[-1]
+        os.write(fd, 'spam')
+        os.close(fd)
+        self.fof.import_file(filename)
+        self.fof.save()
+        assert self.f_c(conf_name) == 'spam'
+
+    def testImportFileNotSaved(self):
+        fd, filename = tempfile.mkstemp('live-guihelper')
+        conf_name = filename.split(os.sep)[-1]
+        os.write(fd, 'spam')
+        os.close(fd)
+        self.fof.import_file(filename)
+        self.assertRaises(IOError, self.f_c, conf_name)
+
+    def testImportAlreadyExists(self):
+        fd, filename = tempfile.mkstemp('live-guihelper')
+        conf_name = filename.split('/')[-1]
+        os.write(fd, 'file_to_import')
+        os.close(fd)
+
+        self.fof[conf_name] = 'existing_file'
+        self.fof.save()
+
+        self.fof.import_file(filename)
+        self.fof.save()
+        assert self.f_c(conf_name) == 'existing_file'
+        self.fof[conf_name] == 'existing_file'
+        assert self.f_c("%s-1" % conf_name) == 'file_to_import'
+        self.fof["%s-1" % conf_name] == 'file_to_import'
+
+if __name__ == "__main__":
+    unittest.main()


Property changes on: dists/trunk/live-magic/tests/test_folder_of_files.py
___________________________________________________________________
Name: svn:executable
   + *

Added: dists/trunk/live-magic/tests/test_key_var_config_file.py
===================================================================
--- dists/trunk/live-magic/tests/test_key_var_config_file.py	                        (rev 0)
+++ dists/trunk/live-magic/tests/test_key_var_config_file.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,160 @@
+#!/usr/bin/env python
+
+import unittest
+import tempfile
+import os
+
+import sys
+sys.path.append('../src')
+import model
+
+class TestKeyVarConfigFile(unittest.TestCase):
+    def setUp(self):
+        fd, self.filename = tempfile.mkstemp('live-guihelper')
+        os.close(fd)
+        self.keyvar = model.KeyVarConfigFile(self.filename)
+
+    def f_c(self, filename=None):
+        if filename is None: filename = self.filename
+        return open(filename, 'r').readlines()
+
+    def testSetAndGetOption(self):
+        self.keyvar.LH_SPAM = "eggs"
+        assert self.keyvar.LH_SPAM == "eggs"
+
+    def testSaveKnownOption(self):
+        self.keyvar.LH_SPAM = "eggs"
+        self.keyvar.save()
+        assert 'LH_SPAM="eggs"\n' in self.f_c()
+
+    def testSaveUnknownOption(self):
+        """
+        Unknown configuration keys should be added to the file.
+        """
+        assert len(self.f_c()) == 0
+        self.keyvar.LH_SPAM = "eggs"
+        self.keyvar.save()
+        assert 'LH_SPAM="eggs"\n' in self.f_c()
+
+    def testUpdatesOptions(self):
+        """
+        Updating an existing option should not increase the length of the file.
+        """
+        self.keyvar.LH_SPAM = "eggs"
+        self.keyvar.LH_MORESPAM = "moreeggs"
+        self.keyvar.save()
+        self.keyvar.save()
+        self.keyvar.load()
+        save = len(self.f_c())
+        self.keyvar.LH_SPAM = "yetmoreeggs"
+        self.keyvar.save()
+        assert len(self.f_c()) == save
+
+    def testConfFileAlteredState(self):
+        """
+        Should change state when they have been altered.
+        """
+        assert self.keyvar.altered() == False
+        self.keyvar.LH_SPAM = "eggs"
+        assert self.keyvar.altered() == True
+
+    def testConfLoadResetState(self):
+        """
+        Reloading the configuration should reset state.
+        """
+        assert self.keyvar.altered() == False
+        self.keyvar.LH_SPAM = "eggs"
+        assert self.keyvar.altered() == True
+        self.keyvar.load()
+        assert self.keyvar.altered() == False
+        assert not hasattr(self.keyvar, 'LH_SPAM')
+
+    def testSavingEscapingCharacters(self):
+        """
+        Characters should be escaped when saving file.
+        """
+        tests = {
+            r'"' : r'\"',
+            r'`' : r'\`',
+            r'$' : r'\$',
+            r'\ '[:-1] : r'\\ '[:-1],
+        }
+        for input, expected in tests.iteritems():
+            self.keyvar.LH_TEST = input
+            self.keyvar.save()
+            self.assert_('LH_TEST="%s"\n' % expected in self.f_c(), \
+                "Input was '%s', expected '%s'" % (input, expected))
+
+    def testLoadingEscapedCharacters(self):
+        """
+        Characters should be unescaped when saving file.
+        """
+        tests = {
+            r'Test' : r'Test',
+            r'\\ '[:-1] : r'\ '[:-1],
+            r'\"Test\"' : r'"Test"',
+            r'\`Test\`\`Test\`' : r'`Test``Test`',
+            r"\'Test\'" : r"'Test'",
+        }
+
+        for input, expected in tests.iteritems():
+            # Write escaped string
+            f = open(self.filename, 'w+')
+            f.write('LH_SPAM="%s"' % input)
+            f.close()
+
+            # Reload configuration and check against expected value
+            self.keyvar.load()
+            self.assert_(self.keyvar.LH_SPAM == expected, \
+                "Got back '%s', expected '%s'" % (self.keyvar.LH_SPAM, expected))
+
+    def testNonStandardAlignmentAcceptance(self):
+        """
+        Tests acceptance of strange alignments/configurations/spacings of KEY="value" pairs.
+        """
+        accept = [
+            r'LH_SPAM="eggs"',
+            r'  LH_SPAM="eggs"  ',
+            r'LH_SPAM="eggs" # comment # comment ',
+            r'LH_SPAM="eggs" # comment with a " " sign',
+            r'LH_SPAM="eggs"  ',
+            r'LH_SPAM=eggs',
+            r'LH_SPAM=eggs ',
+            r"LH_SPAM='eggs' ",
+        ]
+        for a in accept:
+            f = open(self.filename, 'w+')
+            f.write(a)
+            f.close()
+
+            # Reload configuration and check against expected value
+            self.keyvar.load()
+            msg = "Should have accepted '%s'" % a
+            try:
+                self.assert_(self.keyvar.LH_SPAM == 'eggs', msg + ", saw '%s'" % self.keyvar.LH_SPAM)
+            except AttributeError:
+                self.fail(msg=msg)
+
+    def testNonStandardAlignmentRejection(self):
+        """
+        Tests rejection strange alignments/configurations/spacings of KEY="value" pairs.
+        """
+        reject = [
+            r'#LH_SPAM="eggs"', # commented out
+            r'LH_SPAM ="eggs"',
+            r'LH_SPAM= "eggs"',
+            r'LH_SPAM="eggs',
+            r'LH_SPAM=eggs"',
+            r'LH_SPAM=spam eggs',
+        ]
+        for r in reject:
+            f = open(self.filename, 'w+')
+            f.write(r)
+            f.close()
+
+            # Reload configuration and check against expected value
+            self.keyvar.load()
+            self.assert_(not hasattr(self.keyvar, 'LH_SPAM'), "Should have rejected '%s'" % r)
+
+if __name__ == "__main__":
+    unittest.main()


Property changes on: dists/trunk/live-magic/tests/test_key_var_config_file.py
___________________________________________________________________
Name: svn:executable
   + *

Added: dists/trunk/live-magic/tests/test_live_helper_configuration.py
===================================================================
--- dists/trunk/live-magic/tests/test_live_helper_configuration.py	                        (rev 0)
+++ dists/trunk/live-magic/tests/test_live_helper_configuration.py	2007-06-17 22:36:02 UTC (rev 2157)
@@ -0,0 +1,70 @@
+#!/usr/bin/env python
+
+import unittest
+import tempfile
+import os
+
+import sys
+sys.path.append('../src')
+import model
+
+class TestConfiguration(unittest.TestCase):
+    def setUp(self):
+        self.conf = model.LiveHelperConfiguration(None)
+
+    def testSimpleSetup(self):
+        """
+        Test whether we can create an empty configuration.
+        """
+        assert os.path.exists("%s/config/common" % self.conf.dir)
+
+    def testFailingNewConfiguration(self):
+        """Should throw IOError for an invalid directory"""
+        self.assertRaises(IOError, self.conf.open, "/proc")
+
+    def testNew(self):
+        """
+        new() should load a new configuration.
+        """
+        self.conf.common.LH_SPAM = "eggs"
+        self.conf.save()
+        saved_dir = self.conf.dir
+
+        self.conf.new()
+        assert not hasattr(self.conf.common, 'LH_SPAM')
+
+        self.conf.open(saved_dir)
+        assert self.conf.common.LH_SPAM == "eggs"
+
+    def testGetOption(self):
+        assert "apt" in self.conf.common.LH_APT
+
+    def testSetKnownOption(self):
+        self.conf.common.LH_APT = "apt-get"
+        assert self.conf.common.LH_APT == "apt-get"
+
+    def testSetUnknownOption(self):
+        self.conf.common.LH_UNKNOWN_OPTION = "Testing value"
+        assert self.conf.common.LH_UNKNOWN_OPTION == "Testing value"
+
+    def testChildAlteredState(self):
+        """
+        Object should change state when a child object changes state.
+        """
+        assert self.conf.altered() == False
+        self.conf.common.LH_SPAM = "eggs"
+        assert self.conf.altered() == True
+
+    def testConfLoadResetState(self):
+        """
+        Reloading the configuration should reset state.
+        """
+        assert self.conf.altered() == False
+        self.conf.common.LH_SPAM = "eggs"
+        assert self.conf.altered() == True
+        self.conf.reload()
+        assert not hasattr(self.conf.common, 'LH_SPAM')
+        assert self.conf.altered() == False
+
+if __name__ == "__main__":
+    unittest.main()


Property changes on: dists/trunk/live-magic/tests/test_live_helper_configuration.py
___________________________________________________________________
Name: svn:executable
   + *




More information about the Debian-live-changes mailing list