[Goodies-commits] r3968 - in xfbib/trunk: . icons icons/128x128 icons/16x16 icons/24x24 icons/48x48 po src

Jesper Karlsson zarper at xfce.org
Mon Feb 18 21:45:31 CET 2008


Author: zarper
Date: 2008-02-18 20:45:31 +0000 (Mon, 18 Feb 2008)
New Revision: 3968

Added:
   xfbib/trunk/AUTHORS
   xfbib/trunk/COPYING
   xfbib/trunk/ChangeLog
   xfbib/trunk/INSTALL
   xfbib/trunk/Makefile.am
   xfbib/trunk/NEWS
   xfbib/trunk/README
   xfbib/trunk/TODO
   xfbib/trunk/autogen.sh
   xfbib/trunk/configure.in.in
   xfbib/trunk/icons/
   xfbib/trunk/icons/128x128/
   xfbib/trunk/icons/128x128/Makefile.am
   xfbib/trunk/icons/128x128/xfbib.png
   xfbib/trunk/icons/16x16/
   xfbib/trunk/icons/16x16/Makefile.am
   xfbib/trunk/icons/16x16/xfbib.png
   xfbib/trunk/icons/24x24/
   xfbib/trunk/icons/24x24/Makefile.am
   xfbib/trunk/icons/24x24/xfbib.png
   xfbib/trunk/icons/48x48/
   xfbib/trunk/icons/48x48/Makefile.am
   xfbib/trunk/icons/48x48/xfbib.png
   xfbib/trunk/icons/Makefile.am
   xfbib/trunk/po/
   xfbib/trunk/po/ChangeLog
   xfbib/trunk/po/LINGUAS
   xfbib/trunk/po/POTFILES.in
   xfbib/trunk/po/sv_SE.po
   xfbib/trunk/po/xfbib.pot
   xfbib/trunk/src/
   xfbib/trunk/src/Makefile.am
   xfbib/trunk/src/about_dialog.c
   xfbib/trunk/src/about_dialog.h
   xfbib/trunk/src/comment.c
   xfbib/trunk/src/comment.h
   xfbib/trunk/src/debug.c
   xfbib/trunk/src/debug.h
   xfbib/trunk/src/entry.c
   xfbib/trunk/src/entry.h
   xfbib/trunk/src/entry_edit_dialog.c
   xfbib/trunk/src/entry_edit_dialog.h
   xfbib/trunk/src/lex.l
   xfbib/trunk/src/menubar.c
   xfbib/trunk/src/menubar.h
   xfbib/trunk/src/node.c
   xfbib/trunk/src/node.h
   xfbib/trunk/src/open_dialog.c
   xfbib/trunk/src/open_dialog.h
   xfbib/trunk/src/parser.y
   xfbib/trunk/src/parser_interface.c
   xfbib/trunk/src/parser_interface.h
   xfbib/trunk/src/preamble.c
   xfbib/trunk/src/preamble.h
   xfbib/trunk/src/save.c
   xfbib/trunk/src/save.h
   xfbib/trunk/src/save_dialog.c
   xfbib/trunk/src/save_dialog.h
   xfbib/trunk/src/scrolled_window.c
   xfbib/trunk/src/scrolled_window.h
   xfbib/trunk/src/statusbar.c
   xfbib/trunk/src/statusbar.h
   xfbib/trunk/src/string_edit_dialog.c
   xfbib/trunk/src/string_edit_dialog.h
   xfbib/trunk/src/strings.c
   xfbib/trunk/src/strings.h
   xfbib/trunk/src/tag.c
   xfbib/trunk/src/tag.h
   xfbib/trunk/src/toolbar.c
   xfbib/trunk/src/toolbar.h
   xfbib/trunk/src/treeview.c
   xfbib/trunk/src/treeview.h
   xfbib/trunk/src/window.c
   xfbib/trunk/src/window.h
   xfbib/trunk/src/xfbib.c
   xfbib/trunk/src/xfbib.h
   xfbib/trunk/xfbib.desktop
Log:
Initial upload.


Added: xfbib/trunk/AUTHORS
===================================================================
--- xfbib/trunk/AUTHORS	                        (rev 0)
+++ xfbib/trunk/AUTHORS	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,2 @@
+David Gustafsson <david.s.gustafsson at gmail.com>
+Jesper Karlsson <zarper at gmail.com>

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

Added: xfbib/trunk/ChangeLog
===================================================================
--- xfbib/trunk/ChangeLog	                        (rev 0)
+++ xfbib/trunk/ChangeLog	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,2 @@
+2008-01-XX: Release 0.0.1
+	* */*: Initial release

Added: xfbib/trunk/INSTALL
===================================================================
--- xfbib/trunk/INSTALL	                        (rev 0)
+++ xfbib/trunk/INSTALL	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,234 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006 Free Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+   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 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.
+
+     Running `configure' might take a while.  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=c99 CFLAGS=-g 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 can use 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 `..'.
+
+   With a non-GNU `make', it is safer 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' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' 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 option `--target=TYPE' 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
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`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.
+

Added: xfbib/trunk/Makefile.am
===================================================================
--- xfbib/trunk/Makefile.am	                        (rev 0)
+++ xfbib/trunk/Makefile.am	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,15 @@
+SUBDIRS = \
+	po \
+	src \
+	icons 
+
+desktopdir = $(datadir)/applications
+desktop_DATA = xfbib.desktop
+
+EXTRA_DIST = \
+	autogen.sh \
+	$(desktop_DATA) 
+
+AUTOMAKE_OPTIONS = \
+	1.8 \
+	dist-bzip2

Added: xfbib/trunk/NEWS
===================================================================

Added: xfbib/trunk/README
===================================================================
--- xfbib/trunk/README	                        (rev 0)
+++ xfbib/trunk/README	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,34 @@
+
+1. What is Xfbib?
+=================
+Xfbib is a lightweight BibTeX editor developed for the Xfce
+desktop manager. The intentions of Xfbib is to provide an easy
+and efficient way of editing BibTeX files.
+
+
+2. Minimum Requirements for Xfbib 0.0.1.
+=====================================
+ - gtk+-2.10.0
+ - glib-2.12.0
+ - gobject-2.12.0
+ - libxfcegui4-4.2.0
+ - libxfce4util-4.4.0
+
+
+3. Installation.
+================
+For instruction on how to install Xfbib see the file INSTALL.
+
+
+4. Documentation.
+=================
+Xfbib should be pretty straight forward for anyone knowing
+how a little about BibTeX. At this time no official documentation
+exists but will most likely be added for later releases.
+
+
+5. Contact.
+===========
+If you find any bugs or wanna come in contact with the Xfbib
+developers send an email to <xfbib.bugs at gmail.com>. More information
+can be found online at <http://>.

Added: xfbib/trunk/TODO
===================================================================
--- xfbib/trunk/TODO	                        (rev 0)
+++ xfbib/trunk/TODO	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,11 @@
+- Added information to the statusbar when the mouse is over buttons, e.g. print "Open file" when the mouse is over the open button.
+
+- If a bibtex file has a comment, then write the comment back to the file when saving the newly edited file.
+
+- Add coloring to the keyentry and the combobox in the edit dialog to show that they should be set.
+
+- Autogenerate a bibtexkey for a new entry (should of course be modifiable).
+
+- Translate the array of tooltips.
+
+- Add better support for translations.

Added: xfbib/trunk/autogen.sh
===================================================================
--- xfbib/trunk/autogen.sh	                        (rev 0)
+++ xfbib/trunk/autogen.sh	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# $Id: autogen.sh 22391 2006-07-10 12:54:50Z benny $
+#
+# Copyright (c) 2002-2006
+#         The Xfce development team. All rights reserved.
+#
+# Written for Xfce by Benedikt Meurer <benny at xfce.org>.
+# Modified for the Xfbib project
+
+(type xdt-autogen) >/dev/null 2>&1 || {
+  cat >&2 <<EOF
+autogen.sh: You don't seem to have the Xfce development tools installed on
+            your system, which are required to build this software.
+            Please install the xfce4-dev-tools package first, it is available
+            from http://www.xfce.org/.
+EOF
+  exit 1
+}
+
+# verify that po/LINGUAS is present
+(test -f po/LINGUAS) >/dev/null 2>&1 || {
+  cat >&2 <<EOF
+autogen.sh: The file po/LINGUAS could not be found. Please check your snapshot
+            or try to checkout again.
+EOF
+  exit 1
+}
+
+# substitute revision and linguas
+linguas=`sed -e '/^#/d' po/LINGUAS`
+sed -e "s/@LINGUAS@/${linguas}/g" \
+    < "configure.in.in" > "configure.in"
+
+exec xdt-autogen $@
+
+# vi:set ts=2 sw=2 et ai:

Added: xfbib/trunk/configure.in.in
===================================================================
--- xfbib/trunk/configure.in.in	                        (rev 0)
+++ xfbib/trunk/configure.in.in	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,56 @@
+dnl Version information
+m4_define([xfbib_version_major], [0])
+m4_define([xfbib_version_minor], [0])
+m4_define([xfbib_version_micro], [1])
+m4_define([xfbib_version], [xfbib_version_major().xfbib_version_minor().xfbib_version_micro()])
+
+dnl Initialize autoconf
+AC_COPYRIGHT([Copyright (c) 2008
+        Written by David Gustafsson <david.s.gustafsson at gmail.com> and Jesper Karlsson <zarper at gmail.com>])
+AC_INIT([Xfbib], [xfbib_version()], [bugs.xfbib at gmail.com])
+
+dnl Initialize automake
+AM_INIT_AUTOMAKE([AC_PACKAGE_TARNAME()], [AC_PACKAGE_VERSION()])
+AM_CONFIG_HEADER([config.h])
+AM_MAINTAINER_MODE()
+
+AC_ARG_ENABLE(debug,
+[  --enable-debug    Turn on debugging],
+[case "${enableval}" in
+  yes) debug=true ;;
+  no)  debug=false ;;
+  *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
+esac],[debug=false])
+AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
+
+dnl check for basic programs
+AC_PROG_CC()
+AM_PROG_LEX()
+AC_PROG_YACC()
+AC_PROG_INSTALL()
+AC_PROG_LIBTOOL()
+
+dnl Check for i18n support
+XDT_I18N([@LINGUAS@])
+
+dnl Check for required packages
+XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0])
+XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.12.0])
+XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [2.12.0])
+XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.2.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.4.0])
+
+dnl Check for debugging support
+BM_DEBUG_SUPPORT()
+dnl # XDT_FEATURE_DEBUG()
+
+AC_OUTPUT([
+Makefile
+po/Makefile.in
+src/Makefile
+icons/Makefile
+icons/16x16/Makefile
+icons/24x24/Makefile
+icons/48x48/Makefile
+icons/128x128/Makefile
+])

Added: xfbib/trunk/icons/128x128/Makefile.am
===================================================================
--- xfbib/trunk/icons/128x128/Makefile.am	                        (rev 0)
+++ xfbib/trunk/icons/128x128/Makefile.am	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,4 @@
+iconsdir = $(datadir)/icons/hicolor/128x128/apps
+icons_DATA = xfbib.png
+	
+EXTRA_DIST = $(icons_DATA)

Added: xfbib/trunk/icons/128x128/xfbib.png
===================================================================
(Binary files differ)


Property changes on: xfbib/trunk/icons/128x128/xfbib.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: xfbib/trunk/icons/16x16/Makefile.am
===================================================================
--- xfbib/trunk/icons/16x16/Makefile.am	                        (rev 0)
+++ xfbib/trunk/icons/16x16/Makefile.am	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,4 @@
+iconsdir = $(datadir)/icons/hicolor/16x16/apps
+icons_DATA = xfbib.png
+	
+EXTRA_DIST = $(icons_DATA)

Added: xfbib/trunk/icons/16x16/xfbib.png
===================================================================
(Binary files differ)


Property changes on: xfbib/trunk/icons/16x16/xfbib.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: xfbib/trunk/icons/24x24/Makefile.am
===================================================================
--- xfbib/trunk/icons/24x24/Makefile.am	                        (rev 0)
+++ xfbib/trunk/icons/24x24/Makefile.am	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,4 @@
+iconsdir = $(datadir)/icons/hicolor/24x24/apps
+icons_DATA = xfbib.png
+	
+EXTRA_DIST = $(icons_DATA)

Added: xfbib/trunk/icons/24x24/xfbib.png
===================================================================
(Binary files differ)


Property changes on: xfbib/trunk/icons/24x24/xfbib.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: xfbib/trunk/icons/48x48/Makefile.am
===================================================================
--- xfbib/trunk/icons/48x48/Makefile.am	                        (rev 0)
+++ xfbib/trunk/icons/48x48/Makefile.am	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,4 @@
+iconsdir = $(datadir)/icons/hicolor/48x48/apps
+icons_DATA = xfbib.png
+	
+EXTRA_DIST = $(icons_DATA)

Added: xfbib/trunk/icons/48x48/xfbib.png
===================================================================
(Binary files differ)


Property changes on: xfbib/trunk/icons/48x48/xfbib.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: xfbib/trunk/icons/Makefile.am
===================================================================
--- xfbib/trunk/icons/Makefile.am	                        (rev 0)
+++ xfbib/trunk/icons/Makefile.am	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,14 @@
+SUBDIRS = 16x16 24x24 48x48 128x128
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
+
+install-data-hook:
+	@-if test -z "$(DESTDIR)"; then					\
+		echo "Updating Gtk icon cache.";			\
+		$(gtk_update_icon_cache);				\
+	else								\
+		echo "*** Icon cache not updated. Remember to run:";	\
+		echo "***";						\
+		echo "***   $(gtk_update_icon_cache)";			\
+		echo "***";						\
+	fi

Added: xfbib/trunk/po/ChangeLog
===================================================================

Added: xfbib/trunk/po/LINGUAS
===================================================================
--- xfbib/trunk/po/LINGUAS	                        (rev 0)
+++ xfbib/trunk/po/LINGUAS	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1 @@
+sv_SE

Added: xfbib/trunk/po/POTFILES.in
===================================================================
--- xfbib/trunk/po/POTFILES.in	                        (rev 0)
+++ xfbib/trunk/po/POTFILES.in	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,7 @@
+src/about_dialog.c
+src/entry_edit_dialog.c
+src/menubar.c
+src/open_dialog.c
+src/save_dialog.c
+src/string_edit_dialog.c
+src/treeview.c

Added: xfbib/trunk/po/sv_SE.po
===================================================================
--- xfbib/trunk/po/sv_SE.po	                        (rev 0)
+++ xfbib/trunk/po/sv_SE.po	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,97 @@
+# Swedish translation for Xfbib
+# Copyright (C) 2008
+# This file is distributed under the same license as the Xfbib package.
+# Jesper Karlsson <zarper at gmail.com>, 2008
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: 0.0.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-01-28 09:02+0100\n"
+"PO-Revision-Date: 2008-02-18 20:00+0100\n"
+"Last-Translator: Jesper Karlsson <zarper at gmail.com>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../src/menubar.c:72
+msgid "File"
+msgstr "Arkiv"
+
+#: ../src/menubar.c:110
+msgid "Help"
+msgstr "Hjälp"
+
+#: ../src/treeview.c:58
+msgid "Key"
+msgstr "Nyckel"
+
+#: ../src/treeview.c:58
+msgid "Type"
+msgstr "Typ"
+
+#: ../src/treeview.c:58
+msgid "Author"
+msgstr "Författare"
+
+#: ../src/treeview.c:58 ../src/edit_dialog.c:302
+msgid "Title"
+msgstr "Titel"
+
+#: ../src/edit_dialog.c:220
+msgid "Type: "
+msgstr "Typ: "
+
+#: ../src/edit_dialog.c:223
+msgid "Key: "
+msgstr "Nyckel: "
+
+#: ../src/edit_dialog.c:260
+msgid "Add entry"
+msgstr "Lägg till element"
+
+#: ../src/edit_dialog.c:260
+msgid "Edit entry"
+msgstr "Editera element"
+
+#: ../src/edit_dialog.c:303
+msgid "Publication"
+msgstr "Publikation"
+
+#: ../src/edit_dialog.c:304
+msgid "Publisher"
+msgstr "Förlag"
+
+#: ../src/edit_dialog.c:305
+msgid "Misc"
+msgstr "Övrigt"
+
+#: ../src/edit_dialog.c:332
+msgid "No type was selected"
+msgstr "Ingen typ vald"
+
+#: ../src/edit_dialog.c:336
+msgid "No key was selected"
+msgstr "Ingen nyckel vald"
+
+#: ../src/save_dialog.c:30
+msgid "Save As"
+msgstr "Spara som"
+
+#: ../src/save_dialog.c:36
+msgid "BibTeX files"
+msgstr "BibTeX filer"
+
+#: ../src/open_dialog.c:33
+msgid "Open"
+msgstr "Öppna"
+
+#: ../src/about_dialog.c:28
+msgid "Developers:"
+msgstr "Utvecklare:"
+
+#: ../src/about_dialog.c:38
+msgid "BibTeX editor for Xfce"
+msgstr "BibTeX editerare för Xfce"

Added: xfbib/trunk/po/xfbib.pot
===================================================================
--- xfbib/trunk/po/xfbib.pot	                        (rev 0)
+++ xfbib/trunk/po/xfbib.pot	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,97 @@
+# 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 at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-01-28 09:02+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../src/menubar.c:72
+msgid "File"
+msgstr ""
+
+#: ../src/menubar.c:110
+msgid "Help"
+msgstr ""
+
+#: ../src/treeview.c:58
+msgid "Key"
+msgstr ""
+
+#: ../src/treeview.c:58
+msgid "Type"
+msgstr ""
+
+#: ../src/treeview.c:58
+msgid "Author"
+msgstr ""
+
+#: ../src/treeview.c:58 ../src/edit_dialog.c:302
+msgid "Title"
+msgstr ""
+
+#: ../src/edit_dialog.c:220
+msgid "Type: "
+msgstr ""
+
+#: ../src/edit_dialog.c:223
+msgid "Key: "
+msgstr ""
+
+#: ../src/edit_dialog.c:260
+msgid "Add entry"
+msgstr ""
+
+#: ../src/edit_dialog.c:260
+msgid "Edit entry"
+msgstr ""
+
+#: ../src/edit_dialog.c:303
+msgid "Publication"
+msgstr ""
+
+#: ../src/edit_dialog.c:304
+msgid "Publisher"
+msgstr ""
+
+#: ../src/edit_dialog.c:305
+msgid "Misc"
+msgstr ""
+
+#: ../src/edit_dialog.c:332
+msgid "No type was selected"
+msgstr ""
+
+#: ../src/edit_dialog.c:336
+msgid "No key was selected"
+msgstr ""
+
+#: ../src/save_dialog.c:30
+msgid "Save As"
+msgstr ""
+
+#: ../src/save_dialog.c:36
+msgid "BibTeX files"
+msgstr ""
+
+#: ../src/open_dialog.c:33
+msgid "Open"
+msgstr ""
+
+#: ../src/about_dialog.c:28
+msgid "Developers:"
+msgstr ""
+
+#: ../src/about_dialog.c:38
+msgid "BibTeX editor for Xfce"
+msgstr ""

Added: xfbib/trunk/src/Makefile.am
===================================================================
--- xfbib/trunk/src/Makefile.am	                        (rev 0)
+++ xfbib/trunk/src/Makefile.am	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,52 @@
+INCLUDES =								\
+	-DG_LOG_DOMAIN=\"xfbib\"					\
+	-I$(top_srcdir)
+
+BUILT_SOURCES = parser.h
+AM_YFLAGS = -d
+AM_LFLAGS = -o $(LEX_OUTPUT_ROOT).c
+
+bin_PROGRAMS =								\
+	xfbib
+
+
+xfbib_SOURCES =	\
+	parser.y \
+	lex.l \
+	save.c save.h \
+	parser_interface.c parser_interface.h \
+	save_dialog.c save_dialog.h \
+	about_dialog.c about_dialog.h \
+	open_dialog.c open_dialog.h \
+	entry_edit_dialog.c entry_edit_dialog.h \
+	string_edit_dialog.c string_edit_dialog.h \
+	strings.c strings.h \
+	preamble.c preamble.h \
+	tag.c tag.h \
+	entry.c entry.h \
+	comment.c comment.h \
+	node.c node.h \
+	treeview.c treeview.h \
+	scrolled_window.c scrolled_window.h \
+	statusbar.c statusbar.h \
+	toolbar.c toolbar.h \
+	menubar.c menubar.h \
+	window.c window.h \
+	debug.c debug.h \
+	xfbib.c xfbib.h
+
+xfbib_CFLAGS =	\
+	$(GTK_CFLAGS) \
+	$(LIBXFCE4UTIL_CFLAGS) \
+	-Wall \
+	-g \
+	-DDATADIR=\"$(datadir)\" \
+	-DSRCDIR=\"$(top_srcdir)\" \
+	-DLOCALEDIR=\"$(localedir)\"
+
+xfbib_LDFLAGS =	\
+	$(GTK_LIBS) \
+	$(LIBXFCE4UTIL_LIBS) \
+	$(LIBXFCEGUI4_LIBS)
+	
+

Added: xfbib/trunk/src/about_dialog.c
===================================================================
--- xfbib/trunk/src/about_dialog.c	                        (rev 0)
+++ xfbib/trunk/src/about_dialog.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,50 @@
+/*
+ *  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 Library 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 <config.h>
+#include <libxfce4util/libxfce4util.h>
+
+#include "about_dialog.h"
+#include "debug.h"
+#include "xfbib.h"
+
+void show_about_dialog(void)
+{
+	_DEBUG(("show_about_dialog"));
+	const gchar *authors[] = {
+		_("Developers:"),
+		N_("David Gustafsson <david.s.gustafsson at gmail.com>"),
+		N_("Jesper Karlsson <zarper at gmail.com>"),
+		NULL};
+
+	GtkWidget *dialog = gtk_about_dialog_new();
+
+	gtk_about_dialog_set_name((GtkAboutDialog *)dialog, PACKAGE_NAME);
+	gtk_about_dialog_set_version((GtkAboutDialog *)dialog, PACKAGE_VERSION);
+
+	gtk_about_dialog_set_comments((GtkAboutDialog *)dialog, _("BibTeX editor for Xfce"));
+	gtk_about_dialog_set_website((GtkAboutDialog *)dialog,  N_("http://goodies.xfce.org/projects/applications/xfbib"));
+	gtk_about_dialog_set_logo_icon_name((GtkAboutDialog *)dialog, "xfbib");
+	gtk_about_dialog_set_authors((GtkAboutDialog *)dialog, authors);
+	gtk_about_dialog_set_license((GtkAboutDialog *)dialog, xfce_get_license_text(XFCE_LICENSE_TEXT_GPL));
+
+	/* Add this later */
+	gtk_about_dialog_set_copyright((GtkAboutDialog *)dialog, N_("Copyright \302\251 2008 Jesper Karlsson & David Gustafsson"));
+
+	gtk_dialog_run(GTK_DIALOG(dialog));
+
+	gtk_widget_destroy(dialog);
+}

