Initial import from Charles Yates' v0.2 tarball.
authorDan Dennedy <dan@dennedy.org>
Tue, 9 Nov 2010 03:15:24 +0000 (19:15 -0800)
committerDan Dennedy <dan@dennedy.org>
Tue, 9 Nov 2010 03:15:24 +0000 (19:15 -0800)
47 files changed:
AUTHORS [new file with mode: 0644]
COPYING [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
INSTALL [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
NEWS [new file with mode: 0644]
README [new file with mode: 0644]
autogen.sh [new file with mode: 0755]
configure.in [new file with mode: 0644]
gdv1394d.glade [new file with mode: 0644]
gdv1394d.gladep [new file with mode: 0644]
pixmaps/editor_fast.xpm [new file with mode: 0644]
pixmaps/editor_fast_i.xpm [new file with mode: 0644]
pixmaps/editor_movie.xpm [new file with mode: 0644]
pixmaps/editor_movie_i.xpm [new file with mode: 0644]
pixmaps/editor_pause.xpm [new file with mode: 0644]
pixmaps/editor_play.xpm [new file with mode: 0644]
pixmaps/editor_play_i.xpm [new file with mode: 0644]
pixmaps/editor_record.xpm [new file with mode: 0644]
pixmaps/editor_scene.xpm [new file with mode: 0644]
pixmaps/editor_scene_i.xpm [new file with mode: 0644]
pixmaps/editor_step.xpm [new file with mode: 0644]
pixmaps/editor_step_i.xpm [new file with mode: 0644]
pixmaps/editor_stop.xpm [new file with mode: 0644]
po/ChangeLog [new file with mode: 0644]
po/POTFILES.in [new file with mode: 0644]
po/gdv1394d.pot [new file with mode: 0644]
src/Makefile.am [new file with mode: 0644]
src/callbacks.c [new file with mode: 0644]
src/callbacks.h [new file with mode: 0644]
src/dv1394app.c [new file with mode: 0644]
src/dv1394app.h [new file with mode: 0644]
src/gtkenhancedscale.c [new file with mode: 0644]
src/gtkenhancedscale.h [new file with mode: 0644]
src/interface.c [new file with mode: 0644]
src/interface.h [new file with mode: 0644]
src/main.c [new file with mode: 0644]
src/page.c [new file with mode: 0644]
src/page.h [new file with mode: 0644]
src/page_clips.c [new file with mode: 0644]
src/page_command.c [new file with mode: 0644]
src/page_status.c [new file with mode: 0644]
src/page_units.c [new file with mode: 0644]
src/support.c [new file with mode: 0644]
src/support.h [new file with mode: 0644]
src/util.c [new file with mode: 0644]
src/util.h [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..d60c31a
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  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 Library 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.
+\f
+                   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.)
+\f
+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.
+\f
+  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.
+\f
+  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
+\f
+           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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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 Library General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..a4b3414
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,229 @@
+Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
+Foundation, Inc.
+
+   This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+   These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory.  After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+   By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..395b7be
--- /dev/null
@@ -0,0 +1,30 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = src po
+
+EXTRA_DIST = \
+       autogen.sh \
+       gdv1394d.glade \
+       gdv1394d.gladep
+
+install-data-local:
+       @$(NORMAL_INSTALL)
+       if test -d $(srcdir)/pixmaps; then \
+         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \
+         for pixmap in $(srcdir)/pixmaps/*; do \
+           if test -f $$pixmap; then \
+             $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \
+           fi \
+         done \
+       fi
+
+dist-hook:
+       if test -d pixmaps; then \
+         mkdir $(distdir)/pixmaps; \
+         for pixmap in pixmaps/*; do \
+           if test -f $$pixmap; then \
+             cp -p $$pixmap $(distdir)/pixmaps; \
+           fi \
+         done \
+       fi
+
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..c3591e1
--- /dev/null
@@ -0,0 +1,145 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+DIE=0
+
+if [ -n "$GNOME2_DIR" ]; then
+       ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
+       LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH"
+       PATH="$GNOME2_DIR/bin:$PATH"
+       export PATH
+       export LD_LIBRARY_PATH
+fi
+
+(test -f $srcdir/configure.in) || {
+    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+    echo " top-level package directory"
+    exit 1
+}
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: You must have \`autoconf' installed."
+  echo "Download the appropriate package for your distribution,"
+  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+  DIE=1
+}
+
+(grep "^AC_PROG_INTLTOOL" $srcdir/configure.in >/dev/null) && {
+  (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
+    echo 
+    echo "**Error**: You must have \`intltool' installed."
+    echo "You can get it from:"
+    echo "  ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/"
+    DIE=1
+  }
+}
+
+(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
+  (libtool --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`libtool' installed."
+    echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
+    DIE=1
+  }
+}
+
+grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
+  grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
+  (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`glib' installed."
+    echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
+    DIE=1
+  }
+}
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: You must have \`automake' installed."
+  echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
+  DIE=1
+  NO_AUTOMAKE=yes
+}
+
+
+# if no automake, don't bother testing for aclocal
+test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
+  echo "installed doesn't appear recent enough."
+  echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
+  DIE=1
+}
+
+if test "$DIE" -eq 1; then
+  exit 1
+fi
+
+if test -z "$*"; then
+  echo "**Warning**: I am going to run \`configure' with no arguments."
+  echo "If you wish to pass any to it, please specify them on the"
+  echo \`$0\'" command line."
+  echo
+fi
+
+case $CC in
+xlc )
+  am_opt=--include-deps;;
+esac
+
+for coin in `find $srcdir -name configure.in -print`
+do 
+  dr=`dirname $coin`
+  if test -f $dr/NO-AUTO-GEN; then
+    echo skipping $dr -- flagged as no auto-gen
+  else
+    echo processing $dr
+    ( cd $dr
+
+      aclocalinclude="$ACLOCAL_FLAGS"
+
+      if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
+       echo "Creating $dr/aclocal.m4 ..."
+       test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
+       echo "Running glib-gettextize...  Ignore non-fatal messages."
+       echo "no" | glib-gettextize --force --copy
+       echo "Making $dr/aclocal.m4 writable ..."
+       test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
+      fi
+      if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then
+        echo "Running intltoolize..."
+       intltoolize --copy --force --automake
+      fi
+      if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
+       if test -z "$NO_LIBTOOLIZE" ; then 
+         echo "Running libtoolize..."
+         libtoolize --force --copy
+       fi
+      fi
+      echo "Running aclocal $aclocalinclude ..."
+      aclocal $aclocalinclude
+      if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
+       echo "Running autoheader..."
+       autoheader
+      fi
+      echo "Running automake --gnu $am_opt ..."
+      automake --add-missing --gnu $am_opt
+      echo "Running autoconf ..."
+      autoconf
+    )
+  fi
+done
+
+conf_flags="--enable-maintainer-mode"
+
+if test x$NOCONFIGURE = x; then
+  echo Running $srcdir/configure $conf_flags "$@" ...
+  $srcdir/configure $conf_flags "$@" \
+  && echo Now type \`make\' to compile. || exit 1
+else
+  echo Skipping configure process.
+fi
diff --git a/configure.in b/configure.in
new file mode 100644 (file)
index 0000000..26444e3
--- /dev/null
@@ -0,0 +1,41 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT(configure.in)
+AM_INIT_AUTOMAKE(rugen, 0.2)
+AM_CONFIG_HEADER(config.h)
+AM_MAINTAINER_MODE
+
+AC_ISC_POSIX
+AC_PROG_CC
+AM_PROG_CC_STDC
+AC_HEADER_STDC
+
+pkg_modules="gtk+-2.0 >= 1.3.13"
+PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
+AC_SUBST(PACKAGE_CFLAGS)
+AC_SUBST(PACKAGE_LIBS)
+
+GETTEXT_PACKAGE=gdv1394d
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE","")
+
+dnl Add the languages which your application supports here.
+ALL_LINGUAS=""
+AM_GLIB_GNU_GETTEXT
+
+dnl Use -Wall if we have gcc.
+changequote(,)dnl
+if test "x$GCC" = "xyes"; then
+  case " $CFLAGS " in
+  *[\ \        ]-Wall[\ \      ]*) ;;
+  *) CFLAGS="$CFLAGS -Wall" ;;
+  esac
+fi
+changequote([,])dnl
+
+AC_OUTPUT([
+Makefile
+src/Makefile
+po/Makefile.in
+])
+
diff --git a/gdv1394d.glade b/gdv1394d.glade
new file mode 100644 (file)
index 0000000..dbc0c4e
--- /dev/null
@@ -0,0 +1,2504 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="gdv1394d">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Rugen</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">640</property>
+  <property name="default_height">480</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+       <widget class="GtkHandleBox" id="handlebox2">
+         <property name="visible">True</property>
+         <property name="shadow_type">GTK_SHADOW_OUT</property>
+         <property name="handle_position">GTK_POS_LEFT</property>
+         <property name="snap_edge">GTK_POS_TOP</property>
+
+         <child>
+           <widget class="GtkHBox" id="hbox27">
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">0</property>
+
+             <child>
+               <widget class="GtkVBox" id="vbox9">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">0</property>
+
+                 <child>
+                   <widget class="GtkMenuBar" id="menubar">
+                     <property name="visible">True</property>
+
+                     <child>
+                       <widget class="GtkMenuItem" id="menuitem1">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">_File</property>
+                         <property name="use_underline">True</property>
+
+                         <child>
+                           <widget class="GtkMenu" id="menuitem1_menu">
+
+                             <child>
+                               <widget class="GtkMenuItem" id="item_connect">
+                                 <property name="visible">True</property>
+                                 <property name="label" translatable="yes">_Connect</property>
+                                 <property name="use_underline">True</property>
+                               </widget>
+                             </child>
+
+                             <child>
+                               <widget class="GtkMenuItem" id="item_disconnect">
+                                 <property name="visible">True</property>
+                                 <property name="label" translatable="yes">_Disconnect</property>
+                                 <property name="use_underline">True</property>
+                               </widget>
+                             </child>
+
+                             <child>
+                               <widget class="GtkMenuItem" id="separatormenuitem1">
+                                 <property name="visible">True</property>
+                               </widget>
+                             </child>
+
+                             <child>
+                               <widget class="GtkMenuItem" id="item_quit">
+                                 <property name="visible">True</property>
+                                 <property name="label" translatable="yes">_Quit</property>
+                                 <property name="use_underline">True</property>
+                               </widget>
+                             </child>
+                           </widget>
+                         </child>
+                       </widget>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">True</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolbar" id="toolbar1">
+                 <property name="visible">True</property>
+                 <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+                 <property name="toolbar_style">GTK_TOOLBAR_ICONS</property>
+                 <property name="tooltips">True</property>
+
+                 <child>
+                   <widget class="button" id="button_connect">
+                     <property name="visible">True</property>
+                     <property name="tooltip" translatable="yes">Connect to a server</property>
+                     <property name="label" translatable="yes"></property>
+                     <property name="use_underline">True</property>
+                     <property name="stock_pixmap">gtk-yes</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="button" id="button_disconnect">
+                     <property name="visible">True</property>
+                     <property name="tooltip" translatable="yes">Disconnect from server</property>
+                     <property name="label" translatable="yes"></property>
+                     <property name="use_underline">True</property>
+                     <property name="stock_pixmap">gtk-stop</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkVSeparator" id="vseparator1">
+                     <property name="visible">True</property>
+                     <property name="new_group">True</property>
+                   </widget>
+                   <packing>
+                     <property name="new_group">True</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="button" id="button_quit">
+                     <property name="visible">True</property>
+                     <property name="tooltip" translatable="yes">Exit</property>
+                     <property name="label" translatable="yes"></property>
+                     <property name="use_underline">True</property>
+                     <property name="stock_pixmap">gtk-quit</property>
+                   </widget>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkHBox" id="hbox">
+         <property name="visible">True</property>
+         <property name="homogeneous">False</property>
+         <property name="spacing">0</property>
+
+         <child>
+           <widget class="GtkToolbar" id="toolbar2">
+             <property name="visible">True</property>
+             <property name="orientation">GTK_ORIENTATION_VERTICAL</property>
+             <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+             <property name="tooltips">True</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkVBox" id="vbox6">
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">0</property>
+
+             <child>
+               <widget class="GtkNotebook" id="notebook1">
+                 <property name="visible">True</property>
+                 <property name="show_tabs">False</property>
+                 <property name="show_border">True</property>
+                 <property name="tab_pos">GTK_POS_RIGHT</property>
+                 <property name="scrollable">False</property>
+                 <property name="enable_popup">True</property>
+
+                 <child>
+                   <placeholder/>
+                 </child>
+
+                 <child>
+                   <widget class="GtkLabel" id="label40">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes"></property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0.5</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                   </widget>
+                   <packing>
+                     <property name="type">tab</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkHBox" id="hbox20">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">0</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="label46">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes"></property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0.5</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">True</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox16">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">0</property>
+
+                     <child>
+                       <widget class="GtkButton" id="transport_0">
+                         <property name="width_request">34</property>
+                         <property name="height_request">25</property>
+                         <property name="visible">True</property>
+                         <property name="relief">GTK_RELIEF_NONE</property>
+
+                         <child>
+                           <widget class="GtkImage" id="image19">
+                             <property name="visible">True</property>
+                             <property name="pixbuf">editor_movie_i.xpm</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="transport_1">
+                         <property name="width_request">34</property>
+                         <property name="height_request">25</property>
+                         <property name="visible">True</property>
+                         <property name="relief">GTK_RELIEF_NONE</property>
+
+                         <child>
+                           <widget class="GtkImage" id="image18">
+                             <property name="visible">True</property>
+                             <property name="pixbuf">editor_scene_i.xpm</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="transport_2">
+                         <property name="width_request">34</property>
+                         <property name="height_request">25</property>
+                         <property name="visible">True</property>
+                         <property name="relief">GTK_RELIEF_NONE</property>
+
+                         <child>
+                           <widget class="GtkImage" id="image17">
+                             <property name="visible">True</property>
+                             <property name="pixbuf">editor_fast_i.xpm</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="transport_3">
+                         <property name="width_request">34</property>
+                         <property name="height_request">25</property>
+                         <property name="visible">True</property>
+                         <property name="relief">GTK_RELIEF_NONE</property>
+
+                         <child>
+                           <widget class="GtkImage" id="image12">
+                             <property name="visible">True</property>
+                             <property name="pixbuf">editor_step_i.xpm</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="transport_4">
+                         <property name="width_request">34</property>
+                         <property name="height_request">25</property>
+                         <property name="visible">True</property>
+                         <property name="relief">GTK_RELIEF_NONE</property>
+
+                         <child>
+                           <widget class="GtkImage" id="image11">
+                             <property name="visible">True</property>
+                             <property name="pixbuf">editor_pause.xpm</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="transport_5">
+                         <property name="width_request">34</property>
+                         <property name="height_request">25</property>
+                         <property name="visible">True</property>
+                         <property name="relief">GTK_RELIEF_NONE</property>
+
+                         <child>
+                           <widget class="GtkImage" id="image9">
+                             <property name="visible">True</property>
+                             <property name="pixbuf">editor_play.xpm</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="transport_6">
+                         <property name="width_request">34</property>
+                         <property name="height_request">25</property>
+                         <property name="visible">True</property>
+                         <property name="relief">GTK_RELIEF_NONE</property>
+
+                         <child>
+                           <widget class="GtkAlignment" id="alignment9">
+                             <property name="visible">True</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xscale">0</property>
+                             <property name="yscale">0</property>
+
+                             <child>
+                               <widget class="GtkHBox" id="hbox17">
+                                 <property name="visible">True</property>
+                                 <property name="homogeneous">False</property>
+                                 <property name="spacing">2</property>
+
+                                 <child>
+                                   <widget class="GtkImage" id="image10">
+                                     <property name="visible">True</property>
+                                     <property name="pixbuf">editor_stop.xpm</property>
+                                     <property name="xalign">0.5</property>
+                                     <property name="yalign">0.5</property>
+                                     <property name="xpad">0</property>
+                                     <property name="ypad">0</property>
+                                   </widget>
+                                   <packing>
+                                     <property name="padding">0</property>
+                                     <property name="expand">False</property>
+                                     <property name="fill">False</property>
+                                   </packing>
+                                 </child>
+
+                                 <child>
+                                   <widget class="GtkLabel" id="label41">
+                                     <property name="visible">True</property>
+                                     <property name="label" translatable="yes"></property>
+                                     <property name="use_underline">True</property>
+                                     <property name="use_markup">False</property>
+                                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                                     <property name="wrap">False</property>
+                                     <property name="selectable">False</property>
+                                     <property name="xalign">0.5</property>
+                                     <property name="yalign">0.5</property>
+                                     <property name="xpad">0</property>
+                                     <property name="ypad">0</property>
+                                   </widget>
+                                   <packing>
+                                     <property name="padding">0</property>
+                                     <property name="expand">False</property>
+                                     <property name="fill">False</property>
+                                   </packing>
+                                 </child>
+                               </widget>
+                             </child>
+                           </widget>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="transport_7">
+                         <property name="width_request">34</property>
+                         <property name="height_request">25</property>
+                         <property name="visible">True</property>
+                         <property name="relief">GTK_RELIEF_NONE</property>
+
+                         <child>
+                           <widget class="GtkImage" id="image13">
+                             <property name="visible">True</property>
+                             <property name="pixbuf">editor_step.xpm</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="transport_8">
+                         <property name="width_request">34</property>
+                         <property name="height_request">25</property>
+                         <property name="visible">True</property>
+                         <property name="relief">GTK_RELIEF_NONE</property>
+
+                         <child>
+                           <widget class="GtkImage" id="image14">
+                             <property name="visible">True</property>
+                             <property name="pixbuf">editor_fast.xpm</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="transport_9">
+                         <property name="width_request">34</property>
+                         <property name="height_request">25</property>
+                         <property name="visible">True</property>
+                         <property name="relief">GTK_RELIEF_NONE</property>
+
+                         <child>
+                           <widget class="GtkImage" id="image15">
+                             <property name="visible">True</property>
+                             <property name="pixbuf">editor_scene.xpm</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="transport_10">
+                         <property name="width_request">34</property>
+                         <property name="height_request">25</property>
+                         <property name="visible">True</property>
+                         <property name="relief">GTK_RELIEF_NONE</property>
+
+                         <child>
+                           <widget class="GtkImage" id="image16">
+                             <property name="visible">True</property>
+                             <property name="pixbuf">editor_movie.xpm</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkLabel" id="label47">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes"></property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0.5</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">True</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkVBox" id="vbox_trim">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">0</property>
+
+                 <child>
+                   <placeholder/>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkStatusbar" id="statusbar">
+         <property name="visible">True</property>
+         <property name="has_resize_grip">True</property>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="window_connection">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Connection</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_MOUSE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child>
+    <widget class="GtkTable" id="table2">
+      <property name="visible">True</property>
+      <property name="n_rows">3</property>
+      <property name="n_columns">2</property>
+      <property name="homogeneous">False</property>
+      <property name="row_spacing">0</property>
+      <property name="column_spacing">0</property>
+
+      <child>
+       <widget class="GtkLabel" id="label30">
+         <property name="visible">True</property>
+         <property name="label" translatable="yes">Server </property>
+         <property name="use_underline">False</property>
+         <property name="use_markup">False</property>
+         <property name="justify">GTK_JUSTIFY_LEFT</property>
+         <property name="wrap">False</property>
+         <property name="selectable">False</property>
+         <property name="xalign">0</property>
+         <property name="yalign">0.5</property>
+         <property name="xpad">0</property>
+         <property name="ypad">0</property>
+       </widget>
+       <packing>
+         <property name="left_attach">0</property>
+         <property name="right_attach">1</property>
+         <property name="top_attach">0</property>
+         <property name="bottom_attach">1</property>
+         <property name="x_options">fill</property>
+         <property name="y_options"></property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkLabel" id="label31">
+         <property name="visible">True</property>
+         <property name="label" translatable="yes">Port</property>
+         <property name="use_underline">False</property>
+         <property name="use_markup">False</property>
+         <property name="justify">GTK_JUSTIFY_LEFT</property>
+         <property name="wrap">False</property>
+         <property name="selectable">False</property>
+         <property name="xalign">0</property>
+         <property name="yalign">0.5</property>
+         <property name="xpad">0</property>
+         <property name="ypad">0</property>
+       </widget>
+       <packing>
+         <property name="left_attach">0</property>
+         <property name="right_attach">1</property>
+         <property name="top_attach">1</property>
+         <property name="bottom_attach">2</property>
+         <property name="x_options">fill</property>
+         <property name="y_options"></property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkEntry" id="entry_server">
+         <property name="visible">True</property>
+         <property name="can_focus">True</property>
+         <property name="editable">True</property>
+         <property name="visibility">True</property>
+         <property name="max_length">0</property>
+         <property name="text" translatable="yes">localhost</property>
+         <property name="has_frame">True</property>
+         <property name="invisible_char" translatable="yes">*</property>
+         <property name="activates_default">False</property>
+       </widget>
+       <packing>
+         <property name="left_attach">1</property>
+         <property name="right_attach">2</property>
+         <property name="top_attach">0</property>
+         <property name="bottom_attach">1</property>
+         <property name="y_options"></property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkHButtonBox" id="hbuttonbox4">
+         <property name="visible">True</property>
+         <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
+         <property name="spacing">0</property>
+
+         <child>
+           <widget class="GtkButton" id="button_connect">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="has_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="relief">GTK_RELIEF_NONE</property>
+             <accelerator key="Return" modifiers="0" signal="clicked"/>
+
+             <child>
+               <widget class="GtkAlignment" id="alignment2">
+                 <property name="visible">True</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xscale">0</property>
+                 <property name="yscale">0</property>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox8">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">2</property>
+
+                     <child>
+                       <widget class="GtkImage" id="image2">
+                         <property name="visible">True</property>
+                         <property name="stock">gtk-ok</property>
+                         <property name="icon_size">4</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkLabel" id="label32">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">Connect</property>
+                         <property name="use_underline">True</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="button_cancel">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="relief">GTK_RELIEF_NONE</property>
+
+             <child>
+               <widget class="GtkAlignment" id="alignment3">
+                 <property name="visible">True</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xscale">0</property>
+                 <property name="yscale">0</property>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox9">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">2</property>
+
+                     <child>
+                       <widget class="GtkImage" id="image3">
+                         <property name="visible">True</property>
+                         <property name="stock">gtk-no</property>
+                         <property name="icon_size">4</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkLabel" id="label33">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">Cancel</property>
+                         <property name="use_underline">True</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+       </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"></property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkHBox" id="hbox10">
+         <property name="visible">True</property>
+         <property name="homogeneous">False</property>
+         <property name="spacing">0</property>
+
+         <child>
+           <widget class="GtkEntry" id="entry_port">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="editable">True</property>
+             <property name="visibility">True</property>
+             <property name="max_length">5</property>
+             <property name="text" translatable="yes">5250</property>
+             <property name="has_frame">True</property>
+             <property name="invisible_char" translatable="yes">*</property>
+             <property name="activates_default">False</property>
+             <property name="width_chars">5</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <placeholder/>
+         </child>
+       </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="x_options">fill</property>
+         <property name="y_options">fill</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="page_status">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">page_status</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child>
+    <widget class="GtkScrolledWindow" id="scrolledwindow4">
+      <property name="visible">True</property>
+      <property name="can_focus">True</property>
+      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+      <property name="shadow_type">GTK_SHADOW_NONE</property>
+      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+      <child>
+       <widget class="GtkViewport" id="viewport1">
+         <property name="visible">True</property>
+         <property name="shadow_type">GTK_SHADOW_IN</property>
+
+         <child>
+           <widget class="GtkTable" id="table3">
+             <property name="visible">True</property>
+             <property name="n_rows">32</property>
+             <property name="n_columns">1</property>
+             <property name="homogeneous">False</property>
+             <property name="row_spacing">0</property>
+             <property name="column_spacing">0</property>
+
+             <child>
+               <widget class="GtkLabel" id="label_unit_0">
+                 <property name="label" translatable="yes">00</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">1</property>
+                 <property name="bottom_attach">2</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label_unit_1">
+                 <property name="label" translatable="yes">01</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">3</property>
+                 <property name="bottom_attach">4</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label_unit_2">
+                 <property name="label" translatable="yes">02</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">5</property>
+                 <property name="bottom_attach">6</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label_unit_3">
+                 <property name="label" translatable="yes">03</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">7</property>
+                 <property name="bottom_attach">8</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label_unit_4">
+                 <property name="label" translatable="yes">04</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">9</property>
+                 <property name="bottom_attach">10</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label_unit_5">
+                 <property name="label" translatable="yes">05</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">11</property>
+                 <property name="bottom_attach">12</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label_unit_6">
+                 <property name="label" translatable="yes">06</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">13</property>
+                 <property name="bottom_attach">14</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label_unit_7">
+                 <property name="label" translatable="yes">07</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">15</property>
+                 <property name="bottom_attach">16</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label_unit_8">
+                 <property name="label" translatable="yes">08</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">17</property>
+                 <property name="bottom_attach">18</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label_unit_9">
+                 <property name="label" translatable="yes">09</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">19</property>
+                 <property name="bottom_attach">20</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label_unit_10">
+                 <property name="label" translatable="yes">10</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">21</property>
+                 <property name="bottom_attach">22</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label_unit_11">
+                 <property name="label" translatable="yes">11</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">23</property>
+                 <property name="bottom_attach">24</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label_unit_13">
+                 <property name="label" translatable="yes">13</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">27</property>
+                 <property name="bottom_attach">28</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label_unit_14">
+                 <property name="label" translatable="yes">14</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">29</property>
+                 <property name="bottom_attach">30</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label_unit_15">
+                 <property name="label" translatable="yes">15</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">31</property>
+                 <property name="bottom_attach">32</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="radiobutton_0">
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">&lt;disconnected&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">0</property>
+                 <property name="bottom_attach">1</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="radiobutton_1">
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">&lt;disconnected&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">radiobutton_0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">2</property>
+                 <property name="bottom_attach">3</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="radiobutton_2">
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">&lt;disconnected&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">radiobutton_0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">4</property>
+                 <property name="bottom_attach">5</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="radiobutton_3">
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">&lt;disconnected&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">radiobutton_0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">6</property>
+                 <property name="bottom_attach">7</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="radiobutton_4">
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">&lt;disconnected&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">radiobutton_0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">8</property>
+                 <property name="bottom_attach">9</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="radiobutton_5">
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">&lt;disconnected&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">radiobutton_0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">10</property>
+                 <property name="bottom_attach">11</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="radiobutton_6">
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">&lt;disconnected&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">radiobutton_0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">12</property>
+                 <property name="bottom_attach">13</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="radiobutton_7">
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">&lt;disconnected&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">radiobutton_0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">14</property>
+                 <property name="bottom_attach">15</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="radiobutton_8">
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">&lt;disconnected&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">radiobutton_0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">16</property>
+                 <property name="bottom_attach">17</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="radiobutton_9">
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">&lt;disconnected&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">radiobutton_0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">18</property>
+                 <property name="bottom_attach">19</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="radiobutton_10">
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">&lt;disconnected&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">radiobutton_0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">20</property>
+                 <property name="bottom_attach">21</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="radiobutton_11">
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">&lt;disconnected&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">radiobutton_0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">22</property>
+                 <property name="bottom_attach">23</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label_unit_12">
+                 <property name="label" translatable="yes">12</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">25</property>
+                 <property name="bottom_attach">26</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="radiobutton_12">
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">&lt;disconnected&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">radiobutton_0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">24</property>
+                 <property name="bottom_attach">25</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="radiobutton_13">
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">&lt;disconnected&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">radiobutton_0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">26</property>
+                 <property name="bottom_attach">27</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="radiobutton_14">
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">&lt;disconnected&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">radiobutton_0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">28</property>
+                 <property name="bottom_attach">29</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkRadioButton" id="radiobutton_15">
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">&lt;disconnected&gt;</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">radiobutton_0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">30</property>
+                 <property name="bottom_attach">31</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+       </widget>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="page_clips">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">page_clips</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox8">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+       <widget class="GtkHBox" id="hbox26">
+         <property name="visible">True</property>
+         <property name="homogeneous">False</property>
+         <property name="spacing">0</property>
+
+         <child>
+           <widget class="GtkLabel" id="label_directory">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Disconnected</property>
+             <property name="use_underline">False</property>
+             <property name="use_markup">False</property>
+             <property name="justify">GTK_JUSTIFY_CENTER</property>
+             <property name="wrap">False</property>
+             <property name="selectable">False</property>
+             <property name="xalign">0</property>
+             <property name="yalign">0.5</property>
+             <property name="xpad">0</property>
+             <property name="ypad">0</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkOptionMenu" id="optionmenu1">
+             <property name="visible">True</property>
+             <property name="history">0</property>
+
+             <child>
+               <widget class="GtkMenu" id="menu1">
+
+                 <child>
+                   <widget class="GtkMenuItem" id="mode_0">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Play</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="mode_1">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Load</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="mode_2">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Queue</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="mode_3">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Insert</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkHPaned" id="hpaned1">
+         <property name="visible">True</property>
+         <property name="can_focus">True</property>
+         <property name="position">120</property>
+
+         <child>
+           <widget class="GtkTable" id="table1">
+             <property name="visible">True</property>
+             <property name="n_rows">1</property>
+             <property name="n_columns">1</property>
+             <property name="homogeneous">False</property>
+             <property name="row_spacing">0</property>
+             <property name="column_spacing">0</property>
+
+             <child>
+               <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                 <property name="shadow_type">GTK_SHADOW_NONE</property>
+                 <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+                 <child>
+                   <widget class="GtkTreeView" id="list_dir">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="has_focus">True</property>
+                     <property name="headers_visible">False</property>
+                     <property name="rules_hint">False</property>
+                     <property name="reorderable">False</property>
+                     <property name="enable_search">True</property>
+                   </widget>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">0</property>
+                 <property name="bottom_attach">1</property>
+                 <property name="x_options">expand|shrink|fill</property>
+                 <property name="y_options">expand|shrink|fill</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="shrink">True</property>
+             <property name="resize">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkVPaned" id="vpaned1">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="position">130</property>
+
+             <child>
+               <widget class="GtkTable" id="table5">
+                 <property name="visible">True</property>
+                 <property name="n_rows">1</property>
+                 <property name="n_columns">1</property>
+                 <property name="homogeneous">False</property>
+                 <property name="row_spacing">0</property>
+                 <property name="column_spacing">0</property>
+
+                 <child>
+                   <widget class="GtkScrolledWindow" id="scrolledwindow6">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                     <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                     <property name="shadow_type">GTK_SHADOW_NONE</property>
+                     <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+                     <child>
+                       <widget class="GtkTreeView" id="list_clips">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="headers_visible">False</property>
+                         <property name="rules_hint">False</property>
+                         <property name="reorderable">False</property>
+                         <property name="enable_search">False</property>
+                       </widget>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">0</property>
+                     <property name="right_attach">1</property>
+                     <property name="top_attach">0</property>
+                     <property name="bottom_attach">1</property>
+                     <property name="x_options">expand|shrink|fill</property>
+                     <property name="y_options">expand|shrink|fill</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="shrink">True</property>
+                 <property name="resize">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkTable" id="table4">
+                 <property name="n_rows">2</property>
+                 <property name="n_columns">1</property>
+                 <property name="homogeneous">False</property>
+                 <property name="row_spacing">0</property>
+                 <property name="column_spacing">0</property>
+
+                 <child>
+                   <widget class="GtkScrolledWindow" id="scrolledwindow5">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                     <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                     <property name="shadow_type">GTK_SHADOW_NONE</property>
+                     <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+                     <child>
+                       <widget class="GtkTreeView" id="treeview1">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="headers_visible">True</property>
+                         <property name="rules_hint">False</property>
+                         <property name="reorderable">False</property>
+                         <property name="enable_search">True</property>
+                       </widget>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">0</property>
+                     <property name="right_attach">1</property>
+                     <property name="top_attach">0</property>
+                     <property name="bottom_attach">1</property>
+                     <property name="x_options">expand|shrink|fill</property>
+                     <property name="y_options">expand|shrink|fill</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkAlignment" id="alignment12">
+                     <property name="visible">True</property>
+                     <property name="xalign">0.5</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xscale">1</property>
+                     <property name="yscale">1</property>
+
+                     <child>
+                       <widget class="GtkHBox" id="hbox19">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">0</property>
+
+                         <child>
+                           <widget class="GtkLabel" id="label44">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes"> </property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">True</property>
+                             <property name="fill">True</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkButton" id="button_clips_refresh">
+                             <property name="visible">True</property>
+                             <property name="can_default">True</property>
+                             <property name="relief">GTK_RELIEF_NONE</property>
+
+                             <child>
+                               <widget class="GtkAlignment" id="alignment5">
+                                 <property name="visible">True</property>
+                                 <property name="xalign">0</property>
+                                 <property name="yalign">0.5</property>
+                                 <property name="xscale">0</property>
+                                 <property name="yscale">0</property>
+
+                                 <child>
+                                   <widget class="GtkHBox" id="hbox12">
+                                     <property name="visible">True</property>
+                                     <property name="homogeneous">False</property>
+                                     <property name="spacing">2</property>
+
+                                     <child>
+                                       <widget class="GtkImage" id="image5">
+                                         <property name="visible">True</property>
+                                         <property name="stock">gtk-refresh</property>
+                                         <property name="icon_size">1</property>
+                                         <property name="xalign">0.5</property>
+                                         <property name="yalign">0.5</property>
+                                         <property name="xpad">0</property>
+                                         <property name="ypad">0</property>
+                                       </widget>
+                                       <packing>
+                                         <property name="padding">0</property>
+                                         <property name="expand">False</property>
+                                         <property name="fill">False</property>
+                                       </packing>
+                                     </child>
+
+                                     <child>
+                                       <widget class="GtkLabel" id="label36">
+                                         <property name="visible">True</property>
+                                         <property name="label" translatable="yes"></property>
+                                         <property name="use_underline">True</property>
+                                         <property name="use_markup">False</property>
+                                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                                         <property name="wrap">False</property>
+                                         <property name="selectable">False</property>
+                                         <property name="xalign">0.5</property>
+                                         <property name="yalign">0.5</property>
+                                         <property name="xpad">0</property>
+                                         <property name="ypad">0</property>
+                                       </widget>
+                                       <packing>
+                                         <property name="padding">0</property>
+                                         <property name="expand">False</property>
+                                         <property name="fill">False</property>
+                                       </packing>
+                                     </child>
+                                   </widget>
+                                 </child>
+                               </widget>
+                             </child>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkButton" id="button_clips_home">
+                             <property name="visible">True</property>
+                             <property name="can_default">True</property>
+                             <property name="relief">GTK_RELIEF_NONE</property>
+
+                             <child>
+                               <widget class="GtkAlignment" id="alignment6">
+                                 <property name="visible">True</property>
+                                 <property name="xalign">0</property>
+                                 <property name="yalign">0.5</property>
+                                 <property name="xscale">0</property>
+                                 <property name="yscale">0</property>
+
+                                 <child>
+                                   <widget class="GtkHBox" id="hbox13">
+                                     <property name="visible">True</property>
+                                     <property name="homogeneous">False</property>
+                                     <property name="spacing">2</property>
+
+                                     <child>
+                                       <widget class="GtkImage" id="image6">
+                                         <property name="visible">True</property>
+                                         <property name="stock">gtk-home</property>
+                                         <property name="icon_size">1</property>
+                                         <property name="xalign">0.5</property>
+                                         <property name="yalign">0.5</property>
+                                         <property name="xpad">0</property>
+                                         <property name="ypad">0</property>
+                                       </widget>
+                                       <packing>
+                                         <property name="padding">0</property>
+                                         <property name="expand">False</property>
+                                         <property name="fill">False</property>
+                                       </packing>
+                                     </child>
+
+                                     <child>
+                                       <widget class="GtkLabel" id="label37">
+                                         <property name="visible">True</property>
+                                         <property name="label" translatable="yes"></property>
+                                         <property name="use_underline">True</property>
+                                         <property name="use_markup">False</property>
+                                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                                         <property name="wrap">False</property>
+                                         <property name="selectable">False</property>
+                                         <property name="xalign">0.5</property>
+                                         <property name="yalign">0.5</property>
+                                         <property name="xpad">0</property>
+                                         <property name="ypad">0</property>
+                                       </widget>
+                                       <packing>
+                                         <property name="padding">0</property>
+                                         <property name="expand">False</property>
+                                         <property name="fill">False</property>
+                                       </packing>
+                                     </child>
+                                   </widget>
+                                 </child>
+                               </widget>
+                             </child>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkButton" id="button_up">
+                             <property name="visible">True</property>
+                             <property name="can_default">True</property>
+                             <property name="relief">GTK_RELIEF_NONE</property>
+
+                             <child>
+                               <widget class="GtkImage" id="image21">
+                                 <property name="visible">True</property>
+                                 <property name="stock">gtk-go-up</property>
+                                 <property name="icon_size">1</property>
+                                 <property name="xalign">0.5</property>
+                                 <property name="yalign">0.5</property>
+                                 <property name="xpad">0</property>
+                                 <property name="ypad">0</property>
+                               </widget>
+                             </child>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkButton" id="button_down">
+                             <property name="visible">True</property>
+                             <property name="can_default">True</property>
+                             <property name="relief">GTK_RELIEF_NONE</property>
+
+                             <child>
+                               <widget class="GtkImage" id="image22">
+                                 <property name="visible">True</property>
+                                 <property name="stock">gtk-go-down</property>
+                                 <property name="icon_size">1</property>
+                                 <property name="xalign">0.5</property>
+                                 <property name="yalign">0.5</property>
+                                 <property name="xpad">0</property>
+                                 <property name="ypad">0</property>
+                               </widget>
+                             </child>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkButton" id="button_remove">
+                             <property name="visible">True</property>
+                             <property name="can_default">True</property>
+                             <property name="relief">GTK_RELIEF_NONE</property>
+
+                             <child>
+                               <widget class="GtkImage" id="image23">
+                                 <property name="visible">True</property>
+                                 <property name="stock">gtk-delete</property>
+                                 <property name="icon_size">1</property>
+                                 <property name="xalign">0.5</property>
+                                 <property name="yalign">0.5</property>
+                                 <property name="xpad">0</property>
+                                 <property name="ypad">0</property>
+                               </widget>
+                             </child>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkButton" id="button_clean">
+                             <property name="visible">True</property>
+                             <property name="can_default">True</property>
+                             <property name="relief">GTK_RELIEF_NONE</property>
+
+                             <child>
+                               <widget class="GtkImage" id="image24">
+                                 <property name="visible">True</property>
+                                 <property name="stock">gtk-clear</property>
+                                 <property name="icon_size">1</property>
+                                 <property name="xalign">0.5</property>
+                                 <property name="yalign">0.5</property>
+                                 <property name="xpad">0</property>
+                                 <property name="ypad">0</property>
+                               </widget>
+                             </child>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkHButtonBox" id="hbuttonbox5">
+                             <property name="visible">True</property>
+                             <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
+                             <property name="spacing">0</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label45">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes"> </property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">True</property>
+                             <property name="fill">True</property>
+                           </packing>
+                         </child>
+                       </widget>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">0</property>
+                     <property name="right_attach">1</property>
+                     <property name="top_attach">1</property>
+                     <property name="bottom_attach">2</property>
+                     <property name="x_options">fill</property>
+                     <property name="y_options">fill</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="shrink">True</property>
+                 <property name="resize">True</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="shrink">True</property>
+             <property name="resize">True</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="page_shell">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">page_shell</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox4">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+       <widget class="GtkHBox" id="hbox6">
+         <property name="visible">True</property>
+         <property name="homogeneous">False</property>
+         <property name="spacing">0</property>
+
+         <child>
+           <widget class="GtkLabel" id="label10">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Command </property>
+             <property name="use_underline">False</property>
+             <property name="use_markup">False</property>
+             <property name="justify">GTK_JUSTIFY_LEFT</property>
+             <property name="wrap">False</property>
+             <property name="selectable">False</property>
+             <property name="xalign">0.5</property>
+             <property name="yalign">0.5</property>
+             <property name="xpad">0</property>
+             <property name="ypad">0</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkEntry" id="entry_command">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="editable">True</property>
+             <property name="visibility">True</property>
+             <property name="max_length">0</property>
+             <property name="text" translatable="yes"></property>
+             <property name="has_frame">True</property>
+             <property name="invisible_char" translatable="yes">*</property>
+             <property name="activates_default">False</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="button_command">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="has_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="relief">GTK_RELIEF_NONE</property>
+
+             <child>
+               <widget class="GtkAlignment" id="alignment7">
+                 <property name="visible">True</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xscale">0</property>
+                 <property name="yscale">0</property>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox14">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">2</property>
+
+                     <child>
+                       <widget class="GtkImage" id="image7">
+                         <property name="visible">True</property>
+                         <property name="stock">gtk-ok</property>
+                         <property name="icon_size">4</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkLabel" id="label38">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">_OK</property>
+                         <property name="use_underline">True</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="button_command_clear">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="relief">GTK_RELIEF_NONE</property>
+
+             <child>
+               <widget class="GtkAlignment" id="alignment8">
+                 <property name="visible">True</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xscale">0</property>
+                 <property name="yscale">0</property>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox15">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">2</property>
+
+                     <child>
+                       <widget class="GtkImage" id="image8">
+                         <property name="visible">True</property>
+                         <property name="stock">gtk-delete</property>
+                         <property name="icon_size">4</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkLabel" id="label39">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">Clear</property>
+                         <property name="use_underline">True</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">True</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_AUTOMATIC</property>
+         <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+         <property name="shadow_type">GTK_SHADOW_NONE</property>
+         <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+         <child>
+           <widget class="GtkTextView" id="textview_command">
+             <property name="visible">True</property>
+             <property name="editable">False</property>
+             <property name="justification">GTK_JUSTIFY_LEFT</property>
+             <property name="wrap_mode">GTK_WRAP_WORD</property>
+             <property name="cursor_visible">False</property>
+             <property name="pixels_above_lines">0</property>
+             <property name="pixels_below_lines">0</property>
+             <property name="pixels_inside_wrap">0</property>
+             <property name="left_margin">0</property>
+             <property name="right_margin">0</property>
+             <property name="indent">0</property>
+             <property name="text" translatable="yes"></property>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkHButtonBox" id="hbuttonbox3">
+         <property name="visible">True</property>
+         <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
+         <property name="spacing">0</property>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/gdv1394d.gladep b/gdv1394d.gladep
new file mode 100644 (file)
index 0000000..68cec64
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Gdv1394d</name>
+  <program_name>gdv1394d</program_name>
+  <gnome_support>FALSE</gnome_support>
+</glade-project>
diff --git a/pixmaps/editor_fast.xpm b/pixmaps/editor_fast.xpm
new file mode 100644 (file)
index 0000000..0d04554
--- /dev/null
@@ -0,0 +1,23 @@
+/* XPM */
+static char * editor_fast_xpm[] = {
+"19 15 5 1",
+"      c None",
+".     c #949594",
+"+     c #000000",
+"@     c #8E8E8E",
+"#     c #FFFFFF",
+"...      ...       ",
+".++.     .++.      ",
+".+++.    .+++.     ",
+".++++.   .++++.    ",
+".+++++.  .+++++.   ",
+".++++++. .++++++.  ",
+".+++++++..+++++++. ",
+".+++++++@#+++++++@#",
+".++++++@#.++++++@# ",
+".+++++@# .+++++@#  ",
+".++++@#  .++++@#   ",
+".+++@#   .+++@#    ",
+".++@#    .++@#     ",
+".+@#     .+@#      ",
+".##      .##       "};
diff --git a/pixmaps/editor_fast_i.xpm b/pixmaps/editor_fast_i.xpm
new file mode 100644 (file)
index 0000000..6cfdc52
--- /dev/null
@@ -0,0 +1,23 @@
+/* XPM */
+static char * editor_fast_i_xpm[] = {
+"19 15 5 1",
+"      c None",
+".     c #949594",
+"+     c #000000",
+"@     c #8E8E8E",
+"#     c #FFFFFF",
+"       ...      ...",
+"      .+@#     .+@#",
+"     .++@#    .++@#",
+"    .+++@#   .+++@#",
+"   .++++@#  .++++@#",
+"  .+++++@# .+++++@#",
+" .++++++@#.++++++@#",
+".+++++++@#+++++++@#",
+" .++++++@#.++++++@#",
+"  .+++++@# .+++++@#",
+"   .++++@#  .++++@#",
+"    .+++@#   .+++@#",
+"     .++@#    .++@#",
+"      .+@#     .+@#",
+"       .##      .##"};
diff --git a/pixmaps/editor_movie.xpm b/pixmaps/editor_movie.xpm
new file mode 100644 (file)
index 0000000..7c9e46f
--- /dev/null
@@ -0,0 +1,23 @@
+/* XPM */
+static char * editor_movie_xpm[] = {
+"24 15 5 1",
+"      c None",
+".     c #949594",
+"+     c #000000",
+"@     c #8E8E8E",
+"#     c #FFFFFF",
+"...      ...      ......",
+".++.     .++.     .+++@#",
+".+++.    .+++.    .+++@#",
+".++++.   .++++.   .+++@#",
+".+++++.  .+++++.  .+++@#",
+".++++++. .++++++. .+++@#",
+".+++++++..+++++++..+++@#",
+".+++++++@#+++++++@.+++@#",
+".++++++@#.++++++@#.+++@#",
+".+++++@# .+++++@# .+++@#",
+".++++@#  .++++@#  .+++@#",
+".+++@#   .+++@#   .+++@#",
+".++@#    .++@#    .+++@#",
+".+@#     .+@#     .+@@@#",
+".##      .##      .#####"};
diff --git a/pixmaps/editor_movie_i.xpm b/pixmaps/editor_movie_i.xpm
new file mode 100644 (file)
index 0000000..0a85b0a
--- /dev/null
@@ -0,0 +1,23 @@
+/* XPM */
+static char * editor_movie_i_xpm[] = {
+"25 15 5 1",
+"      c None",
+".     c #949594",
+"+     c #000000",
+"@     c #8E8E8E",
+"#     c #FFFFFF",
+"......      ...      ... ",
+".+++@#     .+@#     .+@# ",
+".+++@#    .++@#    .++@# ",
+".+++@#   .+++@#   .+++@# ",
+".+++@#  .++++@#  .++++@# ",
+".+++@# .+++++@# .+++++@# ",
+".+++@#.++++++@#.++++++@# ",
+".+++@#+++++++@#+++++++@# ",
+".+++@#.++++++@#.++++++@# ",
+".+++@# .+++++@# .+++++@# ",
+".+++@#  .++++@#  .++++@# ",
+".+++@#   .+++@#   .+++@# ",
+".+++@#    .++@#    .++@# ",
+".+@@@#     .+@#     .+@# ",
+".#####      .##      .## "};
diff --git a/pixmaps/editor_pause.xpm b/pixmaps/editor_pause.xpm
new file mode 100644 (file)
index 0000000..d23122c
--- /dev/null
@@ -0,0 +1,23 @@
+/* XPM */
+static char * editor_pause_xpm[] = {
+"13 15 5 1",
+"      c None",
+".     c #949594",
+"+     c #000000",
+"@     c #8E8E8E",
+"#     c #FFFFFF",
+"...... ......",
+".+++@# .+++@#",
+".+++@# .+++@#",
+".+++@# .+++@#",
+".+++@# .+++@#",
+".+++@# .+++@#",
+".+++@# .+++@#",
+".+++@# .+++@#",
+".+++@# .+++@#",
+".+++@# .+++@#",
+".+++@# .+++@#",
+".+++@# .+++@#",
+".+++@# .+++@#",
+".+@@@# .+@@@#",
+".##### .#####"};
diff --git a/pixmaps/editor_play.xpm b/pixmaps/editor_play.xpm
new file mode 100644 (file)
index 0000000..bf504cc
--- /dev/null
@@ -0,0 +1,23 @@
+/* XPM */
+static char * editor_play_xpm[] = {
+"13 15 5 1",
+"      c None",
+".     c #949594",
+"+     c #000000",
+"@     c #8E8E8E",
+"#     c #FFFFFF",
+"......       ",
+".+++++.      ",
+".++++++.     ",
+".+++++++.    ",
+".++++++++.   ",
+".+++++++++.  ",
+".++++++++++. ",
+".++++++++++@#",
+".+++++++++@# ",
+".++++++++@#  ",
+".+++++++@#   ",
+".++++++@#    ",
+".+++++@#     ",
+".+@@@@#      ",
+".#####       "};
diff --git a/pixmaps/editor_play_i.xpm b/pixmaps/editor_play_i.xpm
new file mode 100644 (file)
index 0000000..a7f2bf3
--- /dev/null
@@ -0,0 +1,23 @@
+/* XPM */
+static char * editor_play_i_xpm[] = {
+"13 15 5 1",
+"      c None",
+".     c #949594",
+"+     c #000000",
+"@     c #8E8E8E",
+"#     c #FFFFFF",
+"       ......",
+"      .++++@#",
+"     .+++++@#",
+"    .++++++@#",
+"   .+++++++@#",
+"  .++++++++@#",
+" .+++++++++@#",
+".++++++++++@#",
+" .+++++++++@#",
+"  .++++++++@#",
+"   .+++++++@#",
+"    .++++++@#",
+"     .+++++@#",
+"      .+@@@@#",
+"       .#####"};
diff --git a/pixmaps/editor_record.xpm b/pixmaps/editor_record.xpm
new file mode 100644 (file)
index 0000000..2064621
--- /dev/null
@@ -0,0 +1,22 @@
+/* XPM */
+static char * editor_record_xpm[] = {
+"15 15 4 1",
+"      c None",
+".     c #F48181",
+"+     c #E00606",
+"@     c #FFFFFF",
+"    .......    ",
+"  ...+++++...  ",
+" ..+++++++++.. ",
+" .+++++++++++. ",
+"..+++++++++++.@",
+".++++++++++++.@",
+".++++++++++++.@",
+".++++++++++++.@",
+".++++++++++++.@",
+".+++++++++++..@",
+"..++++++++++.@@",
+" .+++++++++..@ ",
+" ..++++++...@@ ",
+"  ...+....@@@  ",
+"    .@@@@@@    "};
diff --git a/pixmaps/editor_scene.xpm b/pixmaps/editor_scene.xpm
new file mode 100644 (file)
index 0000000..1cd52c4
--- /dev/null
@@ -0,0 +1,23 @@
+/* XPM */
+static char * editor_scene_xpm[] = {
+"17 15 5 1",
+"      c None",
+".     c #949594",
+"+     c #000000",
+"@     c #8E8E8E",
+"#     c #FFFFFF",
+" ...      ...... ",
+" .++.     .+++@# ",
+" .+++.    .+++@# ",
+" .++++.   .+++@# ",
+" .+++++.  .+++@# ",
+" .++++++. .+++@# ",
+" .+++++++..+++@# ",
+" .+++++++@#+++@# ",
+" .++++++@#.+++@# ",
+" .+++++@# .+++@# ",
+" .++++@#  .+++@# ",
+" .+++@#   .+++@# ",
+" .++@#    .+++@# ",
+" .+@#     .+@@@# ",
+" .##      .##### "};
diff --git a/pixmaps/editor_scene_i.xpm b/pixmaps/editor_scene_i.xpm
new file mode 100644 (file)
index 0000000..b18fab4
--- /dev/null
@@ -0,0 +1,23 @@
+/* XPM */
+static char * editor_scene_i_xpm[] = {
+"17 15 5 1",
+"      c None",
+".     c #949594",
+"+     c #000000",
+"@     c #8E8E8E",
+"#     c #FFFFFF",
+" ......      ... ",
+" .+++@#     .+@# ",
+" .+++@#    .++@# ",
+" .+++@#   .+++@# ",
+" .+++@#  .++++@# ",
+" .+++@# .+++++@# ",
+" .+++@#.++++++@# ",
+" .+++@#+++++++@# ",
+" .+++@#.++++++@# ",
+" .+++@# .+++++@# ",
+" .+++@#  .++++@# ",
+" .+++@#   .+++@# ",
+" .+++@#    .++@# ",
+" .+@@@#     .+@# ",
+" .#####      .## "};
diff --git a/pixmaps/editor_step.xpm b/pixmaps/editor_step.xpm
new file mode 100644 (file)
index 0000000..11a1366
--- /dev/null
@@ -0,0 +1,23 @@
+/* XPM */
+static char * editor_step_xpm[] = {
+"17 15 5 1",
+"      c None",
+".     c #949594",
+"+     c #000000",
+"@     c #8E8E8E",
+"#     c #FFFFFF",
+"...... ...       ",
+".+++@# .++.      ",
+".+++@# .+++.     ",
+".+++@# .++++.    ",
+".+++@# .+++++.   ",
+".+++@# .++++++.  ",
+".+++@# .+++++++. ",
+".+++@# .+++++++@#",
+".+++@# .++++++@# ",
+".+++@# .+++++@#  ",
+".+++@# .++++@#   ",
+".+++@# .+++@#    ",
+".+++@# .++@#     ",
+".+@@@# .+@#      ",
+".##### .##       "};
diff --git a/pixmaps/editor_step_i.xpm b/pixmaps/editor_step_i.xpm
new file mode 100644 (file)
index 0000000..91fe3f9
--- /dev/null
@@ -0,0 +1,23 @@
+/* XPM */
+static char * editor_step_i_xpm[] = {
+"17 15 5 1",
+"      c None",
+".     c #949594",
+"+     c #000000",
+"@     c #8E8E8E",
+"#     c #FFFFFF",
+"       ... ......",
+"      .+@# .+++@#",
+"     .++@# .+++@#",
+"    .+++@# .+++@#",
+"   .++++@# .+++@#",
+"  .+++++@# .+++@#",
+" .++++++@# .+++@#",
+".+++++++@# .+++@#",
+" .++++++@# .+++@#",
+"  .+++++@# .+++@#",
+"   .++++@# .+++@#",
+"    .+++@# .+++@#",
+"     .++@# .+++@#",
+"      .+@# .+@@@#",
+"       .## .#####"};
diff --git a/pixmaps/editor_stop.xpm b/pixmaps/editor_stop.xpm
new file mode 100644 (file)
index 0000000..7371232
--- /dev/null
@@ -0,0 +1,23 @@
+/* XPM */
+static char * editor_stop_xpm[] = {
+"15 15 5 1",
+"      c None",
+".     c #949594",
+"+     c #FFFFFF",
+"@     c #000000",
+"#     c #8E8E8E",
+"..............+",
+".@@@@@@@@@@@@#+",
+".@@@@@@@@@@@@#+",
+".@@@@@@@@@@@@#+",
+".@@@@@@@@@@@@#+",
+".@@@@@@@@@@@@#+",
+".@@@@@@@@@@@@#+",
+".@@@@@@@@@@@@#+",
+".@@@@@@@@@@@@#+",
+".@@@@@@@@@@@@#+",
+".@@@@@@@@@@@@#+",
+".@@@@@@@@@@@@#+",
+".@@@@@@@@@@@@#+",
+".@###...######+",
+".++++++++++++++"};
diff --git a/po/ChangeLog b/po/ChangeLog
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644 (file)
index 0000000..ab2d29e
--- /dev/null
@@ -0,0 +1,6 @@
+# List of source files containing translatable strings.
+
+src/main.c
+src/interface.c
+src/callbacks.c
+src/support.c
diff --git a/po/gdv1394d.pot b/po/gdv1394d.pot
new file mode 100644 (file)
index 0000000..68f199a
--- /dev/null
@@ -0,0 +1,202 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2004-04-12 16:35+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/interface.c:89
+msgid "Rugen"
+msgstr ""
+
+#: src/interface.c:112
+msgid "_File"
+msgstr ""
+
+#: src/interface.c:119
+msgid "_Connect"
+msgstr ""
+
+#: src/interface.c:123
+msgid "_Disconnect"
+msgstr ""
+
+#: src/interface.c:132
+msgid "_Quit"
+msgstr ""
+
+#: src/interface.c:146
+msgid "Connect to a server"
+msgstr ""
+
+#: src/interface.c:156
+msgid "Disconnect from server"
+msgstr ""
+
+#: src/interface.c:172
+msgid "Exit"
+msgstr ""
+
+#: src/interface.c:452
+msgid "Connection"
+msgstr ""
+
+#: src/interface.c:461
+msgid "Server "
+msgstr ""
+
+#: src/interface.c:469
+msgid "Port"
+msgstr ""
+
+#: src/interface.c:482
+msgid "localhost"
+msgstr ""
+
+#: src/interface.c:512
+msgid "Connect"
+msgstr ""
+
+#: src/interface.c:535
+msgid "Cancel"
+msgstr ""
+
+#: src/interface.c:550
+msgid "5250"
+msgstr ""
+
+#: src/interface.c:621
+msgid "page_status"
+msgstr ""
+
+#: src/interface.c:636
+msgid "00"
+msgstr ""
+
+#: src/interface.c:643
+msgid "01"
+msgstr ""
+
+#: src/interface.c:650
+msgid "02"
+msgstr ""
+
+#: src/interface.c:657
+msgid "03"
+msgstr ""
+
+#: src/interface.c:664
+msgid "04"
+msgstr ""
+
+#: src/interface.c:671
+msgid "05"
+msgstr ""
+
+#: src/interface.c:678
+msgid "06"
+msgstr ""
+
+#: src/interface.c:685
+msgid "07"
+msgstr ""
+
+#: src/interface.c:692
+msgid "08"
+msgstr ""
+
+#: src/interface.c:699
+msgid "09"
+msgstr ""
+
+#: src/interface.c:706
+msgid "10"
+msgstr ""
+
+#: src/interface.c:713
+msgid "11"
+msgstr ""
+
+#: src/interface.c:720
+msgid "13"
+msgstr ""
+
+#: src/interface.c:727
+msgid "14"
+msgstr ""
+
+#: src/interface.c:734
+msgid "15"
+msgstr ""
+
+#: src/interface.c:741 src/interface.c:748 src/interface.c:755
+#: src/interface.c:762 src/interface.c:769 src/interface.c:776
+#: src/interface.c:783 src/interface.c:790 src/interface.c:797
+#: src/interface.c:804 src/interface.c:811 src/interface.c:818
+#: src/interface.c:832 src/interface.c:839 src/interface.c:846
+#: src/interface.c:853
+msgid "<disconnected>"
+msgstr ""
+
+#: src/interface.c:825
+msgid "12"
+msgstr ""
+
+#: src/interface.c:950
+msgid "page_clips"
+msgstr ""
+
+#: src/interface.c:960
+msgid "Disconnected"
+msgstr ""
+
+#: src/interface.c:972
+msgid "Play"
+msgstr ""
+
+#: src/interface.c:976
+msgid "Load"
+msgstr ""
+
+#: src/interface.c:980
+msgid "Queue"
+msgstr ""
+
+#: src/interface.c:984
+msgid "Insert"
+msgstr ""
+
+#: src/interface.c:1057 src/interface.c:1158
+msgid " "
+msgstr ""
+
+#: src/interface.c:1236
+msgid "page_shell"
+msgstr ""
+
+#: src/interface.c:1246
+msgid "Command "
+msgstr ""
+
+#: src/interface.c:1273
+msgid "_OK"
+msgstr ""
+
+#: src/interface.c:1296
+msgid "Clear"
+msgstr ""
+
+#: src/support.c:90 src/support.c:114
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr ""
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644 (file)
index 0000000..af62520
--- /dev/null
@@ -0,0 +1,27 @@
+## Process this file with automake to produce Makefile.in
+
+INCLUDES = \
+       -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+       -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+       @PACKAGE_CFLAGS@
+
+bin_PROGRAMS = rugen
+
+rugen_SOURCES = \
+       main.c \
+       support.c support.h \
+       interface.c interface.h \
+       callbacks.c callbacks.h \
+       dv1394app.c dv1394app.h \
+       util.c util.h \
+       page.c page.h \
+       page_clips.c \
+       page_command.c \
+       page_status.c \
+       page_units.c \
+       gtkenhancedscale.c gtkenhancedscale.h
+
+rugen_CFLAGS = `pkg-config --cflags gthread-2.0` `mlt-config miracle --cflags`
+rugen_LDADD = @PACKAGE_LIBS@
+rugen_LDFLAGS = `pkg-config --libs gthread-2.0` `mlt-config miracle --libs`
+
diff --git a/src/callbacks.c b/src/callbacks.c
new file mode 100644 (file)
index 0000000..86e6ff5
--- /dev/null
@@ -0,0 +1,18 @@
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+
+#include "callbacks.h"
+#include "interface.h"
+#include "support.h"
+
+
+void
+curious                                (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+
+}
+
diff --git a/src/callbacks.h b/src/callbacks.h
new file mode 100644 (file)
index 0000000..298029f
--- /dev/null
@@ -0,0 +1,54 @@
+#include <gtk/gtk.h>
+
+
+void
+on_new1_activate                       (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_open1_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_save1_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_save_as1_activate                   (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_quit1_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_cut1_activate                       (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_copy1_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_paste1_activate                     (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_delete1_activate                    (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_about1_activate                     (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_home1_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_radiobutton_1_toggled               (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+curious                                (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
diff --git a/src/dv1394app.c b/src/dv1394app.c
new file mode 100644 (file)
index 0000000..b90ac6e
--- /dev/null
@@ -0,0 +1,517 @@
+/*
+ * dv1394app.c -- GTK+ 2 dv1394d client demo
+ * Copyright (C) 2002-2003 Charles Yates <charles.yates@pandora.be>
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
+
+#include "interface.h"
+#include "support.h"
+#include "dv1394app.h"
+#include "util.h"
+#include "page.h"
+#include "gtkenhancedscale.h"
+#include <valerie/valerie_remote.h>
+#include <miracle/miracle_local.h>
+
+
+/** Window close event.
+*/
+
+static gboolean on_main_window_delete_event( GtkWidget *widget, GdkEvent *event, gpointer user_data )
+{
+       gtk_exit( 0 );
+       return TRUE;
+}
+
+static gboolean instance_connect( dv1394app this, char *server, char *port )
+{
+       if ( this->parser == NULL )
+       {
+               if ( strstr( server, ".conf" ) == NULL )
+                       this->parser = valerie_parser_init_remote( server, atoi( port ) );
+               else
+                       this->parser = miracle_parser_init_local( );
+
+               this->command = valerie_init( this->parser );
+
+               if ( strstr( server, ".conf" ) != NULL )
+                       valerie_run( this->command, server );
+
+               if ( valerie_connect( this->command ) == valerie_ok )
+               {
+                       struct timespec t = { 1, 0 };
+                       nanosleep( &t, NULL );
+                       //gdk_threads_leave( );
+                       dv1394app_connect( this );
+                       //gdk_threads_enter( );
+               }
+               else
+               {
+                       valerie_close( this->command );
+                       valerie_parser_close( this->parser );
+                       this->parser = NULL;
+                       beep( );
+               }
+       }
+
+       return this->parser != NULL;
+}
+
+/** Connection window - Connect button pressed.
+*/
+
+static gboolean on_connect_pressed( GtkWidget *button, gpointer user_data )
+{
+       dv1394app this = user_data;
+       GtkWidget *widget;
+       char *server;
+       char *port;
+
+       if ( this->parser == NULL )
+       {
+               widget = lookup_widget( this->connect, "entry_server" );
+               server = ( char * )gtk_entry_get_text( GTK_ENTRY( widget ) );
+               widget = lookup_widget( this->connect, "entry_port" );
+               port = ( char * )gtk_entry_get_text( GTK_ENTRY( widget ) );
+               instance_connect( this, server, port );
+       }
+       gtk_widget_destroy( this->connect );
+
+       return FALSE;
+}
+
+/** Connection window - Cancel button pressed.
+*/
+
+static gboolean on_cancel_pressed( GtkWidget *button, gpointer user_data )
+{
+       dv1394app this = user_data;
+       gtk_widget_destroy( this->connect );
+       return FALSE;
+}
+
+/** Main window - connect menu item selected.
+*/
+
+void on_item_connect_activate( GtkMenuItem *menuitem, gpointer user_data )
+{
+       dv1394app this = user_data;
+       GtkWidget *widget;
+       
+       this->connect = create_window_connection( );
+       
+       /* Connection set up handling */
+       widget = lookup_widget( this->connect, "button_connect" );
+       gtk_signal_connect( GTK_OBJECT( widget ), "clicked", GTK_SIGNAL_FUNC( on_connect_pressed ), this );
+       widget = lookup_widget( this->connect, "button_cancel" );
+       gtk_signal_connect( GTK_OBJECT( widget ), "clicked", GTK_SIGNAL_FUNC( on_cancel_pressed ), this );
+       
+       gtk_widget_show( this->connect );
+}
+
+/** Main window - disconnect menu item selected.
+*/
+
+void on_item_disconnect_activate( GtkMenuItem *menuitem, gpointer user_data )
+{
+       dv1394app this = user_data;
+       dv1394app_disconnect( this );
+}
+
+/** Main window - quit menu item selected.
+*/
+
+void on_item_quit_activate( GtkMenuItem *menuitem, gpointer user_data )
+{
+       gtk_main_quit( );
+}
+
+static gboolean on_page_switch_pressed( GtkWidget *button, gpointer user_data )
+{
+       dv1394app this = user_data;
+       int index = 0;
+       GtkWidget *notebook = lookup_widget( button, "notebook1" );
+       
+       for ( index = 0; index < this->page_count; index ++ )
+       {
+               if ( this->page_buttons[ index ] == button )
+                       break;
+       }
+       
+       gtk_notebook_set_current_page( GTK_NOTEBOOK( notebook ), index );
+       
+       return TRUE;
+}
+
+static gboolean on_transport_pressed( GtkWidget *button, gpointer data )
+{
+       int index = 0;
+       dv1394app this = ( dv1394app )data;
+       valerie dv = dv1394app_get_command( this );
+       int unit = dv1394app_get_selected_unit( this );
+       
+       for ( index = 0; index < 11; index ++ )
+               if ( this->buttons[ index ] == button )
+                       break;
+       
+       switch( index )
+       {
+               case 0:
+                       valerie_unit_clip_goto( dv, unit, valerie_absolute, 0, 0 );
+                       break;
+               
+               case 1:
+                       valerie_unit_goto( dv, unit, 0 );
+                       break;
+               
+               case 2:
+                       valerie_unit_rewind( dv, unit );
+                       break;
+               
+               case 3:
+                       valerie_unit_step( dv, unit, -1 );
+                       break;
+               
+               case 4:
+                       valerie_unit_pause( dv, unit );
+                       break;
+               
+               case 5:
+                       valerie_unit_play( dv, unit );
+                       break;
+               
+               case 6:
+                       valerie_unit_stop( dv, unit );
+                       break;
+               
+               case 7:
+                       valerie_unit_step( dv, unit, 1 );
+                       break;
+               
+               case 8:
+                       valerie_unit_fast_forward( dv, unit );
+                       break;
+               
+               case 9:
+                       valerie_unit_clip_goto( dv, unit, valerie_relative, 1, 0 );
+                       break;
+               
+               case 10:
+                       valerie_unit_clip_goto( dv, unit, valerie_absolute, 9999, -1 );
+                       break;
+               
+               default:
+                       break;
+       }
+       
+       return TRUE;
+}
+
+static void dv1394app_register_page( dv1394app this, page item )
+{
+       GtkWidget *toolbar = lookup_widget( this->window, "toolbar2" );
+       GtkIconSize size = gtk_toolbar_get_icon_size( GTK_TOOLBAR( toolbar ) );
+       GtkWidget *widget = lookup_widget( this->window, "notebook1" );
+       GtkWidget *bin = gtk_frame_new( NULL );
+       char *label = NULL;
+       
+       this->pages[ this->page_count ] = item;
+       gtk_widget_reparent( GTK_BIN( page_get_widget( item ) )->child, bin );
+       gtk_container_add(GTK_CONTAINER( widget ), bin );
+       gtk_frame_set_label_align( GTK_FRAME( bin ), 0, 0 );
+       gtk_frame_set_shadow_type( GTK_FRAME( bin ), GTK_SHADOW_NONE );
+       gtk_widget_show( bin );
+       
+       page_get_toolbar_info( item, size, &widget, &label );
+       this->page_buttons[ this->page_count ] = gtk_toolbar_append_element( GTK_TOOLBAR ( toolbar ), GTK_TOOLBAR_CHILD_BUTTON, NULL, label, NULL, NULL, widget, NULL, NULL);
+       gtk_label_set_use_underline( GTK_LABEL(((GtkToolbarChild*)(g_list_last( GTK_TOOLBAR( toolbar )->children)->data))->label), TRUE);
+       gtk_widget_show( widget );
+       gtk_signal_connect( GTK_OBJECT( this->page_buttons[ this->page_count ] ), "clicked", GTK_SIGNAL_FUNC( on_page_switch_pressed ), this );
+       gtk_signal_connect( GTK_OBJECT( this->page_buttons[ this->page_count ] ), "activate", GTK_SIGNAL_FUNC( on_page_switch_pressed ), this );
+       
+       this->page_count ++;
+}
+
+static GtkAdjustment *trim_adj[3];
+#define TRIM_ADJ_POS 0
+#define TRIM_ADJ_IN 1
+#define TRIM_ADJ_OUT 2
+
+void dv1394app_show_status( dv1394app this, valerie_status status )
+{
+       int index = 0;
+       for ( index = 0; index < this->page_count; index ++ )
+               page_show_status( this->pages[ index ], status );
+       
+       if ( status->seek_flag != this->seek_flag )
+       {
+               gtk_widget_set_sensitive( lookup_widget( dv1394app_get_widget( this ), "transport_2" ), status->seek_flag );
+               gtk_widget_set_sensitive( lookup_widget( dv1394app_get_widget( this ), "transport_3" ), status->seek_flag );
+               gtk_widget_set_sensitive( lookup_widget( dv1394app_get_widget( this ), "transport_7" ), status->seek_flag );
+               gtk_widget_set_sensitive( lookup_widget( dv1394app_get_widget( this ), "transport_8" ), status->seek_flag );
+               this->seek_flag = status->seek_flag;
+       }
+       
+       if ( !this->trim_in_use )
+       {
+               int upper = status->length > 0 ? status->length - 1 : 0;
+               trim_adj[TRIM_ADJ_IN]->upper = upper;
+               trim_adj[TRIM_ADJ_IN]->value = status->in;
+               trim_adj[TRIM_ADJ_OUT]->upper = upper;
+               trim_adj[TRIM_ADJ_OUT]->value = status->out;
+               trim_adj[TRIM_ADJ_POS]->upper = upper;
+               trim_adj[TRIM_ADJ_POS]->value = status->position;
+               gtk_signal_emit_by_name( GTK_OBJECT(trim_adj[TRIM_ADJ_POS]), "value_changed" );
+       }
+}
+
+static gboolean trim_pressed( GtkWidget *button, GdkEventButton *event, gpointer user_data )
+{
+       dv1394app this = (dv1394app)user_data;
+       valerie_unit_pause( dv1394app_get_command( this ), this->selected_unit );
+       this->trim_in = -1;
+       this->trim_out = -1;
+       this->trim_in_use = 1;
+       return FALSE;
+}
+
+static gboolean trim_released( GtkWidget *button, GdkEventButton *event, gpointer user_data )
+{
+       dv1394app this = (dv1394app)user_data;
+       this->trim_in_use = 0;
+       if ( this->trim_in != -1 )
+               valerie_unit_set_in( dv1394app_get_command( this ), this->selected_unit, this->trim_in );
+       if ( this->trim_out != -1 )
+               valerie_unit_set_out( dv1394app_get_command( this ), this->selected_unit, this->trim_out );
+       return TRUE;
+}
+
+static gboolean on_trim_value_changed_event( GtkWidget *button, gpointer user_data )
+{
+       dv1394app this = (dv1394app)user_data;
+       if ( this->trim_in_use )
+       {
+               char *value;
+               g_object_get( G_OBJECT( button ), "user_data", &value, NULL );
+               
+               if ( !strcmp( value, "position" ) )
+               {
+                       valerie_unit_goto( dv1394app_get_command( this ), this->selected_unit, trim_adj[TRIM_ADJ_POS]->value );
+               }
+               else if ( !strcmp( value, "in" ) )
+               {
+                       this->trim_in = trim_adj[TRIM_ADJ_IN]->value;
+                       valerie_unit_goto( dv1394app_get_command( this ), this->selected_unit, trim_adj[TRIM_ADJ_IN]->value );
+               }
+               else if ( !strcmp( value, "out" ) )
+               {
+                       this->trim_out = trim_adj[TRIM_ADJ_OUT]->value;
+                       valerie_unit_goto( dv1394app_get_command( this ), this->selected_unit, trim_adj[TRIM_ADJ_OUT]->value );
+               }
+               
+               gtk_widget_queue_draw (lookup_widget(this->window, "vbox_trim") );
+               return TRUE;
+       }
+       return FALSE;
+}
+
+/** Initialiser for application state.
+*/
+
+dv1394app dv1394app_init( GtkWidget *window, char *instance )
+{
+       dv1394app this = calloc( 1, sizeof( dv1394app_t ) );
+
+       if ( this != NULL )
+       {
+               GtkWidget *widget;
+               
+               this->window = window;
+               
+               /* Window destroy event */
+               gtk_signal_connect( GTK_OBJECT( this->window ), "destroy", GTK_SIGNAL_FUNC( on_main_window_delete_event ), this );
+
+               /* Menu item signal handling */
+               widget = lookup_widget( this->window, "item_connect" );
+               gtk_signal_connect( GTK_OBJECT( widget ), "activate", GTK_SIGNAL_FUNC( on_item_connect_activate ), this );
+               widget = lookup_widget( this->window, "button_connect" );
+               gtk_signal_connect( GTK_OBJECT( widget ), "clicked", GTK_SIGNAL_FUNC( on_item_connect_activate ), this );
+               widget = lookup_widget( this->window, "item_disconnect" );
+               gtk_signal_connect( GTK_OBJECT( widget ), "activate", GTK_SIGNAL_FUNC( on_item_disconnect_activate ), this );
+               widget = lookup_widget( this->window, "button_disconnect" );
+               gtk_signal_connect( GTK_OBJECT( widget ), "clicked", GTK_SIGNAL_FUNC( on_item_disconnect_activate ), this );
+               widget = lookup_widget( this->window, "item_quit" );
+               gtk_signal_connect( GTK_OBJECT( widget ), "activate", GTK_SIGNAL_FUNC( on_item_quit_activate ), this );
+               widget = lookup_widget( this->window, "button_quit" );
+               gtk_signal_connect( GTK_OBJECT( widget ), "clicked", GTK_SIGNAL_FUNC( on_item_quit_activate ), this );
+
+               /* Initialise the pages. */
+               dv1394app_register_page( this, page_status_init( this ) );
+               dv1394app_register_page( this, page_clips_init( this ) );
+               dv1394app_register_page( this, page_command_init( this ) );
+
+               /* Remove the empty page */
+               widget = lookup_widget( this->window, "notebook1" );
+               gtk_notebook_remove_page( GTK_NOTEBOOK( widget ), 0 );
+               
+               guint keys[ ] = { GDK_0, GDK_1, GDK_2, GDK_3, GDK_4, GDK_5, GDK_6, GDK_7, GDK_8, GDK_9, GDK_A };
+               int index;
+               GtkAccelGroup *accel_group = gtk_accel_group_new( );
+               
+               for ( index = 0; index < 11; index ++ )
+               {
+                       char name[ 256 ];
+                       sprintf( name, "transport_%d", index );
+                       this->buttons[ index ] = lookup_widget( dv1394app_get_widget( this ), name );
+                       gtk_signal_connect( GTK_OBJECT( this->buttons[ index ] ), "clicked", GTK_SIGNAL_FUNC( on_transport_pressed ), this );
+                       gtk_widget_add_accelerator( this->buttons[ index ], "clicked", accel_group, keys[ index ], GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE );
+               }
+               
+               gtk_window_add_accel_group( GTK_WINDOW( dv1394app_get_widget( this ) ), accel_group);
+               
+               trim_adj[TRIM_ADJ_POS] = GTK_ADJUSTMENT( gtk_adjustment_new( 0, 0, 1000, 1, 10, 0 ) );
+               g_object_set( G_OBJECT( trim_adj[TRIM_ADJ_POS] ), "user_data", "position", NULL );
+               trim_adj[TRIM_ADJ_IN] = GTK_ADJUSTMENT( gtk_adjustment_new( 0, 0, 1000, 1, 10, 0 ) );
+               g_object_set( G_OBJECT( trim_adj[TRIM_ADJ_IN] ), "user_data", "in", NULL );
+               trim_adj[TRIM_ADJ_OUT] = GTK_ADJUSTMENT( gtk_adjustment_new( 0, 0, 1000, 1, 10, 0 ) );
+               g_object_set( G_OBJECT( trim_adj[TRIM_ADJ_OUT] ), "user_data", "out", NULL );
+               
+               int i;
+               for (i = 0; i < 3; i++)
+                       gtk_signal_connect (GTK_OBJECT (trim_adj[i]), "value_changed", GTK_SIGNAL_FUNC (on_trim_value_changed_event), this );
+               
+               GtkWidget *trim = gtk_enhanced_scale_new( (GtkObject**) trim_adj, 3);
+               if ( trim != NULL )
+               {
+                       gtk_widget_set_name (trim, "trim");
+                       GTK_WIDGET_UNSET_FLAGS( GTK_WIDGET( trim ), GTK_CAN_FOCUS );
+                       gtk_widget_ref(trim);
+                       gtk_object_set_data_full (GTK_OBJECT( this->window ), "trim", trim,     (GtkDestroyNotify) gtk_widget_unref);
+                       GtkWidget *vbox_trim = lookup_widget(this->window, "vbox_trim");
+                       gtk_widget_show(trim);
+                       gtk_box_pack_start(GTK_BOX (vbox_trim), trim, TRUE, TRUE, 0);
+                       gtk_signal_connect( GTK_OBJECT( trim ), "button_press_event", GTK_SIGNAL_FUNC (trim_pressed), this );
+                       gtk_signal_connect( GTK_OBJECT( trim ), "button_release_event", GTK_SIGNAL_FUNC (trim_released), this );
+               }
+               this->seek_flag = 1;
+       }
+
+       if ( instance != NULL )
+       {
+               char *server = strdup( instance );
+               char *port = strchr( server, ':' );
+               if ( port != NULL )
+                       *port ++ = '\0';
+               else
+                       port = "5250";
+               instance_connect( this, server, port );
+               free( server );
+       }
+
+
+       return this;
+}
+
+/** Get the app window widget.
+*/
+
+GtkWidget *dv1394app_get_widget( dv1394app this )
+{
+       return this->window;
+}
+
+/** Get the applications parser.
+*/
+
+valerie_parser dv1394app_get_parser( dv1394app this )
+{
+       return this->parser;
+}
+
+/** Return the command parser.
+*/
+
+valerie dv1394app_get_command( dv1394app this )
+{
+       return this->command;
+}
+
+/** Issue a connect to all pages.
+*/
+
+void dv1394app_connect( dv1394app this )
+{
+       int index = 0;
+       for ( index = 0; index < this->page_count; index ++ )
+               page_on_connect( this->pages[ index ] );
+}
+
+/** Inform all pages that the unit has changed.
+*/
+
+void dv1394app_on_unit_change( dv1394app this, int unit )
+{
+       int index = 0;
+       this->selected_unit = unit;
+       for ( index = 0; index < this->page_count; index ++ )
+               page_on_unit_change( this->pages[ index ], unit );
+}
+
+/** Return the selected unit.
+*/
+
+int dv1394app_get_selected_unit( dv1394app this )
+{
+       return this->selected_unit;
+}
+
+/** Issue a disconnect to all pages.
+*/
+
+void dv1394app_disconnect( dv1394app this )
+{
+       int index = 0;
+       if ( this->parser != NULL )
+       {
+               for ( index = 0; index < this->page_count; index ++ )
+                       page_on_disconnect( this->pages[ index ] );
+               valerie_close( this->command );
+               this->command = NULL;
+               valerie_parser_close( this->parser );
+               this->parser = NULL;
+       }
+}
+
+/** Close application.
+*/
+
+void dv1394app_close( dv1394app this )
+{
+       dv1394app_disconnect( this );
+       while ( this->page_count > 0 )
+               page_close( this->pages[ -- this->page_count ] );
+       free( this );
+}
diff --git a/src/dv1394app.h b/src/dv1394app.h
new file mode 100644 (file)
index 0000000..a008e4e
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * dv1394app.h -- GTK+ 2 dv1394d client demo
+ * Copyright (C) 2002-2003 Charles Yates <charles.yates@pandora.be>
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+#ifndef _DV1394_APP_
+#define _DV1394_APP_
+
+#include <gtk/gtk.h>
+#include <valerie/valerie.h>
+
+typedef struct page_t *page;
+       
+typedef struct
+{
+       GtkWidget *window;
+       GtkWidget *connect;
+       valerie_parser parser;
+       valerie command;
+       int page_count;
+       GtkWidget *page_buttons[ 10 ];
+       page pages[ 10 ];
+       int selected_unit;
+       
+       // TODO: This comes out later
+       GtkWidget *buttons[ 12 ];
+       
+       int trim_in_use;
+       int seek_flag;
+       
+       int trim_in;
+       int trim_out;
+}
+*dv1394app, dv1394app_t;
+
+extern dv1394app dv1394app_init( GtkWidget *, char * );
+extern GtkWidget *dv1394app_get_widget( dv1394app );
+extern valerie_parser dv1394app_get_parser( dv1394app );
+extern valerie dv1394app_get_command( dv1394app );
+extern void dv1394app_connect( dv1394app );
+extern void dv1394app_on_unit_change( dv1394app, int );
+extern int dv1394app_get_selected_unit( dv1394app );
+extern void dv1394app_show_status( dv1394app, valerie_status );
+extern void dv1394app_disconnect( dv1394app );
+extern void dv1394app_close( dv1394app );
+
+#endif
+
diff --git a/src/gtkenhancedscale.c b/src/gtkenhancedscale.c
new file mode 100644 (file)
index 0000000..5e0d89f
--- /dev/null
@@ -0,0 +1,1176 @@
+/* GtkEnhancedScale - A gtk(h)scale with multiple sliders
+ * Copyright (C) 2001 - Ronald Bultje
+ * Modified look-and-feel by Dan Dennedy
+ * 
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, 
+ * USA.
+ */
+
+/* Some code used was taken from GtkScale and GtkRange, all part
+ * of the Gimp Toolkit (Gtk+), http://www.gtk.org/
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtkmain.h>
+#include <gtk/gtksignal.h>
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtkadjustment.h>
+#include "gtkenhancedscale.h"
+#include <string.h>
+#include <stdio.h>
+#include <malloc.h>
+#include <math.h>
+
+#define ENHANCED_SCALE_CLASS(w)  GTK_ENHANCED_SCALE_CLASS ( G_OBJECT_GET_CLASS( G_OBJECT( w )  ) )
+/* #define DEBUG */
+
+static void gtk_enhanced_scale_class_init (GtkEnhancedScaleClass *klass);
+static void gtk_enhanced_scale_init (GtkEnhancedScale *enhanced_scale);
+static void gtk_enhanced_scale_destroy (GtkObject *object);
+static void gtk_enhanced_scale_realize (GtkWidget *widget);
+static void gtk_enhanced_scale_unrealize (GtkWidget *widget);
+static void gtk_enhanced_scale_size_request (GtkWidget *widget, GtkRequisition *requisition);
+static void gtk_enhanced_scale_size_allocate (GtkWidget *widget, GtkAllocation *allocation);
+static gint gtk_enhanced_scale_expose (GtkWidget *widget, GdkEventExpose *event);
+static void gtk_enhanced_scale_pos_trough (GtkEnhancedScale *enhanced_scale, gint *x, gint *y, gint *w, gint *h);
+static void gtk_enhanced_scale_draw (GtkWidget *widget, GdkRectangle *area);
+static void gtk_enhanced_scale_draw_slider (GtkEnhancedScale *enhanced_scale, gint i);
+static void gtk_enhanced_scale_draw_trough (GtkEnhancedScale *enhanced_scale);
+static void gtk_enhanced_scale_slider_update (GtkEnhancedScale *enhanced_scale, gint i);
+static void gtk_enhanced_scale_trough_hdims (GtkEnhancedScale *enhanced_scale, gint *left, gint *right, gint i);
+static void gtk_enhanced_scale_get_slider_position(GtkEnhancedScale *enhanced_scale,gint *x, gint *y, gint i);
+static gint gtk_enhanced_scale_get_stepper_spacing(GtkWidget *widget);
+static gint gtk_enhanced_scale_get_trough_border(GtkWidget *widget);
+/*static gint gtk_enhanced_scale_get_stepper_size(GtkWidget *widget);*/
+static gint gtk_enhanced_scale_get_slider_width(GtkWidget *widget);
+static gint gtk_enhanced_scale_button_press(GtkWidget *widget, GdkEventButton *event);
+static gint gtk_enhanced_scale_button_release(GtkWidget *widget, GdkEventButton *event);
+static gint gtk_enhanced_scale_motion_notify(GtkWidget *widget, GdkEventMotion *event);
+static void gtk_enhanced_scale_motion_x(GtkEnhancedScale *enhanced_scale, gint x, gint i);
+static gint gtk_enhanced_scale_key_press(GtkWidget *widget, GdkEventKey *event);
+static gint gtk_enhanced_scale_enter_notify(GtkWidget *widget, GdkEventCrossing *event);
+static gint gtk_enhanced_scale_leave_notify(GtkWidget *widget, GdkEventCrossing *event);
+static gint gtk_enhanced_scale_focus_in(GtkWidget *widget, GdkEventFocus *event);
+static gint gtk_enhanced_scale_focus_out(GtkWidget *widget, GdkEventFocus *event);
+static void gtk_enhanced_scale_style_set(GtkWidget *widget, GtkStyle *style);
+static void gtk_enhanced_scale_adjustment_value_changed(GtkAdjustment *adjustment, gpointer data);
+
+static GtkWidgetClass *parent_class = NULL;
+
+/* ================================================================= */
+
+guint gtk_enhanced_scale_get_type ()
+{
+       static guint enhanced_scale_type = 0;
+
+       if (!enhanced_scale_type)
+       {
+               GtkTypeInfo enhanced_scale_info =
+               {
+                       "GtkEnhancedScale",
+                       sizeof (GtkEnhancedScale),
+                       sizeof (GtkEnhancedScaleClass),
+                       (GtkClassInitFunc) gtk_enhanced_scale_class_init,
+                       (GtkObjectInitFunc) gtk_enhanced_scale_init,
+                       NULL,
+                       NULL,
+               };
+               enhanced_scale_type = gtk_type_unique (gtk_widget_get_type (),
+                       &enhanced_scale_info);
+       }
+       return enhanced_scale_type;
+}
+
+static void gtk_enhanced_scale_class_init (GtkEnhancedScaleClass *class)
+{
+       GtkObjectClass *object_class;
+       GtkWidgetClass *widget_class;
+
+       object_class = (GtkObjectClass*) class;
+       widget_class = (GtkWidgetClass*) class;
+       parent_class = gtk_type_class (gtk_widget_get_type ());
+
+       object_class->destroy = gtk_enhanced_scale_destroy;
+
+       widget_class->realize = gtk_enhanced_scale_realize;
+       widget_class->unrealize = gtk_enhanced_scale_unrealize;
+       widget_class->expose_event = gtk_enhanced_scale_expose;
+       widget_class->size_request = gtk_enhanced_scale_size_request;
+       widget_class->size_allocate = gtk_enhanced_scale_size_allocate;
+
+       /* Events and their corresponding reaction-functions */
+       widget_class->button_press_event = gtk_enhanced_scale_button_press;
+       widget_class->button_release_event = gtk_enhanced_scale_button_release;
+       widget_class->motion_notify_event = gtk_enhanced_scale_motion_notify;
+       widget_class->key_press_event = gtk_enhanced_scale_key_press;
+       widget_class->enter_notify_event = gtk_enhanced_scale_enter_notify;
+       widget_class->leave_notify_event = gtk_enhanced_scale_leave_notify;
+       widget_class->focus_in_event = gtk_enhanced_scale_focus_in;
+       widget_class->focus_out_event = gtk_enhanced_scale_focus_out;
+       widget_class->style_set = gtk_enhanced_scale_style_set;
+
+       class->slider_width = 32;
+       class->trough_width = 10;
+       class->stepper_size = 11;
+       class->stepper_slider_spacing = 1;
+       class->trough = 1;
+       class->slider = 2;
+       class->arrow_width = 20;
+       class->arrow_height = 10;
+}
+
+static void gtk_enhanced_scale_init (GtkEnhancedScale *enhanced_scale)
+{
+       enhanced_scale->in_child = 0;
+       enhanced_scale->click_child = 0;
+       enhanced_scale->active_slider = 0; /* default */
+       enhanced_scale->clicked_slider = -1; /* none */
+       enhanced_scale->x_click_point = 0;
+       enhanced_scale->breaks = NULL;
+
+       GTK_WIDGET_SET_FLAGS (GTK_WIDGET(enhanced_scale), GTK_CAN_FOCUS);
+}
+
+GtkWidget* gtk_enhanced_scale_new (GtkObject *adjustment[],
+                                   gint num_adjustments)
+{
+       GtkEnhancedScale *enhanced_scale;
+       int i;
+
+       for(i=0;i<num_adjustments;i++)
+       {
+               if (adjustment[i] == NULL) return NULL;
+       }
+
+       enhanced_scale = gtk_type_new (gtk_enhanced_scale_get_type ());
+       enhanced_scale->adjustment = adjustment;
+       enhanced_scale->num_adjustments = num_adjustments;
+
+       enhanced_scale->handler_id = malloc(num_adjustments);
+
+       for (i=0;i<num_adjustments;i++)
+       {
+               enhanced_scale->handler_id[i] = gtk_signal_connect (adjustment[i], "value_changed",
+                       (GtkSignalFunc) gtk_enhanced_scale_adjustment_value_changed,
+                       (gpointer) enhanced_scale);
+       }
+
+       return GTK_WIDGET (enhanced_scale);
+}
+
+static void gtk_enhanced_scale_destroy (GtkObject *object)
+{
+       GtkEnhancedScale *enhanced_scale;
+       gint i;
+
+       g_return_if_fail (object != NULL);
+       g_return_if_fail (GTK_IS_ENHANCED_SCALE (object));
+
+       enhanced_scale = GTK_ENHANCED_SCALE (object);
+#ifdef DEBUG
+       printf("Received destroy signal, let's disappear!\n");
+#endif
+       for(i=0;i<enhanced_scale->num_adjustments;i++)
+               gtk_signal_disconnect(enhanced_scale->adjustment[i], enhanced_scale->handler_id[i]);
+       
+       if ( enhanced_scale->breaks != NULL )
+               g_array_free( enhanced_scale->breaks, TRUE );
+
+       if (GTK_OBJECT_CLASS (parent_class)->destroy)
+               (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+#ifdef DEBUG
+       printf("Finished destroy signal\n");
+#endif
+}
+
+static void gtk_enhanced_scale_realize (GtkWidget *widget)
+{
+       GdkWindowAttr attributes;
+       GtkEnhancedScale *enhanced_scale;
+       gint attributes_mask;
+       gint x=0, y=0, w=0, h=0;
+       gint slider_width;
+       gint i;
+
+       g_return_if_fail (widget != NULL);
+       g_return_if_fail (GTK_IS_ENHANCED_SCALE (widget));
+
+       slider_width = gtk_enhanced_scale_get_slider_width(widget);
+
+       GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+       enhanced_scale = GTK_ENHANCED_SCALE (widget);
+
+       attributes.x = widget->allocation.x;
+       attributes.y = widget->allocation.y;
+       attributes.width = widget->allocation.width;
+       attributes.height = widget->allocation.height;
+       attributes.wclass = GDK_INPUT_OUTPUT;
+       attributes.window_type = GDK_WINDOW_CHILD;
+       attributes.event_mask = gtk_widget_get_events (widget) | 
+               GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | 
+               GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK |
+               GDK_POINTER_MOTION_HINT_MASK;
+       attributes.visual = gtk_widget_get_visual (widget);
+       attributes.colormap = gtk_widget_get_colormap (widget);
+       attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+       widget->window = gdk_window_new (widget->parent->window, &attributes, attributes_mask);
+
+       gtk_enhanced_scale_pos_trough (enhanced_scale, &x, &y, &w, &h);
+       attributes.x = x;
+       attributes.y = y;
+       attributes.width = w;
+       attributes.height = h;
+       attributes.wclass = GDK_INPUT_OUTPUT;
+       attributes.window_type = GDK_WINDOW_CHILD;
+       attributes.event_mask = gtk_widget_get_events (widget) | 
+       (GDK_EXPOSURE_MASK |
+       GDK_BUTTON_PRESS_MASK |
+       GDK_BUTTON_RELEASE_MASK |
+       GDK_ENTER_NOTIFY_MASK |
+       GDK_LEAVE_NOTIFY_MASK);
+       attributes.visual = gtk_widget_get_visual (widget);
+       attributes.colormap = gtk_widget_get_colormap (widget);
+       attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+#ifdef DEBUG
+       printf("Scale trough properties - x: %d, y: %d, w: %d, h: %d\n",x,y,w,h);
+#endif
+       enhanced_scale->trough = gdk_window_new (widget->window, &attributes, attributes_mask);
+
+       enhanced_scale->slider = malloc(enhanced_scale->num_adjustments);
+       attributes.width = ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width;
+       attributes.height = ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height;
+       attributes.event_mask |= (GDK_BUTTON_MOTION_MASK |
+       GDK_POINTER_MOTION_HINT_MASK);
+       enhanced_scale->slider[0] = gdk_window_new (enhanced_scale->trough,
+               &attributes, attributes_mask);
+       attributes.y += ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height + ENHANCED_SCALE_CLASS (enhanced_scale)->trough_width;
+       attributes.width = ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2;
+       for(i=1;i<enhanced_scale->num_adjustments;i++)
+               enhanced_scale->slider[i] = gdk_window_new (enhanced_scale->trough,
+                       &attributes, attributes_mask);
+
+       widget->style = gtk_style_attach (widget->style, widget->window);
+       
+
+       for(i=0;i<enhanced_scale->num_adjustments;i++)
+               gdk_window_set_user_data (enhanced_scale->slider[i], widget);
+       gdk_window_set_user_data (enhanced_scale->trough, widget);
+       gdk_window_set_user_data (widget->window, widget);
+
+       for(i=0;i<enhanced_scale->num_adjustments;i++)
+               gtk_style_set_background (widget->style, enhanced_scale->slider[i], GTK_STATE_NORMAL);
+       gtk_style_set_background (widget->style, enhanced_scale->trough, GTK_STATE_NORMAL);
+       gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
+
+       for (i=0;i<enhanced_scale->num_adjustments;i++)
+       {
+               gtk_enhanced_scale_slider_update (GTK_ENHANCED_SCALE (widget), i);
+               gdk_window_show (enhanced_scale->slider[i]);
+       }
+       gdk_window_show (enhanced_scale->trough);
+}
+
+static void gtk_enhanced_scale_unrealize (GtkWidget *widget)
+{
+       GtkEnhancedScale *enhanced_scale;
+       int i;
+
+       g_return_if_fail (widget != NULL);
+       g_return_if_fail (GTK_IS_ENHANCED_SCALE (widget));
+
+       enhanced_scale = GTK_ENHANCED_SCALE (widget);
+
+       for (i=0;i<enhanced_scale->num_adjustments;i++)
+       {
+               if (enhanced_scale->slider[i])
+               {
+                       gdk_window_set_user_data (enhanced_scale->slider[i], NULL);
+                       gdk_window_destroy (enhanced_scale->slider[i]);
+                       enhanced_scale->slider[i] = NULL;
+               }
+       }
+       if (enhanced_scale->trough)
+       {
+               gdk_window_set_user_data (enhanced_scale->trough, NULL);
+               gdk_window_destroy (enhanced_scale->trough);
+               enhanced_scale->trough = NULL;
+       }
+
+       gdk_window_set_user_data (widget->window, NULL);
+#ifdef DEBUG
+       printf("Received unrealize signal, let's disappear!\n");
+#endif
+       if (GTK_WIDGET_CLASS (parent_class)->unrealize)
+               (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
+}
+
+static void gtk_enhanced_scale_size_request (GtkWidget *widget,
+                                             GtkRequisition *requisition)
+{
+       GtkEnhancedScale *enhanced_scale;
+       gint trough_border, slider_width;
+
+       enhanced_scale = GTK_ENHANCED_SCALE (widget);
+
+#ifdef DEBUG
+       printf("Received size_request signal\n");
+#endif
+
+       trough_border = gtk_enhanced_scale_get_trough_border(GTK_WIDGET(enhanced_scale));
+       slider_width = gtk_enhanced_scale_get_slider_width(GTK_WIDGET(enhanced_scale));
+
+       requisition->width = (ENHANCED_SCALE_CLASS(enhanced_scale)->arrow_width + trough_border) * 4;
+       requisition->height = (slider_width + trough_border * 2);
+       
+}
+
+static void gtk_enhanced_scale_size_allocate (GtkWidget *widget,
+                                              GtkAllocation *allocation)
+{
+       GtkEnhancedScale *enhanced_scale;
+
+       g_return_if_fail (widget != NULL);
+       g_return_if_fail (GTK_IS_ENHANCED_SCALE (widget));
+       g_return_if_fail (allocation != NULL);
+
+       widget->allocation = *allocation;
+       enhanced_scale = GTK_ENHANCED_SCALE (widget);
+
+#ifdef DEBUG
+       printf("Received size allocate signal: %d\n", allocation->width);
+#endif
+
+       if (GTK_WIDGET_REALIZED (widget))
+       {
+               gint i, x, y, width, height;
+               
+               gdk_window_move_resize (widget->window,
+                       allocation->x, allocation->y,
+                       allocation->width, allocation->height);
+               
+               x = allocation->x;
+               y = allocation->y;
+               width = allocation->width;
+               height = allocation->height;
+               gtk_enhanced_scale_pos_trough( enhanced_scale, &x, &y, &width, &height);
+               gdk_window_move_resize (enhanced_scale->trough, x, y, width, height);
+               
+               for ( i = 0; i<enhanced_scale->num_adjustments; i++ )
+                       gtk_enhanced_scale_slider_update( enhanced_scale, i );
+               
+       }
+
+}
+
+static gint gtk_enhanced_scale_expose (GtkWidget *widget, GdkEventExpose *event)
+{
+       GtkEnhancedScale *enhanced_scale;
+       GdkRectangle area;
+
+       g_return_val_if_fail (widget != NULL, FALSE);
+       g_return_val_if_fail (GTK_IS_ENHANCED_SCALE (widget), FALSE);
+       g_return_val_if_fail (event != NULL, FALSE);
+
+       if (event->count > 0)
+               return FALSE;
+       enhanced_scale = GTK_ENHANCED_SCALE (widget);
+
+       gdk_window_clear_area (widget->window, 0, 0,
+               widget->allocation.width, widget->allocation.height);
+
+       /* This would be the place to draw it */
+       area.x = 0;
+       area.y = 0;
+       area.width = widget->allocation.width;
+       area.height = widget->allocation.height;
+       gtk_enhanced_scale_draw (widget, &area);
+
+       return FALSE;
+}
+
+/* =========================================================================
+ * Paint functions
+ * Some were directly taken from GtkScale, GtkHScale and GtkRange
+ */
+
+static void gtk_enhanced_scale_draw (GtkWidget *widget, GdkRectangle *area)
+{
+       GtkEnhancedScale *enhanced_scale;
+       GdkRectangle tmp_area;
+       gint x=0, y=0, w=0, h=0;
+
+       g_return_if_fail (widget != NULL);
+       g_return_if_fail (GTK_IS_ENHANCED_SCALE (widget));
+#ifdef DEBUG
+       printf("Trying to draw enhanced_scale\n");
+#endif
+       if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_MAPPED (widget))
+       {
+               gint i;
+#ifdef DEBUG
+               printf("Drawing enhanced_scale\n");
+#endif
+               enhanced_scale = GTK_ENHANCED_SCALE (widget);
+
+               gtk_enhanced_scale_pos_trough (GTK_ENHANCED_SCALE (widget), &x, &y, &w, &h);
+
+               tmp_area.x = x;
+               tmp_area.y = y;
+               tmp_area.width = w;
+               tmp_area.height = h;
+
+#ifdef DEBUG
+               printf("Drawing enhanced_scale with size = %d\n", w);
+#endif
+               //if (gdk_rectangle_intersect (area, &tmp_area, area))
+               {
+                       for(i=0;i<enhanced_scale->num_adjustments;i++) {
+                               gtk_enhanced_scale_slider_update (enhanced_scale, i);
+                               gtk_enhanced_scale_draw_slider (enhanced_scale, i);
+                       }
+                       gtk_enhanced_scale_draw_trough (enhanced_scale);
+               }
+       }
+}
+
+static void gtk_enhanced_scale_draw_trough (GtkEnhancedScale *enhanced_scale)
+{
+       g_return_if_fail (enhanced_scale != NULL);
+       g_return_if_fail (GTK_IS_ENHANCED_SCALE(enhanced_scale));
+
+       if (enhanced_scale->trough)
+       {
+               gint x, x2, y, b;
+               gint left, right;
+               
+#ifdef DEBUG
+               printf("Drawing trough: %d\n", GTK_WIDGET(enhanced_scale)->allocation.width-2);
+#endif
+
+               if ( enhanced_scale->num_adjustments > 1 )
+               {
+                       /* trough */
+                       b = gtk_enhanced_scale_get_trough_border(GTK_WIDGET(enhanced_scale));
+                       gtk_enhanced_scale_trough_hdims (enhanced_scale, &left, &right, 0);
+
+                       gdk_draw_rectangle( enhanced_scale->trough, GTK_WIDGET (enhanced_scale)->style->mid_gc[GTK_STATE_NORMAL],
+                               TRUE, ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2 + 1,
+                               ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height + b + 1, 
+                               right-left,
+                               ENHANCED_SCALE_CLASS (enhanced_scale)->trough_width - 2
+                       );
+                       
+                       /* selected area */
+                       gtk_enhanced_scale_get_slider_position( enhanced_scale, &x, &y, 1);
+                       gtk_enhanced_scale_get_slider_position( enhanced_scale, &x2, &y, 2);
+                       if (x2 - x - ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2 > 0)
+                       {
+                               gdk_draw_rectangle( enhanced_scale->trough, 
+                                       GTK_WIDGET (enhanced_scale)->style->mid_gc[GTK_STATE_SELECTED],
+                                       TRUE, 
+                                       x + ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2 + 1,
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height + b + 1, 
+                                       x2 - x - ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2,
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->trough_width - 2
+                               );
+                       }
+               }
+               else
+               {
+                       /* trough */
+                       b = gtk_enhanced_scale_get_trough_border(GTK_WIDGET(enhanced_scale));
+                       gtk_enhanced_scale_trough_hdims (enhanced_scale, &left, &right, 0);
+                       gdk_draw_rectangle( enhanced_scale->trough, GTK_WIDGET (enhanced_scale)->style->mid_gc[GTK_STATE_NORMAL],
+                               TRUE, ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2 + 1,
+                               ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height + b + 1, 
+                               right-left,
+                               ENHANCED_SCALE_CLASS (enhanced_scale)->trough_width - 2
+                       );
+               }
+               
+               /* scene breaks */
+               if ( enhanced_scale->breaks != NULL )
+                       if ( enhanced_scale->breaks->len > 1 )
+                               for ( x2 = 0; x2 < (enhanced_scale->breaks->len - 1); x2++ )
+                               {       
+                                       gint left, right;
+                                       
+                                       gtk_enhanced_scale_trough_hdims (enhanced_scale, &left, &right, 0);
+                                       x = left + ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2;
+                                       x += ((right - left) * ( g_array_index( enhanced_scale->breaks, gint, x2 ) -
+                                               GTK_ADJUSTMENT(enhanced_scale->adjustment[0])->lower) /
+                                               (GTK_ADJUSTMENT(enhanced_scale->adjustment[0])->upper -
+                                               GTK_ADJUSTMENT(enhanced_scale->adjustment[0])->lower -
+                                               GTK_ADJUSTMENT(enhanced_scale->adjustment[0])->page_size));
+                                       gdk_draw_line (enhanced_scale->trough, GTK_WIDGET (enhanced_scale)->style->light_gc[GTK_STATE_NORMAL],
+                                               x,
+                                               ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height + b,
+                                               x,
+                                               ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height + b + ENHANCED_SCALE_CLASS (enhanced_scale)->trough_width -1
+                                       );
+                                       
+                               }
+               
+               /* frame position */
+               gtk_enhanced_scale_get_slider_position( enhanced_scale, &x, &y, 0);
+       }
+}
+
+static void gtk_enhanced_scale_draw_slider (GtkEnhancedScale *enhanced_scale, gint i)
+{
+       GtkStateType state_type;
+       GdkPoint points[3];
+
+       g_return_if_fail (enhanced_scale != NULL);
+       g_return_if_fail (GTK_IS_ENHANCED_SCALE (enhanced_scale));
+       g_return_if_fail (i>=0);
+       g_return_if_fail (i<enhanced_scale->num_adjustments);
+
+       if (enhanced_scale->slider[i])
+       {
+#ifdef DEBUG
+               printf("Drawing slider %d\n", i);
+#endif
+               if ((enhanced_scale->in_child == ENHANCED_SCALE_CLASS (enhanced_scale)->slider) ||
+                       (enhanced_scale->click_child == ENHANCED_SCALE_CLASS (enhanced_scale)->slider))
+                       state_type = GTK_STATE_SELECTED;
+               else
+                       state_type = GTK_STATE_SELECTED;
+
+               switch ( i )
+               {
+                       case 0:
+                               gdk_draw_line (enhanced_scale->slider[i], GTK_WIDGET (enhanced_scale)->style->dark_gc[GTK_STATE_NORMAL],
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width,
+                                       0,
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2 + 1,
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height - 1
+                               );
+                               gdk_draw_line (enhanced_scale->slider[i], GTK_WIDGET (enhanced_scale)->style->dark_gc[GTK_STATE_NORMAL],
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width+1,
+                                       1,
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2 + 2,
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height
+                               );
+                               points[0].x = ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width;
+                               points[0].y = 0;
+                               points[1].x = 0;
+                               points[1].y = 0;
+                               points[2].x = ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2;
+                               points[2].y = ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height;
+                               break;
+                       case 1:
+                               gdk_draw_line (enhanced_scale->slider[i], GTK_WIDGET (enhanced_scale)->style->dark_gc[GTK_STATE_NORMAL],
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2 - 1,
+                                       2,
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2 - 1,
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height - 1
+                               );
+                               gdk_draw_line (enhanced_scale->slider[i], GTK_WIDGET (enhanced_scale)->style->dark_gc[GTK_STATE_NORMAL],
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2 - 1,
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height - 1,
+                                       2,
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height - 1
+                               );
+                               points[0].x = ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2 - 1;
+                               points[0].y = 0;
+                               points[1].x = 0;
+                               points[1].y = ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height - 1;
+                               points[2].x = ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2 - 1;
+                               points[2].y = ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height - 1;
+                               break;
+                       case 2:
+                               gdk_draw_line (enhanced_scale->slider[i], GTK_WIDGET (enhanced_scale)->style->dark_gc[GTK_STATE_NORMAL],
+                                       2,
+                                       2,
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2 - 1,
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height - 1
+                               );
+                               gdk_draw_line (enhanced_scale->slider[i], GTK_WIDGET (enhanced_scale)->style->dark_gc[GTK_STATE_NORMAL],
+                                       1,
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height - 1,
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2,
+                                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height - 1
+                               );
+                               points[0].x = 0;
+                               points[0].y = 0;
+                               points[1].x = 0;
+                               points[1].y = ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height - 1;
+                               points[2].x = ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width/2 - 1;
+                               points[2].y = ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height - 1;
+                               break;
+                       default:
+                               return;
+               }
+               gdk_draw_polygon( enhanced_scale->slider[i],
+                       GTK_WIDGET(enhanced_scale)->style->bg_gc[state_type], TRUE, points, 3 );
+/*             
+               gtk_paint_polygon( GTK_WIDGET(enhanced_scale)->style, enhanced_scale->slider[i],
+                       state_type,     GTK_SHADOW_NONE, NULL, GTK_WIDGET(enhanced_scale), NULL,
+                       points, 3, TRUE );
+               gtk_paint_arrow( GTK_WIDGET(enhanced_scale)->style, enhanced_scale->slider[i],
+                       state_type, 
+                       (enhanced_scale->clicked_slider == i ? GTK_SHADOW_IN : GTK_SHADOW_OUT),
+                       NULL, GTK_WIDGET(enhanced_scale), NULL,
+                       (i==0)? GTK_ARROW_DOWN : GTK_ARROW_UP, TRUE, 0, 0, 
+                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_width, 
+                       ENHANCED_SCALE_CLASS (enhanced_scale)->arrow_height
+               );
+*/                     
+       }
+}
+
+/* =========================================================================
+ * Functions to make life easier
+ * positioning functions etc, mostly directly taken from GtkScale, GtkHScale
+ * and GtkRange
+ */
+
+static void gtk_enhanced_scale_pos_trough (GtkEnhancedScale *enhanced_scale,
+                                       gint *x, gint *y, gint *w, gint *h)
+{
+       GtkWidget *widget;
+       gint trough_border, slider_width;
+
+       g_return_if_fail (enhanced_scale != NULL);
+       g_return_if_fail (GTK_IS_ENHANCED_SCALE (enhanced_scale));
+       g_return_if_fail ((x != NULL) && (y != NULL) && (w != NULL) && (h != NULL));
+
+       widget = GTK_WIDGET (enhanced_scale);
+       trough_border = gtk_enhanced_scale_get_trough_border(GTK_WIDGET(enhanced_scale));
+       slider_width = gtk_enhanced_scale_get_slider_width(GTK_WIDGET(enhanced_scale));
+
+       *w = widget->allocation.width - 2;
+       *h = (slider_width + trough_border * 2);
+       *x = 1;
+       *y = (widget->allocation.height - *h) / 2;
+}
+
+static void gtk_enhanced_scale_slider_update (GtkEnhancedScale *enhanced_scale, gint i)
+{
+       /* i is the number of the adjustment */
+       gint left;
+       gint right;
+       gint x;
+       gint trough_border;
+
+       g_return_if_fail (enhanced_scale != NULL);
+       g_return_if_fail (GTK_IS_ENHANCED_SCALE (enhanced_scale));
+       g_return_if_fail (i >= 0);
+       g_return_if_fail (i < enhanced_scale->num_adjustments);
+
+       trough_border = gtk_enhanced_scale_get_trough_border(GTK_WIDGET(enhanced_scale));
+
+       if (GTK_WIDGET_REALIZED (enhanced_scale))
+       {
+               gtk_enhanced_scale_trough_hdims (enhanced_scale, &left, &right, i);
+               x = left;
+#ifdef DEBUG
+               printf("Updating slider %d\n",i);
+#endif
+               if (GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->value <
+                       GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->lower)
+               {
+                       GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->value =
+                               GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->lower;
+                       gtk_signal_emit_by_name (GTK_OBJECT (GTK_ADJUSTMENT(enhanced_scale->adjustment[i])),
+                               "value_changed");
+               }
+               else if (GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->value >
+                       GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->upper)
+               {
+                       GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->value =
+                               GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->upper;
+                       gtk_signal_emit_by_name(GTK_OBJECT (GTK_ADJUSTMENT(enhanced_scale->adjustment[i])),
+                               "value_changed");
+               }
+               if (GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->lower !=
+                       (GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->upper -
+                       GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->page_size))
+               {
+                       x += ((right - left) * (GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->value -
+                               GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->lower) /
+                               (GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->upper -
+                               GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->lower -
+                               GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->page_size));
+               }
+               /*
+               if (GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->lower !=
+                       (GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->upper))
+               {
+                       x += ((right - left) * (GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->value -
+                               GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->lower) /
+                               (GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->upper -
+                               GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->lower));
+               }
+               */
+               if (x < left)
+                       x = left;
+               else if (x > right)
+                       x = right;
+
+               gdk_window_move (enhanced_scale->slider[i], x, 
+                       trough_border + (i>0 ? ENHANCED_SCALE_CLASS(enhanced_scale)->arrow_height+ENHANCED_SCALE_CLASS(enhanced_scale)->trough_width : 0) );
+       }
+}
+
+static void gtk_enhanced_scale_trough_hdims (GtkEnhancedScale *enhanced_scale, gint *left, gint *right, gint i)
+{
+       gint trough_width;
+       gint slider_length;
+       gint tleft;
+       gint tright;
+       gint stepper_spacing;
+       gint trough_border;
+
+       g_return_if_fail (enhanced_scale != NULL);
+
+       gdk_window_get_size (enhanced_scale->trough, &trough_width, NULL);
+       gdk_window_get_size (enhanced_scale->slider[0], &slider_length, NULL);
+
+       trough_border = gtk_enhanced_scale_get_trough_border(GTK_WIDGET(enhanced_scale));
+       stepper_spacing = gtk_enhanced_scale_get_stepper_spacing(GTK_WIDGET(enhanced_scale));
+
+       tleft = trough_border;
+       tright = trough_width - slider_length + trough_border;
+       if ( i == 2 )
+       {
+               tleft += slider_length/2;
+               tright += slider_length/2;
+       }
+
+       if (left)
+               *left = tleft;
+       if (right)
+               *right = tright;
+}
+
+static void gtk_enhanced_scale_get_slider_position(GtkEnhancedScale *enhanced_scale, gint *x, gint *y, gint i)
+{
+       g_return_if_fail (enhanced_scale != NULL);
+       g_return_if_fail (GTK_IS_ENHANCED_SCALE (enhanced_scale));
+       g_return_if_fail (i >= 0);
+       g_return_if_fail (i < enhanced_scale->num_adjustments);
+
+       gdk_window_get_position(enhanced_scale->slider[i], x, y);
+}
+
+static gint gtk_enhanced_scale_get_stepper_spacing(GtkWidget *widget)
+{
+       /*return gtk_style_get_prop_experimental (widget->style,
+               "GtkEnhancedScale::stepper_spacing",
+               ENHANCED_SCALE_CLASS (widget)->stepper_slider_spacing);*/
+       return ENHANCED_SCALE_CLASS (widget)->stepper_slider_spacing;
+}
+
+static gint gtk_enhanced_scale_get_trough_border(GtkWidget *widget)
+{
+       /*return gtk_style_get_prop_experimental (widget->style,
+               "GtkEnhancedScale::trough_border",
+               widget->style->klass->xthickness);*/
+       return widget->style->ythickness;
+}
+
+/*static gint gtk_enhanced_scale_get_stepper_size(GtkWidget *widget)
+{
+       return gtk_style_get_prop_experimental (widget->style,
+               "GtkEnhancedScale::stepper_size",
+               ENHANCED_SCALE_CLASS (widget)->stepper_size);
+}*/
+
+static gint gtk_enhanced_scale_get_slider_width(GtkWidget *widget)
+{
+       /*return gtk_style_get_prop_experimental (widget->style,
+               "GtkEnhancedScale::slider_width",
+               ENHANCED_SCALE_CLASS (widget)->slider_width);*/
+       return ENHANCED_SCALE_CLASS (widget)->slider_width;
+}
+
+/* =========================================================================
+ * Signal handlers/Callbacks for motion, buttons, keys, focus etc.
+ * Partly helped by code from GtkScale/GtkRange
+ */
+
+static gint gtk_enhanced_scale_button_press(GtkWidget *widget, GdkEventButton *event)
+{
+       GtkEnhancedScale *enhanced_scale;
+       int i;
+
+       g_return_val_if_fail (widget != NULL, FALSE);
+       g_return_val_if_fail (GTK_IS_ENHANCED_SCALE (widget), FALSE);
+       g_return_val_if_fail (event != NULL, FALSE);
+
+       if (!GTK_WIDGET_HAS_FOCUS (widget))
+               gtk_widget_grab_focus (widget);
+#ifdef DEBUG
+       printf("Received press event, button %d\n", event->button);
+#endif
+       enhanced_scale = GTK_ENHANCED_SCALE (widget);
+       enhanced_scale->x_click_point = event->x;
+       
+       if (event->window == enhanced_scale->trough)
+       {
+               gint x,y,n,left,right;
+               gtk_enhanced_scale_get_slider_position(enhanced_scale, &x,&y,enhanced_scale->active_slider);
+#ifdef DEBUG
+               printf("Source: trough. Active slider: %d (pos: %d,%d). Click position: %d,%d.\n",
+                       enhanced_scale->active_slider, x,y,(int)(event->x), (int)(event->y));
+#endif
+               gtk_enhanced_scale_trough_hdims (enhanced_scale, &left, &right,
+                       enhanced_scale->active_slider);
+               n = (GTK_ADJUSTMENT(enhanced_scale->adjustment[enhanced_scale->active_slider])->page_increment)
+                       *(right-left)
+                       /(GTK_ADJUSTMENT(enhanced_scale->adjustment[enhanced_scale->active_slider])->upper-
+                       GTK_ADJUSTMENT(enhanced_scale->adjustment[enhanced_scale->active_slider])->lower);
+
+               if (event->x > x + gtk_enhanced_scale_get_slider_width(widget)) /* Click at right of slider */
+               {
+                       gtk_enhanced_scale_motion_x(enhanced_scale, n, enhanced_scale->active_slider);
+               }
+               else if (event->x < x) /* click at left of active slider */
+               {
+                       gtk_enhanced_scale_motion_x(enhanced_scale, -n, enhanced_scale->active_slider);
+               }
+       }
+       else for (i=0;i<enhanced_scale->num_adjustments;i++)
+       {
+               gint x,y;
+               gtk_enhanced_scale_get_slider_position(enhanced_scale, &x,&y,i);
+               if (event->window == enhanced_scale->slider[i])
+               {
+                       enhanced_scale->active_slider = i;
+#ifdef DEBUG
+                       printf("Source: slider %d (pos: %d,%d)\n",i,x,y);
+#endif
+                       enhanced_scale->clicked_slider = i;
+               }
+       }
+       return TRUE;
+}
+
+static gint gtk_enhanced_scale_button_release(GtkWidget *widget, GdkEventButton *event)
+{
+       GtkEnhancedScale *enhanced_scale;
+
+       g_return_val_if_fail (widget != NULL, FALSE);
+       g_return_val_if_fail (GTK_IS_ENHANCED_SCALE (widget), FALSE);
+       g_return_val_if_fail (event != NULL, FALSE);
+
+       enhanced_scale = GTK_ENHANCED_SCALE (widget);
+
+       enhanced_scale->x_click_point = 0;
+#ifdef DEBUG
+       printf("Button released");
+       if (enhanced_scale->clicked_slider != -1) printf(" - slider %d unselected", enhanced_scale->clicked_slider);
+       printf("\n");
+#endif
+       enhanced_scale->clicked_slider = -1;
+       gtk_widget_queue_draw (widget);
+       return TRUE;
+}
+
+static gint gtk_enhanced_scale_motion_notify(GtkWidget *widget, GdkEventMotion *event)
+{
+       GtkEnhancedScale *enhanced_scale;
+       int x,y;
+       GdkModifierType mods;
+
+       g_return_val_if_fail (widget != NULL, FALSE);
+       g_return_val_if_fail (GTK_IS_ENHANCED_SCALE (widget), FALSE);
+       g_return_val_if_fail (event != NULL, FALSE);
+
+       enhanced_scale = GTK_ENHANCED_SCALE (widget);
+
+       if (enhanced_scale->clicked_slider != -1)
+       {
+         gdk_window_get_pointer (enhanced_scale->slider[enhanced_scale->clicked_slider], &x, &y, &mods);
+#ifdef DEBUG
+               printf("Motion notify\n");
+#endif
+         if (mods & GDK_BUTTON1_MASK)
+               gtk_enhanced_scale_motion_x(enhanced_scale, x - enhanced_scale->x_click_point,
+                       enhanced_scale->clicked_slider);
+       }
+
+       return TRUE;
+}
+
+static void gtk_enhanced_scale_motion_x(GtkEnhancedScale *enhanced_scale, gint delta_x, gint i)
+{
+       gdouble old_value;
+       gint left, right;
+       gint slider_x, slider_y;
+       gint new_pos;   
+
+       g_return_if_fail (enhanced_scale != NULL);
+       g_return_if_fail (GTK_IS_ENHANCED_SCALE (enhanced_scale));
+       g_return_if_fail (i>=0);
+       g_return_if_fail (i<enhanced_scale->num_adjustments);
+
+       gdk_window_get_position (enhanced_scale->slider[i], &slider_x, &slider_y);
+       gtk_enhanced_scale_trough_hdims (enhanced_scale, &left, &right,i);
+#ifdef DEBUG
+       printf("motion_x called: delta_x = %d, slider_x = %d, l/r=%d/%d\n", delta_x, slider_x, left, right);
+#endif
+       if (left == right)
+               return;
+
+       new_pos = slider_x + delta_x;
+
+       if (new_pos < left)
+               new_pos = left;
+       else if (new_pos > right)
+               new_pos = right;
+
+       old_value = GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->value;
+       GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->value = (gint)
+               ((GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->upper -
+               GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->lower -
+               GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->page_size) *
+               (new_pos - left) / (right - left) +
+               GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->lower);
+       if ( (int) old_value != (int) GTK_ADJUSTMENT(enhanced_scale->adjustment[i])->value)
+       {
+               gtk_signal_emit_by_name (GTK_OBJECT (enhanced_scale->adjustment[i]), "value_changed");
+       }
+}
+
+static gint gtk_enhanced_scale_key_press(GtkWidget *widget, GdkEventKey *event)
+{
+       GtkEnhancedScale *enhanced_scale;
+#ifdef DEBUG
+       char *key;
+#endif
+       g_return_val_if_fail (widget != NULL, FALSE);
+       g_return_val_if_fail (GTK_IS_ENHANCED_SCALE (widget), FALSE);
+       g_return_val_if_fail (event != NULL, FALSE);
+#ifdef DEBUG
+       key = "unkown";
+#endif
+       enhanced_scale = GTK_ENHANCED_SCALE (widget);
+
+       if(enhanced_scale->active_slider >= 0 && enhanced_scale->active_slider < enhanced_scale->num_adjustments)
+       {
+               gint n1,n2,left,right;
+
+               gtk_enhanced_scale_trough_hdims (enhanced_scale, &left, &right,
+                       enhanced_scale->active_slider);
+               n1 = (GTK_ADJUSTMENT(enhanced_scale->adjustment[enhanced_scale->active_slider])->
+                       page_increment)*(right-left)/
+                       (GTK_ADJUSTMENT(enhanced_scale->adjustment[enhanced_scale->active_slider])->upper-
+                       GTK_ADJUSTMENT(enhanced_scale->adjustment[enhanced_scale->active_slider])->lower);
+               n2 = (GTK_ADJUSTMENT(enhanced_scale->adjustment[enhanced_scale->active_slider])->
+                       step_increment)*(right-left)/
+                       (GTK_ADJUSTMENT(enhanced_scale->adjustment[enhanced_scale->active_slider])->upper-
+                       GTK_ADJUSTMENT(enhanced_scale->adjustment[enhanced_scale->active_slider])->lower);
+
+               switch (event->keyval)
+               {
+                       case GDK_Left:
+                               if (event->state & GDK_CONTROL_MASK)
+                                       gtk_enhanced_scale_motion_x(enhanced_scale,
+                                               -n1, enhanced_scale->active_slider);
+                               else
+                                       gtk_enhanced_scale_motion_x(enhanced_scale,
+                                               -n2, enhanced_scale->active_slider);
+#ifdef DEBUG
+                               key = "left_arrow";
+#endif
+                               break;
+                       case GDK_Right:
+                               if (event->state & GDK_CONTROL_MASK)
+                                       gtk_enhanced_scale_motion_x(enhanced_scale,
+                                               n1, enhanced_scale->active_slider);
+                               else
+                                       gtk_enhanced_scale_motion_x(enhanced_scale,
+                                               n2, enhanced_scale->active_slider);
+#ifdef DEBUG
+                               key = "right_arrow";
+#endif
+                               break;
+                       case GDK_Home:
+                               /* Clumsy, but the check in gtk_enhanced_scale_motion_x() will take care */
+                               gtk_enhanced_scale_motion_x(enhanced_scale,
+                                       0 - GTK_ADJUSTMENT(enhanced_scale->adjustment[enhanced_scale->active_slider])->upper,
+                                       enhanced_scale->active_slider);
+#ifdef DEBUG
+                               key = "home";
+#endif
+                               break;
+                       case GDK_End:
+                               /* Clumsy, but the check in gtk_enhanced_scale_motion_x() will take care */
+                               gtk_enhanced_scale_motion_x(enhanced_scale,
+                                       GTK_ADJUSTMENT(enhanced_scale->adjustment[enhanced_scale->active_slider])->upper,
+                                       enhanced_scale->active_slider);
+#ifdef DEBUG
+                               key = "end";
+#endif
+                               break;
+               }
+       }
+#ifdef DEBUG
+       printf("Key pressed: %s\n", key);
+#endif
+       return TRUE;
+}
+
+static gint gtk_enhanced_scale_enter_notify(GtkWidget *widget, GdkEventCrossing *event)
+{
+       GtkEnhancedScale *enhanced_scale;
+       gint i;
+
+       g_return_val_if_fail (widget != NULL, FALSE);
+       g_return_val_if_fail (GTK_IS_ENHANCED_SCALE (widget), FALSE);
+       g_return_val_if_fail (event != NULL, FALSE);
+
+       enhanced_scale = GTK_ENHANCED_SCALE (widget);
+
+       if (event->window == enhanced_scale->trough)
+       {
+               enhanced_scale->in_child = ENHANCED_SCALE_CLASS (enhanced_scale)->trough;
+       }
+       else for (i=0;i<enhanced_scale->num_adjustments;i++)
+               if (event->window == enhanced_scale->slider[i])
+               {
+                       enhanced_scale->in_child = ENHANCED_SCALE_CLASS (enhanced_scale)->slider;
+                       if ((enhanced_scale->click_child == 0) ||
+                               (enhanced_scale->click_child == ENHANCED_SCALE_CLASS (enhanced_scale)->trough))
+                               gtk_enhanced_scale_draw_slider (enhanced_scale,i);
+               }
+
+       return TRUE;
+}
+
+static gint gtk_enhanced_scale_leave_notify(GtkWidget *widget, GdkEventCrossing *event)
+{
+       GtkEnhancedScale *enhanced_scale;
+       gint i;
+
+       g_return_val_if_fail (widget != NULL, FALSE);
+       g_return_val_if_fail (GTK_IS_ENHANCED_SCALE (widget), FALSE);
+       g_return_val_if_fail (event != NULL, FALSE);
+
+       enhanced_scale = GTK_ENHANCED_SCALE (widget);
+
+       enhanced_scale->in_child = 0;
+       
+       if (event->window == enhanced_scale->trough)
+       {
+       }
+       else for (i=0;i<enhanced_scale->num_adjustments;i++)
+               if (event->window == enhanced_scale->slider[i])
+               {
+                       if ((enhanced_scale->click_child == 0) ||
+                               (enhanced_scale->click_child == ENHANCED_SCALE_CLASS (enhanced_scale)->trough))
+                               gtk_enhanced_scale_draw_slider (enhanced_scale, i);
+               }
+
+       return TRUE;
+}
+
+static gint gtk_enhanced_scale_focus_in(GtkWidget *widget, GdkEventFocus *event)
+{
+       g_return_val_if_fail (widget != NULL, FALSE);
+       g_return_val_if_fail (GTK_IS_ENHANCED_SCALE (widget), FALSE);
+       g_return_val_if_fail (event != NULL, FALSE);
+
+       GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
+       gtk_widget_queue_draw (widget);
+#ifdef DEBUG
+       printf("focus_in\n");
+#endif
+       gtk_widget_queue_draw (widget);
+       return FALSE;
+}
+
+static gint gtk_enhanced_scale_focus_out(GtkWidget *widget, GdkEventFocus *event)
+{
+       g_return_val_if_fail (widget != NULL, FALSE);
+       g_return_val_if_fail (GTK_IS_ENHANCED_SCALE (widget), FALSE);
+       g_return_val_if_fail (event != NULL, FALSE);
+
+       GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
+       gtk_widget_queue_draw (widget);
+#ifdef DEBUG
+       printf("focus_out\n");
+#endif
+       gtk_widget_queue_draw (widget);
+       return FALSE;
+}
+
+static void gtk_enhanced_scale_style_set(GtkWidget *widget, GtkStyle *style)
+{
+       GtkEnhancedScale *enhanced_scale;
+       int i;
+
+       g_return_if_fail (widget != NULL);
+       g_return_if_fail (GTK_IS_ENHANCED_SCALE (widget));
+
+       enhanced_scale = GTK_ENHANCED_SCALE (widget);
+
+       if (GTK_WIDGET_REALIZED (widget))
+       {
+               if (enhanced_scale->trough)
+                       gtk_style_set_background (widget->style, enhanced_scale->trough, GTK_STATE_NORMAL);
+
+               for(i=0;i<enhanced_scale->num_adjustments;i++)
+                       if (enhanced_scale->slider[i])
+                               gtk_style_set_background (widget->style, enhanced_scale->slider[i],
+                                       GTK_STATE_NORMAL);
+       }
+}
+
+static void gtk_enhanced_scale_adjustment_value_changed(GtkAdjustment *adjustment, gpointer data)
+{
+       GtkEnhancedScale *enhanced_scale;
+       gint i;
+
+       g_return_if_fail (adjustment != NULL);
+       g_return_if_fail (data != NULL);
+
+       enhanced_scale = GTK_ENHANCED_SCALE(data);
+
+       for (i=0;i<enhanced_scale->num_adjustments;i++)
+       {
+               //if(adjustment == GTK_ADJUSTMENT(enhanced_scale->adjustment[i]))
+                       gtk_enhanced_scale_slider_update (enhanced_scale,i);
+       }
+       gtk_enhanced_scale_draw (GTK_WIDGET( enhanced_scale ), NULL );
+}
+
+void gtk_enhanced_scale_set_breaks( GtkWidget *widget, GArray *breaks )
+{
+       GtkEnhancedScale *enhanced_scale;
+       GdkRectangle area;
+       
+       g_return_if_fail( widget != NULL );
+       g_return_if_fail( breaks != NULL );
+       enhanced_scale = GTK_ENHANCED_SCALE( widget );
+       enhanced_scale->breaks = breaks;
+       
+       gdk_window_clear_area (widget->window, 0, 0,
+               widget->allocation.width, widget->allocation.height);
+
+       /* This would be the place to draw it */
+       area.x = 0;
+       area.y = 0;
+       area.width = widget->allocation.width;
+       area.height = widget->allocation.height;
+       gtk_enhanced_scale_draw (widget, &area);
+}
diff --git a/src/gtkenhancedscale.h b/src/gtkenhancedscale.h
new file mode 100644 (file)
index 0000000..44898ca
--- /dev/null
@@ -0,0 +1,86 @@
+/* GtkEnhancedScale - A gtk(h)scale with multiple sliders
+ * Copyright (C) 2001 - Ronald Bultje
+ * 
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, 
+ * USA.
+ */
+
+/* Some code used was taken from GtkScale and GtkRange, all part
+ * of the Gimp Toolkit (Gtk+), http://www.gtk.org/
+ */
+
+#ifndef __GTK_ENHANCED_SCALE_H__
+#define __GTK_ENHANCED_SCALE_H__
+
+#include <gdk/gdk.h>
+#include <gtk/gtkwidget.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define GTK_ENHANCED_SCALE(obj)          GTK_CHECK_CAST (obj, gtk_enhanced_scale_get_type (), GtkEnhancedScale)
+#define GTK_ENHANCED_SCALE_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, gtk_enhanced_scale_get_type (), GtkEnhancedScaleClass)
+#define GTK_IS_ENHANCED_SCALE(obj)       GTK_CHECK_TYPE (obj, gtk_enhanced_scale_get_type ())
+
+typedef struct _GtkEnhancedScale      GtkEnhancedScale;
+typedef struct _GtkEnhancedScaleClass GtkEnhancedScaleClass;
+
+struct _GtkEnhancedScale
+{
+       GtkWidget widget;
+
+       GdkWindow *trough;
+       GdkWindow **slider;
+
+       GtkObject **adjustment;
+       gint num_adjustments;
+       gint *handler_id;
+
+       guint in_child : 3;
+       guint click_child : 3;
+
+       gint active_slider;
+       gint clicked_slider;
+       gint x_click_point;
+       GArray *breaks;
+};
+
+struct _GtkEnhancedScaleClass
+{
+       GtkWidgetClass parent_class;
+
+       gint slider_width;
+       gint trough_width;
+       gint stepper_size;
+       gint stepper_slider_spacing;
+       gint arrow_width;
+       gint arrow_height;
+
+       guint8 trough;
+       guint8 slider;
+};
+
+GtkWidget* gtk_enhanced_scale_new (GtkObject *adjustment[],
+                                   gint num_adjustments);
+guint gtk_enhanced_scale_get_type (void);
+void gtk_enhanced_scale_set_breaks( GtkWidget *widget, GArray *breaks );
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
+#endif /* __GTK_ENHANCED_SCALE_H__ */
diff --git a/src/interface.c b/src/interface.c
new file mode 100644 (file)
index 0000000..1d841d3
--- /dev/null
@@ -0,0 +1,1342 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+
+#include "callbacks.h"
+#include "interface.h"
+#include "support.h"
+
+#define GLADE_HOOKUP_OBJECT(component,widget,name) \
+  g_object_set_data_full (G_OBJECT (component), name, \
+    gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
+
+#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
+  g_object_set_data (G_OBJECT (component), name, widget)
+
+GtkWidget*
+create_gdv1394d (void)
+{
+  GtkWidget *gdv1394d;
+  GtkWidget *vbox1;
+  GtkWidget *handlebox2;
+  GtkWidget *hbox27;
+  GtkWidget *vbox9;
+  GtkWidget *menubar;
+  GtkWidget *menuitem1;
+  GtkWidget *menuitem1_menu;
+  GtkWidget *item_connect;
+  GtkWidget *item_disconnect;
+  GtkWidget *separatormenuitem1;
+  GtkWidget *item_quit;
+  GtkWidget *toolbar1;
+  GtkWidget *tmp_toolbar_icon;
+  GtkWidget *button_connect;
+  GtkWidget *button_disconnect;
+  GtkWidget *vseparator1;
+  GtkWidget *button_quit;
+  GtkWidget *hbox;
+  GtkWidget *toolbar2;
+  GtkWidget *vbox6;
+  GtkWidget *notebook1;
+  GtkWidget *empty_notebook_page;
+  GtkWidget *label40;
+  GtkWidget *hbox20;
+  GtkWidget *label46;
+  GtkWidget *hbox16;
+  GtkWidget *transport_0;
+  GtkWidget *image19;
+  GtkWidget *transport_1;
+  GtkWidget *image18;
+  GtkWidget *transport_2;
+  GtkWidget *image17;
+  GtkWidget *transport_3;
+  GtkWidget *image12;
+  GtkWidget *transport_4;
+  GtkWidget *image11;
+  GtkWidget *transport_5;
+  GtkWidget *image9;
+  GtkWidget *transport_6;
+  GtkWidget *alignment9;
+  GtkWidget *hbox17;
+  GtkWidget *image10;
+  GtkWidget *label41;
+  GtkWidget *transport_7;
+  GtkWidget *image13;
+  GtkWidget *transport_8;
+  GtkWidget *image14;
+  GtkWidget *transport_9;
+  GtkWidget *image15;
+  GtkWidget *transport_10;
+  GtkWidget *image16;
+  GtkWidget *label47;
+  GtkWidget *vbox_trim;
+  GtkWidget *statusbar;
+
+  gdv1394d = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_window_set_title (GTK_WINDOW (gdv1394d), _("Rugen"));
+  gtk_window_set_default_size (GTK_WINDOW (gdv1394d), 640, 480);
+
+  vbox1 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox1);
+  gtk_container_add (GTK_CONTAINER (gdv1394d), vbox1);
+
+  handlebox2 = gtk_handle_box_new ();
+  gtk_widget_show (handlebox2);
+  gtk_box_pack_start (GTK_BOX (vbox1), handlebox2, FALSE, FALSE, 0);
+
+  hbox27 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox27);
+  gtk_container_add (GTK_CONTAINER (handlebox2), hbox27);
+
+  vbox9 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox9);
+  gtk_box_pack_start (GTK_BOX (hbox27), vbox9, TRUE, TRUE, 0);
+
+  menubar = gtk_menu_bar_new ();
+  gtk_widget_show (menubar);
+  gtk_box_pack_start (GTK_BOX (vbox9), menubar, TRUE, TRUE, 0);
+
+  menuitem1 = gtk_menu_item_new_with_mnemonic (_("_File"));
+  gtk_widget_show (menuitem1);
+  gtk_container_add (GTK_CONTAINER (menubar), menuitem1);
+
+  menuitem1_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem1), menuitem1_menu);
+
+  item_connect = gtk_menu_item_new_with_mnemonic (_("_Connect"));
+  gtk_widget_show (item_connect);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), item_connect);
+
+  item_disconnect = gtk_menu_item_new_with_mnemonic (_("_Disconnect"));
+  gtk_widget_show (item_disconnect);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), item_disconnect);
+
+  separatormenuitem1 = gtk_menu_item_new ();
+  gtk_widget_show (separatormenuitem1);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), separatormenuitem1);
+  gtk_widget_set_sensitive (separatormenuitem1, FALSE);
+
+  item_quit = gtk_menu_item_new_with_mnemonic (_("_Quit"));
+  gtk_widget_show (item_quit);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), item_quit);
+
+  toolbar1 = gtk_toolbar_new ();
+  gtk_widget_show (toolbar1);
+  gtk_box_pack_start (GTK_BOX (hbox27), toolbar1, FALSE, FALSE, 0);
+  gtk_toolbar_set_style (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_ICONS);
+
+  tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-yes", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
+  button_connect = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
+                                GTK_TOOLBAR_CHILD_BUTTON,
+                                NULL,
+                                "",
+                                _("Connect to a server"), NULL,
+                                tmp_toolbar_icon, NULL, NULL);
+  gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
+  gtk_widget_show (button_connect);
+
+  tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-stop", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
+  button_disconnect = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
+                                GTK_TOOLBAR_CHILD_BUTTON,
+                                NULL,
+                                "",
+                                _("Disconnect from server"), NULL,
+                                tmp_toolbar_icon, NULL, NULL);
+  gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
+  gtk_widget_show (button_disconnect);
+
+  vseparator1 = gtk_vseparator_new ();
+  gtk_widget_show (vseparator1);
+  gtk_toolbar_append_space (GTK_TOOLBAR (toolbar1));
+
+  gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar1), vseparator1, NULL, NULL);
+
+  tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-quit", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
+  button_quit = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
+                                GTK_TOOLBAR_CHILD_BUTTON,
+                                NULL,
+                                "",
+                                _("Exit"), NULL,
+                                tmp_toolbar_icon, NULL, NULL);
+  gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
+  gtk_widget_show (button_quit);
+
+  hbox = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox);
+  gtk_box_pack_start (GTK_BOX (vbox1), hbox, TRUE, TRUE, 0);
+
+  toolbar2 = gtk_toolbar_new ();
+  gtk_widget_show (toolbar2);
+  gtk_box_pack_start (GTK_BOX (hbox), toolbar2, FALSE, TRUE, 0);
+  gtk_toolbar_set_style (GTK_TOOLBAR (toolbar2), GTK_TOOLBAR_BOTH);
+  gtk_toolbar_set_orientation (GTK_TOOLBAR (toolbar2), GTK_ORIENTATION_VERTICAL);
+
+  vbox6 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox6);
+  gtk_box_pack_start (GTK_BOX (hbox), vbox6, TRUE, TRUE, 0);
+
+  notebook1 = gtk_notebook_new ();
+  gtk_widget_show (notebook1);
+  gtk_box_pack_start (GTK_BOX (vbox6), notebook1, TRUE, TRUE, 0);
+  GTK_WIDGET_UNSET_FLAGS (notebook1, GTK_CAN_FOCUS);
+  gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook1), FALSE);
+  gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook1), GTK_POS_RIGHT);
+  gtk_notebook_popup_enable (GTK_NOTEBOOK (notebook1));
+
+  empty_notebook_page = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (empty_notebook_page);
+  gtk_container_add (GTK_CONTAINER (notebook1), empty_notebook_page);
+
+  label40 = gtk_label_new ("");
+  gtk_widget_show (label40);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label40);
+  gtk_label_set_justify (GTK_LABEL (label40), GTK_JUSTIFY_LEFT);
+
+  hbox20 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox20);
+  gtk_box_pack_start (GTK_BOX (vbox6), hbox20, FALSE, TRUE, 0);
+
+  label46 = gtk_label_new ("");
+  gtk_widget_show (label46);
+  gtk_box_pack_start (GTK_BOX (hbox20), label46, TRUE, TRUE, 0);
+  gtk_label_set_justify (GTK_LABEL (label46), GTK_JUSTIFY_LEFT);
+
+  hbox16 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox16);
+  gtk_box_pack_start (GTK_BOX (hbox20), hbox16, FALSE, TRUE, 0);
+
+  transport_0 = gtk_button_new ();
+  gtk_widget_show (transport_0);
+  gtk_box_pack_start (GTK_BOX (hbox16), transport_0, TRUE, FALSE, 0);
+  gtk_widget_set_size_request (transport_0, 34, 25);
+  GTK_WIDGET_UNSET_FLAGS (transport_0, GTK_CAN_FOCUS);
+  gtk_button_set_relief (GTK_BUTTON (transport_0), GTK_RELIEF_NONE);
+
+  image19 = create_pixmap (gdv1394d, "editor_movie_i.xpm");
+  gtk_widget_show (image19);
+  gtk_container_add (GTK_CONTAINER (transport_0), image19);
+
+  transport_1 = gtk_button_new ();
+  gtk_widget_show (transport_1);
+  gtk_box_pack_start (GTK_BOX (hbox16), transport_1, TRUE, FALSE, 0);
+  gtk_widget_set_size_request (transport_1, 34, 25);
+  GTK_WIDGET_UNSET_FLAGS (transport_1, GTK_CAN_FOCUS);
+  gtk_button_set_relief (GTK_BUTTON (transport_1), GTK_RELIEF_NONE);
+
+  image18 = create_pixmap (gdv1394d, "editor_scene_i.xpm");
+  gtk_widget_show (image18);
+  gtk_container_add (GTK_CONTAINER (transport_1), image18);
+
+  transport_2 = gtk_button_new ();
+  gtk_widget_show (transport_2);
+  gtk_box_pack_start (GTK_BOX (hbox16), transport_2, TRUE, FALSE, 0);
+  gtk_widget_set_size_request (transport_2, 34, 25);
+  GTK_WIDGET_UNSET_FLAGS (transport_2, GTK_CAN_FOCUS);
+  gtk_button_set_relief (GTK_BUTTON (transport_2), GTK_RELIEF_NONE);
+
+  image17 = create_pixmap (gdv1394d, "editor_fast_i.xpm");
+  gtk_widget_show (image17);
+  gtk_container_add (GTK_CONTAINER (transport_2), image17);
+
+  transport_3 = gtk_button_new ();
+  gtk_widget_show (transport_3);
+  gtk_box_pack_start (GTK_BOX (hbox16), transport_3, TRUE, FALSE, 0);
+  gtk_widget_set_size_request (transport_3, 34, 25);
+  GTK_WIDGET_UNSET_FLAGS (transport_3, GTK_CAN_FOCUS);
+  gtk_button_set_relief (GTK_BUTTON (transport_3), GTK_RELIEF_NONE);
+
+  image12 = create_pixmap (gdv1394d, "editor_step_i.xpm");
+  gtk_widget_show (image12);
+  gtk_container_add (GTK_CONTAINER (transport_3), image12);
+
+  transport_4 = gtk_button_new ();
+  gtk_widget_show (transport_4);
+  gtk_box_pack_start (GTK_BOX (hbox16), transport_4, TRUE, FALSE, 0);
+  gtk_widget_set_size_request (transport_4, 34, 25);
+  GTK_WIDGET_UNSET_FLAGS (transport_4, GTK_CAN_FOCUS);
+  gtk_button_set_relief (GTK_BUTTON (transport_4), GTK_RELIEF_NONE);
+
+  image11 = create_pixmap (gdv1394d, "editor_pause.xpm");
+  gtk_widget_show (image11);
+  gtk_container_add (GTK_CONTAINER (transport_4), image11);
+
+  transport_5 = gtk_button_new ();
+  gtk_widget_show (transport_5);
+  gtk_box_pack_start (GTK_BOX (hbox16), transport_5, TRUE, FALSE, 0);
+  gtk_widget_set_size_request (transport_5, 34, 25);
+  GTK_WIDGET_UNSET_FLAGS (transport_5, GTK_CAN_FOCUS);
+  gtk_button_set_relief (GTK_BUTTON (transport_5), GTK_RELIEF_NONE);
+
+  image9 = create_pixmap (gdv1394d, "editor_play.xpm");
+  gtk_widget_show (image9);
+  gtk_container_add (GTK_CONTAINER (transport_5), image9);
+
+  transport_6 = gtk_button_new ();
+  gtk_widget_show (transport_6);
+  gtk_box_pack_start (GTK_BOX (hbox16), transport_6, TRUE, FALSE, 0);
+  gtk_widget_set_size_request (transport_6, 34, 25);
+  GTK_WIDGET_UNSET_FLAGS (transport_6, GTK_CAN_FOCUS);
+  gtk_button_set_relief (GTK_BUTTON (transport_6), GTK_RELIEF_NONE);
+
+  alignment9 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment9);
+  gtk_container_add (GTK_CONTAINER (transport_6), alignment9);
+
+  hbox17 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox17);
+  gtk_container_add (GTK_CONTAINER (alignment9), hbox17);
+
+  image10 = create_pixmap (gdv1394d, "editor_stop.xpm");
+  gtk_widget_show (image10);
+  gtk_box_pack_start (GTK_BOX (hbox17), image10, FALSE, FALSE, 0);
+
+  label41 = gtk_label_new_with_mnemonic ("");
+  gtk_widget_show (label41);
+  gtk_box_pack_start (GTK_BOX (hbox17), label41, FALSE, FALSE, 0);
+  gtk_label_set_justify (GTK_LABEL (label41), GTK_JUSTIFY_LEFT);
+
+  transport_7 = gtk_button_new ();
+  gtk_widget_show (transport_7);
+  gtk_box_pack_start (GTK_BOX (hbox16), transport_7, TRUE, FALSE, 0);
+  gtk_widget_set_size_request (transport_7, 34, 25);
+  GTK_WIDGET_UNSET_FLAGS (transport_7, GTK_CAN_FOCUS);
+  gtk_button_set_relief (GTK_BUTTON (transport_7), GTK_RELIEF_NONE);
+
+  image13 = create_pixmap (gdv1394d, "editor_step.xpm");
+  gtk_widget_show (image13);
+  gtk_container_add (GTK_CONTAINER (transport_7), image13);
+
+  transport_8 = gtk_button_new ();
+  gtk_widget_show (transport_8);
+  gtk_box_pack_start (GTK_BOX (hbox16), transport_8, TRUE, FALSE, 0);
+  gtk_widget_set_size_request (transport_8, 34, 25);
+  GTK_WIDGET_UNSET_FLAGS (transport_8, GTK_CAN_FOCUS);
+  gtk_button_set_relief (GTK_BUTTON (transport_8), GTK_RELIEF_NONE);
+
+  image14 = create_pixmap (gdv1394d, "editor_fast.xpm");
+  gtk_widget_show (image14);
+  gtk_container_add (GTK_CONTAINER (transport_8), image14);
+
+  transport_9 = gtk_button_new ();
+  gtk_widget_show (transport_9);
+  gtk_box_pack_start (GTK_BOX (hbox16), transport_9, TRUE, FALSE, 0);
+  gtk_widget_set_size_request (transport_9, 34, 25);
+  GTK_WIDGET_UNSET_FLAGS (transport_9, GTK_CAN_FOCUS);
+  gtk_button_set_relief (GTK_BUTTON (transport_9), GTK_RELIEF_NONE);
+
+  image15 = create_pixmap (gdv1394d, "editor_scene.xpm");
+  gtk_widget_show (image15);
+  gtk_container_add (GTK_CONTAINER (transport_9), image15);
+
+  transport_10 = gtk_button_new ();
+  gtk_widget_show (transport_10);
+  gtk_box_pack_start (GTK_BOX (hbox16), transport_10, TRUE, FALSE, 0);
+  gtk_widget_set_size_request (transport_10, 34, 25);
+  GTK_WIDGET_UNSET_FLAGS (transport_10, GTK_CAN_FOCUS);
+  gtk_button_set_relief (GTK_BUTTON (transport_10), GTK_RELIEF_NONE);
+
+  image16 = create_pixmap (gdv1394d, "editor_movie.xpm");
+  gtk_widget_show (image16);
+  gtk_container_add (GTK_CONTAINER (transport_10), image16);
+
+  label47 = gtk_label_new ("");
+  gtk_widget_show (label47);
+  gtk_box_pack_start (GTK_BOX (hbox20), label47, TRUE, TRUE, 0);
+  gtk_label_set_justify (GTK_LABEL (label47), GTK_JUSTIFY_LEFT);
+
+  vbox_trim = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox_trim);
+  gtk_box_pack_start (GTK_BOX (vbox6), vbox_trim, FALSE, TRUE, 0);
+
+  statusbar = gtk_statusbar_new ();
+  gtk_widget_show (statusbar);
+  gtk_box_pack_start (GTK_BOX (vbox1), statusbar, FALSE, FALSE, 0);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (gdv1394d, gdv1394d, "gdv1394d");
+  GLADE_HOOKUP_OBJECT (gdv1394d, vbox1, "vbox1");
+  GLADE_HOOKUP_OBJECT (gdv1394d, handlebox2, "handlebox2");
+  GLADE_HOOKUP_OBJECT (gdv1394d, hbox27, "hbox27");
+  GLADE_HOOKUP_OBJECT (gdv1394d, vbox9, "vbox9");
+  GLADE_HOOKUP_OBJECT (gdv1394d, menubar, "menubar");
+  GLADE_HOOKUP_OBJECT (gdv1394d, menuitem1, "menuitem1");
+  GLADE_HOOKUP_OBJECT (gdv1394d, menuitem1_menu, "menuitem1_menu");
+  GLADE_HOOKUP_OBJECT (gdv1394d, item_connect, "item_connect");
+  GLADE_HOOKUP_OBJECT (gdv1394d, item_disconnect, "item_disconnect");
+  GLADE_HOOKUP_OBJECT (gdv1394d, separatormenuitem1, "separatormenuitem1");
+  GLADE_HOOKUP_OBJECT (gdv1394d, item_quit, "item_quit");
+  GLADE_HOOKUP_OBJECT (gdv1394d, toolbar1, "toolbar1");
+  GLADE_HOOKUP_OBJECT (gdv1394d, button_connect, "button_connect");
+  GLADE_HOOKUP_OBJECT (gdv1394d, button_disconnect, "button_disconnect");
+  GLADE_HOOKUP_OBJECT (gdv1394d, vseparator1, "vseparator1");
+  GLADE_HOOKUP_OBJECT (gdv1394d, button_quit, "button_quit");
+  GLADE_HOOKUP_OBJECT (gdv1394d, hbox, "hbox");
+  GLADE_HOOKUP_OBJECT (gdv1394d, toolbar2, "toolbar2");
+  GLADE_HOOKUP_OBJECT (gdv1394d, vbox6, "vbox6");
+  GLADE_HOOKUP_OBJECT (gdv1394d, notebook1, "notebook1");
+  GLADE_HOOKUP_OBJECT (gdv1394d, label40, "label40");
+  GLADE_HOOKUP_OBJECT (gdv1394d, hbox20, "hbox20");
+  GLADE_HOOKUP_OBJECT (gdv1394d, label46, "label46");
+  GLADE_HOOKUP_OBJECT (gdv1394d, hbox16, "hbox16");
+  GLADE_HOOKUP_OBJECT (gdv1394d, transport_0, "transport_0");
+  GLADE_HOOKUP_OBJECT (gdv1394d, image19, "image19");
+  GLADE_HOOKUP_OBJECT (gdv1394d, transport_1, "transport_1");
+  GLADE_HOOKUP_OBJECT (gdv1394d, image18, "image18");
+  GLADE_HOOKUP_OBJECT (gdv1394d, transport_2, "transport_2");
+  GLADE_HOOKUP_OBJECT (gdv1394d, image17, "image17");
+  GLADE_HOOKUP_OBJECT (gdv1394d, transport_3, "transport_3");
+  GLADE_HOOKUP_OBJECT (gdv1394d, image12, "image12");
+  GLADE_HOOKUP_OBJECT (gdv1394d, transport_4, "transport_4");
+  GLADE_HOOKUP_OBJECT (gdv1394d, image11, "image11");
+  GLADE_HOOKUP_OBJECT (gdv1394d, transport_5, "transport_5");
+  GLADE_HOOKUP_OBJECT (gdv1394d, image9, "image9");
+  GLADE_HOOKUP_OBJECT (gdv1394d, transport_6, "transport_6");
+  GLADE_HOOKUP_OBJECT (gdv1394d, alignment9, "alignment9");
+  GLADE_HOOKUP_OBJECT (gdv1394d, hbox17, "hbox17");
+  GLADE_HOOKUP_OBJECT (gdv1394d, image10, "image10");
+  GLADE_HOOKUP_OBJECT (gdv1394d, label41, "label41");
+  GLADE_HOOKUP_OBJECT (gdv1394d, transport_7, "transport_7");
+  GLADE_HOOKUP_OBJECT (gdv1394d, image13, "image13");
+  GLADE_HOOKUP_OBJECT (gdv1394d, transport_8, "transport_8");
+  GLADE_HOOKUP_OBJECT (gdv1394d, image14, "image14");
+  GLADE_HOOKUP_OBJECT (gdv1394d, transport_9, "transport_9");
+  GLADE_HOOKUP_OBJECT (gdv1394d, image15, "image15");
+  GLADE_HOOKUP_OBJECT (gdv1394d, transport_10, "transport_10");
+  GLADE_HOOKUP_OBJECT (gdv1394d, image16, "image16");
+  GLADE_HOOKUP_OBJECT (gdv1394d, label47, "label47");
+  GLADE_HOOKUP_OBJECT (gdv1394d, vbox_trim, "vbox_trim");
+  GLADE_HOOKUP_OBJECT (gdv1394d, statusbar, "statusbar");
+
+  return gdv1394d;
+}
+
+GtkWidget*
+create_window_connection (void)
+{
+  GtkWidget *window_connection;
+  GtkWidget *table2;
+  GtkWidget *label30;
+  GtkWidget *label31;
+  GtkWidget *entry_server;
+  GtkWidget *hbuttonbox4;
+  GtkWidget *button_connect;
+  GtkWidget *alignment2;
+  GtkWidget *hbox8;
+  GtkWidget *image2;
+  GtkWidget *label32;
+  GtkWidget *button_cancel;
+  GtkWidget *alignment3;
+  GtkWidget *hbox9;
+  GtkWidget *image3;
+  GtkWidget *label33;
+  GtkWidget *hbox10;
+  GtkWidget *entry_port;
+  GtkAccelGroup *accel_group;
+
+  accel_group = gtk_accel_group_new ();
+
+  window_connection = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_window_set_title (GTK_WINDOW (window_connection), _("Connection"));
+  gtk_window_set_position (GTK_WINDOW (window_connection), GTK_WIN_POS_MOUSE);
+  gtk_window_set_modal (GTK_WINDOW (window_connection), TRUE);
+  gtk_window_set_resizable (GTK_WINDOW (window_connection), FALSE);
+
+  table2 = gtk_table_new (3, 2, FALSE);
+  gtk_widget_show (table2);
+  gtk_container_add (GTK_CONTAINER (window_connection), table2);
+
+  label30 = gtk_label_new (_("Server "));
+  gtk_widget_show (label30);
+  gtk_table_attach (GTK_TABLE (table2), label30, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label30), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label30), 0, 0.5);
+
+  label31 = gtk_label_new (_("Port"));
+  gtk_widget_show (label31);
+  gtk_table_attach (GTK_TABLE (table2), label31, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label31), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label31), 0, 0.5);
+
+  entry_server = gtk_entry_new ();
+  gtk_widget_show (entry_server);
+  gtk_table_attach (GTK_TABLE (table2), entry_server, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_entry_set_text (GTK_ENTRY (entry_server), _("localhost"));
+
+  hbuttonbox4 = gtk_hbutton_box_new ();
+  gtk_widget_show (hbuttonbox4);
+  gtk_table_attach (GTK_TABLE (table2), hbuttonbox4, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox4), GTK_BUTTONBOX_SPREAD);
+
+  button_connect = gtk_button_new ();
+  gtk_widget_show (button_connect);
+  gtk_container_add (GTK_CONTAINER (hbuttonbox4), button_connect);
+  GTK_WIDGET_SET_FLAGS (button_connect, GTK_CAN_DEFAULT);
+  gtk_widget_add_accelerator (button_connect, "clicked", accel_group,
+                              GDK_Return, 0,
+                              GTK_ACCEL_VISIBLE);
+  gtk_button_set_relief (GTK_BUTTON (button_connect), GTK_RELIEF_NONE);
+
+  alignment2 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment2);
+  gtk_container_add (GTK_CONTAINER (button_connect), alignment2);
+
+  hbox8 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox8);
+  gtk_container_add (GTK_CONTAINER (alignment2), hbox8);
+
+  image2 = gtk_image_new_from_stock ("gtk-ok", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image2);
+  gtk_box_pack_start (GTK_BOX (hbox8), image2, FALSE, FALSE, 0);
+
+  label32 = gtk_label_new_with_mnemonic (_("Connect"));
+  gtk_widget_show (label32);
+  gtk_box_pack_start (GTK_BOX (hbox8), label32, FALSE, FALSE, 0);
+  gtk_label_set_justify (GTK_LABEL (label32), GTK_JUSTIFY_LEFT);
+
+  button_cancel = gtk_button_new ();
+  gtk_widget_show (button_cancel);
+  gtk_container_add (GTK_CONTAINER (hbuttonbox4), button_cancel);
+  GTK_WIDGET_SET_FLAGS (button_cancel, GTK_CAN_DEFAULT);
+  gtk_button_set_relief (GTK_BUTTON (button_cancel), GTK_RELIEF_NONE);
+
+  alignment3 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment3);
+  gtk_container_add (GTK_CONTAINER (button_cancel), alignment3);
+
+  hbox9 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox9);
+  gtk_container_add (GTK_CONTAINER (alignment3), hbox9);
+
+  image3 = gtk_image_new_from_stock ("gtk-no", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image3);
+  gtk_box_pack_start (GTK_BOX (hbox9), image3, FALSE, FALSE, 0);
+
+  label33 = gtk_label_new_with_mnemonic (_("Cancel"));
+  gtk_widget_show (label33);
+  gtk_box_pack_start (GTK_BOX (hbox9), label33, FALSE, FALSE, 0);
+  gtk_label_set_justify (GTK_LABEL (label33), GTK_JUSTIFY_LEFT);
+
+  hbox10 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox10);
+  gtk_table_attach (GTK_TABLE (table2), hbox10, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_FILL), 0, 0);
+
+  entry_port = gtk_entry_new ();
+  gtk_widget_show (entry_port);
+  gtk_box_pack_start (GTK_BOX (hbox10), entry_port, FALSE, TRUE, 0);
+  gtk_entry_set_max_length (GTK_ENTRY (entry_port), 5);
+  gtk_entry_set_text (GTK_ENTRY (entry_port), _("5250"));
+  gtk_entry_set_width_chars (GTK_ENTRY (entry_port), 5);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (window_connection, window_connection, "window_connection");
+  GLADE_HOOKUP_OBJECT (window_connection, table2, "table2");
+  GLADE_HOOKUP_OBJECT (window_connection, label30, "label30");
+  GLADE_HOOKUP_OBJECT (window_connection, label31, "label31");
+  GLADE_HOOKUP_OBJECT (window_connection, entry_server, "entry_server");
+  GLADE_HOOKUP_OBJECT (window_connection, hbuttonbox4, "hbuttonbox4");
+  GLADE_HOOKUP_OBJECT (window_connection, button_connect, "button_connect");
+  GLADE_HOOKUP_OBJECT (window_connection, alignment2, "alignment2");
+  GLADE_HOOKUP_OBJECT (window_connection, hbox8, "hbox8");
+  GLADE_HOOKUP_OBJECT (window_connection, image2, "image2");
+  GLADE_HOOKUP_OBJECT (window_connection, label32, "label32");
+  GLADE_HOOKUP_OBJECT (window_connection, button_cancel, "button_cancel");
+  GLADE_HOOKUP_OBJECT (window_connection, alignment3, "alignment3");
+  GLADE_HOOKUP_OBJECT (window_connection, hbox9, "hbox9");
+  GLADE_HOOKUP_OBJECT (window_connection, image3, "image3");
+  GLADE_HOOKUP_OBJECT (window_connection, label33, "label33");
+  GLADE_HOOKUP_OBJECT (window_connection, hbox10, "hbox10");
+  GLADE_HOOKUP_OBJECT (window_connection, entry_port, "entry_port");
+
+  gtk_widget_grab_default (button_connect);
+  gtk_window_add_accel_group (GTK_WINDOW (window_connection), accel_group);
+
+  return window_connection;
+}
+
+GtkWidget*
+create_page_status (void)
+{
+  GtkWidget *page_status;
+  GtkWidget *scrolledwindow4;
+  GtkWidget *viewport1;
+  GtkWidget *table3;
+  GtkWidget *label_unit_0;
+  GtkWidget *label_unit_1;
+  GtkWidget *label_unit_2;
+  GtkWidget *label_unit_3;
+  GtkWidget *label_unit_4;
+  GtkWidget *label_unit_5;
+  GtkWidget *label_unit_6;
+  GtkWidget *label_unit_7;
+  GtkWidget *label_unit_8;
+  GtkWidget *label_unit_9;
+  GtkWidget *label_unit_10;
+  GtkWidget *label_unit_11;
+  GtkWidget *label_unit_13;
+  GtkWidget *label_unit_14;
+  GtkWidget *label_unit_15;
+  GtkWidget *radiobutton_0;
+  GSList *radiobutton_0_group = NULL;
+  GtkWidget *radiobutton_1;
+  GtkWidget *radiobutton_2;
+  GtkWidget *radiobutton_3;
+  GtkWidget *radiobutton_4;
+  GtkWidget *radiobutton_5;
+  GtkWidget *radiobutton_6;
+  GtkWidget *radiobutton_7;
+  GtkWidget *radiobutton_8;
+  GtkWidget *radiobutton_9;
+  GtkWidget *radiobutton_10;
+  GtkWidget *radiobutton_11;
+  GtkWidget *label_unit_12;
+  GtkWidget *radiobutton_12;
+  GtkWidget *radiobutton_13;
+  GtkWidget *radiobutton_14;
+  GtkWidget *radiobutton_15;
+
+  page_status = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_window_set_title (GTK_WINDOW (page_status), _("page_status"));
+
+  scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_show (scrolledwindow4);
+  gtk_container_add (GTK_CONTAINER (page_status), scrolledwindow4);
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+  viewport1 = gtk_viewport_new (NULL, NULL);
+  gtk_widget_show (viewport1);
+  gtk_container_add (GTK_CONTAINER (scrolledwindow4), viewport1);
+
+  table3 = gtk_table_new (32, 1, FALSE);
+  gtk_widget_show (table3);
+  gtk_container_add (GTK_CONTAINER (viewport1), table3);
+
+  label_unit_0 = gtk_label_new (_("00"));
+  gtk_table_attach (GTK_TABLE (table3), label_unit_0, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label_unit_0), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label_unit_0), 0, 0.5);
+
+  label_unit_1 = gtk_label_new (_("01"));
+  gtk_table_attach (GTK_TABLE (table3), label_unit_1, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label_unit_1), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label_unit_1), 0, 0.5);
+
+  label_unit_2 = gtk_label_new (_("02"));
+  gtk_table_attach (GTK_TABLE (table3), label_unit_2, 0, 1, 5, 6,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label_unit_2), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label_unit_2), 0, 0.5);
+
+  label_unit_3 = gtk_label_new (_("03"));
+  gtk_table_attach (GTK_TABLE (table3), label_unit_3, 0, 1, 7, 8,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label_unit_3), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label_unit_3), 0, 0.5);
+
+  label_unit_4 = gtk_label_new (_("04"));
+  gtk_table_attach (GTK_TABLE (table3), label_unit_4, 0, 1, 9, 10,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label_unit_4), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label_unit_4), 0, 0.5);
+
+  label_unit_5 = gtk_label_new (_("05"));
+  gtk_table_attach (GTK_TABLE (table3), label_unit_5, 0, 1, 11, 12,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label_unit_5), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label_unit_5), 0, 0.5);
+
+  label_unit_6 = gtk_label_new (_("06"));
+  gtk_table_attach (GTK_TABLE (table3), label_unit_6, 0, 1, 13, 14,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label_unit_6), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label_unit_6), 0, 0.5);
+
+  label_unit_7 = gtk_label_new (_("07"));
+  gtk_table_attach (GTK_TABLE (table3), label_unit_7, 0, 1, 15, 16,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label_unit_7), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label_unit_7), 0, 0.5);
+
+  label_unit_8 = gtk_label_new (_("08"));
+  gtk_table_attach (GTK_TABLE (table3), label_unit_8, 0, 1, 17, 18,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label_unit_8), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label_unit_8), 0, 0.5);
+
+  label_unit_9 = gtk_label_new (_("09"));
+  gtk_table_attach (GTK_TABLE (table3), label_unit_9, 0, 1, 19, 20,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label_unit_9), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label_unit_9), 0, 0.5);
+
+  label_unit_10 = gtk_label_new (_("10"));
+  gtk_table_attach (GTK_TABLE (table3), label_unit_10, 0, 1, 21, 22,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label_unit_10), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label_unit_10), 0, 0.5);
+
+  label_unit_11 = gtk_label_new (_("11"));
+  gtk_table_attach (GTK_TABLE (table3), label_unit_11, 0, 1, 23, 24,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label_unit_11), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label_unit_11), 0, 0.5);
+
+  label_unit_13 = gtk_label_new (_("13"));
+  gtk_table_attach (GTK_TABLE (table3), label_unit_13, 0, 1, 27, 28,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label_unit_13), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label_unit_13), 0, 0.5);
+
+  label_unit_14 = gtk_label_new (_("14"));
+  gtk_table_attach (GTK_TABLE (table3), label_unit_14, 0, 1, 29, 30,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label_unit_14), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label_unit_14), 0, 0.5);
+
+  label_unit_15 = gtk_label_new (_("15"));
+  gtk_table_attach (GTK_TABLE (table3), label_unit_15, 0, 1, 31, 32,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label_unit_15), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label_unit_15), 0, 0.5);
+
+  radiobutton_0 = gtk_radio_button_new_with_mnemonic (NULL, _("<disconnected>"));
+  gtk_table_attach (GTK_TABLE (table3), radiobutton_0, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_0), radiobutton_0_group);
+  radiobutton_0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_0));
+
+  radiobutton_1 = gtk_radio_button_new_with_mnemonic (NULL, _("<disconnected>"));
+  gtk_table_attach (GTK_TABLE (table3), radiobutton_1, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_1), radiobutton_0_group);
+  radiobutton_0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_1));
+
+  radiobutton_2 = gtk_radio_button_new_with_mnemonic (NULL, _("<disconnected>"));
+  gtk_table_attach (GTK_TABLE (table3), radiobutton_2, 0, 1, 4, 5,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_2), radiobutton_0_group);
+  radiobutton_0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_2));
+
+  radiobutton_3 = gtk_radio_button_new_with_mnemonic (NULL, _("<disconnected>"));
+  gtk_table_attach (GTK_TABLE (table3), radiobutton_3, 0, 1, 6, 7,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_3), radiobutton_0_group);
+  radiobutton_0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_3));
+
+  radiobutton_4 = gtk_radio_button_new_with_mnemonic (NULL, _("<disconnected>"));
+  gtk_table_attach (GTK_TABLE (table3), radiobutton_4, 0, 1, 8, 9,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_4), radiobutton_0_group);
+  radiobutton_0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_4));
+
+  radiobutton_5 = gtk_radio_button_new_with_mnemonic (NULL, _("<disconnected>"));
+  gtk_table_attach (GTK_TABLE (table3), radiobutton_5, 0, 1, 10, 11,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_5), radiobutton_0_group);
+  radiobutton_0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_5));
+
+  radiobutton_6 = gtk_radio_button_new_with_mnemonic (NULL, _("<disconnected>"));
+  gtk_table_attach (GTK_TABLE (table3), radiobutton_6, 0, 1, 12, 13,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_6), radiobutton_0_group);
+  radiobutton_0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_6));
+
+  radiobutton_7 = gtk_radio_button_new_with_mnemonic (NULL, _("<disconnected>"));
+  gtk_table_attach (GTK_TABLE (table3), radiobutton_7, 0, 1, 14, 15,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_7), radiobutton_0_group);
+  radiobutton_0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_7));
+
+  radiobutton_8 = gtk_radio_button_new_with_mnemonic (NULL, _("<disconnected>"));
+  gtk_table_attach (GTK_TABLE (table3), radiobutton_8, 0, 1, 16, 17,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_8), radiobutton_0_group);
+  radiobutton_0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_8));
+
+  radiobutton_9 = gtk_radio_button_new_with_mnemonic (NULL, _("<disconnected>"));
+  gtk_table_attach (GTK_TABLE (table3), radiobutton_9, 0, 1, 18, 19,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_9), radiobutton_0_group);
+  radiobutton_0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_9));
+
+  radiobutton_10 = gtk_radio_button_new_with_mnemonic (NULL, _("<disconnected>"));
+  gtk_table_attach (GTK_TABLE (table3), radiobutton_10, 0, 1, 20, 21,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_10), radiobutton_0_group);
+  radiobutton_0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_10));
+
+  radiobutton_11 = gtk_radio_button_new_with_mnemonic (NULL, _("<disconnected>"));
+  gtk_table_attach (GTK_TABLE (table3), radiobutton_11, 0, 1, 22, 23,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_11), radiobutton_0_group);
+  radiobutton_0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_11));
+
+  label_unit_12 = gtk_label_new (_("12"));
+  gtk_table_attach (GTK_TABLE (table3), label_unit_12, 0, 1, 25, 26,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label_unit_12), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label_unit_12), 0, 0.5);
+
+  radiobutton_12 = gtk_radio_button_new_with_mnemonic (NULL, _("<disconnected>"));
+  gtk_table_attach (GTK_TABLE (table3), radiobutton_12, 0, 1, 24, 25,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_12), radiobutton_0_group);
+  radiobutton_0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_12));
+
+  radiobutton_13 = gtk_radio_button_new_with_mnemonic (NULL, _("<disconnected>"));
+  gtk_table_attach (GTK_TABLE (table3), radiobutton_13, 0, 1, 26, 27,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_13), radiobutton_0_group);
+  radiobutton_0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_13));
+
+  radiobutton_14 = gtk_radio_button_new_with_mnemonic (NULL, _("<disconnected>"));
+  gtk_table_attach (GTK_TABLE (table3), radiobutton_14, 0, 1, 28, 29,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_14), radiobutton_0_group);
+  radiobutton_0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_14));
+
+  radiobutton_15 = gtk_radio_button_new_with_mnemonic (NULL, _("<disconnected>"));
+  gtk_table_attach (GTK_TABLE (table3), radiobutton_15, 0, 1, 30, 31,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_15), radiobutton_0_group);
+  radiobutton_0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_15));
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (page_status, page_status, "page_status");
+  GLADE_HOOKUP_OBJECT (page_status, scrolledwindow4, "scrolledwindow4");
+  GLADE_HOOKUP_OBJECT (page_status, viewport1, "viewport1");
+  GLADE_HOOKUP_OBJECT (page_status, table3, "table3");
+  GLADE_HOOKUP_OBJECT (page_status, label_unit_0, "label_unit_0");
+  GLADE_HOOKUP_OBJECT (page_status, label_unit_1, "label_unit_1");
+  GLADE_HOOKUP_OBJECT (page_status, label_unit_2, "label_unit_2");
+  GLADE_HOOKUP_OBJECT (page_status, label_unit_3, "label_unit_3");
+  GLADE_HOOKUP_OBJECT (page_status, label_unit_4, "label_unit_4");
+  GLADE_HOOKUP_OBJECT (page_status, label_unit_5, "label_unit_5");
+  GLADE_HOOKUP_OBJECT (page_status, label_unit_6, "label_unit_6");
+  GLADE_HOOKUP_OBJECT (page_status, label_unit_7, "label_unit_7");
+  GLADE_HOOKUP_OBJECT (page_status, label_unit_8, "label_unit_8");
+  GLADE_HOOKUP_OBJECT (page_status, label_unit_9, "label_unit_9");
+  GLADE_HOOKUP_OBJECT (page_status, label_unit_10, "label_unit_10");
+  GLADE_HOOKUP_OBJECT (page_status, label_unit_11, "label_unit_11");
+  GLADE_HOOKUP_OBJECT (page_status, label_unit_13, "label_unit_13");
+  GLADE_HOOKUP_OBJECT (page_status, label_unit_14, "label_unit_14");
+  GLADE_HOOKUP_OBJECT (page_status, label_unit_15, "label_unit_15");
+  GLADE_HOOKUP_OBJECT (page_status, radiobutton_0, "radiobutton_0");
+  GLADE_HOOKUP_OBJECT (page_status, radiobutton_1, "radiobutton_1");
+  GLADE_HOOKUP_OBJECT (page_status, radiobutton_2, "radiobutton_2");
+  GLADE_HOOKUP_OBJECT (page_status, radiobutton_3, "radiobutton_3");
+  GLADE_HOOKUP_OBJECT (page_status, radiobutton_4, "radiobutton_4");
+  GLADE_HOOKUP_OBJECT (page_status, radiobutton_5, "radiobutton_5");
+  GLADE_HOOKUP_OBJECT (page_status, radiobutton_6, "radiobutton_6");
+  GLADE_HOOKUP_OBJECT (page_status, radiobutton_7, "radiobutton_7");
+  GLADE_HOOKUP_OBJECT (page_status, radiobutton_8, "radiobutton_8");
+  GLADE_HOOKUP_OBJECT (page_status, radiobutton_9, "radiobutton_9");
+  GLADE_HOOKUP_OBJECT (page_status, radiobutton_10, "radiobutton_10");
+  GLADE_HOOKUP_OBJECT (page_status, radiobutton_11, "radiobutton_11");
+  GLADE_HOOKUP_OBJECT (page_status, label_unit_12, "label_unit_12");
+  GLADE_HOOKUP_OBJECT (page_status, radiobutton_12, "radiobutton_12");
+  GLADE_HOOKUP_OBJECT (page_status, radiobutton_13, "radiobutton_13");
+  GLADE_HOOKUP_OBJECT (page_status, radiobutton_14, "radiobutton_14");
+  GLADE_HOOKUP_OBJECT (page_status, radiobutton_15, "radiobutton_15");
+
+  return page_status;
+}
+
+GtkWidget*
+create_page_clips (void)
+{
+  GtkWidget *page_clips;
+  GtkWidget *vbox8;
+  GtkWidget *hbox26;
+  GtkWidget *label_directory;
+  GtkWidget *optionmenu1;
+  GtkWidget *menu1;
+  GtkWidget *mode_0;
+  GtkWidget *mode_1;
+  GtkWidget *mode_2;
+  GtkWidget *mode_3;
+  GtkWidget *hpaned1;
+  GtkWidget *table1;
+  GtkWidget *scrolledwindow1;
+  GtkWidget *list_dir;
+  GtkWidget *vpaned1;
+  GtkWidget *table5;
+  GtkWidget *scrolledwindow6;
+  GtkWidget *list_clips;
+  GtkWidget *table4;
+  GtkWidget *scrolledwindow5;
+  GtkWidget *treeview1;
+  GtkWidget *alignment12;
+  GtkWidget *hbox19;
+  GtkWidget *label44;
+  GtkWidget *button_clips_refresh;
+  GtkWidget *alignment5;
+  GtkWidget *hbox12;
+  GtkWidget *image5;
+  GtkWidget *label36;
+  GtkWidget *button_clips_home;
+  GtkWidget *alignment6;
+  GtkWidget *hbox13;
+  GtkWidget *image6;
+  GtkWidget *label37;
+  GtkWidget *button_up;
+  GtkWidget *image21;
+  GtkWidget *button_down;
+  GtkWidget *image22;
+  GtkWidget *button_remove;
+  GtkWidget *image23;
+  GtkWidget *button_clean;
+  GtkWidget *image24;
+  GtkWidget *hbuttonbox5;
+  GtkWidget *label45;
+
+  page_clips = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_window_set_title (GTK_WINDOW (page_clips), _("page_clips"));
+
+  vbox8 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox8);
+  gtk_container_add (GTK_CONTAINER (page_clips), vbox8);
+
+  hbox26 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox26);
+  gtk_box_pack_start (GTK_BOX (vbox8), hbox26, FALSE, FALSE, 0);
+
+  label_directory = gtk_label_new (_("Disconnected"));
+  gtk_widget_show (label_directory);
+  gtk_box_pack_start (GTK_BOX (hbox26), label_directory, TRUE, TRUE, 0);
+  gtk_misc_set_alignment (GTK_MISC (label_directory), 0, 0.5);
+
+  optionmenu1 = gtk_option_menu_new ();
+  gtk_widget_show (optionmenu1);
+  gtk_box_pack_start (GTK_BOX (hbox26), optionmenu1, FALSE, FALSE, 0);
+  GTK_WIDGET_UNSET_FLAGS (optionmenu1, GTK_CAN_FOCUS);
+
+  menu1 = gtk_menu_new ();
+
+  mode_0 = gtk_menu_item_new_with_mnemonic (_("Play"));
+  gtk_widget_show (mode_0);
+  gtk_container_add (GTK_CONTAINER (menu1), mode_0);
+
+  mode_1 = gtk_menu_item_new_with_mnemonic (_("Load"));
+  gtk_widget_show (mode_1);
+  gtk_container_add (GTK_CONTAINER (menu1), mode_1);
+
+  mode_2 = gtk_menu_item_new_with_mnemonic (_("Queue"));
+  gtk_widget_show (mode_2);
+  gtk_container_add (GTK_CONTAINER (menu1), mode_2);
+
+  mode_3 = gtk_menu_item_new_with_mnemonic (_("Insert"));
+  gtk_widget_show (mode_3);
+  gtk_container_add (GTK_CONTAINER (menu1), mode_3);
+
+  gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu1), menu1);
+
+  hpaned1 = gtk_hpaned_new ();
+  gtk_widget_show (hpaned1);
+  gtk_box_pack_start (GTK_BOX (vbox8), hpaned1, TRUE, TRUE, 0);
+  gtk_paned_set_position (GTK_PANED (hpaned1), 120);
+
+  table1 = gtk_table_new (1, 1, FALSE);
+  gtk_widget_show (table1);
+  gtk_paned_pack1 (GTK_PANED (hpaned1), table1, FALSE, TRUE);
+
+  scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_show (scrolledwindow1);
+  gtk_table_attach (GTK_TABLE (table1), scrolledwindow1, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL),
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), 0, 0);
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+  list_dir = gtk_tree_view_new ();
+  gtk_widget_show (list_dir);
+  gtk_container_add (GTK_CONTAINER (scrolledwindow1), list_dir);
+  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (list_dir), FALSE);
+
+  vpaned1 = gtk_vpaned_new ();
+  gtk_widget_show (vpaned1);
+  gtk_paned_pack2 (GTK_PANED (hpaned1), vpaned1, TRUE, TRUE);
+  gtk_paned_set_position (GTK_PANED (vpaned1), 130);
+
+  table5 = gtk_table_new (1, 1, FALSE);
+  gtk_widget_show (table5);
+  gtk_paned_pack1 (GTK_PANED (vpaned1), table5, TRUE, TRUE);
+
+  scrolledwindow6 = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_show (scrolledwindow6);
+  gtk_table_attach (GTK_TABLE (table5), scrolledwindow6, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL),
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), 0, 0);
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+  list_clips = gtk_tree_view_new ();
+  gtk_widget_show (list_clips);
+  gtk_container_add (GTK_CONTAINER (scrolledwindow6), list_clips);
+  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (list_clips), FALSE);
+  gtk_tree_view_set_enable_search (GTK_TREE_VIEW (list_clips), FALSE);
+
+  table4 = gtk_table_new (2, 1, FALSE);
+  gtk_paned_pack2 (GTK_PANED (vpaned1), table4, TRUE, TRUE);
+
+  scrolledwindow5 = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_show (scrolledwindow5);
+  gtk_table_attach (GTK_TABLE (table4), scrolledwindow5, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL),
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), 0, 0);
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+  treeview1 = gtk_tree_view_new ();
+  gtk_widget_show (treeview1);
+  gtk_container_add (GTK_CONTAINER (scrolledwindow5), treeview1);
+
+  alignment12 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment12);
+  gtk_table_attach (GTK_TABLE (table4), alignment12, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_FILL), 0, 0);
+
+  hbox19 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox19);
+  gtk_container_add (GTK_CONTAINER (alignment12), hbox19);
+
+  label44 = gtk_label_new (_(" "));
+  gtk_widget_show (label44);
+  gtk_box_pack_start (GTK_BOX (hbox19), label44, TRUE, TRUE, 0);
+  gtk_label_set_justify (GTK_LABEL (label44), GTK_JUSTIFY_LEFT);
+
+  button_clips_refresh = gtk_button_new ();
+  gtk_widget_show (button_clips_refresh);
+  gtk_box_pack_start (GTK_BOX (hbox19), button_clips_refresh, FALSE, FALSE, 0);
+  GTK_WIDGET_UNSET_FLAGS (button_clips_refresh, GTK_CAN_FOCUS);
+  GTK_WIDGET_SET_FLAGS (button_clips_refresh, GTK_CAN_DEFAULT);
+  gtk_button_set_relief (GTK_BUTTON (button_clips_refresh), GTK_RELIEF_NONE);
+
+  alignment5 = gtk_alignment_new (0, 0.5, 0, 0);
+  gtk_widget_show (alignment5);
+  gtk_container_add (GTK_CONTAINER (button_clips_refresh), alignment5);
+
+  hbox12 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox12);
+  gtk_container_add (GTK_CONTAINER (alignment5), hbox12);
+
+  image5 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image5);
+  gtk_box_pack_start (GTK_BOX (hbox12), image5, FALSE, FALSE, 0);
+
+  label36 = gtk_label_new_with_mnemonic ("");
+  gtk_widget_show (label36);
+  gtk_box_pack_start (GTK_BOX (hbox12), label36, FALSE, FALSE, 0);
+  gtk_label_set_justify (GTK_LABEL (label36), GTK_JUSTIFY_LEFT);
+
+  button_clips_home = gtk_button_new ();
+  gtk_widget_show (button_clips_home);
+  gtk_box_pack_start (GTK_BOX (hbox19), button_clips_home, FALSE, FALSE, 0);
+  GTK_WIDGET_UNSET_FLAGS (button_clips_home, GTK_CAN_FOCUS);
+  GTK_WIDGET_SET_FLAGS (button_clips_home, GTK_CAN_DEFAULT);
+  gtk_button_set_relief (GTK_BUTTON (button_clips_home), GTK_RELIEF_NONE);
+
+  alignment6 = gtk_alignment_new (0, 0.5, 0, 0);
+  gtk_widget_show (alignment6);
+  gtk_container_add (GTK_CONTAINER (button_clips_home), alignment6);
+
+  hbox13 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox13);
+  gtk_container_add (GTK_CONTAINER (alignment6), hbox13);
+
+  image6 = gtk_image_new_from_stock ("gtk-home", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image6);
+  gtk_box_pack_start (GTK_BOX (hbox13), image6, FALSE, FALSE, 0);
+
+  label37 = gtk_label_new_with_mnemonic ("");
+  gtk_widget_show (label37);
+  gtk_box_pack_start (GTK_BOX (hbox13), label37, FALSE, FALSE, 0);
+  gtk_label_set_justify (GTK_LABEL (label37), GTK_JUSTIFY_LEFT);
+
+  button_up = gtk_button_new ();
+  gtk_widget_show (button_up);
+  gtk_box_pack_start (GTK_BOX (hbox19), button_up, FALSE, FALSE, 0);
+  GTK_WIDGET_UNSET_FLAGS (button_up, GTK_CAN_FOCUS);
+  GTK_WIDGET_SET_FLAGS (button_up, GTK_CAN_DEFAULT);
+  gtk_button_set_relief (GTK_BUTTON (button_up), GTK_RELIEF_NONE);
+
+  image21 = gtk_image_new_from_stock ("gtk-go-up", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image21);
+  gtk_container_add (GTK_CONTAINER (button_up), image21);
+
+  button_down = gtk_button_new ();
+  gtk_widget_show (button_down);
+  gtk_box_pack_start (GTK_BOX (hbox19), button_down, FALSE, FALSE, 0);
+  GTK_WIDGET_UNSET_FLAGS (button_down, GTK_CAN_FOCUS);
+  GTK_WIDGET_SET_FLAGS (button_down, GTK_CAN_DEFAULT);
+  gtk_button_set_relief (GTK_BUTTON (button_down), GTK_RELIEF_NONE);
+
+  image22 = gtk_image_new_from_stock ("gtk-go-down", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image22);
+  gtk_container_add (GTK_CONTAINER (button_down), image22);
+
+  button_remove = gtk_button_new ();
+  gtk_widget_show (button_remove);
+  gtk_box_pack_start (GTK_BOX (hbox19), button_remove, FALSE, FALSE, 0);
+  GTK_WIDGET_UNSET_FLAGS (button_remove, GTK_CAN_FOCUS);
+  GTK_WIDGET_SET_FLAGS (button_remove, GTK_CAN_DEFAULT);
+  gtk_button_set_relief (GTK_BUTTON (button_remove), GTK_RELIEF_NONE);
+
+  image23 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image23);
+  gtk_container_add (GTK_CONTAINER (button_remove), image23);
+
+  button_clean = gtk_button_new ();
+  gtk_widget_show (button_clean);
+  gtk_box_pack_start (GTK_BOX (hbox19), button_clean, FALSE, FALSE, 0);
+  GTK_WIDGET_UNSET_FLAGS (button_clean, GTK_CAN_FOCUS);
+  GTK_WIDGET_SET_FLAGS (button_clean, GTK_CAN_DEFAULT);
+  gtk_button_set_relief (GTK_BUTTON (button_clean), GTK_RELIEF_NONE);
+
+  image24 = gtk_image_new_from_stock ("gtk-clear", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image24);
+  gtk_container_add (GTK_CONTAINER (button_clean), image24);
+
+  hbuttonbox5 = gtk_hbutton_box_new ();
+  gtk_widget_show (hbuttonbox5);
+  gtk_box_pack_start (GTK_BOX (hbox19), hbuttonbox5, FALSE, FALSE, 0);
+
+  label45 = gtk_label_new (_(" "));
+  gtk_widget_show (label45);
+  gtk_box_pack_start (GTK_BOX (hbox19), label45, TRUE, TRUE, 0);
+  gtk_label_set_justify (GTK_LABEL (label45), GTK_JUSTIFY_LEFT);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (page_clips, page_clips, "page_clips");
+  GLADE_HOOKUP_OBJECT (page_clips, vbox8, "vbox8");
+  GLADE_HOOKUP_OBJECT (page_clips, hbox26, "hbox26");
+  GLADE_HOOKUP_OBJECT (page_clips, label_directory, "label_directory");
+  GLADE_HOOKUP_OBJECT (page_clips, optionmenu1, "optionmenu1");
+  GLADE_HOOKUP_OBJECT (page_clips, menu1, "menu1");
+  GLADE_HOOKUP_OBJECT (page_clips, mode_0, "mode_0");
+  GLADE_HOOKUP_OBJECT (page_clips, mode_1, "mode_1");
+  GLADE_HOOKUP_OBJECT (page_clips, mode_2, "mode_2");
+  GLADE_HOOKUP_OBJECT (page_clips, mode_3, "mode_3");
+  GLADE_HOOKUP_OBJECT (page_clips, hpaned1, "hpaned1");
+  GLADE_HOOKUP_OBJECT (page_clips, table1, "table1");
+  GLADE_HOOKUP_OBJECT (page_clips, scrolledwindow1, "scrolledwindow1");
+  GLADE_HOOKUP_OBJECT (page_clips, list_dir, "list_dir");
+  GLADE_HOOKUP_OBJECT (page_clips, vpaned1, "vpaned1");
+  GLADE_HOOKUP_OBJECT (page_clips, table5, "table5");
+  GLADE_HOOKUP_OBJECT (page_clips, scrolledwindow6, "scrolledwindow6");
+  GLADE_HOOKUP_OBJECT (page_clips, list_clips, "list_clips");
+  GLADE_HOOKUP_OBJECT (page_clips, table4, "table4");
+  GLADE_HOOKUP_OBJECT (page_clips, scrolledwindow5, "scrolledwindow5");
+  GLADE_HOOKUP_OBJECT (page_clips, treeview1, "treeview1");
+  GLADE_HOOKUP_OBJECT (page_clips, alignment12, "alignment12");
+  GLADE_HOOKUP_OBJECT (page_clips, hbox19, "hbox19");
+  GLADE_HOOKUP_OBJECT (page_clips, label44, "label44");
+  GLADE_HOOKUP_OBJECT (page_clips, button_clips_refresh, "button_clips_refresh");
+  GLADE_HOOKUP_OBJECT (page_clips, alignment5, "alignment5");
+  GLADE_HOOKUP_OBJECT (page_clips, hbox12, "hbox12");
+  GLADE_HOOKUP_OBJECT (page_clips, image5, "image5");
+  GLADE_HOOKUP_OBJECT (page_clips, label36, "label36");
+  GLADE_HOOKUP_OBJECT (page_clips, button_clips_home, "button_clips_home");
+  GLADE_HOOKUP_OBJECT (page_clips, alignment6, "alignment6");
+  GLADE_HOOKUP_OBJECT (page_clips, hbox13, "hbox13");
+  GLADE_HOOKUP_OBJECT (page_clips, image6, "image6");
+  GLADE_HOOKUP_OBJECT (page_clips, label37, "label37");
+  GLADE_HOOKUP_OBJECT (page_clips, button_up, "button_up");
+  GLADE_HOOKUP_OBJECT (page_clips, image21, "image21");
+  GLADE_HOOKUP_OBJECT (page_clips, button_down, "button_down");
+  GLADE_HOOKUP_OBJECT (page_clips, image22, "image22");
+  GLADE_HOOKUP_OBJECT (page_clips, button_remove, "button_remove");
+  GLADE_HOOKUP_OBJECT (page_clips, image23, "image23");
+  GLADE_HOOKUP_OBJECT (page_clips, button_clean, "button_clean");
+  GLADE_HOOKUP_OBJECT (page_clips, image24, "image24");
+  GLADE_HOOKUP_OBJECT (page_clips, hbuttonbox5, "hbuttonbox5");
+  GLADE_HOOKUP_OBJECT (page_clips, label45, "label45");
+
+  gtk_widget_grab_focus (list_dir);
+  return page_clips;
+}
+
+GtkWidget*
+create_page_shell (void)
+{
+  GtkWidget *page_shell;
+  GtkWidget *vbox4;
+  GtkWidget *hbox6;
+  GtkWidget *label10;
+  GtkWidget *entry_command;
+  GtkWidget *button_command;
+  GtkWidget *alignment7;
+  GtkWidget *hbox14;
+  GtkWidget *image7;
+  GtkWidget *label38;
+  GtkWidget *button_command_clear;
+  GtkWidget *alignment8;
+  GtkWidget *hbox15;
+  GtkWidget *image8;
+  GtkWidget *label39;
+  GtkWidget *scrolledwindow3;
+  GtkWidget *textview_command;
+  GtkWidget *hbuttonbox3;
+
+  page_shell = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_window_set_title (GTK_WINDOW (page_shell), _("page_shell"));
+
+  vbox4 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox4);
+  gtk_container_add (GTK_CONTAINER (page_shell), vbox4);
+
+  hbox6 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox6);
+  gtk_box_pack_start (GTK_BOX (vbox4), hbox6, FALSE, TRUE, 0);
+
+  label10 = gtk_label_new (_("Command "));
+  gtk_widget_show (label10);
+  gtk_box_pack_start (GTK_BOX (hbox6), label10, FALSE, FALSE, 0);
+  gtk_label_set_justify (GTK_LABEL (label10), GTK_JUSTIFY_LEFT);
+
+  entry_command = gtk_entry_new ();
+  gtk_widget_show (entry_command);
+  gtk_box_pack_start (GTK_BOX (hbox6), entry_command, TRUE, TRUE, 0);
+
+  button_command = gtk_button_new ();
+  gtk_widget_show (button_command);
+  gtk_box_pack_start (GTK_BOX (hbox6), button_command, FALSE, FALSE, 0);
+  GTK_WIDGET_SET_FLAGS (button_command, GTK_CAN_DEFAULT);
+  gtk_button_set_relief (GTK_BUTTON (button_command), GTK_RELIEF_NONE);
+
+  alignment7 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment7);
+  gtk_container_add (GTK_CONTAINER (button_command), alignment7);
+
+  hbox14 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox14);
+  gtk_container_add (GTK_CONTAINER (alignment7), hbox14);
+
+  image7 = gtk_image_new_from_stock ("gtk-ok", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image7);
+  gtk_box_pack_start (GTK_BOX (hbox14), image7, FALSE, FALSE, 0);
+
+  label38 = gtk_label_new_with_mnemonic (_("_OK"));
+  gtk_widget_show (label38);
+  gtk_box_pack_start (GTK_BOX (hbox14), label38, FALSE, FALSE, 0);
+  gtk_label_set_justify (GTK_LABEL (label38), GTK_JUSTIFY_LEFT);
+
+  button_command_clear = gtk_button_new ();
+  gtk_widget_show (button_command_clear);
+  gtk_box_pack_start (GTK_BOX (hbox6), button_command_clear, FALSE, FALSE, 0);
+  GTK_WIDGET_SET_FLAGS (button_command_clear, GTK_CAN_DEFAULT);
+  gtk_button_set_relief (GTK_BUTTON (button_command_clear), GTK_RELIEF_NONE);
+
+  alignment8 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment8);
+  gtk_container_add (GTK_CONTAINER (button_command_clear), alignment8);
+
+  hbox15 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox15);
+  gtk_container_add (GTK_CONTAINER (alignment8), hbox15);
+
+  image8 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image8);
+  gtk_box_pack_start (GTK_BOX (hbox15), image8, FALSE, FALSE, 0);
+
+  label39 = gtk_label_new_with_mnemonic (_("Clear"));
+  gtk_widget_show (label39);
+  gtk_box_pack_start (GTK_BOX (hbox15), label39, FALSE, FALSE, 0);
+  gtk_label_set_justify (GTK_LABEL (label39), GTK_JUSTIFY_LEFT);
+
+  scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_show (scrolledwindow3);
+  gtk_box_pack_start (GTK_BOX (vbox4), scrolledwindow3, TRUE, TRUE, 0);
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+  textview_command = gtk_text_view_new ();
+  gtk_widget_show (textview_command);
+  gtk_container_add (GTK_CONTAINER (scrolledwindow3), textview_command);
+  GTK_WIDGET_UNSET_FLAGS (textview_command, GTK_CAN_FOCUS);
+  gtk_text_view_set_editable (GTK_TEXT_VIEW (textview_command), FALSE);
+  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (textview_command), GTK_WRAP_WORD);
+  gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (textview_command), FALSE);
+
+  hbuttonbox3 = gtk_hbutton_box_new ();
+  gtk_widget_show (hbuttonbox3);
+  gtk_box_pack_start (GTK_BOX (vbox4), hbuttonbox3, FALSE, TRUE, 0);
+  gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox3), GTK_BUTTONBOX_SPREAD);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (page_shell, page_shell, "page_shell");
+  GLADE_HOOKUP_OBJECT (page_shell, vbox4, "vbox4");
+  GLADE_HOOKUP_OBJECT (page_shell, hbox6, "hbox6");
+  GLADE_HOOKUP_OBJECT (page_shell, label10, "label10");
+  GLADE_HOOKUP_OBJECT (page_shell, entry_command, "entry_command");
+  GLADE_HOOKUP_OBJECT (page_shell, button_command, "button_command");
+  GLADE_HOOKUP_OBJECT (page_shell, alignment7, "alignment7");
+  GLADE_HOOKUP_OBJECT (page_shell, hbox14, "hbox14");
+  GLADE_HOOKUP_OBJECT (page_shell, image7, "image7");
+  GLADE_HOOKUP_OBJECT (page_shell, label38, "label38");
+  GLADE_HOOKUP_OBJECT (page_shell, button_command_clear, "button_command_clear");
+  GLADE_HOOKUP_OBJECT (page_shell, alignment8, "alignment8");
+  GLADE_HOOKUP_OBJECT (page_shell, hbox15, "hbox15");
+  GLADE_HOOKUP_OBJECT (page_shell, image8, "image8");
+  GLADE_HOOKUP_OBJECT (page_shell, label39, "label39");
+  GLADE_HOOKUP_OBJECT (page_shell, scrolledwindow3, "scrolledwindow3");
+  GLADE_HOOKUP_OBJECT (page_shell, textview_command, "textview_command");
+  GLADE_HOOKUP_OBJECT (page_shell, hbuttonbox3, "hbuttonbox3");
+
+  gtk_widget_grab_default (button_command);
+  return page_shell;
+}
+
diff --git a/src/interface.h b/src/interface.h
new file mode 100644 (file)
index 0000000..07ec112
--- /dev/null
@@ -0,0 +1,9 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+GtkWidget* create_gdv1394d (void);
+GtkWidget* create_window_connection (void);
+GtkWidget* create_page_status (void);
+GtkWidget* create_page_clips (void);
+GtkWidget* create_page_shell (void);
diff --git a/src/main.c b/src/main.c
new file mode 100644 (file)
index 0000000..e5faa96
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * main.c -- GTK+ 2 dv1394d client demo
+ * Copyright (C) 2002-2003 Charles Yates <charles.yates@pandora.be>
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <unistd.h>
+#include <string.h>
+
+#include <stdio.h>
+#include "interface.h"
+#include "support.h"
+#include "dv1394app.h"
+
+int main( int argc, char *argv[] )
+{
+       char path[ 512 ];
+       dv1394app app = NULL;
+       GtkWidget *gdv1394d;
+
+#ifdef ENABLE_NLS
+       bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
+       bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+       textdomain (GETTEXT_PACKAGE);
+#endif
+       
+       g_thread_init(NULL);
+       gdk_threads_init( );
+       gtk_set_locale( );
+       gtk_init( &argc, &argv );
+
+       // Linux hack to determine path of the executable
+       readlink( "/proc/self/exe", path, 512 );
+       if ( strstr( path, "/bin/fireswamp" ) )
+       {
+               ( *strstr( path, "/bin/fireswamp" ) ) = '\0';
+               strcat( path, "/share/fireswamp/pixmaps" );
+               add_pixmap_directory( path );
+       }
+       else
+       {
+               add_pixmap_directory( PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps" );
+       }
+
+       gdv1394d = create_gdv1394d ();
+       gtk_widget_show (gdv1394d);
+       
+       gdk_threads_enter();
+       app = dv1394app_init( gdv1394d, argv[ 1 ] );
+       gtk_main ();
+       gdk_threads_leave();
+       
+       dv1394app_close( app );
+
+       return 0;
+}
+
diff --git a/src/page.c b/src/page.c
new file mode 100644 (file)
index 0000000..fc81a40
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * page.c -- Page handling
+ * Copyright (C) 2002-2003 Charles Yates <charles.yates@pandora.be>
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <page.h>
+#include <gtk/gtk.h>
+
+GtkWidget *page_get_widget( page this )
+{
+       return this->get_widget( this );
+}
+
+void page_get_toolbar_info( page this, GtkIconSize size, GtkWidget **icon, char **label )
+{
+       if ( this->get_toolbar_info )
+       {
+               this->get_toolbar_info( this, size, icon, label );
+       }
+       else
+       {
+               *icon = gtk_image_new_from_stock( "gtk-execute",  size );
+               *label = "_Unknown";
+       }
+}
+
+/** Called on connection being established to a server.
+*/
+
+void page_on_connect( page this )
+{
+       if ( this->on_connect )
+               this->on_connect( this );
+}
+
+/** Called on a disconnection from a server.
+*/
+
+void page_on_disconnect( page this )
+{
+       if ( this->on_disconnect )
+               this->on_disconnect( this );
+}
+
+/** Called when the user changes the selected unit.
+*/
+
+void page_on_unit_change( page this, int unit )
+{
+       if ( this->on_unit_change )
+               this->on_unit_change( this, unit );
+}
+
+/** Called to propogate status information to any page that's interested.
+*/
+
+void page_show_status( page this, valerie_status status )
+{
+       if ( this->show_status )
+               this->show_status( this, status );
+}
+
+/** Called on close.
+*/
+
+void page_close( page this )
+{
+       if ( this->close )
+               this->close( this );
+}
+
diff --git a/src/page.h b/src/page.h
new file mode 100644 (file)
index 0000000..1fdb751
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * page.h -- Page handling
+ * Copyright (C) 2002-2003 Charles Yates <charles.yates@pandora.be>
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _DV1394_PAGE_
+#define _DV1394_PAGE_
+
+#include "dv1394app.h"
+#include <gtk/gtk.h>
+
+/** Page structure.
+*/
+
+struct page_t
+{
+       GtkWidget *( *get_widget )( page );
+       void ( *get_toolbar_info )( page, GtkIconSize, GtkWidget **, char ** );
+       void ( *on_connect )( page );
+       void ( *on_disconnect )( page );
+       void ( *on_unit_change )( page, int );
+       void ( *show_status )( page, valerie_status );
+       void ( *close )( page );
+};
+
+/* page api */
+extern GtkWidget *page_get_widget( page );
+extern void page_get_toolbar_info( page, GtkIconSize, GtkWidget **, char ** );
+extern void page_on_connect( page );
+extern void page_on_disconnect( page );
+extern void page_on_unit_change( page, int );
+extern void page_show_status( page, valerie_status );
+extern void page_close( page );
+
+/* page factories */
+extern page page_clips_init( dv1394app );
+extern page page_command_init( dv1394app );
+extern page page_status_init( dv1394app );
+extern page page_units_init( dv1394app );
+
+#endif
diff --git a/src/page_clips.c b/src/page_clips.c
new file mode 100644 (file)
index 0000000..cab01cc
--- /dev/null
@@ -0,0 +1,532 @@
+/*
+ * page_clips.c -- Clips Page Handling
+ * Copyright (C) 2002-2003 Charles Yates <charles.yates@pandora.be>
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
+
+#include "interface.h"
+#include "support.h"
+#include "dv1394app.h"
+#include "util.h"
+#include "page.h"
+
+typedef struct 
+{
+       struct page_t parent;
+       dv1394app app;
+       GtkWidget *widget;
+       valerie dv;
+       char *path;
+       int unit;
+       int generation;
+       int clip;
+       
+       // TODO: This comes out later
+       int mode;
+       GtkWidget *modes[ 4 ];
+}
+*page_clips, page_clips_t;
+
+static GtkWidget *this_page_get_widget( page_clips this );
+
+static void list_clips( page_clips this, char *path )
+{
+       GtkWidget *treeview = lookup_widget( this_page_get_widget( this ), "list_clips" );
+       GtkWidget *dirview = lookup_widget( this_page_get_widget( this ), "list_dir" );
+       GtkWidget *label = lookup_widget( this_page_get_widget( this ), "label_directory" );
+       if ( path != NULL )
+       {
+               valerie_dir dir = valerie_dir_init( this->dv, path );
+               GtkListStore *dir_store = NULL;
+               GtkListStore *clip_store = NULL;
+               GtkTreeIter iter;
+               int index;
+               valerie_dir_entry_t entry;
+
+               free( this->path );
+               this->path = strdup( path );
+               
+               gtk_label_set_text( GTK_LABEL( label ), this->path );
+               
+               if (  gtk_tree_view_get_model( GTK_TREE_VIEW( treeview ) ) == NULL )
+               {
+                       GtkCellRenderer *renderer;
+                       GtkTreeViewColumn *column;
+
+                       clip_store = gtk_list_store_new( 2, G_TYPE_STRING, G_TYPE_STRING );
+                       gtk_tree_view_set_model( GTK_TREE_VIEW( treeview ), GTK_TREE_MODEL( clip_store ) );
+                       
+                       renderer = gtk_cell_renderer_text_new( );
+                       column = gtk_tree_view_column_new_with_attributes ( "Description", renderer, "text", 0, NULL);
+                       gtk_tree_view_column_set_sort_column_id( column, 0 );
+                       gtk_tree_view_append_column( GTK_TREE_VIEW( treeview ), column );
+                       
+                       dir_store = gtk_list_store_new( 2, G_TYPE_STRING, G_TYPE_STRING );
+                       gtk_tree_view_set_model( GTK_TREE_VIEW( dirview ), GTK_TREE_MODEL( dir_store ) );
+                       
+                       renderer = gtk_cell_renderer_text_new( );
+                       column = gtk_tree_view_column_new_with_attributes ( "Description", renderer, "text", 0, NULL);
+                       gtk_tree_view_column_set_sort_column_id( column, 0 );
+                       gtk_tree_view_append_column( GTK_TREE_VIEW( dirview ), column );                        
+               }
+               else
+               {
+                       clip_store = GTK_LIST_STORE( gtk_tree_view_get_model( GTK_TREE_VIEW( treeview ) ) );
+                       dir_store = GTK_LIST_STORE( gtk_tree_view_get_model( GTK_TREE_VIEW( dirview ) ) );
+                       gtk_list_store_clear( clip_store );
+                       gtk_list_store_clear( dir_store );
+               }
+               
+               if ( strcmp( path, "/" ) )
+               {
+                       gtk_list_store_append( clip_store, &iter );
+                       gtk_list_store_set( clip_store, &iter, 0, "..", -1 );
+                       gtk_list_store_append( dir_store, &iter );
+                       gtk_list_store_set( dir_store, &iter, 0, "..", -1 );
+               }
+               
+               for ( index = 0; index < valerie_dir_count( dir ); index ++ )
+               {
+                       valerie_dir_get( dir, index, &entry );
+                       if ( strchr( entry.name, '/' ) )
+                       {
+                               gtk_list_store_append( dir_store, &iter );
+                               gtk_list_store_set( dir_store, &iter, 0, entry.name, -1 );
+                       }
+                       else
+                       {
+                               gtk_list_store_append( clip_store, &iter );
+                               gtk_list_store_set( clip_store, &iter, 0, entry.name, -1 );
+                       }
+               }
+                                             
+               valerie_dir_close( dir );
+       }
+       else
+       {
+               gtk_label_set_text( GTK_LABEL( label ), "Disconnected" );
+               if ( gtk_tree_view_get_model( GTK_TREE_VIEW( treeview ) ) )
+               {
+                       GtkListStore *list_store = GTK_LIST_STORE( gtk_tree_view_get_model( GTK_TREE_VIEW( treeview ) ) );
+                       gtk_list_store_clear( list_store );
+                       list_store = GTK_LIST_STORE( gtk_tree_view_get_model( GTK_TREE_VIEW( dirview ) ) );
+                       gtk_list_store_clear( list_store );
+                       treeview = lookup_widget( this_page_get_widget( this ), "treeview1" );
+                       gtk_list_store_clear( list_store );
+               }
+       }
+}
+
+static void list_queue( page_clips this, int clip )
+{
+       GtkWidget *treeview = lookup_widget( this_page_get_widget( this ), "treeview1" );
+       valerie_list list = valerie_list_init( this->dv, dv1394app_get_selected_unit( this->app ) );
+       GtkListStore *list_store = NULL;
+       GtkTreeIter iter;
+       GtkTreePath *path;
+       int index;
+       valerie_list_entry_t entry;
+
+       if ( gtk_tree_view_get_model( GTK_TREE_VIEW( treeview ) ) == NULL )
+       {
+               GtkCellRenderer *renderer;
+               GtkTreeViewColumn *column;
+
+               list_store = gtk_list_store_new( 6, G_TYPE_BOOLEAN, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING, G_TYPE_INT );
+               gtk_tree_view_set_model( GTK_TREE_VIEW( treeview ), GTK_TREE_MODEL( list_store ) );
+               
+               renderer = gtk_cell_renderer_toggle_new( );
+               column = gtk_tree_view_column_new_with_attributes ( "", renderer, "active", 0, NULL);
+               gtk_tree_view_append_column( GTK_TREE_VIEW( treeview ), column );       
+               
+               renderer = gtk_cell_renderer_text_new( );
+               column = gtk_tree_view_column_new_with_attributes ( "In", renderer, "text", 1, NULL);
+               gtk_tree_view_append_column( GTK_TREE_VIEW( treeview ), column );
+               
+               renderer = gtk_cell_renderer_text_new( );
+               column = gtk_tree_view_column_new_with_attributes ( "Out", renderer, "text", 2, NULL);
+               gtk_tree_view_append_column( GTK_TREE_VIEW( treeview ), column );
+               
+               renderer = gtk_cell_renderer_text_new( );
+               column = gtk_tree_view_column_new_with_attributes ( "Length", renderer, "text", 3, NULL);
+               gtk_tree_view_append_column( GTK_TREE_VIEW( treeview ), column );
+               
+               renderer = gtk_cell_renderer_text_new( );
+               column = gtk_tree_view_column_new_with_attributes ( "Clip", renderer, "text", 4, NULL);
+               gtk_tree_view_append_column( GTK_TREE_VIEW( treeview ), column );
+       }
+       else
+       {
+               list_store = GTK_LIST_STORE( gtk_tree_view_get_model( GTK_TREE_VIEW( treeview ) ) );
+               gtk_list_store_clear( list_store );
+       }
+       
+       this->generation = list->generation;
+       
+       for ( index = 0; index < valerie_list_count( list ); index ++ )
+       {
+               valerie_list_get( list, index, &entry );
+               gtk_list_store_append( list_store, &iter );
+               gtk_list_store_set( list_store, &iter, 0, index == clip, 1, ( int )entry.in, 2, ( int )entry.out, 3, ( int )entry.size, 4, entry.full, 5, entry.clip, -1 );
+       }
+
+       this->clip = clip;
+       if ( clip < valerie_list_count( list ) )
+       {
+               path = gtk_tree_path_new_from_indices( this->clip, -1 );
+               gtk_tree_view_scroll_to_cell( GTK_TREE_VIEW( treeview ), path, NULL, TRUE, 0.5, 0 );
+               gtk_tree_path_free( path );
+       }
+       
+       valerie_list_close( list );
+}
+
+static void list_active( page_clips this, int clip )
+{
+       GtkWidget *treeview = lookup_widget( this_page_get_widget( this ), "treeview1" );
+       GtkListStore *list_store = GTK_LIST_STORE( gtk_tree_view_get_model( GTK_TREE_VIEW( treeview ) ) );
+       GtkTreePath *path = gtk_tree_path_new_from_indices( this->clip, -1 );
+       GtkTreeIter iter;
+
+       gtk_tree_model_get_iter( GTK_TREE_MODEL (list_store), &iter, path );
+       gtk_tree_path_free( path );
+       gtk_list_store_set( list_store, &iter, 0, FALSE, -1 );
+       
+       this->clip = clip;
+       path = gtk_tree_path_new_from_indices( this->clip, -1 );
+       gtk_tree_view_scroll_to_cell( GTK_TREE_VIEW( treeview ), path, NULL, TRUE, 0.5, 0 );
+       gtk_tree_model_get_iter( GTK_TREE_MODEL (list_store), &iter, path );
+       gtk_tree_path_free( path );
+       gtk_list_store_set( list_store, &iter, 0, TRUE, -1 );
+}
+
+static gboolean on_ok( GtkWidget *dummy, gpointer data )
+{
+       page_clips this = data;
+       GtkWidget *widget = lookup_widget( this_page_get_widget( this ), "list_clips" );
+       GtkTreeSelection *select = gtk_tree_view_get_selection( GTK_TREE_VIEW( widget ) );
+       GtkTreeModel *model;
+       GtkTreeIter iter;
+       gchar *text;
+       
+       if ( gtk_tree_selection_get_selected( select, &model, &iter ) )
+       {
+               gtk_tree_model_get( model, &iter, 0, &text,     -1 );
+               
+               if ( !strcmp( text, ".." ) )
+               {
+                       char *temp = strdup( this->path );
+                       temp[ strlen( temp ) - 1 ] = '\0';
+                       *( strrchr( temp, '/' ) + 1 ) = '\0';
+                       list_clips( this, temp );
+                       free( temp );
+               }
+               else
+               {
+                       char *temp = malloc( strlen( this->path ) + strlen( text ) + 1 );
+                       strcpy( temp, this->path );
+                       strcat( temp, text );
+                       switch( this->mode )
+                       {
+                               case 0:
+                                       valerie_unit_load_back( this->dv, dv1394app_get_selected_unit( this->app ), temp );
+                                       valerie_unit_play( this->dv, dv1394app_get_selected_unit( this->app ) );
+                                       break;
+                               case 1: 
+                                       valerie_unit_load( this->dv, dv1394app_get_selected_unit( this->app ), temp );
+                                       break;
+                               case 2: 
+                                       valerie_unit_append( this->dv, dv1394app_get_selected_unit( this->app ), temp, -1, -1 );
+                                       break;
+                               case 3:
+                                       valerie_unit_clip_insert( this->dv, dv1394app_get_selected_unit( this->app ), valerie_relative, 1, temp, -1, -1 );
+                                       break;
+                       }
+                       
+                       free( temp );
+               }
+                       
+               g_free( text );
+       }
+       
+       return TRUE;
+}
+
+static gboolean on_dir( GtkWidget *dummy, gpointer data )
+{
+       page_clips this = data;
+       GtkWidget *widget = lookup_widget( this_page_get_widget( this ), "list_dir" );
+       GtkTreeSelection *select = gtk_tree_view_get_selection( GTK_TREE_VIEW( widget ) );
+       GtkTreeModel *model;
+       GtkTreeIter iter;
+       gchar *text;
+       
+       if ( gtk_tree_selection_get_selected( select, &model, &iter ) )
+       {
+               gtk_tree_model_get( model, &iter, 0, &text,     -1 );
+               
+               if ( !strcmp( text, ".." ) )
+               {
+                       char *temp = strdup( this->path );
+                       temp[ strlen( temp ) - 1 ] = '\0';
+                       *( strrchr( temp, '/' ) + 1 ) = '\0';
+                       list_clips( this, temp );
+                       free( temp );
+               }
+               else if ( text[ strlen( text ) - 1 ] == '/' )
+               {
+                       char *temp = malloc( strlen( this->path ) + strlen( text ) + 1 );
+                       strcpy( temp, this->path );
+                       strcat( temp, text );
+                       list_clips( this, temp );
+                       free( temp );                   
+               }
+                       
+               g_free( text );
+       }
+       
+       return TRUE;
+}
+
+static gboolean on_queue_item( GtkWidget *dummy, gpointer data )
+{
+       page_clips this = data;
+       GtkWidget *widget = lookup_widget( this_page_get_widget( this ), "treeview1" );
+       GtkTreeSelection *select = gtk_tree_view_get_selection( GTK_TREE_VIEW( widget ) );
+       GtkTreeModel *model;
+       GtkTreeIter iter;
+       int clip;
+       
+       if ( gtk_tree_selection_get_selected( select, &model, &iter ) )
+       {
+               gtk_tree_model_get( model, &iter, 5, &clip,     -1 );
+               valerie_unit_clip_goto( this->dv, dv1394app_get_selected_unit( this->app ), valerie_absolute, clip, 0 );
+               valerie_unit_play( this->dv, dv1394app_get_selected_unit( this->app ) );
+       }
+       
+       return TRUE;
+}
+
+static gboolean on_clip_selected( GtkWidget *widget, GdkEventButton *event, gpointer data )
+{
+       if ( event->button==1 && event->type==GDK_2BUTTON_PRESS )
+               return on_ok( widget, data );
+       return FALSE;
+}
+
+static gboolean on_clip_key_press( GtkWidget *widget, GdkEventKey *event, gpointer data )
+{
+       if ( event->keyval == GDK_Return )
+               return on_ok( widget, data );
+       return FALSE;           
+}
+
+static gboolean on_dir_selected( GtkWidget *widget, GdkEventButton *event, gpointer data )
+{
+       if ( event->button==1 && event->type==GDK_2BUTTON_PRESS )
+               return on_dir( widget, data );
+       return FALSE;
+}
+
+static gboolean on_dir_key_press( GtkWidget *widget, GdkEventKey *event, gpointer data )
+{
+       if ( event->keyval == GDK_Return )
+               return on_dir( widget, data );
+       return FALSE;           
+}
+
+static gboolean on_queue_selected( GtkWidget *widget, GdkEventButton *event, gpointer data )
+{
+       if ( event->button==1 && event->type==GDK_2BUTTON_PRESS )
+               return on_queue_item( widget, data );
+       return FALSE;
+}
+
+static gboolean on_queue_key_press( GtkWidget *widget, GdkEventKey *event, gpointer data )
+{
+       if ( event->keyval == GDK_Return )
+               return on_queue_item( widget, data );
+       return FALSE;           
+}
+
+static gboolean on_home( GtkWidget *button, gpointer data )
+{
+       page_clips this = data;
+       list_clips( this, "/" );
+       return TRUE;
+}
+
+static gboolean on_refresh( GtkWidget *button, gpointer data )
+{
+       page_clips this = data;
+       char *temp = strdup( this->path );
+       list_clips( this, temp );
+       free( temp );
+       
+       return TRUE;
+}
+
+static gboolean on_up( GtkWidget *dummy, gpointer data )
+{
+       page_clips this = data;
+       valerie_unit_clip_move( this->dv, dv1394app_get_selected_unit( this->app ), valerie_relative, 0, valerie_relative, -1 );
+       return TRUE;
+}
+
+static gboolean on_down( GtkWidget *dummy, gpointer data )
+{
+       page_clips this = data;
+       valerie_unit_clip_move( this->dv, dv1394app_get_selected_unit( this->app ), valerie_relative, 0, valerie_relative, 1 );
+       return TRUE;
+}
+
+static gboolean on_remove( GtkWidget *dummy, gpointer data )
+{
+       page_clips this = data;
+       valerie_unit_remove_current_clip( this->dv, dv1394app_get_selected_unit( this->app ) );
+       return TRUE;
+}
+
+static gboolean on_clean( GtkWidget *dummy, gpointer data )
+{
+       page_clips this = data;
+       valerie_unit_clean( this->dv, dv1394app_get_selected_unit( this->app ) );
+       return TRUE;
+}
+
+void on_mode_change( GtkMenuItem *menuitem, gpointer data )
+{
+       page_clips this = data;
+       int index = 0;
+       
+       for ( index = 0; index < 4; index ++ )
+               if ( GTK_WIDGET( menuitem ) == this->modes[ index ] )
+                       break;
+       
+       this->mode = index;
+}
+
+static GtkWidget *this_page_get_widget( page_clips this )
+{
+       if ( this->widget == NULL )
+               this->widget = create_page_clips( );
+       return this->widget;
+}
+
+static void this_page_get_toolbar_info( page this, GtkIconSize size, GtkWidget **icon, char **label )
+{
+       *icon = gtk_image_new_from_stock( "gtk-find",  size );
+       *label = "_Clips";
+}
+
+static void this_page_on_connect( page_clips this )
+{
+       this->dv = valerie_init( dv1394app_get_parser( this->app ) );
+       list_clips( this, "/" );
+}
+
+static void this_page_on_unit_change( page_clips this, int unit )
+{
+       if ( unit != this->unit )
+               this->unit = unit;
+}
+
+static void this_page_on_disconnect( page_clips this )
+{
+       list_clips( this, NULL );
+       valerie_close( this->dv );
+}
+
+static void this_page_show_status( page_clips this, valerie_status status )
+{
+       if ( status->status != unit_disconnected )
+       {
+               if ( this->generation != status->generation )
+                       list_queue( this, status->clip_index );
+               else if ( this->clip != status->clip_index )
+                       list_active( this, status->clip_index );
+       }               
+}
+
+static void this_page_close( page_clips this )
+{
+       if ( this != NULL )
+               free( this );
+}
+
+page page_clips_init( dv1394app app )
+{
+       page_clips this = calloc( 1, sizeof( page_clips_t ) );
+       GtkWidget *widget;
+       int index = 0;
+
+       this->parent.get_widget = ( GtkWidget *(*)( page ) )this_page_get_widget;
+       this->parent.get_toolbar_info = this_page_get_toolbar_info;
+       this->parent.on_connect = ( void (*)( page ) )this_page_on_connect;
+       this->parent.on_unit_change = ( void (*)( page, int ) )this_page_on_unit_change;
+       this->parent.on_disconnect = ( void (*)( page ) )this_page_on_disconnect;
+       this->parent.show_status = ( void (*)( page, valerie_status ) )this_page_show_status;
+       this->parent.close = ( void (*)( page ) )this_page_close;
+       this->app = app;
+       this->generation = -1;
+
+       widget = lookup_widget( this_page_get_widget( this ), "list_clips" );
+       g_signal_connect( G_OBJECT( widget ), "button-press-event", G_CALLBACK( on_clip_selected ), this );
+       g_signal_connect( G_OBJECT( widget ), "key-press-event", G_CALLBACK( on_clip_key_press ), this );
+       widget = lookup_widget( this_page_get_widget( this ), "list_dir" );
+       g_signal_connect( G_OBJECT( widget ), "button-press-event", G_CALLBACK( on_dir_selected ), this );
+       g_signal_connect( G_OBJECT( widget ), "key-press-event", G_CALLBACK( on_dir_key_press ), this );
+       widget = lookup_widget( this_page_get_widget( this ), "button_clips_refresh" );
+       gtk_signal_connect( GTK_OBJECT( widget ), "clicked", GTK_SIGNAL_FUNC( on_refresh ), this );
+       widget = lookup_widget( this_page_get_widget( this ), "button_clips_home" );
+       gtk_signal_connect( GTK_OBJECT( widget ), "clicked", GTK_SIGNAL_FUNC( on_home ), this );
+       widget = lookup_widget( this_page_get_widget( this ), "button_up" );
+       gtk_signal_connect( GTK_OBJECT( widget ), "clicked", GTK_SIGNAL_FUNC( on_up ), this );
+       widget = lookup_widget( this_page_get_widget( this ), "button_down" );
+       gtk_signal_connect( GTK_OBJECT( widget ), "clicked", GTK_SIGNAL_FUNC( on_down ), this );
+       widget = lookup_widget( this_page_get_widget( this ), "button_remove" );
+       gtk_signal_connect( GTK_OBJECT( widget ), "clicked", GTK_SIGNAL_FUNC( on_remove ), this );
+       widget = lookup_widget( this_page_get_widget( this ), "button_clean" );
+       gtk_signal_connect( GTK_OBJECT( widget ), "clicked", GTK_SIGNAL_FUNC( on_clean ), this );
+
+       widget = lookup_widget( this_page_get_widget( this ), "table4" );
+       gtk_widget_show( widget );
+
+       widget = lookup_widget( this_page_get_widget( this ), "treeview1" );
+       g_signal_connect( G_OBJECT( widget ), "button-press-event", G_CALLBACK( on_queue_selected ), this );
+       g_signal_connect( G_OBJECT( widget ), "key-press-event", G_CALLBACK( on_queue_key_press ), this );
+
+       for ( index = 0; index < 4; index ++ )
+       {
+               char item[ 256 ];
+               sprintf( item, "mode_%d", index );
+               widget = lookup_widget( this_page_get_widget( this ), item );
+               gtk_signal_connect( GTK_OBJECT( widget ), "activate", GTK_SIGNAL_FUNC( on_mode_change ), this );
+               this->modes[ index ] = widget;
+       }
+       
+       return ( page )this;
+}
diff --git a/src/page_command.c b/src/page_command.c
new file mode 100644 (file)
index 0000000..aa34f5d
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+ * page_command.c -- Command Page Handling
+ * Copyright (C) 2002-2003 Charles Yates <charles.yates@pandora.be>
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <gtk/gtk.h>
+
+#include "interface.h"
+#include "support.h"
+#include "dv1394app.h"
+#include "util.h"
+#include "page.h"
+
+typedef struct page_command_t
+{
+       struct page_t parent;
+       dv1394app app;
+       GtkWidget *widget;
+}
+*page_command;
+
+static GtkWidget *this_page_get_widget( page_command );
+
+/** Main window - command tab - command to be executed.
+*/
+
+static gboolean on_command_pressed( GtkWidget *button, gpointer user_data )
+{
+       page_command this = user_data;
+       GtkWidget *widget;
+       GtkTextBuffer *buffer;
+       char *command;
+       PangoFontDescription *font_desc;
+       
+       if ( dv1394app_get_parser( this->app ) != NULL )
+       {
+               int index = 0;
+               valerie_response response = NULL;
+               GtkTextIter iter;
+
+               widget = lookup_widget( this_page_get_widget( this ), "entry_command" );
+               command = (char *)gtk_entry_get_text( GTK_ENTRY( widget ) );
+
+               widget = lookup_widget( this_page_get_widget( this ), "textview_command" );
+               
+               font_desc = pango_font_description_from_string( "Courier 9" );
+               gtk_widget_modify_font( widget, font_desc );
+               pango_font_description_free( font_desc );
+               buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW( widget ) );
+               gtk_text_buffer_get_end_iter( buffer, &iter );
+               gtk_text_buffer_place_cursor( buffer, &iter );
+               gtk_text_buffer_insert_at_cursor( buffer, "> ", -1 );
+               gtk_text_buffer_insert_at_cursor( buffer, command, -1 );
+               gtk_text_buffer_insert_at_cursor( buffer, "\n", -1 );
+               valerie_execute( dv1394app_get_command( this->app ), 1024, "%s", command );
+           response = valerie_get_last_response( dv1394app_get_command( this->app ) );
+           for ( index = 0; index < valerie_response_count( response ); index ++ )
+               {
+                       if ( index != valerie_response_count( response ) - 1 || 
+                                strcmp( valerie_response_get_line( response, index ), "" ) )
+                       {
+                               gtk_text_buffer_insert_at_cursor( buffer, valerie_response_get_line( response, index ), -1 );
+                               gtk_text_buffer_insert_at_cursor( buffer, "\n", -1 );
+                       }
+               }
+               gtk_text_buffer_insert_at_cursor( buffer, "\n", -1 );
+               gtk_text_view_scroll_mark_onscreen( GTK_TEXT_VIEW( widget ), gtk_text_buffer_get_insert( buffer ) );
+               widget = lookup_widget( this_page_get_widget( this ), "entry_command" );
+               gtk_entry_set_text( GTK_ENTRY( widget ), "" );
+               gtk_widget_grab_focus( widget );
+       }
+       else
+       {
+               beep( );
+       }
+
+       return FALSE;
+}
+
+/** Main window - command tab - clear button pressed.
+*/
+
+static gboolean on_command_cleared( GtkWidget *button, gpointer user_data )
+{
+       page_command this = user_data;
+       GtkWidget *widget = lookup_widget( this_page_get_widget( this ), "textview_command" );
+       GtkTextBuffer *buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW( widget ) );
+       gtk_text_buffer_set_text( buffer, "", -1 );
+       return FALSE;
+}
+
+static GtkWidget *this_page_get_widget( page_command this )
+{
+       if ( this->widget == NULL )
+               this->widget = create_page_shell( );
+       return this->widget;
+}
+
+static void this_page_get_toolbar_info( page this, GtkIconSize size, GtkWidget **icon, char **label )
+{
+       *icon = gtk_image_new_from_stock( "gtk-dialog-info",  size );
+       *label = "_Shell";
+}
+
+static void this_on_connect( page_command this )
+{
+}
+
+static void this_on_disconnect( page_command this )
+{
+}
+
+static void this_close( page_command this )
+{
+       if ( this != NULL )
+               free( this );
+}
+
+page page_command_init( dv1394app app )
+{
+       GtkWidget *widget;
+       page_command this = calloc( 1, sizeof( struct page_command_t ) );
+       
+       this->parent.get_widget = ( GtkWidget *(*)( page ) )this_page_get_widget;
+       this->parent.get_toolbar_info = this_page_get_toolbar_info;
+       this->parent.on_connect = ( void (*)( page ) )this_on_connect;
+       this->parent.on_disconnect = ( void (*)( page ) )this_on_disconnect;
+       this->parent.close = ( void (*)( page ) )this_close;
+       this->app = app;
+               
+       /* Command execution handling */
+       widget = lookup_widget( this_page_get_widget( this ), "entry_command" );
+       gtk_signal_connect( GTK_OBJECT( widget ), "activate", GTK_SIGNAL_FUNC( on_command_pressed ), this );
+       widget = lookup_widget( this_page_get_widget( this ), "button_command" );
+       gtk_signal_connect( GTK_OBJECT( widget ), "clicked", GTK_SIGNAL_FUNC( on_command_pressed ), this );
+       widget = lookup_widget( this_page_get_widget( this ), "button_command_clear" );
+       gtk_signal_connect( GTK_OBJECT( widget ), "clicked", GTK_SIGNAL_FUNC( on_command_cleared ), this );
+
+       return ( page )this;
+}
+
diff --git a/src/page_status.c b/src/page_status.c
new file mode 100644 (file)
index 0000000..d561c72
--- /dev/null
@@ -0,0 +1,334 @@
+/*
+ * page_status.c -- Status Page Handling
+ * Copyright (C) 2002-2003 Charles Yates <charles.yates@pandora.be>
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gtk/gtk.h>
+
+#include "interface.h"
+#include "support.h"
+#include "dv1394app.h"
+#include "util.h"
+#include "page.h"
+
+typedef struct 
+{
+       struct page_t parent;
+       dv1394app app;
+       GtkWidget *widget;
+       valerie status;
+       int terminated;
+       pthread_t status_thread;
+       guint context;
+       int unit;
+       int count;
+}
+*page_status, page_status_t;
+
+static GtkWidget *this_page_get_widget( page );
+
+/** Show the status associated to a unit.
+*/
+
+static int show_status( page_status this, valerie_status status )
+{
+       GtkWidget *widget = this_page_get_widget( ( page )this );
+       char temp[ 1024 ] = "";
+       char temp2[ 1024 ];
+       char label_name[ 256 ];
+
+       sprintf( temp, "%05d %05d %05d %s [", status->in, status->position, status->out, status->clip );
+       
+       switch( status->status )
+       {
+               case unit_offline:
+                       strcat( temp, "offline" );
+                       break;
+               case unit_undefined:
+                       strcat( temp, "undefined" );
+                       break;
+               case unit_not_loaded:
+                       strcat( temp, "unloaded" );
+                       break;
+               case unit_stopped:
+                       strcat( temp, "stopped" );
+                       break;
+               case unit_playing:
+                       strcat( temp, "playing" );
+                       break;
+               case unit_paused:
+                       strcat( temp, "paused" );
+                       break;
+               case unit_disconnected:
+                       strcat( temp, "disconnect" );
+                       break;
+               default:
+                       strcat( temp, "unknown" );
+                       break;
+       }
+
+       strcat( temp, "]" );
+       
+       sprintf( label_name, "label_unit_%d", status->unit );
+
+       gdk_threads_enter();
+       widget = lookup_widget( widget, label_name );
+       gtk_label_set_text( GTK_LABEL( widget ), temp );
+       if ( status->unit == dv1394app_get_selected_unit( this->app ) )
+       {
+               sprintf( temp2, "U%d - %s", status->unit, temp );
+               widget = lookup_widget( dv1394app_get_widget( this->app ), "statusbar" );
+               gtk_statusbar_pop( GTK_STATUSBAR( widget ), this->context );
+               gtk_statusbar_push( GTK_STATUSBAR( widget ), this->context, temp2 );
+               dv1394app_show_status( this->app, status );
+       }
+       gdk_flush();
+       gdk_threads_leave();
+       
+       return status->unit >= this->count;
+}
+
+static void show_units( page_status this, gboolean active )
+{
+       int index = 0;
+       int index2 = 0;
+
+       GtkWidget *widget;
+       char temp[ 1024 ] = "";
+       char button_name[ 256 ];
+       
+       valerie_units units = NULL;
+       valerie_unit_entry_t unit;
+       int unit_count = 0;
+       
+       valerie_nodes nodes = NULL;
+       valerie_node_entry_t node;
+       int node_count = 0;
+
+       if ( active )
+       {
+               units = valerie_units_init( this->status );
+               unit_count = valerie_units_count( units );
+               nodes = valerie_nodes_init( this->status );
+               node_count = valerie_nodes_count( nodes );
+               this->count = unit_count;
+       }
+       
+       gdk_threads_enter();
+       
+       for ( index = 0; index < MAX_UNITS; index ++ )
+       {
+               if ( index < unit_count )
+               {
+                       valerie_units_get( units, index, &unit );
+                       
+                       for ( index2 = 0; index2 < node_count; index2 ++ )
+                       {
+                               valerie_nodes_get( nodes, index2, &node );
+                               if ( !strcmp( node.guid, unit.guid ) )
+                                       break;
+                       }
+                       
+                       if ( index2 < node_count )
+                               sprintf( temp, "U%d - %s (%s)", unit.unit, node.name, unit.guid );
+                       else
+                               sprintf( temp, "U%d - %s", unit.unit, unit.guid );
+                       
+                       sprintf( button_name, "radiobutton_%d", index );
+                       widget = lookup_widget( this_page_get_widget( ( page )this ), button_name );
+                       gtk_widget_show( widget );
+                       gtk_button_set_label( GTK_BUTTON( widget ), temp );
+                       sprintf( button_name, "label_unit_%d", index );
+                       widget = lookup_widget( this_page_get_widget( ( page )this ), button_name );
+                       gtk_widget_show( widget );
+               }
+               else
+               {
+                       sprintf( button_name, "radiobutton_%d", index );
+                       widget = lookup_widget( this_page_get_widget( ( page )this ), button_name );
+                       gtk_widget_hide( widget );
+                       sprintf( button_name, "label_unit_%d", index );
+                       widget = lookup_widget( this_page_get_widget( ( page )this ), button_name );
+                       gtk_widget_hide( widget );
+               }
+       }
+       gdk_flush();
+       gdk_threads_leave();                    
+
+       valerie_notifier notifier = valerie_get_notifier( this->status );
+       valerie_status_t status;
+
+       for ( index = 0; index < MAX_UNITS; index ++ )
+       {
+               status.unit = index;
+               if ( !active )
+                       status.status = unit_disconnected;
+               else
+                       valerie_notifier_get( notifier, &status, index );
+               show_status( this, &status );           
+       }
+               
+       if ( active )
+       {
+               valerie_nodes_close( nodes );
+               valerie_units_close( units );
+       }
+}
+
+/** Status monitoring thread.
+*/
+
+static void *status_thread( void *arg )
+{
+       page_status this = arg;
+       valerie_notifier notifier = valerie_get_notifier( this->status );
+       valerie_status_t status;
+
+       show_units( this, TRUE );
+       
+       while ( !this->terminated )
+       {
+               if ( valerie_notifier_wait( notifier, &status ) != -1 )
+               {
+                       if ( status.status == unit_disconnected )
+                               break;
+                       if ( show_status( this, &status ) )
+                               show_units( this, TRUE );
+               }
+       }
+
+       show_units( this, FALSE );
+       
+       if ( !this->terminated )
+       {
+               GtkWidget *widget = lookup_widget( dv1394app_get_widget( this->app ), "button_disconnect" );
+               gdk_threads_enter();
+               gtk_signal_emit_by_name( GTK_OBJECT( widget ), "clicked" );
+               gdk_threads_leave();
+       }
+       
+       return NULL;
+}
+
+void on_radiobutton_toggled( GtkToggleButton *togglebutton, gpointer user_data )
+{
+       page_status this = user_data;
+       dv1394app app = this->app;
+       int index = 0;
+       GtkWidget *widget = this_page_get_widget( ( page )this );
+       for ( index = 0; index < MAX_UNITS; index ++ )
+       {
+               char button_name[ 256 ];
+               sprintf( button_name, "radiobutton_%d", index );
+               if ( lookup_widget( widget, button_name ) == GTK_WIDGET( togglebutton ) )
+                       break;
+       }
+       if ( index < MAX_UNITS )
+       {
+               valerie_status_t status;
+               valerie_notifier notifier = valerie_get_notifier( this->status );
+               dv1394app_on_unit_change( app, index );
+               valerie_notifier_get( notifier, &status, index );
+               gdk_threads_leave( );
+               show_status( this, &status );
+               gdk_threads_enter( );
+       }
+}
+
+static GtkWidget *this_page_get_widget( page super )
+{
+       page_status this = ( page_status )super;
+       if ( this->widget == NULL )
+               this->widget = create_page_status( );
+       return this->widget;
+}
+
+static void this_page_get_toolbar_info( page super, GtkIconSize size, GtkWidget **icon, char **label )
+{
+       *icon = gtk_image_new_from_stock( "gtk-execute",  size );
+       *label = "_Units";
+}
+
+static void this_page_on_connect( page super )
+{
+       page_status this = ( page_status )super;
+       if ( this->terminated )
+       {
+               this->terminated = 0;
+               this->status = valerie_init( dv1394app_get_parser( this->app ) );
+               pthread_create( &this->status_thread, NULL, status_thread, this );
+       }
+}
+
+static void this_page_on_disconnect( page super )
+{
+       page_status this = ( page_status )super;
+       if ( !this->terminated )
+       {
+               GtkWidget *widget;
+               this->terminated = 1;
+               gdk_threads_leave();
+               pthread_join( this->status_thread, NULL );
+               gdk_threads_enter();
+               valerie_close( this->status );
+               widget = lookup_widget( dv1394app_get_widget( this->app ), "statusbar" );
+               gtk_statusbar_push( GTK_STATUSBAR( widget ), this->context, "Disconnected." );
+       }
+}
+
+static void this_page_close( page super )
+{
+       page_status this = ( page_status )super;
+       if ( this != NULL )
+               free( this );
+}
+
+page page_status_init( dv1394app app )
+{
+       page_status this = calloc( 1, sizeof( page_status_t ) );
+       int index = 0;
+       GtkWidget *widget;
+       
+       this->parent.get_widget = this_page_get_widget;
+       this->parent.get_toolbar_info = this_page_get_toolbar_info;
+       this->parent.on_connect = this_page_on_connect;
+       this->parent.on_disconnect = this_page_on_disconnect;
+       this->parent.close = this_page_close;
+       this->app = app;
+       this->terminated = 1;
+
+       for ( index = 0; index < MAX_UNITS; index ++ )
+       {
+               char button_name[ 256 ];
+               sprintf( button_name, "radiobutton_%d", index );
+               widget = lookup_widget( this_page_get_widget( ( page )this ), button_name );
+               gtk_signal_connect( GTK_OBJECT( widget ), "toggled", GTK_SIGNAL_FUNC( on_radiobutton_toggled ), this );
+       }
+
+       widget = lookup_widget( dv1394app_get_widget( this->app ), "statusbar" );
+       this->context = gtk_statusbar_get_context_id( GTK_STATUSBAR( widget ), "info" );
+       gtk_statusbar_push( GTK_STATUSBAR( widget ), this->context, "Disconnected." );
+
+       return ( page )this;
+}
diff --git a/src/page_units.c b/src/page_units.c
new file mode 100644 (file)
index 0000000..3ff23cf
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * page_units.c -- Units Page Handling
+ * Copyright (C) 2002-2003 Charles Yates <charles.yates@pandora.be>
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <gtk/gtk.h>
+
+#include "interface.h"
+#include "support.h"
+#include "dv1394app.h"
+#include "util.h"
+#include "page.h"
+
+static void this_on_connect( page this )
+{
+}
+
+static void this_on_disconnect( page this )
+{
+}
+
+static void this_close( page this )
+{
+       if ( this != NULL )
+               free( this );
+}
+
+page page_units_init( dv1394app app )
+{
+       page this = calloc( 1, sizeof( struct page_t ) );
+       
+       this->on_connect = this_on_connect;
+       this->on_disconnect = this_on_disconnect;
+       this->close = this_close;
+
+       return this;
+}
diff --git a/src/support.c b/src/support.c
new file mode 100644 (file)
index 0000000..00aff29
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <gtk/gtk.h>
+
+#include "support.h"
+
+GtkWidget*
+lookup_widget                          (GtkWidget       *widget,
+                                        const gchar     *widget_name)
+{
+  GtkWidget *parent, *found_widget;
+
+  for (;;)
+    {
+      if (GTK_IS_MENU (widget))
+        parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
+      else
+        parent = widget->parent;
+      if (!parent)
+        parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
+      if (parent == NULL)
+        break;
+      widget = parent;
+    }
+
+  found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
+                                                 widget_name);
+  if (!found_widget)
+    g_warning ("Widget not found: %s", widget_name);
+  return found_widget;
+}
+
+static GList *pixmaps_directories = NULL;
+
+/* Use this function to set the directory containing installed pixmaps. */
+void
+add_pixmap_directory                   (const gchar     *directory)
+{
+  pixmaps_directories = g_list_prepend (pixmaps_directories,
+                                        g_strdup (directory));
+}
+
+/* This is an internally used function to find pixmap files. */
+static gchar*
+find_pixmap_file                       (const gchar     *filename)
+{
+  GList *elem;
+
+  /* We step through each of the pixmaps directory to find it. */
+  elem = pixmaps_directories;
+  while (elem)
+    {
+      gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
+                                         G_DIR_SEPARATOR_S, filename);
+      if (g_file_test (pathname, G_FILE_TEST_EXISTS))
+        return pathname;
+      g_free (pathname);
+      elem = elem->next;
+    }
+  return NULL;
+}
+
+/* This is an internally used function to create pixmaps. */
+GtkWidget*
+create_pixmap                          (GtkWidget       *widget,
+                                        const gchar     *filename)
+{
+  gchar *pathname = NULL;
+  GtkWidget *pixmap;
+
+  if (!filename || !filename[0])
+      return gtk_image_new ();
+
+  pathname = find_pixmap_file (filename);
+
+  if (!pathname)
+    {
+      g_warning (_("Couldn't find pixmap file: %s"), filename);
+      return gtk_image_new ();
+    }
+
+  pixmap = gtk_image_new_from_file (pathname);
+  g_free (pathname);
+  return pixmap;
+}
+
+/* This is an internally used function to create pixmaps. */
+GdkPixbuf*
+create_pixbuf                          (const gchar     *filename)
+{
+  gchar *pathname = NULL;
+  GdkPixbuf *pixbuf;
+  GError *error = NULL;
+
+  if (!filename || !filename[0])
+      return NULL;
+
+  pathname = find_pixmap_file (filename);
+
+  if (!pathname)
+    {
+      g_warning (_("Couldn't find pixmap file: %s"), filename);
+      return NULL;
+    }
+
+  pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
+  if (!pixbuf)
+    {
+      fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
+               pathname, error->message);
+      g_error_free (error);
+    }
+  g_free (pathname);
+  return pixbuf;
+}
+
+/* This is used to set ATK action descriptions. */
+void
+glade_set_atk_action_description       (AtkAction       *action,
+                                        const gchar     *action_name,
+                                        const gchar     *description)
+{
+  gint n_actions, i;
+
+  n_actions = atk_action_get_n_actions (action);
+  for (i = 0; i < n_actions; i++)
+    {
+      if (!strcmp (atk_action_get_name (action, i), action_name))
+        atk_action_set_description (action, i, description);
+    }
+}
+
diff --git a/src/support.h b/src/support.h
new file mode 100644 (file)
index 0000000..92201b9
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+
+/*
+ * Standard gettext macros.
+ */
+#ifdef ENABLE_NLS
+#  include <libintl.h>
+#  undef _
+#  define _(String) dgettext (PACKAGE, String)
+#  ifdef gettext_noop
+#    define N_(String) gettext_noop (String)
+#  else
+#    define N_(String) (String)
+#  endif
+#else
+#  define textdomain(String) (String)
+#  define gettext(String) (String)
+#  define dgettext(Domain,Message) (Message)
+#  define dcgettext(Domain,Message,Type) (Message)
+#  define bindtextdomain(Domain,Directory) (Domain)
+#  define _(String) (String)
+#  define N_(String) (String)
+#endif
+
+
+/*
+ * Public Functions.
+ */
+
+/*
+ * This function returns a widget in a component created by Glade.
+ * Call it with the toplevel widget in the component (i.e. a window/dialog),
+ * or alternatively any widget in the component, and the name of the widget
+ * you want returned.
+ */
+GtkWidget*  lookup_widget              (GtkWidget       *widget,
+                                        const gchar     *widget_name);
+
+
+/* Use this function to set the directory containing installed pixmaps. */
+void        add_pixmap_directory       (const gchar     *directory);
+
+
+/*
+ * Private Functions.
+ */
+
+/* This is used to create the pixmaps used in the interface. */
+GtkWidget*  create_pixmap              (GtkWidget       *widget,
+                                        const gchar     *filename);
+
+/* This is used to create the pixbufs used in the interface. */
+GdkPixbuf*  create_pixbuf              (const gchar     *filename);
+
+/* This is used to set ATK action descriptions. */
+void        glade_set_atk_action_description (AtkAction       *action,
+                                              const gchar     *action_name,
+                                              const gchar     *description);
+
diff --git a/src/util.c b/src/util.c
new file mode 100644 (file)
index 0000000..d7d4b0a
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * util.c -- Utility Functions
+ * Copyright (C) 2003 Charles Yates <charles.yates@pandora.be>
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <stdio.h>
+
+/** Sound a beep.
+*/
+
+void beep( )
+{
+       fprintf( stderr, "%c", 7 );
+       fflush( stderr );
+}
diff --git a/src/util.h b/src/util.h
new file mode 100644 (file)
index 0000000..6fa687c
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * util.h -- Utility Functions
+ * Copyright (C) 2003 Charles Yates <charles.yates@pandora.be>
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _DV1394_UTIL_
+#define _DV1394_UTIL_
+
+extern void beep( );
+
+#endif