diff --git a/gui/AUTHORS b/gui/AUTHORS new file mode 100644 index 000000000..e69de29bb diff --git a/gui/COPYING b/gui/COPYING new file mode 120000 index 000000000..0b6cbf81b --- /dev/null +++ b/gui/COPYING @@ -0,0 +1 @@ +/usr/share/automake-1.10/COPYING \ No newline at end of file diff --git a/gui/ChangeLog b/gui/ChangeLog new file mode 100644 index 000000000..e69de29bb diff --git a/gui/INSTALL b/gui/INSTALL new file mode 120000 index 000000000..5bb6e7b7e --- /dev/null +++ b/gui/INSTALL @@ -0,0 +1 @@ +/usr/share/automake-1.10/INSTALL \ No newline at end of file diff --git a/gui/Makefile.am b/gui/Makefile.am new file mode 100644 index 000000000..329e83f38 --- /dev/null +++ b/gui/Makefile.am @@ -0,0 +1,24 @@ +## Process this file with automake to produce Makefile.in +## Created by Anjuta + +SUBDIRS = src po + +gtk_lumieradocdir = ${prefix}/doc/gtk-lumiera +gtk_lumieradoc_DATA = \ + README\ + COPYING\ + AUTHORS\ + ChangeLog\ + INSTALL\ + NEWS + +EXTRA_DIST = $(gtk_lumieradoc_DATA) + +# Copy all the spec files. Of cource, only one is actually used. +dist-hook: + for specfile in *.spec; do \ + if test -f $$specfile; then \ + cp -p $$specfile $(distdir); \ + fi \ + done + diff --git a/gui/NEWS b/gui/NEWS new file mode 100644 index 000000000..e69de29bb diff --git a/gui/README b/gui/README new file mode 100644 index 000000000..e69de29bb diff --git a/gui/TODO.tasks b/gui/TODO.tasks new file mode 100644 index 000000000..d1fa282d9 --- /dev/null +++ b/gui/TODO.tasks @@ -0,0 +1,6 @@ + + + + + + diff --git a/gui/autogen.sh b/gui/autogen.sh new file mode 100755 index 000000000..9ab346a30 --- /dev/null +++ b/gui/autogen.sh @@ -0,0 +1,159 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +DIE=0 + +if [ -n "$GNOME2_DIR" ]; then + ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS" + LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH" + PATH="$GNOME2_DIR/bin:$PATH" + export PATH + export LD_LIBRARY_PATH +fi + +(test -f $srcdir/configure.ac) || { + echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" + echo " top-level package directory" + exit 1 +} + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`autoconf' installed." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +(grep "^IT_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && { + (intltoolize --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`intltool' installed." + echo "You can get it from:" + echo " ftp://ftp.gnome.org/pub/GNOME/" + DIE=1 + } +} + +(grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.ac >/dev/null) && { + (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`xml-i18n-toolize' installed." + echo "You can get it from:" + echo " ftp://ftp.gnome.org/pub/GNOME/" + DIE=1 + } +} + +(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { + (libtool --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`libtool' installed." + echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" + DIE=1 + } +} + +(grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.ac >/dev/null) && { + (grep "sed.*POTFILES" $srcdir/configure.ac) > /dev/null || \ + (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`glib' installed." + echo "You can get it from: ftp://ftp.gtk.org/pub/gtk" + DIE=1 + } +} + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`automake' installed." + echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" + DIE=1 + NO_AUTOMAKE=yes +} + + +# if no automake, don't bother testing for aclocal +test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: Missing \`aclocal'. The version of \`automake'" + echo "installed doesn't appear recent enough." + echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +if test "$DIE" -eq 1; then + exit 1 +fi + +if test -z "$*"; then + echo "**Warning**: I am going to run \`configure' with no arguments." + echo "If you wish to pass any to it, please specify them on the" + echo \`$0\'" command line." + echo +fi + +case $CC in +xlc ) + am_opt=--include-deps;; +esac + +for coin in `find $srcdir -path $srcdir/CVS -prune -o -name configure.ac -print` +do + dr=`dirname $coin` + if test -f $dr/NO-AUTO-GEN; then + echo skipping $dr -- flagged as no auto-gen + else + echo processing $dr + ( cd $dr + + aclocalinclude="$ACLOCAL_FLAGS" + + if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then + echo "Creating $dr/aclocal.m4 ..." + test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 + echo "Running glib-gettextize... Ignore non-fatal messages." + echo "no" | glib-gettextize --force --copy + echo "Making $dr/aclocal.m4 writable ..." + test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 + fi + if grep "^IT_PROG_INTLTOOL" configure.ac >/dev/null; then + echo "Running intltoolize..." + intltoolize --copy --force --automake + fi + if grep "^AM_PROG_XML_I18N_TOOLS" configure.ac >/dev/null; then + echo "Running xml-i18n-toolize..." + xml-i18n-toolize --copy --force --automake + fi + if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then + if test -z "$NO_LIBTOOLIZE" ; then + echo "Running libtoolize..." + libtoolize --force --copy + fi + fi + echo "Running aclocal $aclocalinclude ..." + aclocal $aclocalinclude + if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then + echo "Running autoheader..." + autoheader + fi + echo "Running automake --gnu $am_opt ..." + automake --add-missing --gnu $am_opt + echo "Running autoconf ..." + autoconf + ) + fi +done + +conf_flags="--enable-maintainer-mode" + +if test x$NOCONFIGURE = x; then + echo Running $srcdir/configure $conf_flags "$@" ... + $srcdir/configure $conf_flags "$@" \ + && echo Now type \`make\' to compile. || exit 1 +else + echo Skipping configure process. +fi diff --git a/gui/config.h b/gui/config.h new file mode 100644 index 000000000..7b9564f69 --- /dev/null +++ b/gui/config.h @@ -0,0 +1,77 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* always defined to indicate that i18n is enabled */ +#define ENABLE_NLS 1 + +/* GETTEXT package name */ +#define GETTEXT_PACKAGE "gtk-lumiera" + +/* Define to 1 if you have the `bind_textdomain_codeset' function. */ +#define HAVE_BIND_TEXTDOMAIN_CODESET 1 + +/* Define to 1 if you have the `dcgettext' function. */ +#define HAVE_DCGETTEXT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#define HAVE_GETTEXT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if your file defines LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Name of package */ +#define PACKAGE "gtk-lumiera" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "gtk-lumiera" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "gtk-lumiera 0.1" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "gtk-lumiera" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.1" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "0.1" diff --git a/gui/configure.ac b/gui/configure.ac new file mode 100644 index 000000000..9eef896f8 --- /dev/null +++ b/gui/configure.ac @@ -0,0 +1,44 @@ +dnl Process this file with autoconf to produce a configure script. +dnl Created by Anjuta application wizard. + +AC_INIT(gtk-lumiera, 0.1) + +AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) +AM_CONFIG_HEADER(config.h) +AM_MAINTAINER_MODE + +AC_ISC_POSIX +AC_PROG_CXX +AM_PROG_CC_STDC +AC_HEADER_STDC + + + + +dnl *************************************************************************** +dnl Internatinalization +dnl *************************************************************************** +GETTEXT_PACKAGE=gtk-lumiera +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name]) +AM_GLIB_GNU_GETTEXT +IT_PROG_INTLTOOL([0.35.0]) + + + +AM_PROG_LIBTOOL + + + +PKG_CHECK_MODULES(GTK_LUMIERA, [gtkmm-2.4 >= 2.8 libglademm-2.4 >= 2.6 ]) +AC_SUBST(GTK_LUMIERA_CFLAGS) +AC_SUBST(GTK_LUMIERA_LIBS) + + + + +AC_OUTPUT([ +Makefile +src/Makefile +po/Makefile.in +]) diff --git a/gui/gtk-lumiera.anjuta b/gui/gtk-lumiera.anjuta new file mode 100644 index 000000000..8b9268a44 --- /dev/null +++ b/gui/gtk-lumiera.anjuta @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/gui/po/ChangeLog b/gui/po/ChangeLog new file mode 100644 index 000000000..e69de29bb diff --git a/gui/po/LINGUAS b/gui/po/LINGUAS new file mode 100644 index 000000000..bc8cbb0fe --- /dev/null +++ b/gui/po/LINGUAS @@ -0,0 +1,2 @@ +# please keep this list sorted alphabetically +# diff --git a/gui/po/POTFILES.in b/gui/po/POTFILES.in new file mode 100644 index 000000000..a0b3c552e --- /dev/null +++ b/gui/po/POTFILES.in @@ -0,0 +1,3 @@ +# List of source files containing translatable strings. + +src/main.c diff --git a/gui/src/Makefile.am b/gui/src/Makefile.am new file mode 100644 index 000000000..7ae61d803 --- /dev/null +++ b/gui/src/Makefile.am @@ -0,0 +1,27 @@ +## Process this file with automake to produce Makefile.in + +## Created by Anjuta + +gladedir = $(datadir)/gtk-lumiera/glade +glade_DATA = gtk-lumiera.glade + +INCLUDES = \ + -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ + -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \ + -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ + $(GTK_LUMIERA_CFLAGS) + +AM_CFLAGS =\ + -Wall\ + -g + +bin_PROGRAMS = gtk-lumiera + +gtk_lumiera_SOURCES = \ + main.cpp + +gtk_lumiera_LDFLAGS = + +gtk_lumiera_LDADD = $(GTK_LUMIERA_LIBS) + +EXTRA_DIST = $(glade_DATA) diff --git a/gui/src/gtk-lumiera.glade b/gui/src/gtk-lumiera.glade new file mode 100644 index 000000000..8db3bef2c --- /dev/null +++ b/gui/src/gtk-lumiera.glade @@ -0,0 +1,27 @@ + + + + + + + True + Hello World! + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 500 + 400 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + + + + + + + diff --git a/gui/src/main.cpp b/gui/src/main.cpp new file mode 100644 index 000000000..bb69eb3d9 --- /dev/null +++ b/gui/src/main.cpp @@ -0,0 +1,62 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ +/* + * main.cc + * Copyright (C) Joel Holdsworth 2008 + * + * main.cc is free software. + * + * You may 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. + * + * main.cc 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 main.cc. If not, write to: + * The Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + + +#ifdef ENABLE_NLS +# include +#endif + + +/* For testing propose use the local (not installed) glade file */ +/* #define GLADE_FILE PACKAGE_DATA_DIR"/gtk-lumiera/glade/gtk-lumiera.glade" */ +#define GLADE_FILE "gtk-lumiera.glade" + +int +main (int argc, char *argv[]) +{ + Gtk::Main kit(argc, argv); + + //Load the Glade file and instiate its widgets: + Glib::RefPtr refXml; + try + { + refXml = Gnome::Glade::Xml::create(GLADE_FILE); + } + catch(const Gnome::Glade::XmlError& ex) + { + std::cerr << ex.what() << std::endl; + return 1; + } + Gtk::Window* main_win = 0; + refXml->get_widget("main_window", main_win); + if (main_win) + { + kit.run(*main_win); + } + return 0; +}