Added: xfbib/trunk/src/about_dialog.h
===================================================================
--- xfbib/trunk/src/about_dialog.h	                        (rev 0)
+++ xfbib/trunk/src/about_dialog.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,17 @@
+/*
+ *  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 Library 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.
+ */
+
+void show_about_dialog(void);

Added: xfbib/trunk/src/comment.c
===================================================================
--- xfbib/trunk/src/comment.c	                        (rev 0)
+++ xfbib/trunk/src/comment.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,51 @@
+/*
+ *  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 Library 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 <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "comment.h"
+#include "debug.h"
+
+struct comment *new_comment(char *value)
+{
+	_DEBUG(("new_comment"));
+	struct comment *new = malloc(sizeof(struct comment));
+	if ((new->value = strdup(value)) == NULL)
+		fprintf(stderr, "Insufficient amount of memory available\n");
+	return new;
+}
+
+void print_comment(struct comment *c)
+{
+	_DEBUG(("print_comment"));
+	write_comment(c, stdout);
+}
+
+
+void write_comment(struct comment *c, FILE *file)
+{
+	_DEBUG(("write_comment"));
+	fprintf(file, "%s\n", c->value);
+}
+
+void free_comment(struct comment *c)
+{
+	_DEBUG(("free_comment"));
+	free(c->value);
+	free(c);
+}

Added: xfbib/trunk/src/comment.h
===================================================================
--- xfbib/trunk/src/comment.h	                        (rev 0)
+++ xfbib/trunk/src/comment.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,28 @@
+/*
+ *  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 Library 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 __COMMENT_H
+#define __COMMENT_H
+struct comment {
+	char *value;
+};
+
+struct comment *new_comment(char*);
+void print_comment(struct comment*);
+void write_comment(struct comment*, FILE*);
+void free_comment(struct comment*);
+
+#endif //__COMMENT_H

Added: xfbib/trunk/src/debug.c
===================================================================
--- xfbib/trunk/src/debug.c	                        (rev 0)
+++ xfbib/trunk/src/debug.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,30 @@
+/*
+ *  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 Library 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>
+#include <stdarg.h>
+
+#include "debug.h"
+
+void dbg_print(const char *format, ...)
+{
+	va_list args;
+	va_start(args, format);
+	vfprintf(stderr, format, args);
+	fprintf(stderr, "\n");
+	va_end(args);
+}
+

Added: xfbib/trunk/src/debug.h
===================================================================
--- xfbib/trunk/src/debug.h	                        (rev 0)
+++ xfbib/trunk/src/debug.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,26 @@
+/*
+ *  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 Library 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
+
+#if DEBUG
+void dbg_print(const char*, ...);
+#define _DEBUG(msg) (fprintf(stderr,"%s:%d: ", __FILE__, __LINE__), dbg_print msg)
+#else
+#define _DEBUG(msg)
+#endif

Added: xfbib/trunk/src/entry.c
===================================================================
--- xfbib/trunk/src/entry.c	                        (rev 0)
+++ xfbib/trunk/src/entry.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,58 @@
+/*
+ *  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 Library 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 <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "entry.h"
+#include "tag.h"
+#include "debug.h"
+
+struct entry *new_entry(char *type, char *key)
+{
+	_DEBUG(("new_entry"));
+	struct entry *new = malloc(sizeof(struct entry));
+	if ((new->type = strdup(type)) == NULL)
+		fprintf(stderr, "Insufficient amount of memory available\n");
+	if ((new->key = strdup(key)) == NULL)
+		fprintf(stderr, "Insufficient amount of memory available\n");
+	new->tags = NULL;
+	return new;
+}
+
+void print_entry(struct entry *e)
+{
+	_DEBUG(("print_entry"));
+	write_entry(e, stdout);
+}
+
+void write_entry(struct entry *e, FILE *file)
+{
+	_DEBUG(("write_entry"));
+	fprintf(file, "@%s{%s,\n", e->type, e->key);
+	write_tags(e->tags, file);
+	fprintf(file, "}\n\n");
+}
+
+void free_entry(struct entry *e)
+{
+	_DEBUG(("free_entry"));
+	free(e->type);
+	free(e->key);
+	free_tags(e->tags);
+	free(e);
+}

Added: xfbib/trunk/src/entry.h
===================================================================
--- xfbib/trunk/src/entry.h	                        (rev 0)
+++ xfbib/trunk/src/entry.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,30 @@
+/*
+ *  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 Library 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 __ENTRY_H
+#define __ENTRY_H
+struct entry {
+	char *type;
+	char *key;
+	struct tag *tags;
+};
+
+struct entry *new_entry(char*, char*);
+void print_entry(struct entry*);
+void write_entry(struct entry*, FILE*);
+void free_entry(struct entry*);
+
+#endif //__ENTRY_H

Added: xfbib/trunk/src/entry_edit_dialog.c
===================================================================
--- xfbib/trunk/src/entry_edit_dialog.c	                        (rev 0)
+++ xfbib/trunk/src/entry_edit_dialog.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,426 @@
+/*
+ *  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 Library 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 <stdlib.h>
+#include <string.h>
+#include <config.h>
+#include <libxfcegui4/libxfcegui4.h>
+
+#include "entry_edit_dialog.h"
+#include "entry.h"
+#include "tag.h"
+#include "debug.h"
+#include "treeview.h"
+#include "node.h"
+
+#define RED 0
+#define GREEN 1
+#define WHITE 2
+
+const char *label_types[] = {"Article", "Book", "Booklet", "Conference", "Inbook",
+	"Incollection", "Inproceedings", "Manual", "Mastersthesis", "Misc",
+	"PhdThesis", "Proceedings", "Techreport", "Unpublished"};
+
+const char *label_entry[] = {"Address", "Annote", "Author", "Booktitle", "Chapter",
+	"Crossref", "Edition", "Editor", "E-print", "How Published",
+	"Institution", "Journal", "Key", "Month", "Note",
+	"Number", "Organization", "Pages", "Publisher", "School",
+	"Series", "Title", "Type", "URL", "Volume", "Year"};
+
+const char *tooltips[] = { "Address of publisher",
+	"Annotation for annotated bibliography styles", 
+	"Name(s) of the author(s), separated by 'and' if more than one", 
+	"Title of the book, if only part of it is being cited", 
+	"Chapter number", 
+	"Citation key of the cross-referenced entry", 
+	"Edition of the book (such as \"first\" or \"second\")", 
+	"Name(s) of the editor(s), separated by 'and' if more than one", 
+	"Specification of electronic publication", 
+	"Publishing method if the method is nonstandard", 
+	"Institution that was involved in the publishing", 
+	"Journal or magazine in which the work was published", 
+	"Hidden field used for specifying or overriding the alphabetical order of entries", 
+	"Month of publication or creation if unpublished", 
+	"Miscellaneous extra information", 
+	"Number of journal, magazine, or tech-report", 
+	"Sponsor of the conference", 
+	"Page numbers separated by commas or double-hyphens", 
+	"Name of publisher", 
+	"School where thesis was written", 
+	"Series of books in which the book was published", 
+	"Title of the work", 
+	"Type of technical report", 
+	"Internet address", 
+	"Number of the volume", 
+	"Year of publication or creation if unpublished"};
+	
+	
+
+static void set_color_base(GtkWidget *entry, int selected_color)
+{
+	_DEBUG(("set_color"));
+	
+	GdkColor color;
+	
+	if (selected_color == RED) {
+		color.red = 0xe7ff;
+		color.green = 0xb3ff;
+		color.blue = 0xb3ff;	
+	} else if (selected_color == GREEN) {
+		color.red = 0xcdff;
+		color.green = 0xe7ff;
+		color.blue = 0xb3ff;
+	} else if (selected_color == WHITE) {
+		color.red = 0xffff;
+		color.green = 0xffff;
+		color.blue = 0xffff;
+	}
+
+	gtk_widget_modify_base(entry, GTK_STATE_NORMAL, &color);
+}
+
+static int change_color(GtkEntry *entry)
+{
+	_DEBUG(("change_color"));
+	
+	if (strcmp(gtk_entry_get_text(entry), "") == 0) {
+		set_color_base(GTK_WIDGET(entry), RED);
+		return 0;
+	} else {
+		set_color_base(GTK_WIDGET(entry), GREEN);
+		return 1;
+	}
+}
+
+static int get_entry_pos(char *str)
+{
+	_DEBUG(("get_entry_pos"));
+	int i;
+	if(str != NULL) {
+		for (i = 0; i < N_ENTRIES; i++) {
+			if (strcasecmp(str, label_entry[i]) == 0)
+				return i;
+		}
+	}
+	return -1;
+}
+
+static void entry_colors(struct edit_entry *entries, gint type)
+{
+	_DEBUG(("entry_colors"));
+	
+	set_color_base(entries[get_entry_pos("author")].entry, WHITE);
+	set_color_base(entries[get_entry_pos("editor")].entry, WHITE);
+	set_color_base(entries[get_entry_pos("chapter")].entry, WHITE);
+	set_color_base(entries[get_entry_pos("title")].entry, WHITE);
+	set_color_base(entries[get_entry_pos("journal")].entry, WHITE);
+	set_color_base(entries[get_entry_pos("year")].entry, WHITE);
+	set_color_base(entries[get_entry_pos("publisher")].entry, WHITE);
+	set_color_base(entries[get_entry_pos("booktitle")].entry, WHITE);
+	set_color_base(entries[get_entry_pos("pages")].entry, WHITE);
+	set_color_base(entries[get_entry_pos("school")].entry, WHITE);
+	set_color_base(entries[get_entry_pos("institution")].entry, WHITE);
+	set_color_base(entries[get_entry_pos("note")].entry, WHITE);
+	
+	switch(type) {
+		case ARTICLE:
+			_DEBUG(("Article"));
+			change_color(GTK_ENTRY(entries[get_entry_pos("author")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("title")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("journal")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("year")].entry));
+			break;
+		case BOOK:
+			_DEBUG(("book"));
+			if (!change_color(GTK_ENTRY(entries[get_entry_pos("author")].entry)))
+				if (change_color(GTK_ENTRY(entries[get_entry_pos("editor")].entry)))
+					set_color_base(entries[get_entry_pos("author")].entry, WHITE);
+			change_color(GTK_ENTRY(entries[get_entry_pos("title")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("publisher")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("year")].entry));
+			break;
+		case BOOKLET:
+			_DEBUG(("booklet"));
+			change_color(GTK_ENTRY(entries[get_entry_pos("title")].entry));
+			break;
+		case CONFERENCE:
+		case INCOLLECTION:
+		case INPROCEEDINGS:
+			_DEBUG(("conference/incollection/inproceedings"));
+			change_color(GTK_ENTRY(entries[get_entry_pos("author")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("title")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("booktitle")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("year")].entry));
+			break;
+		case INBOOK:
+			_DEBUG(("inbook"));
+			if (!change_color(GTK_ENTRY(entries[get_entry_pos("author")].entry)))
+				if (change_color(GTK_ENTRY(entries[get_entry_pos("editor")].entry)))
+					set_color_base(entries[get_entry_pos("author")].entry, WHITE);
+			change_color(GTK_ENTRY(entries[get_entry_pos("title")].entry));
+			if (!change_color(GTK_ENTRY(entries[get_entry_pos("chapter")].entry)))
+				if (change_color(GTK_ENTRY(entries[get_entry_pos("pages")].entry)))
+					set_color_base(entries[get_entry_pos("chapter")].entry, WHITE);
+			change_color(GTK_ENTRY(entries[get_entry_pos("publisher")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("year")].entry));
+			break;
+		case MANUAL:
+			_DEBUG(("manual"));
+			change_color(GTK_ENTRY(entries[get_entry_pos("title")].entry));
+			break;
+		case MASTERSTHESIS:
+			_DEBUG(("mastersthesis"));
+			change_color(GTK_ENTRY(entries[get_entry_pos("author")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("title")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("school")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("year")].entry));
+			break;
+		case MISC:
+			_DEBUG(("misc"));
+			break;
+		case PHDTHESIS:
+			_DEBUG(("phdthesis"));
+			change_color(GTK_ENTRY(entries[get_entry_pos("title")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("year")].entry));
+			break;
+		case TECHREPORT:
+			_DEBUG(("techreport"));
+			change_color(GTK_ENTRY(entries[get_entry_pos("author")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("title")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("institution")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("year")].entry));
+			break;
+		case UNPUBLISHED:
+			_DEBUG(("unpublished"));
+			change_color(GTK_ENTRY(entries[get_entry_pos("author")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("title")].entry));
+			change_color(GTK_ENTRY(entries[get_entry_pos("note")].entry));
+	}
+}
+
+static void entry_sensitivity(struct edit_entry *entries, gint type)
+{
+	/* These entries is not used by any of the standard types in bibtex */
+	//gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("url")].entry), FALSE);
+	//gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("e-print")].entry), FALSE);
+	//gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("crossref")].entry), FALSE);
+	//gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("annote")].entry), FALSE);
+	
+	/* These entries is use by all types */
+	//gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("title")].entry), TRUE);
+	//gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("month")].entry), TRUE);
+	//gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("year")].entry), TRUE);
+	//gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("key")].entry), TRUE);
+	//gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("note")].entry), TRUE);
+	
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("author")].entry), type == PROCEEDINGS ? FALSE : TRUE);
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("editor")].entry), type == BOOK || type == CONFERENCE || type == INBOOK || type == INCOLLECTION || type == INPROCEEDINGS || type == PROCEEDINGS ? TRUE : FALSE);
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("institution")].entry), type == TECHREPORT || type == MASTERSTHESIS ? TRUE : FALSE);
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("organization")].entry), type == CONFERENCE || type == INCOLLECTION || type == INPROCEEDINGS || type == MANUAL || type == PROCEEDINGS ? TRUE : FALSE);
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("school")].entry), type == MASTERSTHESIS || type == PHDTHESIS ? TRUE : FALSE);
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("type")].entry), type == TECHREPORT ? TRUE : FALSE);
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("booktitle")].entry), type == CONFERENCE || type == INCOLLECTION || type == INPROCEEDINGS ? TRUE : FALSE);
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("chapter")].entry), type == INBOOK ? TRUE : FALSE);
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("edition")].entry), type == BOOK || type == INBOOK || type == MANUAL ? TRUE : FALSE);
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("number")].entry), type == ARTICLE || type == TECHREPORT ? TRUE : FALSE);
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("pages")].entry), type == ARTICLE || type == CONFERENCE || type == INBOOK || type == INCOLLECTION || type == INPROCEEDINGS ? TRUE : FALSE);
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("volume")].entry), type == ARTICLE || type == BOOK || type == INBOOK ? TRUE : FALSE);
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("address")].entry), type == ARTICLE || type == MISC || type == UNPUBLISHED ? FALSE : TRUE);
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("how published")].entry), type == BOOKLET || type == MISC ? TRUE : FALSE);
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("journal")].entry), type == ARTICLE ? TRUE : FALSE);
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("publisher")].entry), type == BOOK || type == CONFERENCE || type == INBOOK || type == INCOLLECTION || type == INPROCEEDINGS || type == PROCEEDINGS ? TRUE : FALSE);
+	gtk_widget_set_sensitive(GTK_WIDGET(entries[get_entry_pos("series")].entry), type == BOOK || type == INBOOK ? TRUE : FALSE);
+}
+
+static void combobox_changed_event(GtkComboBox *widget, struct edit_entry *edit_entry)
+{
+	_DEBUG(("combobox_changed_event"));
+	entry_colors(edit_entry, gtk_combo_box_get_active(widget));
+	entry_sensitivity(edit_entry, gtk_combo_box_get_active(widget));
+}
+
+static void entry_changed_event(GtkEntry *widget, GtkComboBox *combobox)
+{
+	_DEBUG(("entry_changed_event"));
+	g_signal_emit_by_name(G_OBJECT (combobox), "changed");
+}
+
+static GtkWidget *create_hbox(GtkWidget **combobox, GtkWidget **key_entry, gpointer edit_entry)
+{
+	_DEBUG(("create_hbox"));
+	GtkWidget *hbox;
+	int i;
+
+	*key_entry = gtk_entry_new();
+	gtk_entry_set_width_chars(GTK_ENTRY (*key_entry), 25);
+	gtk_widget_set_tooltip_text(*key_entry, _("Key used when citing the publication"));
+
+	*combobox = gtk_combo_box_new_text();
+	for (i = 0; i < N_TYPES; i++)
+		gtk_combo_box_append_text (GTK_COMBO_BOX (*combobox),label_types[i] );
+	
+	g_signal_connect (G_OBJECT (GTK_COMBO_BOX(*combobox)), "changed",
+                      G_CALLBACK (combobox_changed_event), edit_entry);
+
+	//gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0);
+	//combobox_changed_event(GTK_COMBO_BOX(combobox), note);
+
+	hbox = gtk_hbox_new(FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(_("Type: ")), TRUE, FALSE, 10);
+	gtk_box_pack_start(GTK_BOX(hbox), *combobox, TRUE, FALSE, 10);
+	gtk_box_pack_end(GTK_BOX(hbox), *key_entry, TRUE, FALSE, 10);
+	gtk_box_pack_end(GTK_BOX(hbox), gtk_label_new(_("Key: ")), TRUE, FALSE,10);
+	
+	return hbox;
+}
+
+static int get_type_pos(char *str)
+{
+	_DEBUG(("get_type_pos"));
+	int i;
+	if(str != NULL) {
+		for (i = 0; i < N_TYPES; i++) {
+			if (strcasecmp(str, label_types[i]) == 0)
+				return i;
+		}
+	}
+	return -1;
+}
+
+static void set_entry_text(GtkEntry *entry, char *text)
+{
+	_DEBUG(("set_entry_text"));
+	if (text != NULL && entry != NULL)
+		gtk_entry_set_text(entry, text);
+}
+
+void show_entry_edit_dialog(struct xfbib *xfbib, struct entry *selected)
+{
+	_DEBUG(("show_entry_edit_dialog"));
+	GtkWidget *dialog, *notebook, *hbox, *key_entry, *combobox, *vbox[4];
+	struct edit_entry edit_entry[N_ENTRIES];
+	int i, pos;
+	struct tag *tags;
+	char *type;
+	const gchar *value, *key;
+	struct node *node = xfbib->list;
+	
+	xfce_textdomain (PACKAGE, LOCALEDIR, "ISO-8859-1");
+
+	dialog = xfce_titled_dialog_new_with_buttons ((selected == NULL) ? _("Add entry") : _("Edit entry"), NULL,
+						GTK_DIALOG_MODAL,
+						GTK_STOCK_OK, GTK_RESPONSE_OK,
+						GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+						NULL);
+	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+	
+	gtk_window_set_icon_name(GTK_WINDOW(dialog), "xfbib");
+
+	hbox = create_hbox(&combobox, &key_entry, edit_entry);
+	
+	for (i = 0; i < 4; i++)
+		vbox[i] = gtk_vbox_new(FALSE, 10);
+
+	for (i = 0; i < N_ENTRIES; i++)  {
+		edit_entry[i].label = gtk_label_new(label_entry[i]);
+		edit_entry[i].entry = gtk_entry_new();
+		gtk_entry_set_width_chars(GTK_ENTRY (edit_entry[i].entry), 30);
+		gtk_widget_set_tooltip_text (edit_entry[i].entry, tooltips[i]);
+		edit_entry[i].hbox = gtk_hbox_new(FALSE, 10);
+		gtk_box_pack_start(GTK_BOX(edit_entry[i].hbox), edit_entry[i].label, FALSE, FALSE, 10);
+		gtk_box_pack_end(GTK_BOX(edit_entry[i].hbox), edit_entry[i].entry, FALSE, TRUE, 10);
+		g_signal_connect (G_OBJECT (GTK_ENTRY(edit_entry[i].entry)), "changed",
+                      G_CALLBACK (entry_changed_event), combobox);
+		
+		if (i == AUTHOR || i == EDITOR || i == INSTITUTION || i == ORGANIZATION || i == SCHOOL || i == TITLE || i == TYPE)
+			gtk_box_pack_start (GTK_BOX (vbox[0]), edit_entry[i].hbox, FALSE, FALSE, 2);
+		else if (i == BOOKTITLE || i == CHAPTER || i == EDITION || i == MONTH || i == NUMBER || i == PAGES || i == VOLUME || i == YEAR)
+			gtk_box_pack_start (GTK_BOX (vbox[1]), edit_entry[i].hbox, FALSE, FALSE, 2);
+		else if (i == ADDRESS || i == HOWPUBLISHED || i == JOURNAL || i == PUBLISHER || i == SERIES)
+			gtk_box_pack_start (GTK_BOX (vbox[2]), edit_entry[i].hbox, FALSE, FALSE, 2);
+		else
+			gtk_box_pack_start (GTK_BOX (vbox[3]), edit_entry[i].hbox, FALSE, FALSE, 2);
+	}
+
+
+	notebook = gtk_notebook_new ();
+	gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook), GTK_POS_TOP);
+	
+	gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox[0], gtk_label_new(_("Title")));	
+	gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox[1], gtk_label_new(_("Publication")));	
+	gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox[2], gtk_label_new(_("Publisher")));	
+	gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox[3], gtk_label_new(_("Misc")));	
+
+	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 10);
+	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), notebook, TRUE, TRUE, 10);
+
+	gtk_widget_show_all(dialog);
+
+	if (selected != NULL) {
+		if ((pos = get_type_pos(selected->type)) != -1) {
+			/* Adding predefined values */
+			gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), pos);
+			set_entry_text(GTK_ENTRY(key_entry), selected->key);
+			for (tags = selected->tags; tags != NULL; tags = tags->next) {
+				pos = get_entry_pos(tags->name);
+				set_entry_text(GTK_ENTRY(edit_entry[pos].entry), tags->value);
+			}
+		} else
+			_DEBUG(("Type equals -1"));
+	}
+	
+	while ( TRUE ) {
+		if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) {
+			_DEBUG(("Response OK"));
+			key = gtk_entry_get_text(GTK_ENTRY(key_entry));
+			if ((type = gtk_combo_box_get_active_text(GTK_COMBO_BOX(combobox))) == NULL) {
+				_DEBUG(("No type selected"));
+				xfce_warn(_("No type was selected"));
+				continue;
+			} else if (strcmp(key, "") == 0) {
+				_DEBUG(("No key selected"));
+				xfce_warn(_("No key was selected"));
+				continue;
+			} else {
+				if (selected == NULL) {
+					_DEBUG(("Add new entry"));
+					/* TODO: Maybe you shouldnt have to set the type and key */
+					selected = add_entry(&node, type,(char*) key);
+				} else {
+					_DEBUG(("Edit old entry"));
+					selected->key = strdup(key);
+					selected->type = strdup(type);
+					free_tags(selected->tags);
+				}
+				for (i = 0; i < N_ENTRIES; i++) {
+					value = gtk_entry_get_text(GTK_ENTRY(edit_entry[i].entry));
+					if(GTK_WIDGET_IS_SENSITIVE(GTK_WIDGET(edit_entry[i].entry)) && (strcmp(value, "") != 0)) {
+						fprintf(stderr, "label = %s\tvalue = %s\n",
+								gtk_label_get_text(GTK_LABEL(edit_entry[i].label)), value);
+						/* Field was not empty and sensitive, so add value to a new entry */
+						add_tag(selected,(char*) gtk_label_get_text(GTK_LABEL(edit_entry[i].label)),(char*) value);
+					}
+				}
+				update_treeview(xfbib);
+				break;
+			}
+		} else {
+			_DEBUG(("Response Cancel"));
+			break;
+		}
+	}
+	gtk_widget_destroy (dialog);
+}

Added: xfbib/trunk/src/entry_edit_dialog.h
===================================================================
--- xfbib/trunk/src/entry_edit_dialog.h	                        (rev 0)
+++ xfbib/trunk/src/entry_edit_dialog.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,77 @@
+/*
+ *  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 Library 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 <gtk/gtk.h>
+#include "entry.h"
+#include "xfbib.h"
+
+enum {
+	ARTICLE = 0,
+	BOOK,
+	BOOKLET,
+	CONFERENCE,
+	INBOOK,
+	INCOLLECTION,
+	INPROCEEDINGS,
+	MANUAL,
+	MASTERSTHESIS,
+	MISC,
+	PHDTHESIS,
+	PROCEEDINGS,
+	TECHREPORT,
+	UNPUBLISHED,
+	N_TYPES
+};
+
+enum {
+	ADDRESS = 0,
+	ANNOTE,
+	AUTHOR,
+	BOOKTITLE,
+	CHAPTER,
+	CROSSREF,
+	EDITION,
+	EDITOR,
+	EPRINT,
+	HOWPUBLISHED,
+	INSTITUTION,
+	JOURNAL,
+	KEY,
+	MONTH,
+	NOTE,
+	NUMBER,
+	ORGANIZATION,
+	PAGES,
+	PUBLISHER,
+	SCHOOL,
+	SERIES,
+	TITLE,
+	TYPE,
+	URL,
+	VOLUME,
+	YEAR,
+	N_ENTRIES
+};
+
+struct edit_entry {
+	GtkWidget *label;
+	GtkWidget *entry;
+	GtkWidget *hbox;
+};
+
+
+
+void show_entry_edit_dialog(struct xfbib*, struct entry*);

Added: xfbib/trunk/src/lex.l
===================================================================
--- xfbib/trunk/src/lex.l	                        (rev 0)
+++ xfbib/trunk/src/lex.l	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,50 @@
+/*
+ *  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 Library 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.
+ */
+
+%{
+#define YYSTYPE char*
+#include "parser.h"
+int lineno = 1;
+char *stryychar( char alternative ) ;
+%}
+%option yylineno nounput
+%%
+\\[A-Za-z0-9]+				{ yylval = strdup(yytext); return LATEXCOMMAND; }
+@[^\\\"	 \n\(\),=\{\}#~]+	{
+					yylval = strdup(yytext);
+				  if( strcasecmp( yytext, "@string" ) == 0) {
+				    return DEFINESTRING ;
+				  } else if( strcasecmp( yytext, "@preamble" ) == 0) {
+				    return PREAMBLESTRING ;
+				  } else if( strcasecmp( yytext, "@comment" ) == 0) {
+				    return COMMENTSTRING ;
+				  }else {
+				    return ATSTRING ;
+				  }
+				}
+[^\\\" 	\n\(\),=\{\}#~]+	{ yylval = strdup(yytext);return STRING ; }
+[ \t]*				{ yylval = strdup(yytext);return WHITE; }
+\n				{ yylval = strdup(yytext);/*lineno++; */return ENDLINE; }
+\"				{ yylval = strdup(yytext);return QUOTE ; }
+\(				{ yylval = strdup(yytext);return LBRACKET ; }
+\)				{ yylval = strdup(yytext);return RBRACKET ; }
+\{				{ yylval = strdup(yytext);return LCBRACKET ; }
+\}				{ yylval = strdup(yytext);return RCBRACKET ; }
+=				{ yylval = strdup(yytext);return EQUAL ; }
+#				{ yylval = strdup(yytext);return HASHSIGN ; }
+\,				{ yylval = strdup(yytext);return COMMA ; }
+\%[^\n]*			{ yylval = strdup(yytext);return COMMENT ; }
+%%

Added: xfbib/trunk/src/menubar.c
===================================================================
--- xfbib/trunk/src/menubar.c	                        (rev 0)
+++ xfbib/trunk/src/menubar.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,252 @@
+/*
+ *  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 Library 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 <gtk/gtk.h>
+//#include <libxfcegui4/libxfcegui4.h>	/* TODO: This file is blocking the translation of everything in this file */
+#include <libintl.h>
+
+#include "menubar.h"
+#include "window.h"
+#include "node.h"
+#include "about_dialog.h"
+#include "open_dialog.h"
+#include "save_dialog.h"
+#include "save.h"
+#include "debug.h"
+#include "entry_edit_dialog.h"
+#include "treeview.h"
+
+#define _(String) dgettext (PACKAGE, String)
+#define N_(String) (String)
+
+static void file_new_event_handler(struct xfbib *xfbib)
+{
+	_DEBUG(("file_new_event_handler"));
+	free_list(xfbib->list);
+	xfbib->filename = NULL;
+	update_treeview(xfbib);
+	gtk_window_set_title(GTK_WINDOW(xfbib->window.window), create_title(xfbib));
+}
+
+static void file_open_event_handler (struct xfbib *xfbib)
+{
+	_DEBUG(("file_open_event_handler"));
+	show_open_dialog(xfbib);
+}
+static void file_save_event_handler (struct xfbib *xfbib)
+{
+	_DEBUG(("file_save_event_handler"));
+	if (xfbib->filename == NULL) {
+		/* Use save as*/
+		_DEBUG(("No file open, opening save as dialog"));
+		show_save_dialog(xfbib);
+	} else {
+		_DEBUG(("Saving data"));
+		save(xfbib);
+	}
+}
+
+static void file_saveas_event_handler (struct xfbib *xfbib)
+{
+	_DEBUG(("file_saveas_event_handler"));
+	show_save_dialog(xfbib);
+}
+
+static void file_quit_event_handler (struct xfbib *xfbib)
+{
+	_DEBUG(("file_quit_event_handler"));
+	free_list(xfbib->list);
+	gtk_main_quit();
+}
+
+static void entry_add_event_handler (struct xfbib *xfbib)
+{
+	_DEBUG(("entry_add_event_handler"));
+	show_entry_edit_dialog(xfbib, NULL);
+}
+
+static void entry_remove_event_handler (struct xfbib *xfbib)
+{
+	_DEBUG(("entry_remove_event_handler"));
+	struct node *node;
+	GtkTreeSelection *selection;
+	GtkTreeModel     *model;
+	GtkTreeIter       iter;
+
+	/* This will only work in single or browse selection mode! */
+
+	selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(xfbib->window.main_treeview));
+	if (gtk_tree_selection_get_selected(selection, &model, &iter)) {
+		gtk_tree_model_get (model, &iter, COLUMN_ENTRY, &node, -1);
+		remove_node(&(xfbib->list), node);
+	} else {
+		_DEBUG(("No row selected"));
+	}
+	update_treeview(xfbib);
+}
+
+static void view_show_toolbar_event_handler (GtkCheckMenuItem *show_toolbar, struct xfbib *xfbib)
+{
+	_DEBUG(("view_show_toolbar_event_handler"));
+	if (gtk_check_menu_item_get_active(show_toolbar))
+		gtk_widget_show(xfbib->window.toolbar);
+	else
+		gtk_widget_hide(xfbib->window.toolbar);
+}
+
+static void help_about_event_handler (GtkWidget *window)
+{
+	_DEBUG(("help_about_event_handler"));
+	show_about_dialog();
+}
+
+static GtkWidget *create_file_menu(struct xfbib *xfbib, GtkAccelGroup *accel)
+{
+	_DEBUG(("create_file_menu"));
+	GtkWidget *item, *menu, *new, *open, *save, *saveas, *quit;
+	
+	item = gtk_menu_item_new_with_label(_("File"));
+
+	menu = gtk_menu_new();
+
+	new = gtk_image_menu_item_new_from_stock(GTK_STOCK_NEW, accel);
+	gtk_menu_shell_append(GTK_MENU_SHELL(menu), new);
+	g_signal_connect_swapped (G_OBJECT (new), "activate",
+			G_CALLBACK (file_new_event_handler), xfbib);
+
+	open = gtk_image_menu_item_new_from_stock(GTK_STOCK_OPEN, accel);
+	gtk_menu_shell_append(GTK_MENU_SHELL(menu), open);
+	g_signal_connect_swapped (G_OBJECT (open), "activate",
+			G_CALLBACK (file_open_event_handler), xfbib);
+
+	save = gtk_image_menu_item_new_from_stock(GTK_STOCK_SAVE, accel);
+	gtk_menu_shell_append(GTK_MENU_SHELL(menu), save);
+	g_signal_connect_swapped (G_OBJECT (save), "activate",
+			G_CALLBACK (file_save_event_handler), xfbib);
+	/* Add this one later */
+	//gtk_widget_set_sensitive (save, FALSE);
+
+	saveas = gtk_image_menu_item_new_from_stock(GTK_STOCK_SAVE_AS, accel);
+	gtk_menu_shell_append(GTK_MENU_SHELL(menu), saveas);
+	g_signal_connect_swapped (G_OBJECT (saveas), "activate",
+			G_CALLBACK (file_saveas_event_handler), xfbib);
+
+	quit = gtk_image_menu_item_new_from_stock(GTK_STOCK_QUIT, accel);
+	gtk_menu_shell_append(GTK_MENU_SHELL(menu), quit);
+	g_signal_connect_swapped (G_OBJECT (quit), "activate",
+			G_CALLBACK (file_quit_event_handler), xfbib);
+
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), menu);
+
+	return item;
+}
+
+static GtkWidget *create_entry_menu(struct xfbib *xfbib, GtkAccelGroup *accel)
+{
+	_DEBUG(("create_entry_menu"));
+	
+	GtkWidget *item, *menu, *add, *remove;
+	
+	item = gtk_menu_item_new_with_mnemonic(_("E_ntry"));
+	menu = gtk_menu_new();
+	add = gtk_image_menu_item_new_from_stock(GTK_STOCK_ADD, accel);
+	gtk_menu_shell_append(GTK_MENU_SHELL (menu), add);
+	remove = gtk_image_menu_item_new_from_stock(GTK_STOCK_REMOVE, accel);
+	gtk_menu_shell_append(GTK_MENU_SHELL (menu), remove);
+	
+	g_signal_connect_swapped (G_OBJECT (GTK_IMAGE_MENU_ITEM (add)), "activate",
+			G_CALLBACK (entry_add_event_handler), xfbib);
+	g_signal_connect_swapped (G_OBJECT (GTK_IMAGE_MENU_ITEM (remove)), "activate",
+			G_CALLBACK (entry_remove_event_handler), xfbib);
+			
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM (item), menu);
+	
+	return item;
+}
+
+static GtkWidget *create_view_menu(struct xfbib *xfbib)
+{
+	_DEBUG(("create_view_menu"));
+	
+	GtkWidget *item, *menu, *toolbar;
+	
+	item = gtk_menu_item_new_with_mnemonic(_("_View"));
+	menu = gtk_menu_new();
+	toolbar = gtk_check_menu_item_new_with_mnemonic(_("Show _Toolbar"));
+	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM (toolbar), TRUE);
+	gtk_menu_shell_append(GTK_MENU_SHELL (menu), toolbar);
+	
+	g_signal_connect (G_OBJECT (GTK_CHECK_MENU_ITEM (toolbar)), "activate",
+			G_CALLBACK (view_show_toolbar_event_handler), xfbib);
+			
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM (item), menu);
+	
+	return item;
+}
+
+static GtkWidget *create_help_menu(GtkWidget *window, GtkAccelGroup *accel)
+{
+	_DEBUG(("create_help_menu"));
+
+	GtkWidget *item, *menu, *about;
+	/* Create Help menu */
+	item = gtk_menu_item_new_with_label(_("Help"));
+	
+	menu = gtk_menu_new();
+
+	about = gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT, accel);
+	gtk_menu_shell_append(GTK_MENU_SHELL(menu), about);
+	g_signal_connect_swapped (G_OBJECT (about), "activate",
+			G_CALLBACK (help_about_event_handler), window);
+
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), menu);
+
+	return item;
+}
+
+
+GtkWidget *create_menubar(struct xfbib *xfbib)
+{
+	_DEBUG(("create_menubar"));
+
+	struct {
+		GtkWidget *file;
+		GtkWidget *entry;
+		GtkWidget *view;
+		GtkWidget *help;
+	} items;
+	GtkWidget *menubar;
+	GtkAccelGroup *accel;
+
+	accel = gtk_accel_group_new ();
+	menubar = gtk_menu_bar_new();
+	
+	items.file = create_file_menu(xfbib, accel);
+	gtk_menu_shell_append(GTK_MENU_SHELL(menubar), items.file);
+	
+	items.entry = create_entry_menu(xfbib, accel);
+	gtk_menu_shell_append(GTK_MENU_SHELL(menubar), items.entry);
+	
+	items.view = create_view_menu(xfbib);
+	gtk_menu_shell_append(GTK_MENU_SHELL(menubar), items.view);
+
+	items.help = create_help_menu(xfbib->window.window, accel);
+	gtk_menu_shell_append(GTK_MENU_SHELL(menubar), items.help);
+	
+	gtk_window_add_accel_group (GTK_WINDOW (xfbib->window.window), accel);
+
+	return menubar;
+}

Added: xfbib/trunk/src/menubar.h
===================================================================
--- xfbib/trunk/src/menubar.h	                        (rev 0)
+++ xfbib/trunk/src/menubar.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,19 @@
+/*
+ *  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 Library 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 "xfbib.h"
+
+GtkWidget *create_menubar(struct xfbib*);

Added: xfbib/trunk/src/node.c
===================================================================
--- xfbib/trunk/src/node.c	                        (rev 0)
+++ xfbib/trunk/src/node.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,185 @@
+/*
+ *  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 Library 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>
+#include <stdlib.h>
+
+#include "node.h"
+#include "entry.h"
+#include "preamble.h"
+#include "strings.h"
+#include "tag.h"
+#include "comment.h"
+#include "debug.h"
+
+struct entry *add_entry(struct node **node, char *type, char *key)
+{
+	_DEBUG(("add_entry"));
+	if(*node == NULL) {
+		struct node *new = malloc(sizeof(struct node));
+		new->node_type = ENTRY_NODE;
+		new->next = NULL;
+		new->node = new_entry(type, key);
+		*node = new;
+		return new->node;
+	} else {
+		return add_entry(&((*node)->next), type, key);
+	}
+}
+
+
+void add_preamble(struct node **node, char *value)
+{
+	_DEBUG(("add_preamble"));
+
+	if(*node == NULL) {
+		struct node *new = malloc(sizeof(struct node));
+		new->node_type = PREAMBLE_NODE;
+		new->next = NULL;
+		new->node = new_preamble(value);
+		*node = new;
+	} else {
+		add_preamble(&((*node)->next), value);
+	}
+}
+
+
+void add_comment(struct node **node, char *value)
+{
+	_DEBUG(("add_comment"));
+	if(*node == NULL) {
+		struct node *new = malloc(sizeof(struct node));
+		new->node_type = COMMENT_NODE;
+		new->next = NULL;
+		new->node = new_comment(value);
+		*node = new;
+	} else {
+		add_comment(&((*node)->next), value);
+	}
+}
+
+
+void add_string(struct node **node, char *variable, char *value)
+{
+	_DEBUG(("add_string"));
+	if(*node == NULL) {
+		struct node *new = malloc(sizeof(struct node));
+		new->node_type = STRING_NODE;
+		new->next = NULL;
+		new->node = new_string(variable, value); 
+		*node = new;
+	} else {
+		add_string(&((*node)->next), variable, value);
+	}
+}
+
+
+void add_tag(struct entry *entry, char *name, char *value)
+{
+	_DEBUG(("add_tag"));
+	new_tag(&(entry->tags), name, value);
+}
+
+void print_list(struct node *node)
+{
+	_DEBUG(("print_list"));
+	write_list(node, stdout);
+}
+
+void write_list(struct node *node, FILE *file)
+{
+	_DEBUG(("write_list"));
+	struct node *n;
+	for (n = node; n != NULL; n = n->next) {
+		switch(n->node_type) {
+		case ENTRY_NODE:
+			write_entry(n->node, file);
+			break;
+		case PREAMBLE_NODE:
+			write_preamble(n->node, file);
+			break;
+		case STRING_NODE:
+			write_string(n->node, file);
+			break;
+		case COMMENT_NODE:
+			write_comment(n->node, file);
+			break;
+		default:
+			fprintf(stderr, "Error: unrecogniced node type %d\n", n->node_type);
+			break;
+		}
+	}
+}
+
+void free_list(struct node *n)
+{
+	_DEBUG(("free_list"));
+	if (n != NULL) {
+		free_list(n->next);
+		switch(n->node_type) {
+		case ENTRY_NODE:
+			free_entry(n->node);
+			break;
+		case PREAMBLE_NODE:
+			free_preamble(n->node);
+			break;
+		case STRING_NODE:
+			free_string(n->node);
+			break;
+		case COMMENT_NODE:
+			free_comment(n->node);
+			break;
+		default:
+			fprintf(stderr, "Error: unrecogniced node type %d\n", n->node_type);
+			break;
+		}
+		free(n);
+	}
+}
+
+void remove_node(struct node **nodes, struct node *n)
+{
+	_DEBUG(("remove_node"));
+	if (*nodes != NULL && *nodes == n) {
+		*nodes = n->next;
+		switch(n->node_type) { 
+			case ENTRY_NODE: 				
+				free_entry(n->node);
+				break; 
+			case PREAMBLE_NODE: 
+				free_preamble(n->node); 
+				break; 
+			case STRING_NODE: 
+				free_string(n->node); 
+				break;
+			case COMMENT_NODE:
+				free_comment(n->node);
+				break;
+			default:
+				fprintf(stderr, "Error: unrecogniced node type %d\n", n->node_type);
+				break;
+			}
+		free(n);	
+	} else {
+		remove_node(&(*nodes)->next, n);
+	}
+}
+
+char *get_tag_value(struct entry *e, char *name)
+{
+	_DEBUG(("get_tag_value"));
+	return get_value(e->tags, name);
+}

Added: xfbib/trunk/src/node.h
===================================================================
--- xfbib/trunk/src/node.h	                        (rev 0)
+++ xfbib/trunk/src/node.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,43 @@
+/*
+ *  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 Library 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 __NODE_H
+#define __NODE_H
+enum {
+	ENTRY_NODE = 0,
+	PREAMBLE_NODE,
+	STRING_NODE,
+	COMMENT_NODE,
+};
+
+struct node {
+	int node_type;
+	struct node *next;
+	void *node;
+};
+
+struct entry *add_entry(struct node**, char*, char*);
+void add_preamble(struct node**, char*);
+void add_comment(struct node**, char*);
+void add_string(struct node**, char*, char*);
+void add_tag(struct entry*, char*, char*);
+void print_list(struct node*);
+void write_list(struct node*, FILE*);
+void free_list(struct node*);
+void remove_node(struct node**, struct node*);
+char *get_tag_value(struct entry*, char*);
+
+#endif //__NODE_H

Added: xfbib/trunk/src/open_dialog.c
===================================================================
--- xfbib/trunk/src/open_dialog.c	                        (rev 0)
+++ xfbib/trunk/src/open_dialog.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,68 @@
+/*
+ *  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 Library 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 <gtk/gtk.h>
+#include <libintl.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "open_dialog.h"
+#include "parser_interface.h"
+#include "node.h"
+#include "treeview.h"
+#include "xfbib.h"
+#include "window.h"
+#include "debug.h"
+
+#  define _(String) dgettext (PACKAGE, String)
+#    define N_(String) (String)
+
+
+void show_open_dialog(struct xfbib *xfbib)
+{
+	_DEBUG(("show_open_dialog"));
+	GtkWidget *open;
+
+	open = gtk_file_chooser_dialog_new(_("Open"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN,
+			GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN,
+			GTK_RESPONSE_ACCEPT, NULL);
+
+	GtkFileFilter *filter;
+	filter = gtk_file_filter_new();
+		gtk_file_filter_set_name(filter, _(("BibTeX files")));
+		gtk_file_filter_add_pattern(filter, N_("*.bib"));
+		gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(open), filter);
+
+	/* BibTeX files should have the .bib prefix so "All files" probably can be deleted */
+	filter = gtk_file_filter_new();
+		gtk_file_filter_set_name(filter, _(("All files")));
+		gtk_file_filter_add_pattern(filter, N_("*"));
+		gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(open), filter);
+	/* ____ */
+
+	if(gtk_dialog_run(GTK_DIALOG(open)) == GTK_RESPONSE_ACCEPT) {
+		free_list(xfbib->list);
+		xfbib->list = NULL;
+		xfbib->filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(open));
+		parse_file(xfbib);
+		update_treeview(xfbib);
+		_DEBUG(("Opening: %s", xfbib->filename));
+		gtk_window_set_title(GTK_WINDOW(xfbib->window.window), create_title(xfbib));
+	}
+	gtk_widget_destroy(open);
+}

Added: xfbib/trunk/src/open_dialog.h
===================================================================
--- xfbib/trunk/src/open_dialog.h	                        (rev 0)
+++ xfbib/trunk/src/open_dialog.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,19 @@
+/*
+ *  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 Library 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 "xfbib.h"
+
+void show_open_dialog(struct xfbib*);

Added: xfbib/trunk/src/parser.y
===================================================================
--- xfbib/trunk/src/parser.y	                        (rev 0)
+++ xfbib/trunk/src/parser.y	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,227 @@
+/*
+ *  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 Library 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>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include "node.h"
+#include "entry.h"
+
+typedef char *charstar ;
+#define YYSTYPE charstar
+extern int yylex(void);
+extern int yylineno;
+struct node **yynodelist;
+struct entry *entry;
+char *stryychar( char alternative ) ;
+char *scat( char *s, char *t ) ;
+char *comment_cat(char*, char*, char*, char*);
+void define (char *a, char *b ) ;
+char *lookup (char *a) ;
+void yysetnodelist(struct node **n) {yynodelist = n;}
+int yywrap(void){ return 1;}
+int yyerror(const char *s) { fprintf(stderr, "%d : %s\n",yylineno, s); return 1;}
+%}
+
+%token DEFINESTRING
+%token PREAMBLESTRING
+%token ATSTRING
+%token STRING
+%token QUOTE
+%token LBRACKET
+%token RBRACKET
+%token LCBRACKET
+%token RCBRACKET
+%token EQUAL
+%token COMMA
+%token HASHSIGN
+%token WHITE
+%token ENDLINE
+%token COMMENT
+%token COMMENTSTRING
+%token LATEXCOMMAND
+
+%start file
+
+%%
+
+file	:	w entries
+	;
+
+entries :	/* empty */
+	|	entry entries
+	|	comment entries
+	;
+
+w	:	/* empty */
+	|	WHITE w
+	|	ENDLINE w
+	;
+
+entry 	: 	ATSTRING w LBRACKET  key COMMA { entry = add_entry(yynodelist, ($1 + sizeof(char)), $4); }
+			 w fields RBRACKET  w  { ; }
+	|	ATSTRING w LCBRACKET key COMMA { entry = add_entry(yynodelist, ($1 + sizeof(char)), $4); }
+			 w fields RCBRACKET w  { ; }
+	|	DEFINESTRING w LCBRACKET key EQUAL w body RCBRACKET w
+					       { add_string(yynodelist, $4, $7); }
+	|	DEFINESTRING w LBRACKET key EQUAL w body RBRACKET w
+					       { add_string(yynodelist, $4, $7); }
+	|	PREAMBLESTRING w LBRACKET body RBRACKET w {add_preamble(yynodelist, $4); }
+	|	PREAMBLESTRING w LCBRACKET body RCBRACKET w {add_preamble(yynodelist, $4); }
+	|	COMMENTSTRING w LBRACKET whatever RBRACKET w  {add_comment(yynodelist, comment_cat($1, $3, $4, $5));}
+	|	COMMENTSTRING w LCBRACKET whatever RCBRACKET w  {add_comment(yynodelist, comment_cat($1, $3, $4, $5));}
+	;
+	
+comment	:	COMMENT ENDLINE w	{add_comment(yynodelist, $1);}
+		|	stringcomment ENDLINE w		{add_comment(yynodelist, $1);}
+		;
+		
+stringcomment : /* empty */	{ $$ = strdup("") ; }
+				| symbol stringcomment { $$ = scat($1, $2); }
+				;
+
+key	:	w STRING w			{ $$ = $2 ; }
+	|	w ATSTRING w			{ $$ = $2 ; }
+	;
+
+fields	:	field
+	|	field fields
+	;
+
+field	:	STRING w EQUAL w body optcomma {add_tag(entry, $1, $5); }
+	;
+
+optcomma:	COMMA w optcomma
+	|	
+	;
+
+body	:	string				{ $$ = $1 ; }
+	|	string HASHSIGN w body		{ $$ = scat( $1, $4 ) ; }
+	;
+
+string 	:	STRING w 			{ $$ = lookup($1) ; }
+	|	ATSTRING w 			{ $$ = $1 ; }
+	|	QUOTE noquote QUOTE w 		{ $$ = $2 ; }
+	|	LCBRACKET balbrack RCBRACKET w 	{ $$ = $2 ; }
+	;
+
+noquote	:	/* Empty */			{ $$ = strdup("") ; }
+	|	noqsym noquote			{ $$ = scat( $1, $2 ) ; }
+	;
+
+noqsym 	: WHITE | ATSTRING | STRING | LBRACKET | RBRACKET | EQUAL | COMMA | HASHSIGN | ENDLINE | COMMENTSTRING | DEFINESTRING | PREAMBLESTRING | LATEXCOMMAND
+	| LCBRACKET w whatever w RCBRACKET { $$ = scat(scat(strdup("{"),$3),strdup("}"));}
+	;
+	
+whatever : /* empty */			{ $$ = strdup("") ; } 
+		| noqsym  whatever	{ $$ = scat( $1, $2 ) ; }
+		| QUOTE whatever	{ $$ = scat( $1, $2 ) ; }
+		;
+	
+symbol : WHITE | ATSTRING | STRING | LBRACKET | RBRACKET | EQUAL | COMMA | HASHSIGN | QUOTE | COMMENTSTRING | DEFINESTRING | PREAMBLESTRING | LATEXCOMMAND
+			| LCBRACKET | RCBRACKET
+			;
+
+balbrack:	/* Empty */			{ $$ = strdup("") ; }
+	|	LCBRACKET balbrack RCBRACKET balbrack
+						{ $$ = scat( $2, $4 ); }
+	|	bbsym balbrack			{ $$ = scat( $1, $2 ); }
+	;
+
+bbsym 	: WHITE | ATSTRING | STRING | LBRACKET | RBRACKET | QUOTE | EQUAL | COMMA | HASHSIGN
+	;
+
+%%
+
+char *comment_cat(char *atstring, char *s_bracket, char *comment, char *e_bracket)
+{
+	char *ret = malloc(strlen(atstring) + strlen(s_bracket) + 
+			strlen(comment) + strlen(e_bracket) + 1);
+	strcpy(ret, atstring);
+	strcat(ret, s_bracket);
+	strcat(ret, comment);
+	strcat(ret, e_bracket);
+	free(atstring);
+	free(s_bracket);
+	free(comment);
+	free(e_bracket);
+	return ret;
+}
+
+char *scat( char *s, char *t )
+{
+  char *z = malloc( strlen( s ) + strlen( t ) + 1 ) ;
+  strcpy( z, s ) ;
+  strcat( z, t ) ;
+  free( s ) ;
+  free( t ) ;
+  return z;
+}
+
+char *stryychar( char alternative )
+{
+    char s[2] ;
+    s[0] = alternative ;
+    s[1] = '\0' ;
+    return strdup( s ) ;
+}
+
+typedef struct strings {
+  struct strings *left, *right ;
+  char *identifier ;
+  char *contents ;
+} tree ;
+
+static tree *root = NULL ;
+
+void insert( tree **root, char *id, char *contents )
+{
+  if( *root == NULL ) {
+    *root = (tree *) malloc( sizeof( tree ) ) ;
+    (*root)->left = NULL ;
+    (*root)->right = NULL ;
+    (*root)->identifier = id ;
+    (*root)->contents = contents ;
+  } else if( strcasecmp( id, (*root)->identifier) < 0 ) {
+    insert( &(*root)->left, id, contents ) ;
+  } else {
+    insert( &(*root)->right, id, contents ) ;
+  }
+}
+
+void define( char *id, char *contents )
+{
+  insert( &root, id, contents ) ;
+}
+
+char *lookup( char *id )
+{
+  tree *s ;
+  int comp ;
+
+  s = root ;
+  while( s != NULL && (comp = strcasecmp( id, s->identifier ) ) != 0 ) {
+    if( comp < 0 ) {
+      s = s->left ;
+    } else {
+      s = s->right ;
+    }
+  }
+  return s == NULL ? id : s->contents ;
+}
+

Added: xfbib/trunk/src/parser_interface.c
===================================================================
--- xfbib/trunk/src/parser_interface.c	                        (rev 0)
+++ xfbib/trunk/src/parser_interface.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,44 @@
+/*
+ *  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 Library 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>
+
+#include "parser_interface.h"
+#include "debug.h"
+#include "entry.h"
+#include "tag.h"
+
+extern int yyparse(void);
+extern FILE *yyin;
+extern int yylineno;
+extern void yysetnodelist(struct node**);
+
+void parse_file(struct xfbib *xfbib)
+{
+	_DEBUG(("parse_file"));
+
+	yysetnodelist(&(xfbib->list));
+	
+	yylineno = 0;
+	yyin = fopen(xfbib->filename, "r");
+
+	if (yyparse() == 0) {
+		_DEBUG(("Parsed successfully"));
+	} else {
+		_DEBUG(("Error parsing file %s", xfbib->filename));
+	}
+	fclose(yyin);
+}

Added: xfbib/trunk/src/parser_interface.h
===================================================================
--- xfbib/trunk/src/parser_interface.h	                        (rev 0)
+++ xfbib/trunk/src/parser_interface.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,20 @@
+/*
+ *  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 Library 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 "xfbib.h"
+
+void parse_file(struct xfbib*);
+

Added: xfbib/trunk/src/preamble.c
===================================================================
--- xfbib/trunk/src/preamble.c	                        (rev 0)
+++ xfbib/trunk/src/preamble.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,51 @@
+/*
+ *  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 Library 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 <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "preamble.h"
+#include "debug.h"
+
+struct preamble *new_preamble(char *value)
+{
+	_DEBUG(("new_preamble"));
+	struct preamble *new = malloc(sizeof(struct preamble));
+	if ((new->value = strdup(value)) == NULL)
+		fprintf(stderr, "Insufficient amount of memory available\n");
+	return new;
+}
+
+void print_preamble(struct preamble *p)
+{
+	_DEBUG(("print_preamble"));
+	write_preamble(p, stdout);
+}
+
+
+void write_preamble(struct preamble *p, FILE *file)
+{
+	_DEBUG(("write_preamble"));
+	fprintf(file, "@preamble{\"%s\"}\n\n", p->value);
+}
+
+void free_preamble(struct preamble *p)
+{
+	_DEBUG(("free_preamble"));
+	free(p->value);
+	free(p);
+}

Added: xfbib/trunk/src/preamble.h
===================================================================
--- xfbib/trunk/src/preamble.h	                        (rev 0)
+++ xfbib/trunk/src/preamble.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,28 @@
+/*
+ *  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 Library 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 __PREAMBLE_H
+#define __PREAMBLE_H
+struct preamble {
+	char *value;
+};
+
+struct preamble *new_preamble(char*);
+void print_preamble(struct preamble*);
+void write_preamble(struct preamble*, FILE*);
+void free_preamble(struct preamble*);
+
+#endif //__PREAMBLE_H

Added: xfbib/trunk/src/save.c
===================================================================
--- xfbib/trunk/src/save.c	                        (rev 0)
+++ xfbib/trunk/src/save.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,31 @@
+/*
+ *  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 Library 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 <gtk/gtk.h>
+
+#include "save.h"
+#include "debug.h"
+#include "xfbib.h"
+#include "node.h"
+
+void save(struct xfbib *xfbib)
+{
+	_DEBUG(("save"));
+	FILE *file = fopen(xfbib->filename, "w");
+	write_list(xfbib->list, file);
+	fclose(file);
+	_DEBUG(("Saving: %s", xfbib->filename));
+}

Added: xfbib/trunk/src/save.h
===================================================================
--- xfbib/trunk/src/save.h	                        (rev 0)
+++ xfbib/trunk/src/save.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,19 @@
+/*
+ *  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 Library 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 "xfbib.h"
+
+void save(struct xfbib *);

Added: xfbib/trunk/src/save_dialog.c
===================================================================
--- xfbib/trunk/src/save_dialog.c	                        (rev 0)
+++ xfbib/trunk/src/save_dialog.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,56 @@
+/*
+ *  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 Library 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 <libintl.h>
+
+#include "xfbib.h"
+#include "save_dialog.h"
+#include "node.h"
+#include "window.h"
+#include "debug.h"
+#include "save.h"
+
+#  define _(String) dgettext (PACKAGE, String)
+#    define N_(String) (String)
+
+void show_save_dialog(struct xfbib *xfbib)
+{
+	_DEBUG(("show_save_dialog"));
+	GtkWidget *dialog;
+
+	dialog = gtk_file_chooser_dialog_new(_("Save As"), NULL, GTK_FILE_CHOOSER_ACTION_SAVE,
+			GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE,
+			GTK_RESPONSE_ACCEPT, NULL);
+
+	GtkFileFilter *filter;
+	filter = gtk_file_filter_new();
+		gtk_file_filter_set_name(filter, (_("BibTeX files")));
+		gtk_file_filter_add_pattern(filter, N_("*.bib"));
+		gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
+	filter = gtk_file_filter_new();
+		gtk_file_filter_set_name(filter, _(("All files")));
+		gtk_file_filter_add_pattern(filter, N_("*"));
+		gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
+
+	if(gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
+		xfbib->filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(dialog));
+		save(xfbib);
+		_DEBUG(("Saving as: %s", xfbib->filename));
+		gtk_window_set_title(GTK_WINDOW(xfbib->window.window), create_title(xfbib));
+	}
+
+	gtk_widget_destroy(dialog);
+}

Added: xfbib/trunk/src/save_dialog.h
===================================================================
--- xfbib/trunk/src/save_dialog.h	                        (rev 0)
+++ xfbib/trunk/src/save_dialog.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,19 @@
+/*
+ *  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 Library 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 "xfbib.h"
+
+void show_save_dialog(struct xfbib *);

Added: xfbib/trunk/src/scrolled_window.c
===================================================================
--- xfbib/trunk/src/scrolled_window.c	                        (rev 0)
+++ xfbib/trunk/src/scrolled_window.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,35 @@
+/*
+ *  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 Library 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 <gtk/gtk.h>
+
+#include "scrolled_window.h"
+#include "debug.h"
+
+GtkWidget *create_scrolled_window(GtkWidget *treeview, int width, int height)
+{
+	_DEBUG(("create_scrolled_window"));
+
+	GtkWidget *scrolled_window;
+	scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
+				    GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+	gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_window), 
+			treeview);
+	gtk_widget_set_size_request (GTK_WIDGET (scrolled_window), width , height);
+
+	return scrolled_window;
+}

Added: xfbib/trunk/src/scrolled_window.h
===================================================================
--- xfbib/trunk/src/scrolled_window.h	                        (rev 0)
+++ xfbib/trunk/src/scrolled_window.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,19 @@
+/*
+ *  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 Library 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 <gtk/gtk.h>
+
+GtkWidget *create_scrolled_window(GtkWidget*, int, int);

Added: xfbib/trunk/src/statusbar.c
===================================================================
--- xfbib/trunk/src/statusbar.c	                        (rev 0)
+++ xfbib/trunk/src/statusbar.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,28 @@
+/*
+ *  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 Library 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 <gtk/gtk.h>
+
+#include "statusbar.h"
+#include "debug.h"
+
+GtkWidget *create_statusbar()
+{
+	_DEBUG(("create_statusbar"));
+	GtkWidget *statusbar;
+	statusbar = gtk_statusbar_new();
+	return statusbar;
+}

Added: xfbib/trunk/src/statusbar.h
===================================================================
--- xfbib/trunk/src/statusbar.h	                        (rev 0)
+++ xfbib/trunk/src/statusbar.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,19 @@
+/*
+ *  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 Library 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 <gtk/gtk.h>
+
+GtkWidget *create_statusbar(void);

Added: xfbib/trunk/src/string_edit_dialog.c
===================================================================
--- xfbib/trunk/src/string_edit_dialog.c	                        (rev 0)
+++ xfbib/trunk/src/string_edit_dialog.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,81 @@
+/*
+ *  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 Library 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 <gtk/gtk.h>
+#include <libxfcegui4/libxfcegui4.h>
+
+#include "debug.h"
+#include "strings.h"
+
+#define VARIABLE 0
+#define VALUE 1
+
+static void set_entry_text(GtkEntry *entry, char *text)
+{
+	_DEBUG(("set_entry_text"));
+	if (text != NULL && entry != NULL)
+		gtk_entry_set_text(entry, text);
+}
+
+
+void show_string_edit_dialog(struct xfbib *xfbib, struct string *selected)
+{
+	_DEBUG(("show_string_edit_dialog"));
+
+	GtkWidget *dialog, *hbox[2], *label[2], *entry[2];
+	int i;
+	const char *label_strings[] = {"Variable name: ", "Value: "};
+
+	xfce_textdomain (PACKAGE, LOCALEDIR, "ISO-8859-1");
+	dialog = xfce_titled_dialog_new_with_buttons ((selected == NULL) ? _("Add variable") : _("Edit variable"), NULL,
+						GTK_DIALOG_MODAL,
+						GTK_STOCK_OK, GTK_RESPONSE_OK,
+						GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+						NULL);
+	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+	
+	gtk_window_set_icon_name(GTK_WINDOW(dialog), "xfbib");
+	
+	
+	for (i = 0; i < 2; i++) {
+		hbox[i] = gtk_hbox_new(FALSE, 10);
+		label[i] = gtk_label_new(label_strings[i]);
+		entry[i] = gtk_entry_new();
+		gtk_box_pack_start (GTK_BOX (hbox[i]), label[i], FALSE, FALSE, 10);
+		gtk_box_pack_end (GTK_BOX (hbox[i]), entry[i], FALSE, FALSE, 10);
+		gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox[i], FALSE, FALSE, 10);
+	}
+
+	
+	if (selected != NULL) {
+		set_entry_text(GTK_ENTRY(entry[VARIABLE]), selected->variable);
+		set_entry_text(GTK_ENTRY(entry[VALUE]), selected->value);
+	}
+	
+	
+	gtk_widget_show_all(dialog);
+
+	if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) {
+		_DEBUG(("Response OK"));
+		change_variable(selected, gtk_entry_get_text(GTK_ENTRY(entry[VARIABLE])));
+		change_value(selected, gtk_entry_get_text(GTK_ENTRY(entry[VALUE])));
+	
+	} else {
+		_DEBUG(("Response Cancel"));
+	}
+	gtk_widget_destroy (dialog);
+
+}

Added: xfbib/trunk/src/string_edit_dialog.h
===================================================================
--- xfbib/trunk/src/string_edit_dialog.h	                        (rev 0)
+++ xfbib/trunk/src/string_edit_dialog.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,21 @@
+/*
+ *  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 Library 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 "xfbib.h"
+#include "strings.h"
+
+void show_string_edit_dialog(struct xfbib*, struct string*);
+

Added: xfbib/trunk/src/strings.c
===================================================================
--- xfbib/trunk/src/strings.c	                        (rev 0)
+++ xfbib/trunk/src/strings.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,70 @@
+/*
+ *  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 Library 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 <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "strings.h"
+#include "debug.h"
+
+struct string *new_string(char *variable, char *value)
+{
+	_DEBUG(("new_string"));
+	struct string *new = malloc(sizeof(struct string));
+	if ((new->variable = strdup(variable)) == NULL)
+		fprintf(stderr, "Insufficient amount of memory available\n");
+	if ((new->value = strdup(value)) == NULL)
+		fprintf(stderr, "Insufficient amount of memory available\n");
+	return new;
+}
+
+void print_string(struct string *s)
+{
+	_DEBUG(("print_string"));
+	write_string(s, stdout);
+}
+
+void write_string(struct string *s, FILE *file)
+{
+	_DEBUG(("write_string"));
+	fprintf(file, "@String {%s = \"%s\"}\n\n", s->variable, s->value);
+}
+
+static void change(char *old, char *new)
+{
+	free(old);
+	if ((old = strdup(new)) == NULL)
+		fprintf(stderr, "Insufficient amount of memory available\n");
+}
+
+void change_variable(struct string *s,char *variable) 
+{
+	change(s->variable, variable);
+}
+
+void change_value(struct string *s, char *value)
+{
+	change(s->value, value);
+}
+
+void free_string(struct string *s)
+{
+	_DEBUG(("free_string"));
+	free(s->variable);
+	free(s->value);
+	free(s);
+}

Added: xfbib/trunk/src/strings.h
===================================================================
--- xfbib/trunk/src/strings.h	                        (rev 0)
+++ xfbib/trunk/src/strings.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,32 @@
+/*
+ *  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 Library 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 __STRING_H
+#define __STRING_H
+#include <stdio.h>
+struct string {
+	char *variable;
+	char *value;
+};
+
+struct string *new_string(char*, char*); 
+void print_string(struct string*);
+void write_string(struct string*, FILE*);
+void free_string(struct string*);
+void change_variable(struct string*,char*);
+void change_value(struct string*, char*);
+
+#endif //__STRING_H

Added: xfbib/trunk/src/tag.c
===================================================================
--- xfbib/trunk/src/tag.c	                        (rev 0)
+++ xfbib/trunk/src/tag.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,78 @@
+/*
+ *  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 Library 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 <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "tag.h"
+#include "debug.h"
+
+
+void new_tag(struct tag **tags, char *name, char *value)
+{
+	_DEBUG(("new_tag"));
+	if (*tags == NULL) {
+		struct tag *new = malloc(sizeof(struct tag));
+		if ((new->name = strdup(name)) == NULL)
+			fprintf(stderr, "Insufficient amount of memory available\n");
+		if ((new->value = strdup(value)) == NULL)
+			fprintf(stderr, "Insufficient amount of memory available\n");
+		new->next = NULL;
+		*tags = new;
+	} else {
+		new_tag(&((*tags)->next), name, value);
+	}
+}
+
+void print_tags(struct tag *tags)
+{
+	_DEBUG(("print_tags"));
+	write_tags(tags, stdout);
+}
+
+void write_tags(struct tag *tags, FILE *file)
+{
+	_DEBUG(("write_tags"));
+	struct tag *t;
+	for (t = tags; t != NULL; t = t->next) {
+		fprintf(file, "\t%s = \"%s\",\n", t->name, t->value);
+	}
+}
+
+
+void free_tags(struct tag* t)
+{
+	_DEBUG(("free_tags"));
+	if (t != NULL) {
+		free_tags(t->next);
+		free(t->name);
+		free(t->value);
+		free(t);		
+	}
+}
+
+char *get_value(struct tag *tags, char *name)
+{
+	_DEBUG(("get_value"));
+	struct tag *t;
+	for (t = tags; t != NULL; t = t->next) {
+		if (strcasecmp(t->name, name) == 0) {
+			return t->value;
+		}
+	}
+	return NULL;
+}

Added: xfbib/trunk/src/tag.h
===================================================================
--- xfbib/trunk/src/tag.h	                        (rev 0)
+++ xfbib/trunk/src/tag.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,31 @@
+/*
+ *  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 Library 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 __TAG_H
+#define __TAG_H
+struct tag {
+	char *name;
+	char *value;
+	struct tag *next;
+};
+
+void new_tag(struct tag**, char*, char*);
+void print_tags(struct tag*);
+void write_tags(struct tag*, FILE*);
+void free_tags(struct tag*);
+char *get_value(struct tag*, char*);
+
+#endif //__TAG_H

Added: xfbib/trunk/src/toolbar.c
===================================================================
--- xfbib/trunk/src/toolbar.c	                        (rev 0)
+++ xfbib/trunk/src/toolbar.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,141 @@
+/*
+ *  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 Library 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 <gtk/gtk.h>
+
+#include "toolbar.h"
+#include "about_dialog.h"
+#include "entry_edit_dialog.h"
+#include "save_dialog.h"
+#include "open_dialog.h"
+#include "node.h"
+#include "treeview.h"
+#include "save.h"
+#include "debug.h"
+
+
+static void toolbar_open_event_handler (struct xfbib *xfbib)
+{
+	_DEBUG(("toolbar_open_event_handler"));
+	show_open_dialog(xfbib);
+}
+static void toolbar_save_event_handler (struct xfbib *xfbib)
+{
+	_DEBUG(("toolbar_save_event_handler"));
+	if (xfbib->filename == NULL) {
+		/* Use save as*/
+		_DEBUG(("No file open, opening save as dialog"));
+		show_save_dialog(xfbib);
+	} else {
+		_DEBUG(("Saving data"));
+		save(xfbib);
+	}
+}
+/*
+static void toolbar_edit_event_handler (struct xfbib *xfbib)
+{
+	_DEBUG(("toolbar_edit_event_handler"));
+	show_edit_dialog(&xfbib, NULL);
+}
+*/
+static void toolbar_add_event_handler (struct xfbib *xfbib)
+{
+	_DEBUG(("toolbar_add_event_handler"));
+	show_entry_edit_dialog(xfbib, NULL);
+	//add_to_treeview(xfbib);
+}
+
+static void toolbar_remove_event_handler (struct xfbib *xfbib)
+{
+	_DEBUG(("toolbar_remove_event_handler"));
+	struct node *node;
+	GtkTreeSelection *selection;
+	GtkTreeModel     *model;
+	GtkTreeIter       iter;
+
+	/* This will only work in single or browse selection mode! */
+
+	selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(xfbib->window.main_treeview));
+	if (gtk_tree_selection_get_selected(selection, &model, &iter)) {
+		gtk_tree_model_get (model, &iter, COLUMN_ENTRY, &node, -1);
+		remove_node(&(xfbib->list), node);
+	} else {
+		_DEBUG(("No row selected"));
+	}
+	update_treeview(xfbib);
+}
+
+static void toolbar_about_event_handler (GtkWidget *window)
+{
+	_DEBUG(("toolbar_about_event_handler"));
+	show_about_dialog();
+}
+
+
+GtkWidget *create_toolbar(struct xfbib *xfbib)
+{
+	_DEBUG(("create_toolbar"));
+	GtkWidget *toolbar;
+	struct {
+		GtkToolItem *open;
+		GtkToolItem *save;
+	/*
+		GtkToolItem *edit;
+	*/
+		GtkToolItem *add;
+		GtkToolItem *remove;
+		GtkToolItem *about;
+	} toolitems;
+
+	/* Create and add toolbar */
+	toolbar = gtk_toolbar_new();
+	gtk_toolbar_set_orientation (GTK_TOOLBAR (toolbar), GTK_ORIENTATION_HORIZONTAL);
+
+	toolitems.open = gtk_tool_button_new_from_stock(GTK_STOCK_OPEN);
+	toolitems.save = gtk_tool_button_new_from_stock(GTK_STOCK_SAVE);
+	/*
+	toolitems.edit = gtk_tool_button_new_from_stock(GTK_STOCK_EDIT);
+	*/
+	toolitems.add = gtk_tool_button_new_from_stock(GTK_STOCK_ADD);
+	toolitems.remove = gtk_tool_button_new_from_stock(GTK_STOCK_REMOVE);
+	toolitems.about = gtk_tool_button_new_from_stock(GTK_STOCK_ABOUT);
+	
+	g_signal_connect_swapped(G_OBJECT(toolitems.open),
+			"clicked", G_CALLBACK(toolbar_open_event_handler), xfbib);
+	g_signal_connect_swapped(G_OBJECT(toolitems.save),
+			"clicked", G_CALLBACK(toolbar_save_event_handler), xfbib);
+	/*
+	g_signal_connect_swapped(G_OBJECT(toolitems.edit),
+			"clicked", G_CALLBACK(toolbar_edit_event_handler), xfbib);
+	*/
+	g_signal_connect_swapped(G_OBJECT(toolitems.add),
+			"clicked", G_CALLBACK(toolbar_add_event_handler), xfbib);
+	g_signal_connect_swapped(G_OBJECT(toolitems.remove),
+			"clicked", G_CALLBACK(toolbar_remove_event_handler), xfbib);
+	g_signal_connect_swapped(G_OBJECT(toolitems.about),
+			"clicked", G_CALLBACK(toolbar_about_event_handler), NULL);
+
+	gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitems.open, 0);
+	gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitems.save, 1);
+	//gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitems.edit, );
+	gtk_toolbar_insert (GTK_TOOLBAR (toolbar), gtk_separator_tool_item_new(), 2);
+	gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitems.add, 3);
+	gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitems.remove, 4);
+	gtk_toolbar_insert (GTK_TOOLBAR (toolbar), gtk_separator_tool_item_new(), 5);
+	gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitems.about, 6);
+
+	return toolbar;
+}

Added: xfbib/trunk/src/toolbar.h
===================================================================
--- xfbib/trunk/src/toolbar.h	                        (rev 0)
+++ xfbib/trunk/src/toolbar.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,20 @@
+/*
+ *  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 Library 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 <gtk/gtk.h>
+#include "xfbib.h"
+
+GtkWidget *create_toolbar(struct xfbib*);

Added: xfbib/trunk/src/treeview.c
===================================================================
--- xfbib/trunk/src/treeview.c	                        (rev 0)
+++ xfbib/trunk/src/treeview.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,158 @@
+/*
+ *  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 Library 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 <gtk/gtk.h>
+#include <libintl.h>
+
+#include "treeview.h"
+#include "xfbib.h"
+#include "entry_edit_dialog.h"
+#include "string_edit_dialog.h"
+#include "node.h"
+#include "strings.h"
+#include "debug.h"
+
+#  define _(String) dgettext (PACKAGE, String)
+
+static void main_row_activated_event (GtkTreeView *view, GtkTreePath *path,
+		GtkTreeViewColumn *column, gpointer xfbib)
+{
+	_DEBUG(("main_row_activated_event"));
+	struct node *node;
+	GtkTreeIter iter;
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+
+	if (gtk_tree_model_get_iter(model, &iter, path)) {
+		gtk_tree_model_get(model, &iter, COLUMN_ENTRY, &node, -1);
+		if (node->node_type == ENTRY_NODE) {
+			show_entry_edit_dialog(xfbib, node->node);
+		} else {
+			_DEBUG(("Not an entry in main list"));
+		}
+	}
+}
+
+
+static void var_row_activated_event (GtkTreeView *view, GtkTreePath *path,
+		GtkTreeViewColumn *column, gpointer xfbib)
+{
+	_DEBUG(("var_row_activated_event"));
+	struct node *node;
+	GtkTreeIter iter;
+	GtkTreeModel *model = gtk_tree_view_get_model(view);
+
+	if (gtk_tree_model_get_iter(model, &iter, path)) {
+		gtk_tree_model_get(model, &iter, VAR_COLUMN_STRING, &node, -1);
+		if (node->node_type == STRING_NODE) {
+			show_string_edit_dialog(xfbib, node->node);
+		} else {
+			_DEBUG(("Not a string in variable list"));
+		}
+	}
+}
+
+GtkWidget *create_variable_treeview(struct xfbib *xfbib)
+{
+	_DEBUG(("create_variable_treeview"));
+	GtkWidget *treeview;
+	GtkListStore *list;
+	GtkCellRenderer *renderer;
+	GtkTreeViewColumn *column;
+
+	treeview = gtk_tree_view_new();
+
+	gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE);
+
+	g_signal_connect(treeview, "row-activated", (GCallback) var_row_activated_event, xfbib);
+
+        renderer = gtk_cell_renderer_text_new();
+        column = gtk_tree_view_column_new_with_attributes(_("Variable"), renderer, "text", 0, NULL);
+        gtk_tree_view_column_set_resizable(GTK_TREE_VIEW_COLUMN(column), TRUE);
+        gtk_tree_view_column_set_min_width(GTK_TREE_VIEW_COLUMN(column), 100);
+    	gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column);
+
+	list = gtk_list_store_new (VAR_N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER);
+
+	gtk_tree_view_set_model(GTK_TREE_VIEW(treeview), GTK_TREE_MODEL(list));
+	return treeview; 
+}
+
+GtkWidget *create_main_treeview(struct xfbib *xfbib)
+{
+	_DEBUG(("create_main_treeview"));
+	GtkWidget *treeview;
+	GtkListStore *list;
+	GtkCellRenderer *renderer;
+	GtkTreeViewColumn *column;
+
+	int n;
+
+	treeview = gtk_tree_view_new();
+
+	gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE);
+
+	g_signal_connect(treeview, "row-activated", (GCallback) main_row_activated_event, xfbib);
+
+    char *fields[4]= {_("Key"),_("Type"),_("Author"),_("Title")};
+    for (n = 0; n < 4; n++) {
+        renderer = gtk_cell_renderer_text_new();
+        column = gtk_tree_view_column_new_with_attributes(fields[n], renderer, "text", n, NULL);
+        gtk_tree_view_column_set_resizable(GTK_TREE_VIEW_COLUMN(column), TRUE);
+        gtk_tree_view_column_set_min_width(GTK_TREE_VIEW_COLUMN(column), 100);
+    	gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column);
+    }
+
+	list = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER);
+
+	gtk_tree_view_set_model(GTK_TREE_VIEW(treeview), GTK_TREE_MODEL(list));
+	return treeview; 
+}	
+
+void update_treeview(struct xfbib *xfbib)
+{
+	_DEBUG(("add_to_treeview"));
+	GtkTreeIter iter;
+	struct node *n;
+	struct entry *e;
+	struct string *s;
+	
+	GtkListStore *main_list = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(xfbib->window.main_treeview)));
+	GtkListStore *var_list = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(xfbib->window.variable_treeview)));
+	
+	gtk_list_store_clear (main_list);
+	gtk_list_store_clear (var_list);
+
+	for (n = xfbib->list; n != NULL; n = n->next) {
+		switch(n->node_type) {
+			case ENTRY_NODE:
+				e = n->node;	
+				gtk_list_store_append(main_list, &iter);	
+				gtk_list_store_set (main_list, &iter, COLUMN_KEY, e->key, -1);
+				gtk_list_store_set (main_list, &iter, COLUMN_TYPE, e->type, -1);
+				gtk_list_store_set (main_list, &iter, COLUMN_AUTHOR, get_tag_value(e,"author"), -1);
+				gtk_list_store_set (main_list, &iter, COLUMN_TITLE, get_tag_value(e, "title"), -1);
+				gtk_list_store_set (main_list, &iter, COLUMN_ENTRY, n, -1);
+				break;
+			case STRING_NODE:
+				s = n->node;
+				gtk_list_store_append(var_list, &iter);	
+				gtk_list_store_set (var_list, &iter, VAR_COLUMN_NAME, s->variable, -1);
+				gtk_list_store_set (var_list, &iter, VAR_COLUMN_STRING, n, -1);
+				break;
+		}
+		
+	}
+}

Added: xfbib/trunk/src/treeview.h
===================================================================
--- xfbib/trunk/src/treeview.h	                        (rev 0)
+++ xfbib/trunk/src/treeview.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,37 @@
+/*
+ *  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 Library 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 <gtk/gtk.h>
+#include "xfbib.h"
+
+enum {
+  COLUMN_KEY = 0,
+  COLUMN_TYPE,
+  COLUMN_AUTHOR,
+  COLUMN_TITLE,
+  COLUMN_ENTRY,
+  N_COLUMNS
+};
+
+enum {
+	VAR_COLUMN_NAME = 0,
+	VAR_COLUMN_STRING,
+	VAR_N_COLUMNS
+};
+
+GtkWidget *create_main_treeview(struct xfbib*);
+GtkWidget *create_variable_treeview(struct xfbib*);
+void update_treeview(struct xfbib*);

Added: xfbib/trunk/src/window.c
===================================================================
--- xfbib/trunk/src/window.c	                        (rev 0)
+++ xfbib/trunk/src/window.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,107 @@
+/*
+ *  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 Library 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>
+#else
+#define PACKAGE_NAME  "Xfbib"
+#endif
+
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include <string.h>
+
+#include "debug.h"
+#include "window.h"
+#include "xfbib.h"
+#include "menubar.h"
+#include "toolbar.h"
+#include "node.h"
+#include "scrolled_window.h"
+#include "statusbar.h"
+#include "treeview.h"
+
+static gboolean delete_event_handler (GtkWidget *widget, GdkEvent *event, struct xfbib *xfbib)
+{
+	_DEBUG(("delete_event_handler"));
+	free_list(xfbib->list);
+	gtk_main_quit();
+	return FALSE;
+}
+
+GtkWidget *create_window(struct xfbib *xfbib)
+{
+	_DEBUG(("create_window"));
+	
+	xfbib->window.window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+
+	gtk_window_set_title(GTK_WINDOW(xfbib->window.window), PACKAGE_NAME);
+
+	gtk_widget_set_size_request(GTK_WIDGET(xfbib->window.window), 600, 400);
+
+	g_signal_connect(xfbib->window.window, "delete_event",
+			G_CALLBACK(delete_event_handler), xfbib);
+
+	xfbib->window.menubar = create_menubar(xfbib);
+	xfbib->window.toolbar = create_toolbar(xfbib);
+	xfbib->window.variable_treeview = create_variable_treeview(xfbib);
+	xfbib->window.scrolled_variable_window = create_scrolled_window(xfbib->window.variable_treeview, 150,300);
+	xfbib->window.main_treeview = create_main_treeview(xfbib);
+	xfbib->window.scrolled_main_window = create_scrolled_window(xfbib->window.main_treeview, 400, 300);
+	xfbib->window.statusbar = create_statusbar();
+	
+
+	/* Create containers */
+	xfbib->window.hpaned = gtk_hpaned_new();
+
+	gtk_paned_pack1(GTK_PANED(xfbib->window.hpaned), xfbib->window.scrolled_variable_window, TRUE, FALSE);
+	gtk_paned_pack2(GTK_PANED(xfbib->window.hpaned), xfbib->window.scrolled_main_window, TRUE, TRUE);
+	xfbib->window.vbox = gtk_vbox_new(FALSE, 0);
+	gtk_container_add(GTK_CONTAINER(xfbib->window.window), xfbib->window.vbox);
+	gtk_box_pack_start(GTK_BOX(xfbib->window.vbox), xfbib->window.menubar, FALSE, FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(xfbib->window.vbox), xfbib->window.toolbar, FALSE, FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(xfbib->window.vbox), xfbib->window.hpaned, TRUE , TRUE, 0);
+	gtk_box_pack_end(GTK_BOX(xfbib->window.vbox), xfbib->window.statusbar, FALSE, FALSE, 0);
+
+	return xfbib->window.window;
+}
+
+char *create_title(struct xfbib *xfbib)
+{
+	_DEBUG(("create_title"));
+/*	int i, j, length = 0;
+	char *package_name = PACKAGE_NAME;
+	length += strlen(package_name);
+	length += strlen(" - ");
+	length += strlen(xfbib->filename);
+	length ++; //For the NULL sign
+	
+	char *title = malloc(sizeof(char)*length);
+	
+	for(i = 0; i < strlen(package_name); i++) 
+		title[i] = package_name[i];
+
+	title[i] = ' ';
+	title[i+1] = '-';
+	title[i+2] = ' ';
+	
+	for(i = i+3,j = 0; i < length; i++, j++)
+		title[i] = xfbib->filename[j];
+	title[length] = '\0';
+
+	return title;*/
+	return xfbib->filename;
+}

Added: xfbib/trunk/src/window.h
===================================================================
--- xfbib/trunk/src/window.h	                        (rev 0)
+++ xfbib/trunk/src/window.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,21 @@
+/*
+ *  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 Library 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 <gtk/gtk.h>
+#include "xfbib.h"
+
+GtkWidget *create_window(struct xfbib *);
+char *create_title(struct xfbib *);

Added: xfbib/trunk/src/xfbib.c
===================================================================
--- xfbib/trunk/src/xfbib.c	                        (rev 0)
+++ xfbib/trunk/src/xfbib.c	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,55 @@
+/*
+ *  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 Library 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 <stdlib.h>
+#include <libxfcegui4/libxfcegui4.h>
+#include <libintl.h>
+
+#include "window.h"
+#include "entry.h"
+#include "debug.h"
+#include "xfbib.h"
+
+int main(int argc, char **argv)
+{
+	_DEBUG(("main"));
+	
+	setlocale( LC_MESSAGES, "");
+	bindtextdomain( PACKAGE, LOCALEDIR);
+	textdomain (PACKAGE);
+
+	struct xfbib xfbib;
+	
+	gtk_window_set_default_icon_name("xfbib");
+	
+	gtk_init(&argc, &argv);
+
+	xfbib.list = NULL;
+	xfbib.filename = NULL;
+
+	xfbib.window.window = create_window(&xfbib);
+	
+	gtk_widget_show_all(xfbib.window.window);
+
+	gtk_main();
+
+	return EXIT_SUCCESS;
+}

Added: xfbib/trunk/src/xfbib.h
===================================================================
--- xfbib/trunk/src/xfbib.h	                        (rev 0)
+++ xfbib/trunk/src/xfbib.h	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,38 @@
+/*
+ *  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 Library 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 __XFBIB_H
+#define __XFBIB_H
+#include <gtk/gtk.h>
+
+struct xfbib {
+	struct {
+		GtkWidget *window;
+		GtkWidget *vbox;
+		GtkWidget *menubar;
+		GtkWidget *toolbar;
+		GtkWidget *statusbar;
+		GtkWidget *variable_treeview;
+		GtkWidget *scrolled_variable_window;
+		GtkWidget *main_treeview;
+		GtkWidget *scrolled_main_window;
+		GtkWidget *hpaned;
+	}window;
+	struct node *list;
+	char *filename;
+};
+
+#endif //__XFBIB_H

Added: xfbib/trunk/xfbib.desktop
===================================================================
--- xfbib/trunk/xfbib.desktop	                        (rev 0)
+++ xfbib/trunk/xfbib.desktop	2008-02-18 20:45:31 UTC (rev 3968)
@@ -0,0 +1,13 @@
+
+[Desktop Entry]
+Encoding=UTF-8
+Name=Xfbib
+Exec=xfbib
+Icon=xfbib
+Type=Application
+Comment=A BibTeX editor for Xfce
+Terminal=0
+MimeType=text/x-bibtex
+Categories=Application;Office;GTK;
+GenericName=
+StartupNotify=false




More information about the Goodies-commits mailing list