anjuta-extras r3 - in trunk: . plugins plugins/class-inheritance plugins/indent plugins/profiler plugins/sample1 plugins/scratchbox plugins/valgrind po



Author: jhs
Date: Tue Apr  7 13:46:31 2009
New Revision: 3
URL: http://svn.gnome.org/viewvc/anjuta-extras?rev=3&view=rev

Log:
Integrated scratchbox, indent, profiler, sample1 and class-inheritance into anjuta-extras


Added:
   trunk/plugins/class-inheritance/
   trunk/plugins/class-inheritance/Makefile
   trunk/plugins/class-inheritance/Makefile.am
   trunk/plugins/class-inheritance/Makefile.in
   trunk/plugins/class-inheritance/anjuta-class-inheritance-plugin-48.png   (contents, props changed)
   trunk/plugins/class-inheritance/anjuta-class-inheritance-plugin.svg
   trunk/plugins/class-inheritance/anjuta-class-inheritance.plugin.in
   trunk/plugins/class-inheritance/class-callbacks.c
   trunk/plugins/class-inheritance/class-callbacks.h
   trunk/plugins/class-inheritance/class-inherit.c
   trunk/plugins/class-inheritance/class-inherit.h
   trunk/plugins/class-inheritance/plugin.c
   trunk/plugins/class-inheritance/plugin.h
   trunk/plugins/indent/
   trunk/plugins/indent/Makefile.am
   trunk/plugins/indent/anjuta-indent-plugin.png   (contents, props changed)
   trunk/plugins/indent/anjuta-indent.ui
   trunk/plugins/indent/indent-dialog.c
   trunk/plugins/indent/indent-dialog.h
   trunk/plugins/indent/indent-util.c
   trunk/plugins/indent/indent-util.h
   trunk/plugins/indent/indent.glade
   trunk/plugins/indent/indent.plugin.in
   trunk/plugins/indent/indent_auto.xpm
   trunk/plugins/indent/indent_set.xpm
   trunk/plugins/indent/indent_test.c
   trunk/plugins/indent/plugin.c
   trunk/plugins/indent/plugin.h
   trunk/plugins/profiler/
   trunk/plugins/profiler/Makefile.am
   trunk/plugins/profiler/anjuta-profiler-plugin-48.png   (contents, props changed)
   trunk/plugins/profiler/anjuta-profiler-plugin.svg
   trunk/plugins/profiler/gprof-call-graph-block-entry.c
   trunk/plugins/profiler/gprof-call-graph-block-entry.h
   trunk/plugins/profiler/gprof-call-graph-block.c
   trunk/plugins/profiler/gprof-call-graph-block.h
   trunk/plugins/profiler/gprof-call-graph-view.c
   trunk/plugins/profiler/gprof-call-graph-view.h
   trunk/plugins/profiler/gprof-call-graph.c
   trunk/plugins/profiler/gprof-call-graph.h
   trunk/plugins/profiler/gprof-flat-profile-entry.c
   trunk/plugins/profiler/gprof-flat-profile-entry.h
   trunk/plugins/profiler/gprof-flat-profile-view.c
   trunk/plugins/profiler/gprof-flat-profile-view.h
   trunk/plugins/profiler/gprof-flat-profile.c
   trunk/plugins/profiler/gprof-flat-profile.h
   trunk/plugins/profiler/gprof-function-call-chart-view.c
   trunk/plugins/profiler/gprof-function-call-chart-view.h
   trunk/plugins/profiler/gprof-function-call-tree-view.c
   trunk/plugins/profiler/gprof-function-call-tree-view.h
   trunk/plugins/profiler/gprof-options.c
   trunk/plugins/profiler/gprof-options.h
   trunk/plugins/profiler/gprof-profile-data.c
   trunk/plugins/profiler/gprof-profile-data.h
   trunk/plugins/profiler/gprof-view-manager-iface.h
   trunk/plugins/profiler/gprof-view-manager.c
   trunk/plugins/profiler/gprof-view-manager.h
   trunk/plugins/profiler/gprof-view.c
   trunk/plugins/profiler/gprof-view.h
   trunk/plugins/profiler/main.c
   trunk/plugins/profiler/plugin.c
   trunk/plugins/profiler/plugin.h
   trunk/plugins/profiler/profiler-call-graph.glade
   trunk/plugins/profiler/profiler-flat-profile.glade
   trunk/plugins/profiler/profiler-function-call-tree.glade
   trunk/plugins/profiler/profiler.glade
   trunk/plugins/profiler/profiler.plugin.in
   trunk/plugins/profiler/profiler.ui
   trunk/plugins/profiler/string-utils.c
   trunk/plugins/profiler/string-utils.h
   trunk/plugins/sample1/
   trunk/plugins/sample1/Makefile
   trunk/plugins/sample1/Makefile.am
   trunk/plugins/sample1/Makefile.in
   trunk/plugins/sample1/anjuta-sample-plugin-48.png   (contents, props changed)
   trunk/plugins/sample1/anjuta-sample-plugin.svg
   trunk/plugins/sample1/anjuta-sample.plugin
   trunk/plugins/sample1/anjuta-sample.plugin.in
   trunk/plugins/sample1/anjuta-sample.ui
   trunk/plugins/sample1/plugin.c
   trunk/plugins/sample1/plugin.h
   trunk/plugins/scratchbox/
   trunk/plugins/scratchbox/Makefile
   trunk/plugins/scratchbox/Makefile.am
   trunk/plugins/scratchbox/Makefile.in
   trunk/plugins/scratchbox/anjuta-scratchbox-48.png   (contents, props changed)
   trunk/plugins/scratchbox/anjuta-scratchbox-panel.png   (contents, props changed)
   trunk/plugins/scratchbox/anjuta-scratchbox.glade
   trunk/plugins/scratchbox/anjuta-scratchbox.plugin.in
   trunk/plugins/scratchbox/plugin.c
   trunk/plugins/scratchbox/plugin.h
   trunk/plugins/valgrind/
   trunk/plugins/valgrind/Makefile
   trunk/plugins/valgrind/Makefile.am
   trunk/plugins/valgrind/Makefile.in
   trunk/plugins/valgrind/anjuta-valgrind-plugin-48.png   (contents, props changed)
   trunk/plugins/valgrind/anjuta-valgrind-plugin.svg
   trunk/plugins/valgrind/anjuta-valgrind.glade
   trunk/plugins/valgrind/anjuta-valgrind.plugin.in
   trunk/plugins/valgrind/anjuta-valgrind.schemas
   trunk/plugins/valgrind/anjuta-valgrind.ui
   trunk/plugins/valgrind/bugged-prg-test.c
   trunk/plugins/valgrind/ldd.c
   trunk/plugins/valgrind/ldd.h
   trunk/plugins/valgrind/list.c
   trunk/plugins/valgrind/list.h
   trunk/plugins/valgrind/menu-utils.c
   trunk/plugins/valgrind/menu-utils.h
   trunk/plugins/valgrind/parser.c
   trunk/plugins/valgrind/parser.h
   trunk/plugins/valgrind/plugin.c
   trunk/plugins/valgrind/plugin.h
   trunk/plugins/valgrind/preferences.c
   trunk/plugins/valgrind/preferences.h
   trunk/plugins/valgrind/process.c
   trunk/plugins/valgrind/process.h
   trunk/plugins/valgrind/symtab.c
   trunk/plugins/valgrind/symtab.h
   trunk/plugins/valgrind/vgactions.c
   trunk/plugins/valgrind/vgactions.h
   trunk/plugins/valgrind/vgcachegrindprefs.c
   trunk/plugins/valgrind/vgcachegrindprefs.h
   trunk/plugins/valgrind/vgdefaultview.c
   trunk/plugins/valgrind/vgdefaultview.h
   trunk/plugins/valgrind/vgerror.c
   trunk/plugins/valgrind/vgerror.h
   trunk/plugins/valgrind/vggeneralprefs.c
   trunk/plugins/valgrind/vggeneralprefs.h
   trunk/plugins/valgrind/vghelgrindprefs.c
   trunk/plugins/valgrind/vghelgrindprefs.h
   trunk/plugins/valgrind/vgio.c
   trunk/plugins/valgrind/vgio.h
   trunk/plugins/valgrind/vgmarshal.c
   trunk/plugins/valgrind/vgmarshal.h
   trunk/plugins/valgrind/vgmarshal.list
   trunk/plugins/valgrind/vgmemcheckprefs.c
   trunk/plugins/valgrind/vgmemcheckprefs.h
   trunk/plugins/valgrind/vgrule-editor.c
   trunk/plugins/valgrind/vgrule-editor.h
   trunk/plugins/valgrind/vgrule-list.c
   trunk/plugins/valgrind/vgrule-list.h
   trunk/plugins/valgrind/vgrule.c
   trunk/plugins/valgrind/vgrule.h
   trunk/plugins/valgrind/vgrulepattern.c
   trunk/plugins/valgrind/vgrulepattern.h
   trunk/plugins/valgrind/vgsearchbar.c
   trunk/plugins/valgrind/vgsearchbar.h
   trunk/plugins/valgrind/vgstrpool.c
   trunk/plugins/valgrind/vgstrpool.h
   trunk/plugins/valgrind/vgtoolprefs.c
   trunk/plugins/valgrind/vgtoolprefs.h
   trunk/plugins/valgrind/vgtoolview.c
   trunk/plugins/valgrind/vgtoolview.h
Modified:
   trunk/Makefile
   trunk/aclocal.m4
   trunk/configure
   trunk/configure.ac
   trunk/plugins/Makefile.am
   trunk/po/POTFILES

Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile	(original)
+++ trunk/Makefile	Tue Apr  7 13:46:31 2009
@@ -38,7 +38,7 @@
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in $(srcdir)/config.h.in \
 	$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
-	config.guess config.sub install-sh ltmain.sh missing
+	config.guess config.sub depcomp install-sh ltmain.sh missing
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
@@ -76,17 +76,16 @@
 AMDEP_FALSE = #
 AMDEP_TRUE = 
 AMTAR = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run tar
-ANJUTA_EXTRAS_CFLAGS = -DORBIT2=1 -pthread -D_REENTRANT -I/usr/include/libanjuta-1.0 -I/usr/include/libgnomeui-2.0 -I/usr/include/libglade-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/directfb -I/usr/include/libpng12  
-ANJUTA_EXTRAS_LIBS = -pthread -lanjuta -lgnomeui-2 -lSM -lICE -lglade-2.0 -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgconf-2 -lgthread-2.0 -lrt -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0  
 AR = ar
 AUTOCONF = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoconf
 AUTOHEADER = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoheader
 AUTOMAKE = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run automake-1.9
 AWK = mawk
+BINUTILS_REQUIRED = 2.15.92
 CATALOGS = 
 CATOBJEXT = .gmo
 CC = gcc
-CCDEPMODE = depmode=none
+CCDEPMODE = depmode=gcc3
 CFLAGS = -g -O2
 CPP = gcc -E
 CPPFLAGS = 
@@ -101,11 +100,23 @@
 ECHO_T = 
 EGREP = /bin/grep -E
 EXEEXT = 
+EXTRA_CFLAGS = -DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/$(PACKAGE)"\" -DPACKAGE_LIB_DIR=\""$(pkglibdir)"\" -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"
 FGREP = /bin/grep -F
+GCONFTOOL = /usr/bin/gconftool-2
+GCONF_SCHEMAS_INSTALL_FALSE = #
+GCONF_SCHEMAS_INSTALL_TRUE = 
+GCONF_SCHEMA_CONFIG_SOURCE = xml:merged:/etc/gconf/gconf.xml.defaults
+GCONF_SCHEMA_FILE_DIR = $(sysconfdir)/gconf/schemas
 GETTEXT_PACKAGE = anjuta-extras
 GMOFILES = 
 GMSGFMT = /usr/bin/msgfmt
+GRAPHVIZ_CFLAGS = -I/usr/include/graphviz  
+GRAPHVIZ_LIBS = -lgvc -lgraph -lcdt  
 GREP = /bin/grep
+HAVE_GRAPHVIZ_FALSE = #
+HAVE_GRAPHVIZ_TRUE = 
+HAVE_PLUGIN_VALGRIND_FALSE = #
+HAVE_PLUGIN_VALGRIND_TRUE = 
 INSTALL_DATA = ${INSTALL} -m 644
 INSTALL_PROGRAM = ${INSTALL}
 INSTALL_SCRIPT = ${INSTALL}
@@ -137,6 +148,9 @@
 INTLTOOL_XML_RULE = %.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
 LD = /usr/bin/ld -m elf_x86_64
 LDFLAGS = 
+LIBANJUTA_CFLAGS = -DORBIT2=1 -pthread -D_REENTRANT -I/usr/include/libanjuta-1.0 -I/usr/include/libgnomeui-2.0 -I/usr/include/libglade-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/directfb -I/usr/include/libpng12  
+LIBANJUTA_LIBS = -pthread -lanjuta -lgnomeui-2 -lSM -lICE -lglade-2.0 -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgconf-2 -lgthread-2.0 -lrt -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0  
+LIBGRAPHVIZ_REQUIRED = 1.0
 LIBOBJS = 
 LIBS = 
 LIBTOOL = $(SHELL) $(top_builddir)/libtool
@@ -165,6 +179,7 @@
 PACKAGE_VERSION = 2.27.0
 PATH_SEPARATOR = :
 PKG_CONFIG = /usr/bin/pkg-config
+PLUGIN_VALGRIND_LIBS = -Wl,-Bstatic -lbfd -liberty -Wl,-Bdynamic
 POFILES = 
 POSUB = po
 PO_IN_DATADIR_FALSE = 
@@ -179,13 +194,20 @@
 XGETTEXT = /usr/bin/xgettext
 ac_ct_CC = gcc
 ac_ct_DUMPBIN = 
-am__fastdepCC_FALSE = 
-am__fastdepCC_TRUE = #
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE = 
 am__include = include
 am__leading_dot = .
 am__quote = 
 am__tar = ${AMTAR} chof - "$$tardir"
 am__untar = ${AMTAR} xf -
+anjuta_data_dir = $(anjutadatadir)/anjuta
+anjuta_glade_dir = $(anjutadatadir)/anjuta/glade
+anjuta_image_dir = $(anjutadatadir)/pixmaps/anjuta
+anjuta_plugin_dir = $(anjutalibdir)/anjuta
+anjuta_ui_dir = $(anjutadatadir)/anjuta/ui
+anjutadatadir = /usr/share
+anjutalibdir = /usr/lib
 bindir = ${exec_prefix}/bin
 build = x86_64-unknown-linux-gnu
 build_alias = 

Modified: trunk/aclocal.m4
==============================================================================
--- trunk/aclocal.m4	(original)
+++ trunk/aclocal.m4	Tue Apr  7 13:46:31 2009
@@ -11,6 +11,50 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+dnl AM_GCONF_SOURCE_2
+dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
+dnl  (i.e. pass to gconftool-2
+dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
+dnl  you should install foo.schemas files
+dnl
+
+AC_DEFUN([AM_GCONF_SOURCE_2],
+[
+  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
+    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
+  else
+    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
+  fi
+
+  AC_ARG_WITH([gconf-source],
+	      AC_HELP_STRING([--with-gconf-source=sourceaddress],
+			     [Config database for installing schema files.]),
+	      [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
+
+  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
+  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
+
+  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
+    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
+  fi
+
+  AC_ARG_WITH([gconf-schema-file-dir],
+	      AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
+			     [Directory for installing schema files.]),
+	      [GCONF_SCHEMA_FILE_DIR="$withval"],)
+
+  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
+  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
+
+  AC_ARG_ENABLE(schemas-install,
+     [  --disable-schemas-install	Disable the schemas installation],
+     [case ${enableval} in
+       yes|no) ;;
+       *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
+      esac])
+  AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
+])
+
 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
 #

Modified: trunk/configure
==============================================================================
--- trunk/configure	(original)
+++ trunk/configure	Tue Apr  7 13:46:31 2009
@@ -785,8 +785,28 @@
 
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
-ANJUTA_EXTRAS_LIBS
-ANJUTA_EXTRAS_CFLAGS
+EXTRA_CFLAGS
+anjuta_image_dir
+anjuta_glade_dir
+anjuta_ui_dir
+anjuta_data_dir
+anjuta_plugin_dir
+anjutadatadir
+anjutalibdir
+GCONF_SCHEMAS_INSTALL_FALSE
+GCONF_SCHEMAS_INSTALL_TRUE
+GCONF_SCHEMA_FILE_DIR
+GCONF_SCHEMA_CONFIG_SOURCE
+GCONFTOOL
+HAVE_GRAPHVIZ_FALSE
+HAVE_GRAPHVIZ_TRUE
+GRAPHVIZ_LIBS
+GRAPHVIZ_CFLAGS
+HAVE_PLUGIN_VALGRIND_FALSE
+HAVE_PLUGIN_VALGRIND_TRUE
+PLUGIN_VALGRIND_LIBS
+LIBANJUTA_LIBS
+LIBANJUTA_CFLAGS
 PKG_CONFIG
 OTOOL64
 OTOOL
@@ -855,6 +875,8 @@
 MSGFMT
 USE_NLS
 GETTEXT_PACKAGE
+BINUTILS_REQUIRED
+LIBGRAPHVIZ_REQUIRED
 EGREP
 GREP
 CPP
@@ -947,6 +969,11 @@
 enable_fast_install
 with_gnu_ld
 enable_libtool_lock
+enable_plugin_valgrind
+enable_graphviz
+with_gconf_source
+with_gconf_schema_file_dir
+enable_schemas_install
 '
       ac_precious_vars='build_alias
 host_alias
@@ -958,8 +985,10 @@
 CPPFLAGS
 CPP
 PKG_CONFIG
-ANJUTA_EXTRAS_CFLAGS
-ANJUTA_EXTRAS_LIBS'
+LIBANJUTA_CFLAGS
+LIBANJUTA_LIBS
+GRAPHVIZ_CFLAGS
+GRAPHVIZ_LIBS'
 
 
 # Initialize some variables set by options.
@@ -1600,6 +1629,10 @@
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
+  --disable-plugin-valgrind
+                          Disable Valgrind plugin
+  --disable-graphviz      Disable GraphViz support in Anjuta
+  --disable-schemas-install	Disable the schemas installation
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1607,6 +1640,10 @@
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-gconf-source=sourceaddress
+                          Config database for installing schema files.
+  --with-gconf-schema-file-dir=dir
+                          Directory for installing schema files.
 
 Some influential environment variables:
   CC          C compiler command
@@ -1618,10 +1655,14 @@
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
-  ANJUTA_EXTRAS_CFLAGS
-              C compiler flags for ANJUTA_EXTRAS, overriding pkg-config
-  ANJUTA_EXTRAS_LIBS
-              linker flags for ANJUTA_EXTRAS, overriding pkg-config
+  LIBANJUTA_CFLAGS
+              C compiler flags for LIBANJUTA, overriding pkg-config
+  LIBANJUTA_LIBS
+              linker flags for LIBANJUTA, overriding pkg-config
+  GRAPHVIZ_CFLAGS
+              C compiler flags for GRAPHVIZ, overriding pkg-config
+  GRAPHVIZ_LIBS
+              linker flags for GRAPHVIZ, overriding pkg-config
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -5900,6 +5941,10 @@
 fi
 
 
+BINUTILS_REQUIRED=2.15.92
+LIBGRAPHVIZ_REQUIRED=1.0
+
+
 
 
 
@@ -8823,13 +8868,13 @@
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:8826: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:8871: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:8829: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:8874: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:8832: output\"" >&5)
+  (eval echo "\"\$as_me:8877: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -10034,7 +10079,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 10037 "configure"' > conftest.$ac_ext
+  echo '#line 10082 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -11399,11 +11444,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11402: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11447: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:11406: \$? = $ac_status" >&5
+   echo "$as_me:11451: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -11738,11 +11783,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11741: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11786: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:11745: \$? = $ac_status" >&5
+   echo "$as_me:11790: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -11843,11 +11888,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11846: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11891: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:11850: \$? = $ac_status" >&5
+   echo "$as_me:11895: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -11898,11 +11943,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11901: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11946: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:11905: \$? = $ac_status" >&5
+   echo "$as_me:11950: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -14711,7 +14756,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 14714 "configure"
+#line 14759 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14807,7 +14852,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 14810 "configure"
+#line 14855 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15153,12 +15198,12 @@
 fi
 
 pkg_failed=no
-{ $as_echo "$as_me:$LINENO: checking for ANJUTA_EXTRAS" >&5
-$as_echo_n "checking for ANJUTA_EXTRAS... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking for LIBANJUTA" >&5
+$as_echo_n "checking for LIBANJUTA... " >&6; }
 
 if test -n "$PKG_CONFIG"; then
-    if test -n "$ANJUTA_EXTRAS_CFLAGS"; then
-        pkg_cv_ANJUTA_EXTRAS_CFLAGS="$ANJUTA_EXTRAS_CFLAGS"
+    if test -n "$LIBANJUTA_CFLAGS"; then
+        pkg_cv_LIBANJUTA_CFLAGS="$LIBANJUTA_CFLAGS"
     else
         if test -n "$PKG_CONFIG" && \
     { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libanjuta-1.0 >= 2.27.0\"") >&5
@@ -15166,7 +15211,7 @@
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  pkg_cv_ANJUTA_EXTRAS_CFLAGS=`$PKG_CONFIG --cflags "libanjuta-1.0 >= 2.27.0" 2>/dev/null`
+  pkg_cv_LIBANJUTA_CFLAGS=`$PKG_CONFIG --cflags "libanjuta-1.0 >= 2.27.0" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -15175,8 +15220,8 @@
 	pkg_failed=untried
 fi
 if test -n "$PKG_CONFIG"; then
-    if test -n "$ANJUTA_EXTRAS_LIBS"; then
-        pkg_cv_ANJUTA_EXTRAS_LIBS="$ANJUTA_EXTRAS_LIBS"
+    if test -n "$LIBANJUTA_LIBS"; then
+        pkg_cv_LIBANJUTA_LIBS="$LIBANJUTA_LIBS"
     else
         if test -n "$PKG_CONFIG" && \
     { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libanjuta-1.0 >= 2.27.0\"") >&5
@@ -15184,7 +15229,7 @@
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  pkg_cv_ANJUTA_EXTRAS_LIBS=`$PKG_CONFIG --libs "libanjuta-1.0 >= 2.27.0" 2>/dev/null`
+  pkg_cv_LIBANJUTA_LIBS=`$PKG_CONFIG --libs "libanjuta-1.0 >= 2.27.0" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -15203,33 +15248,33 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        ANJUTA_EXTRAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libanjuta-1.0 >= 2.27.0"`
+	        LIBANJUTA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libanjuta-1.0 >= 2.27.0"`
         else
-	        ANJUTA_EXTRAS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libanjuta-1.0 >= 2.27.0"`
+	        LIBANJUTA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libanjuta-1.0 >= 2.27.0"`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$ANJUTA_EXTRAS_PKG_ERRORS" >&5
+	echo "$LIBANJUTA_PKG_ERRORS" >&5
 
 	{ { $as_echo "$as_me:$LINENO: error: Package requirements (libanjuta-1.0 >= 2.27.0) were not met:
 
-$ANJUTA_EXTRAS_PKG_ERRORS
+$LIBANJUTA_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables ANJUTA_EXTRAS_CFLAGS
-and ANJUTA_EXTRAS_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables LIBANJUTA_CFLAGS
+and LIBANJUTA_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 " >&5
 $as_echo "$as_me: error: Package requirements (libanjuta-1.0 >= 2.27.0) were not met:
 
-$ANJUTA_EXTRAS_PKG_ERRORS
+$LIBANJUTA_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables ANJUTA_EXTRAS_CFLAGS
-and ANJUTA_EXTRAS_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables LIBANJUTA_CFLAGS
+and LIBANJUTA_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 " >&2;}
    { (exit 1); exit 1; }; }
@@ -15240,8 +15285,8 @@
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables ANJUTA_EXTRAS_CFLAGS
-and ANJUTA_EXTRAS_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables LIBANJUTA_CFLAGS
+and LIBANJUTA_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
@@ -15250,22 +15295,444 @@
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables ANJUTA_EXTRAS_CFLAGS
-and ANJUTA_EXTRAS_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables LIBANJUTA_CFLAGS
+and LIBANJUTA_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
 See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }; }
 else
-	ANJUTA_EXTRAS_CFLAGS=$pkg_cv_ANJUTA_EXTRAS_CFLAGS
-	ANJUTA_EXTRAS_LIBS=$pkg_cv_ANJUTA_EXTRAS_LIBS
+	LIBANJUTA_CFLAGS=$pkg_cv_LIBANJUTA_CFLAGS
+	LIBANJUTA_LIBS=$pkg_cv_LIBANJUTA_LIBS
         { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 	:
 fi
 
-ac_config_files="$ac_config_files Makefile plugins/Makefile po/Makefile.in"
+
+# Check whether --enable-plugin-valgrind was given.
+if test "${enable_plugin_valgrind+set}" = set; then
+  enableval=$enable_plugin_valgrind;  if test "$enableval" = "no"; then
+		user_disabled_valgrind=1
+	  fi
+else
+   user_disabled_valgrind=0
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking if valgrind plugin is disabled" >&5
+$as_echo_n "checking if valgrind plugin is disabled... " >&6; }
+if test "$user_disabled_valgrind" = 1; then
+	{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+	valgrind="no"
+else
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+	valgrind="yes"
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for bfd_get_error in -lbfd" >&5
+$as_echo_n "checking for bfd_get_error in -lbfd... " >&6; }
+if test "${ac_cv_lib_bfd_bfd_get_error+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbfd -liberty $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char bfd_get_error ();
+int
+main ()
+{
+return bfd_get_error ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_bfd_bfd_get_error=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_bfd_bfd_get_error=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bfd_bfd_get_error" >&5
+$as_echo "$ac_cv_lib_bfd_bfd_get_error" >&6; }
+if test "x$ac_cv_lib_bfd_bfd_get_error" = x""yes; then
+  PLUGIN_VALGRIND_LIBS="-Wl,-Bstatic -lbfd -liberty -Wl,-Bdynamic"
+else
+  valgrind="no"
+fi
+
+
+
+
+
+if test x$valgrind = xyes; then
+  HAVE_PLUGIN_VALGRIND_TRUE=
+  HAVE_PLUGIN_VALGRIND_FALSE='#'
+else
+  HAVE_PLUGIN_VALGRIND_TRUE='#'
+  HAVE_PLUGIN_VALGRIND_FALSE=
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for bfd_get_section_size_before_reloc" >&5
+$as_echo_n "checking for bfd_get_section_size_before_reloc... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+        #include <bfd.h>
+
+int
+main ()
+{
+
+        asection *section;
+
+        bfd_get_section_size_before_reloc (section);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BFD_GET_SECTION_SIZE_BEFORE_RELOC /**/
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+# Check whether --enable-graphviz was given.
+if test "${enable_graphviz+set}" = set; then
+  enableval=$enable_graphviz;  if test "$enableval" = "no"; then
+		user_disabled_graphviz=1
+	  fi
+else
+   user_disabled_graphviz=0
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking if GraphViz support is disabled" >&5
+$as_echo_n "checking if GraphViz support is disabled... " >&6; }
+if test "$user_disabled_graphviz" = 1; then
+	{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+	libgraphviz_found="no"
+else
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+		ANJUTA_PKG_CONFIG_PATH_SAVE="${PKG_CONFIG_PATH}"
+	PKG_CONFIG_PATH="/usr/lib/graphviz/pkgconfig:$PKG_CONFIG_PATH"
+	PKG_CONFIG_PATH="/usr/local/lib/graphviz/pkgconfig:$PKG_CONFIG_PATH"
+	PKG_CONFIG_PATH="/usr/lib64/graphviz/pkgconfig:$PKG_CONFIG_PATH"
+	PKG_CONFIG_PATH="/usr/local/lib64/graphviz/pkgconfig:$PKG_CONFIG_PATH"
+
+	anjuta_save_prefix="$prefix"
+	test "x$prefix" = xNONE && prefix=$ac_default_prefix
+	graphviz_pkgconfig=`eval echo ${libdir}/graphviz/pkgconfig`
+	PKG_CONFIG_PATH="$graphviz_pkgconfig:$PKG_CONFIG_PATH"
+	prefix="$anjuta_save_prefix"
+
+	export PKG_CONFIG_PATH
+
+pkg_failed=no
+{ $as_echo "$as_me:$LINENO: checking for GRAPHVIZ" >&5
+$as_echo_n "checking for GRAPHVIZ... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GRAPHVIZ_CFLAGS"; then
+        pkg_cv_GRAPHVIZ_CFLAGS="$GRAPHVIZ_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libgvc >= \$LIBGRAPHVIZ_REQUIRED libgraph >= \$LIBGRAPHVIZ_REQUIRED\"") >&5
+  ($PKG_CONFIG --exists --print-errors "libgvc >= $LIBGRAPHVIZ_REQUIRED libgraph >= $LIBGRAPHVIZ_REQUIRED") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_GRAPHVIZ_CFLAGS=`$PKG_CONFIG --cflags "libgvc >= $LIBGRAPHVIZ_REQUIRED libgraph >= $LIBGRAPHVIZ_REQUIRED" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GRAPHVIZ_LIBS"; then
+        pkg_cv_GRAPHVIZ_LIBS="$GRAPHVIZ_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libgvc >= \$LIBGRAPHVIZ_REQUIRED libgraph >= \$LIBGRAPHVIZ_REQUIRED\"") >&5
+  ($PKG_CONFIG --exists --print-errors "libgvc >= $LIBGRAPHVIZ_REQUIRED libgraph >= $LIBGRAPHVIZ_REQUIRED") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_GRAPHVIZ_LIBS=`$PKG_CONFIG --libs "libgvc >= $LIBGRAPHVIZ_REQUIRED libgraph >= $LIBGRAPHVIZ_REQUIRED" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        GRAPHVIZ_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libgvc >= $LIBGRAPHVIZ_REQUIRED libgraph >= $LIBGRAPHVIZ_REQUIRED"`
+        else
+	        GRAPHVIZ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libgvc >= $LIBGRAPHVIZ_REQUIRED libgraph >= $LIBGRAPHVIZ_REQUIRED"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GRAPHVIZ_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                libgraphviz_found="no"
+elif test $pkg_failed = untried; then
+	libgraphviz_found="no"
+else
+	GRAPHVIZ_CFLAGS=$pkg_cv_GRAPHVIZ_CFLAGS
+	GRAPHVIZ_LIBS=$pkg_cv_GRAPHVIZ_LIBS
+        { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+	libgraphviz_found="yes"
+fi
+
+		PKG_CONFIG_PATH="${ANJUTA_PKG_CONFIG_PATH_SAVE}"
+	export PKG_CONFIG_PATH
+fi
+
+
+
+if test x$libgraphviz_found = xyes; then
+  HAVE_GRAPHVIZ_TRUE=
+  HAVE_GRAPHVIZ_FALSE='#'
+else
+  HAVE_GRAPHVIZ_TRUE='#'
+  HAVE_GRAPHVIZ_FALSE=
+fi
+
+
+if test "$libgraphviz_found" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GRAPHVIZ /**/
+_ACEOF
+
+fi
+
+# Extract the first word of "gconftool-2", so it can be a program name with args.
+set dummy gconftool-2; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GCONFTOOL+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $GCONFTOOL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GCONFTOOL="$GCONFTOOL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_GCONFTOOL="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_GCONFTOOL" && ac_cv_path_GCONFTOOL="no"
+  ;;
+esac
+fi
+GCONFTOOL=$ac_cv_path_GCONFTOOL
+if test -n "$GCONFTOOL"; then
+  { $as_echo "$as_me:$LINENO: result: $GCONFTOOL" >&5
+$as_echo "$GCONFTOOL" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+if test "x$GCONFTOOL" = "xno"; then
+  { { $as_echo "$as_me:$LINENO: error: gconftool-2 executable not found in your path - should be installed with GConf" >&5
+$as_echo "$as_me: error: gconftool-2 executable not found in your path - should be installed with GConf" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
+    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
+  else
+    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
+  fi
+
+
+# Check whether --with-gconf-source was given.
+if test "${with_gconf_source+set}" = set; then
+  withval=$with_gconf_source; GCONF_SCHEMA_CONFIG_SOURCE="$withval"
+fi
+
+
+
+  { $as_echo "$as_me:$LINENO: result: Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&5
+$as_echo "Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&6; }
+
+  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
+    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
+  fi
+
+
+# Check whether --with-gconf-schema-file-dir was given.
+if test "${with_gconf_schema_file_dir+set}" = set; then
+  withval=$with_gconf_schema_file_dir; GCONF_SCHEMA_FILE_DIR="$withval"
+fi
+
+
+
+  { $as_echo "$as_me:$LINENO: result: Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&5
+$as_echo "Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&6; }
+
+  # Check whether --enable-schemas-install was given.
+if test "${enable_schemas_install+set}" = set; then
+  enableval=$enable_schemas_install; case ${enableval} in
+       yes|no) ;;
+       *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-schemas-install" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --enable-schemas-install" >&2;}
+   { (exit 1); exit 1; }; } ;;
+      esac
+fi
+
+
+
+if test "$enable_schemas_install" != no; then
+  GCONF_SCHEMAS_INSTALL_TRUE=
+  GCONF_SCHEMAS_INSTALL_FALSE='#'
+else
+  GCONF_SCHEMAS_INSTALL_TRUE='#'
+  GCONF_SCHEMAS_INSTALL_FALSE=
+fi
+
+
+
+
+anjutalibdir=`pkg-config --variable=libdir libanjuta-1.0`
+anjutadatadir=`pkg-config --variable=datadir libanjuta-1.0`
+
+
+anjuta_plugin_dir='$(anjutalibdir)/anjuta'
+anjuta_data_dir='$(anjutadatadir)/anjuta'
+anjuta_ui_dir='$(anjutadatadir)/anjuta/ui'
+anjuta_glade_dir='$(anjutadatadir)/anjuta/glade'
+anjuta_image_dir='$(anjutadatadir)/pixmaps/anjuta'
+
+
+
+
+
+
+EXTRA_CFLAGS='-DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/$(PACKAGE)"\" -DPACKAGE_LIB_DIR=\""$(pkglibdir)"\" -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"'
+
+
+ac_config_files="$ac_config_files Makefile plugins/Makefile plugins/scratchbox/Makefile plugins/class-inheritance/Makefile plugins/sample1/Makefile plugins/indent/Makefile plugins/valgrind/Makefile plugins/profiler/Makefile po/Makefile.in scripts/Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -15403,6 +15870,27 @@
   ac_config_commands="$ac_config_commands po/stamp-it"
 
 
+if test -z "${HAVE_PLUGIN_VALGRIND_TRUE}" && test -z "${HAVE_PLUGIN_VALGRIND_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PLUGIN_VALGRIND\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_PLUGIN_VALGRIND\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_GRAPHVIZ_TRUE}" && test -z "${HAVE_GRAPHVIZ_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_GRAPHVIZ\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_GRAPHVIZ\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${GCONF_SCHEMAS_INSTALL_TRUE}" && test -z "${GCONF_SCHEMAS_INSTALL_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"GCONF_SCHEMAS_INSTALL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"GCONF_SCHEMAS_INSTALL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
 : ${CONFIG_STATUS=./config.status}
 ac_write_fail=0
@@ -16172,7 +16660,14 @@
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "plugins/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/Makefile" ;;
+    "plugins/scratchbox/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/scratchbox/Makefile" ;;
+    "plugins/class-inheritance/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/class-inheritance/Makefile" ;;
+    "plugins/sample1/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/sample1/Makefile" ;;
+    "plugins/indent/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/indent/Makefile" ;;
+    "plugins/valgrind/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/valgrind/Makefile" ;;
+    "plugins/profiler/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/profiler/Makefile" ;;
     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+    "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
     "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
 
   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
@@ -17645,3 +18140,23 @@
 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
+
+echo " "
+echo "-------------------------------------------------------------------"
+echo "Conditionally built plugins:"
+echo "-------------------------------------------------------------------"
+if  test x$libgraphviz_found = xyes ; then
+        echo "Building class inheritance plugin: .....................YES"
+        echo "Building performance profiler with function call chart: YES"
+else
+        echo "Building class inheritance plugin: .....................NO"
+        echo "        Requires graphviz (>= 2.6.0); http://graphviz.org";
+        echo "Building performance profiler with function call chart: NO"
+	 echo "        Requires graphviz (>= 2.6.0); http://graphviz.org";
+fi
+if  test x$valgrind = xyes ; then
+        echo "Building Valgrind debugger plugin: .....................YES"
+else
+        echo "Building Valgrind debugger plugin: .....................NO"
+	echo "		Requires binutils-dev"
+fi

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Tue Apr  7 13:46:31 2009
@@ -12,7 +12,11 @@
 AM_PROG_CC_STDC
 AC_HEADER_STDC
 
+BINUTILS_REQUIRED=2.15.92
+LIBGRAPHVIZ_REQUIRED=1.0
 
+AC_SUBST(LIBGRAPHVIZ_REQUIRED)
+AC_SUBST(BINUTILS_REQUIRED)
 
 
 dnl ***************************************************************************
@@ -25,10 +29,167 @@
 IT_PROG_INTLTOOL([0.35.0])
 AM_PROG_LIBTOOL
 
-PKG_CHECK_MODULES(ANJUTA_EXTRAS, [libanjuta-1.0 >= 2.27.0])
+dnl Check for libanjuta
+PKG_CHECK_MODULES(LIBANJUTA, [libanjuta-1.0 >= 2.27.0])
+
+dnl Valgrind plugin
+dnl check for libbfd
+dnl -------------------------------------------------------------
+
+AC_ARG_ENABLE(plugin-valgrind,
+	AC_HELP_STRING([--disable-plugin-valgrind],[Disable Valgrind plugin]), 
+	[ if test "$enableval" = "no"; then
+		user_disabled_valgrind=1
+	  fi ],
+	[ user_disabled_valgrind=0 ])
+
+AC_MSG_CHECKING(if valgrind plugin is disabled)
+if test "$user_disabled_valgrind" = 1; then
+	AC_MSG_RESULT(yes)
+	valgrind="no"
+else
+	AC_MSG_RESULT(no)
+	valgrind="yes"
+fi
+
+AC_CHECK_LIB(bfd, bfd_get_error, [PLUGIN_VALGRIND_LIBS="-Wl,-Bstatic -lbfd -liberty -Wl,-Bdynamic"],
+   valgrind="no",
+  -liberty)
+
+AC_SUBST(PLUGIN_VALGRIND_LIBS)
+AM_CONDITIONAL(HAVE_PLUGIN_VALGRIND, [test x$valgrind = xyes])
+
+dnl check for bfd_get_section_size_before_reloc() in libbfd
+AC_MSG_CHECKING(for bfd_get_section_size_before_reloc)
+AC_TRY_LINK([
+        #include <bfd.h>
+        ], [
+        asection *section;
+
+        bfd_get_section_size_before_reloc (section);
+        ],
+        AC_MSG_RESULT(yes)
+        AC_DEFINE(HAVE_BFD_GET_SECTION_SIZE_BEFORE_RELOC, [], [Define if libbfd
+contains the function bfd_get_section_size_before_reloc])
+,
+        AC_MSG_RESULT(no)
+)
+
+dnl Check for graphviz (class inheritance and profiler plugins)
+dnl --------------------------------------------------------------------------
+dnl FIXME: For some strange reason graphviz-devel rpm install the *.pc files
+dnl in /usr/lib/graphviz/pkgconfig, instead of usual /usr/lib/pkgconfig. This
+dnl makes pkgconfig check fail if we don't add the above path in
+dnl PKG_CONFIG_PATH. We have added both /usr/lib/graphviz/pkgconfig and
+dnl /usr/local/lib/pkgconfig paths. If graphviz is installed in other prefix
+dnl (other than /usr or /usr/local or the current installation prefix),
+dnl following pkgconfig check will fail.
+dnl --------------------------------------------------------------------------
+AC_ARG_ENABLE(graphviz,
+	AC_HELP_STRING([--disable-graphviz],[Disable GraphViz support in Anjuta]), 
+	[ if test "$enableval" = "no"; then
+		user_disabled_graphviz=1
+	  fi ],
+	[ user_disabled_graphviz=0 ])
+
+AC_MSG_CHECKING(if GraphViz support is disabled)
+if test "$user_disabled_graphviz" = 1; then
+	AC_MSG_RESULT(yes)
+	libgraphviz_found="no"
+else
+	AC_MSG_RESULT(no)
+	
+	dnl Set pkgconfig path
+	ANJUTA_PKG_CONFIG_PATH_SAVE="${PKG_CONFIG_PATH}"
+	PKG_CONFIG_PATH="/usr/lib/graphviz/pkgconfig:$PKG_CONFIG_PATH"
+	PKG_CONFIG_PATH="/usr/local/lib/graphviz/pkgconfig:$PKG_CONFIG_PATH"
+	PKG_CONFIG_PATH="/usr/lib64/graphviz/pkgconfig:$PKG_CONFIG_PATH"
+	PKG_CONFIG_PATH="/usr/local/lib64/graphviz/pkgconfig:$PKG_CONFIG_PATH"
+	
+	anjuta_save_prefix="$prefix"
+	test "x$prefix" = xNONE && prefix=$ac_default_prefix
+	graphviz_pkgconfig=`eval echo ${libdir}/graphviz/pkgconfig`
+	PKG_CONFIG_PATH="$graphviz_pkgconfig:$PKG_CONFIG_PATH"
+	prefix="$anjuta_save_prefix"
+
+	export PKG_CONFIG_PATH
+	PKG_CHECK_MODULES(GRAPHVIZ,
+		[libgvc >= $LIBGRAPHVIZ_REQUIRED libgraph >= $LIBGRAPHVIZ_REQUIRED], 
+		[libgraphviz_found="yes"],
+		[libgraphviz_found="no"])
+	
+	dnl Restore pkgconfig path
+	PKG_CONFIG_PATH="${ANJUTA_PKG_CONFIG_PATH_SAVE}"
+	export PKG_CONFIG_PATH
+fi
+
+AM_CONDITIONAL(HAVE_GRAPHVIZ, [test x$libgraphviz_found = xyes])
+
+dnl Define HAVE_GRAPHVIZ to disable Function Call Chart in the Profiler if 
+dnl Graphviz isn't on the system
+if test "$libgraphviz_found" = yes; then
+	AC_DEFINE(HAVE_GRAPHVIZ, [], [Define if we have GraphViz >= 2.6.0])
+fi
+
+dnl we need gconftool-2 in order to install the schema
+AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
+
+if test "x$GCONFTOOL" = "xno"; then
+  AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
+fi
+
+AM_GCONF_SOURCE_2
+
+
+dnl Setup Plugin directories
+dnl ------------------------
+anjutalibdir=`pkg-config --variable=libdir libanjuta-1.0`
+anjutadatadir=`pkg-config --variable=datadir libanjuta-1.0`
+AC_SUBST(anjutalibdir)
+AC_SUBST(anjutadatadir)
+anjuta_plugin_dir='$(anjutalibdir)/anjuta'
+anjuta_data_dir='$(anjutadatadir)/anjuta'
+anjuta_ui_dir='$(anjutadatadir)/anjuta/ui'
+anjuta_glade_dir='$(anjutadatadir)/anjuta/glade'
+anjuta_image_dir='$(anjutadatadir)/pixmaps/anjuta'
+AC_SUBST(anjuta_plugin_dir)
+AC_SUBST(anjuta_data_dir)
+AC_SUBST(anjuta_ui_dir)
+AC_SUBST(anjuta_glade_dir)
+AC_SUBST(anjuta_image_dir)
+
+EXTRA_CFLAGS='-DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/$(PACKAGE)"\" -DPACKAGE_LIB_DIR=\""$(pkglibdir)"\" -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"'
+AC_SUBST(EXTRA_CFLAGS)
 
 AC_OUTPUT([
 Makefile
 plugins/Makefile
+plugins/scratchbox/Makefile
+plugins/class-inheritance/Makefile
+plugins/sample1/Makefile
+plugins/indent/Makefile
+plugins/valgrind/Makefile
+plugins/profiler/Makefile
 po/Makefile.in
+scripts/Makefile
 ])
+
+echo " "
+echo "-------------------------------------------------------------------"
+echo "Conditionally built plugins:"
+echo "-------------------------------------------------------------------"
+if [ test x$libgraphviz_found = xyes ]; then
+        echo "Building class inheritance plugin: .....................YES"
+        echo "Building performance profiler with function call chart: YES"
+else
+        echo "Building class inheritance plugin: .....................NO"
+        echo "        Requires graphviz (>= 2.6.0); http://graphviz.org";
+        echo "Building performance profiler with function call chart: NO"
+	 echo "        Requires graphviz (>= 2.6.0); http://graphviz.org";
+fi
+if [ test x$valgrind = xyes ]; then
+        echo "Building Valgrind debugger plugin: .....................YES"
+else
+        echo "Building Valgrind debugger plugin: .....................NO"
+	echo "		Requires binutils-dev"
+fi
\ No newline at end of file

Modified: trunk/plugins/Makefile.am
==============================================================================
--- trunk/plugins/Makefile.am	(original)
+++ trunk/plugins/Makefile.am	Tue Apr  7 13:46:31 2009
@@ -1 +1 @@
-SUBDIRS = 
+SUBDIRS = class-inheritance valgrind scratchbox profiler

Added: trunk/plugins/class-inheritance/Makefile
==============================================================================
--- (empty file)
+++ trunk/plugins/class-inheritance/Makefile	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,642 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# plugins/class-inheritance/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+srcdir = .
+top_srcdir = ../..
+
+pkgdatadir = $(datadir)/anjuta-extras
+pkglibdir = $(libdir)/anjuta-extras
+pkgincludedir = $(includedir)/anjuta-extras
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+subdir = plugins/class-inheritance
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(plugindir)" \
+	"$(DESTDIR)$(cls_inheritance_pixmapsdir)" \
+	"$(DESTDIR)$(cls_inheritance_plugindir)"
+pluginLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(plugin_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libanjuta_class_inheritance_la_DEPENDENCIES =  \
+	$(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+am__libanjuta_class_inheritance_la_SOURCES_DIST = plugin.c plugin.h \
+	class-inherit.c class-inherit.h class-callbacks.c \
+	class-callbacks.h
+am_libanjuta_class_inheritance_la_OBJECTS =  \
+	plugin.lo class-inherit.lo \
+	class-callbacks.lo
+libanjuta_class_inheritance_la_OBJECTS =  \
+	$(am_libanjuta_class_inheritance_la_OBJECTS)
+am_libanjuta_class_inheritance_la_rpath = -rpath \
+	$(plugindir)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libanjuta_class_inheritance_la_SOURCES)
+DIST_SOURCES = $(am__libanjuta_class_inheritance_la_SOURCES_DIST)
+cls_inheritance_pixmapsDATA_INSTALL = $(INSTALL_DATA)
+cls_inheritance_pluginDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(cls_inheritance_pixmaps_DATA) $(cls_inheritance_plugin_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run aclocal-1.9
+ALL_LINGUAS = 
+AMDEP_FALSE = #
+AMDEP_TRUE = 
+AMTAR = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run automake-1.9
+AWK = mawk
+BINUTILS_REQUIRED = 2.15.92
+CATALOGS = 
+CATOBJEXT = .gmo
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CYGPATH_W = echo
+DATADIRNAME = share
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+EXTRA_CFLAGS = -DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/$(PACKAGE)"\" -DPACKAGE_LIB_DIR=\""$(pkglibdir)"\" -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"
+FGREP = /bin/grep -F
+GCONFTOOL = /usr/bin/gconftool-2
+GCONF_SCHEMAS_INSTALL_FALSE = #
+GCONF_SCHEMAS_INSTALL_TRUE = 
+GCONF_SCHEMA_CONFIG_SOURCE = xml:merged:/etc/gconf/gconf.xml.defaults
+GCONF_SCHEMA_FILE_DIR = $(sysconfdir)/gconf/schemas
+GETTEXT_PACKAGE = anjuta-extras
+GMOFILES = 
+GMSGFMT = /usr/bin/msgfmt
+GRAPHVIZ_CFLAGS = -I/usr/include/graphviz  
+GRAPHVIZ_LIBS = -lgvc -lgraph -lcdt  
+GREP = /bin/grep
+HAVE_GRAPHVIZ_FALSE = #
+HAVE_GRAPHVIZ_TRUE = 
+HAVE_PLUGIN_VALGRIND_FALSE = #
+HAVE_PLUGIN_VALGRIND_TRUE = 
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+INSTOBJEXT = .mo
+INTLLIBS = 
+INTLTOOL_CAVES_RULE = %.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_DESKTOP_RULE = %.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_DIRECTORY_RULE = %.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_EXTRACT = /usr/bin/intltool-extract
+INTLTOOL_KBD_RULE = %.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_KEYS_RULE = %.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_MERGE = /usr/bin/intltool-merge
+INTLTOOL_OAF_RULE = %.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@
+INTLTOOL_PERL = /usr/bin/perl
+INTLTOOL_POLICY_RULE = %.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_PONG_RULE = %.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_PROP_RULE = %.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SCHEMAS_RULE = %.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SERVER_RULE = %.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SERVICE_RULE = %.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SHEET_RULE = %.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SOUNDLIST_RULE = %.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_THEME_RULE = %.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_UI_RULE = %.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_UPDATE = /usr/bin/intltool-update
+INTLTOOL_XAM_RULE = %.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_XML_NOMERGE_RULE = %.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@
+INTLTOOL_XML_RULE = %.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBANJUTA_CFLAGS = -DORBIT2=1 -pthread -D_REENTRANT -I/usr/include/libanjuta-1.0 -I/usr/include/libgnomeui-2.0 -I/usr/include/libglade-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/directfb -I/usr/include/libpng12  
+LIBANJUTA_LIBS = -pthread -lanjuta -lgnomeui-2 -lSM -lICE -lglade-2.0 -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgconf-2 -lgthread-2.0 -lrt -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0  
+LIBGRAPHVIZ_REQUIRED = 1.0
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAINT = #
+MAINTAINER_MODE_FALSE = 
+MAINTAINER_MODE_TRUE = #
+MAKEINFO = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run makeinfo
+MKINSTALLDIRS = ./mkinstalldirs
+MSGFMT = /usr/bin/msgfmt
+MSGFMT_OPTS = -c
+MSGMERGE = /usr/bin/msgmerge
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OTOOL = 
+OTOOL64 = 
+PACKAGE = anjuta-extras
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = anjuta-extras
+PACKAGE_STRING = anjuta-extras 2.27.0
+PACKAGE_TARNAME = anjuta-extras
+PACKAGE_VERSION = 2.27.0
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PLUGIN_VALGRIND_LIBS = -Wl,-Bstatic -lbfd -liberty -Wl,-Bdynamic
+POFILES = 
+POSUB = po
+PO_IN_DATADIR_FALSE = 
+PO_IN_DATADIR_TRUE = 
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+STRIP = strip
+USE_NLS = yes
+VERSION = 2.27.0
+XGETTEXT = /usr/bin/xgettext
+ac_ct_CC = gcc
+ac_ct_DUMPBIN = 
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+anjuta_data_dir = $(anjutadatadir)/anjuta
+anjuta_glade_dir = $(anjutadatadir)/anjuta/glade
+anjuta_image_dir = $(anjutadatadir)/pixmaps/anjuta
+anjuta_plugin_dir = $(anjutalibdir)/anjuta
+anjuta_ui_dir = $(anjutadatadir)/anjuta/ui
+anjutadatadir = /usr/share
+anjutalibdir = /usr/lib
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = /home/jhs/devel/anjuta-extras/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias = 
+
+# Plugin Icon file
+cls_inheritance_pixmapsdir = $(anjuta_image_dir)
+cls_inheritance_pixmaps_DATA = \
+	anjuta-class-inheritance-plugin.svg \
+	anjuta-class-inheritance-plugin-48.png
+
+
+# Plugin description file
+plugin_in_files = anjuta-class-inheritance.plugin.in
+cls_inheritance_plugindir = $(anjuta_plugin_dir)
+cls_inheritance_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
+
+# NOTE :
+# The naming convention is very intentional
+# We are forced to use the prefix 'lib' by automake and libtool
+#    There is probably a way to avoid it but it is not worth to effort
+#    to find out.
+# The 'anjuta_' prfix is a safety measure to avoid conflicts where the
+#    plugin 'libpython.so' needs to link with the real 'libpython.so'
+
+# Include paths
+AM_CPPFLAGS = \
+	$(LIBANJUTA_CFLAGS) \
+	$(EXTRA_CFLAGS) \
+	$(GRAPHVIZ_CFLAGS) \
+	-DG_LOG_DOMAIN=\"libanjuta-class-inheritance\"
+
+
+# Where to install the plugin
+plugindir = $(anjuta_plugin_dir)
+
+# The plugin
+plugin_LTLIBRARIES = libanjuta-class-inheritance.la
+libanjuta_class_inheritance_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
+
+# Plugin dependencies
+libanjuta_class_inheritance_la_LIBADD = \
+	$(LIBANJUTA_LIBS) \
+	$(GNOME_UI_LIBS) \
+	$(GRAPHVIZ_LIBS)
+
+
+# Plugin sources
+libanjuta_class_inheritance_la_SOURCES = \
+	plugin.c \
+	plugin.h \
+	class-inherit.c \
+	class-inherit.h \
+	class-callbacks.c \
+	class-callbacks.h 
+
+EXTRA_DIST = \
+	$(plugin_in_files) \
+	$(cls_inheritance_plugin_DATA) \
+	$(cls_inheritance_ui_DATA) \
+	$(cls_inheritance_glade_DATA) \
+	$(cls_inheritance_pixmaps_DATA)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  plugins/class-inheritance/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  plugins/class-inheritance/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: # $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(plugindir)" || $(mkdir_p) "$(DESTDIR)$(plugindir)"
+	@list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-pluginLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \
+	done
+
+clean-pluginLTLIBRARIES:
+	-test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
+	@list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libanjuta-class-inheritance.la: $(libanjuta_class_inheritance_la_OBJECTS) $(libanjuta_class_inheritance_la_DEPENDENCIES) 
+	$(LINK) $(am_libanjuta_class_inheritance_la_rpath) $(libanjuta_class_inheritance_la_LDFLAGS) $(libanjuta_class_inheritance_la_OBJECTS) $(libanjuta_class_inheritance_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/class-callbacks.Plo
+include ./$(DEPDIR)/class-inherit.Plo
+include ./$(DEPDIR)/plugin.Plo
+
+.c.o:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c $<
+
+.c.obj:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-cls_inheritance_pixmapsDATA: $(cls_inheritance_pixmaps_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(cls_inheritance_pixmapsdir)" || $(mkdir_p) "$(DESTDIR)$(cls_inheritance_pixmapsdir)"
+	@list='$(cls_inheritance_pixmaps_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(cls_inheritance_pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(cls_inheritance_pixmapsdir)/$$f'"; \
+	  $(cls_inheritance_pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(cls_inheritance_pixmapsdir)/$$f"; \
+	done
+
+uninstall-cls_inheritance_pixmapsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(cls_inheritance_pixmaps_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(cls_inheritance_pixmapsdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(cls_inheritance_pixmapsdir)/$$f"; \
+	done
+install-cls_inheritance_pluginDATA: $(cls_inheritance_plugin_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(cls_inheritance_plugindir)" || $(mkdir_p) "$(DESTDIR)$(cls_inheritance_plugindir)"
+	@list='$(cls_inheritance_plugin_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(cls_inheritance_pluginDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(cls_inheritance_plugindir)/$$f'"; \
+	  $(cls_inheritance_pluginDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(cls_inheritance_plugindir)/$$f"; \
+	done
+
+uninstall-cls_inheritance_pluginDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(cls_inheritance_plugin_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(cls_inheritance_plugindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(cls_inheritance_plugindir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(cls_inheritance_pixmapsdir)" "$(DESTDIR)$(cls_inheritance_plugindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-cls_inheritance_pixmapsDATA \
+	install-cls_inheritance_pluginDATA install-pluginLTLIBRARIES
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-cls_inheritance_pixmapsDATA \
+	uninstall-cls_inheritance_pluginDATA uninstall-info-am \
+	uninstall-pluginLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-pluginLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-cls_inheritance_pixmapsDATA \
+	install-cls_inheritance_pluginDATA install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-pluginLTLIBRARIES \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-cls_inheritance_pixmapsDATA \
+	uninstall-cls_inheritance_pluginDATA uninstall-info-am \
+	uninstall-pluginLTLIBRARIES
+
+%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: trunk/plugins/class-inheritance/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/plugins/class-inheritance/Makefile.am	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,62 @@
+
+if HAVE_GRAPHVIZ
+
+# Plugin Icon file
+cls_inheritance_pixmapsdir = $(anjuta_image_dir)
+cls_inheritance_pixmaps_DATA = \
+	anjuta-class-inheritance-plugin.svg \
+	anjuta-class-inheritance-plugin-48.png
+
+# Plugin description file
+plugin_in_files = anjuta-class-inheritance.plugin.in
+%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+cls_inheritance_plugindir = $(anjuta_plugin_dir)
+cls_inheritance_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
+
+# NOTE :
+# The naming convention is very intentional
+# We are forced to use the prefix 'lib' by automake and libtool
+#    There is probably a way to avoid it but it is not worth to effort
+#    to find out.
+# The 'anjuta_' prfix is a safety measure to avoid conflicts where the
+#    plugin 'libpython.so' needs to link with the real 'libpython.so'
+
+# Include paths
+AM_CPPFLAGS = \
+	$(LIBANJUTA_CFLAGS) \
+	$(EXTRA_CFLAGS) \
+	$(GRAPHVIZ_CFLAGS) \
+	-DG_LOG_DOMAIN=\"libanjuta-class-inheritance\"
+
+# Where to install the plugin
+plugindir = $(anjuta_plugin_dir)
+
+# The plugin
+plugin_LTLIBRARIES = libanjuta-class-inheritance.la
+
+libanjuta_class_inheritance_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
+
+# Plugin dependencies
+libanjuta_class_inheritance_la_LIBADD = \
+	$(LIBANJUTA_LIBS) \
+	$(GNOME_UI_LIBS) \
+	$(GRAPHVIZ_LIBS)
+
+# Plugin sources
+libanjuta_class_inheritance_la_SOURCES = \
+	plugin.c \
+	plugin.h \
+	class-inherit.c \
+	class-inherit.h \
+	class-callbacks.c \
+	class-callbacks.h 
+
+endif
+
+EXTRA_DIST = \
+	$(plugin_in_files) \
+	$(cls_inheritance_plugin_DATA) \
+	$(cls_inheritance_ui_DATA) \
+	$(cls_inheritance_glade_DATA) \
+	$(cls_inheritance_pixmaps_DATA)

Added: trunk/plugins/class-inheritance/Makefile.in
==============================================================================
--- (empty file)
+++ trunk/plugins/class-inheritance/Makefile.in	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,642 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ SET_MAKE@
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = plugins/class-inheritance
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(plugindir)" \
+	"$(DESTDIR)$(cls_inheritance_pixmapsdir)" \
+	"$(DESTDIR)$(cls_inheritance_plugindir)"
+pluginLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(plugin_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+ HAVE_GRAPHVIZ_TRUE@libanjuta_class_inheritance_la_DEPENDENCIES =  \
+ HAVE_GRAPHVIZ_TRUE@	$(am__DEPENDENCIES_1) \
+ HAVE_GRAPHVIZ_TRUE@	$(am__DEPENDENCIES_1)
+am__libanjuta_class_inheritance_la_SOURCES_DIST = plugin.c plugin.h \
+	class-inherit.c class-inherit.h class-callbacks.c \
+	class-callbacks.h
+ HAVE_GRAPHVIZ_TRUE@am_libanjuta_class_inheritance_la_OBJECTS =  \
+ HAVE_GRAPHVIZ_TRUE@	plugin.lo class-inherit.lo \
+ HAVE_GRAPHVIZ_TRUE@	class-callbacks.lo
+libanjuta_class_inheritance_la_OBJECTS =  \
+	$(am_libanjuta_class_inheritance_la_OBJECTS)
+ HAVE_GRAPHVIZ_TRUE@am_libanjuta_class_inheritance_la_rpath = -rpath \
+ HAVE_GRAPHVIZ_TRUE@	$(plugindir)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libanjuta_class_inheritance_la_SOURCES)
+DIST_SOURCES = $(am__libanjuta_class_inheritance_la_SOURCES_DIST)
+cls_inheritance_pixmapsDATA_INSTALL = $(INSTALL_DATA)
+cls_inheritance_pluginDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(cls_inheritance_pixmaps_DATA) $(cls_inheritance_plugin_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BINUTILS_REQUIRED = @BINUTILS_REQUIRED@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRA_CFLAGS = @EXTRA_CFLAGS@
+FGREP = @FGREP@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@
+GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GRAPHVIZ_CFLAGS = @GRAPHVIZ_CFLAGS@
+GRAPHVIZ_LIBS = @GRAPHVIZ_LIBS@
+GREP = @GREP@
+HAVE_GRAPHVIZ_FALSE = @HAVE_GRAPHVIZ_FALSE@
+HAVE_GRAPHVIZ_TRUE = @HAVE_GRAPHVIZ_TRUE@
+HAVE_PLUGIN_VALGRIND_FALSE = @HAVE_PLUGIN_VALGRIND_FALSE@
+HAVE_PLUGIN_VALGRIND_TRUE = @HAVE_PLUGIN_VALGRIND_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBANJUTA_CFLAGS = @LIBANJUTA_CFLAGS@
+LIBANJUTA_LIBS = @LIBANJUTA_LIBS@
+LIBGRAPHVIZ_REQUIRED = @LIBGRAPHVIZ_REQUIRED@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGIN_VALGRIND_LIBS = @PLUGIN_VALGRIND_LIBS@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+anjuta_data_dir = @anjuta_data_dir@
+anjuta_glade_dir = @anjuta_glade_dir@
+anjuta_image_dir = @anjuta_image_dir@
+anjuta_plugin_dir = @anjuta_plugin_dir@
+anjuta_ui_dir = @anjuta_ui_dir@
+anjutadatadir = @anjutadatadir@
+anjutalibdir = @anjutalibdir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+
+# Plugin Icon file
+ HAVE_GRAPHVIZ_TRUE@cls_inheritance_pixmapsdir = $(anjuta_image_dir)
+ HAVE_GRAPHVIZ_TRUE@cls_inheritance_pixmaps_DATA = \
+ HAVE_GRAPHVIZ_TRUE@	anjuta-class-inheritance-plugin.svg \
+ HAVE_GRAPHVIZ_TRUE@	anjuta-class-inheritance-plugin-48.png
+
+
+# Plugin description file
+ HAVE_GRAPHVIZ_TRUE@plugin_in_files = anjuta-class-inheritance.plugin.in
+ HAVE_GRAPHVIZ_TRUE@cls_inheritance_plugindir = $(anjuta_plugin_dir)
+ HAVE_GRAPHVIZ_TRUE@cls_inheritance_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
+
+# NOTE :
+# The naming convention is very intentional
+# We are forced to use the prefix 'lib' by automake and libtool
+#    There is probably a way to avoid it but it is not worth to effort
+#    to find out.
+# The 'anjuta_' prfix is a safety measure to avoid conflicts where the
+#    plugin 'libpython.so' needs to link with the real 'libpython.so'
+
+# Include paths
+ HAVE_GRAPHVIZ_TRUE@AM_CPPFLAGS = \
+ HAVE_GRAPHVIZ_TRUE@	$(LIBANJUTA_CFLAGS) \
+ HAVE_GRAPHVIZ_TRUE@	$(EXTRA_CFLAGS) \
+ HAVE_GRAPHVIZ_TRUE@	$(GRAPHVIZ_CFLAGS) \
+ HAVE_GRAPHVIZ_TRUE@	-DG_LOG_DOMAIN=\"libanjuta-class-inheritance\"
+
+
+# Where to install the plugin
+ HAVE_GRAPHVIZ_TRUE@plugindir = $(anjuta_plugin_dir)
+
+# The plugin
+ HAVE_GRAPHVIZ_TRUE@plugin_LTLIBRARIES = libanjuta-class-inheritance.la
+ HAVE_GRAPHVIZ_TRUE@libanjuta_class_inheritance_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
+
+# Plugin dependencies
+ HAVE_GRAPHVIZ_TRUE@libanjuta_class_inheritance_la_LIBADD = \
+ HAVE_GRAPHVIZ_TRUE@	$(LIBANJUTA_LIBS) \
+ HAVE_GRAPHVIZ_TRUE@	$(GNOME_UI_LIBS) \
+ HAVE_GRAPHVIZ_TRUE@	$(GRAPHVIZ_LIBS)
+
+
+# Plugin sources
+ HAVE_GRAPHVIZ_TRUE@libanjuta_class_inheritance_la_SOURCES = \
+ HAVE_GRAPHVIZ_TRUE@	plugin.c \
+ HAVE_GRAPHVIZ_TRUE@	plugin.h \
+ HAVE_GRAPHVIZ_TRUE@	class-inherit.c \
+ HAVE_GRAPHVIZ_TRUE@	class-inherit.h \
+ HAVE_GRAPHVIZ_TRUE@	class-callbacks.c \
+ HAVE_GRAPHVIZ_TRUE@	class-callbacks.h 
+
+EXTRA_DIST = \
+	$(plugin_in_files) \
+	$(cls_inheritance_plugin_DATA) \
+	$(cls_inheritance_ui_DATA) \
+	$(cls_inheritance_glade_DATA) \
+	$(cls_inheritance_pixmaps_DATA)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  plugins/class-inheritance/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  plugins/class-inheritance/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(plugindir)" || $(mkdir_p) "$(DESTDIR)$(plugindir)"
+	@list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-pluginLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \
+	done
+
+clean-pluginLTLIBRARIES:
+	-test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
+	@list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libanjuta-class-inheritance.la: $(libanjuta_class_inheritance_la_OBJECTS) $(libanjuta_class_inheritance_la_DEPENDENCIES) 
+	$(LINK) $(am_libanjuta_class_inheritance_la_rpath) $(libanjuta_class_inheritance_la_LDFLAGS) $(libanjuta_class_inheritance_la_OBJECTS) $(libanjuta_class_inheritance_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/class-callbacks Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/class-inherit Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/plugin Plo am__quote@
+
+.c.o:
+ am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-cls_inheritance_pixmapsDATA: $(cls_inheritance_pixmaps_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(cls_inheritance_pixmapsdir)" || $(mkdir_p) "$(DESTDIR)$(cls_inheritance_pixmapsdir)"
+	@list='$(cls_inheritance_pixmaps_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(cls_inheritance_pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(cls_inheritance_pixmapsdir)/$$f'"; \
+	  $(cls_inheritance_pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(cls_inheritance_pixmapsdir)/$$f"; \
+	done
+
+uninstall-cls_inheritance_pixmapsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(cls_inheritance_pixmaps_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(cls_inheritance_pixmapsdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(cls_inheritance_pixmapsdir)/$$f"; \
+	done
+install-cls_inheritance_pluginDATA: $(cls_inheritance_plugin_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(cls_inheritance_plugindir)" || $(mkdir_p) "$(DESTDIR)$(cls_inheritance_plugindir)"
+	@list='$(cls_inheritance_plugin_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(cls_inheritance_pluginDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(cls_inheritance_plugindir)/$$f'"; \
+	  $(cls_inheritance_pluginDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(cls_inheritance_plugindir)/$$f"; \
+	done
+
+uninstall-cls_inheritance_pluginDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(cls_inheritance_plugin_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(cls_inheritance_plugindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(cls_inheritance_plugindir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(cls_inheritance_pixmapsdir)" "$(DESTDIR)$(cls_inheritance_plugindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-cls_inheritance_pixmapsDATA \
+	install-cls_inheritance_pluginDATA install-pluginLTLIBRARIES
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-cls_inheritance_pixmapsDATA \
+	uninstall-cls_inheritance_pluginDATA uninstall-info-am \
+	uninstall-pluginLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-pluginLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-cls_inheritance_pixmapsDATA \
+	install-cls_inheritance_pluginDATA install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-pluginLTLIBRARIES \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-cls_inheritance_pixmapsDATA \
+	uninstall-cls_inheritance_pluginDATA uninstall-info-am \
+	uninstall-pluginLTLIBRARIES
+
+ HAVE_GRAPHVIZ_TRUE@%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: trunk/plugins/class-inheritance/anjuta-class-inheritance-plugin-48.png
==============================================================================
Binary file. No diff available.

Added: trunk/plugins/class-inheritance/anjuta-class-inheritance-plugin.svg
==============================================================================
--- (empty file)
+++ trunk/plugins/class-inheritance/anjuta-class-inheritance-plugin.svg	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,311 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://web.resource.org/cc/";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:xlink="http://www.w3.org/1999/xlink";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.45.1"
+   width="48"
+   height="48"
+   version="1.0"
+   sodipodi:docbase="/home/maker/icons/anjuta-new2/plugins"
+   sodipodi:docname="anjuta-class-inheritance.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/home/maker/icons/anjuta-new2/plugins/anjuta-class-inheritance-plugin-48.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <sodipodi:namedview
+     inkscape:cy="12.527183"
+     inkscape:cx="23.616362"
+     inkscape:zoom="1"
+     inkscape:window-height="923"
+     inkscape:window-width="1044"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     guidetolerance="10.0"
+     gridtolerance="10.0"
+     objecttolerance="10.0"
+     borderopacity="1.0"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     width="48px"
+     height="48px"
+     showgrid="true"
+     inkscape:window-x="0"
+     inkscape:window-y="32"
+     inkscape:current-layer="svg2" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs5">
+    <marker
+       style="overflow:visible"
+       id="TriangleOutS"
+       orient="auto"
+       refY="0.0"
+       inkscape:stockid="TriangleOutS"
+       refX="0.0">
+      <path
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+         id="path3274"
+         transform="scale(0.2)"
+         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM"
+       orient="auto"
+       refY="0.0"
+       inkscape:stockid="TriangleOutM"
+       refX="0.0">
+      <path
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+         id="path3271"
+         transform="scale(0.4)"
+         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " />
+    </marker>
+    <marker
+       style="overflow:visible;"
+       id="Arrow2Send"
+       orient="auto"
+       refY="0.0"
+       inkscape:stockid="Arrow2Send"
+       refX="0.0">
+      <path
+         style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
+         id="path3203"
+         transform="scale(0.3) rotate(180) translate(-2.3,0)"
+         d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="Arrow2Sstart"
+       orient="auto"
+       refY="0.0"
+       inkscape:stockid="Arrow2Sstart"
+       refX="0.0">
+      <path
+         style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round"
+         id="path3200"
+         transform="scale(0.3) translate(-2.3,0)"
+         d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " />
+    </marker>
+    <marker
+       style="overflow:visible;"
+       id="Arrow1Send"
+       orient="auto"
+       refY="0.0"
+       inkscape:stockid="Arrow1Send"
+       refX="0.0">
+      <path
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
+         id="path3185"
+         transform="scale(0.2) rotate(180) translate(6,0)"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="Arrow1Sstart"
+       orient="auto"
+       refY="0.0"
+       inkscape:stockid="Arrow1Sstart"
+       refX="0.0">
+      <path
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+         id="path3182"
+         transform="scale(0.2) translate(6,0)"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleInS"
+       orient="auto"
+       refY="0.0"
+       inkscape:stockid="TriangleInS"
+       refX="0.0">
+      <path
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+         id="path3265"
+         transform="scale(-0.2)"
+         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM"
+       orient="auto"
+       refY="0.0"
+       inkscape:stockid="TriangleInM"
+       refX="0.0">
+      <path
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+         id="path3262"
+         transform="scale(-0.4)"
+         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " />
+    </marker>
+    <marker
+       style="overflow:visible;"
+       id="Arrow2Mend"
+       orient="auto"
+       refY="0.0"
+       inkscape:stockid="Arrow2Mend"
+       refX="0.0">
+      <path
+         style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
+         id="path3197"
+         transform="scale(0.6) rotate(180) translate(0,0)"
+         d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " />
+    </marker>
+    <linearGradient
+       id="linearGradient3146"
+       inkscape:collect="always">
+      <stop
+         offset="0"
+         style="stop-color:#204a87;stop-opacity:1;"
+         id="stop3148" />
+      <stop
+         offset="1"
+         style="stop-color:#204a87;stop-opacity:0;"
+         id="stop3150" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3136">
+      <stop
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;"
+         id="stop3138" />
+      <stop
+         offset="1"
+         style="stop-color:#eeeeec;stop-opacity:1;"
+         id="stop3140" />
+    </linearGradient>
+    <radialGradient
+       r="22.499998"
+       id="radialGradient3144"
+       fx="58.651649"
+       fy="14.520809"
+       gradientUnits="userSpaceOnUse"
+       inkscape:collect="always"
+       cy="14.520809"
+       cx="58.651649"
+       xlink:href="#linearGradient3136"
+       gradientTransform="matrix(1,0,0,1.2111365,-109,0.9341241)" />
+    <linearGradient
+       id="linearGradient3152"
+       gradientUnits="userSpaceOnUse"
+       inkscape:collect="always"
+       x1="58.446415"
+       y1="5.2448635"
+       xlink:href="#linearGradient3146"
+       gradientTransform="translate(-109,3.9999963)"
+       x2="58.651649"
+       y2="-12.72976" />
+    <linearGradient
+       id="linearGradient6308"
+       gradientUnits="userSpaceOnUse"
+       inkscape:collect="always"
+       x1="15"
+       y1="8.7244282"
+       xlink:href="#linearGradient3136"
+       x2="15"
+       y2="21.010408" />
+    <linearGradient
+       id="linearGradient6316"
+       gradientUnits="userSpaceOnUse"
+       inkscape:collect="always"
+       x1="34.452351"
+       y1="30.287689"
+       xlink:href="#linearGradient3136"
+       gradientTransform="translate(0,2)"
+       x2="34.398602"
+       y2="37.977474" />
+    <linearGradient
+       id="linearGradient6324"
+       gradientUnits="userSpaceOnUse"
+       inkscape:collect="always"
+       x1="33.83363"
+       y1="11.906407"
+       xlink:href="#linearGradient3136"
+       x2="33.868267"
+       y2="18.005203" />
+    <marker
+       style="overflow:visible"
+       id="TriangleOutSu"
+       orient="auto"
+       refY="0.0"
+       inkscape:stockid="TriangleOutSu"
+       refX="0.0">
+      <path
+         style="marker-start:none;stroke:#ad7fa8;stroke-width:1.0pt;fill:#ad7fa8;fill-rule:evenodd"
+         id="path2223"
+         transform="scale(0.2)"
+         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutSb"
+       orient="auto"
+       refY="0.0"
+       inkscape:stockid="TriangleOutSb"
+       refX="0.0">
+      <path
+         style="marker-start:none;stroke:#ef2929;stroke-width:1.0pt;fill:#ef2929;fill-rule:evenodd"
+         id="path2305"
+         transform="scale(0.2)"
+         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " />
+    </marker>
+  </defs>
+  <path
+     style="stroke-linejoin:miter;marker-end:url(#TriangleOutSu);stroke-opacity:1;fill-rule:evenodd;marker-start:none;fill-opacity:0.75;stroke-dashoffset:0;stroke:#ad7fa8;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-width:3;fill:none"
+     d="M 14.977505,23.248699 L 14.933311,36.109121 L 23.818783,36.042858"
+     sodipodi:nodetypes="ccc"
+     id="path3379" />
+  <rect
+     style="opacity:1;fill:url(#linearGradient6308);fill-opacity:1.0;fill-rule:nonzero;stroke:#75507b;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+     id="rect3154"
+     width="16"
+     rx="0.057870258"
+     ry="0.057870261"
+     y="7"
+     x="7"
+     height="16" />
+  <path
+     style="stroke-linejoin:miter;marker-end:url(#TriangleOutSb);stroke-opacity:1;fill-rule:evenodd;marker-start:none;fill-opacity:0.75;stroke-dashoffset:0;stroke:#ef2929;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-width:3;fill:none"
+     id="path3165"
+     sodipodi:nodetypes="cc"
+     d="M 34.949104,19.05688 L 34.949104,25.846793" />
+  <rect
+     style="opacity:1;fill:url(#linearGradient6324);fill-opacity:1.0;fill-rule:nonzero;stroke:#cc0000;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+     id="rect3156"
+     width="12"
+     rx="0.057870254"
+     ry="0.057870261"
+     y="11"
+     x="28.999998"
+     height="8" />
+  <rect
+     style="opacity:1;fill:url(#linearGradient6316);fill-opacity:1;fill-rule:nonzero;stroke:#3465a4;stroke-width:1.99999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+     id="rect3163"
+     width="12"
+     rx="0.057870258"
+     ry="0.057870265"
+     y="31"
+     x="29"
+     height="10" />
+</svg>

Added: trunk/plugins/class-inheritance/anjuta-class-inheritance.plugin.in
==============================================================================
--- (empty file)
+++ trunk/plugins/class-inheritance/anjuta-class-inheritance.plugin.in	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,5 @@
+[Anjuta Plugin]
+Location=anjuta-class-inheritance:AnjutaClassInheritance
+Icon=anjuta-class-inheritance-plugin-48.png
+_Name=Class Inheritance
+_Description=A graph painter for the inheritance of the classes.

Added: trunk/plugins/class-inheritance/class-callbacks.c
==============================================================================
--- (empty file)
+++ trunk/plugins/class-inheritance/class-callbacks.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,280 @@
+/*
+ *  Copyright (C) Massimo Cora' 2005 <maxcvs email it>
+ *
+ *  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.
+ */
+
+#include <glib.h>
+#include <gio/gio.h>
+#include <libanjuta/anjuta-debug.h>
+#include <libanjuta/interfaces/ianjuta-document-manager.h>
+#include <libanjuta/interfaces/ianjuta-symbol-manager.h>
+
+#include "plugin.h"
+#include "class-callbacks.h"
+#include "class-inherit.h"
+
+
+
+gint
+on_canvas_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data) 
+{
+	AnjutaClassInheritance *plugin;
+	plugin = ANJUTA_PLUGIN_CLASS_INHERITANCE (data);
+	
+	switch (event->type)
+	{
+	case GDK_BUTTON_PRESS:
+		if (event->button.button == 3)
+		{
+			g_return_val_if_fail (plugin->menu != NULL, FALSE);
+			
+			gtk_menu_popup (GTK_MENU (plugin->menu), NULL, NULL, NULL, NULL, 
+							event->button.button, event->button.time);
+		}
+		break;
+
+	default:
+		break;
+	}
+	
+	return FALSE;
+}
+
+void
+on_toggled_menuitem_clicked (GtkCheckMenuItem *checkmenuitem,
+							 gpointer data)
+{
+	NodeData *node;
+	node = (NodeData*)data;
+		
+	if (node->anchored) 
+	{
+		node->anchored = FALSE;
+		
+		/* remove the key from the hash table, if present */
+		if (g_tree_lookup (node->plugin->expansion_node_list, 
+						   GINT_TO_POINTER (node->klass_id))) 
+		{
+			g_tree_remove (node->plugin->expansion_node_list, 
+						   GINT_TO_POINTER (node->klass_id));
+		}
+	}
+	else 
+	{
+		NodeExpansionStatus *node_status;
+		node->anchored = TRUE;
+		
+		node_status = g_new0 (NodeExpansionStatus, 1);
+		node_status->klass_id = node->klass_id;
+		/* set to half. This will display at least NODE_HALF_DISPLAY_ELEM_NUM.
+		 * User will decide whether to show all elements or not. */
+		node_status->expansion_status = NODE_HALF_EXPANDED;
+		
+		/* insert the class name to the hash_table */
+		g_tree_insert (node->plugin->expansion_node_list, 
+							GINT_TO_POINTER (node->klass_id), 
+							node_status);
+	}
+	
+	class_inheritance_update_graph (node->plugin);
+}
+
+void
+on_member_menuitem_clicked (GtkMenuItem *menuitem, gpointer data)
+{
+	NodeData *node;	
+	const gchar *file;
+	gint line;
+	
+	node = (NodeData*)data;
+	file = g_object_get_data (G_OBJECT (menuitem), "__filepath");
+	line = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menuitem), "__line"));	
+
+	DEBUG_PRINT ("got uri %s [%d]", file, line);
+	
+	if (file)
+	{
+		GFile* gfile;
+		gfile = g_file_new_for_path (file);
+		/* Goto uri line */
+		IAnjutaDocumentManager *dm;
+		dm = anjuta_shell_get_interface (ANJUTA_PLUGIN (node->plugin)->shell,
+										 IAnjutaDocumentManager, NULL);
+		if (dm)
+		{
+			ianjuta_document_manager_goto_file_line (dm, gfile, line, NULL);
+		}
+
+		if (gfile)
+			g_object_unref (gfile);
+	}
+}
+
+gint
+on_nodedata_expanded_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
+{
+	AnjutaClassInheritance *plugin;
+	NodeData *nodedata;	
+	nodedata = (NodeData*)data;
+	plugin = nodedata->plugin;
+
+	switch (event->type)
+	{
+	case GDK_2BUTTON_PRESS:		/* double click */
+		break;
+
+	case GDK_BUTTON_PRESS:		/* single click */
+		if (event->button.button == 1) {
+			NodeExpansionStatus *node_status;
+			if ( (node_status = 
+				  (NodeExpansionStatus*)g_tree_lookup (plugin->expansion_node_list, 
+												GINT_TO_POINTER (nodedata->klass_id))) 
+				== NULL) 
+			{
+				break;
+			}
+			else if (strcmp (nodedata->sub_item, NODE_SHOW_ALL_MEMBERS_STR) == 0) 
+			{
+					node_status->expansion_status = NODE_FULL_EXPANDED;
+					class_inheritance_update_graph (plugin);
+			}			
+			else if (strcmp (nodedata->sub_item, NODE_SHOW_NORMAL_VIEW_STR) == 0) 
+			{
+					g_tree_remove (plugin->expansion_node_list, 
+								   GINT_TO_POINTER (nodedata->klass_id));
+					class_inheritance_update_graph (plugin);
+			}
+			else 		/* it's a class member. Take line && uri of definition */
+			{			/* and reach them */
+				const gchar *file;
+				gint line;
+				
+				file = g_object_get_data (G_OBJECT (item), "__filepath");
+				line = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "__line"));				
+								
+				if (file) 
+				{
+					GFile* gfile;
+					
+					gfile = g_file_new_for_path (file);
+					
+					/* Goto uri line */
+					IAnjutaDocumentManager *dm;
+					dm = anjuta_shell_get_interface (ANJUTA_PLUGIN (plugin)->shell,
+											 	IAnjutaDocumentManager, NULL);
+					if (dm) 
+					{
+						ianjuta_document_manager_goto_file_line (dm, gfile, line, NULL);
+					}
+					
+					if (gfile)
+						g_object_unref (gfile);
+				}
+			}
+		}
+		break;
+		
+	case GDK_ENTER_NOTIFY:		/* mouse entered in item's area */
+		gnome_canvas_item_set (nodedata->canvas_item,
+							   "fill_color_gdk",
+							   &plugin->canvas->style->base[GTK_STATE_PRELIGHT],
+							   NULL);
+		return TRUE;
+
+	case GDK_LEAVE_NOTIFY:		/* mouse exited item's area */
+		gnome_canvas_item_set (nodedata->canvas_item,
+							   "fill_color_gdk",
+							   &plugin->canvas->style->base[GTK_STATE_ACTIVE],
+							   NULL);
+		return TRUE;
+	default:
+		break;
+	}
+	
+	return FALSE;
+	
+}
+
+
+gint
+on_nodedata_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
+{
+	AnjutaClassInheritance *plugin;
+	NodeData *nodedata;	
+	
+	nodedata = (NodeData*)data;
+	plugin = nodedata->plugin;
+
+	switch (event->type)
+	{
+	case GDK_2BUTTON_PRESS:		/* double click */
+		break;
+
+	case GDK_BUTTON_PRESS:		/* single click */
+		if (event->button.button == 1 && !nodedata->anchored)
+		{
+			class_inheritance_show_dynamic_class_popup_menu  (event, data);
+		}
+		break;
+		
+	case GDK_ENTER_NOTIFY:		/* mouse entered in item's area */
+		/* Make the outline wide */
+		gnome_canvas_item_set (nodedata->canvas_item,
+							   "width_units", 2.5,
+							   "fill_color_gdk",
+							   &plugin->canvas->style->base[GTK_STATE_PRELIGHT],
+							   "outline_color_gdk",
+							   &plugin->canvas->style->text[GTK_STATE_PRELIGHT],
+							   NULL);
+		return TRUE;
+
+	case GDK_LEAVE_NOTIFY:		/* mouse exited item's area */
+		/* Make the outline thin */
+		gnome_canvas_item_set (nodedata->canvas_item,
+							   "width_units", 1.0,
+							   "fill_color_gdk",
+							   &plugin->canvas->style->base[GTK_STATE_NORMAL],
+							   "outline_color_gdk",
+							   &plugin->canvas->style->text[GTK_STATE_NORMAL],	
+							   NULL);
+		return TRUE;
+	default:
+		break;
+	}
+	
+	return FALSE;
+}
+
+
+/*----------------------------------------------------------------------------
+ * callback for the canvas' right-click menu - update button.
+ */
+void
+on_update_menu_item_selected (GtkMenuItem *item,
+							  AnjutaClassInheritance *plugin)
+{
+	class_inheritance_update_graph (plugin);
+}
+
+/*----------------------------------------------------------------------------
+ * callback for theme/colors changes
+ */
+void
+on_style_set (GtkWidget *widget, GtkStyle  *previous_style,
+			  AnjutaClassInheritance *plugin)
+{
+	class_inheritance_update_graph (plugin);
+}

Added: trunk/plugins/class-inheritance/class-callbacks.h
==============================================================================
--- (empty file)
+++ trunk/plugins/class-inheritance/class-callbacks.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,44 @@
+/*
+ *  Copyright (C) Massimo Cora' 2005 <maxcvs email it>
+ *
+ *  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.
+ */
+ 
+#ifndef _CLASS_CALLBACKS_H
+#define _CLASS_CALLBACKS_H
+
+#include "plugin.h"
+#include "class-inherit.h"
+
+gint on_canvas_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data);
+	
+void on_toggled_menuitem_clicked (GtkCheckMenuItem *checkmenuitem,
+							 gpointer data);
+
+void on_member_menuitem_clicked (GtkMenuItem *menuitem, gpointer data);
+	
+gint on_nodedata_expanded_event (GnomeCanvasItem *item, GdkEvent *event, 
+							gpointer data);
+
+gint on_nodedata_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data);
+
+void on_update_menu_item_selected (GtkMenuItem *item, 
+							AnjutaClassInheritance *plugin);
+
+void on_style_set (GtkWidget *widget, GtkStyle  *previous_style,
+			  AnjutaClassInheritance *plugin);
+
+
+#endif /* _CLASS_CALLBACKS_H */

Added: trunk/plugins/class-inheritance/class-inherit.c
==============================================================================
--- (empty file)
+++ trunk/plugins/class-inheritance/class-inherit.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,1199 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ *  Copyright (C) Massimo Cora' 2005 <maxcvs email it>
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+ 
+#include <glib.h>
+#include <graphviz/gvc.h>		/* graphviz */
+#include <libanjuta/anjuta-debug.h>
+#include <libanjuta/interfaces/ianjuta-document-manager.h>
+#include <libanjuta/interfaces/ianjuta-symbol-manager.h>
+
+#include "plugin.h"
+#include "class-inherit.h"
+#include "class-callbacks.h"
+
+#define DEFAULT_GRAPH_NAME		"Anjuta Graph"
+#define CANVAS_MIN_SIZE			250
+
+/* some macros to access deep graphviz's node structures */
+#define NODE_LOWER_LEFT(node,main_index,rec_index) \
+	(((field_t*)ND_shape_info (node))->fld[main_index]->fld[rec_index]->b.LL)
+
+#define NODE_UPPER_RIGHT(node,main_index,rec_index) \
+	(((field_t*)ND_shape_info (node))->fld[main_index]->fld[rec_index]->b.UR)
+
+#define NODE_NUM_FIELDS(node) \
+	((field_t*)ND_shape_info (node))->n_flds
+
+#define NODE_NTH_FIELD(node,nth) \
+	((field_t*)ND_shape_info (node))->fld[nth]
+
+#define NODE_NTH_TEXT(node,main_index,rec_index) \
+	((field_t*)ND_shape_info (node))->fld[main_index]->fld[rec_index]->lp->text
+
+
+#define INCH_TO_PIXELS_CONVERSION_FACTOR		72
+#define INCH_TO_PIXELS(inch_size) \
+				INCH_TO_PIXELS_CONVERSION_FACTOR * inch_size
+
+
+/* TODO: check for symbol_updated event, and check in the nodestatus's hashtable
+for the nodes that are gone. In case remove them.
+*/
+
+
+static void
+cls_inherit_nodestatus_destroy (NodeExpansionStatus *node) {
+	g_free (node);
+}
+
+static gint
+gtree_compare_func (gconstpointer a, gconstpointer b, gpointer user_data)
+{
+	return GPOINTER_TO_INT(a) - GPOINTER_TO_INT(b);
+}
+
+gchar *
+class_inheritance_create_agnode_key_name (const IAnjutaSymbol* symbol)
+{
+	const gchar *node_sym_name;
+	gint node_sym_id;
+	gchar *graph_node_name;
+	
+	g_return_val_if_fail (symbol != NULL, NULL);
+	
+	
+	/* begin the key of a Agnode only a char, we should provide some hack
+	 * to make sure that each node can be different fom each other, even if it has
+	 * the same name as another node
+	 *
+	 * Let's concatenate the IAnjutaSymbol id with its name in such form:
+	 * 'id:name'.
+	 */
+	node_sym_name = ianjuta_symbol_get_name (IANJUTA_SYMBOL (symbol), NULL);
+	node_sym_id = ianjuta_symbol_get_id (IANJUTA_SYMBOL (symbol), NULL);
+	graph_node_name = g_strdup_printf ("%d:%s", node_sym_id, node_sym_name);
+
+	return graph_node_name;
+}
+
+IAnjutaSymbol *
+class_inheritance_get_symbol_from_agnode_key_name (AnjutaClassInheritance *plugin,
+												   const gchar *key)
+{
+	IAnjutaSymbol * symbol;
+	IAnjutaSymbolManager *sm;
+	
+	gchar **res = g_strsplit (key, ":", -1);
+	gint sym_id = atoi (res[0]);
+	
+
+	g_return_val_if_fail (plugin != NULL, NULL);
+
+	sm = anjuta_shell_get_interface (ANJUTA_PLUGIN (plugin)->shell,
+									 IAnjutaSymbolManager, NULL);
+	
+	symbol = ianjuta_symbol_manager_get_symbol_by_id (sm,
+													sym_id,
+													IANJUTA_SYMBOL_FIELD_SIMPLE,
+													NULL);	
+	
+	g_strfreev (res);
+	
+	return symbol;
+}
+
+void
+class_inheritance_show_dynamic_class_popup_menu (GdkEvent *event,
+										   NodeData* nodedata)
+{
+	GtkWidget *item, *image;
+	GtkWidget *checkitem, *separator;
+		
+	/* Destroy the old menu before creating a new one */
+	if (nodedata->menu)
+	{
+		gtk_widget_destroy (nodedata->menu);
+	}
+		
+	nodedata->menu = gtk_menu_new();
+	if (nodedata->klass_id > 0)
+	{
+		IAnjutaSymbolManager *sm;
+		IAnjutaIterable *iter;
+		IAnjutaSymbol *symbol_searched;
+		sm = anjuta_shell_get_interface (ANJUTA_PLUGIN (nodedata->plugin)->shell,
+										 IAnjutaSymbolManager, NULL);
+		if (sm == NULL)
+			return;
+
+		symbol_searched = ianjuta_symbol_manager_get_symbol_by_id (sm, 
+												 nodedata->klass_id,
+												 IANJUTA_SYMBOL_FIELD_SIMPLE,
+												 NULL);
+												 
+		iter = ianjuta_symbol_manager_get_members (sm, symbol_searched,
+												   IANJUTA_SYMBOL_FIELD_SIMPLE |
+												   IANJUTA_SYMBOL_FIELD_TYPE |
+												   IANJUTA_SYMBOL_FIELD_ACCESS |
+												   IANJUTA_SYMBOL_FIELD_FILE_PATH,
+												   FALSE, NULL);
+		if (iter && ianjuta_iterable_get_length (iter, NULL) > 0)
+		{	
+			do
+			{
+				const gchar *name, *file;
+				const GdkPixbuf *pixbuf;
+				gint line;		
+				IAnjutaSymbol *symbol = IANJUTA_SYMBOL (iter);
+				
+				name = ianjuta_symbol_get_name (symbol, NULL);
+				pixbuf = ianjuta_symbol_get_icon (symbol, NULL);
+				file = ianjuta_symbol_get_extra_info_string (symbol, 
+								IANJUTA_SYMBOL_FIELD_FILE_PATH, NULL);
+				line = ianjuta_symbol_get_line (symbol, NULL);
+				
+				item = gtk_image_menu_item_new_with_label (name);
+				image = gtk_image_new_from_pixbuf ((GdkPixbuf*)pixbuf);
+				gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM
+											   (item), image);
+				
+				if (file)
+				{
+					g_object_set_data_full (G_OBJECT (item), "__filepath",
+											g_strdup (file), g_free);
+					g_object_set_data (G_OBJECT (item), "__line",
+									   GINT_TO_POINTER (line));
+				}
+				gtk_container_add (GTK_CONTAINER (nodedata->menu),
+								   item);
+				g_signal_connect (G_OBJECT (item), "activate",
+											G_CALLBACK (on_member_menuitem_clicked),
+											nodedata);
+			} while (ianjuta_iterable_next (iter, NULL));
+		}
+		if (iter)  
+		{
+			g_object_unref (iter);
+		}			
+	}
+	
+	
+	separator = gtk_separator_menu_item_new ();
+	/* create the check menuitem */
+	checkitem = gtk_check_menu_item_new_with_label (_("Fixed data-view"));
+	gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (checkitem),
+									nodedata->anchored);
+	
+	g_signal_connect (G_OBJECT (checkitem), "toggled",
+								G_CALLBACK (on_toggled_menuitem_clicked),
+								nodedata);
+	
+	gtk_container_add (GTK_CONTAINER (nodedata->menu), separator);
+	gtk_container_add (GTK_CONTAINER (nodedata->menu), checkitem);
+		
+	gtk_widget_show_all (nodedata->menu);
+	gtk_menu_popup (GTK_MENU (nodedata->menu), NULL, NULL,
+	                NULL, NULL, event->button.button,
+					event->button.time);	
+}
+	
+/*----------------------------------------------------------------------------
+ * initialize the internal graphviz structure.
+ */
+static void
+cls_inherit_graph_init (AnjutaClassInheritance *plugin, gchar* graph_label)
+{
+	aginit ();
+	plugin->graph = agopen (graph_label, AGDIGRAPH);
+	plugin->gvc = gvContext();
+}
+
+/*----------------------------------------------------------------------------
+ * Perform a dot_cleanup and a graph closing. Call this function at the end of
+ * call to draw_graph.
+ */
+static void
+cls_inherit_graph_cleanup (AnjutaClassInheritance *plugin)
+{
+	if (plugin->graph != NULL)
+	{
+		gvFreeLayout (plugin->gvc, plugin->graph);
+		agclose (plugin->graph);
+	}
+
+	if (plugin->gvc != NULL )
+	{
+		gvFreeContext (plugin->gvc);
+	}
+	
+	plugin->graph = NULL;
+	plugin->gvc = NULL;
+
+}
+
+/*----------------------------------------------------------------------------
+ * destroys a NodeData element. All it's resources will be deallocated
+ * and setted to null.
+ */
+static void
+cls_inherit_nodedata_destroy (NodeData *node_data)
+{
+	if (node_data->canvas_item)
+	{
+		gtk_object_destroy (GTK_OBJECT (node_data->canvas_item));
+		node_data->canvas_item = NULL;
+	}
+	
+	if (node_data->menu)
+	{
+		gtk_widget_destroy (node_data->menu);
+		node_data->menu = NULL;
+	}
+	if (node_data->sub_item)
+	{
+		g_free (node_data->sub_item);
+		node_data->sub_item = NULL;
+	}
+	node_data->anchored = FALSE;	
+}
+
+/*----------------------------------------------------------------------------
+ * clean the canvas and all its painted objects.
+ */
+void
+class_inheritance_clean_canvas (AnjutaClassInheritance *plugin)
+{
+	if (plugin->drawable_list == NULL || plugin->node_list == NULL)
+		return;
+	
+	/* destroying a gnome_canvas_item will un-paint automatically from
+	 * the canvas
+	 */
+	g_list_foreach (plugin->drawable_list, (GFunc)gtk_object_destroy, NULL);
+	g_list_free(plugin->drawable_list);
+	
+	/* the same for the nodes' list */
+	g_list_foreach (plugin->node_list, (GFunc)cls_inherit_nodedata_destroy,
+					NULL);
+	g_list_free(plugin->node_list);
+	
+	/* re-initializing the g_list */
+	plugin->drawable_list = NULL;
+	plugin->node_list = NULL;
+}
+
+
+/*----------------------------------------------------------------------------
+ * add a node to an Agraph. Check also if the node is yet in the hash_table so 
+ * that we can build the label of the node with the class-data.
+ */
+static gboolean
+cls_inherit_add_node (AnjutaClassInheritance *plugin, const IAnjutaSymbol *node_sym)
+{
+	Agnode_t *graph_node;
+	Agsym_t *sym;
+	NodeExpansionStatus *node_status;
+	const gchar *node_sym_name;
+	gint node_sym_id;
+	gchar *graph_node_name;
+	
+	
+	/* if graph isn't initialized, init it */
+	if (!plugin->graph)
+		cls_inherit_graph_init (plugin, _(DEFAULT_GRAPH_NAME));
+	
+	node_sym_name = ianjuta_symbol_get_name (IANJUTA_SYMBOL (node_sym), NULL);
+	node_sym_id = ianjuta_symbol_get_id (IANJUTA_SYMBOL (node_sym), NULL);
+
+	/* get an unique char key for an agnode */
+	graph_node_name = class_inheritance_create_agnode_key_name (node_sym);
+		
+	/* let's add the node to the graph */
+	if ((graph_node = agnode (plugin->graph, 
+							  graph_node_name)) == NULL)
+	{
+		g_free (graph_node_name);
+		return FALSE;
+	}
+	g_free (graph_node_name);
+	
+	/* check for the node in the gtree */
+	if ( (node_status = 
+				(NodeExpansionStatus*)g_tree_lookup (plugin->expansion_node_list, 
+					GINT_TO_POINTER (node_sym_id))) != NULL && 
+				node_status->expansion_status != NODE_NOT_EXPANDED) 
+	{
+		GString *label;
+		gint max_label_items = 0;
+		gint real_items_length = 0;
+		IAnjutaSymbolManager *sm;
+
+		if (!(sym = agfindattr(plugin->graph->proto->n, "shape")))
+			sym = agnodeattr(plugin->graph, "shape", "");
+		agxset (graph_node, sym->index, "record");
+		
+		if (!(sym = agfindattr(plugin->graph->proto->n, "label")))
+			sym = agnodeattr(plugin->graph, "label", "");
+		
+		label = g_string_new ("");
+		g_string_printf (label, "{%s", node_sym_name);
+		
+		sm = anjuta_shell_get_interface (ANJUTA_PLUGIN (plugin)->shell,
+										 IAnjutaSymbolManager, NULL);
+		if (sm)
+		{
+			IAnjutaIterable *iter;
+			
+			/* get members from the passed symbol node */
+			iter = ianjuta_symbol_manager_get_members (sm, node_sym,
+													IANJUTA_SYMBOL_FIELD_SIMPLE|
+												   	IANJUTA_SYMBOL_FIELD_TYPE |
+												   	IANJUTA_SYMBOL_FIELD_ACCESS,													   
+													FALSE, NULL);
+			real_items_length = ianjuta_iterable_get_length (iter, NULL);
+
+			/* set the max number of items to draw */
+			if (real_items_length <= NODE_HALF_DISPLAY_ELEM_NUM || 
+						node_status->expansion_status == NODE_FULL_EXPANDED) 
+			{
+				max_label_items = real_items_length;
+				node_status->expansion_status = NODE_FULL_EXPANDED;
+			}
+			else 
+			{
+				max_label_items = NODE_HALF_DISPLAY_ELEM_NUM;
+			}
+
+			if (iter && real_items_length > 0)
+			{
+				gint i;
+				i = 0;
+				do
+				{
+					const gchar *name;
+					IAnjutaSymbol *symbol = IANJUTA_SYMBOL (iter);
+						
+					name = ianjuta_symbol_get_name (symbol, NULL);
+					g_string_append_printf (label, "|%s", name);
+					i++;
+				} while (ianjuta_iterable_next (iter, NULL) && i < max_label_items);
+			}
+			if (iter)
+				g_object_unref (iter);			
+		}
+		
+		if (node_status->expansion_status == NODE_HALF_EXPANDED &&
+				real_items_length > NODE_HALF_DISPLAY_ELEM_NUM) {
+			g_string_append_printf (label, "|%s", NODE_SHOW_ALL_MEMBERS_STR);
+		}
+		
+		g_string_append_printf (label, "|%s }", NODE_SHOW_NORMAL_VIEW_STR);
+		agxset(graph_node, sym->index, label->str);
+		
+		g_string_free (label, TRUE);
+	}
+	else {	/* the node isn't in an expansion status. 
+			 * Go on setting a regular one */
+
+		/* Set an attribute - in this case one that affects the visible rendering */
+		if (!(sym = agfindattr(plugin->graph->proto->n, "shape")))
+			sym = agnodeattr(plugin->graph, "shape", "");
+		agxset(graph_node, sym->index, "box");
+		
+		if (!(sym = agfindattr(plugin->graph->proto->n, "label")))
+			sym = agnodeattr(plugin->graph, "label", "");
+		agxset(graph_node, sym->index, graph_node->name);		
+	}
+
+	/* set the font */
+	if (!(sym = agfindattr(plugin->graph->proto->n, "fontname")))
+		sym = agnodeattr(plugin->graph, "fontname", "");
+	agxset(graph_node, sym->index, "Courier new");
+
+	/* set the font-size */	
+	if (!(sym = agfindattr(plugin->graph->proto->n, "fontsize")))
+		sym = agnodeattr(plugin->graph, "fontsize", "");
+	/* hack: set canvas_text_fontsize + 4 points or text would oversize the block */
+	/* add some more points for icons 16x16 space */
+	agxset(graph_node, sym->index, "17");
+
+	if (!(sym = agfindattr(plugin->graph->proto->n, "ratio")))
+		sym = agnodeattr(plugin->graph, "ratio", "");
+	agxset(graph_node, sym->index, "expand");	
+
+	return TRUE;
+}
+
+/*----------------------------------------------------------------------------
+ * add an edge to an Agraph.
+ */
+static gboolean
+cls_inherit_add_edge (AnjutaClassInheritance *plugin,
+					  const IAnjutaSymbol *node_sym_from,
+					  const IAnjutaSymbol *node_sym_to)
+{
+	Agedge_t *edge;
+	Agnode_t *n_from, *n_to;
+	gchar *from_key, *to_key;
+
+	/* if we hadn't initialized out graph we return FALSE. Edges require
+	 * two nodes
+	 */
+	if (!plugin->graph)
+		return FALSE;
+	
+	from_key = class_inheritance_create_agnode_key_name (node_sym_from);
+	
+	if ((n_from = agfindnode (plugin->graph, from_key)) == NULL)
+	{	
+		g_free (from_key);
+		return FALSE;
+	}
+	g_free (from_key);
+	
+	to_key = class_inheritance_create_agnode_key_name (node_sym_to);
+	if ((n_to = agfindnode (plugin->graph, to_key)) == NULL)
+	{
+		g_free (to_key);
+		return FALSE;
+	}
+	g_free (to_key);
+		
+	if ((edge = agedge (plugin->graph, n_from, n_to)) == NULL)
+		return FALSE;
+	
+	return TRUE;
+}
+
+
+/*----------------------------------------------------------------------------
+ * Draw an expanded node. Function which simplifies cls_inherit_draw_graph().
+ */
+static void
+cls_inherit_draw_expanded_node (AnjutaClassInheritance *plugin, Agnode_t *graph_node, 
+					point* node_pos, gdouble node_width, gdouble node_height) 
+{
+	GnomeCanvasItem *item;
+	NodeExpansionStatus *node_status;
+	NodeData *node_data;
+	gint expansion_status;
+	gint i, j;
+	IAnjutaSymbolManager *sm;
+	IAnjutaIterable *symbol_iter = NULL;
+	IAnjutaSymbol *node_sym;
+	gint node_sym_id;
+	
+	sm = anjuta_shell_get_interface (ANJUTA_PLUGIN (plugin)->shell,
+										 IAnjutaSymbolManager, NULL);
+	if (!sm) 
+		return;	
+						
+	node_sym = class_inheritance_get_symbol_from_agnode_key_name (plugin,
+												graph_node->name);		
+	
+	node_sym_id = ianjuta_symbol_get_id (node_sym, NULL);
+	symbol_iter = ianjuta_symbol_manager_get_members (sm, node_sym,
+													IANJUTA_SYMBOL_FIELD_SIMPLE |
+												   	IANJUTA_SYMBOL_FIELD_TYPE |
+												   	IANJUTA_SYMBOL_FIELD_ACCESS |
+													IANJUTA_SYMBOL_FIELD_FILE_PATH,
+													FALSE, NULL);
+
+	g_object_unref (node_sym);
+	
+	/* we need to know which label to draw, wether only the "show all" or just 
+	 * the "normal view" */
+	if ( (node_status = 
+				(NodeExpansionStatus*)g_tree_lookup 
+				(plugin->expansion_node_list, GINT_TO_POINTER (node_sym_id))) == NULL) 
+	{
+		expansion_status = NODE_NOT_EXPANDED;
+	}
+	else
+		expansion_status = node_status->expansion_status;
+
+	for (i=0; i < NODE_NUM_FIELDS (graph_node); i++ ) 
+	{
+		for (j=0; j < NODE_NTH_FIELD (graph_node, i)->n_flds; j++ ) 
+		{
+			IAnjutaSymbol *symbol;
+			gint symbol_id;
+			gint y1, y2;			
+			y1 = NODE_LOWER_LEFT (graph_node, i, j).y;
+			y2 = NODE_UPPER_RIGHT(graph_node, i, j).y;
+
+			node_data = g_new0 (NodeData, 1);
+			
+			symbol = class_inheritance_get_symbol_from_agnode_key_name (plugin, 
+															graph_node->name);
+			
+			symbol_id = ianjuta_symbol_get_id (symbol, NULL);
+			g_object_unref (symbol);
+
+			/* set the plugin reference */
+			node_data->plugin = plugin;
+			node_data->anchored = TRUE;
+			node_data->klass_id = symbol_id;
+
+			node_data->sub_item = g_strdup (NODE_NTH_TEXT (graph_node,i,j));
+			
+			node_data->canvas_item =
+			gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (plugin->canvas)),
+								   gnome_canvas_rect_get_type (),
+								   "x1",
+								   (gdouble) (node_pos->x -INCH_TO_PIXELS (node_width)/2),
+								   "y1",
+								   (gdouble) -node_pos->y -INCH_TO_PIXELS (node_height)/2 +
+									j*abs(y1-y2),
+								   "x2",
+								   (gdouble) (node_pos->x +INCH_TO_PIXELS (node_width)/2),
+								   "y2",
+								   (gdouble) -node_pos->y -INCH_TO_PIXELS (node_height)/2 +
+									(j+1)*abs(y1-y2),
+								   "fill_color_gdk",
+								   &plugin->canvas->style->base[GTK_STATE_ACTIVE],
+								   NULL);
+									
+			/* add to the nodelist: we'll set the __uri and __line properites later
+			 * on this loop, when we'll parse symbols. */			
+			plugin->node_list = g_list_prepend (plugin->node_list, node_data);
+
+			g_signal_connect (GTK_OBJECT (node_data->canvas_item), "event",
+							  G_CALLBACK (on_nodedata_expanded_event),
+							  node_data);
+
+			/* --- texts --- */		
+			item = gnome_canvas_item_new (gnome_canvas_root
+										  (GNOME_CANVAS (plugin->canvas)),
+										  gnome_canvas_text_get_type (),
+										  "text", NODE_NTH_TEXT (graph_node, i, j),
+										  "font", NODE_FONT_DEFAULT,
+										  "justification", GTK_JUSTIFY_CENTER,
+										  "style", PANGO_STYLE_ITALIC,
+										  "anchor", GTK_ANCHOR_CENTER,
+									  	  "x",
+									  	  (gdouble) (node_pos->x - 
+										  INCH_TO_PIXELS (node_width)/2 + 20),
+									  	  "y", (gdouble) -node_pos->y -
+										  INCH_TO_PIXELS (node_height)/2+(j+0.5)*abs(y1-y2),
+									  	  "fill_color_gdk",
+									  	  &plugin->canvas->style->text[GTK_STATE_ACTIVE],
+									  	  "anchor", GTK_ANCHOR_W,        
+									  	  NULL);
+			plugin->drawable_list = g_list_prepend (plugin->drawable_list, item);
+			
+			if (j == 0) 		/* the Class' name case: make it bold */
+			{				
+				gnome_canvas_item_set (item, 
+							"weight", PANGO_WEIGHT_BOLD, 
+							"style", PANGO_STYLE_NORMAL,
+							NULL);
+				continue;
+			}
+			else					/* we need to draw the last 2 elements differently */
+			{
+				if (expansion_status == NODE_HALF_EXPANDED && 
+					j > (NODE_NTH_FIELD (graph_node, i)->n_flds -3)) 
+				{
+					gnome_canvas_item_set (item, 
+								"weight", PANGO_WEIGHT_HEAVY, 
+								"style", PANGO_STYLE_NORMAL,
+								NULL);						
+					continue;
+				}
+				else				/* only the last one. Usually "Normal view" */
+				{
+					if (expansion_status == NODE_FULL_EXPANDED && 
+						j > (NODE_NTH_FIELD (graph_node, i)->n_flds -2)) 
+					{
+						gnome_canvas_item_set (item, 
+									"weight", PANGO_WEIGHT_HEAVY,
+									"style", PANGO_STYLE_NORMAL,
+									NULL);
+						continue;
+					}
+				}
+			}
+			
+			/* go on with the icons */
+			if (symbol_iter && ianjuta_iterable_get_length (symbol_iter, NULL) > 0) 
+			{
+				const GdkPixbuf *pixbuf;
+				GFile* gfile;
+				gchar *file;
+				gint line;
+				IAnjutaSymbol *symbol = IANJUTA_SYMBOL (symbol_iter);
+
+				gfile = ianjuta_symbol_get_file (symbol, NULL);
+				line = ianjuta_symbol_get_line (symbol, NULL);
+				pixbuf = ianjuta_symbol_get_icon (symbol, NULL);
+				
+				item = gnome_canvas_item_new (	gnome_canvas_root
+									(GNOME_CANVAS (plugin->canvas)),
+									gnome_canvas_pixbuf_get_type(),
+									"x",
+									(gdouble) (node_pos->x -
+									INCH_TO_PIXELS (node_width)/2 +2),
+									"y", 
+									(gdouble) -node_pos->y -
+									INCH_TO_PIXELS (node_height)/2+(j+0.5)*abs(y1-y2)-5,
+									"pixbuf", pixbuf,
+									NULL);
+
+				/* set now the object properties on node_data. We still have a 
+				 * reference to it so we can access its canvas_item */
+				if (gfile) 
+				{
+					file = g_file_get_path (gfile);
+					
+					g_object_set_data_full (G_OBJECT (node_data->canvas_item), "__filepath",
+											file, g_free);
+					g_object_set_data (G_OBJECT (node_data->canvas_item), "__line",
+									   GINT_TO_POINTER (line));
+					
+					/* no need to free 'file'. It'll be freed when object'll be unreffed */
+				}
+			}
+			plugin->drawable_list = g_list_prepend (plugin->drawable_list, item);
+			ianjuta_iterable_next (symbol_iter, NULL);
+		} /*- for */
+	}
+	
+	if (symbol_iter)
+		g_object_unref (symbol_iter);
+	
+	/* make the outline bounds */
+	item =
+	gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (plugin->canvas)),
+							gnome_canvas_rect_get_type (),
+							"x1",
+							(gdouble) (node_pos->x -INCH_TO_PIXELS (node_width)/2-1 ),
+							"y1",
+							(gdouble) -node_pos->y -INCH_TO_PIXELS (node_height)/2 -1,
+							"x2",
+							(gdouble) node_pos->x +INCH_TO_PIXELS (node_width)/2+1,
+							"y2",
+							(gdouble) -node_pos->y +INCH_TO_PIXELS (node_height)/2 -1,
+  						   "outline_color_gdk",
+							&plugin->canvas->style->text[GTK_STATE_ACTIVE],
+							"width_units", 1.0,
+							NULL);
+
+	plugin->drawable_list = g_list_prepend (plugin->drawable_list, item);
+}
+
+static void
+cls_inherit_draw_single_node (AnjutaClassInheritance *plugin, Agnode_t *graph_node, 
+					point *node_pos, gdouble node_width, gdouble node_height) 
+{
+	NodeData *node_data;
+	GnomeCanvasItem *item;
+	gdouble text_width_value;
+	IAnjutaSymbol *node_sym;
+	const gchar* node_sym_name;
+
+	node_sym = class_inheritance_get_symbol_from_agnode_key_name (plugin,
+															graph_node->name);
+	node_sym_name = ianjuta_symbol_get_name (node_sym, NULL);
+	node_data = g_new0 (NodeData, 1);		
+						
+	/* set the plugin reference */
+	node_data->plugin = plugin;
+	node_data->anchored = FALSE;
+	node_data->klass_id = ianjuta_symbol_get_id (IANJUTA_SYMBOL (node_sym), NULL);
+	node_data->sub_item = NULL;
+		
+	g_object_unref (node_sym);
+	
+	node_data->canvas_item =
+	gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (plugin->canvas)),
+						   gnome_canvas_rect_get_type (),
+						   "x1",
+						   (gdouble) (node_pos->x - INCH_TO_PIXELS (node_width)/2),
+						   "y1",
+						   (gdouble) -(node_pos->y - INCH_TO_PIXELS (node_height)/2),
+						   "x2",
+						   (gdouble) (node_pos->x + INCH_TO_PIXELS (node_width)/2),
+						   "y2",
+						   (gdouble) -(node_pos->y + INCH_TO_PIXELS (node_height)/2),
+						   "fill_color_gdk",
+						   &plugin->canvas->style->base[GTK_STATE_NORMAL],
+						   "outline_color_gdk",
+						   &plugin->canvas->style->text[GTK_STATE_NORMAL],
+						   "width_units", 1.0,
+						   NULL);
+	
+	plugin->node_list = g_list_prepend (plugin->node_list, node_data);
+	
+	g_signal_connect (GTK_OBJECT (node_data->canvas_item), "event",
+					  G_CALLBACK (on_nodedata_event),
+					  node_data);
+
+	/* --- texts --- */		
+	item = gnome_canvas_item_new (gnome_canvas_root
+								  (GNOME_CANVAS (plugin->canvas)),
+								  gnome_canvas_text_get_type (),
+								  "text", node_sym_name,
+								  "font", NODE_FONT_DEFAULT,
+								  "justification", GTK_JUSTIFY_CENTER,
+								  "anchor", GTK_ANCHOR_CENTER,
+								  "x",
+								  (gdouble) (node_pos->x - INCH_TO_PIXELS (node_width)/2),
+								  "y", (gdouble) -node_pos->y,
+								  "fill_color_gdk",
+								  &plugin->canvas->style->text[GTK_STATE_NORMAL],
+								  "anchor", GTK_ANCHOR_W,        
+								  NULL );
+		
+	/* center the text in the node... */
+	g_object_get (item, "text_width", &text_width_value, NULL);
+						
+	gnome_canvas_item_set (item, "x",
+						   (gdouble)((node_pos->x - text_width_value/2)), NULL);
+
+	plugin->drawable_list = g_list_prepend (plugin->drawable_list, item);
+}
+
+
+/*----------------------------------------------------------------------------
+ * draw the graph on the canvas. So nodes, edges, arrows, texts..
+ * If something is found already drawn on the canvas it is cleaned before
+ * draw new things.
+ */
+static void
+cls_inherit_draw_graph (AnjutaClassInheritance *plugin)
+{
+	gint num_nodes;
+	gdouble max_canvas_size_x, max_canvas_size_y;
+	GnomeCanvasItem *item;
+	Agnode_t *graph_node;
+	Agedge_t *edge;
+	
+	if (plugin->graph == NULL)
+		return;
+	
+	DEBUG_PRINT ("%s", "======== going to draw graph ========");
+	num_nodes = agnnodes (plugin->graph);	
+	g_return_if_fail (num_nodes > 0);
+	
+	/* compiles nodes/edges informations, such as positions, coordinates etc */
+	gvLayout (plugin->gvc, plugin->graph, "dot");
+	
+	/* set the size of the canvas. We need this to set the scrolling.. */
+	max_canvas_size_x = max_canvas_size_y = CANVAS_MIN_SIZE;
+	
+	/* check whether we had already drawn something on the canvas.
+	 * In case remove the items so we can clean up the canvas ready
+	 * for others paints
+	 */
+	if (g_list_length (plugin->drawable_list) > 0 ||
+		g_list_length (plugin->node_list) > 0)
+	{
+		class_inheritance_clean_canvas (plugin);
+	}
+		
+	/* first of all draw the nodes */
+	for (graph_node = agfstnode (plugin->graph); graph_node; 
+		 graph_node = agnxtnode (plugin->graph, graph_node))
+	{
+		gdouble node_width;
+		gdouble node_height;
+		point node_pos;
+#ifndef ND_coord_i
+		pointf node_posf;
+#endif
+		
+		/* get some infos from the node */
+#ifdef ND_coord_i
+		node_pos = ND_coord_i(graph_node);
+#else
+		node_posf = ND_coord(graph_node);
+		PF2P(node_posf,node_pos);
+#endif
+		
+		node_width = ND_width (graph_node);
+		node_height = ND_height (graph_node);
+
+		if (strcmp ("record", ND_shape (graph_node)->name) == 0 ) 
+		{
+			cls_inherit_draw_expanded_node (plugin, graph_node, &node_pos, node_width, 
+											node_height);
+		}
+		else			/* it's a normal single node */
+			cls_inherit_draw_single_node (plugin, graph_node, &node_pos, node_width, 
+										  node_height);
+
+		/* --- edges --- */
+		for (edge = agfstedge (plugin->graph, graph_node); edge;
+			 edge = agnxtedge (plugin->graph, edge, graph_node))
+		{
+			GnomeCanvasPathDef *path_def;
+ 			gint i;
+			
+			path_def = gnome_canvas_path_def_new();
+			
+			for ( i = 0; i < ED_spl(edge)->list->size-1; i+=3)
+			{
+				
+				/* go on with bezier curves. We can retrieve the info such
+				 * as control points from the struct of the edge
+				 */
+				gnome_canvas_path_def_moveto (path_def,
+									  ((ED_spl(edge))->list->list[0+i]).x, 
+									  -((ED_spl(edge))->list->list[0+i]).y);
+				
+				gnome_canvas_path_def_curveto (path_def, 
+									   ((ED_spl(edge))->list->list[1+i]).x, 
+									   -((ED_spl(edge))->list->list[1+i]).y,
+									   ((ED_spl(edge))->list->list[2+i]).x, 
+									   -((ED_spl(edge))->list->list[2+i]).y,
+									   ((ED_spl(edge))->list->list[3+i]).x, 
+									   -((ED_spl(edge))->list->list[3+i]).y);
+				
+				/* check whether we have to draw an arrow. Is the right point? */				
+				if ( i+3 >= (ED_spl(edge)->list->size-1) )
+				{
+					GnomeCanvasPoints * points;
+					gdouble upper_bound = (gdouble)(node_pos.y +
+											INCH_TO_PIXELS (node_height)/2);
+					gdouble x_offset;
+					gint h;
+					
+					/*
+					          __|__   _ 
+					          \   /    |
+					           \ /     | h 
+					            Â     _|
+					      ^^^^^^^^^^^^^
+					*/
+					
+					h = abs (((ED_spl(edge))->list->list[3+i]).y - upper_bound);
+					
+					if ((((ED_spl(edge))->list->list[3+i]).x -
+						((ED_spl(edge))->list->list[2+i]).x) > 0)
+						x_offset = sqrt( abs(10*10 - h*h));
+					else
+						x_offset = -sqrt( abs(10*10 - h*h));
+					
+					/* let's draw a canvas_line with an arrow-end */
+					points = gnome_canvas_points_new (2);
+
+					/* starting point */
+					points->coords[0] = ((ED_spl(edge))->list->list[3+i]).x;
+					points->coords[1] = -((ED_spl(edge))->list->list[3+i]).y;
+					
+					/* pointer */
+					points->coords[2] =
+						((ED_spl(edge))->list->list[3+i]).x + x_offset;
+					points->coords[3] = -upper_bound;
+					
+					/* ok we take an arrow_max_length of 10 pixels for default. */
+					if ( abs(x_offset) <= 10 )
+					{
+						item =
+							gnome_canvas_item_new (gnome_canvas_root
+										   (GNOME_CANVAS (plugin->canvas)),
+										   gnome_canvas_line_get_type(),
+										   "points", points,
+										   "fill_color_gdk",
+							  &plugin->canvas->style->text[GTK_STATE_NORMAL],
+												   "last_arrowhead", TRUE,
+												   "arrow_shape_a", 10.0,
+												   "arrow_shape_b", 10.0,
+												   "arrow_shape_c", 4.0,
+												   "width_units", 1.0,
+												   NULL);
+						plugin->drawable_list =
+							g_list_prepend (plugin->drawable_list, item);
+					}
+				}
+			}
+			
+			/* draw the path_def */
+         	item = gnome_canvas_item_new (gnome_canvas_root
+									   (GNOME_CANVAS (plugin->canvas)), 
+									   gnome_canvas_bpath_get_type(),
+									   "bpath", path_def,
+									   "outline_color_gdk",
+									   &plugin->canvas->style->text[GTK_STATE_NORMAL],
+									   "width_pixels", 1,
+									   NULL);
+			plugin->drawable_list =
+				g_list_prepend (plugin->drawable_list, item);
+		}
+
+		if (abs(node_pos.x) > max_canvas_size_x ) 
+			max_canvas_size_x = abs(node_pos.x) + INCH_TO_PIXELS (node_width)/2;
+		
+		if (abs(node_pos.y + node_height) > max_canvas_size_y) 
+			max_canvas_size_y = abs(node_pos.y) + INCH_TO_PIXELS (node_height)/2;
+	}	
+	
+	gtk_widget_set_size_request (plugin->canvas, max_canvas_size_x +100,
+								 max_canvas_size_y +100);
+	gnome_canvas_set_scroll_region ( GNOME_CANVAS (plugin->canvas), -50,
+									50, max_canvas_size_x + 50,
+									-max_canvas_size_y -100);
+	
+	cls_inherit_graph_cleanup (plugin);
+}
+
+/*----------------------------------------------------------------------------
+ * update the internal graphviz graph-structure, then redraw the graph on the 
+ * canvas
+ */
+void
+class_inheritance_update_graph (AnjutaClassInheritance *plugin)
+{
+	IAnjutaSymbolManager *sm;
+	IAnjutaIterable *iter;
+	IAnjutaSymbol *symbol;
+	GList *node;
+	GTree *klass_parents;
+	GList *klasses_list;
+
+	g_return_if_fail (plugin != NULL);
+
+	if (plugin->top_dir == NULL)
+		return;
+	
+	sm = anjuta_shell_get_interface (ANJUTA_PLUGIN (plugin)->shell,
+									 IAnjutaSymbolManager, NULL);
+	if (!sm)
+		return;
+
+	/* Get all classes */	
+	iter = ianjuta_symbol_manager_search (sm, IANJUTA_SYMBOL_TYPE_CLASS, 
+										  TRUE,
+										  IANJUTA_SYMBOL_FIELD_SIMPLE,
+										  NULL, TRUE, TRUE, FALSE, -1, -1, NULL);
+	if (!iter)
+	{
+		DEBUG_PRINT ("%s", "class_inheritance_update_graph (): search returned no items.");
+		return;
+	}
+	
+	/*
+	DEBUG_PRINT ("Number of classes found = %d",
+				 ianjuta_iterable_get_length (iter, NULL));	
+
+
+	do {
+		const gchar *class_name;
+		symbol = IANJUTA_SYMBOL (iter);
+		class_name = ianjuta_symbol_get_name (symbol, NULL);
+		DEBUG_PRINT ("=======> %s", class_name);
+	}
+	while (ianjuta_iterable_next (iter, NULL) == TRUE);
+	*/	
+	
+	ianjuta_iterable_first (iter, NULL);
+	if (ianjuta_iterable_get_length (iter, NULL) <= 0)
+	{
+		g_object_unref (iter);
+		return;
+	}
+	
+	/* initialize the glist and the gtree where to store the klass_ids */
+	klasses_list = NULL;
+	klass_parents = g_tree_new_full ((GCompareDataFunc)&gtree_compare_func, 
+										 NULL,
+										 NULL,
+										 g_object_unref);
+
+	do 
+	{
+		gint klass_id;
+		IAnjutaIterable *parents;
+     
+		/* a symbol representing a class */
+		symbol = IANJUTA_SYMBOL (iter);
+
+		/* get parents of the current class */
+		parents = ianjuta_symbol_manager_get_class_parents (sm, symbol, 
+															IANJUTA_SYMBOL_FIELD_SIMPLE, 
+															NULL);
+
+		/* if no parents are found then continue */
+		if (parents == NULL || ianjuta_iterable_get_length (parents, NULL) <= 0)
+		{
+			/*DEBUG_PRINT ("ClassInheritance: no parents found for class %s",
+						 ianjuta_symbol_get_name (symbol, NULL));*/
+			continue;
+		}
+
+		if ((klass_id = ianjuta_symbol_get_id (symbol, NULL)) <= 0)
+		{
+			/*DEBUG_PRINT ("%s", "ClassInheritance: klass_id cannot be <= 0");*/
+			continue;
+		}
+
+		if (g_tree_lookup (klass_parents, GINT_TO_POINTER (klass_id)) != NULL)
+		{
+			/* we already have a class inserted with that name */
+			continue;
+		}	
+		
+		/* insert into the gtree a class name id together with the associated parents */
+		g_tree_insert (klass_parents, GINT_TO_POINTER (klass_id), parents);
+
+		klasses_list = g_list_prepend (klasses_list, GINT_TO_POINTER (klass_id));
+
+	} while (ianjuta_iterable_next (iter, NULL) == TRUE);
+
+	klasses_list = g_list_reverse (klasses_list);
+
+	/* we don't need the classes iter anymore */
+	if (iter != NULL)
+		g_object_unref (iter);
+	else
+		return;
+
+	/* For all classes get their parents */
+	node = klasses_list;
+	while (node)
+	{
+		gint klass_id;
+		IAnjutaIterable *parents;
+		IAnjutaSymbol *klass_symbol;
+
+		klass_id = GPOINTER_TO_INT (node->data);
+		parents = g_tree_lookup (klass_parents, GINT_TO_POINTER (klass_id));
+		klass_symbol = ianjuta_symbol_manager_get_symbol_by_id (sm,
+													klass_id,
+													IANJUTA_SYMBOL_FIELD_SIMPLE,
+													NULL);
+		
+		do 
+		{
+			IAnjutaSymbol *parent_symbol;
+			parent_symbol = IANJUTA_SYMBOL (parents);
+			
+			cls_inherit_add_node (plugin, klass_symbol);
+			cls_inherit_add_node (plugin, parent_symbol);
+			cls_inherit_add_edge (plugin, parent_symbol, klass_symbol);			
+		} while (ianjuta_iterable_next (parents, NULL) == TRUE);
+
+		/* we don't need it anymore */
+		g_object_unref (klass_symbol);
+		
+		/* parse next deriver class in the glist */
+		node = g_list_next (node);
+	}
+
+	g_list_free (klasses_list);
+	g_tree_destroy (klass_parents);
+	cls_inherit_draw_graph (plugin);
+}
+
+static GnomeUIInfo canvas_menu_uiinfo[] = {
+	{ /*0*/
+	 GNOME_APP_UI_ITEM, 
+	 N_("Update"),
+	 N_("Update the graph"),
+	 on_update_menu_item_selected,
+	 NULL, 
+	 NULL,
+	 GNOME_APP_PIXMAP_NONE,
+	 NULL,
+	 0, 
+	 0, 
+	 NULL},
+	GNOMEUIINFO_END
+};
+
+void 
+class_inheritance_gtree_clear (AnjutaClassInheritance *plugin) {
+	
+	if (plugin->expansion_node_list == NULL)
+		return;
+	
+	/* destroy the nodestatus hash table */
+	g_tree_destroy (plugin->expansion_node_list);
+	
+	/* reinitialize the table */
+	plugin->expansion_node_list = g_tree_new_full ((GCompareDataFunc)&gtree_compare_func, 
+								NULL,
+								NULL, 
+								(GDestroyNotify)cls_inherit_nodestatus_destroy);	
+}
+
+void
+class_inheritance_base_gui_init (AnjutaClassInheritance *plugin)
+{
+	GtkWidget *s_window;
+
+	s_window = gtk_scrolled_window_new (NULL, NULL);
+	plugin->canvas = gnome_canvas_new_aa ();
+	/*gtk_widget_modify_bg (plugin->canvas, GTK_STATE_NORMAL,
+						  &plugin->canvas->style->base[GTK_STATE_NORMAL]);*/
+	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (s_window),
+									GTK_POLICY_AUTOMATIC, 
+									GTK_POLICY_AUTOMATIC);
+	gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (s_window),
+										   plugin->canvas);
+
+	gtk_widget_set_size_request (plugin->canvas, CANVAS_MIN_SIZE,
+								 CANVAS_MIN_SIZE);
+	gnome_canvas_set_scroll_region (GNOME_CANVAS (plugin->canvas),
+									-CANVAS_MIN_SIZE/2, 
+									CANVAS_MIN_SIZE/2,
+									CANVAS_MIN_SIZE/2,
+									-CANVAS_MIN_SIZE/2);
+
+	g_signal_connect (G_OBJECT (plugin->canvas), "event",
+					  G_CALLBACK (on_canvas_event),
+					  plugin);
+					  
+	g_signal_connect (G_OBJECT (plugin->canvas),
+					  "style_set",
+					  G_CALLBACK (on_style_set),
+					  plugin);
+					  
+	plugin->widget = gtk_vbox_new (FALSE, 2);
+	/* --packing-- */
+	/* vbox */
+	gtk_box_pack_start (GTK_BOX (plugin->widget), s_window, TRUE, TRUE, TRUE);
+	
+	gtk_widget_show_all (plugin->widget);
+	
+	/* create new GList */
+	plugin->drawable_list = NULL;
+	plugin->node_list = NULL;
+	
+	plugin->expansion_node_list = g_tree_new_full ((GCompareDataFunc)&gtree_compare_func, 
+										 NULL,
+										 NULL,
+										 (GDestroyNotify)cls_inherit_nodestatus_destroy);
+											
+
+	/* menu create */
+	plugin->menu = gtk_menu_new ();
+	
+	/* set the user data on update selection */
+	canvas_menu_uiinfo[0].user_data = plugin;
+	
+	gnome_app_fill_menu (GTK_MENU_SHELL (plugin->menu), canvas_menu_uiinfo,
+						NULL, FALSE, 0);
+	
+	plugin->update = canvas_menu_uiinfo[0].widget;
+	
+	g_object_ref (plugin->menu);
+	g_object_ref (plugin->update);
+}

Added: trunk/plugins/class-inheritance/class-inherit.h
==============================================================================
--- (empty file)
+++ trunk/plugins/class-inheritance/class-inherit.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,80 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ *  Copyright (C) Massimo Cora' 2005 <maxcvs email it>
+ *
+ *  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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+ 
+#ifndef _CLASS_INHERIT_H
+#define _CLASS_INHERIT_H
+
+#include <libanjuta/interfaces/ianjuta-symbol-manager.h>
+#include <gnome.h>
+
+#include "plugin.h"
+
+G_BEGIN_DECLS
+
+#define NODE_FONT_DEFAULT "-*-clean-medium-r-normal-*-10-*-*-*-*-*-*"
+#define NODE_HALF_DISPLAY_ELEM_NUM			10
+#define NODE_SHOW_ALL_MEMBERS_STR			N_("Show all members...")
+#define NODE_SHOW_NORMAL_VIEW_STR			N_("Normal view")
+
+
+
+
+typedef struct _NodeData {
+	GnomeCanvasItem *canvas_item;  	/* item itself */
+	gint klass_id;					/* unique class identifier */
+	gchar *sub_item;			   	/* case of an expanded node */
+	gboolean anchored;             	/* should it be anchored [e.g. paint all the 
+	                                 * data to the graph?]
+	                                 */
+	GtkWidget *menu;
+	AnjutaClassInheritance *plugin;
+} NodeData;
+
+
+typedef struct _NodeExpansionStatus {	
+	gint klass_id;
+	gint expansion_status;
+	
+} NodeExpansionStatus;
+
+
+enum {
+	NODE_NOT_EXPANDED,
+	NODE_HALF_EXPANDED,
+	NODE_FULL_EXPANDED
+};
+
+
+gchar *
+class_inheritance_create_agnode_key_name (const IAnjutaSymbol* symbol);
+
+IAnjutaSymbol *
+class_inheritance_get_symbol_from_agnode_key_name (AnjutaClassInheritance *plugin,
+												   const gchar *key);
+
+void class_inheritance_base_gui_init (AnjutaClassInheritance *plugin);
+void class_inheritance_update_graph (AnjutaClassInheritance *plugin);
+void class_inheritance_clean_canvas (AnjutaClassInheritance *plugin);
+void class_inheritance_show_dynamic_class_popup_menu (GdkEvent *event,
+										   NodeData* nodedata);
+void class_inheritance_gtree_clear (AnjutaClassInheritance *plugin);
+
+G_END_DECLS
+ 
+#endif /* _CLASS_INHERIT_H */

Added: trunk/plugins/class-inheritance/plugin.c
==============================================================================
--- (empty file)
+++ trunk/plugins/class-inheritance/plugin.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,208 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * plugin.c
+ * Copyright (C) Massimo Cora' 2005 <maxcvs email it>
+ * 
+ * plugin.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include <config.h>
+#include <libanjuta/anjuta-shell.h>
+#include <glib/gi18n.h>
+#include <libanjuta/interfaces/ianjuta-document-manager.h>
+#include <libanjuta/interfaces/ianjuta-project-manager.h>
+#include <libanjuta/anjuta-debug.h>
+#include <gnome.h>
+#include "plugin.h"
+#include "class-inherit.h"
+
+#define ICON_FILE "anjuta-class-inheritance-plugin-48.png"
+
+static gpointer parent_class;
+
+static void
+project_root_added (AnjutaPlugin *plugin, const gchar *name,
+					const GValue *value, gpointer user_data)
+{
+	AnjutaClassInheritance *ci_plugin;
+	const gchar *root_uri;
+
+	ci_plugin = ANJUTA_PLUGIN_CLASS_INHERITANCE (plugin);
+	root_uri = g_value_get_string (value);
+	
+	if (root_uri)
+	{
+		gchar *root_dir = anjuta_util_get_local_path_from_uri (root_uri);
+		if (root_dir)
+		{	
+			ci_plugin->top_dir = g_strdup(root_dir);
+		}
+		else
+			ci_plugin->top_dir = NULL;
+		g_free (root_dir);
+	}
+	else
+		ci_plugin->top_dir = NULL;
+	
+	/* let's update the graph */
+	class_inheritance_update_graph (ci_plugin);
+}
+
+static void
+project_root_removed (AnjutaPlugin *plugin, const gchar *name,
+					  gpointer user_data)
+{
+	AnjutaClassInheritance *ci_plugin;
+	ci_plugin = ANJUTA_PLUGIN_CLASS_INHERITANCE (plugin);
+	
+	/* clean up the canvas */
+	class_inheritance_clean_canvas (ci_plugin);
+
+	/* destroy and re-initialize the hashtable */
+	class_inheritance_gtree_clear (ci_plugin);
+	
+	if (ci_plugin->top_dir)
+		g_free(ci_plugin->top_dir);
+	ci_plugin->top_dir = NULL;
+}
+
+static void
+register_stock_icons (AnjutaPlugin *plugin)
+{
+	static gboolean registered = FALSE;
+
+	if (registered)
+		return;
+	registered = TRUE;
+
+	BEGIN_REGISTER_ICON (plugin);
+	REGISTER_ICON (PACKAGE_PIXMAPS_DIR"/"ICON_FILE,
+				   "class-inheritance-plugin-icon");
+	END_REGISTER_ICON;
+}
+
+static gboolean
+activate_plugin (AnjutaPlugin *plugin)
+{
+	AnjutaClassInheritance *class_inheritance;
+	static gboolean initialized = FALSE;
+	
+	DEBUG_PRINT ("%s", "AnjutaClassInheritance: Activating plugin ...");
+	
+	register_stock_icons (plugin);
+	
+	class_inheritance = ANJUTA_PLUGIN_CLASS_INHERITANCE (plugin);
+	
+	class_inheritance_base_gui_init (class_inheritance);
+	
+	anjuta_shell_add_widget (plugin->shell, class_inheritance->widget,
+							 "AnjutaClassInheritance", _("Inheritance Graph"),
+							 "class-inheritance-plugin-icon",
+							 ANJUTA_SHELL_PLACEMENT_CENTER, NULL);
+	class_inheritance->top_dir = NULL;
+	
+	/* set up project directory watch */
+	class_inheritance->root_watch_id = anjuta_plugin_add_watch (plugin,
+									IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI,
+									project_root_added,
+									project_root_removed, NULL);
+
+	initialized	= TRUE;	
+	return TRUE;
+}
+
+static gboolean
+deactivate_plugin (AnjutaPlugin *plugin)
+{
+	DEBUG_PRINT ("%s", "AnjutaClassInheritance: Dectivating plugin ...");
+	AnjutaClassInheritance* class_inheritance;
+	class_inheritance = ANJUTA_PLUGIN_CLASS_INHERITANCE (plugin);
+
+	/* clean up the canvas [e.g. destroys it's elements */
+	class_inheritance_clean_canvas (class_inheritance);
+	
+	/* destroy the nodestatus gtree */
+	if (class_inheritance->expansion_node_list) {
+		g_tree_destroy (class_inheritance->expansion_node_list);
+		class_inheritance->expansion_node_list = NULL;
+	}
+	
+	/* Container holds the last ref to this widget so it will be destroyed as
+	 * soon as removed. No need to separately destroy it. */
+	/* In most cases, only toplevel widgets (windows) require explicit 
+	 * destruction, because when you destroy a toplevel its children will 
+	 * be destroyed as well. */
+	anjuta_shell_remove_widget (plugin->shell,
+								class_inheritance->widget,
+								NULL);
+
+	/* Remove watches */
+	anjuta_plugin_remove_watch (plugin,
+								class_inheritance->root_watch_id,
+								TRUE);
+	return TRUE;
+}
+
+static void
+class_inheritance_finalize (GObject *obj)
+{
+	AnjutaClassInheritance *ci_plugin;
+	ci_plugin = ANJUTA_PLUGIN_CLASS_INHERITANCE (obj);
+	
+	if (ci_plugin->top_dir)
+		g_free (ci_plugin->top_dir);
+	
+	/* Finalization codes here */
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+class_inheritance_dispose (GObject *obj)
+{
+	/* Disposition codes */
+	G_OBJECT_CLASS (parent_class)->dispose (obj);
+}
+
+static void
+class_inheritance_instance_init (GObject *obj)
+{
+	AnjutaClassInheritance *plugin = ANJUTA_PLUGIN_CLASS_INHERITANCE (obj);
+
+	plugin->uiid = 0;
+
+	plugin->widget = NULL;
+	plugin->graph = NULL;
+	plugin->gvc = NULL;
+	plugin->expansion_node_list = NULL;
+}
+
+static void
+class_inheritance_class_init (GObjectClass *klass) 
+{
+	AnjutaPluginClass *plugin_class = ANJUTA_PLUGIN_CLASS (klass);
+
+	parent_class = g_type_class_peek_parent (klass);
+
+	plugin_class->activate = activate_plugin;
+	plugin_class->deactivate = deactivate_plugin;
+	klass->finalize = class_inheritance_finalize;
+	klass->dispose = class_inheritance_dispose;
+}
+
+ANJUTA_PLUGIN_BOILERPLATE (AnjutaClassInheritance, class_inheritance);
+ANJUTA_SIMPLE_PLUGIN (AnjutaClassInheritance, class_inheritance);

Added: trunk/plugins/class-inheritance/plugin.h
==============================================================================
--- (empty file)
+++ trunk/plugins/class-inheritance/plugin.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,74 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * plugin.h
+ * Copyright (C) Massimo Cora' 2005 <maxcvs email it>
+ * 
+ * plugin.h 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, or (at your option) any later version.
+ * 
+ * plugin.h 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 plugin.h.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _CLASS_INHERITANCE_H_
+#define _CLASS_INHERITANCE_H_
+
+#include <libanjuta/anjuta-plugin.h>
+
+#include <gvc.h>		/* graphviz */
+
+G_BEGIN_DECLS
+
+extern GType class_inheritance_get_type (GTypeModule *module);
+#define ANJUTA_TYPE_PLUGIN_CLASS_INHERITANCE         (class_inheritance_get_type (NULL))
+#define ANJUTA_PLUGIN_CLASS_INHERITANCE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_PLUGIN_CLASS_INHERITANCE, AnjutaClassInheritance))
+#define ANJUTA_PLUGIN_CLASS_INHERITANCE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), ANJUTA_TYPE_PLUGIN_CLASS_INHERITANCE, AnjutaClassInheritanceClass))
+#define ANJUTA_IS_PLUGIN_CLASS_INHERITANCE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_PLUGIN_CLASS_INHERITANCE))
+#define ANJUTA_IS_PLUGIN_CLASS_INHERITANCE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_PLUGIN_CLASS_INHERITANCE))
+#define ANJUTA_PLUGIN_CLASS_INHERITANCE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), ANJUTA_TYPE_PLUGIN_CLASS_INHERITANCE, AnjutaClassInheritanceClass))
+
+
+typedef struct _AnjutaClassInheritance AnjutaClassInheritance;
+typedef struct _AnjutaClassInheritanceClass AnjutaClassInheritanceClass;
+
+struct _AnjutaClassInheritance {
+	AnjutaPlugin parent;
+	
+	GtkWidget *widget;        /* a vbox */
+	GtkWidget *update_button;	
+	GtkWidget *menu;
+	GtkWidget *update;
+	
+	GtkWidget *canvas;
+	GList *drawable_list;   		/* GnomeCanvasItem* list. Edges, arrows and texts */
+	GList *node_list;					/* NodeData* list */
+
+	GTree *expansion_node_list;	/* expansion_status for the nodes */
+
+	/* graphviz stuff */	
+	GVC_t *gvc;
+	Agraph_t *graph;
+	
+	gchar *top_dir;
+	guint root_watch_id;
+	gint uiid;
+};
+
+struct _AnjutaClassInheritanceClass {
+	AnjutaPluginClass parent_class;
+};
+
+G_END_DECLS
+
+#endif

Added: trunk/plugins/indent/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/plugins/indent/Makefile.am	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,70 @@
+# Sample Makefile for a anjuta plugin.
+
+# Plugin glade file
+indent_gladedir = $(anjuta_glade_dir)
+indent_glade_DATA = indent.glade
+
+# Plugin UI file
+indent_uidir = $(anjuta_ui_dir)
+indent_ui_DATA =  anjuta-indent.ui
+
+# Plugin Icon file
+indent_pixmapsdir = $(anjuta_image_dir)
+indent_pixmaps_DATA = anjuta-indent-plugin.png indent_auto.xpm indent_set.xpm
+
+# Plugin description file
+plugin_in_files = indent.plugin.in
+%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+indent_plugindir = $(anjuta_plugin_dir)
+indent_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
+
+# Test file for anjuta indent
+indent_datadir = $(anjuta_data_dir)
+indent_data_DATA = indent_test.c
+
+# NOTE :
+# The naming convention is very intentional
+# We are forced to use the prefix 'lib' by automake and libtool
+#    There is probably a way to avoid it but it is not worth to effort
+#    to find out.
+# The 'anjuta_' prfix is a safety measure to avoid conflicts where the
+#    plugin 'libpython.so' needs to link with the real 'libpython.so'
+
+# Include paths
+AM_CPPFLAGS = \
+	$(LIBANJUTA_CFLAGS) \
+	$(EXTRA_CFLAGS)
+
+# Where to install the plugin
+plugindir = $(anjuta_plugin_dir)
+
+# The plugin
+plugin_LTLIBRARIES = libanjuta-indent.la
+
+# Plugin sources
+libanjuta_indent_la_SOURCES = \
+	plugin.c \
+	plugin.h \
+	indent-dialog.c \
+	indent-dialog.h \
+	indent-util.c \
+	indent-util.h
+
+libanjuta_indent_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
+
+# Plugin dependencies
+libanjuta_indent_la_LIBADD = \
+	$(GTK_LIBS) \
+	$(LIBANJUTA_LIBS)
+
+prefs_glade_files = indent.glade
+include $(top_srcdir)/scripts/build-schemas.mk
+
+EXTRA_DIST = \
+	$(plugin_in_files) \
+	$(indent_plugin_DATA) \
+	$(indent_ui_DATA) \
+	$(indent_pixmaps_DATA) \
+	$(indent_data) \
+	$(indent_glade_DATA)

Added: trunk/plugins/indent/anjuta-indent-plugin.png
==============================================================================
Binary file. No diff available.

Added: trunk/plugins/indent/anjuta-indent.ui
==============================================================================
--- (empty file)
+++ trunk/plugins/indent/anjuta-indent.ui	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,11 @@
+<!--*- xml -*-->
+<ui>
+	<menubar name="MenuMain">
+		<placeholder name="PlaceHolderToolMenus">
+		<menu name="MenuTools" action="ActionMenuTools">
+					<menuitem name="Autoformat" action="ActionFormatAutoformat" />
+				<separator name="separator1" />
+		</menu>
+		</placeholder>
+	</menubar>
+</ui>

Added: trunk/plugins/indent/indent-dialog.c
==============================================================================
--- (empty file)
+++ trunk/plugins/indent/indent-dialog.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,575 @@
+/*
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */ 
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gnome.h>
+#include <glade/glade.h>
+
+#include "indent-util.h"
+#include "indent-dialog.h"
+
+
+#define PARAMETERS_ENTRY "indent_parameters_entry"
+#define PREVIEW_BUTTON "indent_preview_button"
+#define UPDATE_BUTTON "indent_update_button"
+#define DELETE_BUTTON "indent_delete_button"
+#define NEW_BUTTON "indent_new_button"
+#define QUIT_BUTTON "indent_quit_button"
+#define STYLE_COMBOBOX "indent_style_combobox"
+#define PREVIEW_TEXTVIEW "indent_preview_textview"
+#define DIALOG "indent_dialog"
+#define STYLE_ENTRY "indent_style_entry"
+
+
+void indent_widget_signal_connect(gchar *name_widget, gchar *signal, 
+                                  gpointer func,IndentData *idt);
+gchar *indent_spinbutton_get_value(gchar *name_widget, IndentData *idt);
+void indent_init_items(gpointer key, gpointer data, IndentData *idt);
+void indent_connect_items(gpointer key, gpointer data, IndentData *idt);
+void indent_init_dialog(IndentData *idt);
+void indent_init_connect(IndentData *idt);
+gchar *indent_entry_get_chars(IndentData *idt);
+void indent_entry_set_chars(gchar *text, IndentData *idt);
+void indent_block_widget(gchar *name_widget, gpointer func, gboolean block, 
+                         IndentData *idt);
+void on_indent_checkbutton_toggled(GtkToggleButton *button, IndentData *idt);
+void on_indent_spinbutton_value_changed(GtkSpinButton *button, IndentData *idt);
+void on_indent_parameters_entry_changed(GtkEditable *edit, IndentData *idt);
+void on_indent_preview_button_clicked(GtkButton *button, IndentData *idt);
+void on_indent_update_button_clicked(GtkButton *button, IndentData *idt);
+void on_indent_new_button_clicked(GtkButton *button, IndentData *idt);
+void on_indent_delete_button_clicked(GtkButton *button, IndentData *idt);
+void on_indent_style_combobox_changed(GtkComboBox *combo, IndentData *idt);
+void on_indent_quit_button_clicked(GtkButton *button, IndentData *idt);
+void indent_set_style_combo(gint index, IndentData *idt);
+void indent_exit(GtkWidget *widget, gpointer user_data);
+void indent_display_buffer(gchar *buffer, IndentData *idt);
+
+
+
+/*****************************************************************************/
+void
+pref_style_combo_changed(GtkComboBox *combo, IndentData *idt)
+{
+	gchar *style_name;
+	gchar *options;
+	
+	style_name = gtk_combo_box_get_active_text(combo);
+	options = indent_find_style(style_name, idt);
+	if (options)
+		gtk_entry_set_text(GTK_ENTRY(idt->pref_indent_options), options);
+	indent_save_active_style(style_name, options, idt);
+}
+
+void
+pref_set_style_combo(IndentData *idt)
+{
+	GList *list;
+	IndentStyle *ist;
+
+	list = idt->style_list;
+	while (list)
+	{
+		ist = list->data;
+		gtk_combo_box_append_text(GTK_COMBO_BOX(idt->pref_indent_combo), ist->name);
+		list = g_list_next(list);
+	}	
+	gtk_combo_box_set_active(GTK_COMBO_BOX(idt->pref_indent_combo), idt->style_active);
+}
+
+/*****************************************************************************/
+
+void
+indent_widget_signal_connect(gchar *name_widget, gchar *signal, gpointer func,
+                             IndentData *idt)
+{
+	GtkWidget *widget;
+	
+	widget = glade_xml_get_widget(idt->xml, name_widget);
+	g_signal_connect(widget, signal, G_CALLBACK (func), idt);
+}
+
+void
+indent_toggle_button_set_active(gchar *name_widget, gboolean active, IndentData *idt)
+{
+	GtkWidget *widget;
+	
+	widget = glade_xml_get_widget(idt->xml, name_widget);
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (widget), active);
+}
+
+void
+indent_widget_set_sensitive(gchar *name_widget, gboolean sensitive, IndentData *idt)
+{
+	GtkWidget *widget;
+	
+	widget = glade_xml_get_widget(idt->xml, name_widget);
+	gtk_widget_set_sensitive(widget, sensitive);
+}
+
+void
+indent_spinbutton_set_value(gchar *name_widget, gchar *num, IndentData *idt)
+{
+	GtkWidget *widget;
+
+	widget = glade_xml_get_widget(idt->xml, name_widget);
+	gtk_spin_button_set_value(GTK_SPIN_BUTTON (widget), g_strtod(num, NULL));
+}
+
+gchar *
+indent_spinbutton_get_value(gchar *name_widget, IndentData *idt)
+{
+	GtkWidget *widget;
+	gint value;
+
+	widget = glade_xml_get_widget(idt->xml, name_widget);
+	value = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON (widget));
+	return g_strdup_printf("%d", value); 
+}
+
+void
+indent_init_items(gpointer key, gpointer data, IndentData *idt)
+{
+	OptionData *ptrdata;
+
+	ptrdata = data;
+	indent_toggle_button_set_active(ptrdata->checkbutton, FALSE, idt);
+	if (ptrdata->spinbutton)
+		indent_widget_set_sensitive(ptrdata->spinbutton, FALSE, idt);
+}
+
+void
+indent_connect_items(gpointer key, gpointer data, IndentData *idt)
+{
+	OptionData *ptrdata;
+
+	ptrdata = data;
+	indent_widget_signal_connect(ptrdata->checkbutton,  "toggled",
+	                 G_CALLBACK(on_indent_checkbutton_toggled), 
+	                 idt);
+	
+	if (ptrdata->spinbutton)
+		indent_widget_signal_connect(ptrdata->spinbutton, "value_changed",
+	                 G_CALLBACK(on_indent_spinbutton_value_changed), 
+	                 idt);
+}
+
+void
+indent_init_dialog(IndentData *idt)
+{
+	g_hash_table_foreach(idt->option_hash, (GHFunc) indent_init_items, idt);
+}
+
+void
+indent_init_connect(IndentData *idt)
+{
+	g_hash_table_foreach(idt->option_hash, (GHFunc) indent_connect_items, idt);
+	indent_widget_signal_connect(PARAMETERS_ENTRY, "changed",
+	                 G_CALLBACK (on_indent_parameters_entry_changed), 
+	                 idt);
+	indent_widget_signal_connect(PREVIEW_BUTTON, "clicked",
+	                 G_CALLBACK (on_indent_preview_button_clicked), 
+	                 idt);
+	indent_widget_signal_connect(UPDATE_BUTTON, "clicked",
+	                 G_CALLBACK (on_indent_update_button_clicked), 
+	                 idt);
+	indent_widget_signal_connect(DELETE_BUTTON, "clicked",
+	                 G_CALLBACK (on_indent_delete_button_clicked), 
+	                 idt);
+	indent_widget_signal_connect(NEW_BUTTON, "clicked",
+	                 G_CALLBACK (on_indent_new_button_clicked), 
+	                 idt);
+	indent_widget_signal_connect(QUIT_BUTTON, "clicked",
+	                 G_CALLBACK (on_indent_quit_button_clicked), 
+	                 idt);
+	indent_widget_signal_connect(STYLE_COMBOBOX, "changed",
+	                 G_CALLBACK (on_indent_style_combobox_changed), 
+	                 idt);
+}
+
+gchar *
+indent_entry_get_chars(IndentData *idt)
+{
+	GtkWidget *widget;
+
+	widget = glade_xml_get_widget(idt->xml, PARAMETERS_ENTRY);
+	return gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1);
+}
+
+void
+indent_entry_set_chars(gchar *text, IndentData *idt)
+{
+	GtkWidget *widget;
+
+	widget = glade_xml_get_widget(idt->xml, PARAMETERS_ENTRY);
+	gtk_entry_set_text(GTK_ENTRY(widget), text);
+}
+
+void
+indent_block_widget(gchar *name_widget, gpointer func, gboolean block, IndentData *idt)
+{
+	GtkWidget *widget;
+
+	widget = glade_xml_get_widget(idt->xml, name_widget);
+	if (block)
+		g_signal_handlers_block_by_func (GTK_OBJECT (widget), func, NULL);
+	else
+		g_signal_handlers_unblock_by_func (GTK_OBJECT (widget), func, NULL);
+}
+
+
+void
+on_indent_checkbutton_toggled(GtkToggleButton *button, IndentData *idt)
+{
+	const gchar *checkname;
+	gboolean num;
+	CheckData *ptrcheck;
+	gchar *line;
+	gchar *option;
+	
+	if (idt->checkbutton_blocked) return; 
+	
+	checkname = gtk_widget_get_name (GTK_WIDGET(button));
+	if ( (ptrcheck = g_hash_table_lookup(idt->check_hash, checkname)) == NULL)
+		return;
+	num = ptrcheck->spinbutton ? TRUE : FALSE;
+	line = indent_entry_get_chars(idt);
+	line = indent_delete_option(line, ptrcheck->option, num);
+	if (gtk_toggle_button_get_active(button))
+	{
+		option = g_strconcat("-", ptrcheck->option, NULL);
+		if (ptrcheck->spinbutton)
+		{
+			indent_widget_set_sensitive(ptrcheck->spinbutton, TRUE, idt);
+			option = g_strconcat(option, 
+			            indent_spinbutton_get_value(ptrcheck->spinbutton, idt), 
+			            NULL);	
+		}
+		line = indent_insert_option(line, option);
+		g_free(option);
+	}
+	else
+	{
+		if (ptrcheck->spinbutton)
+			indent_widget_set_sensitive(ptrcheck->spinbutton, FALSE, idt);
+		if (ptrcheck->not_option)
+		{
+			option = g_strconcat("-n", ptrcheck->option, NULL);
+			line = indent_insert_option(line, option);
+			g_free(option);
+		}
+	}
+	indent_block_widget(PARAMETERS_ENTRY, 
+	                    G_CALLBACK (on_indent_parameters_entry_changed),
+                        TRUE, idt);
+	indent_entry_set_chars(line, idt);
+	indent_block_widget(PARAMETERS_ENTRY, 
+	                    G_CALLBACK (on_indent_parameters_entry_changed),
+                        FALSE, idt);
+	g_free(line);
+}
+
+void
+on_indent_spinbutton_value_changed(GtkSpinButton *button, IndentData *idt)
+{
+	const gchar *spinname;
+	gchar *line;
+	gchar *option;
+	
+	if (idt->checkbutton_blocked) return;
+	
+	spinname = gtk_widget_get_name (GTK_WIDGET(button));
+	if ( (option = g_hash_table_lookup(idt->spin_hash, spinname)) == NULL)
+		return;
+	line = indent_entry_get_chars(idt);
+	line = indent_delete_option(line, option, TRUE);
+	option = g_strconcat("-", option, 
+	                     indent_spinbutton_get_value((gchar *)spinname, idt), NULL);	
+	line = indent_insert_option(line, option);
+	g_free(option);
+	indent_block_widget(PARAMETERS_ENTRY, 
+	                    G_CALLBACK (on_indent_parameters_entry_changed),
+                        TRUE, idt);
+	indent_entry_set_chars(line, idt);
+	indent_block_widget(PARAMETERS_ENTRY, 
+	                    G_CALLBACK (on_indent_parameters_entry_changed),
+                        FALSE, idt);
+	g_free(line);
+}
+
+void
+on_indent_parameters_entry_changed(GtkEditable *edit, IndentData *idt)
+{
+	idt->checkbutton_blocked = TRUE; 
+	indent_init_dialog(idt);
+	indent_anal_line_option(gtk_editable_get_chars(edit, 0, -1), idt);	
+	idt->checkbutton_blocked = FALSE; 
+}
+
+void
+indent_display_buffer(gchar *buffer, IndentData *idt)
+{
+	GtkWidget *widget;
+	GtkTextBuffer *text_buffer = NULL;
+	GtkTextTag *tag;
+	GtkTextIter start, end ;
+	
+	widget = glade_xml_get_widget(idt->xml, PREVIEW_TEXTVIEW);
+
+	text_buffer = gtk_text_buffer_new(NULL);
+	tag = gtk_text_buffer_create_tag(text_buffer, "police", 
+	                                 "left_margin", 5, 
+	                                 "font", "Courier", NULL);
+	gtk_text_buffer_set_text(text_buffer, buffer, -1);
+  	gtk_text_buffer_get_iter_at_offset(text_buffer, &start, 0);
+  	gtk_text_buffer_get_iter_at_offset(text_buffer, &end, -1);
+	gtk_text_buffer_apply_tag(text_buffer, tag, &start, &end);
+	gtk_text_view_set_buffer(GTK_TEXT_VIEW(widget), text_buffer);	
+}
+
+
+#define PREFS_GLADE PACKAGE_DATA_DIR"/glade/indent.glade"
+
+GtkWidget *create_dialog(IndentData *idt)
+{
+	idt->xml = glade_xml_new (PREFS_GLADE, DIALOG, NULL);
+
+	if (idt->xml == NULL)
+	{
+		g_warning("Unable to build user interface for Indent\n");
+		return NULL;
+	}
+	
+	glade_xml_signal_autoconnect (idt->xml);
+	idt->dialog = glade_xml_get_widget (idt->xml, DIALOG);
+		
+	indent_init_dialog(idt);
+	indent_init_connect(idt);
+	indent_set_style_combo(idt->style_active, idt);
+	
+	g_signal_connect(GTK_OBJECT(idt->dialog), "delete_event",
+                     (GCallBack)indent_exit,
+                     NULL);
+	g_signal_connect(GTK_OBJECT(idt->dialog), "destroy",
+                     (GCallBack)indent_exit,
+                     NULL);
+	return idt->dialog;
+}
+
+
+void
+indent_set_style_combo(gint index, IndentData *idt)
+{
+	GtkWidget *widget;
+	GList *list;
+	IndentStyle *ist;
+	
+	widget = glade_xml_get_widget(idt->xml, STYLE_COMBOBOX);
+
+	list = idt->style_list;
+	while (list)
+	{
+		ist = list->data;
+		gtk_combo_box_append_text(GTK_COMBO_BOX(widget), ist->name);
+		list = g_list_next(list);
+	}	
+	gtk_combo_box_set_active(GTK_COMBO_BOX(widget), index);
+}
+
+void
+on_indent_style_combobox_changed(GtkComboBox *combo, IndentData *idt)
+{	
+	gchar *style_name;
+	gchar *options;
+	gchar *buffer = NULL;
+	
+	style_name = gtk_combo_box_get_active_text(combo);
+	options = indent_find_style(style_name, idt);
+	if (options)
+	{
+		indent_entry_set_chars(options, idt);
+		if (indent_execute(options, idt) == 0)
+		{
+			buffer = indent_get_buffer();
+			indent_display_buffer(buffer, idt);
+			g_free(buffer);
+		}
+		else
+		{
+			GtkWidget *message = gtk_message_dialog_new(GTK_WINDOW(idt->dialog), 
+		                       GTK_DIALOG_DESTROY_WITH_PARENT,
+	                           GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
+		                       _("indent parameter not known !"));
+			gtk_dialog_run (GTK_DIALOG (message));
+			gtk_widget_destroy (message);	
+		}
+	}
+}
+
+/*****************************************************************************/
+
+void
+on_indent_preview_button_clicked(GtkButton *button, IndentData *idt)
+{	
+	gchar *line_option;
+	gchar *buffer = NULL;
+
+	line_option = indent_entry_get_chars(idt);
+	if (indent_execute(line_option, idt) == 0)
+	{
+		buffer = indent_get_buffer();
+		indent_display_buffer(buffer, idt);
+		g_free(buffer);
+	}
+	else
+		{
+			GtkWidget *message = gtk_message_dialog_new(GTK_WINDOW(idt->dialog), 
+		                       GTK_DIALOG_DESTROY_WITH_PARENT,
+	                           GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
+		                       _("indent parameter not known !"));
+			gtk_dialog_run (GTK_DIALOG (message));
+			gtk_widget_destroy (message);	
+		}
+}
+
+void
+on_indent_new_button_clicked(GtkButton *button, IndentData *idt)
+{	
+ 	gchar *style_name;
+	GtkWidget *widget;
+	GtkWidget *message;
+	gint index;
+	
+	widget = glade_xml_get_widget(idt->xml, STYLE_ENTRY);
+	style_name = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1);
+	style_name = g_strstrip(style_name);
+	if  (strlen(style_name) < 1)
+		return;
+	widget = glade_xml_get_widget(idt->xml, STYLE_COMBOBOX);
+	if (indent_add_style(style_name, idt))
+	{
+		gtk_combo_box_append_text(GTK_COMBO_BOX(widget), style_name);
+		gtk_combo_box_append_text(GTK_COMBO_BOX(idt->pref_indent_combo), style_name);
+
+		index = indent_find_index(style_name, idt);
+		gtk_combo_box_set_active(GTK_COMBO_BOX(widget), index);
+		gtk_combo_box_set_active(GTK_COMBO_BOX(idt->pref_indent_combo), index);
+		
+		widget = glade_xml_get_widget(idt->xml, STYLE_ENTRY);
+		gtk_editable_delete_text(GTK_EDITABLE(widget), 0, -1);
+		indent_save_all_style(idt);
+	}
+	else 
+	{
+		message = gtk_message_dialog_new(GTK_WINDOW(idt->dialog), 
+		                       GTK_DIALOG_DESTROY_WITH_PARENT,
+	                           GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
+		                       _("A Style has already this name !"));
+		gtk_dialog_run (GTK_DIALOG (message));
+		gtk_widget_destroy (message);
+	}                        
+}
+
+void
+on_indent_update_button_clicked(GtkButton *button, IndentData *idt)
+{	
+	gchar *style_name;
+	gchar *options;
+	GtkWidget *widget;
+	GtkWidget *message;
+	
+	widget = glade_xml_get_widget(idt->xml, STYLE_COMBOBOX);
+	style_name = gtk_combo_box_get_active_text(GTK_COMBO_BOX(widget));
+	widget = glade_xml_get_widget(idt->xml, PARAMETERS_ENTRY);
+	options = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1);
+	
+	if (indent_update_style(style_name, options, idt))
+	{
+		indent_save_style(style_name, options, idt);
+		gtk_entry_set_text(GTK_ENTRY(idt->pref_indent_options), options);
+	}
+	else
+	{
+		message = gtk_message_dialog_new(GTK_WINDOW(idt->dialog), 
+		                       GTK_DIALOG_DESTROY_WITH_PARENT,
+	                           GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
+		                       _("This Style is not modifiable !"));
+		gtk_dialog_run (GTK_DIALOG (message));
+		gtk_widget_destroy (message);
+	}
+}
+
+void
+on_indent_delete_button_clicked(GtkButton *button, IndentData *idt)
+{	
+	GtkWidget *widget;
+	GtkWidget *message;
+	gint index;
+	gchar *style_name;
+	
+	widget = glade_xml_get_widget(idt->xml, STYLE_COMBOBOX);
+	style_name = gtk_combo_box_get_active_text(GTK_COMBO_BOX(widget));
+	if (indent_remove_style(style_name, idt))
+	{
+		index = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
+		gtk_combo_box_remove_text(GTK_COMBO_BOX(widget), index);
+		gtk_combo_box_remove_text(GTK_COMBO_BOX(idt->pref_indent_combo), index);
+
+		gtk_combo_box_set_active(GTK_COMBO_BOX(widget), index - 1);
+		gtk_combo_box_set_active(GTK_COMBO_BOX(idt->pref_indent_combo), index - 1);
+		indent_save_all_style(idt);
+	}
+	else
+	{
+		message = gtk_message_dialog_new(GTK_WINDOW(idt->dialog), 
+		                       GTK_DIALOG_DESTROY_WITH_PARENT,
+	                           GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
+		                       _("This Style is not modifiable !"));
+		gtk_dialog_run (GTK_DIALOG (message));
+		gtk_widget_destroy (message);
+	}
+}
+
+/*****************************************************************************/
+
+void
+on_indent_quit_button_clicked(GtkButton *button, IndentData *idt)
+{	
+	GtkWidget *widget;
+	gchar *style_name, *options;
+	gint index;
+	
+	widget = glade_xml_get_widget(idt->xml, STYLE_COMBOBOX);
+	style_name = gtk_combo_box_get_active_text(GTK_COMBO_BOX(widget));
+	options = indent_find_style(style_name, idt);
+	indent_save_active_style(style_name, options, idt);
+	
+	index = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
+	gtk_combo_box_set_active(GTK_COMBO_BOX(idt->pref_indent_combo), index);
+
+	gtk_widget_hide(idt->dialog);
+}
+
+
+
+void
+indent_exit(GtkWidget *widget, gpointer user_data)
+{
+	gtk_widget_hide(widget);
+}

Added: trunk/plugins/indent/indent-dialog.h
==============================================================================
--- (empty file)
+++ trunk/plugins/indent/indent-dialog.h	Tue Apr  7 13:46:31 2009
@@ -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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */ 
+
+#ifndef _INDENT_DIALOG_H_
+#define _INDENT_DIALOG_H_
+
+
+void pref_set_style_combo(IndentData *idt);
+void pref_style_combo_changed(GtkComboBox *combo, IndentData *idt);
+
+void indent_toggle_button_set_active(gchar *name_widget, gboolean active, IndentData *idt);
+void indent_widget_set_sensitive(gchar *name_widget, gboolean sensitive, IndentData *idt);
+void indent_spinbutton_set_value(gchar *name_widget, gchar *num, IndentData *idt);
+
+GtkWidget *create_dialog(IndentData *idt);
+
+#endif

Added: trunk/plugins/indent/indent-util.c
==============================================================================
--- (empty file)
+++ trunk/plugins/indent/indent-util.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,663 @@
+/*
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+ 
+ 
+
+#include <gnome.h>
+#include <glade/glade.h>
+
+#include <sys/wait.h>
+
+#include <gconf/gconf-client.h>
+
+#include <libanjuta/anjuta-utils.h>
+#include <libanjuta/anjuta-debug.h>
+
+#include "config.h"
+
+//#include "text_editor.h"
+#include "indent-util.h"
+#include "indent-dialog.h"
+
+
+#define INDENT_FILE_INPUT PACKAGE_DATA_DIR"/indent_test.c" 
+#define INDENT_FILE_OUTPUT TMPDIR"/indent_test.c"
+
+#define AUTOFORMAT_DISABLE         "autoformat.disable"
+#define AUTOFORMAT_STYLE           "autoformat.style"
+#define AUTOFORMAT_LIST_STYLE      "autoformat.list.style"
+#define AUTOFORMAT_OPTS            "autoformat.opts"
+
+static IndentOption indent_option[] = {
+	{"bl", FALSE, "bl_checkbutton", NULL},
+	{"bli", FALSE, "bli_checkbutton", "bli_spinbutton"},
+	{"br", FALSE, "br_checkbutton", NULL},
+	{"ci", FALSE, "ci_checkbutton", "ci_spinbutton"},
+	{"cli", FALSE, "cli_checkbutton", "cli_spinbutton"},
+	{"cs", FALSE, "cs_checkbutton", NULL},
+	{"pcs", TRUE, "pcs_checkbutton", NULL},
+	{"saf", TRUE, "saf_checkbutton", NULL},
+	{"sai", TRUE, "sai_checkbutton", NULL},
+	{"saw", TRUE, "saw_checkbutton", NULL},
+	{"bad", TRUE, "bad_checkbutton", NULL},
+	{"bap", TRUE, "bap_checkbutton", NULL},
+	{"sob", TRUE, "sob_checkbutton", NULL},
+	{"cdb", TRUE, "cdb_checkbutton", NULL},
+	{"bbb", FALSE, "bbb_checkbutton", NULL},	
+	{"cd", FALSE, "cd_checkbutton", "cd_spinbutton"},
+	{"ce", TRUE, "ce_checkbutton", NULL},
+	{"c", FALSE, "c_checkbutton", "c_spinbutton"},
+	{"cp", FALSE, "cp_checkbutton", "cp_spinbutton"},
+	{"d", FALSE, "d_checkbutton", "d_spinbutton"},
+	{"fc1", TRUE, "fc1_checkbutton", NULL},
+	{"fca", TRUE, "fca_checkbutton", NULL},
+	{"sc", TRUE, "sc_checkbutton", NULL},
+	{"bc", TRUE, "bc_checkbutton", NULL},
+	{"bls", FALSE, "bls_checkbutton", NULL},
+	{"brs", FALSE, "brs_checkbutton", NULL},
+	{"di", FALSE, "di_checkbutton", "di_spinbutton"},
+	{"psl", TRUE, "psl_checkbutton", NULL},
+	{"i", FALSE, "i_checkbutton", "i_spinbutton"},
+	{"ip", FALSE, "ip_checkbutton", "ip_spinbutton"},
+	{"lp", TRUE, "lp_checkbutton", NULL},
+	{"ts", FALSE, "ts_checkbutton", "ts_spinbutton"},
+	{"bbo", TRUE, "bbo_checkbutton", NULL},
+	{"hnl", TRUE, "hnl_checkbutton", NULL},
+	{"l", FALSE, "l_checkbutton", "l_spinbutton"},
+	{NULL, FALSE, NULL, NULL}
+};
+
+
+static IndentStyle standard_indent_style[] = {
+	{"GNU coding style", "-nbad -bap -bbo -nbc -bl -bli2 -bls -ncdb -nce -cp1 "
+	 "-cs -di2 -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -nprs -psl -saf -sai -saw "
+	 "-nsc -nsob", FALSE},
+	{"Kernighan and Ritchie style", "-nbad -bap -nbc -bbo -br -brs -c33 -cd33 "
+	 "-ncdb -ce -ci4 -cli0 -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 "
+	 "-lp -npcs -nprs -npsl -saf -sai -saw -nsc -nsob -nss"	, FALSE},
+	{"Original Berkeley style", "-nbad -nbap -bbo -bc -br -brs -c33 -cd33 -cdb "
+	 "-ce -ci4 -cli0 -cp33 -di16 -fc1 -fca -hnl -i4 -ip4 -l75 -lp -npcs "
+	 "-nprs -psl", FALSE},
+	{"Anjuta coding style", "-l80 -lc80 -ts4 -i4 -sc -bli0 -bl0 -cbi0 -ss", FALSE},
+	{"Style of Kangleipak", "-i8 -sc -bli0 -bl0 -cbi0 -ss", FALSE},	
+	{"Hello World style", "-gnu -i0 -bli0 -cbi0 -cdb -sc -bl0 -ss", FALSE},	
+	{NULL, NULL, FALSE}
+};
+
+/******************************************************************************/
+void indent_init_hash(IndentData *idt);
+
+void  indent_destroy_hash_data(gpointer key, gpointer data, gpointer user_data);
+void indent_free_data(IndentData *idt);
+void indent_free_style(IndentData *idt);
+
+void indent_init_indent_style(IndentData *idt);
+gint indent_load_all_style(IndentData *idt);
+
+gchar *indent_alpha_string(gchar *option);
+gboolean indent_option_is_numeric(gchar *option);
+void indent_anal_option(gchar *option, IndentData *idt);
+gint indent_compare_options(gchar *opt1, gchar *opt2);
+gchar *indent_sort_options(gchar *line);
+gint indent_compare_style(IndentStyle *style, gchar *name_style);
+
+void indent_save_list_style(GList *list, IndentData *idt);
+
+/*****************************************************************************/
+
+IndentData *
+indent_init(AnjutaPreferences *prefs)
+{
+	IndentData *idt;
+	
+	idt = g_new(IndentData, 1);
+	indent_init_hash(idt);
+	idt->dialog = NULL;
+	idt->style_list = NULL;
+	idt->checkbutton_blocked = FALSE;
+	return idt;
+}
+
+void
+indent_init_hash(IndentData *idt)
+{
+	int i;
+	OptionData *ptroption;
+	CheckData *ptrcheck;
+	
+	idt->option_hash = g_hash_table_new_full ((GHashFunc) g_str_hash,
+	                                          (GEqualFunc) g_str_equal,
+	                                          (GDestroyNotify) g_free, 
+	                                          (GDestroyNotify) g_free);
+	idt->check_hash = g_hash_table_new_full ((GHashFunc) g_str_hash, 
+	                                         (GEqualFunc) g_str_equal,
+	                                         (GDestroyNotify) g_free, 
+	                                         (GDestroyNotify) g_free);
+	idt->spin_hash = g_hash_table_new_full ((GHashFunc) g_str_hash, 
+	                                        (GEqualFunc) g_str_equal,
+	                                        (GDestroyNotify) g_free, 
+	                                        (GDestroyNotify) g_free);
+	for (i=0; indent_option[i].option != NULL; i++)
+	{
+		ptroption = g_new(OptionData, 1);
+		ptroption->not_option = indent_option[i].not_option;
+		ptroption->checkbutton = indent_option[i].checkbutton;
+		ptroption->spinbutton = indent_option[i].spinbutton;
+		g_hash_table_insert (idt->option_hash, indent_option[i].option, ptroption);
+		ptrcheck = g_new(CheckData, 1);
+		ptrcheck->option = indent_option[i].option;
+		ptrcheck->not_option = indent_option[i].not_option;
+		ptrcheck->spinbutton = indent_option[i].spinbutton;
+		g_hash_table_insert (idt->check_hash, indent_option[i].checkbutton, ptrcheck);
+		if (indent_option[i].spinbutton)
+			g_hash_table_insert (idt->spin_hash, indent_option[i].spinbutton, 
+		                         indent_option[i].option);
+	}
+}
+
+
+
+void 
+indent_destroy_hash_data(gpointer key, gpointer data, gpointer user_data)
+{
+	g_free(data);
+}
+
+void
+indent_free_data(IndentData *idt)
+{
+	g_hash_table_foreach(idt->option_hash, indent_destroy_hash_data, NULL);	
+	g_hash_table_foreach(idt->check_hash, indent_destroy_hash_data, NULL);
+}
+
+void
+indent_free_style(IndentData *idt)
+{
+	GList *list;
+	
+	list = idt->style_list;
+	while (list)
+	{
+		g_free(list->data);
+		list = g_list_next(list);
+	}
+	g_list_free(idt->style_list);
+}
+
+void
+indent_free(IndentData *idt)
+{
+	indent_free_style(idt);
+	indent_free_data(idt);
+}
+
+void
+indent_init_indent_style(IndentData *idt)
+{
+	IndentStyle *indent_style;
+	gint i;
+	
+	for (i=0; standard_indent_style[i].name != NULL; i++)
+	{
+		indent_style = g_new(IndentStyle, 1);
+		indent_style->name = standard_indent_style[i].name;
+		indent_style->options = standard_indent_style[i].options;
+		indent_style->modifiable = standard_indent_style[i].modifiable;
+		idt->style_list = g_list_append(idt->style_list, indent_style);
+	}
+}
+
+void
+indent_init_load_style(IndentData *idt)
+{
+	indent_init_indent_style(idt);
+	idt->style_active = indent_load_all_style(idt);
+}
+
+
+gint
+indent_load_all_style(IndentData *idt)
+{
+	GSList *list2 = NULL;
+	gchar *key;
+	gchar *style_name = NULL;
+	gchar *options = NULL;
+	IndentStyle *indent_style;
+	
+	list2 = anjuta_preferences_get_list (idt->prefs, AUTOFORMAT_LIST_STYLE,
+                                         GCONF_VALUE_STRING);
+	if (list2 == NULL) 
+		return 0;
+	while (list2)
+	{
+		indent_style = g_new(IndentStyle, 1);
+		indent_style->name = g_strdup((gchar*)list2->data);
+		key = g_strdup((gchar*)list2->data);
+		key = g_strconcat(AUTOFORMAT_OPTS, "/", g_strdelimit(key, " ", '_'), NULL); 
+		options = anjuta_preferences_get (idt->prefs, key);
+		indent_style->options = g_strdup(options);
+		indent_style->modifiable = TRUE;
+		idt->style_list =g_list_append(idt->style_list, indent_style);
+		g_free(key);
+		g_free(options);
+		list2 = g_slist_next(list2);
+	}
+	g_slist_free(list2);
+	if (!anjuta_preferences_get_pair (idt->prefs, AUTOFORMAT_STYLE,
+                                 GCONF_VALUE_STRING, GCONF_VALUE_STRING,
+                                 &style_name, &options))	
+		return 0;
+	else
+		return indent_find_index(style_name, idt);
+}
+
+gchar *
+indent_alpha_string(gchar *option)
+{
+	gchar *ptr = option;
+	
+	while(g_ascii_isalpha(*(ptr)) )
+		ptr++;
+	if (ptr == option) 
+		return NULL;
+	return g_strndup(option, ptr - option);
+}
+
+gboolean
+indent_option_is_numeric(gchar *option)
+{
+	gboolean numeric = FALSE; 
+	while (*option)
+	{
+		if (! g_ascii_isdigit(*(option++)) )
+			return FALSE;
+		else
+			numeric = TRUE;
+	}
+	return numeric;
+}
+
+void
+indent_anal_option(gchar *option, IndentData *idt)
+{
+	gboolean flag_n = FALSE;
+	gchar *alpha_option;
+	gchar *num;
+	OptionData *ptrdata;
+	
+	if (*(option++) != '-') return;
+	if (*option == 'n')
+	{
+		option++;
+		flag_n = TRUE;
+	}
+	if (*option == 0) return;	
+	
+	if ((ptrdata = g_hash_table_lookup(idt->option_hash, option)) == NULL
+		|| ptrdata->spinbutton)
+	{
+		if ( (alpha_option = indent_alpha_string(option)) == NULL)
+			return;
+		if ((ptrdata = g_hash_table_lookup(idt->option_hash, alpha_option)) == NULL)
+			return;
+		if ( flag_n && ptrdata->not_option)
+		{
+			g_free(alpha_option);
+			return;
+		}
+		if ( !flag_n && (ptrdata->spinbutton != NULL))
+		{			
+			num = g_strdup(option + strlen(alpha_option));	
+			if (!indent_option_is_numeric(num)) 
+			{
+				g_free(num);
+				return;
+			}
+			indent_toggle_button_set_active(ptrdata->checkbutton, !flag_n, idt);
+			indent_widget_set_sensitive(ptrdata->spinbutton, TRUE, idt);
+			indent_spinbutton_set_value(ptrdata->spinbutton, num, idt);
+			g_free(num);
+		}
+		g_free(alpha_option);
+	}
+	else
+	{			
+		if (!flag_n)
+			indent_toggle_button_set_active(ptrdata->checkbutton, TRUE, idt);
+		else
+			if (ptrdata->not_option)
+				indent_toggle_button_set_active(ptrdata->checkbutton, FALSE, idt);
+	}
+}
+
+
+void
+indent_anal_line_option(gchar *line, IndentData *idt)
+{
+	gchar **split;
+	gint i = 0;
+	
+	split = g_strsplit(line, " ", -1);
+	while (split[i])
+	{
+		if (strlen(split[i]) > 0)
+			indent_anal_option(split[i], idt);
+		i++;
+	}
+	g_strfreev(split);
+}
+
+
+gchar *
+indent_delete_option(gchar *line, gchar *short_option, gboolean num)
+{
+	gchar **split;
+	gint i=0;
+	gchar *result; 
+	gchar *ptr_start = NULL;
+	gchar *ptr_end = NULL;
+	gchar *opt;
+	
+	result = g_strdup("");
+	split = g_strsplit(line, " ", -1);
+	while (split[i])
+	{
+		if (strlen(split[i]) != 0)
+		{
+			ptr_start = split[i];
+			if (*(ptr_start++) == '-')
+			{
+				if (*(ptr_start) == 'n')
+					ptr_start++;
+				ptr_end = ptr_start;
+				if (num)
+				{
+					while(g_ascii_isalpha(*ptr_end))
+						ptr_end++;
+					opt = g_strndup(ptr_start, ptr_end - ptr_start);
+				}
+				else
+				{
+					while(g_ascii_isalnum(*ptr_end))
+						ptr_end++;
+					opt = g_strndup(ptr_start, ptr_end - ptr_start);
+				}
+				if (strlen(opt) > 0 && g_ascii_strcasecmp(opt, short_option) != 0)
+					result= g_strconcat(result, split[i], " ", NULL);
+				g_free(opt);
+			}
+		}
+		i++;
+	}
+	g_strfreev(split);
+	return result;
+}
+
+gint
+indent_compare_options(gchar *opt1, gchar *opt2)
+{
+	if (*(opt1) == '-')
+	{
+		opt1++;
+		if (*(opt1) == 'n') opt1++;
+	}
+	if (*(opt2) == '-')
+	{
+		opt2++;
+		if (*(opt2) == 'n') opt2++;
+	}
+	return g_ascii_strcasecmp(opt1, opt2);
+}
+
+gchar *
+indent_sort_options(gchar *line)
+{
+	gchar **split;
+	gint i=0, j=0;
+	gchar *tmp;
+	gboolean exch = TRUE;
+	gchar *result = "";
+	
+	split = g_strsplit(line, " ", -1);
+	/* Remove empty items or not beginning by '-' */ 
+	while (split[i])
+	{
+		if ((strlen(split[i]) != 0) && (*(split[i]) == '-'))
+			split[j++] = split[i];
+		i++;
+	}	/*  j = number of items  */
+
+	/* Sort split[] */ 
+	while (exch)
+	{
+		exch = FALSE;
+		for (i=0; i<j-1; i++)
+		{
+			if (indent_compare_options(split[i], split[i+1]) > 0)
+			{
+				tmp = split[i]; split[i] = split[i+1]; split[i+1] = tmp;
+				exch = TRUE;
+			}	
+		}
+	}
+	
+	for (i=0; i<j; i++)
+		result = g_strconcat(result, split[i], " ", NULL);
+	
+	g_strfreev(split);
+	return result;
+}
+
+gchar *
+indent_insert_option(gchar *line, gchar *option)
+{
+	line = g_strconcat(option, " ", line, NULL);
+	line = indent_sort_options(line);
+	return line;
+}
+
+gint
+indent_execute(gchar *line_option, IndentData *idt)
+{
+	gchar *cmd;
+	gchar *options;
+	pid_t pid;
+	int status;
+
+	options = g_strconcat(line_option, " ",INDENT_FILE_INPUT, NULL);
+	cmd = g_strconcat ("indent ", options, " -o ", INDENT_FILE_OUTPUT, NULL);	
+	g_free(options);
+
+	pid = anjuta_util_execute_shell (PACKAGE_DATA_DIR, cmd);	
+	
+	waitpid (pid, &status, 0);
+	g_free (cmd);
+	return status;
+}
+
+gchar *
+indent_get_buffer(void)
+{
+	GFile *file;
+	gchar *read_buf = NULL;
+	GError *error = NULL;
+	gsize *size;
+
+	file = g_file_new_for_path (INDENT_FILE_OUTPUT);
+	if (!g_file_load_contents (file, NULL,
+		&read_buf, &size, 
+		NULL, &error))
+	{
+		read_buf = NULL;
+		DEBUG_PRINT ("Error reading file: %s", error->message);
+	}
+	g_object_unref (file);
+
+	return read_buf;
+}
+
+
+void
+indent_save_list_style(GList *list, IndentData *idt)
+{
+	GSList *list2 = NULL;
+	IndentStyle *idtst;
+
+	while (list)
+	{
+		idtst = list->data;	
+		if (idtst->modifiable)
+			list2 = g_slist_append(list2, idtst->name);
+		list = g_list_next(list);
+	}
+	anjuta_preferences_set_list (idt->prefs, AUTOFORMAT_LIST_STYLE,
+					             GCONF_VALUE_STRING, list2);
+	g_slist_free(list2);
+}
+
+void
+indent_save_style(gchar *style_name, gchar *options, IndentData *idt)
+{
+	gchar *key;
+	
+	if (!anjuta_preferences_dir_exists (idt->prefs, AUTOFORMAT_OPTS))
+		anjuta_preferences_add_dir (idt->prefs, AUTOFORMAT_OPTS, 
+		                            GCONF_CLIENT_PRELOAD_NONE);
+	
+	key = g_strdup(style_name);
+	key = g_strconcat(AUTOFORMAT_OPTS, "/", g_strdelimit(key, " ", '_'), NULL); 
+	
+	anjuta_preferences_set(idt->prefs, key, options); //**//
+	g_free(key);
+}
+
+void
+indent_save_all_style(IndentData *idt)
+{
+	GList *list1;
+	IndentStyle *idtst;
+	
+	if (anjuta_preferences_dir_exists (idt->prefs, AUTOFORMAT_OPTS) )
+		anjuta_preferences_remove_dir (idt->prefs, AUTOFORMAT_OPTS);
+	anjuta_preferences_add_dir (idt->prefs, AUTOFORMAT_OPTS, 
+	                            GCONF_CLIENT_PRELOAD_NONE);
+	
+	list1 = idt->style_list;
+	indent_save_list_style(list1, idt);
+	
+	list1 = idt->style_list;
+	while (list1)
+	{
+		idtst = list1->data;	
+		if (idtst->modifiable)
+			indent_save_style(idtst->name, idtst->options, idt);
+		list1 = g_list_next(list1);
+	}
+}
+
+gint
+indent_compare_style(IndentStyle *style, gchar *name_style)
+{
+	return g_ascii_strcasecmp(style->name, name_style);
+}
+
+gchar *
+indent_find_style(gchar *style_name, IndentData *idt)
+{
+	GList *list;
+	
+	list = g_list_find_custom(idt->style_list, style_name,
+	                          (GCompareFunc) indent_compare_style);
+	if (list)
+		return ((IndentStyle*)list->data)->options;
+	else
+		return NULL;
+}
+
+gint
+indent_find_index(gchar *style_name, IndentData *idt)
+{
+	gint index;
+	GList *list;
+	
+	if (style_name == NULL)
+		return 0;
+	list = g_list_find_custom(idt->style_list, style_name,
+	                          (GCompareFunc) indent_compare_style);	
+	index = g_list_index(idt->style_list, list->data);
+	return index;
+}
+
+gboolean
+indent_remove_style(gchar *style_name, IndentData *idt)
+{
+	GList *list;
+	
+	list = g_list_find_custom(idt->style_list, style_name,
+	                          (GCompareFunc) indent_compare_style);
+	if ( list && ((IndentStyle*)list->data)->modifiable)
+	{
+		list = g_list_remove(list, list->data);
+		return TRUE;
+	}
+	return FALSE;
+}
+
+gboolean
+indent_update_style(gchar *style_name, gchar *options, IndentData *idt)
+{
+	GList *list;
+	
+	list = g_list_find_custom(idt->style_list, style_name,
+	                          (GCompareFunc) indent_compare_style);
+	if ( list && ((IndentStyle*)list->data)->modifiable)
+	{
+		((IndentStyle*)list->data)->name = style_name;
+		((IndentStyle*)list->data)->options = options;
+		
+		return TRUE;
+	}
+	return FALSE;
+}
+
+void
+indent_save_active_style(gchar *style_name, gchar *options, IndentData *idt)
+{
+	anjuta_preferences_set_pair (idt->prefs, AUTOFORMAT_STYLE,
+					         GCONF_VALUE_STRING, GCONF_VALUE_STRING,
+                             &style_name, &options);
+}
+
+gboolean
+indent_add_style(gchar *style_name, IndentData *idt)
+{
+	GList *list;
+	IndentStyle *indent_style;
+	
+	list = g_list_find_custom(idt->style_list, style_name,
+	                          (GCompareFunc) indent_compare_style);
+	if (list)
+		return FALSE;
+	else
+	{
+		indent_style = g_new(IndentStyle, 1);
+		indent_style->name = style_name;
+		indent_style->options = standard_indent_style[0].options;
+		indent_style->modifiable = TRUE;
+		idt->style_list =g_list_append(idt->style_list, indent_style);
+		return TRUE;
+	}
+}

Added: trunk/plugins/indent/indent-util.h
==============================================================================
--- (empty file)
+++ trunk/plugins/indent/indent-util.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,92 @@
+/*
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */ 
+
+#ifndef _INDENT_UTIL_H_
+#define _INDENT_UTIL_H_
+
+#include <gconf/gconf-client.h>
+#include <libanjuta/anjuta-preferences.h>
+
+
+typedef struct _IndentData
+{
+	GladeXML *xml;
+	GtkWidget *dialog;
+	GHashTable *option_hash;
+	GHashTable *check_hash;
+	GHashTable *spin_hash;
+	GList *style_list;
+	gint style_active;
+	GtkWidget *pref_indent_combo;
+	GtkWidget *pref_indent_options;
+	gboolean checkbutton_blocked;
+	AnjutaPreferences *prefs;
+} IndentData;
+
+typedef struct _IndentStyle
+{
+	gchar *name;
+	gchar *options;
+	gboolean modifiable;
+} IndentStyle;
+
+
+typedef struct _IndentOption
+{
+	gchar *option;
+	gboolean not_option;
+	gchar *checkbutton;
+	gchar *spinbutton;
+} IndentOption;
+
+
+typedef struct _OptionData
+{
+	gboolean not_option;
+	gchar *checkbutton;
+	gchar *spinbutton;
+} OptionData;
+
+typedef struct _CheckData
+{
+	gchar *option;
+	gboolean not_option;
+	gchar *spinbutton;
+} CheckData;
+
+IndentData *indent_init(AnjutaPreferences *prefs);
+
+
+void indent_free_data(IndentData *idt);
+void indent_init_load_style(IndentData *idt);
+
+gchar *indent_find_style(gchar *style_name, IndentData *idt);
+void indent_save_active_style(gchar *style_name, gchar *options, IndentData *idt);
+gchar * indent_delete_option(gchar *line, gchar *short_option, gboolean num);
+gchar * indent_insert_option(gchar *line, gchar *option);
+void indent_anal_line_option(gchar *line, IndentData *idt);
+gint indent_execute(gchar *line_option, IndentData *idt);
+gchar *indent_get_buffer(void);
+gboolean indent_add_style(gchar *style_name, IndentData *idt);
+void indent_save_all_style(IndentData *idt);
+gint indent_find_index(gchar *style_name, IndentData *idt);
+gboolean indent_update_style(gchar *style_name, gchar *options, IndentData *idt); 
+void indent_save_style(gchar *style_name, gchar *options, IndentData *idt);
+gboolean indent_remove_style(gchar *style_name, IndentData *idt);
+
+void indent_free(IndentData *idt);
+
+#endif

Added: trunk/plugins/indent/indent.glade
==============================================================================
--- (empty file)
+++ trunk/plugins/indent/indent.glade	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,1640 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
+<glade-interface>
+  <widget class="GtkWindow" id="indent_dialog">
+    <property name="visible">True</property>
+    <property name="title" translatable="yes">Indent Preferences</property>
+    <property name="window_position">GTK_WIN_POS_CENTER</property>
+    <child>
+      <widget class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <child>
+          <widget class="GtkHBox" id="hbox2">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <widget class="GtkVBox" id="vbox2">
+                <property name="visible">True</property>
+                <property name="border_width">5</property>
+                <child>
+                  <widget class="GtkVBox" id="vbox3">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkExpander" id="expander1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <child>
+                          <widget class="GtkHBox" id="hbox39">
+                            <property name="visible">True</property>
+                            <property name="homogeneous">True</property>
+                            <child>
+                              <widget class="GtkVBox" id="vbox49">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox40">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <widget class="GtkCheckButton" id="c_checkbutton">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip" translatable="yes">Specify the column for comments following code.</property>
+                                        <property name="label" translatable="yes">Indent</property>
+                                        <property name="use_underline">True</property>
+                                        <property name="response_id">0</property>
+                                        <property name="draw_indicator">True</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkSpinButton" id="c_spinbutton">
+                                        <property name="width_request">40</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="adjustment">12 0 99 1 10 10</property>
+                                        <property name="climb_rate">1</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="cdb_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Place the comment delimiters on blank lines.</property>
+                                    <property name="label" translatable="yes">Delimiters on BL</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="fc1_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Format comments which begin in column one.</property>
+                                    <property name="label" translatable="yes">First Column</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox50">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox41">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <widget class="GtkCheckButton" id="cd_checkbutton">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip" translatable="yes">Specify the column for comments following declarations.</property>
+                                        <property name="label" translatable="yes">Declaration  </property>
+                                        <property name="use_underline">True</property>
+                                        <property name="response_id">0</property>
+                                        <property name="draw_indicator">True</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkSpinButton" id="cd_spinbutton">
+                                        <property name="width_request">40</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="adjustment">12 0 99 1 10 10</property>
+                                        <property name="climb_rate">1</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="bbb_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Insert a line before a Box comment.</property>
+                                    <property name="label" translatable="yes">Line before Box </property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="fca_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Format comments which begin after the first column.</property>
+                                    <property name="label" translatable="yes">All Comments</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox51">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox42">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <widget class="GtkCheckButton" id="cp_checkbutton">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip" translatable="yes">Specify the column for comments following preprocessor directives.</property>
+                                        <property name="label" translatable="yes">#Else #Endif </property>
+                                        <property name="use_underline">True</property>
+                                        <property name="response_id">0</property>
+                                        <property name="draw_indicator">True</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkSpinButton" id="cp_spinbutton">
+                                        <property name="width_request">40</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="adjustment">12 0 99 1 10 10</property>
+                                        <property name="climb_rate">1</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox43">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <widget class="GtkCheckButton" id="d_checkbutton">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip" translatable="yes">Specify an amount by which comments are moved to the left.</property>
+                                        <property name="label" translatable="yes">Line Indent   </property>
+                                        <property name="use_underline">True</property>
+                                        <property name="response_id">0</property>
+                                        <property name="draw_indicator">True</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkSpinButton" id="d_spinbutton">
+                                        <property name="width_request">40</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="adjustment">11 0 99 1 10 10</property>
+                                        <property name="climb_rate">1</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="sc_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Place stars at the beginning of multi-line comments.</property>
+                                    <property name="label" translatable="yes">Star Left Side</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label1">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Comments&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </widget>
+                          <packing>
+                            <property name="type">label_item</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkExpander" id="expander2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <child>
+                          <widget class="GtkHBox" id="hbox17">
+                            <property name="visible">True</property>
+                            <property name="homogeneous">True</property>
+                            <child>
+                              <widget class="GtkVBox" id="vbox32">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkCheckButton" id="bc_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Force a newline after each comma in a declaration.</property>
+                                    <property name="label" translatable="yes">Line after Commas</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox25">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <widget class="GtkCheckButton" id="di_checkbutton">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip" translatable="yes">Specify the column of identifiers.</property>
+                                        <property name="label" translatable="yes">Declarations  </property>
+                                        <property name="use_underline">True</property>
+                                        <property name="response_id">0</property>
+                                        <property name="draw_indicator">True</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkSpinButton" id="di_spinbutton">
+                                        <property name="width_request">40</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="adjustment">12 0 99 1 10 10</property>
+                                        <property name="climb_rate">1</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox33">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkCheckButton" id="bls_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Place the '{' following a 'struct' declaration on the next line.</property>
+                                    <property name="label" translatable="yes">Braces after Struct</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="psl_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Place the type of a procedure beeing defined on the previous line.</property>
+                                    <property name="label" translatable="yes">Procnames start lines</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox34">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkCheckButton" id="brs_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="can_default">True</property>
+                                    <property name="tooltip" translatable="yes">Place the '{' following a 'struct' declaration on the same line.</property>
+                                    <property name="label" translatable="yes">Braces on Struct</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="checkbutton3">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="inconsistent">True</property>
+                                    <property name="draw_indicator">True</property>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label2">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Declarations&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </widget>
+                          <packing>
+                            <property name="type">label_item</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkExpander" id="expander3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <child>
+                          <widget class="GtkHBox" id="hbox31">
+                            <property name="visible">True</property>
+                            <property name="homogeneous">True</property>
+                            <child>
+                              <widget class="GtkVBox" id="vbox43">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox32">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <widget class="GtkCheckButton" id="i_checkbutton">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip" translatable="yes">Specify the value of indentation for each level.</property>
+                                        <property name="label" translatable="yes">Level              </property>
+                                        <property name="use_underline">True</property>
+                                        <property name="response_id">0</property>
+                                        <property name="draw_indicator">True</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkSpinButton" id="i_spinbutton">
+                                        <property name="width_request">40</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="adjustment">12 0 99 1 10 10</property>
+                                        <property name="climb_rate">1</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="lp_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Line up continuation line to start at the character position just after the left parenthesis if a line has a left parenthesis which is not closed on that line.</property>
+                                    <property name="label" translatable="yes">Continue at Parenth.</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox44">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox33">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <widget class="GtkCheckButton" id="ip_checkbutton">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip" translatable="yes">Specify how many spaces to indent type declarations.</property>
+                                        <property name="label" translatable="yes">Parameter     </property>
+                                        <property name="use_underline">True</property>
+                                        <property name="response_id">0</property>
+                                        <property name="draw_indicator">True</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkSpinButton" id="ip_spinbutton">
+                                        <property name="width_request">40</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="adjustment">12 0 99 1 10 10</property>
+                                        <property name="climb_rate">1</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="checkbutton4">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="inconsistent">True</property>
+                                    <property name="draw_indicator">True</property>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox48">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox37">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <widget class="GtkCheckButton" id="ts_checkbutton">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip" translatable="yes">Specify the number o spaces for a TAB (default 8).</property>
+                                        <property name="label" translatable="yes">Tab Size      </property>
+                                        <property name="use_underline">True</property>
+                                        <property name="response_id">0</property>
+                                        <property name="draw_indicator">True</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkSpinButton" id="ts_spinbutton">
+                                        <property name="width_request">40</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="adjustment">12 0 99 1 10 10</property>
+                                        <property name="climb_rate">1</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="checkbutton9">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="inconsistent">True</property>
+                                    <property name="draw_indicator">True</property>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="padding">5</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label3">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Indentation&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </widget>
+                          <packing>
+                            <property name="type">label_item</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkExpander" id="expander4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <child>
+                          <widget class="GtkHBox" id="hbox44">
+                            <property name="visible">True</property>
+                            <property name="homogeneous">True</property>
+                            <child>
+                              <widget class="GtkVBox" id="vbox52">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox45">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <widget class="GtkCheckButton" id="bli_checkbutton">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip" translatable="yes">Specify the number of spaces by which braces are indented.</property>
+                                        <property name="label" translatable="yes">Brace</property>
+                                        <property name="use_underline">True</property>
+                                        <property name="response_id">0</property>
+                                        <property name="draw_indicator">True</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkSpinButton" id="bli_spinbutton">
+                                        <property name="width_request">40</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="adjustment">12 0 99 1 10 10</property>
+                                        <property name="climb_rate">1</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="br_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Place the brace on the line of the if test.</property>
+                                    <property name="label" translatable="yes">Braces on IF line</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="bl_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Place the brace on the line following the if test.</property>
+                                    <property name="label" translatable="yes">Braces after IF Line</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="checkbutton22">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="inconsistent">True</property>
+                                    <property name="draw_indicator">True</property>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">3</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox53">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox46">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <widget class="GtkCheckButton" id="ci_checkbutton">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip" translatable="yes">Specify the indentation level when a statement is broken across two lines (default 0).</property>
+                                        <property name="label" translatable="yes">Continuation</property>
+                                        <property name="use_underline">True</property>
+                                        <property name="response_id">0</property>
+                                        <property name="draw_indicator">True</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkSpinButton" id="ci_spinbutton">
+                                        <property name="width_request">40</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="adjustment">12 0 99 1 10 10</property>
+                                        <property name="climb_rate">1</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="cs_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Place a space after a cast operator.</property>
+                                    <property name="label" translatable="yes">Space after Cast</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="sai_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Force a space between an 'if' and the following parenthesis (default).</property>
+                                    <property name="label" translatable="yes">Space after IF</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="ce_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Cuddle up to the immediately preceding '}' in an if-then-else construct.</property>
+                                    <property name="label" translatable="yes">Cuddle Else</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">3</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox54">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox47">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <widget class="GtkCheckButton" id="cli_checkbutton">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip" translatable="yes">Specify the number of spaces that 'case' labels should be indented to the right of the containing 'switch' statement.</property>
+                                        <property name="label" translatable="yes">Case</property>
+                                        <property name="use_underline">True</property>
+                                        <property name="response_id">0</property>
+                                        <property name="draw_indicator">True</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkSpinButton" id="cli_spinbutton">
+                                        <property name="width_request">40</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="adjustment">12 0 99 1 10 10</property>
+                                        <property name="climb_rate">1</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="pcs_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Place a space between the name of the procedure being called and the '('.</property>
+                                    <property name="label" translatable="yes">Space after Proc Call</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="saw_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Force a space between a 'while' and the following parenthesis (default).</property>
+                                    <property name="label" translatable="yes">Space after WHILE</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="saf_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Force a space between a 'for' and the following parenthesis (default).</property>
+                                    <property name="label" translatable="yes">Space after FOR</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">3</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label5">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Statements&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </widget>
+                          <packing>
+                            <property name="type">label_item</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkExpander" id="expander5">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <child>
+                          <widget class="GtkHBox" id="hbox15">
+                            <property name="visible">True</property>
+                            <property name="homogeneous">True</property>
+                            <child>
+                              <widget class="GtkVBox" id="vbox25">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkCheckButton" id="bbo_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Prefer to break long lines before the boolean operators '&amp;&amp;' and '||'.</property>
+                                    <property name="label" translatable="yes">Break before Boolean</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox26">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkCheckButton" id="hnl_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Honour newlines by giving them the highest possible priority.</property>
+                                    <property name="label" translatable="yes">Honour Newlines</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox24">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox21">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <widget class="GtkCheckButton" id="l_checkbutton">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip" translatable="yes">Specify the maximum length of a line of C code, not including possible comments that follow it.</property>
+                                        <property name="label" translatable="yes">Length       </property>
+                                        <property name="use_underline">True</property>
+                                        <property name="response_id">0</property>
+                                        <property name="draw_indicator">True</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkSpinButton" id="l_spinbutton">
+                                        <property name="width_request">40</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="adjustment">14 0 99 1 10 10</property>
+                                        <property name="climb_rate">1</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label6">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Breaking long lines&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </widget>
+                          <packing>
+                            <property name="type">label_item</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkExpander" id="expander6">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <child>
+                          <widget class="GtkHBox" id="hbox16">
+                            <property name="visible">True</property>
+                            <property name="homogeneous">True</property>
+                            <child>
+                              <widget class="GtkVBox" id="vbox27">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkCheckButton" id="bad_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Force a blank line after every block of declarations.</property>
+                                    <property name="label" translatable="yes">After Declarations</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox28">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkCheckButton" id="bap_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Force a blank line after every procedure body.</property>
+                                    <property name="label" translatable="yes">After Procedures</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox29">
+                                <property name="visible">True</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <widget class="GtkCheckButton" id="sob_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Swallow optional blank lines.</property>
+                                    <property name="label" translatable="yes">Swallow Optional</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">5</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label7">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Blank lines&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </widget>
+                          <packing>
+                            <property name="type">label_item</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">5</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="frame8">
+                    <property name="visible">True</property>
+                    <property name="border_width">5</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">GTK_SHADOW_OUT</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment8">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="left_padding">10</property>
+                        <property name="right_padding">10</property>
+                        <child>
+                          <widget class="GtkVBox" id="vbox15">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkHBox" id="hbox48">
+                                <property name="visible">True</property>
+                                <property name="spacing">10</property>
+                                <child>
+                                  <widget class="GtkComboBox" id="indent_style_combobox">
+                                    <property name="visible">True</property>
+                                    <property name="items" translatable="yes"></property>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label17">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">New
+Style</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkEntry" id="indent_style_entry">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="invisible_char">*</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="padding">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkEntry" id="indent_parameters_entry">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">*</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="padding">5</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkHBox" id="hbox11">
+                                <property name="visible">True</property>
+                                <property name="border_width">5</property>
+                                <child>
+                                  <widget class="GtkImage" id="image1">
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-dialog-info</property>
+                                    <property name="icon_size">6</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label4">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">You can modify the parameters either by 
+using the above buttons or by editing them 
+directly (See indent manual).</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">5</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkButton" id="indent_preview_button">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Display the indent output according the selected parameters.</property>
+                                    <property name="response_id">0</property>
+                                    <child>
+                                      <widget class="GtkAlignment" id="alignment9">
+                                        <property name="visible">True</property>
+                                        <property name="xscale">0</property>
+                                        <property name="yscale">0</property>
+                                        <child>
+                                          <widget class="GtkHBox" id="hbox38">
+                                            <property name="visible">True</property>
+                                            <property name="spacing">2</property>
+                                            <child>
+                                              <widget class="GtkImage" id="image2">
+                                                <property name="visible">True</property>
+                                                <property name="stock">gtk-print-preview</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkLabel" id="label15">
+                                                <property name="visible">True</property>
+                                                <property name="label" translatable="yes">Preview</property>
+                                                <property name="use_underline">True</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">1</property>
+                                              </packing>
+                                            </child>
+                                          </widget>
+                                        </child>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="fill">False</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="padding">5</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkFrame" id="frame11">
+                                <property name="visible">True</property>
+                                <property name="border_width">5</property>
+                                <property name="label_xalign">0</property>
+                                <property name="shadow_type">GTK_SHADOW_IN</property>
+                                <child>
+                                  <widget class="GtkAlignment" id="alignment10">
+                                    <property name="visible">True</property>
+                                    <property name="yscale">0.97000002861022949</property>
+                                    <property name="left_padding">12</property>
+                                    <child>
+                                      <widget class="GtkHButtonBox" id="hbuttonbox2">
+                                        <property name="visible">True</property>
+                                        <property name="border_width">3</property>
+                                        <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
+                                        <child>
+                                          <widget class="GtkButton" id="indent_new_button">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="can_default">True</property>
+                                            <property name="tooltip" translatable="yes">Create a new style with name defined in "New Style" entry ("-gnu" parameters by default).</property>
+                                            <property name="label">gtk-new</property>
+                                            <property name="use_stock">True</property>
+                                            <property name="response_id">0</property>
+                                          </widget>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkButton" id="indent_delete_button">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="can_default">True</property>
+                                            <property name="tooltip" translatable="yes">Delete the style selected in the combo style selector.</property>
+                                            <property name="label">gtk-delete</property>
+                                            <property name="use_stock">True</property>
+                                            <property name="response_id">0</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkButton" id="indent_update_button">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="can_default">True</property>
+                                            <property name="tooltip" translatable="yes">Save the selected Style with the modified parameters.</property>
+                                            <property name="label" translatable="yes">Update Style</property>
+                                            <property name="use_underline">True</property>
+                                            <property name="response_id">0</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="position">2</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label16">
+                                    <property name="visible">True</property>
+                                    <property name="use_markup">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="type">label_item</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">3</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label12">
+                        <property name="visible">True</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                <child>
+                  <widget class="GtkTextView" id="indent_preview_textview">
+                    <property name="width_request">400</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="editable">False</property>
+                    <property name="cursor_visible">False</property>
+                    <property name="accepts_tab">False</property>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+        </child>
+        <child>
+          <widget class="GtkHSeparator" id="hseparator1">
+            <property name="visible">True</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkHBox" id="hbox1">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <widget class="GtkButton" id="Indent_Help_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="label">gtk-help</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="indent_quit_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="label">gtk-quit</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+  <widget class="GtkWindow" id="indent_prefs_window">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <child>
+      <widget class="GtkFrame" id="indent_prefs">
+        <property name="visible">True</property>
+        <property name="border_width">5</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">GTK_SHADOW_NONE</property>
+        <child>
+          <widget class="GtkVBox" id="vbox6">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkFrame" id="frame3">
+                <property name="visible">True</property>
+                <property name="border_width">5</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">GTK_SHADOW_NONE</property>
+                <child>
+                  <widget class="GtkVBox" id="vbox7">
+                    <property name="visible">True</property>
+                    <property name="border_width">5</property>
+                    <property name="spacing">5</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <widget class="GtkHBox" id="hbox5">
+                        <property name="visible">True</property>
+                        <child>
+                          <widget class="GtkComboBox" id="pref_indent_style_combobox">
+                            <property name="visible">True</property>
+                            <property name="items" translatable="yes"></property>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkButton" id="set_indent_button">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">Indent Setting</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="padding">20</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label9">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Autoformat style&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </widget>
+                  <packing>
+                    <property name="type">label_item</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkFrame" id="frame4">
+                <property name="visible">True</property>
+                <property name="border_width">5</property>
+                <property name="label_xalign">0.5</property>
+                <property name="shadow_type">GTK_SHADOW_NONE</property>
+                <child>
+                  <widget class="GtkVBox" id="vbox8">
+                    <property name="visible">True</property>
+                    <property name="border_width">10</property>
+                    <property name="spacing">5</property>
+                    <child>
+                      <widget class="GtkLabel" id="label10">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">&lt;b&gt;'indent' arguments&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkEntry" id="indent_style_entry">
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="editable">False</property>
+                        <property name="invisible_char">*</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label18">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Arguments associated with the selected autoformat style. 
+Select the 'Indent Setting' button to manage the autoformat styles.
+Read the info page for 'indent' for more details</property>
+                    <property name="wrap">True</property>
+                  </widget>
+                  <packing>
+                    <property name="type">label_item</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>

Added: trunk/plugins/indent/indent.plugin.in
==============================================================================
--- (empty file)
+++ trunk/plugins/indent/indent.plugin.in	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,5 @@
+[Anjuta Plugin]
+Location=anjuta-indent:IndentPlugin
+Icon=anjuta-indent-plugin.png
+_Name=Indent Plugin
+_Description=Autoformat C code using the "indent" utility

Added: trunk/plugins/indent/indent_auto.xpm
==============================================================================
--- (empty file)
+++ trunk/plugins/indent/indent_auto.xpm	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,29 @@
+/* XPM */
+static char * indent_auto_xpm[] = {
+"24 24 2 1",
+" 	c None",
+".	c #000000",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"    ...........         ",
+"                        ",
+"    . . . . . . . .     ",
+"                        ",
+"      .     .......     ",
+"    . . .   .......     ",
+"     ...                ",
+"    . . .   .......     ",
+"      .     .......     ",
+"                        ",
+"    . . . . . . . .     ",
+"                        ",
+"    .............       ",
+"                        ",
+"    ...........         ",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"                        "};

Added: trunk/plugins/indent/indent_set.xpm
==============================================================================
--- (empty file)
+++ trunk/plugins/indent/indent_set.xpm	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,29 @@
+/* XPM */
+static char * indent_set_xpm[] = {
+"24 24 2 1",
+" 	c None",
+".	c #000000",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"    ...........         ",
+"                        ",
+"    . . . . . . . .     ",
+"                        ",
+"     ...    .......     ",
+"        .   .......     ",
+"     ...                ",
+"     .      .......     ",
+"     .      .......     ",
+"                        ",
+"    . . . . . . . .     ",
+"                        ",
+"    .............       ",
+"                        ",
+"    ...........         ",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"                        "};

Added: trunk/plugins/indent/indent_test.c
==============================================================================
--- (empty file)
+++ trunk/plugins/indent/indent_test.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,52 @@
+# include "stdio.h"
+
+char *buffer; /* Comments to the right of declarations */
+char *start, *end, *last;
+char *name;
+/*         This separates blocks of declarations */
+int baz;
+
+struct square {int x;int y;};
+
+#ifdef ENABLE_NLS
+bindtextdomain (GETTEXT_PACKAGE,
+		PACKAGE_LOCALE_DIR);
+#else /* Comments to the right of preproc directives */
+textdomain (PACKAGE);
+#endif
+
+int foo(int number,int len, char *name)
+{
+if(number >0) { 
+for(int i=0;i<7;i++)
+len ++;
+number--;}
+else
+{while(len)
+{len--};
+number++;}
+puts("Hi");
+}
+   /* The procedure bar is even less interesting. */
+char * bar(int nb)
+{
+long c;
+c =(long)foo(2, 5, "end");
+puts("Hello"); /* Comments to the right of code */
+switch(nb) {
+case 0: break;
+case 1:{nb++; break;}
+default: break;
+}
+}
+
+int bool_test(char *mask)
+{
+if(mask 
+&& ((mask[0]=='\0') || 
+(mask[1]=='\0' && ((mask[0]=='0')||(mask[0]=='*')))))
+return 0;
+}
+
+
+ 
\ No newline at end of file

Added: trunk/plugins/indent/plugin.c
==============================================================================
--- (empty file)
+++ trunk/plugins/indent/plugin.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,366 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+    plugin.c
+    Copyright (C) 2000 Naba Kumar
+
+    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
+*/
+
+#include <config.h>
+#include <libanjuta/anjuta-shell.h>
+#include <libanjuta/anjuta-debug.h>
+#include <libanjuta/anjuta-utils.h>
+#include <libanjuta/interfaces/ianjuta-preferences.h>
+#include <libanjuta/interfaces/ianjuta-document-manager.h>
+#include <libanjuta/interfaces/ianjuta-editor.h>
+#include <libanjuta/interfaces/ianjuta-editor-selection.h>
+#include <libanjuta/interfaces/ianjuta-document.h>
+#include <libanjuta/anjuta-launcher.h>
+
+
+#include "plugin.h"
+
+#define UI_FILE PACKAGE_DATA_DIR"/ui/anjuta-indent.ui"
+#define PREFS_GLADE PACKAGE_DATA_DIR"/glade/indent.glade"
+#define ICON_FILE "anjuta-indent-plugin.png"
+
+static gpointer parent_class;
+
+#define ANJUTA_PIXMAP_INDENT_AUTO         "indent_auto.xpm"
+#define ANJUTA_PIXMAP_AUTOFORMAT_SETTING  "indent_set.xpm"
+
+#define ANJUTA_STOCK_INDENT_AUTO              "anjuta-indent-auto"
+#define ANJUTA_STOCK_AUTOFORMAT_SETTINGS      "anjuta-autoformat-settings"
+
+#define AUTOFORMAT_DISABLE         "autoformat.disable"
+#define AUTOFORMAT_STYLE           "autoformat.style"
+#define AUTOFORMAT_LIST_STYLE      "autoformat.list.style"
+#define AUTOFORMAT_OPTS            "autoformat.opts"
+
+#define REGISTER_ICON(icon, stock_id) \
+	pixbuf = gdk_pixbuf_new_from_file (PACKAGE_PIXMAPS_DIR"/"icon, NULL); \
+	icon_set = gtk_icon_set_new_from_pixbuf (pixbuf); \
+	gtk_icon_factory_add (icon_factory, stock_id, icon_set); \
+	g_object_unref (pixbuf);
+
+static void
+on_indent_finished (AnjutaLauncher *launcher, gint child_pid, gint status,
+				   gulong time_taken, IndentPlugin *plugin)
+{
+	if (status)
+	{
+		anjuta_util_dialog_error (GTK_WINDOW(ANJUTA_PLUGIN(plugin)->shell), 
+								  _("Indent command failed with error code: %d"), status);
+	}
+	else
+	{
+		gint line = ianjuta_editor_get_lineno (plugin->current_editor, NULL);
+		
+		ianjuta_document_begin_undo_action (IANJUTA_DOCUMENT (plugin->current_editor), NULL);
+		
+		/* Clear editor */
+		ianjuta_editor_selection_select_all (IANJUTA_EDITOR_SELECTION (plugin->current_editor),
+											 NULL);
+		ianjuta_document_clear (IANJUTA_DOCUMENT (plugin->current_editor), NULL);
+		
+		/* Add new text */
+		ianjuta_editor_append (plugin->current_editor, plugin->indent_output->str, 
+							   plugin->indent_output->len, NULL);
+		
+		ianjuta_editor_goto_line (plugin->current_editor, line, NULL);
+		
+		ianjuta_document_end_undo_action (IANJUTA_DOCUMENT (plugin->current_editor), NULL);
+	}
+	
+	g_string_free (plugin->indent_output, TRUE);
+	plugin->indent_output = NULL;
+}
+
+static void
+on_indent_output (AnjutaLauncher *launcher,
+					   AnjutaLauncherOutputType output_type,
+					   const gchar * mesg, IndentPlugin *plugin)
+{
+	if (output_type == ANJUTA_LAUNCHER_OUTPUT_STDOUT)
+		g_string_append (plugin->indent_output, mesg);
+
+	DEBUG_PRINT ("Indent Output: %s", mesg);
+}
+
+static void
+on_indent_action_activate (GtkAction *action, IndentPlugin *plugin)
+{
+	gchar *cmd;
+	gchar *indent_style = NULL;
+	gchar *fopts = NULL;
+	gchar* text;
+	AnjutaPreferences* prefs =
+		anjuta_shell_get_preferences (ANJUTA_PLUGIN (plugin)->shell, NULL);
+	
+	AnjutaLauncher* launcher =
+		anjuta_launcher_new ();
+
+	if (anjuta_util_prog_is_installed ("indent", TRUE) == FALSE)
+		return;
+	
+	if (!anjuta_preferences_get_pair (prefs, AUTOFORMAT_STYLE,
+                                 GCONF_VALUE_STRING, GCONF_VALUE_STRING,
+                                 &indent_style, &fopts))
+		return;
+	
+	if (!fopts)
+	{
+		gchar *msg;
+		msg = g_strdup_printf (_("Anjuta does not know %s!"), indent_style);
+		anjuta_util_dialog_warning (NULL, msg);
+		g_free(msg);
+		return;
+	}
+	/* Read from stdin and write to stdout */
+	cmd = g_strconcat ("indent ", fopts, " -st -", NULL);
+	g_free (fopts);
+	
+	g_signal_connect (G_OBJECT (launcher), "child-exited", G_CALLBACK (on_indent_finished),
+					  plugin);
+	
+	plugin->indent_output = g_string_new("");
+	
+	if (!anjuta_launcher_execute (launcher, cmd, 
+								  (AnjutaLauncherOutputCallback) on_indent_output, plugin))
+	{
+		DEBUG_PRINT ("Could not execute: %s", cmd);
+	}
+	
+	text = ianjuta_editor_get_text_all (plugin->current_editor, NULL);
+	anjuta_launcher_set_terminal_echo (launcher, TRUE);
+	anjuta_launcher_send_stdin (launcher, text);
+	anjuta_launcher_send_stdin_eof (launcher);
+	g_free (text);
+	g_free (cmd);
+}
+
+static void
+on_edit_editor_indent (GtkWidget *button, IndentPlugin *plugin)
+{
+	IndentData *idt = plugin->idt;
+
+	if (idt->dialog == NULL)
+		idt->dialog = create_dialog(idt);
+	gtk_widget_show(idt->dialog);
+}
+
+static GtkActionEntry actions_indent[] = {
+	{
+		"ActionMenuTools",	/* Action name */
+		NULL,			/* Stock icon, if any */
+		N_("_Tools"),		/* Display label */
+		NULL,			/* Short-cut */
+		NULL,			/* Tooltip */
+		NULL			/* Callback */
+	},
+	{
+		"ActionFormatAutoformat",                       /* Action name */
+		ANJUTA_STOCK_INDENT_AUTO,                            /* Stock icon, if any */
+		N_("_Format Code with \"indent\""),                     /* Display label */
+		NULL,                                     /* short-cut */
+		N_("Format code with the \"indent\" command line utility"), /* Tooltip */
+		G_CALLBACK (on_indent_action_activate)    /* action callback */
+	}
+};
+
+static void
+on_style_combo_changed (GtkComboBox *combo, IndentPlugin *plugin)
+{
+	IndentData *idt = plugin->idt;
+
+	pref_style_combo_changed(combo, idt);
+}
+
+static void
+value_added_current_editor (AnjutaPlugin *plugin, const char *name,
+							const GValue *value, gpointer data)
+{
+	GObject *editor;
+	
+	editor = g_value_get_object (value);
+	
+	if (!IANJUTA_IS_EDITOR(editor))
+		return;
+	
+	IndentPlugin* iplugin = ANJUTA_PLUGIN_INDENT (plugin);
+	iplugin->current_editor = IANJUTA_EDITOR(editor);
+	
+	GtkAction* action = anjuta_ui_get_action (anjuta_shell_get_ui(plugin->shell, NULL), 
+						  "ActionGroupIndent",
+						  "ActionFormatAutoformat");
+	
+	g_object_set (G_OBJECT(action), "sensitive", TRUE, NULL);
+}
+
+static void
+value_removed_current_editor (AnjutaPlugin *plugin,
+							  const char *name, gpointer data)
+{
+	IndentPlugin* iplugin = ANJUTA_PLUGIN_INDENT (plugin);
+	
+	GtkAction* action = anjuta_ui_get_action (anjuta_shell_get_ui(plugin->shell, NULL), 
+						  "ActionGroupIndent",
+						  "ActionFormatAutoformat");
+	
+	g_object_set (G_OBJECT(action), "sensitive", FALSE, NULL);
+	
+	iplugin->current_editor = NULL;
+}
+
+
+static gboolean
+indent_plugin_activate_plugin (AnjutaPlugin *plugin)
+{
+	AnjutaUI *ui;
+	IndentPlugin *indent_plugin;
+	static gboolean init = FALSE;
+	AnjutaPreferences* prefs;
+	
+	ui = anjuta_shell_get_ui (plugin->shell, NULL);
+	
+	if (!init)
+	{
+		GtkIconFactory *icon_factory = anjuta_ui_get_icon_factory (ui);
+		GtkIconSet *icon_set;
+		GdkPixbuf *pixbuf;
+		
+		REGISTER_ICON (ANJUTA_PIXMAP_INDENT_AUTO, ANJUTA_STOCK_INDENT_AUTO);
+		REGISTER_ICON (ANJUTA_PIXMAP_AUTOFORMAT_SETTING, ANJUTA_STOCK_AUTOFORMAT_SETTINGS);
+		init = TRUE;
+	}
+	
+	DEBUG_PRINT ("IndentPlugin: Activating Indent plugin ...");
+	indent_plugin = ANJUTA_PLUGIN_INDENT (plugin);
+	
+	/* Add all our editor actions */
+	anjuta_ui_add_action_group_entries (ui, "ActionGroupIndent",
+										_("Autoformat operations"),
+										actions_indent,
+										G_N_ELEMENTS (actions_indent),
+										GETTEXT_PACKAGE, TRUE, plugin);
+	indent_plugin->uiid = anjuta_ui_merge (ui, UI_FILE);
+	prefs = anjuta_shell_get_preferences (plugin->shell, NULL);
+	indent_plugin->idt = indent_init(prefs);
+	
+	indent_plugin->editor_watch_id = 
+		anjuta_plugin_add_watch (plugin, IANJUTA_DOCUMENT_MANAGER_CURRENT_DOCUMENT,
+								 value_added_current_editor,
+								 value_removed_current_editor, NULL);
+	indent_plugin->current_editor = NULL;
+	
+	return TRUE;
+}
+
+static gboolean
+indent_plugin_deactivate_plugin (AnjutaPlugin *plugin)
+{
+	AnjutaUI *ui = anjuta_shell_get_ui (plugin->shell, NULL);
+	DEBUG_PRINT ("IndentPlugin: Dectivating Indent plugin ...");
+	anjuta_ui_unmerge (ui, ANJUTA_PLUGIN_INDENT (plugin)->uiid);
+	anjuta_plugin_remove_watch (plugin, ANJUTA_PLUGIN_INDENT(plugin)->editor_watch_id, TRUE);
+	return TRUE;
+}
+
+static void
+indent_plugin_finalize (GObject *obj)
+{
+	/* Finalization codes here */
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+indent_plugin_dispose (GObject *obj)
+{
+	/* Disposition codes */
+	G_OBJECT_CLASS (parent_class)->dispose (obj);
+}
+
+static void
+anjuta_indent_plugin_instance_init (GObject *obj)
+{
+	IndentPlugin *plugin = ANJUTA_PLUGIN_INDENT (obj);
+	plugin->uiid = 0;
+}
+
+static void
+anjuta_indent_plugin_class_init (GObjectClass *klass) 
+{
+	AnjutaPluginClass *plugin_class = ANJUTA_PLUGIN_CLASS (klass);
+
+	parent_class = g_type_class_peek_parent (klass);
+
+	plugin_class->activate = indent_plugin_activate_plugin;
+	plugin_class->deactivate = indent_plugin_deactivate_plugin;
+	klass->finalize = indent_plugin_finalize;
+	klass->dispose = indent_plugin_dispose;
+}
+
+static void
+ipreferences_merge(IAnjutaPreferences* ipref, AnjutaPreferences* prefs, GError** e)
+{
+	GtkWidget *indent_button;
+	GtkWidget *indent_combo;
+	GtkWidget *indent_entry;
+	GladeXML* gxml;
+		
+	AnjutaPlugin* plugin = ANJUTA_PLUGIN (ipref);
+	IndentPlugin* iplugin = ANJUTA_PLUGIN_INDENT (plugin);
+	
+	/* Add preferences */
+	gxml = glade_xml_new (PREFS_GLADE, "indent_prefs_window", NULL);
+	indent_button = glade_xml_get_widget (gxml, "set_indent_button");
+	g_signal_connect (G_OBJECT (indent_button), "clicked",
+						  G_CALLBACK (on_edit_editor_indent), plugin);
+		
+	anjuta_preferences_add_page (prefs,
+									gxml, "indent_prefs", _("Indent Utility"),  ICON_FILE);
+		
+	indent_combo = glade_xml_get_widget (gxml, "pref_indent_style_combobox");
+	iplugin->idt->pref_indent_combo = indent_combo;
+	g_signal_connect (G_OBJECT (indent_combo), "changed",
+						  G_CALLBACK (on_style_combo_changed), plugin);
+	
+	indent_entry = glade_xml_get_widget (gxml, "indent_style_entry");
+	iplugin->idt->pref_indent_options = indent_entry;
+	iplugin->idt->prefs = prefs;
+	indent_init_load_style (iplugin->idt);
+	
+	pref_set_style_combo (iplugin->idt);
+	g_object_unref (G_OBJECT (gxml));
+}
+
+static void
+ipreferences_unmerge(IAnjutaPreferences* ipref, AnjutaPreferences* prefs, GError** e)
+{
+	anjuta_preferences_remove_page (prefs, _("Indent utility"));
+}
+
+static void
+ipreferences_iface_init(IAnjutaPreferencesIface* iface)
+{
+	iface->merge = ipreferences_merge;
+	iface->unmerge = ipreferences_unmerge;	
+}
+
+ANJUTA_PLUGIN_BEGIN (IndentPlugin, anjuta_indent_plugin);
+ANJUTA_PLUGIN_ADD_INTERFACE (ipreferences, IANJUTA_TYPE_PREFERENCES);
+ANJUTA_PLUGIN_END;
+
+ANJUTA_SIMPLE_PLUGIN (IndentPlugin, anjuta_indent_plugin);

Added: trunk/plugins/indent/plugin.h
==============================================================================
--- (empty file)
+++ trunk/plugins/indent/plugin.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,32 @@
+
+#include <libanjuta/anjuta-plugin.h>
+#include <libanjuta/interfaces/ianjuta-editor.h>
+#include <indent-util.h>
+#include <indent-dialog.h>
+#include <glib.h>
+
+extern GType anjuta_indent_plugin_get_type (GTypeModule *module);
+#define ANJUTA_TYPE_PLUGIN_INDENT         (anjuta_indent_plugin_get_type (NULL))
+#define ANJUTA_PLUGIN_INDENT(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_PLUGIN_INDENT, IndentPlugin))
+#define ANJUTA_PLUGIN_INDENT_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), ANJUTA_TYPE_PLUGIN_INDENT, IndentPluginClass))
+#define ANJUTA_IS_PLUGIN_INDENT(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_PLUGIN_INDENT))
+#define ANJUTA_IS_PLUGIN_INDENT_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_PLUGIN_INDENT))
+#define ANJUTA_PLUGIN_INDENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), ANJUTA_TYPE_PLUGIN_INDENT, IndentPluginClass))
+
+typedef struct _IndentPlugin IndentPlugin;
+typedef struct _IndentPluginClass IndentPluginClass;
+
+struct _IndentPlugin{
+	AnjutaPlugin parent;
+	
+	IndentData* idt;
+	gint uiid;
+	
+	guint editor_watch_id;
+	IAnjutaEditor* current_editor;
+	GString* indent_output;
+};
+
+struct _IndentPluginClass{
+	AnjutaPluginClass parent_class;
+};

Added: trunk/plugins/profiler/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/Makefile.am	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,101 @@
+
+# Plugin UI file
+profiler_uidir = $(anjuta_ui_dir)
+profiler_ui_DATA =  profiler.ui
+
+# Plugin glade file
+profiler_gladedir = $(anjuta_glade_dir)
+profiler_glade_DATA = profiler.glade \
+	profiler-flat-profile.glade \
+	profiler-call-graph.glade \
+	profiler-function-call-tree.glade
+
+# Plugin Icon file
+profiler_pixmapsdir = $(anjuta_image_dir)
+profiler_pixmaps_DATA = \
+	anjuta-profiler-plugin.svg \
+	anjuta-profiler-plugin-48.png
+
+# Plugin description file
+plugin_in_files = profiler.plugin.in
+%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+profiler_plugindir = $(anjuta_plugin_dir)
+profiler_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
+
+# NOTE :
+# The naming convention is very intentional
+# We are forced to use the prefix 'lib' by automake and libtool
+#    There is probably a way to avoid it but it is not worth to effort
+#    to find out.
+# The 'anjuta_' prfix is a safety measure to avoid conflicts where the
+#    plugin 'libpython.so' needs to link with the real 'libpython.so'
+
+# Include paths
+AM_CPPFLAGS = \
+	$(LIBANJUTA_CFLAGS) \
+	$(EXTRA_CFLAGS)
+
+if HAVE_GRAPHVIZ
+AM_CPPFLAGS += $(GRAPHVIZ_CFLAGS)
+endif
+
+# Where to install the plugin
+plugindir = $(anjuta_plugin_dir)
+
+# The plugin
+plugin_LTLIBRARIES = libanjuta-profiler.la
+
+# Plugin sources
+libanjuta_profiler_la_SOURCES = \
+	gprof-call-graph.c \
+	gprof-call-graph.h \
+	gprof-call-graph-block.c \
+	gprof-call-graph-block.h \
+	gprof-call-graph-block-entry.c \
+	gprof-call-graph-block-entry.h \
+	gprof-call-graph-view.c \
+	gprof-call-graph-view.h \
+	gprof-flat-profile.c \
+	gprof-flat-profile.h \
+	gprof-flat-profile-entry.c \
+	gprof-flat-profile-entry.h \
+	gprof-flat-profile-view.c \
+	gprof-flat-profile-view.h \
+	gprof-function-call-tree-view.c \
+	gprof-function-call-tree-view.h \
+	gprof-profile-data.c \
+	gprof-profile-data.h \
+	gprof-view.c \
+	gprof-view.h \
+	gprof-view-manager.c \
+	gprof-view-manager.h \
+	string-utils.c \
+	string-utils.h \
+	plugin.c \
+	plugin.h \
+	gprof-options.c \
+	gprof-options.h 
+
+if HAVE_GRAPHVIZ
+libanjuta_profiler_la_SOURCES += \
+	gprof-function-call-chart-view.c \
+	gprof-function-call-chart-view.h 
+endif
+
+libanjuta_profiler_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
+
+# Plugin dependencies
+libanjuta_profiler_la_LIBADD = $(LIBANJUTA_LIBS) $(GLADE_LIBS) $(GNOME_CANVAS_LIBS) $(GIO_LIBS) $(LIBXML_LIBS)
+
+if HAVE_GRAPHVIZ
+libanjuta_profiler_la_LIBADD += $(GRAPHVIZ_LIBS)
+endif
+
+EXTRA_DIST = \
+	$(plugin_in_files) \
+	$(profiler_plugin_DATA) \
+	$(profiler_ui_DATA) \
+	$(profiler_pixmaps_DATA) \
+	$(profiler_glade_DATA)
+

Added: trunk/plugins/profiler/anjuta-profiler-plugin-48.png
==============================================================================
Binary file. No diff available.

Added: trunk/plugins/profiler/anjuta-profiler-plugin.svg
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/anjuta-profiler-plugin.svg	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,396 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://web.resource.org/cc/";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:xlink="http://www.w3.org/1999/xlink";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   inkscape:export-ydpi="90.000000"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-filename="/home/maker/icons/anjuta-new/large/anjuta-profiler-plugin-48.png"
+   width="48px"
+   height="48px"
+   id="svg11300"
+   sodipodi:version="0.32"
+   inkscape:version="0.45.1"
+   sodipodi:docbase="/home/maker/icons/anjuta-new/large"
+   sodipodi:docname="anjuta-profiler.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs3">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4175">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop4177" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop4179" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12512">
+      <stop
+         style="stop-color:#db021b;stop-opacity:1;"
+         offset="0"
+         id="stop12517" />
+      <stop
+         style="stop-color:#fc969f;stop-opacity:1;"
+         offset="1"
+         id="stop12514" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient10653">
+      <stop
+         style="stop-color:#f3f4ff;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop10655" />
+      <stop
+         style="stop-color:#9193af;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop10657" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient42174">
+      <stop
+         style="stop-color:#a0a0a0;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop42176" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop42178" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2145">
+      <stop
+         style="stop-color:#fffffd;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop2147" />
+      <stop
+         style="stop-color:#cbcbc9;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop2149" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient37935">
+      <stop
+         id="stop37937"
+         offset="0.0000000"
+         style="stop-color:#9497b3;stop-opacity:1.0000000;" />
+      <stop
+         id="stop37939"
+         offset="1.0000000"
+         style="stop-color:#4c4059;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2152">
+      <stop
+         id="stop2154"
+         offset="0.0000000"
+         style="stop-color:#9aa29a;stop-opacity:1.0000000;" />
+      <stop
+         id="stop2156"
+         offset="1.0000000"
+         style="stop-color:#b5beb5;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3816">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop3818" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop3820" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3816"
+       id="radialGradient3822"
+       cx="31.112698"
+       cy="19.008621"
+       fx="31.112698"
+       fy="19.008621"
+       r="8.6620579"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2152"
+       id="linearGradient4307"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.925888,0,0,0.9131058,-27.681039,-13.288565)"
+       x1="8.9156475"
+       y1="37.197018"
+       x2="9.8855033"
+       y2="52.090678" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient10653"
+       id="radialGradient4309"
+       gradientUnits="userSpaceOnUse"
+       cx="11.329200"
+       cy="10.583970"
+       fx="11.329200"
+       fy="10.583970"
+       r="15.532059" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2145"
+       id="radialGradient4311"
+       gradientUnits="userSpaceOnUse"
+       cx="11.901996"
+       cy="10.045444"
+       fx="11.901996"
+       fy="10.045444"
+       r="29.292715" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient42174"
+       id="linearGradient4313"
+       gradientUnits="userSpaceOnUse"
+       x1="6.3422160"
+       y1="7.7893324"
+       x2="22.218424"
+       y2="25.884274" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient37935"
+       id="radialGradient5212"
+       gradientUnits="userSpaceOnUse"
+       cx="8.7468252"
+       cy="6.8283234"
+       fx="8.7468252"
+       fy="6.8283234"
+       r="29.889715" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient12512"
+       id="linearGradient4187"
+       gradientUnits="userSpaceOnUse"
+       x1="-0.1285117"
+       y1="16.793879"
+       x2="6.5021791"
+       y2="5.6326456"
+       gradientTransform="matrix(0.7373332,-0.6786439,1.0415405,1.1437626,-4.8768974,-0.7456627)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4175"
+       id="linearGradient6131"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.7373332,-0.6786439,-1.0415405,1.1437626,53.598326,-0.7456627)"
+       x1="-3.1292918"
+       y1="14.357655"
+       x2="9.21803"
+       y2="7.7905197" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient12512"
+       id="linearGradient6135"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.9996549,-3.9592608e-3,-6.0765129e-3,1.5506801,27.597727,-13.056954)"
+       x1="2.0876698"
+       y1="14.027262"
+       x2="3.2673819"
+       y2="7.3170419" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4175"
+       id="linearGradient7108"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.7373332,-0.6786439,1.0415405,1.1437626,-32.876897,-0.7456627)"
+       x1="-3.1292918"
+       y1="14.357655"
+       x2="9.21803"
+       y2="7.7905197" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient12512"
+       id="linearGradient7111"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.9996549,-3.9592608e-3,-6.0765129e-3,1.5506801,27.597727,-25.056954)"
+       x1="2.0876698"
+       y1="14.027262"
+       x2="3.2673819"
+       y2="7.3170419" />
+  </defs>
+  <sodipodi:namedview
+     stroke="#c4a000"
+     fill="#babdb6"
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.7254902"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="23.795886"
+     inkscape:cy="19.481054"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="false"
+     inkscape:document-units="px"
+     inkscape:showpageshadow="false"
+     inkscape:window-width="833"
+     inkscape:window-height="772"
+     inkscape:window-x="305"
+     inkscape:window-y="157"
+     borderlayer="true"
+     inkscape:object-paths="false"
+     inkscape:guide-bbox="false" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:source>http://jimmac.musichall.cz</dc:source>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/"; />
+        <dc:title />
+        <dc:subject>
+          <rdf:Bag>
+            <rdf:li>stopwatch</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+        <dc:contributor>
+          <cc:Agent>
+            <dc:title>Tom</dc:title>
+          </cc:Agent>
+        </dc:contributor>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/by-sa/2.0/";>
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/Reproduction"; />
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/Distribution"; />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/Notice"; />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/Attribution"; />
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/DerivativeWorks"; />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/ShareAlike"; />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       sodipodi:nodetypes="ccccc"
+       id="path6129"
+       d="M 44.218309,11.385476 C 44.350099,8.2217749 40.281872,4.7401654 37.611623,5.3046595 L 33.504456,8.3545311 L 41.584872,15.791773 L 44.218309,11.385476 z "
+       style="fill:url(#linearGradient6131);fill-opacity:1;fill-rule:evenodd;stroke:#605773;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    <path
+       style="fill:url(#linearGradient4187);fill-opacity:1.0;fill-rule:evenodd;stroke:#a40000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 4.5031192,11.385476 C 4.37133,8.2217749 8.4395558,4.7401654 11.109804,5.3046595 L 15.216973,8.3545311 L 7.1365574,15.791773 L 4.5031192,11.385476 z "
+       id="path3204"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1  22.45064,19.008621 A 8.6620579 8.6620579 0 1 1  39.774755 19.008621 z"
+       sodipodi:ry="8.6620579"
+       sodipodi:rx="8.6620579"
+       sodipodi:cy="19.008621"
+       sodipodi:cx="31.112698"
+       id="path4318"
+       style="opacity:0.65;color:#000000;fill:url(#radialGradient3822);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       sodipodi:type="arc"
+       transform="matrix(2.563158,0,0,0.4033777,-53.969893,37.629055)" />
+    <path
+       sodipodi:nodetypes="cccc"
+       id="path14341"
+       d="M 19.595598,6.4847321 L 6.1447855,22.203571 L 7.3237393,23.374207 L 19.595598,6.4847321 z "
+       style="color:#000000;fill:url(#linearGradient4307);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+    <path
+       sodipodi:nodetypes="cccc"
+       id="path18921"
+       d="M 19.482813,6.4000542 L 7.4877434,23.122568 L 9.2013361,24.643611 L 19.482813,6.4000542 z "
+       style="fill:#fefefe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" />
+    <path
+       transform="matrix(1.3408151,0,0,1.3479937,2.7192468,3.6048515)"
+       d="M 31.160714 16.910715 A 14.910714 14.910714 0 1 1  1.3392859,16.910715 A 14.910714 14.910714 0 1 1  31.160714 16.910715 z"
+       sodipodi:ry="14.910714"
+       sodipodi:rx="14.910714"
+       sodipodi:cy="16.910715"
+       sodipodi:cx="16.25"
+       id="path27786"
+       style="fill:url(#radialGradient5212);fill-opacity:1;fill-rule:evenodd;stroke:#605773;stroke-width:0.74382669;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
+       sodipodi:type="arc" />
+    <path
+       transform="matrix(1.0900874,0,0,1.0959236,6.7049343,7.778391)"
+       d="M 31.160714 16.910715 A 14.910714 14.910714 0 1 1  1.3392859,16.910715 A 14.910714 14.910714 0 1 1  31.160714 16.910715 z"
+       sodipodi:ry="14.910714"
+       sodipodi:rx="14.910714"
+       sodipodi:cy="16.910715"
+       sodipodi:cx="16.25"
+       id="path35549"
+       style="fill:url(#radialGradient4311);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4313);stroke-width:0.75750083;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
+       sodipodi:type="arc" />
+    <path
+       sodipodi:type="arc"
+       style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#radialGradient4309);stroke-width:0.78430116;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
+       id="path10651"
+       sodipodi:cx="16.25"
+       sodipodi:cy="16.910715"
+       sodipodi:rx="14.910714"
+       sodipodi:ry="14.910714"
+       d="M 31.160714 16.910715 A 14.910714 14.910714 0 1 1  1.3392859,16.910715 A 14.910714 14.910714 0 1 1  31.160714 16.910715 z"
+       transform="matrix(1.2716216,0,0,1.2784297,3.8436139,4.6979925)" />
+    <rect
+       style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#555753;stroke-width:0.99999988;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect2227"
+       width="25.81196"
+       height="12"
+       x="11.571921"
+       y="20.5" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 13.75,22.75 L 17.25,22.75 L 17.25,30.25 L 13.75,30.25 L 13.75,22.75 z "
+       id="path2209"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 29.25,22.75 L 29.25,30.25"
+       id="path3190"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cccccc"
+       id="path3192"
+       d="M 31.714466,22.75 L 35.25,22.75 L 35.25,26.544194 L 31.714466,26.544194 L 31.714466,30.426777 L 35.25,30.426777"
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    <path
+       id="path5132"
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"
+       d="M 19.75,22.75 L 23.25,22.75 L 23.25,30.25 L 19.75,30.25 M 23.25,26.544194 L 19.75,26.544194"
+       sodipodi:nodetypes="cccccc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path5142"
+       d="M 25.75,27.499999 L 25.75,28.75"
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.50000012;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.50000012;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 25.75,23.999999 L 25.75,25.25"
+       id="path5144"
+       sodipodi:nodetypes="cc" />
+  </g>
+</svg>

Added: trunk/plugins/profiler/gprof-call-graph-block-entry.c
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-call-graph-block-entry.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,168 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-call-graph-block-entry.c
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-call-graph-block-entry.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include "gprof-call-graph-block-entry.h"
+
+struct _GProfCallGraphBlockEntryPriv
+{
+	gfloat time_perc;  /* Percent of total execution */
+	gfloat self_sec;   /* Time spent executing this function */
+	gfloat child_sec;  /* Time spent on this function's children */
+	gchar *calls;      /* Calls from parents and total */
+	gchar *name;       /* Name of the function */
+};
+
+static void
+gprof_call_graph_block_entry_init (GProfCallGraphBlockEntry *self)
+{
+	self->priv = g_new0 (GProfCallGraphBlockEntryPriv, 1);
+}
+
+static void
+gprof_call_graph_block_entry_finalize (GObject *obj)
+{
+	GProfCallGraphBlockEntry *self;
+	
+	self = (GProfCallGraphBlockEntry *) obj;
+	
+	g_free (self->priv->name);
+	g_free (self->priv->calls);
+	g_free (self->priv);
+}
+
+static void 
+gprof_call_graph_block_entry_class_init (GProfCallGraphBlockEntryClass *klass)
+{
+	GObjectClass *object_class;
+	
+	object_class = (GObjectClass *) klass;
+	
+	object_class->finalize = gprof_call_graph_block_entry_finalize;
+}
+
+GType
+gprof_call_graph_block_entry_get_type (void)
+{
+	static GType obj_type = 0;
+	
+	if (!obj_type)
+	{
+		static const GTypeInfo obj_info = 
+		{
+			sizeof (GProfCallGraphBlockEntryClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) gprof_call_graph_block_entry_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,           /* class_data */
+			sizeof (GProfCallGraphBlockEntry),
+			0,              /* n_preallocs */
+			(GInstanceInitFunc) gprof_call_graph_block_entry_init,
+			NULL            /* value_table */
+		};
+		obj_type = g_type_register_static (G_TYPE_OBJECT,
+		                                   "GProfCallGraphBlockEntry", &obj_info, 
+											0);
+	}
+	return obj_type;
+}
+
+GProfCallGraphBlockEntry *
+gprof_call_graph_block_primary_entry_new (gchar **fields)
+{
+	GProfCallGraphBlockEntry *entry;
+	
+	entry = g_object_new (GPROF_CALL_GRAPH_BLOCK_ENTRY_TYPE, NULL);
+	
+	entry->priv->time_perc = g_ascii_strtod (fields[0], NULL);
+	entry->priv->self_sec = g_ascii_strtod (fields[1], NULL);
+	entry->priv->child_sec = g_ascii_strtod (fields[2], NULL);
+	entry->priv->calls = g_strdup (fields[3]);
+	entry->priv->name = g_strdup (fields[4]);
+
+	return entry;	
+}
+
+GProfCallGraphBlockEntry *
+gprof_call_graph_block_secondary_entry_new (gchar **fields)
+{
+	GProfCallGraphBlockEntry *entry;
+	
+	entry = g_object_new (GPROF_CALL_GRAPH_BLOCK_ENTRY_TYPE, NULL);
+	
+	entry->priv->time_perc = 0.0f;
+	entry->priv->self_sec = g_ascii_strtod (fields[0], NULL);
+	entry->priv->child_sec = g_ascii_strtod (fields[1], NULL);
+	entry->priv->calls = g_strdup (fields[2]);
+	entry->priv->name = g_strdup (fields[3]);
+
+	return entry;	
+}
+
+void 
+gprof_call_graph_block_entry_free (GProfCallGraphBlockEntry *self)
+{
+	g_object_unref (self);
+}
+
+gfloat
+gprof_call_graph_block_entry_get_time_perc (GProfCallGraphBlockEntry *self)
+{
+	return self->priv->time_perc;
+}
+
+
+gfloat
+gprof_call_graph_block_entry_get_self_sec (GProfCallGraphBlockEntry *self)
+{
+	return self->priv->self_sec;
+}
+
+gfloat
+gprof_call_graph_block_entry_get_child_sec (GProfCallGraphBlockEntry *self)
+{
+	return self->priv->child_sec;
+}
+
+gchar *
+gprof_call_graph_block_entry_get_calls (GProfCallGraphBlockEntry *self)
+{
+	return self->priv->calls;
+}
+
+gchar *
+gprof_call_graph_block_entry_get_name (GProfCallGraphBlockEntry *self)
+{
+	return self->priv->name;
+}
+
+GProfCallGraphBlockEntry *
+gprof_call_graph_block_entry_get_next (GList *current_iter, GList **next_iter)
+{
+	*next_iter = g_list_next (current_iter);
+	
+	if (*next_iter)
+		return GPROF_CALL_GRAPH_BLOCK_ENTRY ((*next_iter)->data);
+	else
+		return NULL;
+}

Added: trunk/plugins/profiler/gprof-call-graph-block-entry.h
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-call-graph-block-entry.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,71 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-call-graph-block-entry.h
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-call-graph-block-entry.h 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _GPROF_CALL_GRAPH_BLOCK_ENTRY
+#define _GPROF_CALL_GRAPH_BLOCK_ENTRY
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+
+G_BEGIN_DECLS
+
+typedef struct _GProfCallGraphBlockEntry         GProfCallGraphBlockEntry;
+typedef struct _GProfCallGraphBlockEntryClass    GProfCallGraphBlockEntryClass;
+typedef struct _GProfCallGraphBlockEntryPriv     GProfCallGraphBlockEntryPriv;
+
+#define GPROF_CALL_GRAPH_BLOCK_ENTRY_TYPE            (gprof_call_graph_block_entry_get_type ())
+#define GPROF_CALL_GRAPH_BLOCK_ENTRY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GPROF_CALL_GRAPH_BLOCK_ENTRY_TYPE, GProfCallGraphBlockEntry))
+#define GPROF_CALL_GRAPH_BLOCK_ENTRY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GPROF_CALL_GRAPH_BLOCK_ENTRY_TYPE, GProfCallGraphBlockEntryClass))
+#define IS_GPROF_CALL_GRAPH_BLOCK_ENTRY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GPROF_CALL_GRAPH_BLOCK_ENTRY_TYPE))
+#define IS_GPROF_CALL_GRAPH_BLOCK_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GPROF_CALL_GRAPH_BLOCK_ENTRY_TYPE))
+
+struct  _GProfCallGraphBlockEntry
+{
+	GObject parent;
+	GProfCallGraphBlockEntryPriv *priv;
+};
+
+struct _GProfCallGraphBlockEntryClass
+{
+	GObjectClass parent_class;
+};
+
+GType gprof_call_graph_block_entry_get_type (void);
+
+GProfCallGraphBlockEntry *gprof_call_graph_block_primary_entry_new (gchar **fields);
+GProfCallGraphBlockEntry *gprof_call_graph_block_secondary_entry_new (gchar **fields);
+void gprof_call_graph_block_entry_free (GProfCallGraphBlockEntry *self);
+
+gfloat gprof_call_graph_block_entry_get_time_perc (GProfCallGraphBlockEntry *self);
+gfloat gprof_call_graph_block_entry_get_self_sec (GProfCallGraphBlockEntry *self);
+gfloat gprof_call_graph_block_entry_get_child_sec (GProfCallGraphBlockEntry *self);
+gchar *gprof_call_graph_block_entry_get_calls (GProfCallGraphBlockEntry *self);
+gchar *gprof_call_graph_block_entry_get_name (GProfCallGraphBlockEntry *self);
+
+GProfCallGraphBlockEntry *gprof_call_graph_block_entry_get_next (GList *current_iter,
+														   		 GList **next_iter);
+
+G_END_DECLS
+
+#endif

Added: trunk/plugins/profiler/gprof-call-graph-block.c
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-call-graph-block.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,218 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-call-graph-block.c
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-call-graph-block.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include "gprof-call-graph-block.h"
+
+struct _GProfCallGraphBlockPriv
+{
+	GProfCallGraphBlockEntry *primary_entry;  /* Function this block refers to */
+	GList *parents;					  		  /* Functions that call this one */
+	GList *children;						  /* Function that this one calls */
+	GHashTable *lookup_set;					  /* Used to determine if this  
+									 		   * function is recursive */
+};
+
+static void
+gprof_call_graph_block_init (GProfCallGraphBlock *self)
+{
+	self->priv = g_new0 (GProfCallGraphBlockPriv, 1);
+	
+	self->priv->lookup_set = g_hash_table_new (g_str_hash, g_str_equal);
+}
+
+static void
+gprof_call_graph_block_finalize (GObject *obj)
+{
+	GProfCallGraphBlock *self;
+	GList *current;
+	
+	self = (GProfCallGraphBlock *) obj;
+	
+	gprof_call_graph_block_entry_free (self->priv->primary_entry);
+	
+	current = self->priv->parents;
+	
+	while (current)
+	{
+		gprof_call_graph_block_entry_free (GPROF_CALL_GRAPH_BLOCK_ENTRY (current->data));
+		current = g_list_next (current);
+	}
+	
+	g_list_free (self->priv->parents);
+	
+	current = self->priv->children;
+	
+	while (current)
+	{
+		gprof_call_graph_block_entry_free (GPROF_CALL_GRAPH_BLOCK_ENTRY (current->data));
+		current = g_list_next (current);
+	}	
+	
+	g_list_free (self->priv->children);
+	
+	g_hash_table_destroy (self->priv->lookup_set);
+	
+	g_free (self->priv);
+}
+
+static void 
+gprof_call_graph_block_class_init (GProfCallGraphBlockClass *klass)
+{
+	GObjectClass *object_class;
+	
+	object_class = (GObjectClass *) klass;
+	
+	object_class->finalize = gprof_call_graph_block_finalize;
+}
+
+GType
+gprof_call_graph_block_get_type (void)
+{
+	static GType obj_type = 0;
+	
+	if (!obj_type)
+	{
+		static const GTypeInfo obj_info = 
+		{
+			sizeof (GProfCallGraphBlockClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) gprof_call_graph_block_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,           /* class_data */
+			sizeof (GProfCallGraphBlock),
+			0,              /* n_preallocs */
+			(GInstanceInitFunc) gprof_call_graph_block_init,
+			NULL            /* value_table */
+		};
+		obj_type = g_type_register_static (G_TYPE_OBJECT,
+		                                   "GProfCallGraphBlock", &obj_info, 
+											0);
+	}
+	return obj_type;
+}
+
+GProfCallGraphBlock *
+gprof_call_graph_block_new (void)
+{
+	return g_object_new (GPROF_CALL_GRAPH_BLOCK_TYPE, NULL);
+}
+
+void
+gprof_call_graph_block_free (GProfCallGraphBlock *self)
+{
+	g_object_unref (self);
+}
+
+void
+gprof_call_graph_block_add_primary_entry (GProfCallGraphBlock *self,
+										  GProfCallGraphBlockEntry *entry)
+{
+	if (!self->priv->primary_entry)
+		self->priv->primary_entry = entry;
+}
+
+void 
+gprof_call_graph_block_add_parent_entry (GProfCallGraphBlock *self,
+										 GProfCallGraphBlockEntry *entry)
+{
+	self->priv->parents = g_list_append (self->priv->parents, entry);
+	g_hash_table_insert (self->priv->lookup_set, 
+						 gprof_call_graph_block_entry_get_name (entry), NULL);
+}
+
+void 
+gprof_call_graph_block_add_child_entry (GProfCallGraphBlock *self,
+										GProfCallGraphBlockEntry *entry)
+{
+	self->priv->children = g_list_append (self->priv->children, entry);
+	g_hash_table_insert (self->priv->lookup_set, 
+						 gprof_call_graph_block_entry_get_name (entry), NULL);
+}
+
+GProfCallGraphBlockEntry *
+gprof_call_graph_block_get_primary_entry (GProfCallGraphBlock *self)
+{
+	return self->priv->primary_entry;
+}
+
+gboolean
+gprof_call_graph_block_has_parents (GProfCallGraphBlock *self)
+{
+	return (self->priv->parents != NULL);
+}
+
+gboolean
+gprof_call_graph_block_has_children (GProfCallGraphBlock *self)
+{
+	return (self->priv->children != NULL);
+}
+
+GProfCallGraphBlockEntry *
+gprof_call_graph_block_get_first_child (GProfCallGraphBlock *self,
+										GList **iter)
+{
+	*iter = self->priv->children;
+	
+	if (self->priv->children)
+		return GPROF_CALL_GRAPH_BLOCK_ENTRY ((*iter)->data);
+	else
+		return NULL;
+}
+
+GProfCallGraphBlockEntry *
+gprof_call_graph_block_get_first_parent (GProfCallGraphBlock *self,
+										 GList **iter)
+{
+	*iter = self->priv->parents;
+	
+	if (self->priv->parents)
+		return GPROF_CALL_GRAPH_BLOCK_ENTRY ((*iter)->data);
+	else
+		return NULL;
+}
+
+gboolean
+gprof_call_graph_block_is_recursive (GProfCallGraphBlock *self)
+{
+	gchar *name;
+	
+	name = gprof_call_graph_block_entry_get_name (self->priv->primary_entry);
+	
+	/* Determine if this block refers to a recursive function. 
+	 * Recursive blocks are those whose primary entry also is a parent
+	 * or child of the primary. */
+	return g_hash_table_lookup_extended (self->priv->lookup_set, name, NULL, 
+										 NULL);
+}
+
+GProfCallGraphBlock *
+gprof_call_graph_block_get_next (GList *current_iter, GList **next_iter)
+{
+	*next_iter = g_list_next (current_iter);
+	
+	if (*next_iter)
+		return GPROF_CALL_GRAPH_BLOCK ((*next_iter)->data);
+	else 
+		return NULL;
+}

Added: trunk/plugins/profiler/gprof-call-graph-block.h
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-call-graph-block.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,81 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-call-graph-block.h
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-call-graph-block.h 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _GPROF_CALL_GRAPH_BLOCK_H
+#define _GPROF_CALL_GRAPH_BLOCK_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include "gprof-call-graph-block-entry.h"
+
+G_BEGIN_DECLS
+
+typedef struct _GProfCallGraphBlock         GProfCallGraphBlock;
+typedef struct _GProfCallGraphBlockClass    GProfCallGraphBlockClass;
+typedef struct _GProfCallGraphBlockPriv     GProfCallGraphBlockPriv;
+
+#define GPROF_CALL_GRAPH_BLOCK_TYPE            (gprof_call_graph_block_get_type ())
+#define GPROF_CALL_GRAPH_BLOCK(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GPROF_CALL_GRAPH_BLOCK_TYPE, GProfCallGraphBlock))
+#define GPROF_CALL_GRAPH_BLOCK_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GPROF_CALL_GRAPH_BLOCK_TYPE, GProfCallGraphBlockClass))
+#define IS_GPROF_CALL_GRAPH_BLOCK(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GPROF_CALL_GRAPH_BLOCK_TYPE))
+#define IS_GPROF_CALL_GRAPH_BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GPROF_CALL_GRAPH_BLOCK_TYPE))
+
+struct  _GProfCallGraphBlock
+{
+	GObject parent;
+	GProfCallGraphBlockPriv *priv;
+};
+
+struct _GProfCallGraphBlockClass
+{
+	GObjectClass parent_class;
+};
+
+GType gprof_call_graph_block_get_type (void);
+
+GProfCallGraphBlock *gprof_call_graph_block_new (void);
+void gprof_call_graph_block_free (GProfCallGraphBlock *self);
+
+void gprof_call_graph_block_add_primary_entry (GProfCallGraphBlock *self,
+											   GProfCallGraphBlockEntry *entry);
+void gprof_call_graph_block_add_child_entry (GProfCallGraphBlock *self,
+											 GProfCallGraphBlockEntry *entry);
+void gprof_call_graph_block_add_parent_entry (GProfCallGraphBlock *self,
+											  GProfCallGraphBlockEntry *entry);
+
+GProfCallGraphBlockEntry *gprof_call_graph_block_get_primary_entry (GProfCallGraphBlock *self);
+gboolean gprof_call_graph_block_has_parents (GProfCallGraphBlock *self);
+gboolean gprof_call_graph_block_has_children (GProfCallGraphBlock *self);
+GProfCallGraphBlockEntry *gprof_call_graph_block_get_first_parent (GProfCallGraphBlock *self,
+																   GList **iter);
+GProfCallGraphBlockEntry *gprof_call_graph_block_get_first_child (GProfCallGraphBlock *self,
+																  GList **iter);
+
+gboolean gprof_call_graph_block_is_recursive (GProfCallGraphBlock *self);
+
+GProfCallGraphBlock *gprof_call_graph_block_get_next (GList *current_iter,
+													  GList **next_iter);
+
+G_END_DECLS
+
+#endif

Added: trunk/plugins/profiler/gprof-call-graph-view.c
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-call-graph-view.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,735 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-call-graph-view.c
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-call-graph-view.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include "gprof-call-graph-view.h"
+#include <glib/gi18n-lib.h>
+
+struct _GProfCallGraphViewPriv
+{
+	GladeXML *gxml;
+	GtkListStore *functions_list_store;
+	GtkListStore *called_list_store;
+	GtkListStore *called_by_list_store;
+	GHashTable *functions_iter_table; /* Map functions names to list iters */
+};
+
+/* Function list columsns */
+enum
+{
+	FUNCTIONS_COL_RECURSIVE = 0,
+	FUNCTIONS_COL_NAME,
+	FUNCTIONS_COL_TIME,
+	FUNCTIONS_COL_SELF,
+	FUNCTIONS_COL_CHILDREN,
+	FUNCTIONS_COL_CALLS,
+	FUNCTIONS_NUM_COLS
+};
+
+/* Called list columsns  (also used by the Called By list) */
+enum
+{
+	CALLED_COL_RECURSIVE = 0,
+	CALLED_COL_NAME,
+	CALLED_COL_SELF,
+	CALLED_COL_CHILDREN,
+	CALLED_COL_CALLS,
+	CALLED_NUM_COLS
+};
+
+/* Add an item to Called/Called by lists */
+static void gprof_call_graph_view_add_list_item (GProfCallGraphView *self,
+												 GtkListStore *store, 
+												 GProfCallGraphBlockEntry *entry,
+						   						 GtkTreeIter *iter)
+{
+	GProfProfileData *data;
+	GProfCallGraph *call_graph;
+	GProfCallGraphBlock *block;
+	
+	data = gprof_view_get_data (GPROF_VIEW (self));
+	call_graph = gprof_profile_data_get_call_graph (data);
+	
+	gtk_list_store_append (store, iter);
+	gtk_list_store_set (store, iter, CALLED_COL_NAME,
+						gprof_call_graph_block_entry_get_name (entry),
+						CALLED_COL_SELF,
+						gprof_call_graph_block_entry_get_self_sec (entry),
+						CALLED_COL_CHILDREN,
+						gprof_call_graph_block_entry_get_child_sec (entry),
+						CALLED_COL_CALLS,
+						gprof_call_graph_block_entry_get_calls (entry),	
+						-1);
+	
+	block = gprof_call_graph_find_block (call_graph,
+										 gprof_call_graph_block_entry_get_name (entry));
+	
+	
+	if (block)
+	{
+		if (gprof_call_graph_block_is_recursive (block))
+			gtk_list_store_set (store, iter, CALLED_COL_RECURSIVE, 
+								GTK_STOCK_REFRESH);
+	}
+	
+}
+
+/* Function selection callback */
+static gboolean
+on_function_selected (GtkTreeSelection *selection, GtkTreeModel *model, 
+					  GtkTreePath *path, gboolean path_currently_selected,
+					  gpointer user_data)
+{
+	GProfCallGraphView *self;
+	GProfProfileData *data;
+	GProfCallGraph *call_graph;
+	GProfCallGraphBlock *block;
+	GProfCallGraphBlockEntry *current_entry;
+	GtkWidget *called_list_view;
+	GtkWidget *called_by_list_view;
+	GList *entry_iter;
+	GtkTreeIter list_iter;
+	gchar *selected_function_name;
+	
+	self = GPROF_CALL_GRAPH_VIEW (user_data);
+	data = gprof_view_get_data (GPROF_VIEW (self));
+	call_graph = gprof_profile_data_get_call_graph (data);
+	called_list_view = glade_xml_get_widget (self->priv->gxml, 
+											 "called_list_view");
+	called_by_list_view = glade_xml_get_widget (self->priv->gxml,
+												"called_by_list_view");
+	
+	gtk_tree_model_get_iter (model, &list_iter, path);
+	gtk_tree_model_get (model, &list_iter, FUNCTIONS_COL_NAME, 
+						&selected_function_name, -1);
+	
+	if (selected_function_name)
+	{
+		g_object_ref (self->priv->called_list_store);
+		g_object_ref (self->priv->called_by_list_store);
+		
+		gtk_tree_view_set_model (GTK_TREE_VIEW (called_list_view), NULL);
+		gtk_tree_view_set_model (GTK_TREE_VIEW (called_by_list_view), NULL);
+		gtk_list_store_clear (self->priv->called_list_store);
+		gtk_list_store_clear (self->priv->called_by_list_store);
+		
+		block = gprof_call_graph_find_block (call_graph, 
+											 selected_function_name);
+		current_entry = gprof_call_graph_block_get_first_child (block, 
+																&entry_iter);
+		
+		g_free (selected_function_name);
+		
+		while (current_entry)
+		{
+			gprof_call_graph_view_add_list_item (self, 
+												 self->priv->called_list_store, 
+												 current_entry, &list_iter);
+			
+			current_entry = gprof_call_graph_block_entry_get_next (entry_iter, 
+																   &entry_iter);
+		}
+		
+		current_entry = gprof_call_graph_block_get_first_parent (block, 
+																 &entry_iter);
+		
+		while (current_entry)
+		{
+			gprof_call_graph_view_add_list_item (self, 
+												 self->priv->called_by_list_store, 
+												 current_entry, &list_iter);
+			
+			current_entry = gprof_call_graph_block_entry_get_next (entry_iter, 
+																   &entry_iter);
+		}
+		
+		gtk_tree_view_set_model (GTK_TREE_VIEW (called_list_view), 
+								 GTK_TREE_MODEL (self->priv->called_list_store));
+		gtk_tree_view_set_model (GTK_TREE_VIEW (called_by_list_view), 
+								 GTK_TREE_MODEL (self->priv->called_by_list_store));
+		g_object_unref (self->priv->called_list_store);
+		g_object_unref (self->priv->called_by_list_store);
+		
+		/* Set up search colums again */
+		gtk_tree_view_set_search_column (GTK_TREE_VIEW (called_list_view),
+										 CALLED_COL_NAME);
+		gtk_tree_view_set_search_column (GTK_TREE_VIEW (called_by_list_view),
+										 CALLED_COL_NAME);
+	}
+	
+	return TRUE;
+}
+
+/* Select a function in the Functions list by name */
+static void
+gprof_call_graph_view_select_function (GProfCallGraphView *self, gchar *name)
+{
+	GtkWidget *functions_list_view;
+	GtkTreeSelection *functions_list_selection;
+	GtkTreeIter *functions_list_iter;
+	GtkTreePath *functions_list_path;
+	
+	functions_list_view = glade_xml_get_widget (self->priv->gxml, 
+												"functions_list_view");
+	functions_list_selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (functions_list_view));
+	
+	functions_list_iter = g_hash_table_lookup (self->priv->functions_iter_table,
+											   name);
+	
+	if (functions_list_iter)
+	{
+		gtk_tree_selection_select_iter (functions_list_selection, 
+										functions_list_iter);
+		functions_list_path = gtk_tree_model_get_path (GTK_TREE_MODEL (self->priv->functions_list_store),
+								 					   functions_list_iter);
+		gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (functions_list_view),
+									  functions_list_path, NULL, TRUE, 0.5, 
+									  0.0);
+
+		gtk_tree_path_free (functions_list_path);		
+		
+	}
+}
+
+static void 
+on_functions_list_view_row_activated (GtkTreeView *list_view,
+									  GtkTreePath *path,
+									  GtkTreeViewColumn *col,												 
+									  gpointer user_data)
+{
+	GProfView *self;
+	GtkTreeIter list_iter;
+	GtkTreeModel *model;
+	gchar *selected_function_name;
+	
+	self = GPROF_VIEW (user_data);
+	model = gtk_tree_view_get_model (list_view);
+	
+	if (gtk_tree_model_get_iter (model, &list_iter, path))
+	{
+		gtk_tree_model_get (model,
+							&list_iter, CALLED_COL_NAME, 
+							&selected_function_name, -1);
+		
+		gprof_view_show_symbol_in_editor (self, selected_function_name);
+		
+		g_free (selected_function_name);
+	}	
+}
+
+/* Called/Called By list row activation callbacks */
+static void on_called_list_view_row_activated (GtkTreeView *list_view,
+											   GtkTreePath *path,
+											   GtkTreeViewColumn *col,												 
+											   gpointer user_data)
+{
+	GProfCallGraphView *self;
+	GtkTreeIter list_iter;
+	GtkTreeModel *model;
+	gchar *selected_function_name;
+	
+	self = GPROF_CALL_GRAPH_VIEW (user_data);
+	model = gtk_tree_view_get_model (list_view);
+	
+	if (gtk_tree_model_get_iter (model, &list_iter, path))
+	{
+		gtk_tree_model_get (model,
+							&list_iter, CALLED_COL_NAME, 
+							&selected_function_name, -1);
+		
+		gprof_call_graph_view_select_function (self, selected_function_name);
+		
+		g_free (selected_function_name);
+	}	
+}
+
+static void
+gprof_call_graph_view_create_columns (GProfCallGraphView *self)
+{
+	GtkTreeViewColumn *col;
+	GtkCellRenderer *renderer;
+	GtkWidget *functions_list_view;
+	GtkWidget *called_list_view;
+	GtkWidget *called_by_list_view;
+	
+	functions_list_view = glade_xml_get_widget (self->priv->gxml, 
+												"functions_list_view");
+	called_list_view = glade_xml_get_widget (self->priv->gxml,
+											 "called_list_view");
+	called_by_list_view = glade_xml_get_widget (self->priv->gxml,
+												"called_by_list_view");
+	
+	/* The Functions list will have all fields; all others have everything 
+	 * except a time field. */
+	
+	/* Recursive icon */
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_append_column (GTK_TREE_VIEW (functions_list_view), col);
+	renderer = gtk_cell_renderer_pixbuf_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_add_attribute (col, renderer, "stock-id", 
+										FUNCTIONS_COL_RECURSIVE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_append_column (GTK_TREE_VIEW (called_list_view), col);
+	renderer = gtk_cell_renderer_pixbuf_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_add_attribute (col, renderer, "stock-id", 
+										CALLED_COL_RECURSIVE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_append_column (GTK_TREE_VIEW (called_by_list_view), col);
+	renderer = gtk_cell_renderer_pixbuf_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_add_attribute (col, renderer, "stock-id", 
+										CALLED_COL_RECURSIVE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+
+	/* Function Name */
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (col, _("Function Name"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (functions_list_view), col);
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_add_attribute (col, renderer, "text", 
+										FUNCTIONS_COL_NAME);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (col, _("Function Name"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (called_list_view), col);
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_add_attribute (col, renderer, "text", 
+										CALLED_COL_NAME);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (col, _("Function Name"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (called_by_list_view), col);
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_add_attribute (col, renderer, "text", 
+										CALLED_COL_NAME);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+
+										
+	/* Time */
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (col, _("Time"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (functions_list_view), col);
+	
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_set_cell_data_func (col, renderer, 
+											 gprof_view_format_float,
+											 GINT_TO_POINTER (FUNCTIONS_COL_TIME),
+											 NULL);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+										
+	/* Self */
+	col = gtk_tree_view_column_new ();
+	
+	/* Total amount of time spent in this function, excluding those it calla.
+	 * This is the same as the "Seconds" field in the flat profile. */
+	gtk_tree_view_column_set_title (col, _("Self"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (functions_list_view), col);
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_set_cell_data_func (col, renderer, 
+											 gprof_view_format_float,
+											 GINT_TO_POINTER (FUNCTIONS_COL_SELF),
+											 NULL);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	col = gtk_tree_view_column_new ();
+	
+	/* Time spent in a subroutine of a function. */
+	gtk_tree_view_column_set_title (col, _("Self"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (called_list_view), col);
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_set_cell_data_func (col, renderer, 
+											 gprof_view_format_float,
+											 GINT_TO_POINTER (CALLED_COL_SELF),
+											 NULL);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	col = gtk_tree_view_column_new ();
+	
+	/* Time spent in this function when it was called by its caller */
+	gtk_tree_view_column_set_title (col, _("Self"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (called_by_list_view), col);
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_set_cell_data_func (col, renderer, 
+											 gprof_view_format_float,
+											 GINT_TO_POINTER (CALLED_COL_SELF),
+											 NULL);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+										
+	/* Children */
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (col, _("Children"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (functions_list_view), col);
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_set_cell_data_func (col, renderer, 
+											 gprof_view_format_float,
+											 GINT_TO_POINTER (FUNCTIONS_COL_CHILDREN),
+											 NULL);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (col, _("Children"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (called_list_view), col);
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_set_cell_data_func (col, renderer, 
+											 gprof_view_format_float,
+											 GINT_TO_POINTER (CALLED_COL_CHILDREN),
+											 NULL);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (col, _("Children"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (called_by_list_view), col);
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_set_cell_data_func (col, renderer, 
+											 gprof_view_format_float,
+											 GINT_TO_POINTER (CALLED_COL_CHILDREN),
+											 NULL);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+										
+	/* Calls */
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (col, _("Calls"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (functions_list_view), col);
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_add_attribute (col, renderer, "text", 
+										FUNCTIONS_COL_CALLS);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (col, _("Calls"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (called_list_view), col);
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_add_attribute (col, renderer, "text", 
+										CALLED_COL_CALLS);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (col, _("Calls"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (called_by_list_view), col);
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_add_attribute (col, renderer, "text", 
+										CALLED_COL_CALLS);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+										
+	/* Model setup */
+	gtk_tree_view_set_model (GTK_TREE_VIEW (functions_list_view),
+							 GTK_TREE_MODEL (self->priv->functions_list_store));
+	g_object_unref (self->priv->functions_list_store);
+	
+	gtk_tree_view_set_model (GTK_TREE_VIEW (called_list_view),
+							 GTK_TREE_MODEL (self->priv->called_list_store));
+	g_object_unref (self->priv->called_list_store);
+	
+	gtk_tree_view_set_model (GTK_TREE_VIEW (called_by_list_view),
+							 GTK_TREE_MODEL (self->priv->called_by_list_store));
+	g_object_unref (self->priv->called_by_list_store);
+	
+	
+}
+
+static void
+gprof_call_graph_view_init (GProfCallGraphView *self)
+{
+	GtkWidget *functions_list_view;
+	GtkWidget *called_list_view;
+	GtkWidget *called_by_list_view;
+	GtkWidget *called_jump_to_button;
+	GtkWidget *called_by_jump_to_button;	
+	GtkTreeSelection *functions_list_selection;
+	
+	self->priv = g_new0 (GProfCallGraphViewPriv, 1);
+	
+	self->priv->gxml = glade_xml_new (PACKAGE_DATA_DIR
+									  "/glade/profiler-call-graph.glade",  
+									  NULL, NULL);
+	self->priv->functions_list_store = gtk_list_store_new (FUNCTIONS_NUM_COLS,
+														   G_TYPE_STRING,
+														   G_TYPE_STRING,
+														   G_TYPE_FLOAT,
+														   G_TYPE_FLOAT,
+														   G_TYPE_FLOAT,
+														   G_TYPE_STRING);
+	
+	self->priv->called_list_store = gtk_list_store_new (CALLED_NUM_COLS,
+														G_TYPE_STRING,
+														G_TYPE_STRING,
+														G_TYPE_FLOAT,
+														G_TYPE_FLOAT,
+														G_TYPE_STRING);
+	
+	self->priv->called_by_list_store = gtk_list_store_new (CALLED_NUM_COLS,
+														   G_TYPE_STRING,
+														   G_TYPE_STRING,
+														   G_TYPE_FLOAT,
+														   G_TYPE_FLOAT,
+														   G_TYPE_STRING);
+														   
+	gprof_call_graph_view_create_columns (self);
+	
+	functions_list_view = glade_xml_get_widget (self->priv->gxml,
+												"functions_list_view");
+	called_list_view = glade_xml_get_widget (self->priv->gxml,
+											 "called_list_view");
+	called_by_list_view = glade_xml_get_widget (self->priv->gxml,
+												"called_by_list_view");
+	
+	/* Function selection */
+	functions_list_selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (functions_list_view));
+	gtk_tree_selection_set_select_function (functions_list_selection, 
+											on_function_selected, 
+											(gpointer) self, NULL);	
+											
+	/* Jump to button callbacks */
+	called_jump_to_button = glade_xml_get_widget (self->priv->gxml, 
+												  "called_jump_to_button");
+	called_by_jump_to_button = glade_xml_get_widget (self->priv->gxml, 
+												  	 "called_by_jump_to_button");
+													 
+	g_signal_connect (functions_list_view, "row-activated", 
+					  G_CALLBACK (on_functions_list_view_row_activated), 
+					  (gpointer) self);
+	g_signal_connect (called_list_view, "row-activated", 
+					  G_CALLBACK (on_called_list_view_row_activated), 
+					  (gpointer) self);
+	g_signal_connect (called_by_list_view, "row-activated", 
+					  G_CALLBACK (on_called_list_view_row_activated), 
+					  (gpointer) self);
+}
+
+static void
+gprof_call_graph_view_finalize (GObject *obj)
+{
+	GProfCallGraphView *self;
+	
+	self = (GProfCallGraphView *) obj;
+	
+	g_object_unref (self->priv->gxml);
+	
+	if (self->priv->functions_iter_table)
+		g_hash_table_destroy (self->priv->functions_iter_table);
+	
+	g_free (self->priv);
+}
+
+static void 
+gprof_call_graph_view_class_init (GProfCallGraphViewClass *klass)
+{
+	GObjectClass *object_class;
+	GProfViewClass *view_class;
+	
+	object_class = (GObjectClass *) klass;
+	view_class = GPROF_VIEW_CLASS (klass);
+	
+	object_class->finalize = gprof_call_graph_view_finalize;
+	view_class->refresh = gprof_call_graph_view_refresh;
+	view_class->get_widget = gprof_call_graph_view_get_widget;
+}
+
+GType
+gprof_call_graph_view_get_type (void)
+{
+	static GType obj_type = 0;
+	
+	if (!obj_type)
+	{
+		static const GTypeInfo obj_info = 
+		{
+			sizeof (GProfCallGraphViewClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) gprof_call_graph_view_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,           /* class_data */
+			sizeof (GProfCallGraphView),
+			0,              /* n_preallocs */
+			(GInstanceInitFunc) gprof_call_graph_view_init,
+			NULL            /* value_table */
+		};
+		obj_type = g_type_register_static (GPROF_VIEW_TYPE,
+		                                   "GProfCallGraphView", &obj_info, 0);
+	}
+	return obj_type;
+}
+
+GProfCallGraphView *
+gprof_call_graph_view_new (GProfProfileData *profile_data,
+						   IAnjutaSymbolManager *symbol_manager,
+						   IAnjutaDocumentManager *document_manager)
+{
+	GProfCallGraphView *view;
+	
+	view = g_object_new (GPROF_CALL_GRAPH_VIEW_TYPE, NULL);
+	gprof_view_set_data (GPROF_VIEW (view), profile_data);
+	gprof_view_set_symbol_manager (GPROF_VIEW (view), symbol_manager);
+	gprof_view_set_document_manager (GPROF_VIEW (view), document_manager);
+	
+	return view;
+}
+
+void
+gprof_call_graph_view_refresh (GProfView *view)
+{
+	GProfCallGraphView *self;
+	GtkWidget *functions_list_view;
+	GtkWidget *called_list_view;
+	GtkWidget *called_by_list_view;
+	GProfProfileData *data;
+	GProfCallGraph *call_graph;
+	GProfCallGraphBlock *current_block;
+	GProfCallGraphBlockEntry *primary_entry;
+	GList *block_iter;
+	GtkTreeIter list_iter;
+	
+	self = GPROF_CALL_GRAPH_VIEW (view);
+	data = gprof_view_get_data (view);
+	call_graph = gprof_profile_data_get_call_graph (data);
+	
+	functions_list_view = glade_xml_get_widget (self->priv->gxml, 
+												"functions_list_view");
+	called_list_view = glade_xml_get_widget (self->priv->gxml,
+											 "called_list_view");
+	called_by_list_view = glade_xml_get_widget (self->priv->gxml,
+												"called_by_list_view");
+	
+	/* Clear all lists and repopulate the functions list. The two others won't
+	 * be repopulated until a user selects a function from the Functions list */
+	g_object_ref (self->priv->functions_list_store);
+	g_object_ref (self->priv->called_list_store);
+	g_object_ref (self->priv->called_by_list_store);
+	
+	gtk_tree_view_set_model (GTK_TREE_VIEW (functions_list_view), NULL);
+	gtk_tree_view_set_model (GTK_TREE_VIEW (called_list_view), NULL);
+	gtk_tree_view_set_model (GTK_TREE_VIEW (called_by_list_view), NULL);
+	gtk_list_store_clear (self->priv->functions_list_store);
+	gtk_list_store_clear (self->priv->called_list_store);
+	gtk_list_store_clear (self->priv->called_by_list_store);
+	
+	gtk_tree_view_set_model (GTK_TREE_VIEW (called_list_view),
+							 GTK_TREE_MODEL (self->priv->called_list_store));
+	gtk_tree_view_set_model (GTK_TREE_VIEW (called_by_list_view),
+							 GTK_TREE_MODEL (self->priv->called_by_list_store));
+									   
+	g_object_unref (self->priv->called_list_store);
+	g_object_unref (self->priv->called_by_list_store);
+	
+	current_block = gprof_call_graph_get_first_block (call_graph, &block_iter);
+	
+	/* Rebuild the Functions iter table. This table maps function names to 
+	 * GtkTreeIters in the functions list to be used by the Jump to buttons
+	 * next to the Called and Called by lists. When a user selects a function
+	 * in either of these lists, that function should be selected in the
+	 * functions list. */
+	if (self->priv->functions_iter_table)
+		g_hash_table_destroy (self->priv->functions_iter_table);
+	
+	self->priv->functions_iter_table = g_hash_table_new_full (g_str_hash,
+															  g_str_equal, NULL,
+															  g_free);
+	
+	while (current_block)
+	{
+		primary_entry = gprof_call_graph_block_get_primary_entry (current_block);
+		
+		gtk_list_store_append (self->priv->functions_list_store, &list_iter);
+		gtk_list_store_set (self->priv->functions_list_store, &list_iter,
+							FUNCTIONS_COL_NAME,
+							gprof_call_graph_block_entry_get_name (primary_entry),
+							FUNCTIONS_COL_TIME,
+							gprof_call_graph_block_entry_get_time_perc (primary_entry),
+							FUNCTIONS_COL_SELF,
+							gprof_call_graph_block_entry_get_self_sec (primary_entry),
+							FUNCTIONS_COL_CHILDREN,
+							gprof_call_graph_block_entry_get_child_sec (primary_entry),
+							FUNCTIONS_COL_CALLS,
+							gprof_call_graph_block_entry_get_calls (primary_entry),
+							-1);
+		
+		if (gprof_call_graph_block_is_recursive (current_block))
+		{
+			gtk_list_store_set (self->priv->functions_list_store, &list_iter,
+								FUNCTIONS_COL_RECURSIVE, 
+								GTK_STOCK_REFRESH, -1);
+		}
+		
+		/* Add the current iter to the Functions iter lookup table */
+		g_hash_table_insert (self->priv->functions_iter_table,
+							 gprof_call_graph_block_entry_get_name (primary_entry),
+							 g_memdup (&list_iter, sizeof (GtkTreeIter)));
+		
+		current_block = gprof_call_graph_block_get_next (block_iter, 
+														 &block_iter);
+	}
+
+	gtk_tree_view_set_model (GTK_TREE_VIEW (functions_list_view), 
+							 GTK_TREE_MODEL (self->priv->functions_list_store));
+	
+	g_object_unref (self->priv->functions_list_store);
+
+	/* Set search column on Functions list */
+	gtk_tree_view_set_search_column (GTK_TREE_VIEW (functions_list_view),
+									 FUNCTIONS_COL_NAME);	
+}
+
+GtkWidget *
+gprof_call_graph_view_get_widget (GProfView *view)
+{
+	GProfCallGraphView *self;
+	
+	self = GPROF_CALL_GRAPH_VIEW (view);
+	
+	return glade_xml_get_widget (self->priv->gxml, "call_graph_vbox");
+}

Added: trunk/plugins/profiler/gprof-call-graph-view.h
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-call-graph-view.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,66 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-call-graph-view.h
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-call-graph-view.h 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _GPROF_CALL_GRAPH_VIEW_H
+#define _GPROF_CALL_GRAPH_VIEW_H
+
+#include <config.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include "gprof-view.h"
+
+G_BEGIN_DECLS
+
+typedef struct _GProfCallGraphView         GProfCallGraphView;
+typedef struct _GProfCallGraphViewClass    GProfCallGraphViewClass;
+typedef struct _GProfCallGraphViewPriv     GProfCallGraphViewPriv;
+
+#define GPROF_CALL_GRAPH_VIEW_TYPE            (gprof_call_graph_view_get_type ())
+#define GPROF_CALL_GRAPH_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GPROF_CALL_GRAPH_VIEW_TYPE, GProfCallGraphView))
+#define GPROF_CALL_GRAPH_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GPROF_CALL_GRAPH_VIEW_TYPE, GProfCallGraphViewClass))
+#define IS_GPROF_CALL_GRAPH_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GPROF_CALL_GRAPH_VIEW_TYPE))
+#define IS_GPROF_CALL_GRAPH_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GPROF_CALL_GRAPH_VIEW_TYPE))
+
+struct  _GProfCallGraphView
+{
+	GProfView parent;
+	GProfCallGraphViewPriv *priv;
+};
+
+struct _GProfCallGraphViewClass
+{
+	GProfViewClass parent_class;
+};
+
+GType gprof_call_graph_view_get_type (void);
+
+GProfCallGraphView *gprof_call_graph_view_new (GProfProfileData *profile_data,
+											   IAnjutaSymbolManager *symbol_manager,
+											   IAnjutaDocumentManager *document_manager);
+
+void gprof_call_graph_view_refresh (GProfView *view);
+GtkWidget *gprof_call_graph_view_get_widget (GProfView *view);
+
+#endif

Added: trunk/plugins/profiler/gprof-call-graph.c
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-call-graph.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,426 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-call-graph.c
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-call-graph.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include "gprof-call-graph.h"
+
+#define BLOCK_SEPARATOR "-----------------------------------------------"
+
+struct _GProfCallGraphPriv
+{
+	GList *blocks;  			 /* Straight list of all call graph blocks */
+	GList *root;   				 /* List of strings that refer to 
+							 	  * "root functions," or functions without 
+								  * parents. */
+	GHashTable *lookup_table;    /* Find function blocks by name */
+};
+
+static void
+gprof_call_graph_init (GProfCallGraph *self)
+{
+	self->priv = g_new0 (GProfCallGraphPriv, 1);
+	
+	self->priv->lookup_table = g_hash_table_new (g_str_hash, g_str_equal);
+}
+
+static void 
+gprof_call_graph_finalize (GObject *obj)
+{
+	GProfCallGraph *self;
+	GList *current;
+	
+	self = (GProfCallGraph *) obj;
+	
+	g_hash_table_destroy (self->priv->lookup_table);
+	
+	current = self->priv->blocks;
+	
+	while (current)
+	{
+		gprof_call_graph_block_free (GPROF_CALL_GRAPH_BLOCK (current->data));
+		current = g_list_next (current);
+	}
+	
+	g_list_free (self->priv->blocks);
+	g_list_free (self->priv->root);
+	
+	g_free (self->priv);
+}
+
+static void 
+gprof_call_graph_class_init (GProfCallGraphClass *klass)
+{
+	GObjectClass *object_class;
+	
+	object_class = (GObjectClass *) klass;
+	
+	object_class->finalize = gprof_call_graph_finalize;
+}
+
+static gchar **
+get_primary_line_fields(gchar *buffer)
+{
+	gchar **string_table;
+	gchar *line;  /* line data without leading index number */
+	gchar *calls_field;  /* Pointer to string that begins at the calls field */
+	gint i;
+	gint pos; /* Where are we in the buffer? */
+	
+	string_table = g_new0 (gchar *, 6);  /* NULL terminated */
+	
+	/* Skip over index number */
+	line = strchr (buffer, ']') + 1;
+	
+	/* Read the first 3 fields */
+	pos = 0;
+	
+	for (i = 0; i < 3; i++)
+		string_table[i] = read_to_whitespace (&line[pos], &pos, pos);
+	
+	/* In some cases, uncalled functions will have empty calls field */
+	calls_field = strip_whitespace (&line[pos]);
+	
+	/* If the field begins with a number, we have the field. Otherwise, 
+	 * calls_field points to the function name. */
+	
+	/* In some cases, index numbers at the end of lines will be in parenthesis
+	 * instead of square brackets. */
+	
+	if (g_ascii_isdigit(calls_field[0]))
+	{
+		string_table[3] = read_to_whitespace (&line[pos], &pos, pos);
+		string_table[4] = read_to_delimiter (&line[pos], " [");
+		
+		if (!string_table[4])
+			string_table[4] = read_to_delimiter (&line[pos], " (");
+	}
+	else
+	{
+		string_table[3] = g_strdup ("0");
+		string_table[4] = read_to_delimiter (calls_field, " [");
+		
+		if (!string_table[4])
+			string_table[4] = read_to_delimiter (calls_field, " (");
+	}
+	
+	g_free (calls_field);
+	
+	return string_table;
+}
+
+static gchar **
+get_secondary_line_fields(gchar *buffer)
+{
+	gchar **string_table;
+	gchar *line; /* Pointer to the beginning of the current field */
+	gint num_fields;  /* Number of fields read from line */
+	gint pos;
+	gint i;
+	
+	/* Secondary lines can have a maximum of 4 fields. In some cases (as in 
+	 * recursive functions) lines may have only 2. Continue to read 
+	 * fields until we encounter one that doesn't begin with a digit. This 
+	 * tells us that we've reached the last field in the line. */
+	
+	string_table = g_new0 (gchar *, 5); /* NULL terminated */
+	
+	num_fields = 0;
+	pos = 0;
+	line = strip_whitespace (buffer);
+	
+	while (g_ascii_isdigit(line[0]))
+	{
+		string_table[num_fields] = read_to_whitespace (&buffer[pos], &pos, pos);
+		g_free (line); 
+		line = strip_whitespace (&buffer[pos]);
+		num_fields++;	
+	}
+
+	g_free (line);
+	
+	/* If we only read one field, it refers to the calls field. If we didn't 
+     * read any fields here, this tells us that the primary line that this
+     * line belongs to refers to an uncalled function	*/
+	
+	if (num_fields == 1)
+	{
+		string_table[2] = string_table[0];
+		
+		for (i = 0; i < 2; i++)
+			string_table[i] = g_strdup ("0");
+	}
+	else if (num_fields == 0)
+	{
+		g_free (string_table);
+		return NULL;
+	}
+	
+	/* In some cases, index numbers at the end of lines will be in parenthesis
+	 * instead of square brackets. */
+	string_table[3] = read_to_delimiter (&buffer[pos], " [");
+	
+	if (!string_table[3])
+		string_table[3] = read_to_delimiter (&buffer[pos], " (");
+		
+	return string_table;
+}
+
+static void 
+gprof_call_graph_add_block (GProfCallGraph *self, GProfCallGraphBlock *block)
+{
+	GProfCallGraphBlockEntry *entry;
+	gchar *name;
+	
+	entry = gprof_call_graph_block_get_primary_entry (block);
+	name = gprof_call_graph_block_entry_get_name (entry);
+	
+	self->priv->blocks = g_list_append (self->priv->blocks, block);
+	g_hash_table_insert (self->priv->lookup_table, name, block);
+	
+	if (!gprof_call_graph_block_has_parents (block))
+		self->priv->root = g_list_append (self->priv->root, block);
+}
+
+GType
+gprof_call_graph_get_type (void)
+{
+	static GType obj_type = 0;
+	
+	if (!obj_type)
+	{
+		static const GTypeInfo obj_info = 
+		{
+			sizeof (GProfCallGraphClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) gprof_call_graph_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,           /* class_data */
+			sizeof (GProfCallGraph),
+			0,              /* n_preallocs */
+			(GInstanceInitFunc) gprof_call_graph_init,
+			NULL            /* value_table */
+		};
+		obj_type = g_type_register_static (G_TYPE_OBJECT,
+		                                   "GProfCallGraph", &obj_info, 
+											0);
+	}
+	return obj_type;
+}
+
+GProfCallGraph *
+gprof_call_graph_new (FILE *stream, GProfFlatProfile *flat_profile)
+{
+	gchar buffer[PATH_MAX];
+	gchar **fields;
+	size_t length;
+	GProfCallGraphBlock *block;
+	GProfCallGraphBlockEntry *entry;
+	gchar *entry_name;
+	GProfCallGraph *call_graph;
+	gboolean found_primary = FALSE;  
+	
+	call_graph = g_object_new (GPROF_CALL_GRAPH_TYPE, NULL);
+	
+	/* Find the beginning of the call graph. The call graph begins with
+     * "index" */
+	do 
+	{
+		/* Don't loop infinitely if we don't have any data */
+		if (!fgets (buffer, PATH_MAX, stream))
+			return call_graph;
+			
+	} while (strncmp ("index", buffer, 5) != 0);
+	
+	block = NULL; 
+	
+	while (fgets (buffer, PATH_MAX, stream))
+	{
+		/* If the first character of the line is 12, that's the end of the call
+		 * graph. */
+		if (buffer[0] == 12)
+			break;
+		
+		if (!block)
+		{
+			block = gprof_call_graph_block_new ();
+			found_primary = FALSE;
+		}
+		
+		/* Remove the newline from the buffer */
+		length = strlen (buffer);
+		buffer[length - 1] = 0;
+		
+		/* If we encounter the block separator, add the block to the graph */
+		if (strcmp (BLOCK_SEPARATOR, buffer) == 0)
+		{	
+			gprof_call_graph_add_block (call_graph, block);
+			block = NULL;
+		}
+		else
+		{
+			/* If the buffer begins with an index number, treat it as a primary
+			 * line */
+			if (buffer[0] == '[')
+			{
+				found_primary = TRUE;
+				
+				fields = get_primary_line_fields (buffer);
+				entry = gprof_call_graph_block_primary_entry_new (fields);
+
+				g_strfreev (fields);
+				
+				gprof_call_graph_block_add_primary_entry (block, entry);
+			}
+			else
+			{
+				fields = get_secondary_line_fields (buffer);
+				
+				/* If we don't get any fields, that means this is a 
+				 * placeholder line.*/
+				if (!fields)
+					continue;
+				
+				entry = gprof_call_graph_block_secondary_entry_new (fields);
+				entry_name = gprof_call_graph_block_entry_get_name (entry);
+				
+				g_strfreev (fields);
+				
+				if (gprof_flat_profile_find_entry(flat_profile, entry_name))
+				{
+					if (found_primary)
+						gprof_call_graph_block_add_child_entry (block, entry);
+					else
+						gprof_call_graph_block_add_parent_entry (block, entry);
+				}
+				else
+					gprof_call_graph_block_entry_free (entry);
+			}
+		}
+	}
+	
+	return call_graph;
+}
+
+void 
+gprof_call_graph_free (GProfCallGraph *self)
+{
+	g_object_unref (self);
+}
+
+GProfCallGraphBlock *
+gprof_call_graph_find_block (GProfCallGraph *self, gchar *name)
+{
+	return GPROF_CALL_GRAPH_BLOCK (g_hash_table_lookup (self->priv->lookup_table, 
+														name));
+}
+
+GProfCallGraphBlock *
+gprof_call_graph_get_first_block (GProfCallGraph *self, GList **iter)
+{
+	*iter = self->priv->blocks;
+	
+	if (*iter)
+		return GPROF_CALL_GRAPH_BLOCK ((*iter)->data);
+	else
+		return NULL;
+}
+
+GProfCallGraphBlock *
+gprof_call_graph_get_root (GProfCallGraph *self, GList **iter)
+{
+	*iter = self->priv->root;
+	
+	if (*iter)
+		return GPROF_CALL_GRAPH_BLOCK ((*iter)->data);
+	else
+		return NULL;
+}
+
+void
+gprof_call_graph_dump (GProfCallGraph *self, FILE *stream)
+{
+	GProfCallGraphBlockEntry *function;
+	GProfCallGraphBlockEntry *current_parent;
+	GProfCallGraphBlockEntry *current_child;
+	GList *current_block;
+	GList *current_child_iter;
+	GList *current_parent_iter;
+	
+	current_block = self->priv->blocks;
+	
+	while (current_block)
+	{
+		function = gprof_call_graph_block_get_primary_entry (current_block->data);
+		
+		fprintf (stream, "Function: %s\n", 
+				 gprof_call_graph_block_entry_get_name (function));
+		fprintf (stream, "Time: %0.2f\n", 
+				 gprof_call_graph_block_entry_get_time_perc (function));
+		fprintf (stream, "Self sec: %0.2f\n", 
+				 gprof_call_graph_block_entry_get_self_sec (function));
+		fprintf (stream, "Child sec: %0.2f\n", 
+				 gprof_call_graph_block_entry_get_child_sec (function));
+		fprintf (stream, "Calls: %s\n", 
+				 gprof_call_graph_block_entry_get_calls (function));
+		fprintf (stream, "Recursive: %s\n\n", 
+				 gprof_call_graph_block_is_recursive (current_block->data) ? "Yes" : "No");
+		
+		fprintf (stream, "Called: \n");
+		
+		current_child = gprof_call_graph_block_get_first_child (current_block->data, 
+														  		&current_child_iter);
+		
+		while (current_child)
+		{	
+			fprintf (stream, "%s %0.2f, %0.2f, %0.2f, %s\n", 
+					 gprof_call_graph_block_entry_get_name (current_child), 
+				     gprof_call_graph_block_entry_get_time_perc (current_child), 
+					 gprof_call_graph_block_entry_get_self_sec (current_child), 
+				     gprof_call_graph_block_entry_get_child_sec (current_child), 
+					 gprof_call_graph_block_entry_get_calls (current_child));
+			
+			current_child = gprof_call_graph_block_entry_get_next (current_child_iter, 
+																   &current_child_iter);
+		}
+		fprintf (stream, "\n");
+		
+		fprintf (stream, "Called by: \n");
+		
+		current_parent = gprof_call_graph_block_get_first_parent (current_block->data, 
+																  &current_parent_iter);
+		while (current_parent)
+		{	
+			fprintf (stream, "%s %0.2f, %0.2f, %0.2f, %s\n", 
+					 gprof_call_graph_block_entry_get_name (current_parent), 
+				     gprof_call_graph_block_entry_get_time_perc (current_parent), 
+					 gprof_call_graph_block_entry_get_self_sec (current_parent), 
+				     gprof_call_graph_block_entry_get_child_sec (current_parent), 
+					 gprof_call_graph_block_entry_get_calls (current_parent));
+			
+			current_parent = gprof_call_graph_block_entry_get_next (current_parent_iter, 
+																	&current_parent_iter);
+		}		
+		fprintf (stream, "\n---\n\n");
+		current_block = g_list_next (current_block);
+	}
+}

Added: trunk/plugins/profiler/gprof-call-graph.h
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-call-graph.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,74 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-call-graph.h
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-call-graph.h 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _GPROF_CALL_GRAPH_H
+#define _GPROF_CALL_GRAPH_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include "gprof-call-graph-block-entry.h"
+#include "gprof-call-graph-block.h"
+#include "gprof-flat-profile.h"
+#include "string-utils.h"
+
+G_BEGIN_DECLS
+
+typedef struct _GProfCallGraph         GProfCallGraph;
+typedef struct _GProfCallGraphClass    GProfCallGraphClass;
+typedef struct _GProfCallGraphPriv     GProfCallGraphPriv;
+
+#define GPROF_CALL_GRAPH_TYPE            (gprof_call_graph_get_type ())
+#define GPROF_CALL_GRAPH(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GPROF_CALL_GRAPH_TYPE, GProfCallGraph))
+#define GPROF_CALL_GRAPH_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GPROF_CALL_GRAPH_TYPE, GProfCallGraphClass))
+#define IS_GPROF_CALL_GRAPH(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GPROF_CALL_GRAPH_TYPE))
+#define IS_GPROF_CALL_GRAPH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GPROF_CALL_GRAPH_TYPE))
+
+struct  _GProfCallGraph
+{
+	GObject parent;
+	GProfCallGraphPriv *priv;
+};
+
+struct _GProfCallGraphClass
+{
+	GObjectClass parent_class;
+};
+
+GType gprof_call_graph_get_type (void);
+
+GProfCallGraph *gprof_call_graph_new (FILE *stream, 
+									  GProfFlatProfile *flat_profile);
+void gprof_call_graph_free (GProfCallGraph *self);
+
+GProfCallGraphBlock *gprof_call_graph_find_block (GProfCallGraph *self, 
+												  gchar *name);
+GProfCallGraphBlock *gprof_call_graph_get_first_block (GProfCallGraph *self,
+													   GList **iter);
+GProfCallGraphBlock *gprof_call_graph_get_root (GProfCallGraph *self, 
+												GList **iter);
+
+void gprof_call_graph_dump (GProfCallGraph *self, FILE *stream);
+
+G_END_DECLS
+
+#endif

Added: trunk/plugins/profiler/gprof-flat-profile-entry.c
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-flat-profile-entry.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,166 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-flat-profile-entry.c
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-flat-profile-entry.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include "gprof-flat-profile-entry.h"
+
+struct _GProfFlatProfileEntryPriv
+{
+	gfloat time_perc;  /* Percent of total execution */
+	gfloat cum_sec;    /* Cumulative seconds spent on function and children */
+	gfloat self_sec;   /* Time spent on this function only */
+	guint calls;  /* Number of times called */
+	gfloat avg_ms;     /* Average number of milliseconds spent by this call */
+	gfloat total_ms;   /* Spent by function and children */
+	gchar *name; /* Function name */
+};
+
+static void
+gprof_flat_profile_entry_init (GProfFlatProfileEntry *self)
+{
+	self->priv = g_new0 (GProfFlatProfileEntryPriv, 1);
+}
+
+static void
+gprof_flat_profile_entry_finalize (GObject *obj)
+{
+	GProfFlatProfileEntry *self;
+	
+	self = (GProfFlatProfileEntry *) obj;
+	
+	g_free (self->priv->name);
+	g_free (self->priv);
+}
+
+static void 
+gprof_flat_profile_entry_class_init (GProfFlatProfileEntryClass *klass)
+{
+	GObjectClass *object_class;
+	
+	object_class = (GObjectClass *) klass;
+	
+	object_class->finalize = gprof_flat_profile_entry_finalize;
+}
+
+GType
+gprof_flat_profile_entry_get_type (void)
+{
+	static GType obj_type = 0;
+	
+	if (!obj_type)
+	{
+		static const GTypeInfo obj_info = 
+		{
+			sizeof (GProfFlatProfileEntryClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) gprof_flat_profile_entry_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,           /* class_data */
+			sizeof (GProfFlatProfileEntry),
+			0,              /* n_preallocs */
+			(GInstanceInitFunc) gprof_flat_profile_entry_init,
+			NULL            /* value_table */
+		};
+		obj_type = g_type_register_static (G_TYPE_OBJECT,
+		                                   "GProfFlatProfileEntry", &obj_info, 
+											0);
+	}
+	return obj_type;
+}
+
+GProfFlatProfileEntry *
+gprof_flat_profile_entry_new (gchar **fields)
+{
+	GProfFlatProfileEntry *entry;
+	
+	entry = g_object_new (GPROF_FLAT_PROFILE_ENTRY_TYPE, NULL);
+	
+	entry->priv->time_perc = g_ascii_strtod (fields[0], NULL);
+	entry->priv->cum_sec = g_ascii_strtod (fields[1], NULL);
+	entry->priv->self_sec = g_ascii_strtod (fields[2], NULL);
+	entry->priv->calls = (unsigned) atoi (fields[3]);
+	entry->priv->avg_ms = g_ascii_strtod (fields[4], NULL);
+	entry->priv->total_ms = g_ascii_strtod (fields[5], NULL);
+	entry->priv->name = g_strdup (fields[6]);
+
+	return entry;	
+}
+
+void 
+gprof_flat_profile_entry_free (GProfFlatProfileEntry *self)
+{
+	g_object_unref (self);
+}
+
+gfloat
+gprof_flat_profile_entry_get_time_perc (GProfFlatProfileEntry *self)
+{
+	return self->priv->time_perc;
+}
+
+gfloat
+gprof_flat_profile_entry_get_cum_sec (GProfFlatProfileEntry *self)
+{
+	return self->priv->cum_sec;
+}
+
+gfloat
+gprof_flat_profile_entry_get_self_sec (GProfFlatProfileEntry *self)
+{
+	return self->priv->self_sec;
+}
+
+guint
+gprof_flat_profile_entry_get_calls (GProfFlatProfileEntry *self)
+{
+	return self->priv->calls;
+}
+
+gfloat
+gprof_flat_profile_entry_get_avg_ms (GProfFlatProfileEntry *self)
+{
+	return self->priv->avg_ms;
+}
+
+gfloat
+gprof_flat_profile_entry_get_total_ms (GProfFlatProfileEntry *self)
+{
+	return self->priv->total_ms;
+}
+
+gchar *
+gprof_flat_profile_entry_get_name (GProfFlatProfileEntry *self)
+{
+	return self->priv->name;
+}
+
+GProfFlatProfileEntry *
+gprof_flat_profile_entry_get_next (GList *current_iter, GList **next_iter)
+{
+	*next_iter = g_list_next (current_iter);
+	
+	if (*next_iter)
+		return GPROF_FLAT_PROFILE_ENTRY ((*next_iter)->data);
+	else 
+		return NULL;
+}

Added: trunk/plugins/profiler/gprof-flat-profile-entry.h
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-flat-profile-entry.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,72 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-flat-profile-entry.h
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-flat-profile-entry.h 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _GPROF_FLAT_PROFILE_ENTRY
+#define _GPROF_FLAT_PROFILE_ENTRY
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+
+G_BEGIN_DECLS
+
+typedef struct _GProfFlatProfileEntry         GProfFlatProfileEntry;
+typedef struct _GProfFlatProfileEntryClass    GProfFlatProfileEntryClass;
+typedef struct _GProfFlatProfileEntryPriv     GProfFlatProfileEntryPriv;
+
+#define GPROF_FLAT_PROFILE_ENTRY_TYPE            (gprof_flat_profile_entry_get_type ())
+#define GPROF_FLAT_PROFILE_ENTRY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GPROF_FLAT_PROFILE_ENTRY_TYPE, GProfFlatProfileEntry))
+#define GPROF_FLAT_PROFILE_ENTRY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GPROF_FLAT_PROFILE_ENTRY_TYPE, GProfFlatProfileEntryClass))
+#define IS_GPROF_FLAT_PROFILE_ENTRY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GPROF_FLAT_PROFILE_ENTRY_TYPE))
+#define IS_GPROF_FLAT_PROFILE_CLASS_ENTRY(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GPROF_FLAT_PROFILE_ENTRY_TYPE))
+
+struct  _GProfFlatProfileEntry
+{
+	GObject parent;
+	GProfFlatProfileEntryPriv *priv;
+};
+
+struct _GProfFlatProfileEntryClass
+{
+	GObjectClass parent_class;
+};
+
+GType gprof_flat_profile_entry_get_type (void);
+
+GProfFlatProfileEntry *gprof_flat_profile_entry_new (gchar **fields);
+void gprof_flat_profile_entry_free (GProfFlatProfileEntry *self);
+
+gfloat gprof_flat_profile_entry_get_time_perc (GProfFlatProfileEntry *self);
+gfloat gprof_flat_profile_entry_get_cum_sec (GProfFlatProfileEntry *self);
+gfloat gprof_flat_profile_entry_get_self_sec (GProfFlatProfileEntry *self);
+guint gprof_flat_profile_entry_get_calls (GProfFlatProfileEntry *self);
+gfloat gprof_flat_profile_entry_get_avg_ms (GProfFlatProfileEntry *self);
+gfloat gprof_flat_profile_entry_get_total_ms (GProfFlatProfileEntry *self);
+gchar *gprof_flat_profile_entry_get_name (GProfFlatProfileEntry *self);
+
+GProfFlatProfileEntry *gprof_flat_profile_entry_get_next (GList *current_iter,
+														  GList **next_iter);
+
+G_END_DECLS
+
+#endif

Added: trunk/plugins/profiler/gprof-flat-profile-view.c
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-flat-profile-view.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,340 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-flat-profile-view.c
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-flat-profile-view.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include "gprof-flat-profile-view.h"
+#include <glib/gi18n-lib.h>
+
+struct _GProfFlatProfileViewPriv
+{
+	GladeXML *gxml;
+	GtkListStore *list_store;
+};
+
+enum
+{
+	COL_NAME = 0,
+	COL_TIME_PERC,
+	COL_CUM_SEC,
+	COL_SELF_SEC,
+	COL_CALLS,
+	COL_AVG_MS,
+	COL_TOTAL_MS,
+	NUM_COLS
+};
+
+static void
+gprof_flat_profile_view_create_columns (GProfFlatProfileView *self)
+{
+	GtkTreeViewColumn *col;
+	GtkCellRenderer *renderer;
+	GtkWidget *list_view;
+	
+	list_view = glade_xml_get_widget (self->priv->gxml, "flat_profile_view");
+	
+	/* Function name */
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (col, _("Function Name"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (list_view), col);
+	
+	
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_add_attribute (col, renderer, "text", COL_NAME);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	/* Function time percentage */
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (col, _("% Time"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (list_view), col);
+	
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_set_cell_data_func (col, renderer, 
+											 gprof_view_format_float,
+											 GINT_TO_POINTER (COL_TIME_PERC),
+											 NULL);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);	
+	
+	/* Cumulative seconds */
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (col, _("Cumulative Seconds"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (list_view), col);
+	
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_set_cell_data_func (col, renderer, 
+											 gprof_view_format_float,
+											 GINT_TO_POINTER (COL_CUM_SEC),
+											 NULL);
+	gtk_tree_view_column_set_resizable (col, TRUE);	
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	/* Self seconds */
+	col = gtk_tree_view_column_new ();
+	
+	/* The number of seconds that this function, excluding other functions it 
+	 * calls, takes to execute. */
+	gtk_tree_view_column_set_title (col, _("Self Seconds"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (list_view), col);
+	
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_set_cell_data_func (col, renderer, 
+											 gprof_view_format_float,
+											 GINT_TO_POINTER (COL_SELF_SEC),
+											 NULL);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	/* Calls */
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (col, _("Calls"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (list_view), col);
+	
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_add_attribute (col, renderer, "text", COL_CALLS);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	/* Self ms/call */
+	col = gtk_tree_view_column_new ();
+	
+	/* The average number of milliseconds spent in a function, excluding
+	 * the functions that it calls. */
+	gtk_tree_view_column_set_title (col, _("Self ms/call"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (list_view), col);
+	
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_set_cell_data_func (col, renderer, 
+											 gprof_view_format_float,
+											 GINT_TO_POINTER (COL_AVG_MS),
+											 NULL);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	/* Total ms/call */
+	col = gtk_tree_view_column_new ();
+	
+	/* Same as self ms/call, but includes called functions. */
+	gtk_tree_view_column_set_title (col, _("Total ms/call"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (list_view), col);
+	
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_set_cell_data_func (col, renderer, 
+											 gprof_view_format_float,
+											 GINT_TO_POINTER (COL_TOTAL_MS),
+											 NULL);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	/* Model setup */
+	gtk_tree_view_set_model (GTK_TREE_VIEW (list_view), 
+							 GTK_TREE_MODEL (self->priv->list_store));
+	g_object_unref (self->priv->list_store);
+	
+}
+
+static void 
+on_list_view_row_activated (GtkTreeView *list_view,
+							GtkTreePath *path,
+							GtkTreeViewColumn *col,												 
+							gpointer user_data)
+{
+	GProfView *self;
+	GtkTreeIter list_iter;
+	GtkTreeModel *model;
+	gchar *selected_function_name;
+	
+	self = GPROF_VIEW (user_data);
+	model = gtk_tree_view_get_model (list_view);
+	
+	if (gtk_tree_model_get_iter (model, &list_iter, path))
+	{
+		gtk_tree_model_get (model,
+							&list_iter, COL_NAME, 
+							&selected_function_name, -1);
+		
+		gprof_view_show_symbol_in_editor (self, selected_function_name);
+		
+		g_free (selected_function_name);
+	}	
+}
+
+static void
+gprof_flat_profile_view_init (GProfFlatProfileView *self)
+{
+	GtkWidget *list_view;
+	
+	self->priv = g_new0 (GProfFlatProfileViewPriv, 1);
+	
+	self->priv->gxml = glade_xml_new (PACKAGE_DATA_DIR
+									  "/glade/profiler-flat-profile.glade",  
+									  NULL, NULL);
+	self->priv->list_store = gtk_list_store_new (NUM_COLS, G_TYPE_STRING, 
+												 G_TYPE_FLOAT, G_TYPE_FLOAT,
+												 G_TYPE_FLOAT, G_TYPE_UINT,
+												 G_TYPE_FLOAT, G_TYPE_FLOAT);
+	
+	gprof_flat_profile_view_create_columns (self);
+	
+	list_view = glade_xml_get_widget (self->priv->gxml, "flat_profile_view");
+	
+	g_signal_connect (list_view, "row-activated", 
+					  G_CALLBACK (on_list_view_row_activated), 
+					  (gpointer) self);
+	
+}
+
+static void
+gprof_flat_profile_view_finalize (GObject *obj)
+{
+	GProfFlatProfileView *self;
+	
+	self = (GProfFlatProfileView *) obj;
+	
+	g_object_unref (self->priv->gxml);
+	g_free (self->priv);
+}
+
+static void
+gprof_flat_profile_view_class_init (GProfFlatProfileViewClass *klass)
+{
+	GObjectClass *object_class;
+	GProfViewClass *view_class;
+	
+	object_class = (GObjectClass *) klass;
+	view_class = GPROF_VIEW_CLASS (klass);
+	
+	object_class->finalize = gprof_flat_profile_view_finalize;
+	view_class->refresh = gprof_flat_profile_view_refresh;
+	view_class->get_widget = gprof_flat_profile_view_get_widget;
+}
+
+GType
+gprof_flat_profile_view_get_type (void)
+{
+	static GType obj_type = 0;
+	
+	if (!obj_type)
+	{
+		static const GTypeInfo obj_info = 
+		{
+			sizeof (GProfFlatProfileViewClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) gprof_flat_profile_view_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,           /* class_data */
+			sizeof (GProfFlatProfileView),
+			0,              /* n_preallocs */
+			(GInstanceInitFunc) gprof_flat_profile_view_init,
+			NULL            /* value_table */
+		};
+		obj_type = g_type_register_static (GPROF_VIEW_TYPE,
+		                                   "GProfFlatProfileView", &obj_info, 0);
+	}
+	return obj_type;
+}
+
+GProfFlatProfileView *
+gprof_flat_profile_view_new (GProfProfileData *profile_data,
+							 IAnjutaSymbolManager *symbol_manager,
+							 IAnjutaDocumentManager *document_manager)
+{
+	GProfFlatProfileView *view;
+	
+	view = g_object_new (GPROF_FLAT_PROFILE_VIEW_TYPE, NULL);
+	gprof_view_set_data (GPROF_VIEW (view), profile_data);
+	gprof_view_set_symbol_manager (GPROF_VIEW (view), symbol_manager);
+	gprof_view_set_document_manager (GPROF_VIEW (view), document_manager);
+	
+	return view;
+}
+
+void 
+gprof_flat_profile_view_refresh (GProfView *view)
+{
+	GProfFlatProfileView *self;
+	GProfProfileData *data;
+	GProfFlatProfile *flat_profile;
+	GProfFlatProfileEntry *current_entry;
+	GList *entry_iter;
+	GtkWidget *list_view;
+	GtkTreeIter view_iter;
+	
+	self = GPROF_FLAT_PROFILE_VIEW (view);
+	list_view = glade_xml_get_widget (self->priv->gxml, "flat_profile_view");
+	
+	g_object_ref (self->priv->list_store);
+	gtk_tree_view_set_model (GTK_TREE_VIEW (list_view), NULL);
+	gtk_list_store_clear (self->priv->list_store);
+	
+	data = gprof_view_get_data (view);
+	flat_profile = gprof_profile_data_get_flat_profile (data);
+	current_entry = gprof_flat_profile_get_first_entry (flat_profile, 
+														&entry_iter);
+	
+	while (current_entry)
+	{	
+		gtk_list_store_append (self->priv->list_store, &view_iter);
+		gtk_list_store_set (self->priv->list_store, &view_iter,
+							COL_NAME, 
+							gprof_flat_profile_entry_get_name (current_entry),
+							COL_TIME_PERC,
+							gprof_flat_profile_entry_get_time_perc (current_entry),
+							COL_CUM_SEC,
+							gprof_flat_profile_entry_get_cum_sec (current_entry),
+							COL_SELF_SEC,
+							gprof_flat_profile_entry_get_self_sec (current_entry),
+							COL_CALLS,
+							gprof_flat_profile_entry_get_calls (current_entry),
+							COL_AVG_MS,
+							gprof_flat_profile_entry_get_avg_ms (current_entry),
+							COL_TOTAL_MS,
+							gprof_flat_profile_entry_get_total_ms (current_entry),
+							-1);
+		
+		current_entry = gprof_flat_profile_entry_get_next (entry_iter, 
+														   &entry_iter);
+	}
+	
+	gtk_tree_view_set_model (GTK_TREE_VIEW (list_view), 
+							 GTK_TREE_MODEL (self->priv->list_store));
+	g_object_unref (self->priv->list_store);
+	
+}
+
+GtkWidget *
+gprof_flat_profile_view_get_widget (GProfView *view)
+{
+	GProfFlatProfileView *self;
+	
+	self = GPROF_FLAT_PROFILE_VIEW (view);
+	
+	return glade_xml_get_widget (self->priv->gxml, "flat_profile_scrolled");
+}

Added: trunk/plugins/profiler/gprof-flat-profile-view.h
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-flat-profile-view.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,66 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-flat-profile-view.h
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-flat-profile-view.h 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _GPROF_FLAT_PROFILE_VIEW_H
+#define _GPROF_FLAT_PROFILE_VIEW_H
+
+#include <config.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include "gprof-view.h"
+
+G_BEGIN_DECLS
+
+typedef struct _GProfFlatProfileView         GProfFlatProfileView;
+typedef struct _GProfFlatProfileViewClass    GProfFlatProfileViewClass;
+typedef struct _GProfFlatProfileViewPriv     GProfFlatProfileViewPriv;
+
+#define GPROF_FLAT_PROFILE_VIEW_TYPE            (gprof_flat_profile_view_get_type ())
+#define GPROF_FLAT_PROFILE_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GPROF_FLAT_PROFILE_VIEW_TYPE, GProfFlatProfileView))
+#define GPROF_FLAT_PROFILE_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GPROF_FLAT_PROFILE_VIEW_TYPE, GProfFlatProfileViewClass))
+#define IS_GPROF_FLAT_PROFILE_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GPROF_FLAT_PROFILE_VIEW_TYPE))
+#define IS_GPROF_FLAT_PROFILE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GPROF_FLAT_PROFILE_VIEW_TYPE))
+
+struct  _GProfFlatProfileView
+{
+	GProfView parent;
+	GProfFlatProfileViewPriv *priv;
+};
+
+struct _GProfFlatProfileViewClass
+{
+	GProfViewClass parent_class;
+};
+
+GType gprof_flat_profile_view_get_type (void);
+
+GProfFlatProfileView *gprof_flat_profile_view_new (GProfProfileData *profile_data,
+												   IAnjutaSymbolManager *symbol_manager,
+												   IAnjutaDocumentManager *document_manager);
+
+void gprof_flat_profile_view_refresh (GProfView *view);
+GtkWidget *gprof_flat_profile_view_get_widget (GProfView *view);
+
+#endif

Added: trunk/plugins/profiler/gprof-flat-profile.c
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-flat-profile.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,248 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-flat-profile.c
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-flat-profile.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include "gprof-flat-profile.h"
+
+struct _GProfFlatProfilePriv
+{
+	GList *entries;  			/* List of all entries */
+	GHashTable *lookup_table;	/* Find entries by name */
+};
+
+static void
+gprof_flat_profile_init (GProfFlatProfile *self)
+{
+	self->priv = g_new0 (GProfFlatProfilePriv, 1);
+	self->priv->lookup_table = g_hash_table_new (g_str_hash, g_str_equal);
+}
+
+static void 
+gprof_flat_profile_finalize (GObject *obj)
+{
+	GProfFlatProfile *self;
+	GList *current;
+	
+	self = (GProfFlatProfile *) obj;
+	
+	g_hash_table_destroy (self->priv->lookup_table);
+	
+	current = self->priv->entries;
+	
+	while (current)
+	{
+		gprof_flat_profile_entry_free (current->data);
+		current = g_list_next (current);
+	}
+	
+	g_list_free (self->priv->entries);
+	g_free (self->priv);
+}
+
+static void 
+gprof_flat_profile_class_init (GProfFlatProfileClass *klass)
+{
+	GObjectClass *object_class;
+	
+	object_class = (GObjectClass *) klass;
+	object_class->finalize = gprof_flat_profile_finalize;
+}
+
+static gchar **
+get_flat_profile_fields (gchar *buffer)
+{
+	gchar **string_table;
+	gchar *calls_field;  /* Pointer to string that begins at the calls field */
+	gint i;
+	gint pos; /* Where are we in the buffer? */
+	
+	string_table = g_new0 (gchar *, 8);  /* NULL terminated */
+	
+	/* Get the first 3 fields */
+	pos = 0;
+	
+	for (i = 0; i < 3; i++)
+		string_table[i] = read_to_whitespace (&buffer[pos], &pos, pos);
+	
+	/* In some cases, uncalled functions may have empty calls, self ms/call, and
+	 * total ms/call fields. */
+	
+	/* If the next field begins with a digit, we have the fields */
+	calls_field = strip_whitespace (&buffer[pos]);
+	
+	if (g_ascii_isdigit (calls_field[0]))
+	{	
+		for (i = 3; i < 6; i++)
+			string_table[i] = read_to_whitespace (&buffer[pos], &pos, pos);
+		
+		string_table[6] = strip_whitespace (&buffer[pos]);
+	}
+	else /* We don't have the fields; calls_field points to function name */
+	{
+		for (i = 3; i < 6; i++)
+			string_table[i] = g_strdup ("0");
+		
+		string_table[6] = g_strdup (calls_field);
+	}
+	
+	g_free (calls_field);
+	
+	return string_table;
+}
+
+static void
+gprof_flat_profile_add_entry (GProfFlatProfile *self, 
+							  GProfFlatProfileEntry *entry)
+{
+	self->priv->entries = g_list_append (self->priv->entries, entry);
+	g_hash_table_insert (self->priv->lookup_table,
+						 gprof_flat_profile_entry_get_name (entry),
+						 entry);
+}
+
+GType
+gprof_flat_profile_get_type (void)
+{
+	static GType obj_type = 0;
+	
+	if (!obj_type)
+	{
+		static const GTypeInfo obj_info = 
+		{
+			sizeof (GProfFlatProfileClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) gprof_flat_profile_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,           /* class_data */
+			sizeof (GProfFlatProfile),
+			0,              /* n_preallocs */
+			(GInstanceInitFunc) gprof_flat_profile_init,
+			NULL            /* value_table */
+		};
+		obj_type = g_type_register_static (G_TYPE_OBJECT,
+		                                   "GProfFlatProfile", &obj_info, 0);
+	}
+	return obj_type;
+}
+
+GProfFlatProfile *
+gprof_flat_profile_new (FILE *stream)
+{
+	gchar buffer[PATH_MAX];
+	size_t length;
+	gchar **fields;
+	GProfFlatProfile *flat_profile;
+	
+	flat_profile = g_object_new (GPROF_FLAT_PROFILE_TYPE, NULL);
+	
+	/* Read to beginning of flat profile data */
+	do
+	{
+		/* Don't loop infinitely if we don't have any data */
+		if (!fgets (buffer, PATH_MAX, stream))
+			return flat_profile;
+			
+	} while (!strchr (buffer, '%'));
+	
+	/* Skip the second line of the column header */
+	fgets (buffer, PATH_MAX, stream);
+	
+	while (fgets (buffer, PATH_MAX, stream))
+	{
+		/* If the first character is 12, that's the end of the flat profile. */
+		if (buffer[0] == 12)
+			break;
+		
+		/* Remove the newline from the buffer */
+		length = strlen (buffer);
+		buffer[length - 1] = 0;
+		
+		fields = get_flat_profile_fields (buffer);
+		
+		if (fields)
+		{
+			gprof_flat_profile_add_entry (flat_profile, 
+										  gprof_flat_profile_entry_new (fields));
+			
+			g_strfreev (fields);
+		}
+	}
+	
+	return flat_profile;
+}
+
+void
+gprof_flat_profile_free (GProfFlatProfile *self)
+{
+	g_object_unref (self);
+}
+
+GProfFlatProfileEntry *
+gprof_flat_profile_get_first_entry (GProfFlatProfile *self, GList **iter)
+{
+	*iter = self->priv->entries;
+	
+	if (self->priv->entries)
+		return GPROF_FLAT_PROFILE_ENTRY ((*iter)->data);
+	else
+		return NULL;
+}
+
+GProfFlatProfileEntry *
+gprof_flat_profile_find_entry (GProfFlatProfile* self, const gchar *name)
+{
+	return GPROF_FLAT_PROFILE_ENTRY (g_hash_table_lookup (self->priv->lookup_table,
+														  name));
+}
+
+void 
+gprof_flat_profile_dump (GProfFlatProfile *self, FILE *stream)
+{
+	GList *current;
+	GProfFlatProfileEntry *entry;
+	
+	current = self->priv->entries;
+	
+	while (current)
+	{
+		entry = GPROF_FLAT_PROFILE_ENTRY (current->data);
+		
+		fprintf (stream, "Function: %s\n", 
+				 gprof_flat_profile_entry_get_name (entry));
+		fprintf (stream, "Time: %2.2f\n", 
+				 gprof_flat_profile_entry_get_time_perc (entry));
+		fprintf (stream, "Cumulative time: %2.2f\n", 
+				 gprof_flat_profile_entry_get_cum_sec (entry));
+		fprintf (stream, "Current function time: %2.2f\n", 
+				 gprof_flat_profile_entry_get_self_sec (entry));
+		fprintf (stream, "Calls: %i\n", 
+				 gprof_flat_profile_entry_get_calls (entry));
+		fprintf (stream, "Average time: %2.2f\n", 
+				 gprof_flat_profile_entry_get_avg_ms (entry));
+		fprintf (stream, "Total time: %2.2f\n", 
+				 gprof_flat_profile_entry_get_total_ms (entry));
+		fprintf (stream, "\n");
+		
+		current = g_list_next (current);
+	}
+}

Added: trunk/plugins/profiler/gprof-flat-profile.h
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-flat-profile.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,69 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-flat-profile.h
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-flat-profile.h 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _GPROF_FLAT_PROFILE_H
+#define _GPROF_FLAT_PROFILE_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdio.h>
+#include <string.h>
+#include "gprof-flat-profile-entry.h"
+#include "string-utils.h"
+
+G_BEGIN_DECLS
+
+typedef struct _GProfFlatProfile         GProfFlatProfile;
+typedef struct _GProfFlatProfileClass    GProfFlatProfileClass;
+typedef struct _GProfFlatProfilePriv     GProfFlatProfilePriv;
+
+#define GPROF_FLAT_PROFILE_TYPE            (gprof_flat_profile_get_type ())
+#define GPROF_FLAT_PROFILE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GPROF_FLAT_PROFILE_TYPE, GProfFlatProfile))
+#define GPROF_FLAT_PROFILE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GPROF_FLAT_PROFILE_TYPE, GProfFlatProfileClass))
+#define IS_GPROF_FLAT_PROFILE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GPROF_FLAT_PROFILE_TYPE))
+#define IS_GPROF_FLAT_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GPROF_FLAT_PROFILE_TYPE))
+
+struct  _GProfFlatProfile
+{
+	GObject parent;
+	GProfFlatProfilePriv *priv;
+};
+
+struct _GProfFlatProfileClass
+{
+	GObjectClass parent_class;
+};
+
+GType gprof_flat_profile_get_type (void);
+GProfFlatProfile *gprof_flat_profile_new (FILE *stream);
+void gprof_flat_profile_free (GProfFlatProfile *self);
+
+GProfFlatProfileEntry *gprof_flat_profile_get_first_entry (GProfFlatProfile *self,
+														   GList **iter);
+GProfFlatProfileEntry *gprof_flat_profile_find_entry (GProfFlatProfile* self,
+													  const gchar *name);
+void gprof_flat_profile_dump (GProfFlatProfile *self, FILE *stream);
+
+G_END_DECLS
+
+#endif

Added: trunk/plugins/profiler/gprof-function-call-chart-view.c
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-function-call-chart-view.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,638 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-function-call-chart-view.c
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * Portions borrowed from the Class Inheritance Graph
+ * Copyright (C) Massimo Cora' 2005 
+ * 
+ * gprof-function-call-chart-view.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include "gprof-function-call-chart-view.h"
+
+/* Drawing helper macros */
+#define NODE_LOWER_LEFT(node,main_index,rec_index) \
+	((point)((field_t*)ND_shape_info (node))->fld[main_index]->fld[rec_index]->b.LL)
+
+#define NODE_UPPER_RIGHT(node,main_index,rec_index) \
+	((point)((field_t*)ND_shape_info (node))->fld[main_index]->fld[rec_index]->b.UR)
+
+#define NODE_NUM_FIELDS(node) \
+	((field_t*)ND_shape_info (node))->n_flds
+
+#define NODE_NTH_FIELD(node,nth) \
+	((field_t*)ND_shape_info (node))->fld[nth]
+
+#define NODE_NTH_TEXT(node,main_index,rec_index) \
+	((field_t*)ND_shape_info (node))->fld[main_index]->fld[rec_index]->lp->text
+
+#define INCH_TO_PIXELS(inch_size) \
+				inch_size * 72
+				
+struct _GProfFunctionCallChartViewPriv
+{
+	GtkWidget *canvas;
+	GtkWidget *scrolled_window;
+	gdouble canvas_size_x;
+	gdouble canvas_size_y;
+	GList *graphs; 
+	GVC_t *gvc;
+	GList *canvas_items;
+	gint y_offset;
+	
+	/* Used for context drawing */
+	Agnode_t *current_node;
+	GList *current_graph;
+}; 
+
+static void
+gprof_function_call_chart_view_destroy_graph (GProfFunctionCallChartView *self)
+{
+	GList *current_graph;
+	
+	current_graph = self->priv->graphs;
+	
+	while (current_graph)
+	{
+		gvFreeLayout (self->priv->gvc, current_graph->data);
+		agclose (current_graph->data);
+		
+		current_graph = g_list_next (current_graph);
+	}
+	
+	if (self->priv->gvc)
+		gvFreeContext (self->priv->gvc);
+	
+	self->priv->graphs = NULL;
+	self->priv->gvc = NULL;
+}
+
+static void
+gprof_function_call_chart_view_add_function (GProfFunctionCallChartView *self,
+											 Agraph_t *subgraph,
+											 GProfCallGraph *call_graph,
+											 GProfCallGraphBlock *block,
+											 Agnode_t *parent_node)
+{
+	Agnode_t *new_node;
+	GList *entry_iter;
+	GProfCallGraphBlockEntry *current_entry;
+	GProfCallGraphBlockEntry *current_child;
+	GProfCallGraphBlock *next_block;
+	GProfCallGraphBlockEntry *next_block_primary_entry;
+	gchar *current_entry_name;
+	gchar *next_block_name;
+	
+	current_entry = gprof_call_graph_block_get_primary_entry (block);
+	current_entry_name = gprof_call_graph_block_entry_get_name (current_entry);
+	
+	new_node = agnode (subgraph, current_entry_name);
+	
+	/* Make the node box shaped */
+	agsafeset (new_node, "shape", "box", "");
+	
+	/* Add the edge to this node's parent, if it has one */
+	if (parent_node)
+		agedge (subgraph, parent_node, new_node);
+	
+	/* For recursive functions, add an edge that loops back to the node */
+	if (gprof_call_graph_block_is_recursive (block))
+		agedge (subgraph, new_node, new_node);
+	
+	current_child = gprof_call_graph_block_get_first_child (block, &entry_iter);
+	
+	while (current_child)
+	{
+		next_block = gprof_call_graph_find_block (call_graph,
+												  gprof_call_graph_block_entry_get_name (current_child));
+		current_child = gprof_call_graph_block_entry_get_next (entry_iter, 
+															   &entry_iter);
+		
+		if (next_block)
+		{
+			next_block_primary_entry = gprof_call_graph_block_get_primary_entry (next_block);
+			next_block_name = gprof_call_graph_block_entry_get_name (next_block_primary_entry);
+			
+			/* Make sure we don't go into an infinite loop on recursive functions */
+			if (strcmp(next_block_name, current_entry_name) == 0)
+				continue;
+			
+			gprof_function_call_chart_view_add_function (self, subgraph, 
+														 call_graph, 
+														 next_block, new_node);	
+		}
+		
+	}
+}
+
+static void
+gprof_function_call_chart_view_create_graph (GProfFunctionCallChartView *self)
+{
+	GProfProfileData *profile_data;
+	GProfCallGraph *call_graph;
+	GProfCallGraphBlock *current_block;
+	GProfCallGraphBlockEntry *current_entry;
+	gchar *entry_name;
+	GList *root_iter;
+	Agraph_t *subgraph;
+	
+	/* If a previous graph exists, delete it and start over */
+	gprof_function_call_chart_view_destroy_graph (self);
+	
+	self->priv->gvc = gvContext ();
+	
+	profile_data = gprof_view_get_data (GPROF_VIEW (self));
+	call_graph = gprof_profile_data_get_call_graph (profile_data);
+	
+	current_block = gprof_call_graph_get_root (call_graph, &root_iter);
+	
+	/* If the call graph doesn't have any roots, that usually means the user
+	 * is showing only select functions. Recurse from each block so we still
+	 * get a graph */
+	 if (!current_block)
+	 	current_block = gprof_call_graph_get_first_block (call_graph, 
+	 													  &root_iter);
+	
+	while (current_block)
+	{
+		current_entry = gprof_call_graph_block_get_primary_entry (current_block);
+		entry_name = gprof_call_graph_block_entry_get_name (current_entry);
+		subgraph = agopen (entry_name, AGDIGRAPHSTRICT);
+		self->priv->graphs = g_list_append (self->priv->graphs, subgraph);
+		
+		gprof_function_call_chart_view_add_function (self, subgraph, 
+													 call_graph, 
+													 current_block, NULL);
+		
+		current_block = gprof_call_graph_block_get_next (root_iter, &root_iter);
+	}
+	
+	
+}
+
+static void
+gprof_function_call_chart_view_clear_canvas (GProfFunctionCallChartView *self)
+{
+	if (self->priv->canvas_items)
+	{
+		g_list_foreach (self->priv->canvas_items, (GFunc) gtk_object_destroy,
+						NULL);
+		g_list_free (self->priv->canvas_items);
+		
+		self->priv->canvas_items = NULL;
+	}
+}
+
+static gint
+on_node_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
+{
+	GProfFunctionCallChartView *self;
+	gchar *function_name;
+	
+	self = GPROF_FUNCTION_CALL_CHART_VIEW (data);
+	
+	
+	switch (event->type)
+	{
+		case GDK_ENTER_NOTIFY:
+			/* Make the outline wide */
+			gnome_canvas_item_set (item,
+							   	   "width_units", 2.5,
+							   	   "fill_color_gdk",
+							   	   &self->priv->canvas->style->base[GTK_STATE_PRELIGHT],
+							   	   "outline_color_gdk",
+							   	   &self->priv->canvas->style->text[GTK_STATE_PRELIGHT],
+							   	   NULL);
+		
+			return TRUE;
+			break;
+		case GDK_LEAVE_NOTIFY:
+			/* Make the outline thin */
+			gnome_canvas_item_set (item,
+							   	   "width_units", 1.0,
+							   	   "fill_color_gdk",
+							   	   &self->priv->canvas->style->base[GTK_STATE_NORMAL],
+							   	   "outline_color_gdk",
+							   	   &self->priv->canvas->style->text[GTK_STATE_NORMAL],	
+							   	   NULL);
+			return TRUE;
+			break;
+		case GDK_2BUTTON_PRESS:
+			function_name = (gchar *)g_object_get_data (G_OBJECT (item), 
+													    "function-name");
+			gprof_view_show_symbol_in_editor (GPROF_VIEW (self), function_name);
+			g_free (function_name);
+		
+			return TRUE;
+			break;
+		default:
+			break;
+	}
+	
+	return FALSE;
+}
+
+static void
+gprof_function_call_chart_view_draw_node (GProfFunctionCallChartView *self,
+										  Agnode_t *node, point *node_pos,
+										  gdouble node_width, 
+										  gdouble node_height)
+{
+	GnomeCanvasItem *item;
+	gdouble text_width;
+	
+	/* Node box */
+	item = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (self->priv->canvas)),
+						   		  gnome_canvas_rect_get_type (),
+						   		  "x1",
+						   		  (gdouble) (node_pos->x - INCH_TO_PIXELS (node_width) / 2),
+						   		  "y1",
+						   	  	  (gdouble) -(node_pos->y - INCH_TO_PIXELS (node_height) / 2),
+						   		  "x2",
+						   		  (gdouble) (node_pos->x + INCH_TO_PIXELS (node_width) / 2),
+						   		  "y2",
+						   		  (gdouble) -(node_pos->y + INCH_TO_PIXELS (node_height) / 2),
+						   		  "fill_color_gdk",
+						   		  &self->priv->canvas->style->base[GTK_STATE_NORMAL],
+						   		  "outline_color_gdk",
+						   		  &self->priv->canvas->style->text[GTK_STATE_NORMAL],
+						   		  "width_units", 
+						   		  1.0,
+						   		  NULL);
+	
+	g_object_set_data_full (G_OBJECT (item), "function-name", g_strdup (node->name),
+							g_free);
+	g_signal_connect (GTK_OBJECT (item), "event", G_CALLBACK (on_node_event),
+					  (gpointer) self);
+					  
+	self->priv->canvas_items = g_list_append (self->priv->canvas_items, item);
+						   
+	/* Label */
+	item = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (self->priv->canvas)),
+								  gnome_canvas_text_get_type (),
+								  "text", 
+								  node->name,
+								  "justification", 
+								  GTK_JUSTIFY_CENTER,
+								  "anchor", 
+								  GTK_ANCHOR_CENTER,
+								  "x",
+								  (gdouble) (node_pos->x - INCH_TO_PIXELS (node_width) / 2),
+								  "y", 
+								  (gdouble) -node_pos->y,
+								  "fill_color_gdk",
+								  &self->priv->canvas->style->text[GTK_STATE_NORMAL],
+								  "anchor", 
+								  GTK_ANCHOR_W,        
+								  NULL);
+								  
+	/* Center the label in the box */
+	g_object_get (item, "text_width", &text_width, NULL);
+	gnome_canvas_item_set (item, "x",
+						   (gdouble) (node_pos->x - text_width / 2), NULL);
+	self->priv->canvas_items = g_list_append (self->priv->canvas_items, item);
+	
+	/* Check if we've drawn outside the scroll region. If so, expand the 
+	 * canvas */
+	if (abs(node_pos->x + node_width) > self->priv->canvas_size_x )
+	{ 
+		self->priv->canvas_size_x = abs(node_pos->x) + 
+									INCH_TO_PIXELS (node_width) / 2;
+	}
+	
+	if (abs(node_pos->y + node_height) > self->priv->canvas_size_y) 
+	{
+		self->priv->canvas_size_y = abs(node_pos->y) + 
+									INCH_TO_PIXELS (node_height) / 2;
+	}
+									
+	/* Set up the scrolling region */
+	gtk_widget_set_size_request (self->priv->canvas, 
+								 self->priv->canvas_size_x + 100,
+								 self->priv->canvas_size_y + 100);
+	gnome_canvas_set_scroll_region (GNOME_CANVAS (self->priv->canvas), -50, 50, 
+									(gdouble) self->priv->canvas_size_x + 50,
+									(gdouble) -self->priv->canvas_size_y - 100);
+}
+
+static void
+gprof_function_call_chart_view_draw_edge (GProfFunctionCallChartView *self,
+										  Agedge_t *edge, point *node_pos,
+										  gdouble node_height)
+{
+	GnomeCanvasItem *item;
+	GnomeCanvasPathDef *edge_path_def;
+	gdouble arrow_upper_bound;
+	gdouble arrow_x_offset;
+	gdouble arrow_height;
+	GnomeCanvasPoints *arrow_points;
+	gint i;
+	
+	edge_path_def = gnome_canvas_path_def_new ();
+	
+	for (i = 0; i < (ED_spl(edge)->list->size - 1); i += 3)
+	{
+		gnome_canvas_path_def_moveto (edge_path_def,
+									  ((ED_spl(edge))->list->list[i]).x, 
+									  -((ED_spl(edge))->list->list[i]).y - 
+									  	 self->priv->y_offset);
+		gnome_canvas_path_def_curveto (edge_path_def, 
+									   ((ED_spl(edge))->list->list[i + 1]).x, 
+									   -((ED_spl(edge))->list->list[i + 1]).y -
+									     self->priv->y_offset,
+									   ((ED_spl(edge))->list->list[i + 2]).x, 
+									   -((ED_spl(edge))->list->list[i + 2]).y -
+									     self->priv->y_offset,
+									   ((ED_spl(edge))->list->list[i + 3]).x, 
+									   -((ED_spl(edge))->list->list[i + 3]).y -
+									     self->priv->y_offset);
+		
+		/* Draw the arrow at the end of the edge */
+		if (i + 3 >= (ED_spl(edge)->list->size - 1))
+		{
+			arrow_upper_bound = (gdouble) (node_pos->y  +
+										   INCH_TO_PIXELS (node_height) / 2) -
+										   self->priv->y_offset;
+			arrow_height = abs (((ED_spl(edge))->list->list[i + 3]).y - 
+							    arrow_upper_bound);
+			
+			/* Determine the length (x offset) of the arrowhead.
+			 * Arrow x offsets shouldn't be more than 20 units. */
+			if ((((ED_spl(edge))->list->list[i + 3]).x -
+				((ED_spl(edge))->list->list[i + 2]).x) > 0)
+			{
+				arrow_x_offset = sqrt( abs(100 - arrow_height * arrow_height));
+			}
+			else
+			{
+				arrow_x_offset = -sqrt( abs(100 - arrow_height * arrow_height));
+			}
+			
+			/* Now actually draw the arrow */
+			arrow_points = gnome_canvas_points_new (2);
+			
+			/* Starting point */
+			arrow_points->coords[0] = ((ED_spl(edge))->list->list[i + 3]).x;
+			arrow_points->coords[1] = -((ED_spl(edge))->list->list[i + 3].y +
+										 self->priv->y_offset);
+			
+			/* Arrow head */
+			arrow_points->coords[2] = ((ED_spl(edge))->list->list[i + 3]).x + 
+									   arrow_x_offset;
+			arrow_points->coords[3] = -(arrow_upper_bound + self->priv->y_offset);
+			
+			if (abs (arrow_x_offset) <= 20)
+			{
+				item = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (self->priv->canvas)),
+										   	  gnome_canvas_line_get_type(),
+										   	  "points", 
+											  arrow_points,
+										   	  "fill_color_gdk",
+							  				  &self->priv->canvas->style->text[GTK_STATE_NORMAL],
+											  "last_arrowhead", 
+											  TRUE,
+											  "arrow_shape_a", 
+											  10.0,
+											  "arrow_shape_b", 
+											  10.0,
+											  "arrow_shape_c", 
+											  4.0,
+											  "width_units", 
+											  1.0,
+											  NULL);
+				self->priv->canvas_items = g_list_append (self->priv->canvas_items,
+														  item);
+			}
+			
+			gnome_canvas_points_free (arrow_points);
+			
+		}
+	}
+	
+	/* Draw the edge path */
+	item = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (self->priv->canvas)), 
+								  gnome_canvas_bpath_get_type(),
+								  "bpath", 
+								  edge_path_def,
+								  "outline_color_gdk",
+								  &self->priv->canvas->style->text[GTK_STATE_NORMAL],
+								  "width_pixels", 
+								  1,
+								  NULL);
+	self->priv->canvas_items = g_list_append (self->priv->canvas_items, item);
+}
+
+static void 
+gprof_function_call_chart_view_init (GProfFunctionCallChartView *self)
+{
+	self->priv = g_new0 (GProfFunctionCallChartViewPriv, 1);
+	
+	self->priv->canvas = gnome_canvas_new_aa ();
+	self->priv->scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+	
+	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (self->priv->
+														 scrolled_window),
+									GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+	gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (self->priv->
+																scrolled_window),
+					   					   self->priv->canvas);
+	gtk_widget_show_all (self->priv->scrolled_window);
+	
+	/* Set up graph stuff */
+	aginit ();
+}
+
+static void
+gprof_function_call_chart_view_finalize (GObject *obj)
+{
+	GProfFunctionCallChartView *self;
+	
+	self = (GProfFunctionCallChartView *) obj;
+	
+	g_free (self->priv);
+}
+
+static void
+gprof_function_call_chart_view_class_init (GProfFunctionCallChartViewClass *klass)
+{
+	GObjectClass *object_class;
+	GProfViewClass *view_class;
+	
+	object_class = (GObjectClass *) klass;
+	view_class = GPROF_VIEW_CLASS (klass);
+	
+	object_class->finalize = gprof_function_call_chart_view_finalize;
+	view_class->refresh = gprof_function_call_chart_view_refresh;
+	view_class->get_widget = gprof_function_call_chart_view_get_widget;
+}
+
+GType
+gprof_function_call_chart_view_get_type (void)
+{
+	static GType obj_type = 0;
+	
+	if (!obj_type)
+	{
+		static const GTypeInfo obj_info = 
+		{
+			sizeof (GProfFunctionCallChartViewClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) gprof_function_call_chart_view_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,           /* class_data */
+			sizeof (GProfFunctionCallChartView),
+			0,              /* n_preallocs */
+			(GInstanceInitFunc) gprof_function_call_chart_view_init,
+			NULL            /* value_table */
+		};
+		obj_type = g_type_register_static (GPROF_VIEW_TYPE,
+		                                   "GProfFunctionCallChartView", &obj_info, 0);
+	}
+	return obj_type;
+}
+
+GProfFunctionCallChartView *
+gprof_function_call_chart_view_new (GProfProfileData *profile_data,
+									IAnjutaSymbolManager *symbol_manager,
+									IAnjutaDocumentManager *document_manager)
+{
+	GProfFunctionCallChartView *view;
+	
+	view = g_object_new (GPROF_FUNCTION_CALL_CHART_VIEW_TYPE, NULL);
+	gprof_view_set_data (GPROF_VIEW (view), profile_data);
+	gprof_view_set_symbol_manager (GPROF_VIEW (view), symbol_manager);
+	gprof_view_set_document_manager (GPROF_VIEW (view), document_manager);
+	
+	return view;
+}
+
+static gboolean
+async_draw_graph (gpointer user_data)
+{
+	GProfFunctionCallChartView *self;
+	Agedge_t *current_edge;
+	Agraph_t *current_graph;
+	point node_pos;
+#ifndef ND_coord_i	
+	pointf node_posf;
+#endif	
+	gdouble node_width;
+	gdouble node_height;
+	
+	self = GPROF_FUNCTION_CALL_CHART_VIEW (user_data);
+	
+	if (self->priv->current_graph)
+	{
+		current_graph = self->priv->current_graph->data;
+		
+		if (self->priv->current_node)
+		{
+#ifdef ND_coord_i			
+			node_pos = ND_coord_i (self->priv->current_node);
+#else
+			node_posf = ND_coord (self->priv->current_node);
+			PF2P(node_posf,node_pos);
+#endif			
+			
+			node_pos.y += self->priv->y_offset;
+			node_width = ND_width (self->priv->current_node);
+			node_height = ND_height (self->priv->current_node);
+			
+			gprof_function_call_chart_view_draw_node (self, self->priv->current_node, 
+													  &node_pos, node_width, node_height);
+													  
+			
+			/* Handle the edges */
+			current_edge = agfstedge (current_graph, 
+									  self->priv->current_node);
+			
+			while (current_edge)
+			{
+				gprof_function_call_chart_view_draw_edge (self, current_edge, 
+														  &node_pos, node_height);
+				
+				current_edge = agnxtedge (current_graph, current_edge, 
+										  self->priv->current_node);
+			}
+			
+			self->priv->current_node = agnxtnode (current_graph, 
+												  self->priv->current_node);
+			return TRUE;
+		}
+		
+		self->priv->y_offset = self->priv->canvas_size_y + 25;
+		self->priv->current_graph = g_list_next (self->priv->current_graph);
+		
+		if (self->priv->current_graph)
+		{
+			self->priv->current_node = agfstnode (self->priv->current_graph->data);
+			return TRUE;
+		}
+	}
+	
+	gprof_function_call_chart_view_destroy_graph (self);
+	
+	return FALSE;
+}
+
+void
+gprof_function_call_chart_view_refresh (GProfView *view)
+{
+	GProfFunctionCallChartView *self;
+	GList *current_graph;
+	
+	self = GPROF_FUNCTION_CALL_CHART_VIEW (view);
+	
+	gprof_function_call_chart_view_create_graph (self);
+	gprof_function_call_chart_view_clear_canvas (self);
+	
+	/* Set up layout of graph */
+	current_graph = self->priv->graphs;
+	
+	/* Set canvas size for scrolling */
+	self->priv->canvas_size_x = 250;
+	self->priv->canvas_size_y = 250;
+	self->priv->y_offset = 0;
+	
+	while (current_graph)
+	{
+		gvLayout (self->priv->gvc, current_graph->data, "dot");
+		current_graph = g_list_next (current_graph);
+	}
+	
+	/* Handle the graph asyncronously */
+	self->priv->current_graph = self->priv->graphs;
+	
+	if (self->priv->current_graph)
+		self->priv->current_node = agfstnode (self->priv->current_graph->data);
+	
+	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE + 200, async_draw_graph, self, 
+					 NULL);
+}
+
+GtkWidget *
+gprof_function_call_chart_view_get_widget (GProfView *view)
+{
+	GProfFunctionCallChartView *self;
+	
+	self = GPROF_FUNCTION_CALL_CHART_VIEW (view);
+	
+	return self->priv->scrolled_window;
+}

Added: trunk/plugins/profiler/gprof-function-call-chart-view.h
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-function-call-chart-view.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,67 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-function-call-chart-view.h
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-function-call-chart-view.h 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _GPROF_FUNCTION_CALL_CHART_VIEW_H
+#define _GPROF_FUNCTION_CALL_CHART_VIEW_H
+
+#include <config.h>
+#include <graphviz/gvc.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <libgnomecanvas/libgnomecanvas.h>
+#include "gprof-view.h"
+
+G_BEGIN_DECLS
+
+typedef struct _GProfFunctionCallChartView         GProfFunctionCallChartView;
+typedef struct _GProfFunctionCallChartViewClass    GProfFunctionCallChartViewClass;
+typedef struct _GProfFunctionCallChartViewPriv     GProfFunctionCallChartViewPriv;
+
+#define GPROF_FUNCTION_CALL_CHART_VIEW_TYPE            (gprof_function_call_chart_view_get_type ())
+#define GPROF_FUNCTION_CALL_CHART_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GPROF_FUNCTION_CALL_CHART_VIEW_TYPE, GProfFunctionCallChartView))
+#define GPROF_FUNCTION_CALL_CHART_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GPROF_FUNCTION_CALL_CHART_VIEW_TYPE, GProfFunctionCallChartViewClass))
+#define IS_GPROF_FUNCTION_CALL_CHART_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GPROF_FUNCTION_CALL_CHART_VIEW_TYPE))
+#define IS_GPROF_FUNCTION_CALL_CHART_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GPROF_FUNCTION_CALL_CHART_VIEW_TYPE))
+
+struct  _GProfFunctionCallChartView
+{
+	GProfView parent;
+	GProfFunctionCallChartViewPriv *priv;
+};
+
+struct _GProfFunctionCallChartViewClass
+{
+	GProfViewClass parent_class;
+};
+
+GType gprof_function_call_chart_view_get_type (void);
+
+GProfFunctionCallChartView *gprof_function_call_chart_view_new (GProfProfileData *profile_data,
+																IAnjutaSymbolManager *symbol_manager,
+																IAnjutaDocumentManager *document_manager);
+
+void gprof_function_call_chart_view_refresh (GProfView *view);
+GtkWidget *gprof_function_call_chart_view_get_widget (GProfView *view);
+
+#endif

Added: trunk/plugins/profiler/gprof-function-call-tree-view.c
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-function-call-tree-view.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,288 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-function-call-tree-view.c
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-function-call-tree-view.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include "gprof-function-call-tree-view.h"
+#include <glib/gi18n-lib.h>
+
+struct _GProfFunctionCallTreeViewPriv
+{
+	GladeXML *gxml;
+	GtkTreeStore *tree_store;
+};
+
+enum
+{
+	COL_RECURSIVE = 0,
+	COL_NAME,
+	NUM_COLS
+};
+
+static void
+gprof_function_call_tree_view_create_columns (GProfFunctionCallTreeView *self)
+{
+	GtkTreeViewColumn *col;
+	GtkCellRenderer *renderer;
+	GtkWidget *tree_view;
+	
+	tree_view = glade_xml_get_widget (self->priv->gxml, 
+									  "function_call_tree_view");
+	
+	/* Recursive icon */
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), col);
+	
+	renderer = gtk_cell_renderer_pixbuf_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_add_attribute (col, renderer, "stock-id", COL_RECURSIVE);
+	
+	/* Function name */
+	col = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_title (col, _("Function Name"));
+	gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), col);
+	gtk_tree_view_set_expander_column (GTK_TREE_VIEW (tree_view), col);
+	
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_add_attribute (col, renderer, "text", COL_NAME);
+	gtk_tree_view_column_set_resizable (col, TRUE);
+	gtk_tree_view_column_set_reorderable (col, TRUE);
+	
+	/* Model setup */
+	gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), 
+							 GTK_TREE_MODEL (self->priv->tree_store));
+	g_object_unref (self->priv->tree_store);
+}
+
+static void 
+gprof_function_call_tree_view_add_function (GProfFunctionCallTreeView *self,
+											GProfCallGraph *call_graph,
+											GProfCallGraphBlock *block,
+											GtkTreeIter *parent_iter)
+{
+	GtkTreeIter child_iter;
+	GList *entry_iter;
+	GProfCallGraphBlockEntry *current_entry;
+	GProfCallGraphBlockEntry *current_child;
+	GProfCallGraphBlock *next_block;
+	GProfCallGraphBlockEntry *next_block_primary_entry;
+	gchar *current_entry_name;
+	gchar *next_block_name;
+	
+	current_entry = gprof_call_graph_block_get_primary_entry (block);
+	current_entry_name = gprof_call_graph_block_entry_get_name (current_entry);
+	
+	gtk_tree_store_append (self->priv->tree_store, &child_iter, parent_iter);
+	gtk_tree_store_set (self->priv->tree_store, &child_iter, COL_NAME,
+						current_entry_name, -1);
+	
+	if (gprof_call_graph_block_is_recursive (block))
+		gtk_tree_store_set (self->priv->tree_store, &child_iter, COL_RECURSIVE,
+							GTK_STOCK_REFRESH, -1);
+	
+	current_child = gprof_call_graph_block_get_first_child (block, &entry_iter);
+	
+	while (current_child)
+	{
+		next_block = gprof_call_graph_find_block (call_graph, 
+												  gprof_call_graph_block_entry_get_name (current_child));
+		current_child = gprof_call_graph_block_entry_get_next (entry_iter, 
+															   &entry_iter);
+		
+		if (next_block)
+		{
+			next_block_primary_entry = gprof_call_graph_block_get_primary_entry (next_block);
+			next_block_name = gprof_call_graph_block_entry_get_name (next_block_primary_entry);		
+			
+			/* Make sure we don't go into an infinite loop on recursive functions */
+			if (strcmp(next_block_name, current_entry_name) == 0)
+				continue;
+
+			gprof_function_call_tree_view_add_function (self, call_graph, 
+														next_block, &child_iter);
+		}
+	}
+	
+}
+
+static void 
+on_list_view_row_activated (GtkTreeView *list_view,
+							GtkTreePath *path,
+							GtkTreeViewColumn *col,												 
+							gpointer user_data)
+{
+	GProfView *self;
+	GtkTreeIter list_iter;
+	GtkTreeModel *model;
+	gchar *selected_function_name;
+	
+	self = GPROF_VIEW (user_data);
+	model = gtk_tree_view_get_model (list_view);
+	
+	if (gtk_tree_model_get_iter (model, &list_iter, path))
+	{
+		gtk_tree_model_get (model,
+							&list_iter, COL_NAME, 
+							&selected_function_name, -1);
+		
+		gprof_view_show_symbol_in_editor (self, selected_function_name);
+		
+		g_free (selected_function_name);
+	}	
+}
+
+static void
+gprof_function_call_tree_view_init (GProfFunctionCallTreeView *self)
+{
+	GtkWidget *list_view;
+	
+	self->priv = g_new0 (GProfFunctionCallTreeViewPriv, 1);
+	
+	self->priv->gxml = glade_xml_new (PACKAGE_DATA_DIR
+									  "/glade/profiler-function-call-tree.glade", 
+									  NULL, NULL);
+	self->priv->tree_store = gtk_tree_store_new (NUM_COLS, G_TYPE_STRING,
+												 G_TYPE_STRING);
+	
+	gprof_function_call_tree_view_create_columns (self);
+	
+	list_view = glade_xml_get_widget (self->priv->gxml, "function_call_tree_view");
+	
+	g_signal_connect (list_view, "row-activated",
+					  G_CALLBACK (on_list_view_row_activated),
+					  (gpointer) self);
+}
+
+static void
+gprof_function_call_tree_view_finalize (GObject *obj)
+{
+	GProfFunctionCallTreeView *self;
+	
+	self = (GProfFunctionCallTreeView *) obj;
+	
+	g_object_unref (self->priv->gxml);
+	g_free (self->priv);
+}
+
+static void
+gprof_function_call_tree_view_class_init (GProfFunctionCallTreeViewClass *klass)
+{
+	GObjectClass *object_class;
+	GProfViewClass *view_class;
+	
+	object_class = (GObjectClass *) klass;
+	view_class = GPROF_VIEW_CLASS (klass);
+	
+	object_class->finalize = gprof_function_call_tree_view_finalize;
+	view_class->refresh = gprof_function_call_tree_view_refresh;
+	view_class->get_widget = gprof_function_call_tree_view_get_widget;
+}
+
+GType
+gprof_function_call_tree_view_get_type (void)
+{
+	static GType obj_type = 0;
+	
+	if (!obj_type)
+	{
+		static const GTypeInfo obj_info = 
+		{
+			sizeof (GProfFunctionCallTreeViewClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) gprof_function_call_tree_view_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,           /* class_data */
+			sizeof (GProfFunctionCallTreeView),
+			0,              /* n_preallocs */
+			(GInstanceInitFunc) gprof_function_call_tree_view_init,
+			NULL            /* value_table */
+		};
+		obj_type = g_type_register_static (GPROF_VIEW_TYPE,
+		                                   "GProfFunctionCallTreeView", 
+										   &obj_info, 0);
+	}
+	return obj_type;
+}
+
+GProfFunctionCallTreeView *
+gprof_function_call_tree_view_new (GProfProfileData *profile_data,
+								   IAnjutaSymbolManager *symbol_manager,
+								   IAnjutaDocumentManager *document_manager)
+{
+	GProfFunctionCallTreeView *view;
+	
+	view = g_object_new (GPROF_FUNCTION_CALL_TREE_VIEW_TYPE, NULL);
+	gprof_view_set_data (GPROF_VIEW (view), profile_data);
+	gprof_view_set_symbol_manager (GPROF_VIEW (view), symbol_manager);
+	gprof_view_set_document_manager (GPROF_VIEW (view), document_manager);
+	
+	return view;
+}
+
+void
+gprof_function_call_tree_view_refresh (GProfView *view)
+{
+	GProfFunctionCallTreeView *self;
+	GProfProfileData *data;
+	GProfCallGraph *call_graph;
+	GProfCallGraphBlock *current_block;
+	GList *root_iter;
+	GtkWidget *tree_view;
+	
+	self = GPROF_FUNCTION_CALL_TREE_VIEW (view);
+	tree_view = glade_xml_get_widget (self->priv->gxml, 
+									  "function_call_tree_view");
+	
+	g_object_ref (self->priv->tree_store);
+	
+	gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), NULL);
+	gtk_tree_store_clear (self->priv->tree_store);
+	
+	data = gprof_view_get_data (view);
+	call_graph = gprof_profile_data_get_call_graph (data);
+	
+	current_block = gprof_call_graph_get_first_block (call_graph, &root_iter);
+	
+	while (current_block)
+	{
+		gprof_function_call_tree_view_add_function (self, call_graph, 
+													current_block, NULL);
+		current_block = gprof_call_graph_block_get_next(root_iter, &root_iter);
+	}
+	
+	gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), 
+							 GTK_TREE_MODEL (self->priv->tree_store));
+	
+	g_object_unref (self->priv->tree_store);
+}
+
+GtkWidget *
+gprof_function_call_tree_view_get_widget (GProfView *view)
+{
+	GProfFunctionCallTreeView *self;
+	
+	self = GPROF_FUNCTION_CALL_TREE_VIEW (view);
+	
+	return glade_xml_get_widget (self->priv->gxml, 
+								 "function_call_tree_scrolled");
+}

Added: trunk/plugins/profiler/gprof-function-call-tree-view.h
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-function-call-tree-view.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,66 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-function-call-tree-view.h
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-function-call-tree-view.h 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _GPROF_FUNCTION_CALL_TREE_VIEW_H
+#define _GPROF_FUNCTION_CALL_TREE_VIEW_H
+
+#include <config.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include "gprof-view.h"
+
+G_BEGIN_DECLS
+
+typedef struct _GProfFunctionCallTreeView         GProfFunctionCallTreeView;
+typedef struct _GProfFunctionCallTreeViewClass    GProfFunctionCallTreeViewClass;
+typedef struct _GProfFunctionCallTreeViewPriv     GProfFunctionCallTreeViewPriv;
+
+#define GPROF_FUNCTION_CALL_TREE_VIEW_TYPE            (gprof_function_call_tree_view_get_type ())
+#define GPROF_FUNCTION_CALL_TREE_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GPROF_FUNCTION_CALL_TREE_VIEW_TYPE, GProfFunctionCallTreeView))
+#define GPROF_FUNCTION_CALL_TREE_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GPROF_FUNCTION_CALL_TREE_VIEW_TYPE, GProfFunctionCallTreeViewClass))
+#define IS_GPROF_FUNCTION_CALL_TREE_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GPROF_FUNCTION_CALL_TREE_VIEW_TYPE))
+#define IS_GPROF_FUNCTION_CALL_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GPROF_FUNCTION_CALL_TREE_VIEW_TYPE))
+
+struct  _GProfFunctionCallTreeView
+{
+	GProfView parent;
+	GProfFunctionCallTreeViewPriv *priv;
+};
+
+struct _GProfFunctionCallTreeViewClass
+{
+	GProfViewClass parent_class;
+};
+
+GType gprof_function_call_tree_view_get_type (void);
+
+GProfFunctionCallTreeView * gprof_function_call_tree_view_new (GProfProfileData *profile_data,
+															   IAnjutaSymbolManager *symbol_manager,
+															   IAnjutaDocumentManager *document_manager);
+
+void gprof_function_call_tree_view_refresh (GProfView *view);
+GtkWidget *gprof_function_call_tree_view_get_widget (GProfView *view);
+
+#endif

Added: trunk/plugins/profiler/gprof-options.c
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-options.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,451 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-options.c
+ * Copyright (C) James Liggett 2007 <jrliggett cox net>
+ * 
+ * gprof-options.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include "gprof-options.h"
+
+/* Internal structure to hold information on individual preference keys */
+typedef struct
+{
+	gchar *name;
+	gchar *widget_name;
+	GProfOptions *options;  /* Need this to set/get data from callbacks */
+	OptionWidgetType widget_type;
+} Key;
+
+struct _GProfOptionsPriv
+{
+	GHashTable *default_options;
+	GHashTable *targets;
+	GHashTable *current_target;
+	GHashTable *key_data_table;
+};
+
+static void
+free_key (Key *key)
+{
+	g_free (key->name);
+	g_free (key->widget_name);
+	g_free (key);
+}
+
+static void
+gprof_options_init (GProfOptions *self)
+{
+	self->priv = g_new0 (GProfOptionsPriv, 1);
+	
+	self->priv->default_options = g_hash_table_new_full (g_str_hash, 
+														 g_str_equal,
+														 g_free, g_free);
+	
+	self->priv->key_data_table = g_hash_table_new_full (g_str_hash, 
+														g_str_equal,
+														g_free, 
+														(GDestroyNotify) free_key);
+	
+	self->priv->targets = g_hash_table_new_full (g_str_hash,
+												 g_str_equal,
+												 g_free, 
+												 (GDestroyNotify) g_hash_table_destroy);
+}
+
+static void
+gprof_options_finalize (GObject *obj)
+{
+	GProfOptions *self;
+	
+	self = (GProfOptions *) obj;
+	
+	g_hash_table_destroy (self->priv->default_options);
+	g_hash_table_destroy (self->priv->key_data_table);
+	g_hash_table_destroy (self->priv->targets);
+	
+	g_free (self->priv);
+}
+
+static void 
+gprof_options_class_init (GProfOptionsClass *klass)
+{
+	GObjectClass *object_class;
+	
+	object_class = (GObjectClass *) klass;
+	object_class->finalize = gprof_options_finalize;
+}
+
+/* Copy defaults into a new target specifc settings table */
+static void
+copy_default_key (gchar *key, gchar *value, GHashTable *new_settings)
+{
+	g_hash_table_insert (new_settings, g_strdup (key), g_strdup (value));
+}
+
+static void
+gprof_options_parse_tree (GProfOptions *self, xmlNodePtr node)
+{
+	xmlNodePtr current_node;
+	xmlChar *target_name;
+	xmlChar *key_name;
+	xmlChar *key_value;
+	
+	current_node = node;
+	
+	while (current_node)
+	{
+		if (strcmp ((gchar *) current_node->name, "target") == 0)
+		{
+			target_name = xmlGetProp (current_node, BAD_CAST "name");
+			gprof_options_set_target (self, (gchar *) target_name); 
+			
+			xmlFree (target_name);
+		}
+		else if (strcmp ((gchar *) current_node->name, "key") == 0)
+		{
+			key_name = xmlGetProp (current_node, BAD_CAST "name");
+			key_value = xmlNodeGetContent (current_node);
+			
+			/* Filter out deprecated keys (those that aren't registered) */
+			if (g_hash_table_lookup_extended (self->priv->key_data_table,
+											  (gchar *) key_name,
+											  NULL, NULL))
+			{
+				gprof_options_set_string (self, (gchar *) key_name, 
+									  	  (gchar *) key_value);
+			}
+			
+			xmlFree (key_name);
+			xmlFree (key_value);
+		}
+		
+		gprof_options_parse_tree (self, current_node->children);
+		current_node = current_node->next;
+		
+	}
+}
+
+static void
+build_key_elements (gchar *key, gchar *value, xmlNodePtr parent)
+{
+	xmlNodePtr new_key;
+	
+	new_key = xmlNewChild (parent, NULL, BAD_CAST "key", BAD_CAST value);
+	xmlNewProp (new_key, BAD_CAST "name", BAD_CAST key);
+}
+
+static void
+build_target_elements (gchar *key, GHashTable *target_settings, 
+					   xmlNodePtr parent)
+{
+	xmlNodePtr new_target;
+	
+	new_target = xmlNewChild (parent, NULL, BAD_CAST "target", NULL);
+	xmlNewProp (new_target, BAD_CAST "name", BAD_CAST key);
+	
+	g_hash_table_foreach (target_settings, (GHFunc) build_key_elements, new_target);
+}
+
+/* GUI functions: callbacks and various setup functions */
+static void
+on_option_toggled (GtkToggleButton *button, Key *key)
+{
+	if (gtk_toggle_button_get_active (button))
+		gprof_options_set_int (key->options, key->name, 1);
+	else
+		gprof_options_set_int (key->options, key->name, 0);
+}
+
+static gboolean
+on_option_focus_out (GtkWidget *text_view, GdkEventFocus *event,
+					 Key *key)
+{
+	GtkTextBuffer *text_buffer;
+	GtkTextIter start_iter;
+	GtkTextIter end_iter;
+	gchar *string;
+	
+	text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
+	gtk_text_buffer_get_start_iter (text_buffer, &start_iter);
+	gtk_text_buffer_get_end_iter (text_buffer, &end_iter);
+	string = gtk_text_buffer_get_text (text_buffer, &start_iter, &end_iter, FALSE);
+	
+	gprof_options_set_string (key->options, key->name, string);
+	
+	g_free (string);
+	
+	return FALSE;
+}
+
+static void
+on_option_changed (GtkEditable *editable, Key *key)
+{
+	gchar *string;
+	
+	string = gtk_editable_get_chars (editable, 0, -1);
+	gprof_options_set_string (key->options, key->name, string);
+	
+	g_free (string);
+}
+
+static void
+setup_widgets (gchar *key_name, Key *key, GladeXML *gxml)
+{
+	GtkWidget *widget;
+	GtkTextBuffer *buffer;
+	gchar *string;
+	
+	widget = glade_xml_get_widget (gxml, key->widget_name);
+	
+	if (widget)
+	{
+		switch (key->widget_type)
+		{
+			case OPTION_TYPE_TOGGLE:
+				gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget),
+											  gprof_options_get_int (key->options,
+																	 key_name));
+				g_signal_connect (widget, "toggled", G_CALLBACK (on_option_toggled),
+								  key);
+				break;
+			case OPTION_TYPE_TEXT_ENTRY: 
+				buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget));
+				string = gprof_options_get_string (key->options, key_name);	
+				gtk_text_buffer_set_text (buffer, string, -1);
+			
+				g_signal_connect (widget, "focus-out-event", G_CALLBACK (on_option_focus_out),
+								  key);
+			
+				g_free (string);
+				break;
+			case OPTION_TYPE_ENTRY:
+				string = gprof_options_get_string (key->options, key->name);
+				gtk_entry_set_text (GTK_ENTRY (widget), string);
+				
+				g_signal_connect (widget, "changed", G_CALLBACK (on_option_changed),
+								  key);
+				
+				g_free (string);
+				break;
+			default:
+				break;
+		}
+	}
+}
+
+GType 
+gprof_options_get_type (void)
+{
+	static GType obj_type = 0;
+	
+	if (!obj_type)
+	{
+		static const GTypeInfo obj_info = 
+		{
+			sizeof (GProfOptionsClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) gprof_options_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,           /* class_data */
+			sizeof (GProfOptions),
+			0,              /* n_preallocs */
+			(GInstanceInitFunc) gprof_options_init,
+			NULL            /* value_table */
+		};
+		obj_type = g_type_register_static (G_TYPE_OBJECT,
+		                                   "GProfOptions", &obj_info, 0);
+	}
+	return obj_type;
+}
+
+GProfOptions *
+gprof_options_new ()
+{
+	return g_object_new (GPROF_OPTIONS_TYPE, NULL);
+}
+
+void
+gprof_options_destroy (GProfOptions *self)
+{
+	g_object_unref (self);
+}
+
+void
+gprof_options_set_target (GProfOptions *self, gchar *target)
+{
+	GHashTable *new_table;
+	
+	if (target)
+	{
+		/* First, the target must have an entry in the target table. If we don't
+		 * have one, set one up and copy the defaults into it. */
+		
+		if (!g_hash_table_lookup_extended (self->priv->targets, target,
+										   NULL, NULL))
+		{
+			new_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, 
+											   g_free);
+			g_hash_table_foreach (self->priv->default_options, 
+								  (GHFunc) copy_default_key, new_table);
+			g_hash_table_insert (self->priv->targets, g_strdup (target), 
+								 new_table);
+		}
+		
+		self->priv->current_target = g_hash_table_lookup (self->priv->targets, 
+														  target);
+	}
+	else
+		self->priv->current_target = NULL;
+}
+
+gboolean
+gprof_options_has_target (GProfOptions *self, gchar *target)
+{
+	return g_hash_table_lookup_extended (self->priv->targets, target,
+										 NULL, NULL);
+}
+
+/* Free returned string */
+gchar *
+gprof_options_get_string (GProfOptions *self, const gchar *key)
+{	
+	if (self->priv->current_target)
+	{
+		return g_strdup (g_hash_table_lookup (self->priv->current_target,
+											  key));
+	}
+	else
+	{
+		return g_strdup (g_hash_table_lookup (self->priv->default_options,
+											  key));
+	}
+	
+	return NULL;
+}
+
+gint
+gprof_options_get_int (GProfOptions *self, const gchar *key)
+{
+	gchar *value_string;
+	gint value;
+	
+	value_string = gprof_options_get_string (self, key);
+	
+	if (value_string)
+	{
+		value = atoi (value_string);
+		g_free (value_string);
+	}
+	else
+		value = 0;
+	
+	return value;
+}
+
+void 
+gprof_options_set_string (GProfOptions *self, gchar *key, gchar *value)
+{
+	if (self->priv->current_target)
+	{
+		g_hash_table_insert (self->priv->current_target, 
+							 g_strdup (key), g_strdup (value));
+	}
+	else
+	{
+		g_warning ("GProfOptions: Trying to set option value with "
+				   "no target.\n");
+	}	
+}
+
+void 
+gprof_options_set_int (GProfOptions *self, gchar *key, gint value)
+{
+	gchar *value_string;
+	
+	value_string = g_strdup_printf ("%i", value);
+	gprof_options_set_string (self, key, value_string);
+	
+	g_free (value_string);
+}
+
+void
+gprof_options_register_key (GProfOptions *self, gchar *key_name, 
+							const gchar *default_value,
+							const gchar *widget_name,
+							OptionWidgetType widget_type)
+{
+	Key *new_key;
+	
+	new_key = g_new0 (Key, 1);
+	
+	new_key->name = g_strdup (key_name);
+	new_key->widget_name = g_strdup (widget_name);
+	new_key->options = self;
+	new_key->widget_type = widget_type;
+	
+	g_hash_table_insert (self->priv->key_data_table, g_strdup (key_name), 
+						 new_key);
+	g_hash_table_insert (self->priv->default_options, g_strdup (key_name), 
+						 g_strdup (default_value));
+}
+
+void
+gprof_options_create_window (GProfOptions *self, GladeXML *gxml)
+{
+	g_hash_table_foreach (self->priv->key_data_table, (GHFunc) setup_widgets,
+						  gxml);
+}
+
+void
+gprof_options_load (GProfOptions *self, const gchar *path)
+{	
+	if (g_file_test (path, G_FILE_TEST_EXISTS))
+	{
+		xmlDocPtr settings_doc;
+		xmlNodePtr root;
+		
+		settings_doc = xmlReadFile (path, NULL, 0);
+		root = xmlDocGetRootElement (settings_doc);
+		
+		gprof_options_parse_tree (self, root);
+		
+		xmlFreeDoc (settings_doc);
+		xmlCleanupParser ();
+	}
+}
+
+void
+gprof_options_save (GProfOptions *self, const gchar *path)
+{
+	xmlDocPtr settings_doc;
+	xmlNodePtr root_node;
+	
+	settings_doc = xmlNewDoc (BAD_CAST "1.0");
+	root_node = xmlNewNode (NULL, BAD_CAST "profiler-settings");
+	xmlDocSetRootElement (settings_doc, root_node);
+	
+	g_hash_table_foreach (self->priv->targets, (GHFunc) build_target_elements, 
+						  root_node);
+	
+	xmlSaveFormatFile (path, settings_doc, TRUE);
+	
+	xmlFreeDoc (settings_doc);
+	xmlCleanupParser ();
+}

Added: trunk/plugins/profiler/gprof-options.h
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-options.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,99 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-options.h
+ * Copyright (C) James Liggett 2007 <jrliggett cox net>
+ * 
+ * gprof-options.h 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _GPROF_OPTIONS_H
+#define _GPROF_OPTIONS_H
+
+#include <string.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+
+G_BEGIN_DECLS
+
+typedef struct _GProfOptions         GProfOptions;
+typedef struct _GProfOptionsClass    GProfOptionsClass;
+typedef struct _GProfOptionsPriv     GProfOptionsPriv;
+
+#define GPROF_OPTIONS_TYPE            (gprof_options_get_type ())
+#define GPROF_OPTIONS(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GPROF_OPTIONS_TYPE, GProfOptions))
+#define GPROF_OPTIONS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GPROF_OPTIONS_TYPE, GProfOptionsClass))
+#define GPROF_OPTIONS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GPROF_OPTIONS_TYPE, GProfOptionsClass))
+#define IS_GPROF_OPTIONS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GPROF_OPTIONS_TYPE))
+#define IS_GPROF_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GPROF_OPTIONS_TYPE))
+
+struct  _GProfOptions
+{
+	GObject parent;
+	GProfOptionsPriv *priv;
+};
+
+struct _GProfOptionsClass
+{
+	GObjectClass parent_class;
+};
+
+/* Option types (used for widget synchronization */
+typedef enum
+{
+	OPTION_TYPE_TOGGLE,
+	OPTION_TYPE_TEXT_ENTRY,
+	OPTION_TYPE_ENTRY
+} OptionWidgetType;
+
+GType gprof_options_get_type (void);
+
+GProfOptions *gprof_options_new (void);
+void gprof_options_destroy (GProfOptions *self);
+
+void gprof_options_set_target (GProfOptions *self, gchar *target);
+gboolean gprof_options_has_target (GProfOptions *self, gchar *target);
+
+gchar *gprof_options_get_string (GProfOptions *self, const gchar *key);
+gint gprof_options_get_int (GProfOptions *self, const gchar *key);
+
+
+void gprof_options_set_string (GProfOptions *self, gchar *key, gchar *value);
+void gprof_options_set_int (GProfOptions *self, gchar *key, gint value);
+
+void gprof_options_register_key (GProfOptions *self, gchar *key_name, 
+								 const gchar *default_value, 
+								 const gchar *widget_name, 
+								 OptionWidgetType widget_type);
+
+
+void gprof_options_create_window (GProfOptions *self, GladeXML *gxml);
+
+void gprof_options_load (GProfOptions *self, const gchar *path);
+void gprof_options_save (GProfOptions *self, const gchar *path);
+
+
+
+G_END_DECLS
+
+#endif /* _GPROF_OPTIONS_H */
+
+ 

Added: trunk/plugins/profiler/gprof-profile-data.c
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-profile-data.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,257 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-profile-data.c
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-profile-data.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include "gprof-profile-data.h"
+#include <gio/gio.h>
+
+struct _GProfProfileDataPriv
+{
+	GProfFlatProfile *flat_profile;
+	GProfCallGraph *call_graph;
+};
+
+static void 
+gprof_profile_data_init (GProfProfileData *self)
+{
+	self->priv = g_new0 (GProfProfileDataPriv, 1);
+}
+
+static void
+gprof_profile_data_finalize (GObject *obj)
+{
+	GProfProfileData *self;
+	
+	self = (GProfProfileData *) obj;
+	
+	if (self->priv->flat_profile)
+		gprof_flat_profile_free (self->priv->flat_profile);
+	
+	if (self->priv->call_graph)
+		gprof_call_graph_free (self->priv->call_graph);
+	
+	g_free (self->priv);
+}
+
+static void
+gprof_profile_data_class_init (GProfProfileDataClass *klass)
+{
+	GObjectClass *object_class;
+	
+	object_class = (GObjectClass *) klass;
+	
+	object_class->finalize = gprof_profile_data_finalize;
+}
+
+GType
+gprof_profile_data_get_type (void)
+{
+	static GType obj_type = 0;
+	
+	if (!obj_type)
+	{
+		static const GTypeInfo obj_info = 
+		{
+			sizeof (GProfProfileDataClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) gprof_profile_data_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,           /* class_self */
+			sizeof (GProfProfileData),
+			0,              /* n_preallocs */
+			(GInstanceInitFunc) gprof_profile_data_init,
+			NULL            /* value_table */
+		};
+		obj_type = g_type_register_static (G_TYPE_OBJECT,
+		                                   "GProfProfileData", &obj_info, 0);
+	}
+	return obj_type;
+}
+
+GProfProfileData *
+gprof_profile_data_new (void)
+{
+	return g_object_new (GPROF_PROFILE_DATA_TYPE, NULL);;
+}
+
+void
+gprof_profile_data_free (GProfProfileData *self)
+{
+	g_object_unref (self);
+}
+
+gboolean
+gprof_profile_data_init_profile (GProfProfileData *self, gchar *path,
+								 gchar *alternate_profile_data_path, 
+								 GPtrArray *options)
+{
+	gint stdout_pipe;
+	gint i;
+	FILE *stdout_stream;
+	gchar *program_dir;
+	gchar *profile_data_path;
+	GPtrArray *gprof_args;
+	gboolean is_libtool_target = FALSE;
+	GPid gprof_pid;
+	gint gprof_status;
+	
+	/* Determine target mime type */
+	GFile *file = g_file_new_for_path (path);
+	GFileInfo *fi = g_file_query_info (file,
+			G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+			G_FILE_QUERY_INFO_NONE,
+			NULL,
+			NULL);
+
+	if (fi)
+	{
+		if (strcmp (g_file_info_get_content_type (fi), 
+					"application/x-shellscript") == 0)
+			is_libtool_target = TRUE;
+		
+		g_object_unref (fi);
+	}
+	
+	g_object_unref (file);
+	
+	/* If the user gave us a path to a data file, check the mime type to make
+	 * sure the user gave us an actual profile dump, or else we could hang 
+	 * because gprof doesn't handle this itself, and will keep allocating 
+	 * memory until it sucks the system dry. */
+	if (alternate_profile_data_path)
+	{
+		file = g_file_new_for_path (alternate_profile_data_path);
+		fi = g_file_query_info (file,
+				G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+				G_FILE_QUERY_INFO_NONE,
+				NULL,
+				NULL);
+
+		if (fi == NULL)
+		{
+			g_object_unref (file);
+			return FALSE;
+		}
+
+		if (strcmp (g_file_info_get_content_type (fi),
+					"application/x-profile") != 0)
+		{
+			g_object_unref (fi);
+			g_object_unref (file);
+			return FALSE;
+		}
+		
+		g_object_unref (fi);
+		g_object_unref (file);
+	}
+	
+	
+	
+	/* Run gprof with -b given the path to a program run with profiling */
+	
+	gprof_args = g_ptr_array_sized_new ((options->len - 1) + 7);
+	if (is_libtool_target)
+	{
+		g_ptr_array_add (gprof_args, "libtool");
+		g_ptr_array_add (gprof_args, "--mode=execute");
+	}
+	g_ptr_array_add (gprof_args, "gprof");
+	g_ptr_array_add (gprof_args, "-b");
+	
+	/* Add options */
+	
+	for (i = 0; i < options->len - 1; i++)
+		g_ptr_array_add (gprof_args, g_ptr_array_index (options, i));
+	
+	g_ptr_array_add (gprof_args, path);
+	
+	/* Also give the path of the gmon.out file */
+	
+	profile_data_path = NULL;
+	program_dir = NULL;
+	
+	if (alternate_profile_data_path)
+		g_ptr_array_add (gprof_args, alternate_profile_data_path);
+	else
+	{
+		program_dir = g_path_get_dirname (path);
+		profile_data_path = g_build_filename (program_dir, "gmon.out", NULL);
+		g_ptr_array_add (gprof_args, profile_data_path);
+	}
+	g_ptr_array_add (gprof_args, NULL);
+	
+	g_spawn_async_with_pipes (NULL, (gchar **) gprof_args->pdata, 
+							  NULL, 
+							  G_SPAWN_SEARCH_PATH | 
+							  G_SPAWN_DO_NOT_REAP_CHILD |
+							  G_SPAWN_STDERR_TO_DEV_NULL, 
+							  NULL, NULL, &gprof_pid, NULL, &stdout_pipe, 
+							  NULL, NULL);
+	
+	g_ptr_array_free (gprof_args, TRUE);
+	g_free (profile_data_path);
+	g_free (program_dir);
+
+	stdout_stream = fdopen (stdout_pipe, "r");
+
+	if (self->priv->flat_profile)
+		gprof_flat_profile_free (self->priv->flat_profile);
+
+	self->priv->flat_profile = gprof_flat_profile_new (stdout_stream);
+
+	if (self->priv->call_graph)
+		gprof_call_graph_free (self->priv->call_graph);
+
+	self->priv->call_graph = gprof_call_graph_new (stdout_stream, 
+												   self->priv->flat_profile);	
+	
+	fclose (stdout_stream);
+	close (stdout_pipe);
+	
+	waitpid (gprof_pid, &gprof_status, 0);
+	g_spawn_close_pid (gprof_pid);
+
+	if (WIFEXITED (gprof_status) && WEXITSTATUS (gprof_status) != 0)
+		return FALSE;
+	
+	return TRUE;
+}
+
+GProfFlatProfile *
+gprof_profile_data_get_flat_profile (GProfProfileData *self)
+{
+	return self->priv->flat_profile;
+}
+
+GProfCallGraph *
+gprof_profile_data_get_call_graph (GProfProfileData *self)
+{
+	return self->priv->call_graph;
+}
+
+gboolean
+gprof_profile_data_has_data (GProfProfileData *self)
+{
+	return (self->priv->flat_profile != NULL) &&
+		   (self->priv->call_graph != NULL);
+}

Added: trunk/plugins/profiler/gprof-profile-data.h
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-profile-data.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,71 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-profile-data.h
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-profile-data.h 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _GPROF_PROFILE_DATA_H
+#define _GPROF_PROFILE_DATA_H
+
+#include <glib-object.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include "gprof-flat-profile.h"
+#include "gprof-call-graph.h"
+
+G_BEGIN_DECLS
+
+typedef struct _GProfProfileData         GProfProfileData;
+typedef struct _GProfProfileDataClass    GProfProfileDataClass;
+typedef struct _GProfProfileDataPriv     GProfProfileDataPriv;
+
+#define GPROF_PROFILE_DATA_TYPE            (gprof_profile_data_get_type ())
+#define GPROF_PROFILE_DATA(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GPROF_PROFILE_DATA_TYPE, GProfProfileData))
+#define GPROF_PROFILE_DATA_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GPROF_PROFILE_DATA_TYPE, GProfProfileDataClass))
+#define IS_GPROF_PROFILE_DATA(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GPROF_PROFILE_DATA_TYPE))
+#define IS_GPROF_PROFILE_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GPROF_PROFILE_DATA_TYPE))
+
+struct  _GProfProfileData
+{
+	GObject parent;
+	GProfProfileDataPriv *priv;
+};
+
+struct _GProfProfileDataClass
+{
+	GObjectClass parent_class;
+};
+
+GType gprof_profile_data_get_type (void);
+GProfProfileData *gprof_profile_data_new (void);
+void gprof_profile_data_free (GProfProfileData *self);
+
+gboolean gprof_profile_data_init_profile (GProfProfileData *self, gchar *path,
+										  gchar *alternate_profile_data_path,
+									  	  GPtrArray *options);
+
+GProfFlatProfile *gprof_profile_data_get_flat_profile (GProfProfileData *self);
+GProfCallGraph *gprof_profile_data_get_call_graph (GProfProfileData *self);
+gboolean gprof_profile_data_has_data (GProfProfileData *self);
+
+G_END_DECLS
+
+#endif

Added: trunk/plugins/profiler/gprof-view-manager-iface.h
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-view-manager-iface.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,41 @@
+/* Header for IGprofViewManager interface */
+
+#ifndef _IGPPROF_VIEW_MANAGER_H
+#define _IGPPROF_VIEW_MANAGER_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include "gprof-view.h"
+
+G_BEGIN_DECLS
+
+#define IGPROF_VIEW_MANAGER_IFACE_TYPE             (igprof_view_manager_iface_get_type ())
+#define IGPROF_VIEW_MANAGER_IFACE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), IGPROF_VIEW_MANAGER_IFACE_TYPE, IGProfViewManagerIface))
+#define IGPROF_VIEW_MANAGER_IFACE_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST ((vtable), IGPROF_VIEW_MANAGER_IFACE_TYPE, IGProfViewManagerIfaceClass))
+#define IGPROF_S_IVIEW_MANAGER_IFACE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IGPROF_VIEW_MANAGER_IFACE_TYPE))
+#define IS_IGPROF_VIEW_MANAGER_IFACE_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), IGPROF_VIEW_MANAGER_IFACE_TYPE))
+#define IGPROF_VIEW_MANAGER_IFACE_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_INTERFACE ((inst), IVIEW_MANAGER_IFACE_TYPE, IGProfViewManagerIfaceClass))
+
+
+typedef struct _IGProfViewManagerIface IGprofViewManagerIface;
+typedef struct _IGProfViewManagerIfaceClass IViewManagerIfaceClass;
+
+struct _IViewManagerIfaceClass
+{
+	GTypeInterface g_iface;
+	
+	void (*merge) (IGprofViewManagerIface *obj, GProfView *view);
+	void (*update) (IGprofViewManagerIface *obj, GProfView *view);
+};
+
+GType igprof_view_manager_iface_get_type (void);
+
+void igprof_view_manager_iface_merge (IGprofViewManagerIface *obj, 
+									  GProfView *view);
+void igprof_view_manager_iface_update (IGprofViewManagerIface *obj, 
+									   GProfView *view);
+
+G_END_DECLS
+
+#endif

Added: trunk/plugins/profiler/gprof-view-manager.c
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-view-manager.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,156 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-view-manager.c
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-view-manager.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include "gprof-view-manager.h"
+
+struct _GProfViewManagerPriv
+{
+	GtkWidget *notebook;
+	GList *views;
+};
+
+static void 
+gprof_view_manager_init (GProfViewManager *self)
+{
+	self->priv = g_new0 (GProfViewManagerPriv, 1);
+	
+	self->priv->notebook = gtk_notebook_new ();
+	self->priv->views = NULL;
+}
+
+static void 
+gprof_view_manager_finalize (GObject *obj)
+{
+	GProfViewManager *self;
+	GList *current;
+	
+	self = (GProfViewManager *) obj;
+	current = self->priv->views;
+	
+	while (current)
+	{
+		g_object_unref (current->data);
+		current = g_list_next (current);
+	}
+	
+	g_list_free (self->priv->views);
+	
+	/* Don't destroy notebook widget--will be destroyed with container */
+	
+	g_free (self->priv);
+}
+
+static void
+gprof_view_manager_class_init (GProfViewManagerClass *klass)
+{
+	GObjectClass *object_class;
+	
+	object_class = (GObjectClass *) klass;
+	object_class->finalize = gprof_view_manager_finalize;
+}
+
+GType 
+gprof_view_manager_get_type (void)
+{
+	static GType obj_type = 0;
+	
+	if (!obj_type)
+	{
+		static const GTypeInfo obj_info = 
+		{
+			sizeof (GProfViewManagerClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) gprof_view_manager_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,           /* class_data */
+			sizeof (GProfViewManager),
+			0,              /* n_preallocs */
+			(GInstanceInitFunc) gprof_view_manager_init,
+			NULL            /* value_table */
+		};
+		obj_type = g_type_register_static (G_TYPE_OBJECT,
+		                                   "GProfViewManager", &obj_info, 0);
+	}
+	return obj_type;
+}
+
+GProfViewManager *
+gprof_view_manager_new (void)
+{
+	return g_object_new (GPROF_VIEW_MANAGER_TYPE, NULL);	
+}
+
+void
+gprof_view_manager_free (GProfViewManager *self)
+{
+	g_object_unref (self);
+}
+
+void
+gprof_view_manager_add_view (GProfViewManager *self, GProfView *view,
+							 const gchar *label)
+{
+	GtkWidget *new_tab_label;
+	GtkWidget *new_view_widget;
+	GtkWidget *new_view_parent;
+	
+	self->priv->views = g_list_append (self->priv->views, view);
+	
+	new_tab_label = gtk_label_new (label);
+	new_view_widget = gprof_view_get_widget (view);
+	new_view_parent = gtk_widget_get_parent (new_view_widget);
+	g_object_ref (new_view_widget);
+	
+	if (new_view_parent)
+		gtk_container_remove (GTK_CONTAINER (new_view_parent), new_view_widget);
+	
+	gtk_notebook_append_page (GTK_NOTEBOOK (self->priv->notebook), new_view_widget, 
+							  new_tab_label);
+	
+	g_object_unref (new_view_widget); 
+	
+}
+
+void
+gprof_view_manager_refresh_views (GProfViewManager *self)
+{
+	GList *current;
+	GProfView *view;
+	
+	current = self->priv->views;
+	
+	while (current)
+	{
+		view = GPROF_VIEW (current->data);
+		gprof_view_refresh (view);
+	
+		current = g_list_next (current);
+	}
+}
+
+GtkWidget *
+gprof_view_manager_get_notebook (GProfViewManager *self)
+{
+	return self->priv->notebook;
+}

Added: trunk/plugins/profiler/gprof-view-manager.h
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-view-manager.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,69 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-view-manager.h
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-view-manager.h 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _GPROF_VIEW_MANAGER_H
+#define _GPROF_VIEW_MANAGER_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+
+#include "gprof-profile-data.h"
+#include "gprof-view.h"
+
+G_BEGIN_DECLS
+
+typedef struct _GProfViewManager         GProfViewManager;
+typedef struct _GProfViewManagerClass    GProfViewManagerClass;
+typedef struct _GProfViewManagerPriv     GProfViewManagerPriv;
+
+#define GPROF_VIEW_MANAGER_TYPE            (gprof_view_manager_get_type ())
+#define GPROF_VIEW_MANAGER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GPROF_VIEW_MANAGER_TYPE, GProfViewManager))
+#define GPROF_VIEW_MANAGER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GPROF_VIEW_MANAGER_TYPE, GProfViewManagerClass))
+#define IS_GPROF_VIEW_MANAGER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GPROF_VIEW_MANAGER_TYPE))
+#define IS_GPROF_VIEW_CLASS_MANAGER(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GPROF_VIEW_MANAGER_TYPE))
+
+struct  _GProfViewManager
+{
+	GObject parent;
+	GProfViewManagerPriv *priv;
+};
+
+struct _GProfViewManagerClass
+{
+	GObjectClass parent_class;
+};
+
+GType gprof_view_manager_get_type (void);
+
+GProfViewManager *gprof_view_manager_new (void);
+void gprof_view_manager_free (GProfViewManager *self);
+
+void gprof_view_manager_add_view (GProfViewManager *self, GProfView *view, 
+								  const gchar *label);
+void gprof_view_manager_refresh_views (GProfViewManager *self);
+GtkWidget *gprof_view_manager_get_notebook (GProfViewManager *self);
+
+G_END_DECLS
+
+#endif

Added: trunk/plugins/profiler/gprof-view.c
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-view.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,184 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-view.c
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-view.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include "gprof-view.h"
+
+struct _GProfViewPriv
+{
+	GProfProfileData *profile_data;
+	IAnjutaSymbolManager *symbol_manager;
+	IAnjutaDocumentManager *document_manager;
+};
+
+static void
+gprof_view_init (GProfView *self)
+{
+	self->priv = g_new0 (GProfViewPriv, 1);
+}
+
+static void
+gprof_view_finalize (GObject *obj)
+{
+	GProfView *self;
+	
+	self = (GProfView *) obj;
+	
+	gprof_profile_data_free (self->priv->profile_data);
+	g_free(self->priv);
+}
+
+static void 
+gprof_view_class_init (GProfViewClass *klass)
+{
+	GObjectClass *object_class;
+	
+	object_class = (GObjectClass *) klass;
+	object_class->finalize = gprof_view_finalize;
+	
+	klass->refresh = NULL;
+	klass->get_widget = NULL;
+}
+
+GType 
+gprof_view_get_type (void)
+{
+	static GType obj_type = 0;
+	
+	if (!obj_type)
+	{
+		static const GTypeInfo obj_info = 
+		{
+			sizeof (GProfViewClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) gprof_view_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,           /* class_data */
+			sizeof (GProfView),
+			0,              /* n_preallocs */
+			(GInstanceInitFunc) gprof_view_init,
+			NULL            /* value_table */
+		};
+		obj_type = g_type_register_static (G_TYPE_OBJECT,
+		                                   "GProfView", &obj_info, 0);
+	}
+	return obj_type;
+}
+
+void
+gprof_view_set_data (GProfView *self, GProfProfileData *profile_data)
+{
+	self->priv->profile_data = g_object_ref (profile_data);
+}
+
+GProfProfileData *
+gprof_view_get_data (GProfView *self)
+{
+	return self->priv->profile_data;
+}
+
+void
+gprof_view_set_symbol_manager (GProfView *self, 
+							   IAnjutaSymbolManager *symbol_manager)
+{
+	self->priv->symbol_manager = symbol_manager;
+}
+
+void
+gprof_view_set_document_manager (GProfView *self, 
+							   	 IAnjutaDocumentManager *document_manager)
+{
+	self->priv->document_manager = document_manager;
+}
+
+void 
+gprof_view_show_symbol_in_editor (GProfView *self,
+								  const gchar *symbol_name)
+{
+	IAnjutaIterable *symbol_iter;
+	IAnjutaSymbol *symbol;
+	guint line;
+	
+	if (self->priv->symbol_manager &&
+		self->priv->document_manager)
+	{									   	
+		symbol_iter = ianjuta_symbol_manager_search (self->priv->symbol_manager,
+													 IANJUTA_SYMBOL_TYPE_FUNCTION,
+													 TRUE,
+													 IANJUTA_SYMBOL_FIELD_SIMPLE,
+													 symbol_name,
+													 FALSE,
+													 TRUE,
+													 FALSE,
+													 -1,
+													 -1,
+													 NULL);
+		
+		if (symbol_iter &&
+			ianjuta_iterable_get_length (symbol_iter, NULL) > 0)
+		{
+			GFile* file;
+			symbol = IANJUTA_SYMBOL (symbol_iter);
+			file = ianjuta_symbol_get_file (symbol, NULL);
+			line = ianjuta_symbol_get_line (symbol, NULL);
+			
+			ianjuta_document_manager_goto_file_line (self->priv->document_manager, 
+													file, line, NULL);
+			
+			g_object_unref (symbol_iter);
+			g_object_unref (file);
+		}
+	}
+}
+
+void 
+gprof_view_refresh (GProfView *self)
+{
+	/* Don't refresh views if we don't have any data to work with */
+	if (gprof_profile_data_has_data (self->priv->profile_data))
+		GPROF_VIEW_GET_CLASS (self)->refresh (self);
+}
+
+GtkWidget *
+gprof_view_get_widget (GProfView *self)
+{
+	return GPROF_VIEW_GET_CLASS (self)->get_widget (self);
+}
+
+void 
+gprof_view_format_float (GtkTreeViewColumn *col,  GtkCellRenderer *renderer,
+						 GtkTreeModel *model, GtkTreeIter *iter,
+					     gpointer column_number)
+{
+	gfloat number;
+	gchar *formatted_number;
+	
+	gtk_tree_model_get (model, iter, GPOINTER_TO_INT (column_number), &number,
+						-1);
+	
+	formatted_number = g_strdup_printf ("%0.2f", number);
+	g_object_set (renderer, "text", formatted_number, NULL);
+	
+	g_free (formatted_number);
+}
+

Added: trunk/plugins/profiler/gprof-view.h
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/gprof-view.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,86 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gprof-view.h
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * gprof-view.h 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _GPROF_VIEW_H
+#define _GPROF_VIEW_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <libanjuta/interfaces/ianjuta-symbol-manager.h>
+#include <libanjuta/interfaces/ianjuta-document-manager.h>
+#include "gprof-profile-data.h"
+
+G_BEGIN_DECLS
+
+typedef struct _GProfView         GProfView;
+typedef struct _GProfViewClass    GProfViewClass;
+typedef struct _GProfViewPriv     GProfViewPriv;
+
+#define GPROF_VIEW_TYPE            (gprof_view_get_type ())
+#define GPROF_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GPROF_VIEW_TYPE, GProfView))
+#define GPROF_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GPROF_VIEW_TYPE, GProfViewClass))
+#define GPROF_VIEW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GPROF_VIEW_TYPE, GProfViewClass))
+#define IS_GPROF_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GPROF_VIEW_TYPE))
+#define IS_GPROF_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GPROF_VIEW_TYPE))
+
+struct  _GProfView
+{
+	GObject parent;
+	GProfViewPriv *priv;
+};
+
+struct _GProfViewClass
+{
+	GObjectClass parent_class;
+	
+	/* virtual methods */
+	
+	void (*refresh) (GProfView *self);
+	GtkWidget * (*get_widget) (GProfView *self);
+};
+
+GType gprof_view_get_type (void);
+
+void gprof_view_set_data (GProfView *self, GProfProfileData *profile_data);
+void gprof_view_set_symbol_manager (GProfView *self, 
+									IAnjutaSymbolManager *symbol_manager);
+void gprof_view_set_document_manager (GProfView *self, 
+									  IAnjutaDocumentManager *document_manager);
+void gprof_view_show_symbol_in_editor (GProfView *self, 
+									   const gchar *symbol_name);
+GProfProfileData *gprof_view_get_data (GProfView *self);
+
+void gprof_view_refresh (GProfView *self);
+GtkWidget *gprof_view_get_widget (GProfView *self);
+
+/* Static methods */
+void gprof_view_format_float (GtkTreeViewColumn *col, 
+							  GtkCellRenderer *renderer,
+							  GtkTreeModel *model,
+							  GtkTreeIter *iter,
+							  gpointer column_number);
+
+G_END_DECLS
+
+#endif

Added: trunk/plugins/profiler/main.c
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/main.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,92 @@
+/*
+ * Initial main.c file generated by Glade. Edit as required.
+ * Glade will not overwrite this file.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gnome.h>
+#include <glade/glade-xml.h>
+#include <stdlib.h>
+
+#include "gprof-profile-data.h"
+#include "gprof-view-manager.h"
+#include "gprof-flat-profile-view.h"
+#include "gprof-call-graph-view.h"
+#include "gprof-function-call-tree-view.h"
+#include "gprof-function-call-chart-view.h"
+
+
+
+static void 
+on_main_window_delete_event (GtkWidget *widget, GdkEvent * event,
+							 gpointer *user_data)
+{
+	gtk_widget_destroy (widget);
+	gtk_main_quit ();
+}
+
+static GtkWidget *
+create_main_window (GladeXML *glade)
+{
+	GtkWidget *window;
+	
+	window = glade_xml_get_widget (glade, "main_window");
+	
+	g_signal_connect (window, "delete-event", 
+					  G_CALLBACK(on_main_window_delete_event), NULL);
+	
+	return window;
+}
+
+int
+main (int argc, char *argv[])
+{
+    GladeXML *main_ui;
+	GtkWidget *main_window;
+	GProfViewManager *manager;
+	GProfProfileData *data;
+
+  gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE,
+                      argc, argv,
+                      GNOME_PARAM_APP_DATADIR, PACKAGE_DATA_DIR,
+                      NULL);
+	
+	main_ui = glade_xml_new (PACKAGE_DATA_DIR
+							 "/profileparser-gui/profileparser-gui.glade",  
+							 NULL, NULL);
+	main_window = create_main_window (main_ui);
+	
+	manager = gprof_view_manager_new ();
+	gtk_widget_show (main_window);
+	gtk_widget_show (gprof_view_manager_get_notebook (manager));
+	
+	data = gprof_profile_data_new ();
+	gprof_view_manager_add_view (manager, 
+								GPROF_VIEW (gprof_flat_profile_view_new (data)), 
+								"Flat Profile");
+	gprof_view_manager_add_view (manager, 
+								GPROF_VIEW (gprof_call_graph_view_new (data)), 
+								"Call Graph");
+	gprof_view_manager_add_view (manager, 
+								GPROF_VIEW (gprof_function_call_tree_view_new (data)), 
+								"Function Call Tree");
+	gprof_view_manager_add_view (manager,
+								 GPROF_VIEW (gprof_function_call_chart_view_new (data)),
+								 "Function Call Chart");
+	g_object_unref (main_ui);
+	
+	gtk_container_add (GTK_CONTAINER (main_window), 
+					   gprof_view_manager_get_notebook (manager)); 
+	
+	gprof_profile_data_init_profile (data, argv[1]);
+	gprof_view_manager_refresh_views (manager);
+
+  gtk_main ();
+  
+  gprof_view_manager_free (manager);
+  gprof_profile_data_free (data);
+  return 0;
+}

Added: trunk/plugins/profiler/plugin.c
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/plugin.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,1008 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * plugin.c
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * plugin.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+
+#include "plugin.h"
+
+
+#define UI_FILE PACKAGE_DATA_DIR"/ui/profiler.ui"
+#define GLADE_FILE PACKAGE_DATA_DIR"/glade/profiler.glade"
+#define ICON_FILE PACKAGE_PIXMAPS_DIR"/anjuta-profiler-plugin-48.png"
+
+static gpointer parent_class;
+
+static void
+add_options_strings (GPtrArray *options, const gchar *prefix, const gchar *args)
+{
+	gchar **split_args;  /* List of arguements split by lines */
+	gchar **current_string;
+	gchar *full_arg;  /* Argument with prefix */
+	
+	if (strlen (args) > 0)
+	{
+		split_args = g_strsplit (args, "\n", -1);
+		
+		for (current_string = split_args; 
+			 *current_string; 
+			 current_string++)
+		{
+			
+			if (strlen (*current_string) > 0)
+			{
+				full_arg = g_strconcat (prefix, *current_string, NULL);
+				g_ptr_array_add (options, full_arg);
+			}
+		}
+		
+		g_strfreev (split_args);
+	}
+}
+
+static GPtrArray *
+setup_options (Profiler *profiler)
+{
+	GPtrArray *options;
+	gchar *symbols;
+	
+	options = g_ptr_array_new ();
+	
+	/* First handle the easy ones: -a, -c, and -z */
+	if (gprof_options_get_int (profiler->options, "no_show_static"))
+	{
+		g_ptr_array_add (options, g_strdup ("-a"));
+	}
+	
+	if (gprof_options_get_int (profiler->options, "show_possible_called"))
+	{
+		g_ptr_array_add (options, g_strdup ("-c"));
+	}
+	
+	if (gprof_options_get_int (profiler->options, "show_uncalled"))
+	{
+		g_ptr_array_add (options, g_strdup ("-z"));
+	}
+	
+	/* If the user wants to modify the call graph, put in -p so we have a flat
+	 * profile. */
+	if (!gprof_options_get_int (profiler->options, "show_all_symbols"))
+	{
+		g_ptr_array_add (options, g_strdup ("-p"));
+		
+		symbols = gprof_options_get_string (profiler->options, "symbols");
+	
+		if (gprof_options_get_int (profiler->options, "include_symbols"))
+		{
+			add_options_strings (options, "-q", symbols);
+		}
+		
+		if (gprof_options_get_int (profiler->options, "exclude_symbols"))
+		{
+			add_options_strings (options, "-Q", symbols);
+		}
+		
+		g_free (symbols);
+	}
+	
+	/* Time propagation options */
+	if (!gprof_options_get_int (profiler->options, "propagate_all_symbols"))
+	{
+	
+		symbols = gprof_options_get_string (profiler->options,
+										  	 "propagation_symbols");
+		
+		if (gprof_options_get_int (profiler->options,
+								   "propagate_include_symbols"))
+		{
+			add_options_strings (options, "-n", symbols);
+		}
+		
+		if (gprof_options_get_int (profiler->options,
+								   "propagate_exclude_symbols"))
+		{
+			add_options_strings (options, "-N", symbols);
+		}
+		
+		g_free (symbols);
+	}
+	
+	/* NULL terminate the array for compatibility with g_strfreev */
+	
+	g_ptr_array_add (options, NULL);
+	
+	/* Other options not directly passed to gprof */
+	
+	/* If there is an existing profile data monitor and automatic refresh
+	 * is disabled, cancel the monitor */
+	 
+	 if (profiler->profile_data_monitor)
+	 {
+	 	if (!gprof_options_get_int (profiler->options, "automatic_refresh"))
+	 	{
+			g_file_monitor_cancel (profiler->profile_data_monitor);
+			g_object_unref (profiler->profile_data_monitor);
+	 		profiler->profile_data_monitor = NULL;
+	 	}
+	 }
+	
+	return options;	
+}
+
+static gboolean 
+profiler_get_data (Profiler *profiler)
+{
+	GPtrArray *options;
+	gchar **option_strings;
+	gchar *profiling_data_path;
+	gchar *profiling_data_path_from_options;
+	gboolean ret = FALSE;
+	
+	if (profiler->profile_target_path)
+	{
+
+		options = setup_options (profiler);
+		
+		profiling_data_path_from_options = gprof_options_get_string (profiler->options,
+																	 "profile_data_file");
+		
+		if (strlen (profiling_data_path_from_options) > 0)
+			profiling_data_path = profiling_data_path_from_options;
+		else
+			profiling_data_path = NULL;
+		
+		if (!gprof_profile_data_init_profile (profiler->profile_data, 
+										 	  profiler->profile_target_path,
+											  profiling_data_path,
+										 	  options))
+		{
+			anjuta_util_dialog_error (GTK_WINDOW (ANJUTA_PLUGIN (profiler)->shell),
+									  _("Could not get profiling data."
+										"\n\n"
+										"Please check the path to "
+										"this target's profiling data file."));
+		}
+											 
+		option_strings = (gchar **) g_ptr_array_free (options, FALSE);
+		g_free (profiling_data_path_from_options);
+		g_strfreev (option_strings);
+		
+		ret = TRUE;
+	}
+	
+	return ret;
+}
+
+static void
+on_profile_data_changed (GFileMonitor *monitor,
+		GFile *file,
+		GFile *other_file,
+		GFileMonitorEvent event_type,
+		gpointer user_data)
+{
+	DEBUG_PRINT ("%s", "Data changed called");
+	Profiler *profiler;
+
+	profiler = PROFILER (user_data);
+
+	switch (event_type)
+	{
+		case G_FILE_MONITOR_EVENT_CHANGED:
+			if (profiler_get_data (profiler))
+				gprof_view_manager_refresh_views (profiler->view_manager);
+			break;
+		case G_FILE_MONITOR_EVENT_DELETED:
+			g_file_monitor_cancel (monitor);
+			g_object_unref (profiler->profile_data_monitor);
+			profiler->profile_data_monitor = NULL;
+			break;
+		default:
+			break;
+	}
+}
+
+static void
+profiler_set_target (Profiler *profiler, const gchar *profile_target_uri)
+{
+	gchar *profile_target_path;
+	gchar *profile_target_dir;
+	gchar *profile_data_path;
+	gchar *profile_data_path_from_options;
+	gchar *profile_data_uri;
+	GFile *file;
+	
+	if (profiler->profile_target_path)
+	{
+		g_free (profiler->profile_target_path);
+		profiler->profile_target_path = NULL;
+	}
+	
+	if (profile_target_uri)
+	{
+		profile_target_path = anjuta_util_get_local_path_from_uri (profile_target_uri);
+		
+		profile_data_path_from_options = gprof_options_get_string (profiler->options,
+																   "profile_data_file");
+		
+		if (strlen (profile_data_path_from_options) > 0)
+		{
+			profile_data_path = g_strdup (profile_data_path_from_options);
+			profile_target_dir = NULL;
+		}
+		else
+		{
+			profile_target_dir = g_path_get_dirname (profile_target_path);
+			profile_data_path = g_build_filename (profile_target_dir, "gmon.out", 
+										  		  NULL);
+		}
+		
+		g_free (profile_data_path_from_options);
+		
+		file = g_file_new_for_path (profile_data_path);
+		profile_data_uri = g_file_get_uri (file);
+		g_object_unref (file);
+		
+		if (g_file_test (profile_data_path, G_FILE_TEST_EXISTS))
+		{
+			profiler->profile_target_path = profile_target_path;
+		
+		
+			/* Set up a file change monitor for automatic refresh if enabled */
+			if (gprof_options_get_int (profiler->options, 
+									   "automatic_refresh"))
+			{
+				/* Cancel any existing monitor */
+				if (profiler->profile_data_monitor)
+					g_file_monitor_cancel (profiler->profile_data_monitor);
+				file = g_file_new_for_uri (profile_data_uri);
+				profiler->profile_data_monitor = 
+					g_file_monitor_file (file, G_FILE_MONITOR_NONE, NULL, NULL);
+				g_signal_connect (G_OBJECT (profiler->profile_data_monitor),
+						"changed", G_CALLBACK (on_profile_data_changed),
+						profiler);
+			}
+			
+			/* Show user the profiler views if they aren't visible so they
+			 * know what happened */
+			anjuta_shell_present_widget (ANJUTA_PLUGIN (profiler)->shell,
+										 gprof_view_manager_get_notebook (profiler->view_manager),
+										 NULL);
+		}
+		else
+		{
+			anjuta_util_dialog_error (GTK_WINDOW (ANJUTA_PLUGIN (profiler)->shell),
+									   _("This target does not have any "
+									     "profiling data.\n\n"
+									     "Please ensure that the target is "
+									     "complied with profiling support "
+										 "and that it is run at least "
+										 "once."));
+		}
+		
+		g_free (profile_target_dir);
+		g_free (profile_data_path);
+		g_free (profile_data_uri);
+	}
+}
+
+static GProfOptions *
+register_options ()
+{
+	GProfOptions *options;
+	
+	options = gprof_options_new ();
+	
+	gprof_options_register_key (options, "automatic_refresh", "0",
+								"automatic_refresh_check", 
+								OPTION_TYPE_TOGGLE);
+	
+	gprof_options_register_key (options, "no_show_static", "0",
+								"no_show_static_check", 
+								OPTION_TYPE_TOGGLE);
+											  
+	gprof_options_register_key (options, "show_possible_called", "0",
+								"show_possible_called_check",
+								OPTION_TYPE_TOGGLE);
+																		  
+	gprof_options_register_key (options, "show_uncalled", "0",
+								"show_uncalled_check", 
+								OPTION_TYPE_TOGGLE);
+	
+	gprof_options_register_key (options, "show_all_symbols", "1",
+								"show_all_symbols_radio",
+								OPTION_TYPE_TOGGLE);
+	
+	gprof_options_register_key (options, "include_symbols", "0",
+								"include_symbols_radio",
+								OPTION_TYPE_TOGGLE);
+	
+	gprof_options_register_key (options, "exclude_symbols", "0",
+								"exclude_symbols_radio",
+								OPTION_TYPE_TOGGLE);
+	
+	gprof_options_register_key (options, "symbols", "", "symbols_text_view",
+								OPTION_TYPE_TEXT_ENTRY);
+											  
+	gprof_options_register_key (options, "propagate_all_symbols", "1",
+								"propagate_all_symbols_radio",
+								OPTION_TYPE_TOGGLE);
+	
+	gprof_options_register_key (options, "propagate_include_symbols", "0",
+								"propagate_include_symbols_radio",
+								OPTION_TYPE_TOGGLE);
+											  
+	gprof_options_register_key (options, "propagate_exclude_symbols", "0",
+								"propagate_exclude_symbols_radio", 
+								OPTION_TYPE_TOGGLE);
+											  
+	gprof_options_register_key (options, "propagation_symbols", "",
+								"propagation_text_view",
+								OPTION_TYPE_TEXT_ENTRY);
+	
+	gprof_options_register_key (options, "profile_data_file", "",
+								"profile_data_file_entry",
+								OPTION_TYPE_ENTRY);
+	
+	return options;
+}
+
+static void
+on_profile_data_browse_button_clicked (GtkButton *button, GladeXML *gxml)
+{
+	GtkWidget *select_file_dialog;
+	GtkWidget *profile_data_file_entry;
+	GtkWidget *profiling_options_dialog;
+	gchar *selected_file;
+	
+	profile_data_file_entry = glade_xml_get_widget (gxml, "profile_data_file_entry");
+	profiling_options_dialog = glade_xml_get_widget (gxml,
+													 "profiling_options_dialog");
+	select_file_dialog = gtk_file_chooser_dialog_new ("Select Data File",
+													  GTK_WINDOW (profiling_options_dialog),
+													  GTK_FILE_CHOOSER_ACTION_OPEN,
+													  GTK_STOCK_CANCEL, 
+													  GTK_RESPONSE_CANCEL,
+													  GTK_STOCK_OPEN,
+													  GTK_RESPONSE_ACCEPT,
+													  NULL);
+	
+	if (gtk_dialog_run (GTK_DIALOG (select_file_dialog)) == GTK_RESPONSE_ACCEPT)
+	{
+		selected_file = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (select_file_dialog));
+		gtk_entry_set_text (GTK_ENTRY (profile_data_file_entry), selected_file);
+		g_free (selected_file);
+	}
+	
+	gtk_widget_destroy (select_file_dialog);
+}
+
+static void
+on_profiling_options_button_clicked (GtkButton *button, gpointer *user_data)
+{													 
+	Profiler *profiler;
+	GladeXML *gxml;
+	GtkWidget *profiling_options_dialog;
+	GtkWidget *profile_data_browse_button;
+
+	profiler = PROFILER (user_data);
+	gxml = glade_xml_new (GLADE_FILE, "profiling_options_dialog",
+						  NULL);
+	profiling_options_dialog = glade_xml_get_widget (gxml, "profiling_options_dialog");
+	profile_data_browse_button = glade_xml_get_widget (gxml,
+													   "profile_data_browse_button");
+	
+	g_signal_connect (profile_data_browse_button, "clicked",
+					  G_CALLBACK (on_profile_data_browse_button_clicked),
+					  gxml);
+	
+	g_signal_connect (profiling_options_dialog, "response", G_CALLBACK (gtk_widget_hide),
+					  profiling_options_dialog);
+	
+	gprof_options_create_window (profiler->options, gxml);
+	
+	gtk_window_set_transient_for (GTK_WINDOW (profiling_options_dialog),
+								  GTK_WINDOW (ANJUTA_PLUGIN(profiler)->shell));
+	
+	gtk_dialog_run (GTK_DIALOG (profiling_options_dialog));
+	
+	g_object_unref (gxml);
+}
+
+static void
+on_select_other_target_button_clicked (GtkButton *button, 
+									   GtkTreeView *targets_list_view)
+{
+	GtkTreeModel *model;
+	GtkWidget *target_chooser_dialog;
+	GtkTreeIter iter;
+	gchar *selected_target_path;
+	gchar *selected_target_uri;
+	GtkTreeSelection *selection;
+	GtkTreePath *new_target_path;
+	GFile *file;
+	
+	model = gtk_tree_view_get_model (targets_list_view);
+	target_chooser_dialog = gtk_file_chooser_dialog_new ("Select Target",
+														 NULL,
+														 GTK_FILE_CHOOSER_ACTION_OPEN,
+														 GTK_STOCK_CANCEL, 
+														 GTK_RESPONSE_CANCEL,
+														 GTK_STOCK_OPEN,
+														 GTK_RESPONSE_ACCEPT,
+														 NULL);
+	
+	if (gtk_dialog_run (GTK_DIALOG (target_chooser_dialog)) == GTK_RESPONSE_ACCEPT)
+	{
+		selected_target_path = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (target_chooser_dialog));
+		file = g_file_new_for_path (selected_target_path);
+		selected_target_uri = g_file_get_uri (file);
+		g_object_unref (file);
+
+		selection = gtk_tree_view_get_selection (targets_list_view);
+		
+		gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+		gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, 
+							selected_target_path, 1,
+							selected_target_uri, -1);
+		
+		gtk_tree_selection_select_iter (selection, &iter);
+		new_target_path = gtk_tree_model_get_path (model, &iter);
+		gtk_tree_view_scroll_to_cell (targets_list_view, new_target_path, NULL,
+									  TRUE, 0.5, 0.0);
+		
+		g_free (selected_target_path);
+		g_free (selected_target_uri);
+		gtk_tree_path_free (new_target_path);
+	}
+	
+	gtk_widget_destroy (target_chooser_dialog);
+}
+
+static gboolean
+on_target_selected (GtkTreeSelection *selection, GtkTreeModel *model, 
+					GtkTreePath *path, gboolean path_currently_selected,
+					Profiler *profiler)
+{
+	GtkTreeIter list_iter;
+	gchar *target_uri;
+	
+	gtk_tree_model_get_iter (model, &list_iter, path);
+	gtk_tree_model_get (model, &list_iter, 1, &target_uri, -1);
+	
+	if (target_uri)
+	{
+		gprof_options_set_target (profiler->options, target_uri);
+		g_free (target_uri);
+	}
+	
+	return TRUE;
+}
+
+static void
+on_profiler_select_target (GtkAction *action, Profiler *profiler)
+{
+	GladeXML *gxml;
+	GtkWidget *select_target_dialog;
+	GtkWidget *profiling_options_button;
+	GtkWidget *select_other_target_button;
+	GtkWidget *targets_list_view;
+	GtkTreeViewColumn *column;
+	GtkCellRenderer *renderer;
+	GtkListStore *targets_list_store;
+	gint response;
+	GList *current_target;
+	GtkTreeIter iter;
+	GList *exec_targets;
+	IAnjutaProjectManager *project_manager;
+	GtkTreeSelection *selection;
+	GtkTreeModel *model;
+	gchar *target = NULL;
+	gchar *relative_path;
+	guint project_root_uri_length;
+	
+	gxml = glade_xml_new (GLADE_FILE, "select_target_dialog", NULL);
+	select_target_dialog = glade_xml_get_widget (gxml, 
+												 "select_target_dialog");
+	targets_list_view = glade_xml_get_widget (gxml, 
+											  "targets_list_view");
+	profiling_options_button = glade_xml_get_widget (gxml,
+													 "profiling_options_button");
+	select_other_target_button = glade_xml_get_widget (gxml,
+													   "select_other_target_button");
+														 
+	g_signal_connect (profiling_options_button, "clicked",
+					  G_CALLBACK (on_profiling_options_button_clicked),
+					  profiler);
+	
+	g_signal_connect (select_other_target_button, "clicked",
+					  G_CALLBACK (on_select_other_target_button_clicked),
+					  targets_list_view);
+		
+	gtk_window_set_transient_for (GTK_WINDOW (select_target_dialog),
+								  GTK_WINDOW (ANJUTA_PLUGIN(profiler)->shell));
+	
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (targets_list_view));
+	gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
+	gtk_tree_selection_set_select_function (selection, 
+											(GtkTreeSelectionFunc) on_target_selected,
+											profiler, NULL);
+	targets_list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
+	
+	column = gtk_tree_view_column_new ();
+	gtk_tree_view_column_set_sizing (column,
+									 GTK_TREE_VIEW_COLUMN_AUTOSIZE);
+
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_column_pack_start (column, renderer, FALSE);
+	gtk_tree_view_column_add_attribute (column, renderer, "text",
+												0);
+	gtk_tree_view_append_column (GTK_TREE_VIEW (targets_list_view), column);
+	gtk_tree_view_set_expander_column (GTK_TREE_VIEW (targets_list_view), column);
+	
+	if (profiler->project_root_uri)
+	{
+		project_manager = anjuta_shell_get_interface (ANJUTA_PLUGIN (profiler)->shell,
+													  IAnjutaProjectManager, NULL);
+		
+		exec_targets = ianjuta_project_manager_get_targets (project_manager, 
+							 								IANJUTA_PROJECT_MANAGER_TARGET_EXECUTABLE,
+											 				NULL);
+											 				
+		project_root_uri_length = strlen (profiler->project_root_uri) + 1;
+				
+		if (exec_targets)
+		{
+			/* Populate listview */
+			current_target = exec_targets;
+			
+			while (current_target)
+			{
+				relative_path = (gchar *) current_target->data + project_root_uri_length;
+				
+				gtk_list_store_append (targets_list_store, &iter);
+				gtk_list_store_set (targets_list_store, &iter, 0, relative_path, 1,
+									current_target->data, -1);
+									
+				g_free (current_target->data);
+				current_target = g_list_next (current_target);
+			}
+			g_list_free (exec_targets);
+			
+			gtk_tree_view_set_model (GTK_TREE_VIEW (targets_list_view),
+									 GTK_TREE_MODEL (targets_list_store));
+			g_object_unref (targets_list_store);
+		}
+	}
+	else
+	{
+		gtk_tree_view_set_model (GTK_TREE_VIEW (targets_list_view),
+								 GTK_TREE_MODEL (targets_list_store));
+		g_object_unref (targets_list_store);
+	}
+	
+	/* Run dialog */
+	response = gtk_dialog_run (GTK_DIALOG (select_target_dialog));
+		
+	if (response == GTK_RESPONSE_OK)
+	{		
+		selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (targets_list_view));
+		if (gtk_tree_selection_get_selected (selection, &model, &iter))
+		{
+			gtk_tree_model_get (model, &iter, 1, &target, -1);
+			profiler_set_target (profiler, target);
+				
+			if (profiler_get_data (profiler))
+				gprof_view_manager_refresh_views (profiler->view_manager);
+		}
+		else
+				profiler_set_target (profiler, NULL);
+	}
+		
+	gtk_widget_hide (select_target_dialog);
+	g_object_unref (gxml);
+}
+
+static void
+on_profiler_refresh (GtkAction *action, Profiler *profiler)
+{
+	if (profiler_get_data (profiler))
+		gprof_view_manager_refresh_views (profiler->view_manager);
+}
+
+static void
+on_profiler_delete_data (GtkAction *action, Profiler *profiler)
+{
+	gchar *profile_target_dir;
+	gchar *profile_data_path_from_options;
+	gchar *profile_data_path;
+	
+	if (profiler->profile_target_path)
+	{
+		profile_data_path_from_options = gprof_options_get_string (profiler->options,
+																   "profile_data_file");
+		/* Delete given path if we have one, or just use the default */
+		if (strlen (profile_data_path_from_options) > 0)
+			g_unlink (profile_data_path_from_options);
+		else
+		{
+		
+			profile_target_dir = g_path_get_dirname (profiler->profile_target_path);
+			profile_data_path = g_build_filename (profile_target_dir, 
+											  	  "gmon.out", NULL);
+		
+			g_unlink (profile_data_path);
+			
+			g_free (profile_target_dir);
+			g_free (profile_data_path);
+		}
+		
+		g_free (profile_data_path_from_options);
+	}
+}
+
+static void
+project_root_added (AnjutaPlugin *plugin, const gchar *name,
+					const GValue *value, gpointer user_data)
+{
+	Profiler *profiler;
+	const gchar *root_uri;
+	
+	profiler = PROFILER (plugin);
+	root_uri = g_value_get_string (value);
+	
+	if (root_uri)
+	{
+		g_free (profiler->project_root_uri);
+		profiler->project_root_uri = g_strdup (root_uri);
+	}
+	
+	
+}
+
+static void
+project_root_removed (AnjutaPlugin *plugin, const gchar *name,
+					  gpointer user_data)
+{
+	Profiler *profiler;
+	
+	profiler = PROFILER (plugin);
+	
+	g_free (profiler->project_root_uri);
+	profiler->project_root_uri = NULL;
+}
+
+static void
+on_session_load (AnjutaShell *shell, AnjutaSessionPhase phase,
+				 AnjutaSession *session,
+				 Profiler *plugin)
+{
+	const gchar *session_dir;
+	gchar *settings_file_path;
+	
+	if (phase == ANJUTA_SESSION_PHASE_NORMAL)
+	{
+		session_dir = anjuta_session_get_session_directory (session);
+		settings_file_path = g_build_filename (session_dir, 
+											   "profiler-settings.xml", 
+											   NULL);
+	
+		gprof_options_load (plugin->options, settings_file_path);
+	
+		g_free (settings_file_path);
+	}
+}
+
+static void
+on_session_save (AnjutaShell *shell, AnjutaSessionPhase phase,
+				 AnjutaSession *session,
+				 Profiler *plugin)
+{
+	const gchar *session_dir;
+	gchar *settings_file_path;
+	
+	if (phase == ANJUTA_SESSION_PHASE_NORMAL)
+	{
+		session_dir = anjuta_session_get_session_directory (session);
+		settings_file_path = g_build_filename (session_dir, 
+											   "profiler-settings.xml", 
+											   NULL);
+	
+		gprof_options_save (plugin->options, settings_file_path);
+	
+		g_free (settings_file_path);
+	}
+}
+
+
+static GtkActionEntry actions_file[] = {
+	{
+		"ActionMenuDebug",               		/* Action name */
+		NULL,                           		/* Stock icon, if any */
+		N_("Debug"),                     		/* Display label */
+		NULL,                            		/* short-cut */
+		NULL,                      		 		/* Tooltip */
+		NULL    						 		/* Action callback */
+	},
+	{
+		"ActionMenuProfiler",            		/* Action name */
+		"profiler-icon",                        /* Stock icon, if any */
+		N_("Profiler"),                  		/* Display label */
+		NULL,                            		/* short-cut */
+		NULL,                      		 		/* Tooltip */
+		NULL    						 		/* Action callback */
+	},
+	{
+		"ActionProfilerSelectTarget",    		/* Action name */
+		GTK_STOCK_EXECUTE,                      /* Stock icon, if any */
+		N_("Select Target..."),          		/* Display label */
+		NULL,                            		/* short-cut */
+		NULL,                      		 		/* Tooltip */
+		G_CALLBACK (on_profiler_select_target)  /* Action callback */
+	},
+	{
+		"ActionProfilerRefresh",    			/* Action name */
+		GTK_STOCK_REFRESH,                      /* Stock icon, if any */
+		N_("Refresh"),          				/* Display label */
+		NULL,                            		/* short-cut */
+		NULL,                      		 		/* Tooltip */
+		G_CALLBACK (on_profiler_refresh)  		/* Action callback */
+	},
+	{
+		"ActionProfilerDeleteData",    			/* Action name */
+		GTK_STOCK_DELETE,                       /* Stock icon, if any */
+		N_("Delete Data"),          			/* Display label */
+		NULL,                            		/* short-cut */
+		NULL,                      		 		/* Tooltip */
+		G_CALLBACK (on_profiler_delete_data)  	/* Action callback */
+	}
+};
+
+static void
+register_stock_icons (AnjutaPlugin *plugin)
+{
+	AnjutaUI *ui;
+	GtkIconFactory *icon_factory;
+	GtkIconSet *icon_set;
+	static gboolean registered = FALSE;
+
+	if (registered)
+		return;
+	registered = TRUE;
+
+	/* Register stock icons */
+	ui = anjuta_shell_get_ui (plugin->shell, NULL);
+	icon_factory = anjuta_ui_get_icon_factory (ui);
+	REGISTER_ICON ("anjuta-profiler-plugin-48.png", "profiler-icon");
+}
+
+static gboolean
+profiler_activate (AnjutaPlugin *plugin)
+{
+
+	AnjutaUI *ui;
+	Profiler *profiler;
+	IAnjutaSymbolManager *symbol_manager;
+	IAnjutaDocumentManager *document_manager;
+	
+	DEBUG_PRINT ("%s", "Profiler: Activating Profiler plugin ...");
+	profiler = PROFILER (plugin);
+
+	/* Add all UI actions and merge UI */
+	ui = anjuta_shell_get_ui (plugin->shell, NULL);
+	register_stock_icons (plugin);
+	
+	profiler->action_group = 
+		anjuta_ui_add_action_group_entries (ui, "ActionGroupProfiler",
+											_("Application Performance Profiler"),
+											actions_file,
+											G_N_ELEMENTS (actions_file),
+											GETTEXT_PACKAGE, TRUE,
+											plugin);
+	profiler->uiid = anjuta_ui_merge (ui, UI_FILE);
+	
+	profiler->view_manager = gprof_view_manager_new ();
+	profiler->profile_data = gprof_profile_data_new ();
+	
+	symbol_manager = anjuta_shell_get_interface (plugin->shell, 
+												 IAnjutaSymbolManager,
+												 NULL);
+	
+	document_manager = anjuta_shell_get_interface (plugin->shell, 
+												   IAnjutaDocumentManager,
+												   NULL);
+	
+	gprof_view_manager_add_view (profiler->view_manager,
+								 GPROF_VIEW (gprof_flat_profile_view_new (profiler->profile_data,
+																		  symbol_manager,
+																		  document_manager)),
+								 _("Flat Profile"));
+	gprof_view_manager_add_view (profiler->view_manager,
+								 GPROF_VIEW (gprof_call_graph_view_new (profiler->profile_data,
+																		symbol_manager,
+																		document_manager)),
+								 _("Call Graph"));
+	gprof_view_manager_add_view (profiler->view_manager,
+								 GPROF_VIEW (gprof_function_call_tree_view_new (profiler->profile_data,
+																				symbol_manager,
+																				document_manager)),
+								 _("Function Call Tree"));
+	
+#ifdef HAVE_GRAPHVIZ
+	gprof_view_manager_add_view (profiler->view_manager,
+								 GPROF_VIEW (gprof_function_call_chart_view_new (profiler->profile_data,
+																				 symbol_manager,
+																				 document_manager)),
+								 _("Function Call Chart"));
+#endif
+								 
+	anjuta_shell_add_widget (plugin->shell, 
+							 gprof_view_manager_get_notebook (profiler->view_manager),
+							 "Profiler",
+							 _("Profiler"),
+							 "profiler-icon",
+							 ANJUTA_SHELL_PLACEMENT_CENTER,
+							 NULL);
+							 
+	profiler->project_watch_id = anjuta_plugin_add_watch (plugin, IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI, 
+										 				  project_root_added, 
+										 				  project_root_removed, NULL);
+										 				  
+	profiler->options = register_options ();
+	
+	/* Set up session save/load */
+	g_signal_connect (G_OBJECT (plugin->shell), "save_session", 
+					  G_CALLBACK (on_session_save), plugin);
+	
+	g_signal_connect (G_OBJECT (plugin->shell), "load_session", 
+					  G_CALLBACK (on_session_load), plugin);
+
+	return TRUE;
+}
+
+static gboolean
+profiler_deactivate (AnjutaPlugin *plugin)
+{
+
+	AnjutaUI *ui;
+	Profiler *profiler;
+	
+	DEBUG_PRINT ("%s", "Profiler: Dectivating Profiler plugin ...");
+
+	/* Disconnect session save/load */
+	g_signal_handlers_disconnect_by_func (G_OBJECT (plugin->shell), 
+										  G_CALLBACK (on_session_save), plugin);
+	
+	g_signal_handlers_disconnect_by_func (G_OBJECT (plugin->shell),
+										  G_CALLBACK (on_session_load), plugin);
+
+	ui = anjuta_shell_get_ui (plugin->shell, NULL);
+	profiler = PROFILER (plugin);
+	
+	anjuta_plugin_remove_watch (plugin, profiler->project_watch_id, TRUE);
+	
+	anjuta_ui_unmerge (ui, PROFILER (plugin)->uiid);
+	anjuta_ui_remove_action_group (ui, PROFILER (plugin)->action_group);
+	
+	anjuta_shell_remove_widget (plugin->shell,
+								gprof_view_manager_get_notebook (profiler->view_manager),
+								NULL);
+								
+	profiler_set_target (profiler, NULL);
+	gprof_view_manager_free (profiler->view_manager);
+	gprof_profile_data_free (profiler->profile_data);
+	
+	gprof_options_destroy (profiler->options);
+	
+	g_free (profiler->project_root_uri);
+	
+	if (profiler->profile_data_monitor)
+		g_file_monitor_cancel (profiler->profile_data_monitor);
+	
+	return TRUE;
+}
+
+static void
+profiler_finalize (GObject *obj)
+{
+	/* Finalization codes here */
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+profiler_dispose (GObject *obj)
+{
+	/* Disposition codes */
+	G_OBJECT_CLASS (parent_class)->dispose (obj);
+}
+
+static void
+profiler_instance_init (GObject *obj)
+{
+	Profiler *profiler = PROFILER (obj);
+
+	profiler->uiid = 0;
+	profiler->project_root_uri = NULL;
+	profiler->profile_target_path = NULL;
+
+
+}
+
+static void
+profiler_class_init (GObjectClass *klass) 
+{
+	AnjutaPluginClass *plugin_class = ANJUTA_PLUGIN_CLASS (klass);
+
+	parent_class = g_type_class_peek_parent (klass);
+
+	plugin_class->activate = profiler_activate;
+	plugin_class->deactivate = profiler_deactivate;
+	klass->finalize = profiler_finalize;
+	klass->dispose = profiler_dispose;
+}
+
+/* File open interface */
+static void
+ifile_open (IAnjutaFile *manager, GFile* file,
+			GError **err)
+{
+	Profiler *profiler;
+	
+	profiler = PROFILER (manager);
+	
+	gchar* uri = g_file_get_uri (file);
+	
+	profiler_set_target (profiler, uri);
+	
+	/* Respect user settings for this target if they exist. Otherwise, don't
+	 * create an entry for this target to avoid having the settings file 
+	 * balloon with the settings for a bunch of targets, espcially if this 
+	 * is a one-time operation. If previous settings don't exist, just use
+	 * the defaults. */
+	if (gprof_options_has_target (profiler->options,  uri))
+		gprof_options_set_target (profiler->options, uri);
+	else
+		gprof_options_set_target (profiler->options, NULL);
+	
+	if (profiler_get_data (profiler))
+		gprof_view_manager_refresh_views (profiler->view_manager);
+	
+	g_free (uri);
+}
+
+static GFile*
+ifile_get_file (IAnjutaFile *manager, GError **err)
+{
+	DEBUG_PRINT ("%s", "Unsupported operation");
+	return NULL;
+}
+
+static void
+ifile_iface_init (IAnjutaFileIface *iface)
+{
+	iface->open = ifile_open;
+	iface->get_file = ifile_get_file;
+}
+
+ANJUTA_PLUGIN_BEGIN (Profiler, profiler);
+ANJUTA_PLUGIN_ADD_INTERFACE (ifile, IANJUTA_TYPE_FILE);
+ANJUTA_PLUGIN_END;
+
+ANJUTA_SIMPLE_PLUGIN (Profiler, profiler);

Added: trunk/plugins/profiler/plugin.h
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/plugin.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,77 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * plugin.h
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * plugin.h 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, or (at your option) any later version.
+ * 
+ * plugin.h 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 plugin.h.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _PROFILER_H_
+#define _PROFILER_H_
+
+#include <config.h>
+#include <glib/gstdio.h>
+#include <libanjuta/anjuta-plugin.h>
+#include <libanjuta/anjuta-shell.h>
+#include <libanjuta/anjuta-debug.h>
+#include <libanjuta/interfaces/ianjuta-project-manager.h>
+#include <libanjuta/interfaces/ianjuta-file.h>
+#include "gprof-view-manager.h"
+#include "gprof-profile-data.h"
+#include "gprof-flat-profile-view.h"
+#include "gprof-call-graph-view.h"
+#include "gprof-function-call-tree-view.h"
+#include "gprof-options.h"
+
+#ifdef HAVE_GRAPHVIZ
+#include "gprof-function-call-chart-view.h"
+#endif
+
+extern GType profiler_get_type (GTypeModule *module);
+#define TYPE_PROFILER         (profiler_get_type (NULL))
+#define PROFILER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_PROFILER, Profiler))
+#define PROFILER_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_PROFILER, ProfilerClass))
+#define IS_PROFILER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_PROFILER))
+#define IS_PROFILER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_PROFILER))
+#define PROFILER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_PROFILER, ProfilerClass))
+
+typedef struct _Profiler Profiler;
+typedef struct _ProfilerClass ProfilerClass;
+
+struct _Profiler
+{
+	AnjutaPlugin parent;
+	
+	gint uiid;
+	GtkActionGroup *action_group;
+	GProfOptions *options;
+	GladeXML *prefs_gxml;
+	GProfViewManager *view_manager;
+	GProfProfileData *profile_data;
+	gint project_watch_id;
+	gchar *project_root_uri;
+	gchar *profile_target_path;
+	GFileMonitor *profile_data_monitor;
+};
+
+struct _ProfilerClass
+{
+	AnjutaPluginClass parent_class;
+};
+
+#endif

Added: trunk/plugins/profiler/profiler-call-graph.glade
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/profiler-call-graph.glade	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,175 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>
+
+<glade-interface>
+
+<widget class="GtkWindow" id="call_graph">
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">500</property>
+  <property name="default_height">400</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <signal name="delete_event" handler="on_main window_delete_event" last_modification_time="Wed, 15 Nov 2006 07:29:39 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="call_graph_vbox">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkLabel" id="label1">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">&lt;b&gt;Functions&lt;/b&gt;</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">True</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.019999999553</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">5</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkScrolledWindow" id="scrolledwindow5">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	  <property name="shadow_type">GTK_SHADOW_IN</property>
+	  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	  <child>
+	    <widget class="GtkTreeView" id="functions_list_view">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="headers_visible">True</property>
+	      <property name="rules_hint">True</property>
+	      <property name="reorderable">False</property>
+	      <property name="enable_search">True</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label2">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">&lt;b&gt;Called&lt;/b&gt;</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">True</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.019999999553</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">6</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkScrolledWindow" id="scrolledwindow8">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	  <property name="shadow_type">GTK_SHADOW_IN</property>
+	  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	  <child>
+	    <widget class="GtkTreeView" id="called_list_view">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="headers_visible">True</property>
+	      <property name="rules_hint">True</property>
+	      <property name="reorderable">False</property>
+	      <property name="enable_search">True</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label3">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">&lt;b&gt;Called By&lt;/b&gt;</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">True</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.019999999553</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">5</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkScrolledWindow" id="scrolledwindow9">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	  <property name="shadow_type">GTK_SHADOW_IN</property>
+	  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	  <child>
+	    <widget class="GtkTreeView" id="called_by_list_view">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="headers_visible">True</property>
+	      <property name="rules_hint">True</property>
+	      <property name="reorderable">False</property>
+	      <property name="enable_search">True</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>

Added: trunk/plugins/profiler/profiler-flat-profile.glade
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/profiler-flat-profile.glade	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,45 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>
+
+<glade-interface>
+
+<widget class="GtkWindow" id="flat_profile">
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">500</property>
+  <property name="default_height">400</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <signal name="delete_event" handler="on_main window_delete_event" last_modification_time="Wed, 15 Nov 2006 07:29:39 GMT"/>
+
+  <child>
+    <widget class="GtkScrolledWindow" id="flat_profile_scrolled">
+      <property name="visible">True</property>
+      <property name="can_focus">True</property>
+      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+      <property name="shadow_type">GTK_SHADOW_IN</property>
+      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+      <child>
+	<widget class="GtkTreeView" id="flat_profile_view">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="headers_visible">True</property>
+	  <property name="rules_hint">True</property>
+	  <property name="reorderable">False</property>
+	  <property name="enable_search">True</property>
+	</widget>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>

Added: trunk/plugins/profiler/profiler-function-call-tree.glade
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/profiler-function-call-tree.glade	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,45 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>
+
+<glade-interface>
+
+<widget class="GtkWindow" id="function_call_tree">
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">500</property>
+  <property name="default_height">400</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <signal name="delete_event" handler="on_main window_delete_event" last_modification_time="Wed, 15 Nov 2006 07:29:39 GMT"/>
+
+  <child>
+    <widget class="GtkScrolledWindow" id="function_call_tree_scrolled">
+      <property name="visible">True</property>
+      <property name="can_focus">True</property>
+      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+      <property name="shadow_type">GTK_SHADOW_IN</property>
+      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+      <child>
+	<widget class="GtkTreeView" id="function_call_tree_view">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="headers_visible">True</property>
+	  <property name="rules_hint">True</property>
+	  <property name="reorderable">False</property>
+	  <property name="enable_search">True</property>
+	</widget>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>

Added: trunk/plugins/profiler/profiler.glade
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/profiler.glade	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,640 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
+<glade-interface>
+  <widget class="GtkDialog" id="select_target_dialog">
+    <property name="width_request">400</property>
+    <property name="height_request">350</property>
+    <property name="visible">True</property>
+    <property name="title" translatable="yes">Select Profiling Target</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <child>
+          <widget class="GtkFrame" id="frame1">
+            <property name="visible">True</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">GTK_SHADOW_NONE</property>
+            <child>
+              <widget class="GtkAlignment" id="alignment1">
+                <property name="visible">True</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <widget class="GtkVBox" id="vbox5">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                        <property name="shadow_type">GTK_SHADOW_IN</property>
+                        <child>
+                          <widget class="GtkTreeView" id="targets_list_view">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="headers_visible">False</property>
+                            <property name="enable_search">False</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkTable" id="table2">
+                        <property name="visible">True</property>
+                        <property name="n_columns">2</property>
+                        <property name="column_spacing">2</property>
+                        <child>
+                          <widget class="GtkButton" id="select_other_target_button">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="response_id">0</property>
+                            <child>
+                              <widget class="GtkHBox" id="hbox2">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="spacing">2</property>
+                                <child>
+                                  <widget class="GtkImage" id="image1">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="stock">gtk-open</property>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label2">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="label" translatable="yes">Select Other Target...</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkButton" id="profiling_options_button">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="response_id">0</property>
+                            <child>
+                              <widget class="GtkAlignment" id="alignment5">
+                                <property name="visible">True</property>
+                                <property name="xscale">0</property>
+                                <property name="yscale">0</property>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox1">
+                                    <property name="visible">True</property>
+                                    <property name="spacing">2</property>
+                                    <child>
+                                      <widget class="GtkImage" id="image3">
+                                        <property name="visible">True</property>
+                                        <property name="stock">gtk-preferences</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkLabel" id="label8">
+                                        <property name="visible">True</property>
+                                        <property name="label" translatable="yes">Options...</property>
+                                        <property name="use_underline">True</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                </child>
+                              </widget>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="padding">5</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">&lt;b&gt;Select Target to Profile&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="type">label_item</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <widget class="GtkButton" id="cancelbutton1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="label">gtk-cancel</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-6</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="okbutton1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="label">gtk-ok</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-5</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+  <widget class="GtkDialog" id="profiling_options_dialog">
+    <property name="height_request">500</property>
+    <property name="title" translatable="yes">Profiling Options</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox2">
+        <property name="visible">True</property>
+        <child>
+          <widget class="GtkNotebook" id="notebook1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <child>
+              <widget class="GtkVBox" id="vbox1">
+                <property name="visible">True</property>
+                <child>
+                  <widget class="GtkCheckButton" id="automatic_refresh_check">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="label" translatable="yes">Automatically refresh profile data display</property>
+                    <property name="use_underline">True</property>
+                    <property name="response_id">0</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="no_show_static_check">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="label" translatable="yes">Do not show static functions</property>
+                    <property name="use_underline">True</property>
+                    <property name="response_id">0</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="show_possible_called_check">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="label" translatable="yes">Show functions that could have been called but never were</property>
+                    <property name="use_underline">True</property>
+                    <property name="response_id">0</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="show_uncalled_check">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="label" translatable="yes">Show uncalled functions</property>
+                    <property name="use_underline">True</property>
+                    <property name="response_id">0</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="frame4">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkVBox" id="vbox6">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <child>
+                              <widget class="GtkLabel" id="label10">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Use this profiling data file:</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkHBox" id="hbox3">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <child>
+                                  <widget class="GtkEntry" id="profile_data_file_entry">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkButton" id="profile_data_browse_button">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="label" translatable="yes">Browse...</property>
+                                    <property name="response_id">0</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label9">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Profiling Data&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">4</property>
+                  </packing>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label3">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">General</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkVBox" id="vbox2">
+                <property name="visible">True</property>
+                <child>
+                  <widget class="GtkFrame" id="frame2">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment3">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkVBox" id="vbox3">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkRadioButton" id="show_all_symbols_radio">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">Show all symbols</property>
+                                <property name="use_underline">True</property>
+                                <property name="response_id">0</property>
+                                <property name="draw_indicator">True</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkRadioButton" id="include_symbols_radio">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">Show only these symbols:</property>
+                                <property name="use_underline">True</property>
+                                <property name="response_id">0</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">show_all_symbols_radio</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkRadioButton" id="exclude_symbols_radio">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">Do not show these symbols:</property>
+                                <property name="use_underline">True</property>
+                                <property name="response_id">0</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">show_all_symbols_radio</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkScrolledWindow" id="scrolledwindow2">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                                <property name="shadow_type">GTK_SHADOW_IN</property>
+                                <child>
+                                  <widget class="GtkTextView" id="symbols_text_view">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                  </widget>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="position">3</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label5">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Symbols&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="frame3">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment4">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkVBox" id="vbox4">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkRadioButton" id="propagate_all_symbols_radio">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">Propagate time for all symbols</property>
+                                <property name="use_underline">True</property>
+                                <property name="response_id">0</property>
+                                <property name="draw_indicator">True</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkRadioButton" id="propagate_include_symbols_radio">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">Propagate time for only these symbols:</property>
+                                <property name="use_underline">True</property>
+                                <property name="response_id">0</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">propagate_all_symbols_radio</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkRadioButton" id="propagate_exclude_symbols_radio">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">Do not propagate time for these symbols:</property>
+                                <property name="use_underline">True</property>
+                                <property name="response_id">0</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">propagate_all_symbols_radio</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkScrolledWindow" id="scrolledwindow3">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                                <property name="shadow_type">GTK_SHADOW_IN</property>
+                                <child>
+                                  <widget class="GtkTextView" id="propagation_text_view">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                  </widget>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="position">3</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label6">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Time Propagation&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkHSeparator" id="hseparator1">
+                    <property name="visible">True</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="padding">2</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkTable" id="table1">
+                    <property name="visible">True</property>
+                    <property name="n_columns">2</property>
+                    <child>
+                      <widget class="GtkLabel" id="label7">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Enter one symbol specification per line.
+
+For information on symbol specifications, see section 
+4.5 of the gprof info page.</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkImage" id="image2">
+                        <property name="visible">True</property>
+                        <property name="stock">gtk-dialog-info</property>
+                        <property name="icon_size">6</property>
+                      </widget>
+                      <packing>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="padding">2</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label4">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes" comment="this is a graph of function calls">Call Graph</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area2">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <widget class="GtkButton" id="closebutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="label">gtk-close</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-7</property>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>

Added: trunk/plugins/profiler/profiler.plugin.in
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/profiler.plugin.in	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,10 @@
+[Anjuta Plugin]
+Location=anjuta-profiler:Profiler
+Icon=anjuta-profiler-plugin-48.png
+_Name=Profiler
+_Description=Application performance profiler
+Interfaces=IAnjutaFile
+
+[File Loader]
+_Title=Profile
+SupportedMimeTypes=application/x-executable

Added: trunk/plugins/profiler/profiler.ui
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/profiler.ui	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,17 @@
+<!--*- xml -*-->
+<ui>
+	<menubar name="MenuMain">
+		<placeholder name="PlaceHolderDebugMenus">
+			<menu name="MenuDebug" action="ActionMenuDebug">
+				<placeholder name="PlaceholderProfilerMenus">			
+					<separator name="separator1"/>
+					<menu name="Profiler" action="ActionMenuProfiler">
+						<menuitem name="Select Target" action="ActionProfilerSelectTarget" />
+						<menuitem name="Refresh" action="ActionProfilerRefresh" />
+						<menuitem name="Delete Data" action="ActionProfilerDeleteData" />
+					</menu>
+				</placeholder>
+			</menu>
+		</placeholder>
+	</menubar>
+</ui>

Added: trunk/plugins/profiler/string-utils.c
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/string-utils.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,111 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * string-utils.c
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * string-utils.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include <string.h>
+#include <stdlib.h>
+#include "string-utils.h"
+
+#define NONE -1
+
+gchar *read_to_whitespace(gchar *buffer, int *end_pos, int start_pos)
+{
+	size_t buffer_length;
+	gint begin;
+	gint i;
+	gchar *string;
+	
+	begin = NONE;
+	*end_pos = 0;
+	buffer_length = strlen(buffer);
+	
+	for (i = 0; i < buffer_length; i++)
+	{
+		/* If we haven't found a string yet, ignore any leading whitespace */
+		if (begin == NONE)
+		{
+			if (!g_ascii_isspace(buffer[i]))
+				begin = i;
+		}
+		else
+		{
+			/* Found the end of the string or we're at the end of the buffer */
+			if (g_ascii_isspace(buffer[i]) || i == (buffer_length - 1))
+			{
+				*end_pos = i + start_pos;
+				string = g_strndup(&buffer[begin], i - begin);
+				return string;
+			}
+				
+		}
+		
+	}
+	
+	return NULL;
+}
+
+gchar *strip_whitespace(gchar* buffer)
+{
+	size_t buffer_length;
+	gint i;
+	gchar *string;
+	
+	buffer_length = strlen(buffer);
+	string = NULL;
+	
+	for (i = 0; i < buffer_length; i++)
+	{
+		if (!g_ascii_isspace(buffer[i]))
+			break;
+	}
+	
+	if (i < buffer_length)
+		string = g_strdup(&buffer[i]);
+	
+	return string;
+}
+
+gchar *read_to_delimiter(gchar *buffer, gchar *delimiter)
+{
+	gint i;
+	size_t buffer_length;
+	gchar *end;  /* end of returned string */
+	gchar *string;
+	
+	string = NULL;
+	
+	/* Ignore any leading whitespace */
+	buffer_length = strlen(buffer);
+	
+	for (i = 0; i < buffer_length; i++)
+	{
+		if (!g_ascii_isspace(buffer[i]))
+			break;
+	}
+	
+	end = strstr(&buffer[i], delimiter);
+	
+	if (end)
+		string = g_strndup(&buffer[i], (end - &buffer[i]));
+	
+	return string;	
+}

Added: trunk/plugins/profiler/string-utils.h
==============================================================================
--- (empty file)
+++ trunk/plugins/profiler/string-utils.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,33 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * string-utils.h
+ * Copyright (C) James Liggett 2006 <jrliggett cox net>
+ * 
+ * string-utils.h 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _STRING_UTILS_H
+#define _STRING_UTILS_H
+
+#include <glib.h>
+
+gchar *read_to_whitespace(gchar *buffer, int *end_pos, int start_pos);
+gchar *read_to_delimiter(gchar *buffer, gchar *delimiter);
+gchar *strip_whitespace(gchar *buffer);
+
+#endif

Added: trunk/plugins/sample1/Makefile
==============================================================================
--- (empty file)
+++ trunk/plugins/sample1/Makefile	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,645 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# plugins/sample1/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+# Sample Makefile for a anjuta plugin.
+
+
+srcdir = .
+top_srcdir = ../..
+
+pkgdatadir = $(datadir)/anjuta-extras
+pkglibdir = $(libdir)/anjuta-extras
+pkgincludedir = $(includedir)/anjuta-extras
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+subdir = plugins/sample1
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(plugindir)" \
+	"$(DESTDIR)$(sample_pixmapsdir)" \
+	"$(DESTDIR)$(sample_plugindir)" "$(DESTDIR)$(sample_uidir)"
+pluginLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(plugin_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libanjuta_sample_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_libanjuta_sample_la_OBJECTS = plugin.lo
+libanjuta_sample_la_OBJECTS = $(am_libanjuta_sample_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libanjuta_sample_la_SOURCES)
+DIST_SOURCES = $(libanjuta_sample_la_SOURCES)
+sample_pixmapsDATA_INSTALL = $(INSTALL_DATA)
+sample_pluginDATA_INSTALL = $(INSTALL_DATA)
+sample_uiDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(sample_pixmaps_DATA) $(sample_plugin_DATA) $(sample_ui_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run aclocal-1.9
+ALL_LINGUAS = 
+AMDEP_FALSE = #
+AMDEP_TRUE = 
+AMTAR = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run automake-1.9
+AWK = mawk
+BINUTILS_REQUIRED = 2.15.92
+CATALOGS = 
+CATOBJEXT = .gmo
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CYGPATH_W = echo
+DATADIRNAME = share
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+EXTRA_CFLAGS = -DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/$(PACKAGE)"\" -DPACKAGE_LIB_DIR=\""$(pkglibdir)"\" -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"
+FGREP = /bin/grep -F
+GCONFTOOL = /usr/bin/gconftool-2
+GCONF_SCHEMAS_INSTALL_FALSE = #
+GCONF_SCHEMAS_INSTALL_TRUE = 
+GCONF_SCHEMA_CONFIG_SOURCE = xml:merged:/etc/gconf/gconf.xml.defaults
+GCONF_SCHEMA_FILE_DIR = $(sysconfdir)/gconf/schemas
+GETTEXT_PACKAGE = anjuta-extras
+GMOFILES = 
+GMSGFMT = /usr/bin/msgfmt
+GRAPHVIZ_CFLAGS = -I/usr/include/graphviz  
+GRAPHVIZ_LIBS = -lgvc -lgraph -lcdt  
+GREP = /bin/grep
+HAVE_GRAPHVIZ_FALSE = #
+HAVE_GRAPHVIZ_TRUE = 
+HAVE_PLUGIN_VALGRIND_FALSE = #
+HAVE_PLUGIN_VALGRIND_TRUE = 
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+INSTOBJEXT = .mo
+INTLLIBS = 
+INTLTOOL_CAVES_RULE = %.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_DESKTOP_RULE = %.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_DIRECTORY_RULE = %.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_EXTRACT = /usr/bin/intltool-extract
+INTLTOOL_KBD_RULE = %.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_KEYS_RULE = %.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_MERGE = /usr/bin/intltool-merge
+INTLTOOL_OAF_RULE = %.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@
+INTLTOOL_PERL = /usr/bin/perl
+INTLTOOL_POLICY_RULE = %.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_PONG_RULE = %.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_PROP_RULE = %.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SCHEMAS_RULE = %.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SERVER_RULE = %.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SERVICE_RULE = %.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SHEET_RULE = %.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SOUNDLIST_RULE = %.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_THEME_RULE = %.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_UI_RULE = %.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_UPDATE = /usr/bin/intltool-update
+INTLTOOL_XAM_RULE = %.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_XML_NOMERGE_RULE = %.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@
+INTLTOOL_XML_RULE = %.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBANJUTA_CFLAGS = -DORBIT2=1 -pthread -D_REENTRANT -I/usr/include/libanjuta-1.0 -I/usr/include/libgnomeui-2.0 -I/usr/include/libglade-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/directfb -I/usr/include/libpng12  
+LIBANJUTA_LIBS = -pthread -lanjuta -lgnomeui-2 -lSM -lICE -lglade-2.0 -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgconf-2 -lgthread-2.0 -lrt -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0  
+LIBGRAPHVIZ_REQUIRED = 1.0
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAINT = #
+MAINTAINER_MODE_FALSE = 
+MAINTAINER_MODE_TRUE = #
+MAKEINFO = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run makeinfo
+MKINSTALLDIRS = ./mkinstalldirs
+MSGFMT = /usr/bin/msgfmt
+MSGFMT_OPTS = -c
+MSGMERGE = /usr/bin/msgmerge
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OTOOL = 
+OTOOL64 = 
+PACKAGE = anjuta-extras
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = anjuta-extras
+PACKAGE_STRING = anjuta-extras 2.27.0
+PACKAGE_TARNAME = anjuta-extras
+PACKAGE_VERSION = 2.27.0
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PLUGIN_VALGRIND_LIBS = -Wl,-Bstatic -lbfd -liberty -Wl,-Bdynamic
+POFILES = 
+POSUB = po
+PO_IN_DATADIR_FALSE = 
+PO_IN_DATADIR_TRUE = 
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+STRIP = strip
+USE_NLS = yes
+VERSION = 2.27.0
+XGETTEXT = /usr/bin/xgettext
+ac_ct_CC = gcc
+ac_ct_DUMPBIN = 
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+anjuta_data_dir = $(anjutadatadir)/anjuta
+anjuta_glade_dir = $(anjutadatadir)/anjuta/glade
+anjuta_image_dir = $(anjutadatadir)/pixmaps/anjuta
+anjuta_plugin_dir = $(anjutalibdir)/anjuta
+anjuta_ui_dir = $(anjutadatadir)/anjuta/ui
+anjutadatadir = /usr/share
+anjutalibdir = /usr/lib
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = /home/jhs/devel/anjuta-extras/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias = 
+
+# Plugin UI file
+sample_uidir = $(anjuta_ui_dir)
+sample_ui_DATA = anjuta-sample.ui
+
+# Plugin Icon file
+sample_pixmapsdir = $(anjuta_image_dir)
+sample_pixmaps_DATA = \
+	anjuta-sample-plugin.svg \
+	anjuta-sample-plugin-48.png
+
+
+# Plugin description file
+plugin_in_files = anjuta-sample.plugin.in
+sample_plugindir = $(anjuta_plugin_dir)
+sample_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
+
+# NOTE :
+# The naming convention is very intentional
+# We are forced to use the prefix 'lib' by automake and libtool
+#    There is probably a way to avoid it but it is not worth to effort
+#    to find out.
+# The 'anjuta_' prfix is a safety measure to avoid conflicts where the
+#    plugin 'libpython.so' needs to link with the real 'libpython.so'
+
+# Include paths
+AM_CPPFLAGS = \
+	$(LIBANJUTA_CFLAGS) \
+	$(EXTRA_CFLAGS)
+
+
+# Where to install the plugin
+plugindir = $(anjuta_plugin_dir)
+
+# The plugin
+plugin_LTLIBRARIES = libanjuta-sample.la
+
+# Plugin sources
+libanjuta_sample_la_SOURCES = \
+	plugin.c \
+	plugin.h
+
+libanjuta_sample_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
+
+# Plugin dependencies
+libanjuta_sample_la_LIBADD = \
+	$(GTK_LIBS) \
+	$(LIBANJUTA_LIBS)
+
+EXTRA_DIST = \
+	$(plugin_in_files) \
+	$(sample_plugin_DATA) \
+	$(sample_ui_DATA) \
+	$(sample_pixmaps_DATA)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  plugins/sample1/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  plugins/sample1/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: # $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(plugindir)" || $(mkdir_p) "$(DESTDIR)$(plugindir)"
+	@list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-pluginLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \
+	done
+
+clean-pluginLTLIBRARIES:
+	-test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
+	@list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libanjuta-sample.la: $(libanjuta_sample_la_OBJECTS) $(libanjuta_sample_la_DEPENDENCIES) 
+	$(LINK) -rpath $(plugindir) $(libanjuta_sample_la_LDFLAGS) $(libanjuta_sample_la_OBJECTS) $(libanjuta_sample_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/plugin.Plo
+
+.c.o:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c $<
+
+.c.obj:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-sample_pixmapsDATA: $(sample_pixmaps_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sample_pixmapsdir)" || $(mkdir_p) "$(DESTDIR)$(sample_pixmapsdir)"
+	@list='$(sample_pixmaps_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(sample_pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sample_pixmapsdir)/$$f'"; \
+	  $(sample_pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sample_pixmapsdir)/$$f"; \
+	done
+
+uninstall-sample_pixmapsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sample_pixmaps_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(sample_pixmapsdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(sample_pixmapsdir)/$$f"; \
+	done
+install-sample_pluginDATA: $(sample_plugin_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sample_plugindir)" || $(mkdir_p) "$(DESTDIR)$(sample_plugindir)"
+	@list='$(sample_plugin_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(sample_pluginDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sample_plugindir)/$$f'"; \
+	  $(sample_pluginDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sample_plugindir)/$$f"; \
+	done
+
+uninstall-sample_pluginDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sample_plugin_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(sample_plugindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(sample_plugindir)/$$f"; \
+	done
+install-sample_uiDATA: $(sample_ui_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sample_uidir)" || $(mkdir_p) "$(DESTDIR)$(sample_uidir)"
+	@list='$(sample_ui_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(sample_uiDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sample_uidir)/$$f'"; \
+	  $(sample_uiDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sample_uidir)/$$f"; \
+	done
+
+uninstall-sample_uiDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sample_ui_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(sample_uidir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(sample_uidir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(sample_pixmapsdir)" "$(DESTDIR)$(sample_plugindir)" "$(DESTDIR)$(sample_uidir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pluginLTLIBRARIES install-sample_pixmapsDATA \
+	install-sample_pluginDATA install-sample_uiDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-pluginLTLIBRARIES \
+	uninstall-sample_pixmapsDATA uninstall-sample_pluginDATA \
+	uninstall-sample_uiDATA
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-pluginLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-pluginLTLIBRARIES install-sample_pixmapsDATA \
+	install-sample_pluginDATA install-sample_uiDATA install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-info-am \
+	uninstall-pluginLTLIBRARIES uninstall-sample_pixmapsDATA \
+	uninstall-sample_pluginDATA uninstall-sample_uiDATA
+
+%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: trunk/plugins/sample1/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/plugins/sample1/Makefile.am	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,55 @@
+# Sample Makefile for a anjuta plugin.
+
+# Plugin UI file
+sample_uidir = $(anjuta_ui_dir)
+sample_ui_DATA =  anjuta-sample.ui
+
+# Plugin Icon file
+sample_pixmapsdir = $(anjuta_image_dir)
+sample_pixmaps_DATA = \
+	anjuta-sample-plugin.svg \
+	anjuta-sample-plugin-48.png
+
+# Plugin description file
+plugin_in_files = anjuta-sample.plugin.in
+%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+sample_plugindir = $(anjuta_plugin_dir)
+sample_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
+
+# NOTE :
+# The naming convention is very intentional
+# We are forced to use the prefix 'lib' by automake and libtool
+#    There is probably a way to avoid it but it is not worth to effort
+#    to find out.
+# The 'anjuta_' prfix is a safety measure to avoid conflicts where the
+#    plugin 'libpython.so' needs to link with the real 'libpython.so'
+
+# Include paths
+AM_CPPFLAGS = \
+	$(LIBANJUTA_CFLAGS) \
+	$(EXTRA_CFLAGS)
+
+# Where to install the plugin
+plugindir = $(anjuta_plugin_dir)
+
+# The plugin
+plugin_LTLIBRARIES = libanjuta-sample.la
+
+# Plugin sources
+libanjuta_sample_la_SOURCES = \
+	plugin.c \
+	plugin.h
+
+libanjuta_sample_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
+
+# Plugin dependencies
+libanjuta_sample_la_LIBADD = \
+	$(GTK_LIBS) \
+	$(LIBANJUTA_LIBS)
+
+EXTRA_DIST = \
+	$(plugin_in_files) \
+	$(sample_plugin_DATA) \
+	$(sample_ui_DATA) \
+	$(sample_pixmaps_DATA)

Added: trunk/plugins/sample1/Makefile.in
==============================================================================
--- (empty file)
+++ trunk/plugins/sample1/Makefile.in	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,645 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ SET_MAKE@
+
+# Sample Makefile for a anjuta plugin.
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = plugins/sample1
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(plugindir)" \
+	"$(DESTDIR)$(sample_pixmapsdir)" \
+	"$(DESTDIR)$(sample_plugindir)" "$(DESTDIR)$(sample_uidir)"
+pluginLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(plugin_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libanjuta_sample_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_libanjuta_sample_la_OBJECTS = plugin.lo
+libanjuta_sample_la_OBJECTS = $(am_libanjuta_sample_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libanjuta_sample_la_SOURCES)
+DIST_SOURCES = $(libanjuta_sample_la_SOURCES)
+sample_pixmapsDATA_INSTALL = $(INSTALL_DATA)
+sample_pluginDATA_INSTALL = $(INSTALL_DATA)
+sample_uiDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(sample_pixmaps_DATA) $(sample_plugin_DATA) $(sample_ui_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BINUTILS_REQUIRED = @BINUTILS_REQUIRED@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRA_CFLAGS = @EXTRA_CFLAGS@
+FGREP = @FGREP@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@
+GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GRAPHVIZ_CFLAGS = @GRAPHVIZ_CFLAGS@
+GRAPHVIZ_LIBS = @GRAPHVIZ_LIBS@
+GREP = @GREP@
+HAVE_GRAPHVIZ_FALSE = @HAVE_GRAPHVIZ_FALSE@
+HAVE_GRAPHVIZ_TRUE = @HAVE_GRAPHVIZ_TRUE@
+HAVE_PLUGIN_VALGRIND_FALSE = @HAVE_PLUGIN_VALGRIND_FALSE@
+HAVE_PLUGIN_VALGRIND_TRUE = @HAVE_PLUGIN_VALGRIND_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBANJUTA_CFLAGS = @LIBANJUTA_CFLAGS@
+LIBANJUTA_LIBS = @LIBANJUTA_LIBS@
+LIBGRAPHVIZ_REQUIRED = @LIBGRAPHVIZ_REQUIRED@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGIN_VALGRIND_LIBS = @PLUGIN_VALGRIND_LIBS@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+anjuta_data_dir = @anjuta_data_dir@
+anjuta_glade_dir = @anjuta_glade_dir@
+anjuta_image_dir = @anjuta_image_dir@
+anjuta_plugin_dir = @anjuta_plugin_dir@
+anjuta_ui_dir = @anjuta_ui_dir@
+anjutadatadir = @anjutadatadir@
+anjutalibdir = @anjutalibdir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+
+# Plugin UI file
+sample_uidir = $(anjuta_ui_dir)
+sample_ui_DATA = anjuta-sample.ui
+
+# Plugin Icon file
+sample_pixmapsdir = $(anjuta_image_dir)
+sample_pixmaps_DATA = \
+	anjuta-sample-plugin.svg \
+	anjuta-sample-plugin-48.png
+
+
+# Plugin description file
+plugin_in_files = anjuta-sample.plugin.in
+sample_plugindir = $(anjuta_plugin_dir)
+sample_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
+
+# NOTE :
+# The naming convention is very intentional
+# We are forced to use the prefix 'lib' by automake and libtool
+#    There is probably a way to avoid it but it is not worth to effort
+#    to find out.
+# The 'anjuta_' prfix is a safety measure to avoid conflicts where the
+#    plugin 'libpython.so' needs to link with the real 'libpython.so'
+
+# Include paths
+AM_CPPFLAGS = \
+	$(LIBANJUTA_CFLAGS) \
+	$(EXTRA_CFLAGS)
+
+
+# Where to install the plugin
+plugindir = $(anjuta_plugin_dir)
+
+# The plugin
+plugin_LTLIBRARIES = libanjuta-sample.la
+
+# Plugin sources
+libanjuta_sample_la_SOURCES = \
+	plugin.c \
+	plugin.h
+
+libanjuta_sample_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
+
+# Plugin dependencies
+libanjuta_sample_la_LIBADD = \
+	$(GTK_LIBS) \
+	$(LIBANJUTA_LIBS)
+
+EXTRA_DIST = \
+	$(plugin_in_files) \
+	$(sample_plugin_DATA) \
+	$(sample_ui_DATA) \
+	$(sample_pixmaps_DATA)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  plugins/sample1/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  plugins/sample1/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(plugindir)" || $(mkdir_p) "$(DESTDIR)$(plugindir)"
+	@list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-pluginLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \
+	done
+
+clean-pluginLTLIBRARIES:
+	-test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
+	@list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libanjuta-sample.la: $(libanjuta_sample_la_OBJECTS) $(libanjuta_sample_la_DEPENDENCIES) 
+	$(LINK) -rpath $(plugindir) $(libanjuta_sample_la_LDFLAGS) $(libanjuta_sample_la_OBJECTS) $(libanjuta_sample_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/plugin Plo am__quote@
+
+.c.o:
+ am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-sample_pixmapsDATA: $(sample_pixmaps_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sample_pixmapsdir)" || $(mkdir_p) "$(DESTDIR)$(sample_pixmapsdir)"
+	@list='$(sample_pixmaps_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(sample_pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sample_pixmapsdir)/$$f'"; \
+	  $(sample_pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sample_pixmapsdir)/$$f"; \
+	done
+
+uninstall-sample_pixmapsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sample_pixmaps_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(sample_pixmapsdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(sample_pixmapsdir)/$$f"; \
+	done
+install-sample_pluginDATA: $(sample_plugin_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sample_plugindir)" || $(mkdir_p) "$(DESTDIR)$(sample_plugindir)"
+	@list='$(sample_plugin_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(sample_pluginDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sample_plugindir)/$$f'"; \
+	  $(sample_pluginDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sample_plugindir)/$$f"; \
+	done
+
+uninstall-sample_pluginDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sample_plugin_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(sample_plugindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(sample_plugindir)/$$f"; \
+	done
+install-sample_uiDATA: $(sample_ui_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(sample_uidir)" || $(mkdir_p) "$(DESTDIR)$(sample_uidir)"
+	@list='$(sample_ui_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(sample_uiDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sample_uidir)/$$f'"; \
+	  $(sample_uiDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sample_uidir)/$$f"; \
+	done
+
+uninstall-sample_uiDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sample_ui_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(sample_uidir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(sample_uidir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(sample_pixmapsdir)" "$(DESTDIR)$(sample_plugindir)" "$(DESTDIR)$(sample_uidir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pluginLTLIBRARIES install-sample_pixmapsDATA \
+	install-sample_pluginDATA install-sample_uiDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-pluginLTLIBRARIES \
+	uninstall-sample_pixmapsDATA uninstall-sample_pluginDATA \
+	uninstall-sample_uiDATA
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-pluginLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-pluginLTLIBRARIES install-sample_pixmapsDATA \
+	install-sample_pluginDATA install-sample_uiDATA install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-info-am \
+	uninstall-pluginLTLIBRARIES uninstall-sample_pixmapsDATA \
+	uninstall-sample_pluginDATA uninstall-sample_uiDATA
+
+%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: trunk/plugins/sample1/anjuta-sample-plugin-48.png
==============================================================================
Binary file. No diff available.

Added: trunk/plugins/sample1/anjuta-sample-plugin.svg
==============================================================================
--- (empty file)
+++ trunk/plugins/sample1/anjuta-sample-plugin.svg	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,485 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://web.resource.org/cc/";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:xlink="http://www.w3.org/1999/xlink";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   width="48px"
+   height="48px"
+   id="svg8344"
+   sodipodi:version="0.32"
+   inkscape:version="0.45.1"
+   sodipodi:docbase="/home/maker/icons/anjuta-new/large"
+   sodipodi:docname="anjuta-example-plugin.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/home/maker/icons/anjuta-new/large/anjuta-example-plugin-48.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs8346">
+    <linearGradient
+       id="linearGradient5196">
+      <stop
+         id="stop5198"
+         offset="0.00000000"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5200"
+         offset="1.00000000"
+         style="stop-color:#ffffff;stop-opacity:0" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3041">
+      <stop
+         style="stop-color:#6b6b6b;stop-opacity:1;"
+         offset="0"
+         id="stop3043" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop3045" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3041"
+       id="radialGradient3047"
+       cx="24.8125"
+       cy="39.125"
+       fx="24.8125"
+       fy="39.125"
+       r="17.6875"
+       gradientTransform="matrix(1,0,0,0.374558,0,24.47041)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       xlink:href="#linearGradient584"
+       id="linearGradient643"
+       x1="5.1150461"
+       y1="34.880405"
+       x2="10.863971"
+       y2="40.563152"
+       gradientTransform="matrix(0.8151603,0,0,0.8119464,-2.0867047,-0.1661624)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       xlink:href="#linearGradient584"
+       id="linearGradient641"
+       x1="21.127713"
+       y1="36.681489"
+       x2="25.351369"
+       y2="40.975471"
+       gradientTransform="matrix(0.6366027,0,0,1.0396855,-1.4025096,-5.60327e-2)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       xlink:href="#linearGradient584"
+       id="linearGradient639"
+       x1="24.318715"
+       y1="59.820443"
+       x2="27.541346"
+       y2="62.93462"
+       gradientTransform="matrix(1.0196132,0,0,0.649135,-2.0867047,-0.1661624)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       xlink:href="#linearGradient584"
+       id="linearGradient637"
+       x1="19.421619"
+       y1="52.566918"
+       x2="23.622003"
+       y2="56.731921"
+       gradientTransform="matrix(1.176086,0,0,0.5627706,-2.0867047,-0.1661624)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       xlink:href="#linearGradient584"
+       id="linearGradient635"
+       x1="13.210883"
+       y1="30.194793"
+       x2="18.37459"
+       y2="35.395539"
+       gradientTransform="matrix(0.9942995,0,0,0.6656613,-2.0867047,-0.1661624)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient12441">
+      <stop
+         style="stop-color:#fce94f;stop-opacity:1;"
+         offset="0"
+         id="stop12443" />
+      <stop
+         id="stop10047"
+         offset="0.20238096"
+         style="stop-color:#fbe10c;stop-opacity:1;" />
+      <stop
+         style="stop-color:#f0d604;stop-opacity:1;"
+         offset="0.60119045"
+         id="stop11018" />
+      <stop
+         style="stop-color:#d3bf16;stop-opacity:1;"
+         offset="1"
+         id="stop12445" />
+    </linearGradient>
+    <linearGradient
+       xlink:href="#linearGradient584"
+       id="linearGradient632"
+       x1="-8.1800994"
+       y1="11.093718"
+       x2="-5.488511"
+       y2="13.855235"
+       gradientTransform="matrix(1.5304302,0,0,0.4223902,54.143639,5.4175711)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       xlink:href="#linearGradient584"
+       id="linearGradient630"
+       x1="-40.360713"
+       y1="8.7133577"
+       x2="-37.369126"
+       y2="11.618412"
+       gradientTransform="matrix(0.4546441,0,0,1.4218562,54.143639,5.4175711)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       xlink:href="#linearGradient584"
+       id="linearGradient628"
+       x1="-102.98239"
+       y1="3.9481195"
+       x2="-99.443313"
+       y2="7.7000084"
+       gradientTransform="matrix(0.3026507,0,0,2.1359231,54.143639,5.4175711)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       xlink:href="#linearGradient584"
+       id="linearGradient626"
+       x1="-22.221733"
+       y1="-2.3745556"
+       x2="-16.211827"
+       y2="3.5496675"
+       gradientTransform="matrix(0.8304317,0,0,0.7784367,54.143639,5.4175711)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       xlink:href="#linearGradient584"
+       id="linearGradient624"
+       x1="-35.953691"
+       y1="-2.6697014"
+       x2="-30.750741"
+       y2="2.520134"
+       gradientTransform="matrix(0.8705366,0,0,0.7425748,54.143639,5.4175711)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       xlink:href="#linearGradient584"
+       id="linearGradient622"
+       x1="8.0750945"
+       y1="25.8249"
+       x2="12.005727"
+       y2="29.754702"
+       gradientTransform="matrix(0.8057159,0,0,0.8214639,-2.0867047,-0.1661624)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient12449">
+      <stop
+         style="stop-color:#91b4da;stop-opacity:1;"
+         offset="0"
+         id="stop12451" />
+      <stop
+         style="stop-color:#396ea7;stop-opacity:1;"
+         offset="1"
+         id="stop12453" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient584">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0.00000000"
+         id="stop585" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1.00000000"
+         id="stop586" />
+    </linearGradient>
+    <linearGradient
+       xlink:href="#linearGradient584"
+       id="linearGradient1330"
+       x1="22.645946"
+       y1="19.103636"
+       x2="27.035076"
+       y2="23.33555"
+       gradientTransform="matrix(1.6398454,0,0,0.4283585,-8.1358493,-1.0771498)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient1304">
+      <stop
+         style="stop-color:#d9cce6;stop-opacity:1;"
+         offset="0.00000000"
+         id="stop1305" />
+      <stop
+         style="stop-color:#73667f;stop-opacity:1;"
+         offset="1.00000000"
+         id="stop1306" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient584"
+       id="linearGradient2429"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5539558,0,0,0.4338777,54.650629,15.775904)"
+       x1="-8.1800994"
+       y1="11.093718"
+       x2="-5.488511"
+       y2="13.855235" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient584"
+       id="linearGradient2432"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.4616328,0,0,1.4605256,53.424997,15.82856)"
+       x1="-36.614655"
+       y1="11.845268"
+       x2="-38.930702"
+       y2="7.9040766" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient584"
+       id="linearGradient2438"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.8839184,0,0,0.7627702,53.97543,16.224993)"
+       x1="-35.953691"
+       y1="-2.6697014"
+       x2="-30.750741"
+       y2="2.520134" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient584"
+       id="linearGradient2441"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.7577148,0.4917387,-0.5042563,0.6539629,53.892824,37.615424)"
+       x1="-43.379826"
+       y1="6.0593591"
+       x2="-40.731873"
+       y2="8.5698967" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient12449"
+       id="linearGradient2444"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.8792122,0,0,1.1445903,4.3600887,-50.370264)"
+       x1="30.875"
+       y1="59.75"
+       x2="33"
+       y2="69.25" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient584"
+       id="linearGradient2447"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.843197,0,0,0.7996074,53.319625,16.088806)"
+       x1="-22.221733"
+       y1="-2.3745556"
+       x2="-16.211827"
+       y2="3.5496675" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient584"
+       id="linearGradient2451"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.8839184,0,0,0.7627702,67.078499,16.113559)"
+       x1="-35.953691"
+       y1="-2.6697014"
+       x2="-30.750741"
+       y2="2.520134" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient12441"
+       id="linearGradient4176"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,0.8792122,-1.1445903,0,84.341234,-3.7185134)"
+       x1="24.139402"
+       y1="64.499992"
+       x2="51.196167"
+       y2="64.499992" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient584"
+       id="linearGradient4178"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.7577148,0.4917387,-0.5042563,0.6539629,45.946882,24.682957)"
+       x1="-42.437572"
+       y1="6.6348462"
+       x2="-40.213413"
+       y2="9.2613125" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient584"
+       id="linearGradient4180"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,0.8839184,-0.7627702,0,17.623931,45.905465)"
+       x1="-33.819084"
+       y1="0.57488489"
+       x2="-31.250723"
+       y2="-1.5355989" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient584"
+       id="linearGradient4182"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,0.4616328,-1.4605256,0,18.107729,45.65608)"
+       x1="-41.880051"
+       y1="10.453351"
+       x2="-32.420757"
+       y2="10.173509" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient584"
+       id="linearGradient4186"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0,0.8839184,-0.7627702,0,17.675802,59.190956)"
+       x1="-36.553665"
+       y1="-1.1632862"
+       x2="-31.300718"
+       y2="-2.1729283" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5196"
+       id="linearGradient4199"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.5953565,0.5728047,-0.585669,0.577697,21.740442,-12.170721)"
+       x1="6.8711171"
+       y1="37.193737"
+       x2="11.72256"
+       y2="38.870327" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient584"
+       id="linearGradient12960"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.4616328,0,0,-1.4605256,-9.7644908,52.269281)"
+       x1="-36.614655"
+       y1="11.845268"
+       x2="-38.930702"
+       y2="7.9040766" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="26.754057"
+     inkscape:cy="14.335422"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="false"
+     inkscape:document-units="px"
+     inkscape:window-width="1268"
+     inkscape:window-height="736"
+     inkscape:window-x="6"
+     inkscape:window-y="52"
+     inkscape:object-paths="false"
+     inkscape:guide-bbox="false" />
+  <metadata
+     id="metadata8349">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="shadow">
+    <path
+       sodipodi:type="arc"
+       style="opacity:0.3125;color:#000000;fill:url(#radialGradient3047);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="path3039"
+       sodipodi:cx="24.8125"
+       sodipodi:cy="39.125"
+       sodipodi:rx="17.6875"
+       sodipodi:ry="6.625"
+       d="M 42.5 39.125 A 17.6875 6.625 0 1 1  7.125,39.125 A 17.6875 6.625 0 1 1  42.5 39.125 z"
+       transform="matrix(1.6028555,0,0,0.6665681,-16.045345,17.504511)" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="pattern1">
+    <path
+       style="fill:url(#linearGradient2447);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 34.619722,18.939175 C 34.386134,18.735552 35.325362,16.146774 35.27056,14.703029 C 35.235353,13.678272 39.358095,14.408247 39.609483,14.627385 C 39.791986,14.786474 37.362413,15.110718 36.644551,15.68642 C 35.916107,16.270613 34.820024,19.113779 34.619722,18.939175 z "
+       id="path1665"
+       sodipodi:nodetypes="cssss" />
+    <path
+       style="fill:url(#linearGradient2444);fill-opacity:1;fill-rule:nonzero;stroke:#204a87;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 21.504726,13.440641 L 21.504726,21.850811 C 20.934999,20.827402 19.840109,20.117417 18.587756,20.117417 C 16.747566,20.117417 15.254077,21.613015 15.254077,23.455806 C 15.254077,25.298596 16.747567,26.794194 18.587756,26.794194 C 19.840109,26.794194 20.934999,26.084209 21.504726,25.0608 L 21.504726,33.470971 L 29.069614,33.470971 C 28.503043,32.872481 28.172084,32.048925 28.172084,31.159779 C 28.172084,29.316988 29.665573,27.82139 31.505763,27.82139 C 33.345954,27.82139 34.839442,29.316988 34.839442,31.159779 C 34.839442,32.048925 34.508484,32.872481 33.941913,33.470971 L 41.506801,33.470971 L 41.506801,25.1892 C 42.093573,26.144363 43.158425,26.794194 44.359661,26.794194 C 46.199852,26.794194 47.69334,25.298596 47.693341,23.455806 C 47.693341,21.613015 46.199851,20.117417 44.359661,20.117417 C 43.158426,20.117417 42.093573,20.767249 41.506801,21.722412 L 41.506801,13.440641 L 34.294514,13.440641 C 34.630578,13.961758 34.839442,14.572179 34.839442,15.238235 C 34.
 839442,17.081026 33.345954,18.576623 31.505763,18.576623 C 29.665573,18.576624 28.172084,17.081025 28.172084,15.238235 C 28.172084,14.572179 28.380948,13.961759 28.717012,13.440641 L 21.504726,13.440641 z "
+       id="rect13556" />
+    <path
+       style="fill:url(#linearGradient2441);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 15.875402,22.667143 C 16.086909,21.849071 16.83995,20.732906 18.174534,20.632932 C 19.063018,20.566374 20.3628,20.811937 20.907765,21.857885 C 18.950073,22.590994 17.378536,22.38564 15.875402,22.667143 z "
+       id="path1663"
+       sodipodi:nodetypes="cscc"
+       inkscape:transform-center-x="-0.90972811" />
+    <path
+       style="fill:url(#linearGradient2438);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 22.04919,18.263916 L 22.079076,13.974888 L 27.268807,13.980868 C 25.516076,14.397195 24.245842,14.514139 23.444214,15.208106 C 22.847746,15.724466 22.308331,17.007517 22.04919,18.263916 z "
+       id="path1664"
+       sodipodi:nodetypes="cccsc" />
+    <path
+       style="fill:url(#linearGradient2432);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 34.781544,29.154831 C 35.222137,29.86569 35.648134,31.706301 35.018044,32.872773 C 35.809519,32.862427 35.913961,32.772587 35.790637,31.689941 C 35.721352,31.081702 35.388521,29.705022 34.781544,29.154831 z "
+       id="path1667"
+       sodipodi:nodetypes="ccsc" />
+    <path
+       style="fill:url(#linearGradient2429);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 42.065086,21.932017 C 42.465596,21.065292 43.32921,20.658056 44.050048,20.593053 C 44.727306,20.53198 45.737766,20.810419 46.169631,21.462997 C 45.711821,21.710701 42.670009,21.911981 42.065086,21.932017 z "
+       id="path1668"
+       sodipodi:nodetypes="cscc" />
+    <path
+       sodipodi:nodetypes="cccsc"
+       id="path2449"
+       d="M 34.679048,17.487026 C 35.145225,16.6475 35.591001,15.156941 35.069961,13.931547 L 40.371876,13.869434 C 38.619145,14.285761 37.348911,14.402705 36.547283,15.096672 C 35.950815,15.613032 35.947844,16.43491 34.679048,17.487026 z "
+       style="fill:url(#linearGradient2451);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:label="pattern2">
+    <path
+       style="fill:url(#linearGradient4176);fill-opacity:1;fill-rule:nonzero;stroke:#c17d11;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 20.53033,13.426125 L 12.120159,13.426125 C 13.143569,12.856398 13.853554,11.761508 13.853554,10.509155 C 13.853554,8.6689641 12.357956,7.1754751 10.515165,7.1754751 C 8.6723752,7.1754751 7.1767772,8.6689651 7.1767772,10.509155 C 7.1767772,11.761508 7.8867622,12.856398 8.9101712,13.426125 L 0.5,13.426125 L 0.5,20.991013 C 1.09849,20.424442 1.922046,20.093483 2.811192,20.093483 C 4.653983,20.093483 6.149581,21.586972 6.149581,23.427162 C 6.149581,25.267353 4.653983,26.760841 2.811192,26.760841 C 1.922046,26.760841 1.09849,26.429883 0.5,25.863312 L 0.5,33.4282 L 8.7817712,33.4282 C 7.8266082,34.014972 7.1767772,35.079824 7.1767772,36.28106 C 7.1767772,38.121251 8.6723752,39.614739 10.515165,39.61474 C 12.357956,39.61474 13.853554,38.12125 13.853554,36.28106 C 13.853554,35.079825 13.203722,34.014972 12.248558,33.4282 L 20.53033,33.4282 L 20.53033,26.215913 C 20.009213,26.551977 19.398792,26.760841 18.732736,26.760841 C 16.889945,26.760841 15.394348,25.267353 15.39434
 8,23.427162 C 15.394347,21.586972 16.889945,20.093483 18.732736,20.093483 C 19.398792,20.093483 20.009211,20.302347 20.53033,20.638411 L 20.53033,13.426125 z "
+       id="path4162" />
+    <path
+       style="fill:url(#linearGradient4199);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 2.697045,15.237229 C 2.316163,15.238872 0.7102779,14.234318 1.1135779,14.132671 C 2.665471,13.741532 7.8333489,13.953377 7.8134749,14.190148 C 7.7926789,14.437907 4.2306849,15.230613 2.697045,15.237229 z "
+       id="path642"
+       sodipodi:nodetypes="csss" />
+    <path
+       style="fill:url(#linearGradient4178);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 7.9294598,9.7346779 C 8.1409678,8.9166059 8.8940088,7.8004409 10.228593,7.7004669 C 11.117077,7.6339089 12.416859,7.8794719 12.961824,8.9254199 C 11.004132,9.6585289 9.4325951,9.4531749 7.9294598,9.7346779 z "
+       id="path4164"
+       sodipodi:nodetypes="cscc"
+       inkscape:transform-center-x="-0.90972836" />
+    <path
+       style="fill:url(#linearGradient4180);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 14.347571,13.93503 L 20.050813,13.964917 L 19.91225,16.547192 C 19.495923,14.794461 18.716067,15.336187 18.110488,14.976501 C 17.432189,14.573622 15.60397,14.194172 14.347571,13.93503 z "
+       id="path4166"
+       sodipodi:nodetypes="cccsc" />
+    <path
+       style="fill:url(#linearGradient4182);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 6.5050305,24.802918 C 5.5963242,26.232747 4.4284825,28.156257 1.0635157,26.939767 C 1.0738617,27.731242 2.1359735,28.321821 4.0141147,27.977526 C 4.6162532,27.867144 5.6896744,27.354439 6.5050305,24.802918 z "
+       id="path4168"
+       sodipodi:nodetypes="ccsc" />
+    <path
+       sodipodi:nodetypes="cccsc"
+       id="path4172"
+       d="M 16.5675,26.658922 C 17.407026,27.125099 18.676614,27.61507 19.902008,27.09403 L 19.919927,28.595246 C 18.884882,28.566088 19.31744,28.807819 18.38333,28.306187 C 17.601805,27.886495 17.619616,27.927718 16.5675,26.658922 z "
+       style="fill:url(#linearGradient4186);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="fill:url(#linearGradient12960);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 8.7905738,38.501068 C 8.3499805,37.790209 8.1449543,36.170569 8.7750443,35.004097 C 7.9835697,35.014443 7.6139627,35.723002 7.7372867,36.805648 C 7.8065717,37.413887 8.1835965,37.950877 8.7905738,38.501068 z "
+       id="path12958"
+       sodipodi:nodetypes="ccsc" />
+  </g>
+</svg>

Added: trunk/plugins/sample1/anjuta-sample.plugin
==============================================================================
--- (empty file)
+++ trunk/plugins/sample1/anjuta-sample.plugin	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,74 @@
+[Anjuta Plugin]
+Location=anjuta-sample:SamplePlugin
+Icon=anjuta-sample-plugin-48.png
+Name=Sample Plugin
+Name[ar]=ÙÙØÙ ØÙÙÙØ
+Name[be latin]=Uzorny plugin
+Name[ca]=Exemple de connector
+Name[cs]=UkÃzkovà zÃsuvnà modul
+Name[da]=Moduleksempel
+Name[de]=Beispielkomponente
+Name[dz]=àààààààààààààààà
+Name[el]=ÎÎÏÎÎÎÎÎÎÎ ÏÏÏÏÎÎÏÎÏ ÎÎÎÏÎÏÏÎÎÎÏ
+Name[en_GB]=Sample Plugin
+Name[es]=Complemento de ejemplo
+Name[eu]=Adibide plugina
+Name[fi]=EsimerkkiliitÃnnÃinen
+Name[fr]=Exemple de greffon
+Name[gl]=Plugin de mostra
+Name[gu]=ààààà àààààà
+Name[hi]=ààààà àààààà
+Name[hu]=Minta bÅvÃtmÃny
+Name[it]=Plugin di esempio
+Name[ja]=ãããããããããã
+Name[kn]=ààààà àààààààà 
+Name[ko]=ìí íëêì
+Name[lv]=Paraugspraudnis
+Name[mk]=ÐÑÐÐÐÑÐÐ ÐÑÐÐÐÑÑÐÐ
+Name[mr]=ààààà àààààà
+Name[nb]=Eksempel-tillegg
+Name[ne]=ààààà àààààà
+Name[pl]=PrzykÅadowa wtyczka
+Name[pt]=Plugin de DemonstraÃÃo
+Name[pt_BR]=Plug-in de exemplo
+Name[ru]=ÐÐÑÐÐÐÑ ÐÐÐÐÐÐÐÐÐÑ
+Name[sl]=VzorÄni vstavek
+Name[sv]=Exempelinstick
+Name[th]=àààààààààààààààà
+Name[tr]=Ãrnek Eklenti
+Name[vi]=Phán bá sung máu
+Description=Sample Plugin for Anjuta.
+Description[ar]=ÙÙØÙ ØÙÙÙØ ÙØÙØÙØØ.
+Description[be latin]=Uzorny plugin dla Anjuty.
+Description[ca]=Exemple de connector per a l'Anjuta.
+Description[cs]=UkÃzkovà zÃsuvnà modul pro Anjutu
+Description[da]=Moduleksempel til Anjuta.
+Description[de]=Beispiel Komponente fÃr Anjuta
+Description[dz]=àààààààààààààààààààààààààààààààààà
+Description[el]=ÎÎÏÎÎÎÎÎÎÎ ÏÏÏÏÎÎÏÎÏ ÎÎÎÏÎÏÏÎÎÎÏ ÎÎÎ ÏÎ anjuta.
+Description[en_GB]=Sample Plugin for Anjuta.
+Description[es]=Complemento de ejemplo para Anjuta.
+Description[eu]=Anjuta-ren adibide plugina.
+Description[fi]=Anjutan esimerkkiliitÃnnÃinen.
+Description[fr]=Exemple de greffon pour Anjuta
+Description[gl]=Plugin de mostra para o Anjuta.
+Description[gu]=Anjuta àààà ààààà àààààà.
+Description[hi]=Anjuta àà ààà ààààà àààààà.
+Description[hu]=Minta bÅvÃtmÃny az Anjuta-hoz
+Description[it]=Plugin di esempio per Anjuta.
+Description[ja]=Anjuta ããããããããããããã
+Description[kn]=Anjutaàà ààààà ààààààààâ.
+Description[ko]=Anjuta ìí íëêì.
+Description[mk]=ÐÑÐÐÐÑÐÐ ÐÐÐÐÑÐÐ ÐÐ Anjuta.
+Description[mr]=Anjuta ààààà ààààà àààààà.
+Description[nb]=Eksempel-tillegg for Anjuta.
+Description[ne]=ààààààààà àààà ààààà àààààà à
+Description[pl]=PrzykÅadowa wtyczka Anjuty.
+Description[pt]=Plugin de DemonstraÃÃo para o Anjuta.
+Description[pt_BR]=Exemplo de plug-in para o Anjuta.
+Description[ru]=ÐÐÑÐÐÐÑ ÐÐÐÐÐÐÐÐÐÑ ÐÐÑ Anjuta
+Description[sl]=VzorÄni vstavek za program Anjuta.
+Description[sv]=Exempelinstick fÃr Anjuta.
+Description[th]=ààààààààààààààààààààààààààààà
+Description[tr]=Anjuta iÃin Ãrnek Eklenti.
+Description[vi]=Phán bá sung máu cho Anjuta.

Added: trunk/plugins/sample1/anjuta-sample.plugin.in
==============================================================================
--- (empty file)
+++ trunk/plugins/sample1/anjuta-sample.plugin.in	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,5 @@
+[Anjuta Plugin]
+Location=anjuta-sample:SamplePlugin
+Icon=anjuta-sample-plugin-48.png
+_Name=Sample Plugin
+_Description=Sample Plugin for Anjuta.

Added: trunk/plugins/sample1/anjuta-sample.ui
==============================================================================
--- (empty file)
+++ trunk/plugins/sample1/anjuta-sample.ui	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,10 @@
+<!--*- xml -*-->
+<ui>
+	<menubar name="MenuMain">
+		<menu name="MenuFile" action="ActionMenuFile">
+			<placeholder name="PlaceholderFileMenus">
+				<menuitem name="SampleAction" action="ActionFileSample" />
+			</placeholder>
+		</menu>
+	</menubar>
+</ui>

Added: trunk/plugins/sample1/plugin.c
==============================================================================
--- (empty file)
+++ trunk/plugins/sample1/plugin.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,136 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+    plugin.c
+    Copyright (C) 2000 Naba Kumar
+
+    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
+*/
+
+#include <config.h>
+#include <libanjuta/anjuta-shell.h>
+#include <libanjuta/anjuta-debug.h>
+#include <libanjuta/interfaces/ianjuta-document-manager.h>
+
+#include "plugin.h"
+
+#define UI_FILE PACKAGE_DATA_DIR"/ui/anjuta-sample.ui"
+
+static gpointer parent_class;
+
+static void
+on_sample_action_activate (GtkAction *action, SamplePlugin *plugin)
+{
+	GObject *obj;
+	IAnjutaDocument *editor;
+	IAnjutaDocumentManager *docman;
+	
+	/* Query for object implementing IAnjutaDocumentManager interface */
+	obj = anjuta_shell_get_object (ANJUTA_PLUGIN (plugin)->shell,
+									  "IAnjutaDocumentManager", NULL);
+	docman = IANJUTA_DOCUMENT_MANAGER (obj);
+	editor = ianjuta_document_manager_get_current_document (docman, NULL);
+
+	/* Do whatever with plugin */
+	anjuta_util_dialog_info (GTK_WINDOW (ANJUTA_PLUGIN (plugin)->shell),
+							 "Document manager pointer is: '0x%X'\n"
+							 "Current Editor pointer is: 0x%X", docman,
+							 editor);
+}
+
+static GtkActionEntry actions_file[] = {
+	{
+		"ActionFileSample",                       /* Action name */
+		GTK_STOCK_NEW,                            /* Stock icon, if any */
+		N_("_Sample action"),                     /* Display label */
+		NULL,                                     /* short-cut */
+		N_("Sample action"),                      /* Tooltip */
+		G_CALLBACK (on_sample_action_activate)    /* action callback */
+	}
+};
+
+static gboolean
+sample_plugin_activate_plugin (AnjutaPlugin *plugin)
+{
+	GtkWidget *wid;
+	AnjutaUI *ui;
+	SamplePlugin *sample_plugin;
+	
+	DEBUG_PRINT ("%s", "SamplePlugin: Activating Sample plugin ...");
+	sample_plugin = ANJUTA_PLUGIN_SAMPLE (plugin);
+	
+	ui = anjuta_shell_get_ui (plugin->shell, NULL);
+	wid = gtk_label_new ("This is a sample plugin");
+	sample_plugin->widget = wid;
+	
+	/* Add all our editor actions */
+	anjuta_ui_add_action_group_entries (ui, "ActionGroupSampleFile",
+										_("Sample file operations"),
+										actions_file,
+										G_N_ELEMENTS (actions_file),
+										GETTEXT_PACKAGE, TRUE, plugin);
+	sample_plugin->uiid = anjuta_ui_merge (ui, UI_FILE);
+	anjuta_shell_add_widget (plugin->shell, wid,
+							 "AnjutaSamplePlugin", _("SamplePlugin"), NULL,
+							 ANJUTA_SHELL_PLACEMENT_BOTTOM, NULL);
+	return TRUE;
+}
+
+static gboolean
+sample_plugin_deactivate_plugin (AnjutaPlugin *plugin)
+{
+	AnjutaUI *ui = anjuta_shell_get_ui (plugin->shell, NULL);
+	DEBUG_PRINT ("%s", "SamplePlugin: Dectivating Sample plugin ...");
+	anjuta_shell_remove_widget (plugin->shell, ANJUTA_PLUGIN_SAMPLE (plugin)->widget,
+								NULL);
+	anjuta_ui_unmerge (ui, ANJUTA_PLUGIN_SAMPLE (plugin)->uiid);
+	return TRUE;
+}
+
+static void
+sample_plugin_finalize (GObject *obj)
+{
+	/* Finalization codes here */
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+sample_plugin_dispose (GObject *obj)
+{
+	/* Disposition codes */
+	G_OBJECT_CLASS (parent_class)->dispose (obj);
+}
+
+static void
+anjuta_sample_plugin_instance_init (GObject *obj)
+{
+	SamplePlugin *plugin = ANJUTA_PLUGIN_SAMPLE (obj);
+	plugin->uiid = 0;
+}
+
+static void
+anjuta_sample_plugin_class_init (GObjectClass *klass) 
+{
+	AnjutaPluginClass *plugin_class = ANJUTA_PLUGIN_CLASS (klass);
+
+	parent_class = g_type_class_peek_parent (klass);
+
+	plugin_class->activate = sample_plugin_activate_plugin;
+	plugin_class->deactivate = sample_plugin_deactivate_plugin;
+	klass->finalize = sample_plugin_finalize;
+	klass->dispose = sample_plugin_dispose;
+}
+
+ANJUTA_PLUGIN_BOILERPLATE (SamplePlugin, anjuta_sample_plugin);
+ANJUTA_SIMPLE_PLUGIN (SamplePlugin, anjuta_sample_plugin);

Added: trunk/plugins/sample1/plugin.h
==============================================================================
--- (empty file)
+++ trunk/plugins/sample1/plugin.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,23 @@
+
+#include <libanjuta/anjuta-plugin.h>
+
+extern GType anjuta_sample_plugin_get_type (GTypeModule *module);
+#define ANJUTA_TYPE_PLUGIN_SAMPLE         (anjuta_sample_plugin_get_type (NULL))
+#define ANJUTA_PLUGIN_SAMPLE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_PLUGIN_SAMPLE, SamplePlugin))
+#define ANJUTA_PLUGIN_SAMPLE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), ANJUTA_TYPE_PLUGIN_SAMPLE, SamplePluginClass))
+#define ANJUTA_IS_PLUGIN_SAMPLE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_PLUGIN_SAMPLE))
+#define ANJUTA_IS_PLUGIN_SAMPLE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_PLUGIN_SAMPLE))
+#define ANJUTA_PLUGIN_SAMPLE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), ANJUTA_TYPE_PLUGIN_SAMPLE, SamplePluginClass))
+
+typedef struct _SamplePlugin SamplePlugin;
+typedef struct _SamplePluginClass SamplePluginClass;
+
+struct _SamplePlugin{
+	AnjutaPlugin parent;
+	GtkWidget *widget;
+	gint uiid;
+};
+
+struct _SamplePluginClass{
+	AnjutaPluginClass parent_class;
+};

Added: trunk/plugins/scratchbox/Makefile
==============================================================================
--- (empty file)
+++ trunk/plugins/scratchbox/Makefile	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,639 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# plugins/scratchbox/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+srcdir = .
+top_srcdir = ../..
+
+pkgdatadir = $(datadir)/anjuta-extras
+pkglibdir = $(libdir)/anjuta-extras
+pkgincludedir = $(includedir)/anjuta-extras
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+subdir = plugins/scratchbox
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(plugindir)" \
+	"$(DESTDIR)$(anjuta_gladedir)" \
+	"$(DESTDIR)$(anjuta_pixmapsdir)" \
+	"$(DESTDIR)$(anjuta_plugindir)"
+pluginLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(plugin_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libanjuta_scratchbox_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_libanjuta_scratchbox_la_OBJECTS = plugin.lo
+libanjuta_scratchbox_la_OBJECTS =  \
+	$(am_libanjuta_scratchbox_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libanjuta_scratchbox_la_SOURCES)
+DIST_SOURCES = $(libanjuta_scratchbox_la_SOURCES)
+anjuta_gladeDATA_INSTALL = $(INSTALL_DATA)
+anjuta_pixmapsDATA_INSTALL = $(INSTALL_DATA)
+anjuta_pluginDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(anjuta_glade_DATA) $(anjuta_pixmaps_DATA) \
+	$(anjuta_plugin_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run aclocal-1.9
+ALL_LINGUAS = 
+AMDEP_FALSE = #
+AMDEP_TRUE = 
+AMTAR = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run automake-1.9
+AWK = mawk
+BINUTILS_REQUIRED = 2.15.92
+CATALOGS = 
+CATOBJEXT = .gmo
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CYGPATH_W = echo
+DATADIRNAME = share
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+EXTRA_CFLAGS = -DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/$(PACKAGE)"\" -DPACKAGE_LIB_DIR=\""$(pkglibdir)"\" -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"
+FGREP = /bin/grep -F
+GCONFTOOL = /usr/bin/gconftool-2
+GCONF_SCHEMAS_INSTALL_FALSE = #
+GCONF_SCHEMAS_INSTALL_TRUE = 
+GCONF_SCHEMA_CONFIG_SOURCE = xml:merged:/etc/gconf/gconf.xml.defaults
+GCONF_SCHEMA_FILE_DIR = $(sysconfdir)/gconf/schemas
+GETTEXT_PACKAGE = anjuta-extras
+GMOFILES = 
+GMSGFMT = /usr/bin/msgfmt
+GRAPHVIZ_CFLAGS = -I/usr/include/graphviz  
+GRAPHVIZ_LIBS = -lgvc -lgraph -lcdt  
+GREP = /bin/grep
+HAVE_GRAPHVIZ_FALSE = #
+HAVE_GRAPHVIZ_TRUE = 
+HAVE_PLUGIN_VALGRIND_FALSE = #
+HAVE_PLUGIN_VALGRIND_TRUE = 
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+INSTOBJEXT = .mo
+INTLLIBS = 
+INTLTOOL_CAVES_RULE = %.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_DESKTOP_RULE = %.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_DIRECTORY_RULE = %.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_EXTRACT = /usr/bin/intltool-extract
+INTLTOOL_KBD_RULE = %.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_KEYS_RULE = %.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_MERGE = /usr/bin/intltool-merge
+INTLTOOL_OAF_RULE = %.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@
+INTLTOOL_PERL = /usr/bin/perl
+INTLTOOL_POLICY_RULE = %.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_PONG_RULE = %.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_PROP_RULE = %.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SCHEMAS_RULE = %.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SERVER_RULE = %.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SERVICE_RULE = %.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SHEET_RULE = %.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SOUNDLIST_RULE = %.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_THEME_RULE = %.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_UI_RULE = %.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_UPDATE = /usr/bin/intltool-update
+INTLTOOL_XAM_RULE = %.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_XML_NOMERGE_RULE = %.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@
+INTLTOOL_XML_RULE = %.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBANJUTA_CFLAGS = -DORBIT2=1 -pthread -D_REENTRANT -I/usr/include/libanjuta-1.0 -I/usr/include/libgnomeui-2.0 -I/usr/include/libglade-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/directfb -I/usr/include/libpng12  
+LIBANJUTA_LIBS = -pthread -lanjuta -lgnomeui-2 -lSM -lICE -lglade-2.0 -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgconf-2 -lgthread-2.0 -lrt -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0  
+LIBGRAPHVIZ_REQUIRED = 1.0
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAINT = #
+MAINTAINER_MODE_FALSE = 
+MAINTAINER_MODE_TRUE = #
+MAKEINFO = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run makeinfo
+MKINSTALLDIRS = ./mkinstalldirs
+MSGFMT = /usr/bin/msgfmt
+MSGFMT_OPTS = -c
+MSGMERGE = /usr/bin/msgmerge
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OTOOL = 
+OTOOL64 = 
+PACKAGE = anjuta-extras
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = anjuta-extras
+PACKAGE_STRING = anjuta-extras 2.27.0
+PACKAGE_TARNAME = anjuta-extras
+PACKAGE_VERSION = 2.27.0
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PLUGIN_VALGRIND_LIBS = -Wl,-Bstatic -lbfd -liberty -Wl,-Bdynamic
+POFILES = 
+POSUB = po
+PO_IN_DATADIR_FALSE = 
+PO_IN_DATADIR_TRUE = 
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+STRIP = strip
+USE_NLS = yes
+VERSION = 2.27.0
+XGETTEXT = /usr/bin/xgettext
+ac_ct_CC = gcc
+ac_ct_DUMPBIN = 
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+anjuta_data_dir = $(anjutadatadir)/anjuta
+anjuta_glade_dir = $(anjutadatadir)/anjuta/glade
+anjuta_image_dir = $(anjutadatadir)/pixmaps/anjuta
+anjuta_plugin_dir = $(anjutalibdir)/anjuta
+anjuta_ui_dir = $(anjutadatadir)/anjuta/ui
+anjutadatadir = /usr/share
+anjutalibdir = /usr/lib
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = /home/jhs/devel/anjuta-extras/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias = 
+
+# Plugin glade file
+anjuta_gladedir = $(anjuta_glade_dir)
+anjuta_glade_DATA = anjuta-scratchbox.glade \
+		    anjuta-scratchbox-panel.png
+
+
+# Plugin Icon file
+anjuta_pixmapsdir = $(anjuta_image_dir)
+anjuta_pixmaps_DATA = \
+	anjuta-scratchbox-48.png
+
+
+# Plugin description file
+plugin_in_files = anjuta-scratchbox.plugin.in
+anjuta_plugindir = $(anjuta_plugin_dir)
+anjuta_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
+
+# Where to install the plugin
+plugindir = $(anjuta_plugin_dir)
+plugin_LTLIBRARIES = libanjuta-scratchbox.la
+
+# Include paths
+AM_CPPFLAGS = \
+	$(LIBANJUTA_CFLAGS) \
+	$(EXTRA_CFLAGS)
+
+libanjuta_scratchbox_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
+
+# Plugin dependencies
+libanjuta_scratchbox_la_LIBADD = \
+	$(GLADE_LIBS) \
+	$(GNOME_LIBS) \
+	$(LIBANJUTA_LIBS)
+
+
+# Plugin sources
+libanjuta_scratchbox_la_SOURCES = \
+	plugin.c \
+	plugin.h
+
+EXTRA_DIST = \
+	$(plugin_in_files) \
+	$(anjuta_pixmaps_DATA) \
+	$(anjuta_plugin_DATA) \
+	$(anjuta_glade_DATA)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  plugins/scratchbox/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  plugins/scratchbox/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: # $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(plugindir)" || $(mkdir_p) "$(DESTDIR)$(plugindir)"
+	@list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-pluginLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \
+	done
+
+clean-pluginLTLIBRARIES:
+	-test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
+	@list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libanjuta-scratchbox.la: $(libanjuta_scratchbox_la_OBJECTS) $(libanjuta_scratchbox_la_DEPENDENCIES) 
+	$(LINK) -rpath $(plugindir) $(libanjuta_scratchbox_la_LDFLAGS) $(libanjuta_scratchbox_la_OBJECTS) $(libanjuta_scratchbox_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/plugin.Plo
+
+.c.o:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c $<
+
+.c.obj:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-anjuta_gladeDATA: $(anjuta_glade_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(anjuta_gladedir)" || $(mkdir_p) "$(DESTDIR)$(anjuta_gladedir)"
+	@list='$(anjuta_glade_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(anjuta_gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(anjuta_gladedir)/$$f'"; \
+	  $(anjuta_gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(anjuta_gladedir)/$$f"; \
+	done
+
+uninstall-anjuta_gladeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(anjuta_glade_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(anjuta_gladedir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(anjuta_gladedir)/$$f"; \
+	done
+install-anjuta_pixmapsDATA: $(anjuta_pixmaps_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(anjuta_pixmapsdir)" || $(mkdir_p) "$(DESTDIR)$(anjuta_pixmapsdir)"
+	@list='$(anjuta_pixmaps_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(anjuta_pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(anjuta_pixmapsdir)/$$f'"; \
+	  $(anjuta_pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(anjuta_pixmapsdir)/$$f"; \
+	done
+
+uninstall-anjuta_pixmapsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(anjuta_pixmaps_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(anjuta_pixmapsdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(anjuta_pixmapsdir)/$$f"; \
+	done
+install-anjuta_pluginDATA: $(anjuta_plugin_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(anjuta_plugindir)" || $(mkdir_p) "$(DESTDIR)$(anjuta_plugindir)"
+	@list='$(anjuta_plugin_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(anjuta_pluginDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(anjuta_plugindir)/$$f'"; \
+	  $(anjuta_pluginDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(anjuta_plugindir)/$$f"; \
+	done
+
+uninstall-anjuta_pluginDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(anjuta_plugin_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(anjuta_plugindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(anjuta_plugindir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(anjuta_gladedir)" "$(DESTDIR)$(anjuta_pixmapsdir)" "$(DESTDIR)$(anjuta_plugindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-anjuta_gladeDATA install-anjuta_pixmapsDATA \
+	install-anjuta_pluginDATA install-pluginLTLIBRARIES
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-anjuta_gladeDATA uninstall-anjuta_pixmapsDATA \
+	uninstall-anjuta_pluginDATA uninstall-info-am \
+	uninstall-pluginLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-pluginLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-anjuta_gladeDATA \
+	install-anjuta_pixmapsDATA install-anjuta_pluginDATA \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man \
+	install-pluginLTLIBRARIES install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-anjuta_gladeDATA \
+	uninstall-anjuta_pixmapsDATA uninstall-anjuta_pluginDATA \
+	uninstall-info-am uninstall-pluginLTLIBRARIES
+
+%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: trunk/plugins/scratchbox/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/plugins/scratchbox/Makefile.am	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,44 @@
+# Plugin glade file
+anjuta_gladedir = $(anjuta_glade_dir)
+anjuta_glade_DATA = anjuta-scratchbox.glade \
+		    anjuta-scratchbox-panel.png
+
+# Plugin Icon file
+anjuta_pixmapsdir = $(anjuta_image_dir)
+anjuta_pixmaps_DATA = \
+	anjuta-scratchbox-48.png
+
+# Plugin description file
+plugin_in_files = anjuta-scratchbox.plugin.in
+%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+anjuta_plugindir = $(anjuta_plugin_dir)
+anjuta_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
+
+# Where to install the plugin
+plugindir = $(anjuta_plugin_dir)
+plugin_LTLIBRARIES = libanjuta-scratchbox.la
+
+# Include paths
+AM_CPPFLAGS = \
+	$(LIBANJUTA_CFLAGS) \
+	$(EXTRA_CFLAGS)
+
+libanjuta_scratchbox_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
+
+# Plugin dependencies
+libanjuta_scratchbox_la_LIBADD = \
+	$(GLADE_LIBS) \
+	$(GNOME_LIBS) \
+	$(LIBANJUTA_LIBS)
+
+# Plugin sources
+libanjuta_scratchbox_la_SOURCES = \
+	plugin.c \
+	plugin.h
+
+EXTRA_DIST = \
+	$(plugin_in_files) \
+	$(anjuta_pixmaps_DATA) \
+	$(anjuta_plugin_DATA) \
+	$(anjuta_glade_DATA)

Added: trunk/plugins/scratchbox/Makefile.in
==============================================================================
--- (empty file)
+++ trunk/plugins/scratchbox/Makefile.in	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,639 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ SET_MAKE@
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = plugins/scratchbox
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(plugindir)" \
+	"$(DESTDIR)$(anjuta_gladedir)" \
+	"$(DESTDIR)$(anjuta_pixmapsdir)" \
+	"$(DESTDIR)$(anjuta_plugindir)"
+pluginLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(plugin_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libanjuta_scratchbox_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_libanjuta_scratchbox_la_OBJECTS = plugin.lo
+libanjuta_scratchbox_la_OBJECTS =  \
+	$(am_libanjuta_scratchbox_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libanjuta_scratchbox_la_SOURCES)
+DIST_SOURCES = $(libanjuta_scratchbox_la_SOURCES)
+anjuta_gladeDATA_INSTALL = $(INSTALL_DATA)
+anjuta_pixmapsDATA_INSTALL = $(INSTALL_DATA)
+anjuta_pluginDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(anjuta_glade_DATA) $(anjuta_pixmaps_DATA) \
+	$(anjuta_plugin_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BINUTILS_REQUIRED = @BINUTILS_REQUIRED@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRA_CFLAGS = @EXTRA_CFLAGS@
+FGREP = @FGREP@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@
+GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GRAPHVIZ_CFLAGS = @GRAPHVIZ_CFLAGS@
+GRAPHVIZ_LIBS = @GRAPHVIZ_LIBS@
+GREP = @GREP@
+HAVE_GRAPHVIZ_FALSE = @HAVE_GRAPHVIZ_FALSE@
+HAVE_GRAPHVIZ_TRUE = @HAVE_GRAPHVIZ_TRUE@
+HAVE_PLUGIN_VALGRIND_FALSE = @HAVE_PLUGIN_VALGRIND_FALSE@
+HAVE_PLUGIN_VALGRIND_TRUE = @HAVE_PLUGIN_VALGRIND_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBANJUTA_CFLAGS = @LIBANJUTA_CFLAGS@
+LIBANJUTA_LIBS = @LIBANJUTA_LIBS@
+LIBGRAPHVIZ_REQUIRED = @LIBGRAPHVIZ_REQUIRED@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGIN_VALGRIND_LIBS = @PLUGIN_VALGRIND_LIBS@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+anjuta_data_dir = @anjuta_data_dir@
+anjuta_glade_dir = @anjuta_glade_dir@
+anjuta_image_dir = @anjuta_image_dir@
+anjuta_plugin_dir = @anjuta_plugin_dir@
+anjuta_ui_dir = @anjuta_ui_dir@
+anjutadatadir = @anjutadatadir@
+anjutalibdir = @anjutalibdir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+
+# Plugin glade file
+anjuta_gladedir = $(anjuta_glade_dir)
+anjuta_glade_DATA = anjuta-scratchbox.glade \
+		    anjuta-scratchbox-panel.png
+
+
+# Plugin Icon file
+anjuta_pixmapsdir = $(anjuta_image_dir)
+anjuta_pixmaps_DATA = \
+	anjuta-scratchbox-48.png
+
+
+# Plugin description file
+plugin_in_files = anjuta-scratchbox.plugin.in
+anjuta_plugindir = $(anjuta_plugin_dir)
+anjuta_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
+
+# Where to install the plugin
+plugindir = $(anjuta_plugin_dir)
+plugin_LTLIBRARIES = libanjuta-scratchbox.la
+
+# Include paths
+AM_CPPFLAGS = \
+	$(LIBANJUTA_CFLAGS) \
+	$(EXTRA_CFLAGS)
+
+libanjuta_scratchbox_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
+
+# Plugin dependencies
+libanjuta_scratchbox_la_LIBADD = \
+	$(GLADE_LIBS) \
+	$(GNOME_LIBS) \
+	$(LIBANJUTA_LIBS)
+
+
+# Plugin sources
+libanjuta_scratchbox_la_SOURCES = \
+	plugin.c \
+	plugin.h
+
+EXTRA_DIST = \
+	$(plugin_in_files) \
+	$(anjuta_pixmaps_DATA) \
+	$(anjuta_plugin_DATA) \
+	$(anjuta_glade_DATA)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  plugins/scratchbox/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  plugins/scratchbox/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(plugindir)" || $(mkdir_p) "$(DESTDIR)$(plugindir)"
+	@list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-pluginLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \
+	done
+
+clean-pluginLTLIBRARIES:
+	-test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
+	@list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libanjuta-scratchbox.la: $(libanjuta_scratchbox_la_OBJECTS) $(libanjuta_scratchbox_la_DEPENDENCIES) 
+	$(LINK) -rpath $(plugindir) $(libanjuta_scratchbox_la_LDFLAGS) $(libanjuta_scratchbox_la_OBJECTS) $(libanjuta_scratchbox_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/plugin Plo am__quote@
+
+.c.o:
+ am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-anjuta_gladeDATA: $(anjuta_glade_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(anjuta_gladedir)" || $(mkdir_p) "$(DESTDIR)$(anjuta_gladedir)"
+	@list='$(anjuta_glade_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(anjuta_gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(anjuta_gladedir)/$$f'"; \
+	  $(anjuta_gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(anjuta_gladedir)/$$f"; \
+	done
+
+uninstall-anjuta_gladeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(anjuta_glade_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(anjuta_gladedir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(anjuta_gladedir)/$$f"; \
+	done
+install-anjuta_pixmapsDATA: $(anjuta_pixmaps_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(anjuta_pixmapsdir)" || $(mkdir_p) "$(DESTDIR)$(anjuta_pixmapsdir)"
+	@list='$(anjuta_pixmaps_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(anjuta_pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(anjuta_pixmapsdir)/$$f'"; \
+	  $(anjuta_pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(anjuta_pixmapsdir)/$$f"; \
+	done
+
+uninstall-anjuta_pixmapsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(anjuta_pixmaps_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(anjuta_pixmapsdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(anjuta_pixmapsdir)/$$f"; \
+	done
+install-anjuta_pluginDATA: $(anjuta_plugin_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(anjuta_plugindir)" || $(mkdir_p) "$(DESTDIR)$(anjuta_plugindir)"
+	@list='$(anjuta_plugin_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(anjuta_pluginDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(anjuta_plugindir)/$$f'"; \
+	  $(anjuta_pluginDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(anjuta_plugindir)/$$f"; \
+	done
+
+uninstall-anjuta_pluginDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(anjuta_plugin_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(anjuta_plugindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(anjuta_plugindir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(anjuta_gladedir)" "$(DESTDIR)$(anjuta_pixmapsdir)" "$(DESTDIR)$(anjuta_plugindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-anjuta_gladeDATA install-anjuta_pixmapsDATA \
+	install-anjuta_pluginDATA install-pluginLTLIBRARIES
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-anjuta_gladeDATA uninstall-anjuta_pixmapsDATA \
+	uninstall-anjuta_pluginDATA uninstall-info-am \
+	uninstall-pluginLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-pluginLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-anjuta_gladeDATA \
+	install-anjuta_pixmapsDATA install-anjuta_pluginDATA \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man \
+	install-pluginLTLIBRARIES install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-anjuta_gladeDATA \
+	uninstall-anjuta_pixmapsDATA uninstall-anjuta_pluginDATA \
+	uninstall-info-am uninstall-pluginLTLIBRARIES
+
+%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: trunk/plugins/scratchbox/anjuta-scratchbox-48.png
==============================================================================
Binary file. No diff available.

Added: trunk/plugins/scratchbox/anjuta-scratchbox-panel.png
==============================================================================
Binary file. No diff available.

Added: trunk/plugins/scratchbox/anjuta-scratchbox.glade
==============================================================================
--- (empty file)
+++ trunk/plugins/scratchbox/anjuta-scratchbox.glade	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
+<glade-interface>
+  <widget class="GtkWindow" id="preferences_dialog_scratchbox">
+    <property name="title" translatable="yes">window1</property>
+    <child>
+      <widget class="GtkFrame" id="Scratchbox">
+        <property name="visible">True</property>
+        <property name="border_width">10</property>
+        <property name="label_xalign">0</property>
+        <property name="label_yalign">0</property>
+        <property name="shadow_type">GTK_SHADOW_NONE</property>
+        <child>
+          <widget class="GtkAlignment" id="alignment1">
+            <property name="visible">True</property>
+            <property name="xalign">0</property>
+            <property name="yalign">0</property>
+            <property name="left_padding">12</property>
+            <child>
+              <widget class="GtkTable" id="table1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="column_spacing">5</property>
+                <property name="row_spacing">5</property>
+                <child>
+                  <widget class="GtkHSeparator" id="hseparator2">
+                    <property name="visible">True</property>
+                  </widget>
+                  <packing>
+                    <property name="right_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkHSeparator" id="hseparator1">
+                    <property name="visible">True</property>
+                  </widget>
+                  <packing>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">5</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="xpad">5</property>
+                    <property name="label" translatable="yes">Scratchbox directory:</property>
+                    <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Scratchbox version:</property>
+                    <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkComboBox" id="preferences_combo:text:Sbox1,Sbox2:0:scratchbox.version">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="items">Sbox1
+Sbox2</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFileChooserButton" id="preferences_folder:text:/scratchbox:0:build.scratchbox.path">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="preview_widget_active">False</property>
+                    <property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
+                    <property name="title" translatable="yes">Select Scratchbox Folder</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label3">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Scratchbox target:</property>
+                    <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkComboBox" id="combo_target">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="items">host</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+              </widget>
+            </child>
+          </widget>
+        </child>
+        <child>
+          <widget class="GtkTable" id="table2">
+            <property name="visible">True</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <widget class="GtkLabel" id="label106">
+                <property name="visible">True</property>
+                <property name="xalign">1</property>
+                <property name="yalign">0</property>
+                <property name="ypad">14</property>
+                <property name="label" translatable="yes">&lt;b&gt;Scratchbox Options&lt;/b&gt;
+</property>
+                <property name="use_markup">True</property>
+                <property name="justify">GTK_JUSTIFY_FILL</property>
+              </widget>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkImage" id="anjuta-scratchbox-panel">
+                <property name="visible">True</property>
+                <property name="pixbuf">anjuta-scratchbox-panel.png</property>
+              </widget>
+              <packing>
+                <property name="x_options"></property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="type">label_item</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>

Added: trunk/plugins/scratchbox/anjuta-scratchbox.plugin.in
==============================================================================
--- (empty file)
+++ trunk/plugins/scratchbox/anjuta-scratchbox.plugin.in	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,6 @@
+[Anjuta Plugin]
+_Name=Scratchbox
+_Description=Change build commands to use scratchbox 1 or 2
+Location=anjuta-scratchbox:ScratchboxPlugin
+Icon=anjuta-scratchbox-48.png
+Interfaces=IAnjutaEnvironment

Added: trunk/plugins/scratchbox/plugin.c
==============================================================================
--- (empty file)
+++ trunk/plugins/scratchbox/plugin.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,565 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+    plugin.c
+    Copyright (C) 2008 SÃbastien Granjoux
+
+    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
+*/
+
+/*
+ * Plugins functions
+ *
+ *---------------------------------------------------------------------------*/
+
+#include <config.h>
+
+#include "plugin.h"
+
+#include <libanjuta/anjuta-launcher.h>
+#include <libanjuta/anjuta-debug.h>
+#include <libanjuta/interfaces/ianjuta-environment.h>
+#include <libanjuta/interfaces/ianjuta-preferences.h>
+
+/* Constantes
+ *---------------------------------------------------------------------------*/
+
+#define ICON_FILE "anjuta-scratchbox-48.png"
+#define GLADE_FILE PACKAGE_DATA_DIR"/glade/anjuta-scratchbox.glade"
+
+#define SB_ENTRY "preferences_folder:text:/scratchbox:0:build.scratchbox.path"
+#define SB_TARGET_ENTRY "combo_target"
+#define SB_SBOX_ENTRY "preferences_combo:text:Sbox1,Sbox2:0:scratchbox.version"
+
+#define PREF_SB_PATH "build.scratchbox.path"
+#define PREF_SB_VERSION "scratchbox.version"
+
+/* Type defintions
+ *---------------------------------------------------------------------------*/
+
+struct _ScratchboxPluginClass
+{
+	AnjutaPluginClass parent_class;
+};
+
+struct _ScratchboxPlugin
+{
+	AnjutaPlugin parent;
+	AnjutaLauncher *launcher;
+
+	/* Plugin Data */
+	gchar *user_dir;
+	gchar **target_list;
+	gchar *sb_dir;
+	gchar *target;
+	gint id;
+	gint combo_element;
+	GString *buffer;
+};
+
+GladeXML *gxml;
+
+#define EXECUTE_CMD	0
+#define TARGET_LIST	1
+
+static gchar *
+sbox2_commands_args[][2] = {
+	{ "bin/sb2", "-t" },	/* execute command */
+	{ "bin/sb2-config", "-l"},	/* target list */
+	{ NULL, NULL },
+};
+
+static gchar *
+sbox1_commands_args[][2] = {
+	{ "bin/login", "-d" },
+	{ "bin/sb-conf", "--list" },	/* target list */
+	{ NULL, NULL },
+};
+
+/* Callback for saving session
+ *---------------------------------------------------------------------------*/
+
+static void
+on_session_save (AnjutaShell *shell, AnjutaSessionPhase phase, AnjutaSession *session, ScratchboxPlugin *self)
+{
+	if (phase != ANJUTA_SESSION_PHASE_NORMAL)
+		return;
+}
+
+static void on_session_load (AnjutaShell *shell, AnjutaSessionPhase phase, AnjutaSession *session, ScratchboxPlugin *self)
+{
+	if (phase != ANJUTA_SESSION_PHASE_NORMAL)
+		return;
+}
+
+/* Callbacks
+ *---------------------------------------------------------------------------*/
+
+static void on_list_terminated (AnjutaLauncher *launcher, gint child_pid,
+                                gint status, gulong time_taken, gpointer data)
+{
+	g_return_if_fail (launcher != NULL);
+	
+	ScratchboxPlugin* plugin = ANJUTA_PLUGIN_SCRATCHBOX (data);
+
+	if (!(status != 0 || !plugin->buffer)) {
+		/* Program terminate normaly */
+		gint str_splitted_length;
+		gint i;
+		plugin->target_list = g_strsplit (plugin->buffer->str, "\n", 0);
+		str_splitted_length = g_strv_length (plugin->target_list) - 1;
+		
+		GtkWidget* combo_target_entry;
+		combo_target_entry = glade_xml_get_widget(gxml,
+							  SB_TARGET_ENTRY);
+
+		for (i = 1; i < plugin->combo_element; i++)
+			gtk_combo_box_remove_text(GTK_COMBO_BOX(combo_target_entry), 1);
+		plugin->combo_element = 1;
+
+		for (i = 0; i < str_splitted_length; i++) {
+			gtk_combo_box_append_text(GTK_COMBO_BOX(combo_target_entry), plugin->target_list[i]);
+			plugin->combo_element++;
+		}
+                
+		/* enable target combo box */
+		gtk_combo_box_set_active (GTK_COMBO_BOX(combo_target_entry),
+					  plugin->id);
+                gtk_widget_set_sensitive(combo_target_entry, TRUE);
+		g_strfreev (plugin->target_list);
+	}
+
+	plugin->target_list = NULL;
+}
+
+static void on_target (AnjutaLauncher *launcher, AnjutaLauncherOutputType out,
+		       const gchar* line, gpointer data)
+{
+	ScratchboxPlugin* plugin = ANJUTA_PLUGIN_SCRATCHBOX (data);
+	g_return_if_fail (line != NULL);
+	g_return_if_fail (plugin != NULL);
+
+	g_string_append (plugin->buffer, line);
+	
+}
+
+static void
+on_change_target(GtkComboBox *combo, ScratchboxPlugin *plugin)
+{
+	AnjutaShell* shell = ANJUTA_PLUGIN (plugin)->shell;
+	gint id;
+	
+	g_return_if_fail (plugin != NULL);
+	id = gtk_combo_box_get_active (combo);
+	if (plugin->target) {
+		g_free(plugin->target);
+		plugin->target = NULL;
+	}
+	plugin->target = gtk_combo_box_get_active_text (combo);
+	plugin->id = id > 0 ? id :0;
+
+	anjuta_preferences_set_int (anjuta_shell_get_preferences (shell, NULL),
+                                SB_TARGET_ENTRY,
+                                plugin->id);
+}
+
+static void
+on_update_target(GtkComboBox *combo, ScratchboxPlugin *plugin)
+{
+	AnjutaPreferences* prefs;
+	GString* command = g_string_new (NULL);
+	gchar* sbox_commands;
+	gchar* sbox_args;
+	gchar* sb_dir;
+	gchar* sb_ver;
+
+	g_return_if_fail (plugin != NULL);
+
+	prefs = anjuta_shell_get_preferences (ANJUTA_PLUGIN (plugin)->shell,
+						NULL);
+        sb_ver = anjuta_preferences_get(prefs, PREF_SB_VERSION);
+
+	sb_dir = anjuta_preferences_get(prefs, PREF_SB_PATH);
+
+        if (!sb_dir)
+                return;
+
+        g_string_printf (command, "%s%s", sb_dir, G_DIR_SEPARATOR_S);
+
+        if (!strcmp(sb_ver, "Sbox1")) {
+		sbox_commands = sbox1_commands_args[TARGET_LIST][0];
+		sbox_args = sbox1_commands_args[TARGET_LIST][1];
+        } else {
+		sbox_commands = sbox2_commands_args[TARGET_LIST][0];
+		sbox_args = sbox2_commands_args[TARGET_LIST][1];
+	}
+
+	g_string_append (command, sbox_commands);
+
+	if (g_file_test (command->str, G_FILE_TEST_EXISTS) == FALSE)
+        {
+		anjuta_util_dialog_error (GTK_WINDOW (ANJUTA_PLUGIN (plugin)->shell),
+					_("Program '%s' does not exists"), command->str);
+		return;
+        }
+
+	g_string_append_printf(command, " %s", sbox_args);
+	
+	if (!anjuta_launcher_is_busy (plugin->launcher))
+	{
+		GtkWidget* combo_target_entry;
+		
+		if (plugin->buffer != NULL) {
+			g_string_free (plugin->buffer, TRUE);
+			plugin->buffer = NULL;
+		}
+		
+		plugin->buffer = g_string_new(NULL);
+
+		combo_target_entry = glade_xml_get_widget(gxml,
+							  SB_TARGET_ENTRY);
+		/* disable target combo box */
+		gtk_widget_set_sensitive(combo_target_entry, FALSE);
+
+		anjuta_launcher_execute (plugin->launcher, command->str,
+					(AnjutaLauncherOutputCallback)on_target,
+					plugin);
+	}
+
+	g_string_free(command, TRUE);
+
+}
+
+static void
+on_change_directory(GtkFileChooserButton *FileChooser, gpointer user_data)
+{
+	ScratchboxPlugin *plugin = (ScratchboxPlugin *) user_data;
+	GtkWidget* combo_sbox_entry;
+	gchar *old_dir;
+
+	combo_sbox_entry = glade_xml_get_widget(gxml,
+						  SB_SBOX_ENTRY);
+	old_dir = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER(FileChooser));
+
+	if (!plugin->user_dir || strcmp(old_dir, plugin->user_dir) != 0) {
+		if (plugin->user_dir)
+			g_free(plugin->user_dir);
+		plugin->user_dir = g_strdup(old_dir);
+	} else
+		return;
+
+	g_free(old_dir);
+
+	on_update_target(GTK_COMBO_BOX(combo_sbox_entry), plugin);
+}
+
+/* Actions table
+ *---------------------------------------------------------------------------*/
+
+/* AnjutaPlugin functions
+ *---------------------------------------------------------------------------*/
+
+static gboolean
+scratchbox_plugin_activate (AnjutaPlugin *plugin)
+{
+	ScratchboxPlugin *self = ANJUTA_PLUGIN_SCRATCHBOX (plugin);
+	
+	DEBUG_PRINT ("%s", "Scratchbox 1 and 2 Plugin: Activating plugin...");
+
+	self->launcher = anjuta_launcher_new ();
+
+	/* Connect to session signal */
+	g_signal_connect (plugin->shell, "save-session",
+					  G_CALLBACK (on_session_save), self);
+	g_signal_connect (plugin->shell, "load-session",
+					  G_CALLBACK (on_session_load), self);
+
+	/* Connect launcher signal */
+	g_signal_connect (self->launcher, "child-exited",
+                          G_CALLBACK (on_list_terminated), self);
+	
+	return TRUE;
+}
+
+static gboolean
+scratchbox_plugin_deactivate (AnjutaPlugin *plugin)
+{
+	ScratchboxPlugin *self = ANJUTA_PLUGIN_SCRATCHBOX (plugin);
+
+	DEBUG_PRINT ("%s", "Scratchbox 1 Plugin: Deactivating plugin...");
+	
+	g_signal_handlers_disconnect_by_func (plugin->shell, G_CALLBACK (on_session_save), self);
+	g_signal_handlers_disconnect_by_func (plugin->shell, G_CALLBACK (on_session_load), self);
+	
+	return TRUE;
+}
+
+static void
+sbox2_environment_override (IAnjutaEnvironment* environment, gchar **dir, gchar ***argvp, gchar ***envp, GError** err)
+{
+	ScratchboxPlugin *plugin = ANJUTA_PLUGIN_SCRATCHBOX (environment);
+	AnjutaPreferences* prefs;
+	gchar **new_argv;
+	gchar* sb_dir;
+	int i;
+
+	if (plugin->target == NULL || !strcmp(plugin->target, "host"))
+		return;
+
+	prefs = anjuta_shell_get_preferences (ANJUTA_PLUGIN (plugin)->shell, NULL);
+	sb_dir = anjuta_preferences_get(prefs, PREF_SB_PATH);
+
+	if (plugin->user_dir) g_free (plugin->user_dir);
+	plugin->user_dir = g_strconcat (sb_dir, G_DIR_SEPARATOR_S, NULL);
+
+	/* Build in scratchbox environment */
+	gsize len_argv = g_strv_length (*argvp);
+
+	/* Add scratchbox login */
+	new_argv = g_new (gchar*, len_argv + 4);
+	new_argv[0] = g_strconcat (sb_dir, G_DIR_SEPARATOR_S,
+				   sbox2_commands_args[EXECUTE_CMD][0],
+				   NULL);
+	new_argv[1] = g_strconcat (sbox2_commands_args[EXECUTE_CMD][1], NULL);
+	new_argv[2] = g_strconcat (plugin->target, NULL);
+
+	for (i = 0; i < len_argv; i++)
+		new_argv[3 + i] = g_strconcat("\"", *(*argvp + i), "\"", NULL);
+	
+	g_free (*argvp);
+	*argvp = new_argv;
+	g_free(sb_dir);
+}
+static void
+sbox1_environment_override (IAnjutaEnvironment* environment, gchar **dir, gchar ***argvp, gchar ***envp, GError** err)
+{
+	ScratchboxPlugin *plugin = ANJUTA_PLUGIN_SCRATCHBOX (environment);
+	AnjutaPreferences* prefs;
+	gchar* sb_dir;
+	gsize len;
+
+	prefs = anjuta_shell_get_preferences (ANJUTA_PLUGIN (plugin)->shell, NULL);
+
+	sb_dir = anjuta_preferences_get(prefs, PREF_SB_PATH);
+	
+	if (plugin->user_dir) g_free (plugin->user_dir);
+	plugin->user_dir = g_strconcat (sb_dir, G_DIR_SEPARATOR_S,
+						   "users", G_DIR_SEPARATOR_S,
+						   g_get_user_name(), NULL);
+	
+	len = strlen (plugin->user_dir);
+
+	if (strncmp (*dir, plugin->user_dir, len) == 0)
+	{
+		/* Build in scratchbox environment */
+		gchar **new_argv;
+		gsize len_argv = g_strv_length (*argvp);
+
+		/* Add scratchbox login */
+		new_argv = g_new (gchar*, len_argv + 3);
+		memcpy (new_argv + 2, *argvp, sizeof(gchar *) * (len_argv + 1));
+		new_argv[0] = g_strconcat (sb_dir, G_DIR_SEPARATOR_S,
+					   sbox1_commands_args[EXECUTE_CMD][0],
+					   NULL);
+		new_argv[1] = g_strconcat (sbox1_commands_args[EXECUTE_CMD][1],
+					   (*dir) + len, NULL);
+		
+		g_free (*argvp);
+		*argvp = new_argv;
+	}
+
+	g_free (sb_dir);
+}
+
+/* IAnjutaEnvironment implementation
+ *---------------------------------------------------------------------------*/
+
+static gboolean
+ienvironment_override (IAnjutaEnvironment* environment, gchar **dir, gchar ***argvp, gchar ***envp, GError** err)
+{
+	ScratchboxPlugin *plugin = ANJUTA_PLUGIN_SCRATCHBOX (environment);
+	AnjutaPreferences* prefs;
+	gchar* sb_dir;
+	gchar* sb_ver;
+
+	prefs = anjuta_shell_get_preferences (ANJUTA_PLUGIN (plugin)->shell, NULL);
+	sb_dir = anjuta_preferences_get(prefs, PREF_SB_PATH);
+
+	if (!sb_dir)
+		return FALSE;
+
+	sb_ver = anjuta_preferences_get(prefs, PREF_SB_VERSION);
+	if (!strcmp(sb_ver, "Sbox1"))
+		sbox1_environment_override(environment, dir, argvp, envp, err);
+	else
+		sbox2_environment_override(environment, dir, argvp, envp, err);
+
+	return TRUE;
+}
+
+static gchar*
+ienvironment_get_real_directory (IAnjutaEnvironment* environment, gchar *dir, GError** err)
+{
+	ScratchboxPlugin *plugin = ANJUTA_PLUGIN_SCRATCHBOX (environment);
+
+	if (plugin->user_dir)
+	{
+		gchar *real_dir;
+		
+		real_dir = g_strconcat(plugin->user_dir, dir, NULL);
+		g_free (dir);
+	
+		return real_dir;
+	}
+	else
+	{
+		return dir;
+	}
+}
+
+static void
+ienvironment_iface_init(IAnjutaEnvironmentIface* iface)
+{
+	iface->override = ienvironment_override;
+	iface->get_real_directory = ienvironment_get_real_directory;
+}
+
+/* IAnjutaPreferences implementation
+ *---------------------------------------------------------------------------*/
+
+static void
+ipreferences_merge(IAnjutaPreferences* ipref, AnjutaPreferences* prefs, GError** e)
+{
+	ScratchboxPlugin* plugin = ANJUTA_PLUGIN_SCRATCHBOX (ipref);
+	GtkWidget* combo_target_entry;
+	GtkWidget *combo_sbox_entry;
+	GtkWidget *chooser_dir_entry;
+
+	/* Create the preferences page */
+	gxml = glade_xml_new (GLADE_FILE,
+					"preferences_dialog_scratchbox", NULL);
+	combo_target_entry = glade_xml_get_widget(gxml, SB_TARGET_ENTRY);
+	combo_sbox_entry = glade_xml_get_widget(gxml, SB_SBOX_ENTRY);
+	chooser_dir_entry = glade_xml_get_widget(gxml, SB_ENTRY);
+	
+	plugin->id = anjuta_preferences_get_int(prefs, SB_TARGET_ENTRY);
+
+	anjuta_preferences_add_page (prefs, gxml, "Scratchbox", _("Scratchbox"),  ICON_FILE);
+	g_signal_connect(chooser_dir_entry, "current-folder-changed",
+			 G_CALLBACK(on_change_directory),
+			 plugin);
+	g_signal_connect(combo_sbox_entry, "changed",
+			 G_CALLBACK(on_update_target), plugin);
+
+	g_signal_connect(combo_target_entry,
+			 "changed", G_CALLBACK(on_change_target),
+			 plugin);
+
+        plugin->target = gtk_combo_box_get_active_text (
+				GTK_COMBO_BOX(combo_target_entry));
+}
+
+static void
+ipreferences_unmerge(IAnjutaPreferences* ipref, AnjutaPreferences* prefs, GError** e)
+{
+	GtkWidget *sb_entry;
+
+	sb_entry = glade_xml_get_widget(gxml, SB_ENTRY);
+		
+	anjuta_preferences_remove_page(prefs, _("Scratchbox"));
+	
+	g_object_unref (gxml);
+}
+
+static void
+ipreferences_iface_init(IAnjutaPreferencesIface* iface)
+{
+	iface->merge = ipreferences_merge;
+	iface->unmerge = ipreferences_unmerge;	
+}
+
+/* GObject functions
+ *---------------------------------------------------------------------------*/
+
+/* Used in dispose and finalize */
+static gpointer parent_class;
+
+static void
+scratchbox_plugin_instance_init (GObject *obj)
+{
+	ScratchboxPlugin *plugin = ANJUTA_PLUGIN_SCRATCHBOX (obj);
+	
+	plugin->user_dir = NULL;
+	plugin->target_list = NULL;
+	plugin->buffer = NULL;
+	plugin->combo_element = 1;
+	plugin->launcher = NULL;
+	plugin->id = 0;
+	plugin->target = NULL;
+}
+
+/* dispose is used to unref object created with instance_init */
+
+static void
+scratchbox_plugin_dispose (GObject *obj)
+{
+	ScratchboxPlugin *plugin = ANJUTA_PLUGIN_SCRATCHBOX (obj);
+	
+	/* Warning this function could be called several times */
+
+	if (plugin->user_dir)
+	{
+		g_free (plugin->user_dir);
+		plugin->user_dir = NULL;
+	}
+	
+	G_OBJECT_CLASS (parent_class)->dispose (obj);
+}
+
+static void
+scratchbox_plugin_finalize (GObject *obj)
+{
+	/*ScratchboxPlugin *self = ANJUTA_PLUGIN_SCRATCHBOX (obj);*/
+	
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+/* finalize used to free object created with instance init is not used */
+
+static void
+scratchbox_plugin_class_init (GObjectClass *klass) 
+{
+	AnjutaPluginClass *plugin_class = ANJUTA_PLUGIN_CLASS (klass);
+
+	parent_class = g_type_class_peek_parent (klass);
+
+	plugin_class->activate = scratchbox_plugin_activate;
+	plugin_class->deactivate = scratchbox_plugin_deactivate;
+	klass->dispose = scratchbox_plugin_dispose;
+	klass->finalize = scratchbox_plugin_finalize;
+}
+
+/* AnjutaPlugin declaration
+ *---------------------------------------------------------------------------*/
+
+ANJUTA_PLUGIN_BEGIN (ScratchboxPlugin, scratchbox_plugin);
+ANJUTA_PLUGIN_ADD_INTERFACE (ienvironment, IANJUTA_TYPE_ENVIRONMENT);
+ANJUTA_PLUGIN_ADD_INTERFACE (ipreferences, IANJUTA_TYPE_PREFERENCES);
+ANJUTA_PLUGIN_END;
+			 
+ANJUTA_SIMPLE_PLUGIN (ScratchboxPlugin, scratchbox_plugin);
+
+/* Public functions
+*---------------------------------------------------------------------------*/
+

Added: trunk/plugins/scratchbox/plugin.h
==============================================================================
--- (empty file)
+++ trunk/plugins/scratchbox/plugin.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,37 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+    plugin.h
+    Copyright (C) 2008 SÃbastien Granjoux
+
+    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
+*/
+
+#ifndef _PLUGIN_H_
+#define _PLUGIN_H_
+
+#include <libanjuta/anjuta-plugin.h>
+
+extern GType scratchbox_plugin_get_type 		(GTypeModule *module);
+#define ANJUTA_TYPE_PLUGIN_SCRATCHBOX			(scratchbox_plugin_get_type (NULL))
+#define ANJUTA_PLUGIN_SCRATCHBOX(o)				(G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_PLUGIN_SCRATCHBOX, ScratchboxPlugin))
+#define ANJUTA_PLUGIN_SCRATCHBOX_CLASS(k)		(G_TYPE_CHECK_CLASS_CAST ((k), ANJUTA_TYPE_PLUGIN_SCRATCHBOX, ScratchboxPluginClass))
+#define ANJUTA_IS_PLUGIN_SCRATCHBOX(o)			(G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_PLUGIN_SCRATCHBOX))
+#define ANJUTA_IS_PLUGIN_SCRATCHBOX_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_PLUGIN_SCRATCHBOX))
+#define ANJUTA_PLUGIN_SCRATCHBOX_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), ANJUTA_TYPE_PLUGIN_SCRATCHBOX, ScratchboxPluginClass))
+
+typedef struct _ScratchboxPlugin ScratchboxPlugin;
+typedef struct _ScratchboxPluginClass ScratchboxPluginClass;
+
+#endif

Added: trunk/plugins/valgrind/Makefile
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/Makefile	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,846 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# plugins/valgrind/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+
+srcdir = .
+top_srcdir = ../..
+
+pkgdatadir = $(datadir)/anjuta-extras
+pkglibdir = $(libdir)/anjuta-extras
+pkgincludedir = $(includedir)/anjuta-extras
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+noinst_PROGRAMS = bugged-prg-test$(EXEEXT)
+subdir = plugins/valgrind
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(schemadir)" \
+	"$(DESTDIR)$(valgrind_gladedir)" \
+	"$(DESTDIR)$(valgrind_pixmapsdir)" \
+	"$(DESTDIR)$(valgrind_plugindir)" \
+	"$(DESTDIR)$(valgrind_uidir)"
+pluginLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(plugin_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libanjuta_valgrind_la_DEPENDENCIES =  \
+	$(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+am__libanjuta_valgrind_la_SOURCES_DIST = plugin.c plugin.h \
+	vggeneralprefs.c vggeneralprefs.h vgtoolprefs.h vgtoolprefs.c \
+	vgdefaultview.c vgdefaultview.h vgrulepattern.c \
+	vgrulepattern.h vgsearchbar.c vgsearchbar.h vgmarshal.h \
+	vgmarshal.c vgio.c vgio.h vgrule-list.h vgrule-list.c \
+	vgrule-editor.h vgrule-editor.c vgrule.c vgrule.h vgstrpool.c \
+	vgstrpool.h parser.c parser.h vgtoolview.c vgtoolview.h \
+	symtab.c symtab.h ldd.c ldd.h process.c process.h vgerror.c \
+	vgerror.h list.h list.c vgmemcheckprefs.c vgmemcheckprefs.h \
+	preferences.c preferences.h vgcachegrindprefs.c \
+	vgcachegrindprefs.h vghelgrindprefs.c vghelgrindprefs.h \
+	vgactions.c vgactions.h menu-utils.h menu-utils.c
+am_libanjuta_valgrind_la_OBJECTS =  \
+	plugin.lo vggeneralprefs.lo \
+	vgtoolprefs.lo vgdefaultview.lo \
+	vgrulepattern.lo vgsearchbar.lo \
+	vgmarshal.lo vgio.lo vgrule-list.lo \
+	vgrule-editor.lo vgrule.lo \
+	vgstrpool.lo parser.lo \
+	vgtoolview.lo symtab.lo ldd.lo \
+	process.lo vgerror.lo list.lo \
+	vgmemcheckprefs.lo preferences.lo \
+	vgcachegrindprefs.lo \
+	vghelgrindprefs.lo vgactions.lo \
+	menu-utils.lo
+libanjuta_valgrind_la_OBJECTS = $(am_libanjuta_valgrind_la_OBJECTS)
+am_libanjuta_valgrind_la_rpath = -rpath \
+	$(plugindir)
+PROGRAMS = $(noinst_PROGRAMS)
+am__bugged_prg_test_SOURCES_DIST = bugged-prg-test.c
+am_bugged_prg_test_OBJECTS =  \
+	bugged-prg-test.$(OBJEXT)
+bugged_prg_test_OBJECTS = $(am_bugged_prg_test_OBJECTS)
+bugged_prg_test_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libanjuta_valgrind_la_SOURCES) $(bugged_prg_test_SOURCES)
+DIST_SOURCES = $(am__libanjuta_valgrind_la_SOURCES_DIST) \
+	$(am__bugged_prg_test_SOURCES_DIST)
+schemaDATA_INSTALL = $(INSTALL_DATA)
+valgrind_gladeDATA_INSTALL = $(INSTALL_DATA)
+valgrind_pixmapsDATA_INSTALL = $(INSTALL_DATA)
+valgrind_pluginDATA_INSTALL = $(INSTALL_DATA)
+valgrind_uiDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(schema_DATA) $(valgrind_glade_DATA) $(valgrind_pixmaps_DATA) \
+	$(valgrind_plugin_DATA) $(valgrind_ui_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run aclocal-1.9
+ALL_LINGUAS = 
+AMDEP_FALSE = #
+AMDEP_TRUE = 
+AMTAR = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run automake-1.9
+AWK = mawk
+BINUTILS_REQUIRED = 2.15.92
+CATALOGS = 
+CATOBJEXT = .gmo
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CYGPATH_W = echo
+DATADIRNAME = share
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+EXTRA_CFLAGS = -DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/$(PACKAGE)"\" -DPACKAGE_LIB_DIR=\""$(pkglibdir)"\" -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"
+FGREP = /bin/grep -F
+GCONFTOOL = /usr/bin/gconftool-2
+GCONF_SCHEMAS_INSTALL_FALSE = #
+GCONF_SCHEMAS_INSTALL_TRUE = 
+GCONF_SCHEMA_CONFIG_SOURCE = xml:merged:/etc/gconf/gconf.xml.defaults
+GCONF_SCHEMA_FILE_DIR = $(sysconfdir)/gconf/schemas
+GETTEXT_PACKAGE = anjuta-extras
+GMOFILES = 
+GMSGFMT = /usr/bin/msgfmt
+GRAPHVIZ_CFLAGS = -I/usr/include/graphviz  
+GRAPHVIZ_LIBS = -lgvc -lgraph -lcdt  
+GREP = /bin/grep
+HAVE_GRAPHVIZ_FALSE = #
+HAVE_GRAPHVIZ_TRUE = 
+HAVE_PLUGIN_VALGRIND_FALSE = #
+HAVE_PLUGIN_VALGRIND_TRUE = 
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+INSTOBJEXT = .mo
+INTLLIBS = 
+INTLTOOL_CAVES_RULE = %.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_DESKTOP_RULE = %.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_DIRECTORY_RULE = %.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_EXTRACT = /usr/bin/intltool-extract
+INTLTOOL_KBD_RULE = %.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_KEYS_RULE = %.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_MERGE = /usr/bin/intltool-merge
+INTLTOOL_OAF_RULE = %.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@
+INTLTOOL_PERL = /usr/bin/perl
+INTLTOOL_POLICY_RULE = %.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_PONG_RULE = %.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_PROP_RULE = %.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SCHEMAS_RULE = %.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SERVER_RULE = %.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SERVICE_RULE = %.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SHEET_RULE = %.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_SOUNDLIST_RULE = %.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_THEME_RULE = %.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_UI_RULE = %.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_UPDATE = /usr/bin/intltool-update
+INTLTOOL_XAM_RULE = %.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+INTLTOOL_XML_NOMERGE_RULE = %.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@
+INTLTOOL_XML_RULE = %.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBANJUTA_CFLAGS = -DORBIT2=1 -pthread -D_REENTRANT -I/usr/include/libanjuta-1.0 -I/usr/include/libgnomeui-2.0 -I/usr/include/libglade-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/directfb -I/usr/include/libpng12  
+LIBANJUTA_LIBS = -pthread -lanjuta -lgnomeui-2 -lSM -lICE -lglade-2.0 -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgconf-2 -lgthread-2.0 -lrt -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0  
+LIBGRAPHVIZ_REQUIRED = 1.0
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAINT = #
+MAINTAINER_MODE_FALSE = 
+MAINTAINER_MODE_TRUE = #
+MAKEINFO = ${SHELL} /home/jhs/devel/anjuta-extras/missing --run makeinfo
+MKINSTALLDIRS = ./mkinstalldirs
+MSGFMT = /usr/bin/msgfmt
+MSGFMT_OPTS = -c
+MSGMERGE = /usr/bin/msgmerge
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OTOOL = 
+OTOOL64 = 
+PACKAGE = anjuta-extras
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = anjuta-extras
+PACKAGE_STRING = anjuta-extras 2.27.0
+PACKAGE_TARNAME = anjuta-extras
+PACKAGE_VERSION = 2.27.0
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PLUGIN_VALGRIND_LIBS = -Wl,-Bstatic -lbfd -liberty -Wl,-Bdynamic
+POFILES = 
+POSUB = po
+PO_IN_DATADIR_FALSE = 
+PO_IN_DATADIR_TRUE = 
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+STRIP = strip
+USE_NLS = yes
+VERSION = 2.27.0
+XGETTEXT = /usr/bin/xgettext
+ac_ct_CC = gcc
+ac_ct_DUMPBIN = 
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+anjuta_data_dir = $(anjutadatadir)/anjuta
+anjuta_glade_dir = $(anjutadatadir)/anjuta/glade
+anjuta_image_dir = $(anjutadatadir)/pixmaps/anjuta
+anjuta_plugin_dir = $(anjutalibdir)/anjuta
+anjuta_ui_dir = $(anjutadatadir)/anjuta/ui
+anjutadatadir = /usr/share
+anjutalibdir = /usr/lib
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = /home/jhs/devel/anjuta-extras/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias = 
+
+# Plugin UI file
+valgrind_uidir = $(anjuta_ui_dir)
+valgrind_ui_DATA = anjuta-valgrind.ui
+
+# Plugin glade file
+valgrind_gladedir = $(anjuta_glade_dir)
+valgrind_glade_DATA = anjuta-valgrind.glade
+
+# Plugin Icon file
+valgrind_pixmapsdir = $(anjuta_image_dir)
+valgrind_pixmaps_DATA = \
+	anjuta-valgrind-plugin.svg \
+	anjuta-valgrind-plugin-48.png
+
+
+# Plugin description file
+plugin_in_files = anjuta-valgrind.plugin.in
+valgrind_plugindir = $(anjuta_plugin_dir)
+valgrind_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
+
+# NOTE :
+# The naming convention is very intentional
+# We are forced to use the prefix 'lib' by automake and libtool
+#    There is probably a way to avoid it but it is not worth to effort
+#    to find out.
+# The 'anjuta_' prfix is a safety measure to avoid conflicts where the
+#    plugin 'libpython.so' needs to link with the real 'libpython.so'
+
+# Include paths
+AM_CPPFLAGS = \
+	$(LIBANJUTA_CFLAGS) \
+	$(EXTRA_CFLAGS)
+
+
+# Where to install the plugin
+plugindir = $(anjuta_plugin_dir)
+
+# The plugin
+plugin_LTLIBRARIES = libanjuta-valgrind.la
+libanjuta_valgrind_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
+
+# Plugin dependencies
+libanjuta_valgrind_la_LIBADD = \
+	$(LIBANJUTA_LIBS) \
+	$(PLUGIN_VALGRIND_LIBS)
+
+
+# Plugin sources
+libanjuta_valgrind_la_SOURCES = \
+	plugin.c \
+	plugin.h \
+	vggeneralprefs.c \
+	vggeneralprefs.h \
+	vgtoolprefs.h \
+	vgtoolprefs.c \
+	vgdefaultview.c \
+	vgdefaultview.h \
+	vgrulepattern.c \
+	vgrulepattern.h \
+	vgsearchbar.c \
+	vgsearchbar.h \
+	vgmarshal.h \
+	vgmarshal.c \
+	vgio.c \
+	vgio.h \
+	vgrule-list.h \
+	vgrule-list.c \
+	vgrule-editor.h \
+	vgrule-editor.c \
+	vgrule.c \
+	vgrule.h \
+	vgstrpool.c \
+	vgstrpool.h \
+	parser.c \
+	parser.h \
+	vgtoolview.c \
+	vgtoolview.h \
+	symtab.c \
+	symtab.h \
+	ldd.c \
+	ldd.h \
+	process.c \
+	process.h \
+	vgerror.c \
+	vgerror.h \
+	list.h \
+	list.c \
+	vgmemcheckprefs.c \
+	vgmemcheckprefs.h \
+	preferences.c \
+	preferences.h \
+	vgcachegrindprefs.c \
+	vgcachegrindprefs.h \
+	vghelgrindprefs.c \
+	vghelgrindprefs.h \
+	vgactions.c \
+	vgactions.h \
+	menu-utils.h \
+	menu-utils.c 
+
+MARSHAL_GENERATED = \
+		vgmarshal.c \
+		vgmarshal.h
+
+schemadir = $(sysconfdir)/gconf/schemas
+schema_DATA = anjuta-valgrind.schemas
+EXTRA_DIST = \
+	$(plugin_in_files) \
+	$(valgrind_plugin_DATA) \
+	$(valgrind_ui_DATA) \
+	$(valgrind_glade_DATA) \
+	$(valgrind_pixmaps_DATA) \
+	$(valgrind_glade_DATA) \
+	$(schema_DATA) \
+	vgmarshal.list
+
+GCONF_CONFIG_SOURCE = $(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$(schema_DATA)
+bugged_prg_test_SOURCES = \
+	bugged-prg-test.c 
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  plugins/valgrind/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  plugins/valgrind/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: # $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(plugindir)" || $(mkdir_p) "$(DESTDIR)$(plugindir)"
+	@list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-pluginLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \
+	done
+
+clean-pluginLTLIBRARIES:
+	-test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
+	@list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libanjuta-valgrind.la: $(libanjuta_valgrind_la_OBJECTS) $(libanjuta_valgrind_la_DEPENDENCIES) 
+	$(LINK) $(am_libanjuta_valgrind_la_rpath) $(libanjuta_valgrind_la_LDFLAGS) $(libanjuta_valgrind_la_OBJECTS) $(libanjuta_valgrind_la_LIBADD) $(LIBS)
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+bugged-prg-test$(EXEEXT): $(bugged_prg_test_OBJECTS) $(bugged_prg_test_DEPENDENCIES) 
+	@rm -f bugged-prg-test$(EXEEXT)
+	$(LINK) $(bugged_prg_test_LDFLAGS) $(bugged_prg_test_OBJECTS) $(bugged_prg_test_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/bugged-prg-test.Po
+include ./$(DEPDIR)/ldd.Plo
+include ./$(DEPDIR)/list.Plo
+include ./$(DEPDIR)/menu-utils.Plo
+include ./$(DEPDIR)/parser.Plo
+include ./$(DEPDIR)/plugin.Plo
+include ./$(DEPDIR)/preferences.Plo
+include ./$(DEPDIR)/process.Plo
+include ./$(DEPDIR)/symtab.Plo
+include ./$(DEPDIR)/vgactions.Plo
+include ./$(DEPDIR)/vgcachegrindprefs.Plo
+include ./$(DEPDIR)/vgdefaultview.Plo
+include ./$(DEPDIR)/vgerror.Plo
+include ./$(DEPDIR)/vggeneralprefs.Plo
+include ./$(DEPDIR)/vghelgrindprefs.Plo
+include ./$(DEPDIR)/vgio.Plo
+include ./$(DEPDIR)/vgmarshal.Plo
+include ./$(DEPDIR)/vgmemcheckprefs.Plo
+include ./$(DEPDIR)/vgrule-editor.Plo
+include ./$(DEPDIR)/vgrule-list.Plo
+include ./$(DEPDIR)/vgrule.Plo
+include ./$(DEPDIR)/vgrulepattern.Plo
+include ./$(DEPDIR)/vgsearchbar.Plo
+include ./$(DEPDIR)/vgstrpool.Plo
+include ./$(DEPDIR)/vgtoolprefs.Plo
+include ./$(DEPDIR)/vgtoolview.Plo
+
+.c.o:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c $<
+
+.c.obj:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-schemaDATA: $(schema_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(schemadir)" || $(mkdir_p) "$(DESTDIR)$(schemadir)"
+	@list='$(schema_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(schemaDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(schemadir)/$$f'"; \
+	  $(schemaDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(schemadir)/$$f"; \
+	done
+
+uninstall-schemaDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(schema_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(schemadir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(schemadir)/$$f"; \
+	done
+install-valgrind_gladeDATA: $(valgrind_glade_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(valgrind_gladedir)" || $(mkdir_p) "$(DESTDIR)$(valgrind_gladedir)"
+	@list='$(valgrind_glade_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(valgrind_gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(valgrind_gladedir)/$$f'"; \
+	  $(valgrind_gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(valgrind_gladedir)/$$f"; \
+	done
+
+uninstall-valgrind_gladeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(valgrind_glade_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(valgrind_gladedir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(valgrind_gladedir)/$$f"; \
+	done
+install-valgrind_pixmapsDATA: $(valgrind_pixmaps_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(valgrind_pixmapsdir)" || $(mkdir_p) "$(DESTDIR)$(valgrind_pixmapsdir)"
+	@list='$(valgrind_pixmaps_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(valgrind_pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(valgrind_pixmapsdir)/$$f'"; \
+	  $(valgrind_pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(valgrind_pixmapsdir)/$$f"; \
+	done
+
+uninstall-valgrind_pixmapsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(valgrind_pixmaps_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(valgrind_pixmapsdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(valgrind_pixmapsdir)/$$f"; \
+	done
+install-valgrind_pluginDATA: $(valgrind_plugin_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(valgrind_plugindir)" || $(mkdir_p) "$(DESTDIR)$(valgrind_plugindir)"
+	@list='$(valgrind_plugin_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(valgrind_pluginDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(valgrind_plugindir)/$$f'"; \
+	  $(valgrind_pluginDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(valgrind_plugindir)/$$f"; \
+	done
+
+uninstall-valgrind_pluginDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(valgrind_plugin_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(valgrind_plugindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(valgrind_plugindir)/$$f"; \
+	done
+install-valgrind_uiDATA: $(valgrind_ui_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(valgrind_uidir)" || $(mkdir_p) "$(DESTDIR)$(valgrind_uidir)"
+	@list='$(valgrind_ui_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(valgrind_uiDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(valgrind_uidir)/$$f'"; \
+	  $(valgrind_uiDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(valgrind_uidir)/$$f"; \
+	done
+
+uninstall-valgrind_uiDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(valgrind_ui_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(valgrind_uidir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(valgrind_uidir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(schemadir)" "$(DESTDIR)$(valgrind_gladedir)" "$(DESTDIR)$(valgrind_pixmapsdir)" "$(DESTDIR)$(valgrind_plugindir)" "$(DESTDIR)$(valgrind_uidir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+#uninstall-local:
+#install-data-local:
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+	clean-pluginLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local install-pluginLTLIBRARIES \
+	install-schemaDATA install-valgrind_gladeDATA \
+	install-valgrind_pixmapsDATA install-valgrind_pluginDATA \
+	install-valgrind_uiDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-local \
+	uninstall-pluginLTLIBRARIES uninstall-schemaDATA \
+	uninstall-valgrind_gladeDATA uninstall-valgrind_pixmapsDATA \
+	uninstall-valgrind_pluginDATA uninstall-valgrind_uiDATA
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstPROGRAMS clean-pluginLTLIBRARIES \
+	ctags distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-data-local install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-pluginLTLIBRARIES install-schemaDATA install-strip \
+	install-valgrind_gladeDATA install-valgrind_pixmapsDATA \
+	install-valgrind_pluginDATA install-valgrind_uiDATA \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-info-am uninstall-local \
+	uninstall-pluginLTLIBRARIES uninstall-schemaDATA \
+	uninstall-valgrind_gladeDATA uninstall-valgrind_pixmapsDATA \
+	uninstall-valgrind_pluginDATA uninstall-valgrind_uiDATA
+
+%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+vgmarshal.h: vgmarshal.list
+        ( @GLIB_GENMARSHAL@ --prefix=vg_marshal $(srcdir)/vgmarshal.list --header > vgmarshal.h.tmp \
+        && mv vgmarshal.h.tmp vgmarshal.h ) \
+        || ( rm -f vgmarshal.h.tmp && exit 1 )
+
+vgmarshal.c: vgmarshal.h
+        ( @GLIB_GENMARSHAL@ --prefix=vg_marshal $(srcdir)/vgmarshal.list --body > vgmarshal.c.tmp \
+        && mv vgmarshal.c.tmp vgmarshal.c ) \
+        || ( rm -f vgmarshal.c.tmp && exit 1 )
+
+install-data-local:
+
+uninstall-local:
+	GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-uninstall-rule $(srcdir)/$(schema_DATA)
+#install-data-local:
+
+#uninstall-local:
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: trunk/plugins/valgrind/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/Makefile.am	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,152 @@
+if HAVE_PLUGIN_VALGRIND
+
+# Plugin UI file
+valgrind_uidir = $(anjuta_ui_dir)
+valgrind_ui_DATA = anjuta-valgrind.ui
+
+
+# Plugin glade file
+valgrind_gladedir = $(anjuta_glade_dir)
+valgrind_glade_DATA = anjuta-valgrind.glade
+
+# Plugin Icon file
+valgrind_pixmapsdir = $(anjuta_image_dir)
+valgrind_pixmaps_DATA = \
+	anjuta-valgrind-plugin.svg \
+	anjuta-valgrind-plugin-48.png
+
+# Plugin description file
+plugin_in_files = anjuta-valgrind.plugin.in
+%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+valgrind_plugindir = $(anjuta_plugin_dir)
+valgrind_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
+
+# NOTE :
+# The naming convention is very intentional
+# We are forced to use the prefix 'lib' by automake and libtool
+#    There is probably a way to avoid it but it is not worth to effort
+#    to find out.
+# The 'anjuta_' prfix is a safety measure to avoid conflicts where the
+#    plugin 'libpython.so' needs to link with the real 'libpython.so'
+
+# Include paths
+AM_CPPFLAGS = \
+	$(LIBANJUTA_CFLAGS) \
+	$(EXTRA_CFLAGS)
+
+# Where to install the plugin
+plugindir = $(anjuta_plugin_dir)
+
+# The plugin
+plugin_LTLIBRARIES = libanjuta-valgrind.la
+
+libanjuta_valgrind_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
+
+# Plugin dependencies
+libanjuta_valgrind_la_LIBADD = \
+	$(LIBANJUTA_LIBS) \
+	$(PLUGIN_VALGRIND_LIBS)
+
+# Plugin sources
+libanjuta_valgrind_la_SOURCES = \
+	plugin.c \
+	plugin.h \
+	vggeneralprefs.c \
+	vggeneralprefs.h \
+	vgtoolprefs.h \
+	vgtoolprefs.c \
+	vgdefaultview.c \
+	vgdefaultview.h \
+	vgrulepattern.c \
+	vgrulepattern.h \
+	vgsearchbar.c \
+	vgsearchbar.h \
+	vgmarshal.h \
+	vgmarshal.c \
+	vgio.c \
+	vgio.h \
+	vgrule-list.h \
+	vgrule-list.c \
+	vgrule-editor.h \
+	vgrule-editor.c \
+	vgrule.c \
+	vgrule.h \
+	vgstrpool.c \
+	vgstrpool.h \
+	parser.c \
+	parser.h \
+	vgtoolview.c \
+	vgtoolview.h \
+	symtab.c \
+	symtab.h \
+	ldd.c \
+	ldd.h \
+	process.c \
+	process.h \
+	vgerror.c \
+	vgerror.h \
+	list.h \
+	list.c \
+	vgmemcheckprefs.c \
+	vgmemcheckprefs.h \
+	preferences.c \
+	preferences.h \
+	vgcachegrindprefs.c \
+	vgcachegrindprefs.h \
+	vghelgrindprefs.c \
+	vghelgrindprefs.h \
+	vgactions.c \
+	vgactions.h \
+	menu-utils.h \
+	menu-utils.c 
+
+vgmarshal.h: vgmarshal.list
+        ( @GLIB_GENMARSHAL@ --prefix=vg_marshal $(srcdir)/vgmarshal.list --header > vgmarshal.h.tmp \
+        && mv vgmarshal.h.tmp vgmarshal.h ) \
+        || ( rm -f vgmarshal.h.tmp && exit 1 )
+
+vgmarshal.c: vgmarshal.h
+        ( @GLIB_GENMARSHAL@ --prefix=vg_marshal $(srcdir)/vgmarshal.list --body > vgmarshal.c.tmp \
+        && mv vgmarshal.c.tmp vgmarshal.c ) \
+        || ( rm -f vgmarshal.c.tmp && exit 1 )
+
+MARSHAL_GENERATED = \
+		vgmarshal.c \
+		vgmarshal.h
+
+
+schemadir   = @GCONF_SCHEMA_FILE_DIR@
+schema_DATA = anjuta-valgrind.schemas
+
+EXTRA_DIST = \
+	$(plugin_in_files) \
+	$(valgrind_plugin_DATA) \
+	$(valgrind_ui_DATA) \
+	$(valgrind_glade_DATA) \
+	$(valgrind_pixmaps_DATA) \
+	$(valgrind_glade_DATA) \
+	$(schema_DATA) \
+	vgmarshal.list
+
+if GCONF_SCHEMAS_INSTALL
+install-data-local:
+        GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$(schema_DATA)
+
+uninstall-local:
+	GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-uninstall-rule $(srcdir)/$(schema_DATA)
+else
+install-data-local:
+
+uninstall-local:
+endif
+	
+noinst_PROGRAMS = \
+	bugged-prg-test 
+
+bugged_prg_test_SOURCES = \
+	bugged-prg-test.c 
+
+endif
+
+

Added: trunk/plugins/valgrind/Makefile.in
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/Makefile.in	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,846 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ SET_MAKE@
+
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+ HAVE_PLUGIN_VALGRIND_TRUE@noinst_PROGRAMS = bugged-prg-test$(EXEEXT)
+subdir = plugins/valgrind
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(schemadir)" \
+	"$(DESTDIR)$(valgrind_gladedir)" \
+	"$(DESTDIR)$(valgrind_pixmapsdir)" \
+	"$(DESTDIR)$(valgrind_plugindir)" \
+	"$(DESTDIR)$(valgrind_uidir)"
+pluginLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(plugin_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+ HAVE_PLUGIN_VALGRIND_TRUE@libanjuta_valgrind_la_DEPENDENCIES =  \
+ HAVE_PLUGIN_VALGRIND_TRUE@	$(am__DEPENDENCIES_1) \
+ HAVE_PLUGIN_VALGRIND_TRUE@	$(am__DEPENDENCIES_1)
+am__libanjuta_valgrind_la_SOURCES_DIST = plugin.c plugin.h \
+	vggeneralprefs.c vggeneralprefs.h vgtoolprefs.h vgtoolprefs.c \
+	vgdefaultview.c vgdefaultview.h vgrulepattern.c \
+	vgrulepattern.h vgsearchbar.c vgsearchbar.h vgmarshal.h \
+	vgmarshal.c vgio.c vgio.h vgrule-list.h vgrule-list.c \
+	vgrule-editor.h vgrule-editor.c vgrule.c vgrule.h vgstrpool.c \
+	vgstrpool.h parser.c parser.h vgtoolview.c vgtoolview.h \
+	symtab.c symtab.h ldd.c ldd.h process.c process.h vgerror.c \
+	vgerror.h list.h list.c vgmemcheckprefs.c vgmemcheckprefs.h \
+	preferences.c preferences.h vgcachegrindprefs.c \
+	vgcachegrindprefs.h vghelgrindprefs.c vghelgrindprefs.h \
+	vgactions.c vgactions.h menu-utils.h menu-utils.c
+ HAVE_PLUGIN_VALGRIND_TRUE@am_libanjuta_valgrind_la_OBJECTS =  \
+ HAVE_PLUGIN_VALGRIND_TRUE@	plugin.lo vggeneralprefs.lo \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgtoolprefs.lo vgdefaultview.lo \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgrulepattern.lo vgsearchbar.lo \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgmarshal.lo vgio.lo vgrule-list.lo \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgrule-editor.lo vgrule.lo \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgstrpool.lo parser.lo \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgtoolview.lo symtab.lo ldd.lo \
+ HAVE_PLUGIN_VALGRIND_TRUE@	process.lo vgerror.lo list.lo \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgmemcheckprefs.lo preferences.lo \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgcachegrindprefs.lo \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vghelgrindprefs.lo vgactions.lo \
+ HAVE_PLUGIN_VALGRIND_TRUE@	menu-utils.lo
+libanjuta_valgrind_la_OBJECTS = $(am_libanjuta_valgrind_la_OBJECTS)
+ HAVE_PLUGIN_VALGRIND_TRUE@am_libanjuta_valgrind_la_rpath = -rpath \
+ HAVE_PLUGIN_VALGRIND_TRUE@	$(plugindir)
+PROGRAMS = $(noinst_PROGRAMS)
+am__bugged_prg_test_SOURCES_DIST = bugged-prg-test.c
+ HAVE_PLUGIN_VALGRIND_TRUE@am_bugged_prg_test_OBJECTS =  \
+ HAVE_PLUGIN_VALGRIND_TRUE@	bugged-prg-test.$(OBJEXT)
+bugged_prg_test_OBJECTS = $(am_bugged_prg_test_OBJECTS)
+bugged_prg_test_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libanjuta_valgrind_la_SOURCES) $(bugged_prg_test_SOURCES)
+DIST_SOURCES = $(am__libanjuta_valgrind_la_SOURCES_DIST) \
+	$(am__bugged_prg_test_SOURCES_DIST)
+schemaDATA_INSTALL = $(INSTALL_DATA)
+valgrind_gladeDATA_INSTALL = $(INSTALL_DATA)
+valgrind_pixmapsDATA_INSTALL = $(INSTALL_DATA)
+valgrind_pluginDATA_INSTALL = $(INSTALL_DATA)
+valgrind_uiDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(schema_DATA) $(valgrind_glade_DATA) $(valgrind_pixmaps_DATA) \
+	$(valgrind_plugin_DATA) $(valgrind_ui_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BINUTILS_REQUIRED = @BINUTILS_REQUIRED@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRA_CFLAGS = @EXTRA_CFLAGS@
+FGREP = @FGREP@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@
+GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GRAPHVIZ_CFLAGS = @GRAPHVIZ_CFLAGS@
+GRAPHVIZ_LIBS = @GRAPHVIZ_LIBS@
+GREP = @GREP@
+HAVE_GRAPHVIZ_FALSE = @HAVE_GRAPHVIZ_FALSE@
+HAVE_GRAPHVIZ_TRUE = @HAVE_GRAPHVIZ_TRUE@
+HAVE_PLUGIN_VALGRIND_FALSE = @HAVE_PLUGIN_VALGRIND_FALSE@
+HAVE_PLUGIN_VALGRIND_TRUE = @HAVE_PLUGIN_VALGRIND_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBANJUTA_CFLAGS = @LIBANJUTA_CFLAGS@
+LIBANJUTA_LIBS = @LIBANJUTA_LIBS@
+LIBGRAPHVIZ_REQUIRED = @LIBGRAPHVIZ_REQUIRED@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGIN_VALGRIND_LIBS = @PLUGIN_VALGRIND_LIBS@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+anjuta_data_dir = @anjuta_data_dir@
+anjuta_glade_dir = @anjuta_glade_dir@
+anjuta_image_dir = @anjuta_image_dir@
+anjuta_plugin_dir = @anjuta_plugin_dir@
+anjuta_ui_dir = @anjuta_ui_dir@
+anjutadatadir = @anjutadatadir@
+anjutalibdir = @anjutalibdir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+
+# Plugin UI file
+ HAVE_PLUGIN_VALGRIND_TRUE@valgrind_uidir = $(anjuta_ui_dir)
+ HAVE_PLUGIN_VALGRIND_TRUE@valgrind_ui_DATA = anjuta-valgrind.ui
+
+# Plugin glade file
+ HAVE_PLUGIN_VALGRIND_TRUE@valgrind_gladedir = $(anjuta_glade_dir)
+ HAVE_PLUGIN_VALGRIND_TRUE@valgrind_glade_DATA = anjuta-valgrind.glade
+
+# Plugin Icon file
+ HAVE_PLUGIN_VALGRIND_TRUE@valgrind_pixmapsdir = $(anjuta_image_dir)
+ HAVE_PLUGIN_VALGRIND_TRUE@valgrind_pixmaps_DATA = \
+ HAVE_PLUGIN_VALGRIND_TRUE@	anjuta-valgrind-plugin.svg \
+ HAVE_PLUGIN_VALGRIND_TRUE@	anjuta-valgrind-plugin-48.png
+
+
+# Plugin description file
+ HAVE_PLUGIN_VALGRIND_TRUE@plugin_in_files = anjuta-valgrind.plugin.in
+ HAVE_PLUGIN_VALGRIND_TRUE@valgrind_plugindir = $(anjuta_plugin_dir)
+ HAVE_PLUGIN_VALGRIND_TRUE@valgrind_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
+
+# NOTE :
+# The naming convention is very intentional
+# We are forced to use the prefix 'lib' by automake and libtool
+#    There is probably a way to avoid it but it is not worth to effort
+#    to find out.
+# The 'anjuta_' prfix is a safety measure to avoid conflicts where the
+#    plugin 'libpython.so' needs to link with the real 'libpython.so'
+
+# Include paths
+ HAVE_PLUGIN_VALGRIND_TRUE@AM_CPPFLAGS = \
+ HAVE_PLUGIN_VALGRIND_TRUE@	$(LIBANJUTA_CFLAGS) \
+ HAVE_PLUGIN_VALGRIND_TRUE@	$(EXTRA_CFLAGS)
+
+
+# Where to install the plugin
+ HAVE_PLUGIN_VALGRIND_TRUE@plugindir = $(anjuta_plugin_dir)
+
+# The plugin
+ HAVE_PLUGIN_VALGRIND_TRUE@plugin_LTLIBRARIES = libanjuta-valgrind.la
+ HAVE_PLUGIN_VALGRIND_TRUE@libanjuta_valgrind_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
+
+# Plugin dependencies
+ HAVE_PLUGIN_VALGRIND_TRUE@libanjuta_valgrind_la_LIBADD = \
+ HAVE_PLUGIN_VALGRIND_TRUE@	$(LIBANJUTA_LIBS) \
+ HAVE_PLUGIN_VALGRIND_TRUE@	$(PLUGIN_VALGRIND_LIBS)
+
+
+# Plugin sources
+ HAVE_PLUGIN_VALGRIND_TRUE@libanjuta_valgrind_la_SOURCES = \
+ HAVE_PLUGIN_VALGRIND_TRUE@	plugin.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	plugin.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vggeneralprefs.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vggeneralprefs.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgtoolprefs.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgtoolprefs.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgdefaultview.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgdefaultview.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgrulepattern.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgrulepattern.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgsearchbar.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgsearchbar.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgmarshal.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgmarshal.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgio.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgio.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgrule-list.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgrule-list.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgrule-editor.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgrule-editor.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgrule.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgrule.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgstrpool.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgstrpool.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	parser.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	parser.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgtoolview.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgtoolview.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	symtab.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	symtab.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	ldd.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	ldd.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	process.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	process.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgerror.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgerror.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	list.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	list.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgmemcheckprefs.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgmemcheckprefs.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	preferences.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	preferences.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgcachegrindprefs.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgcachegrindprefs.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vghelgrindprefs.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vghelgrindprefs.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgactions.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgactions.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	menu-utils.h \
+ HAVE_PLUGIN_VALGRIND_TRUE@	menu-utils.c 
+
+ HAVE_PLUGIN_VALGRIND_TRUE@MARSHAL_GENERATED = \
+ HAVE_PLUGIN_VALGRIND_TRUE@		vgmarshal.c \
+ HAVE_PLUGIN_VALGRIND_TRUE@		vgmarshal.h
+
+ HAVE_PLUGIN_VALGRIND_TRUE@schemadir = @GCONF_SCHEMA_FILE_DIR@
+ HAVE_PLUGIN_VALGRIND_TRUE@schema_DATA = anjuta-valgrind.schemas
+ HAVE_PLUGIN_VALGRIND_TRUE@EXTRA_DIST = \
+ HAVE_PLUGIN_VALGRIND_TRUE@	$(plugin_in_files) \
+ HAVE_PLUGIN_VALGRIND_TRUE@	$(valgrind_plugin_DATA) \
+ HAVE_PLUGIN_VALGRIND_TRUE@	$(valgrind_ui_DATA) \
+ HAVE_PLUGIN_VALGRIND_TRUE@	$(valgrind_glade_DATA) \
+ HAVE_PLUGIN_VALGRIND_TRUE@	$(valgrind_pixmaps_DATA) \
+ HAVE_PLUGIN_VALGRIND_TRUE@	$(valgrind_glade_DATA) \
+ HAVE_PLUGIN_VALGRIND_TRUE@	$(schema_DATA) \
+ HAVE_PLUGIN_VALGRIND_TRUE@	vgmarshal.list
+
+ GCONF_SCHEMAS_INSTALL_TRUE@@HAVE_PLUGIN_VALGRIND_TRUE GCONF_CONFIG_SOURCE = $(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$(schema_DATA)
+ HAVE_PLUGIN_VALGRIND_TRUE@bugged_prg_test_SOURCES = \
+ HAVE_PLUGIN_VALGRIND_TRUE@	bugged-prg-test.c 
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  plugins/valgrind/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  plugins/valgrind/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(plugindir)" || $(mkdir_p) "$(DESTDIR)$(plugindir)"
+	@list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-pluginLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \
+	done
+
+clean-pluginLTLIBRARIES:
+	-test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
+	@list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libanjuta-valgrind.la: $(libanjuta_valgrind_la_OBJECTS) $(libanjuta_valgrind_la_DEPENDENCIES) 
+	$(LINK) $(am_libanjuta_valgrind_la_rpath) $(libanjuta_valgrind_la_LDFLAGS) $(libanjuta_valgrind_la_OBJECTS) $(libanjuta_valgrind_la_LIBADD) $(LIBS)
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+bugged-prg-test$(EXEEXT): $(bugged_prg_test_OBJECTS) $(bugged_prg_test_DEPENDENCIES) 
+	@rm -f bugged-prg-test$(EXEEXT)
+	$(LINK) $(bugged_prg_test_LDFLAGS) $(bugged_prg_test_OBJECTS) $(bugged_prg_test_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/bugged-prg-test Po am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/ldd Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/list Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/menu-utils Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/parser Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/plugin Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/preferences Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/process Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/symtab Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vgactions Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vgcachegrindprefs Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vgdefaultview Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vgerror Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vggeneralprefs Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vghelgrindprefs Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vgio Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vgmarshal Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vgmemcheckprefs Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vgrule-editor Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vgrule-list Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vgrule Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vgrulepattern Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vgsearchbar Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vgstrpool Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vgtoolprefs Plo am__quote@
+ AMDEP_TRUE@@am__include@ @am__quote  /$(DEPDIR)/vgtoolview Plo am__quote@
+
+.c.o:
+ am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-schemaDATA: $(schema_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(schemadir)" || $(mkdir_p) "$(DESTDIR)$(schemadir)"
+	@list='$(schema_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(schemaDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(schemadir)/$$f'"; \
+	  $(schemaDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(schemadir)/$$f"; \
+	done
+
+uninstall-schemaDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(schema_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(schemadir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(schemadir)/$$f"; \
+	done
+install-valgrind_gladeDATA: $(valgrind_glade_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(valgrind_gladedir)" || $(mkdir_p) "$(DESTDIR)$(valgrind_gladedir)"
+	@list='$(valgrind_glade_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(valgrind_gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(valgrind_gladedir)/$$f'"; \
+	  $(valgrind_gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(valgrind_gladedir)/$$f"; \
+	done
+
+uninstall-valgrind_gladeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(valgrind_glade_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(valgrind_gladedir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(valgrind_gladedir)/$$f"; \
+	done
+install-valgrind_pixmapsDATA: $(valgrind_pixmaps_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(valgrind_pixmapsdir)" || $(mkdir_p) "$(DESTDIR)$(valgrind_pixmapsdir)"
+	@list='$(valgrind_pixmaps_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(valgrind_pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(valgrind_pixmapsdir)/$$f'"; \
+	  $(valgrind_pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(valgrind_pixmapsdir)/$$f"; \
+	done
+
+uninstall-valgrind_pixmapsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(valgrind_pixmaps_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(valgrind_pixmapsdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(valgrind_pixmapsdir)/$$f"; \
+	done
+install-valgrind_pluginDATA: $(valgrind_plugin_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(valgrind_plugindir)" || $(mkdir_p) "$(DESTDIR)$(valgrind_plugindir)"
+	@list='$(valgrind_plugin_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(valgrind_pluginDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(valgrind_plugindir)/$$f'"; \
+	  $(valgrind_pluginDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(valgrind_plugindir)/$$f"; \
+	done
+
+uninstall-valgrind_pluginDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(valgrind_plugin_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(valgrind_plugindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(valgrind_plugindir)/$$f"; \
+	done
+install-valgrind_uiDATA: $(valgrind_ui_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(valgrind_uidir)" || $(mkdir_p) "$(DESTDIR)$(valgrind_uidir)"
+	@list='$(valgrind_ui_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(valgrind_uiDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(valgrind_uidir)/$$f'"; \
+	  $(valgrind_uiDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(valgrind_uidir)/$$f"; \
+	done
+
+uninstall-valgrind_uiDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(valgrind_ui_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(valgrind_uidir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(valgrind_uidir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(schemadir)" "$(DESTDIR)$(valgrind_gladedir)" "$(DESTDIR)$(valgrind_pixmapsdir)" "$(DESTDIR)$(valgrind_plugindir)" "$(DESTDIR)$(valgrind_uidir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+ HAVE_PLUGIN_VALGRIND_FALSE@uninstall-local:
+ HAVE_PLUGIN_VALGRIND_FALSE@install-data-local:
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+	clean-pluginLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local install-pluginLTLIBRARIES \
+	install-schemaDATA install-valgrind_gladeDATA \
+	install-valgrind_pixmapsDATA install-valgrind_pluginDATA \
+	install-valgrind_uiDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-local \
+	uninstall-pluginLTLIBRARIES uninstall-schemaDATA \
+	uninstall-valgrind_gladeDATA uninstall-valgrind_pixmapsDATA \
+	uninstall-valgrind_pluginDATA uninstall-valgrind_uiDATA
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstPROGRAMS clean-pluginLTLIBRARIES \
+	ctags distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-data-local install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-pluginLTLIBRARIES install-schemaDATA install-strip \
+	install-valgrind_gladeDATA install-valgrind_pixmapsDATA \
+	install-valgrind_pluginDATA install-valgrind_uiDATA \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-info-am uninstall-local \
+	uninstall-pluginLTLIBRARIES uninstall-schemaDATA \
+	uninstall-valgrind_gladeDATA uninstall-valgrind_pixmapsDATA \
+	uninstall-valgrind_pluginDATA uninstall-valgrind_uiDATA
+
+ HAVE_PLUGIN_VALGRIND_TRUE@%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+ HAVE_PLUGIN_VALGRIND_TRUE@vgmarshal.h: vgmarshal.list
+ HAVE_PLUGIN_VALGRIND_TRUE@        ( @GLIB_GENMARSHAL@ --prefix=vg_marshal $(srcdir)/vgmarshal.list --header > vgmarshal.h.tmp \
+ HAVE_PLUGIN_VALGRIND_TRUE@        && mv vgmarshal.h.tmp vgmarshal.h ) \
+ HAVE_PLUGIN_VALGRIND_TRUE@        || ( rm -f vgmarshal.h.tmp && exit 1 )
+
+ HAVE_PLUGIN_VALGRIND_TRUE@vgmarshal.c: vgmarshal.h
+ HAVE_PLUGIN_VALGRIND_TRUE@        ( @GLIB_GENMARSHAL@ --prefix=vg_marshal $(srcdir)/vgmarshal.list --body > vgmarshal.c.tmp \
+ HAVE_PLUGIN_VALGRIND_TRUE@        && mv vgmarshal.c.tmp vgmarshal.c ) \
+ HAVE_PLUGIN_VALGRIND_TRUE@        || ( rm -f vgmarshal.c.tmp && exit 1 )
+
+ GCONF_SCHEMAS_INSTALL_TRUE@@HAVE_PLUGIN_VALGRIND_TRUE install-data-local:
+
+ GCONF_SCHEMAS_INSTALL_TRUE@@HAVE_PLUGIN_VALGRIND_TRUE uninstall-local:
+ GCONF_SCHEMAS_INSTALL_TRUE@@HAVE_PLUGIN_VALGRIND_TRUE@	GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-uninstall-rule $(srcdir)/$(schema_DATA)
+ GCONF_SCHEMAS_INSTALL_FALSE@@HAVE_PLUGIN_VALGRIND_TRUE install-data-local:
+
+ GCONF_SCHEMAS_INSTALL_FALSE@@HAVE_PLUGIN_VALGRIND_TRUE uninstall-local:
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: trunk/plugins/valgrind/anjuta-valgrind-plugin-48.png
==============================================================================
Binary file. No diff available.

Added: trunk/plugins/valgrind/anjuta-valgrind-plugin.svg
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/anjuta-valgrind-plugin.svg	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,419 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://web.resource.org/cc/";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:xlink="http://www.w3.org/1999/xlink";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   width="48"
+   height="48"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.45.1"
+   version="1.0"
+   sodipodi:docbase="/home/maker/icons/anjuta-new2/plugins"
+   sodipodi:docname="anjuta-valgrind.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/home/maker/icons/anjuta-new2/plugins/anjuta-valgrind-plugin-48.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3041">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop3043" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop3045" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3041"
+       id="radialGradient3047"
+       cx="24.8125"
+       cy="39.125"
+       fx="24.8125"
+       fy="39.125"
+       r="17.6875"
+       gradientTransform="matrix(1.0577952,0.3340552,-1.002788e-2,0.3574244,-1.041702,16.852018)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient31465">
+      <stop
+         style="stop-color:#eea634;stop-opacity:0.58709675;"
+         offset="0"
+         id="stop31467" />
+      <stop
+         style="stop-color:#a06f04;stop-opacity:1;"
+         offset="1"
+         id="stop31469" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16879">
+      <stop
+         id="stop16881"
+         offset="0"
+         style="stop-color:#1e1911;stop-opacity:1;" />
+      <stop
+         id="stop16883"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0.47435898;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11027">
+      <stop
+         id="stop11029"
+         offset="0"
+         style="stop-color:#f37791;stop-opacity:1;" />
+      <stop
+         id="stop11031"
+         offset="1"
+         style="stop-color:#f37791;stop-opacity:0.67948717;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient7123">
+      <stop
+         style="stop-color:#f37791;stop-opacity:1;"
+         offset="0"
+         id="stop7125" />
+      <stop
+         style="stop-color:#f37791;stop-opacity:0;"
+         offset="1"
+         id="stop7127" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3197">
+      <stop
+         style="stop-color:#a40000;stop-opacity:1;"
+         offset="0"
+         id="stop3199" />
+      <stop
+         style="stop-color:#7d0000;stop-opacity:1;"
+         offset="1"
+         id="stop3201" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3197"
+       id="linearGradient3203"
+       x1="350.85208"
+       y1="576.42651"
+       x2="377.58087"
+       y2="654.17651"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-2.5,-80.25)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3197"
+       id="linearGradient4180"
+       x1="330.10742"
+       y1="544.78461"
+       x2="346.61395"
+       y2="583.28461"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3197"
+       id="linearGradient5173"
+       x1="355.65753"
+       y1="593.44031"
+       x2="358.5007"
+       y2="613.28345"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.4797482,0,0,0.4870369,167.41064,222.8997)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3197"
+       id="linearGradient6152"
+       x1="344.1875"
+       y1="597.67468"
+       x2="351.4375"
+       y2="629.04968"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.4797482,0,0,0.4870369,167.41064,222.8997)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient7123"
+       id="linearGradient7129"
+       x1="347.91449"
+       y1="618.56812"
+       x2="355.13208"
+       y2="629.18164"
+       gradientUnits="userSpaceOnUse"
+       spreadMethod="reflect"
+       gradientTransform="matrix(0.4797482,0,0,0.4870369,167.41064,222.8997)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3197"
+       id="linearGradient10048"
+       x1="20.862883"
+       y1="95.4729"
+       x2="20.572554"
+       y2="113.6809"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.4797482,0,0,0.4870369,323.80856,463.67233)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient11027"
+       id="linearGradient11025"
+       x1="402.10236"
+       y1="639.46429"
+       x2="365.37952"
+       y2="633.82764"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.4797482,0,0,0.4870369,167.41064,222.8997)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient16879"
+       id="linearGradient16877"
+       x1="32.374184"
+       y1="131.64696"
+       x2="34.240143"
+       y2="140.02196"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.4797482,0,0,0.4870369,323.80856,463.67233)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3197"
+       id="linearGradient16886"
+       gradientUnits="userSpaceOnUse"
+       x1="330.10742"
+       y1="544.78461"
+       x2="346.61395"
+       y2="583.28461"
+       gradientTransform="matrix(0.4797482,0,0,0.4870369,169.92932,260.03627)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3197"
+       id="linearGradient16889"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.4797482,0,0,0.4870369,168.72995,220.95155)"
+       x1="350.85208"
+       y1="576.42651"
+       x2="377.58087"
+       y2="654.17651" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient16879"
+       id="linearGradient17862"
+       gradientUnits="userSpaceOnUse"
+       x1="35.874184"
+       y1="95.271957"
+       x2="41.451527"
+       y2="132.89696"
+       gradientTransform="matrix(0.4797482,0,0,0.4870369,345.2773,461.90681)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3197"
+       id="linearGradient17866"
+       gradientUnits="userSpaceOnUse"
+       x1="20.862883"
+       y1="95.4729"
+       x2="20.572554"
+       y2="113.6809"
+       gradientTransform="matrix(9.4495124e-2,0.4774958,-0.47035,9.5930746e-2,394.45989,506.4134)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3197"
+       id="linearGradient18839"
+       gradientUnits="userSpaceOnUse"
+       x1="20.862883"
+       y1="95.4729"
+       x2="20.572554"
+       y2="113.6809"
+       gradientTransform="matrix(-0.4744405,-7.224662e-2,7.1165406e-2,-0.4816487,359.32422,577.5522)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3197"
+       id="linearGradient21754"
+       x1="335.49182"
+       y1="621.74786"
+       x2="339.26221"
+       y2="634.14996"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.4797482,0,0,0.4870369,167.41064,222.8997)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient31465"
+       id="linearGradient31471"
+       x1="344.87253"
+       y1="571.33588"
+       x2="348.74756"
+       y2="583.16858"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.4797482,0,0,0.4870369,167.41064,222.8997)" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="0.75294118"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="17.823115"
+     inkscape:cy="8.4499206"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:object-paths="false"
+     inkscape:grid-bbox="false"
+     inkscape:guide-bbox="true"
+     inkscape:window-width="1214"
+     inkscape:window-height="869"
+     inkscape:window-x="35"
+     inkscape:window-y="104"
+     showguides="true"
+     width="48px"
+     height="48px" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-326,-494.36218)">
+    <path
+       sodipodi:nodetypes="ccccccc"
+       id="path2225"
+       d="M 332.5033,526.73225 C 331.00502,527.55018 329.38865,527.61651 327.49963,527.55018 L 327.80674,531.52845 L 328.8814,531.52845 L 329.91666,529.4443 L 332.84253,529.40125 L 332.5033,526.73225 z "
+       style="fill:#f40000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient21754);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    <path
+       style="fill:#f40000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient16889);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 344.97052,512.73388 C 345.07081,513.50691 341.23642,519.72778 341.49337,521.17135 C 341.66416,522.13083 350.95531,530.74197 351.75517,530.94334 C 352.59792,531.15552 355.90067,531.1916 356.25003,530.85725 C 357.59324,529.57164 358.38133,526.71923 358.87909,525.99278 C 359.5473,525.01753 361.16891,524.01256 361.16891,524.01256 C 363.60008,522.53456 368.95714,523.98385 372.27879,524.57218 C 374.11974,525.18615 373.78777,526.29021 371.91082,526.30889 L 364.30682,526.03583 C 362.42689,531.47426 356.78131,536.73472 355.99559,536.66878 C 353.68004,536.97379 347.24045,536.93901 344.20724,536.66878 C 343.39942,536.5961 332.55632,530.33679 332.07966,529.86714 C 331.68217,529.47549 329.4506,521.90319 329.4506,521.90319 C 328.85694,519.75793 329.02656,518.94719 330.59551,517.66291 L 338.69471,511.09804 L 336.15046,506.7071 L 333.13975,506.7071 C 331.72629,505.42551 331.2457,505.87484 330.29867,505.45871 L 330.28807,503.86591 C 332.32739,502.13847 333.63447,502.15833 335.471
 99,501.45519 L 337.12575,499.86241 L 337.76181,501.3691 L 336.99853,502.70359 C 339.94472,501.35508 344.80189,512.19092 344.97052,512.73388 z "
+       id="path2203"
+       sodipodi:nodetypes="csssscccccsscccccccccccc" />
+    <path
+       sodipodi:nodetypes="ccccc"
+       id="path18837"
+       d="M 351.02295,532.16951 L 351.65331,531.16197 C 353.09905,531.48905 355.01076,531.44819 356.14941,531.11041 C 356.91716,530.93389 357.33941,529.50453 357.73301,529.05129 C 358.52909,531.20776 356.40799,532.83473 351.02295,532.16951 z "
+       style="fill:#e9b96e;fill-opacity:0.75;fill-rule:evenodd;stroke:url(#linearGradient18839);stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    <path
+       style="fill:#f37791;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5173);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 339.1843,512.26799 L 340.53991,514.46996 L 344.82788,513.11761 C 344.65712,513.86349 342.60796,517.82596 341.99966,519.17115 L 334.73719,515.44007 L 339.1843,512.26799 z "
+       id="path5159"
+       sodipodi:nodetypes="cccccc" />
+    <path
+       style="fill:url(#linearGradient7129);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient6152);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 333.51412,516.39758 L 339.5537,525.14901 L 331.98456,529.70043 C 331.04924,526.70682 329.31444,521.93239 329.09745,520.42107 C 328.92297,519.29515 331.99243,517.50198 333.51412,516.39758 z "
+       id="path5161"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="opacity:0.91008175;fill:url(#linearGradient11025);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 346.16065,531.70414 C 350.65981,531.9951 358.4222,533.94317 357.85909,528.96993 L 360.31854,532.39228 C 358.92628,533.74113 357.36438,536.28457 355.8025,536.48188 L 345.85416,536.45707 C 343.57087,536.32622 342.85574,535.70375 341.35652,534.87051 C 342.95789,533.81506 343.46004,532.20162 346.16065,531.70414 z "
+       id="path5163"
+       sodipodi:nodetypes="ccccccc" />
+    <path
+       style="opacity:0.98999999;fill:url(#linearGradient31471);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 330.51903,505.3256 C 331.09149,504.51844 330.96984,504.16896 330.48721,504.04491 C 331.55521,502.97809 333.27883,502.26559 335.41671,501.74182 L 336.68883,502.94717 L 335.70294,504.32472 L 336.03157,506.4879 L 333.20109,506.46639 C 332.46739,505.83002 331.62506,505.59466 330.51903,505.3256 z "
+       id="path5165"
+       sodipodi:nodetypes="cccccccc" />
+    <path
+       style="fill:#e9b96e;fill-opacity:0.75;fill-rule:evenodd;stroke:url(#linearGradient10048);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 338.7056,511.17257 L 339.3325,512.34216 L 329.09608,519.75965 C 328.96187,518.55369 335.50243,514.03492 338.7056,511.17257 z "
+       id="path8102"
+       sodipodi:nodetypes="cccc" />
+    <path
+       style="opacity:0.3269755;fill:url(#linearGradient16877);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 340.84474,524.04151 L 337.44701,532.8234 L 340.11608,534.2864 L 340.84474,524.04151 z "
+       id="path15900"
+       sodipodi:nodetypes="cccc" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 333.56152,515.40968 L 355.7813,536.5895"
+       id="path7131"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="fill:#555753;fill-opacity:0.75;fill-rule:evenodd;stroke:#555753;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 351.45607,531.1654 L 347.11541,536.69648"
+       id="path12971"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path14925"
+       d="M 357.96261,528.7772 L 360.30853,532.11397"
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#8a0000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#8a0000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 363.984,523.52529 L 358.9516,529.78935"
+       id="path14927"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#8a0000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 362.00858,525.90033 L 364.20972,526.00109"
+       id="path14929"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="fill:#f40000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient16886);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 340.53448,524.5169 C 335.8559,527.65943 334.13765,532.65902 326.49871,533.94449 L 326.83795,537.84037 L 327.94045,537.86191 L 328.91574,535.83863 L 336.5485,535.70949 L 340.53448,524.5169 z "
+       id="path2223"
+       sodipodi:nodetypes="ccccccc" />
+    <path
+       sodipodi:nodetypes="cccccc"
+       id="path17860"
+       d="M 364.23247,523.55449 L 359.00569,530.05337 C 359.56556,530.7744 360.12542,531.68347 360.68529,532.21649 C 361.35473,531.33279 363.85546,527.36174 364.07803,526.11997 C 367.06222,525.85474 373.20755,527.06933 373.30622,525.38882 C 372.36802,524.2204 367.10521,523.84 364.23247,523.55449 z "
+       style="opacity:0.3269755;fill:url(#linearGradient17862);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    <path
+       sodipodi:nodetypes="ccccc"
+       id="path17864"
+       d="M 351.34146,530.99226 L 350.84516,531.57263 L 340.85598,521.99297 L 341.08857,521.10987 C 341.98447,522.57451 349.64386,529.68009 351.34146,530.99226 z "
+       style="fill:#ce8a1f;fill-opacity:0.75;fill-rule:evenodd;stroke:url(#linearGradient17866);stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#8a0000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 336.17131,506.57744 C 335.52689,505.16891 335.49288,503.9881 336.78229,502.93299"
+       id="path24663"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:#fce94f;fill-opacity:1;fill-rule:nonzero;stroke:#fce94f;stroke-width:1.84237182;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="path24667"
+       sodipodi:cx="15.556349"
+       sodipodi:cy="90.981827"
+       sodipodi:rx="1.1048543"
+       sodipodi:ry="1.016466"
+       d="M 16.661203 90.981827 A 1.1048543 1.016466 0 1 1  14.451494,90.981827 A 1.1048543 1.016466 0 1 1  16.661203 90.981827 z"
+       transform="matrix(0.5565079,0,0,0.529388,325.85837,454.82556)" />
+    <path
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.99999988;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 332.31161,505.27673 L 331.56852,505.76685"
+       id="path26610"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="ccc"
+       id="path26607"
+       d="M 332.07824,506.05038 C 332.79793,506.13424 333.9224,504.49372 333.35569,504.29835 C 332.8346,504.52057 331.405,504.9843 330.72662,505.55934"
+       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#8a0000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:0.3125;color:#000000;fill:url(#radialGradient3047);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+       id="path3039"
+       sodipodi:cx="24.8125"
+       sodipodi:cy="39.125"
+       sodipodi:rx="17.6875"
+       sodipodi:ry="6.625"
+       d="M 42.5 39.125 A 17.6875 6.625 0 1 1  7.125,39.125 A 17.6875 6.625 0 1 1  42.5 39.125 z"
+       transform="matrix(1.5069084,-8.5701135e-2,4.2277581e-2,0.4510816,309.9588,523.50341)" />
+  </g>
+</svg>

Added: trunk/plugins/valgrind/anjuta-valgrind.glade
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/anjuta-valgrind.glade	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,269 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>
+
+<glade-interface>
+<requires lib="gnome"/>
+
+<widget class="GtkDialog" id="select_and_run_dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Select Valgrind Target</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+  <property name="modal">False</property>
+  <property name="default_width">400</property>
+  <property name="default_height">300</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox25">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area25">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton5">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton4">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame8">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment11">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow30">
+		  <property name="border_width">5</property>
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkTreeView" id="programs_treeview">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="headers_visible">True</property>
+		      <property name="rules_hint">False</property>
+		      <property name="reorderable">False</property>
+		      <property name="enable_search">True</property>
+		      <property name="fixed_height_mode">False</property>
+		      <property name="hover_selection">False</property>
+		      <property name="hover_expand">False</property>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label12350">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;b&gt;Program to test:&lt;/b&gt;</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame9">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment12">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox1">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="select_tool">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Select Tool:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkComboBox" id="val_tool">
+		      <property name="visible">True</property>
+		      <property name="items" translatable="yes">Memcheck
+Addrcheck
+Helgrind</property>
+		      <property name="add_tearoffs">False</property>
+		      <property name="focus_on_click">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="options_button">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Options...</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label12351">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;b&gt;Valgrind&lt;/b&gt;</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>

Added: trunk/plugins/valgrind/anjuta-valgrind.plugin.in
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/anjuta-valgrind.plugin.in	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,5 @@
+[Anjuta Plugin]
+Location=anjuta-valgrind:AnjutaValgrindPlugin
+Icon=anjuta-valgrind-plugin-48.png
+_Name=Valgrind Plugin
+_Description=Powerful debugging tool.

Added: trunk/plugins/valgrind/anjuta-valgrind.schemas
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/anjuta-valgrind.schemas	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,312 @@
+<gconfschemafile>
+  <schemalist>
+
+    <!-- Anjuta Valgrind settings -->
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/editor</key>
+      <applyto>/apps/anjuta/valgrind/editor</applyto>
+      <owner>anjuta</owner>
+      <type>string</type>
+      <default>emacsclient -n +${lineno} "${filename}"</default>
+      <locale name="C">
+         <short>Editor command-line</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/exe-path</key>
+      <applyto>/apps/anjuta/valgrind/exe-path</applyto>
+      <owner>anjuta</owner>
+      <type>string</type>
+      <default>/usr/bin/valgrind</default>
+      <locale name="C">
+         <short>Valgrind path in the system</short>
+      </locale>
+    </schema>
+	
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/num-lines</key>
+      <applyto>/apps/anjuta/valgrind/num-lines</applyto>
+      <owner>anjuta</owner>
+      <type>int</type>
+      <default>2</default>
+      <locale name="C">
+         <short>Show X-number of lines above and below target line</short>
+      </locale>
+    </schema>
+	
+    <!-- General Valgrind settings -->
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/general/demangle</key>
+      <applyto>/apps/anjuta/valgrind/general/demangle</applyto>
+      <owner>anjuta</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+         <short>Demangle c++ symbols automatically</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/general/num-callers</key>
+      <applyto>/apps/anjuta/valgrind/general/num-callers</applyto>
+      <owner>anjuta</owner>
+      <type>int</type>
+      <default>4</default>
+      <locale name="C">
+         <short>Number of callers on the stack to show</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/general/error-limit</key>
+      <applyto>/apps/anjuta/valgrind/general/error-limit</applyto>
+      <owner>anjuta</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+         <short>Limit the number of errors to show</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/general/sloppy-malloc</key>
+      <applyto>/apps/anjuta/valgrind/general/sloppy-malloc</applyto>
+      <owner>anjuta</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+         <short>Round malloc sizes to next word</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/general/alignment</key>
+      <applyto>/apps/anjuta/valgrind/general/alignment</applyto>
+      <owner>anjuta</owner>
+      <type>int</type>
+      <default>8</default>
+      <locale name="C">
+         <short>Set minimum alignment of allocations</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/general/trace-children</key>
+      <applyto>/apps/anjuta/valgrind/general/trace-children</applyto>
+      <owner>anjuta</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+         <short>Trace child processes</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/general/track-fds</key>
+      <applyto>/apps/anjuta/valgrind/general/track-fds</applyto>
+      <owner>anjuta</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+         <short>Track open file descriptors</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/general/time-stamp</key>
+      <applyto>/apps/anjuta/valgrind/general/time-stamp</applyto>
+      <owner>anjuta</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+         <short>Add time stamps to log messages</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/general/suppresions</key>
+      <applyto>/apps/anjuta/valgrind/general/suppressions</applyto>
+      <owner>anjuta</owner>
+      <type>string</type>
+      <default></default>
+      <locale name="C">
+         <short>Suppress errors described in suppresions file</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/general/run-libc-freeres</key>
+      <applyto>/apps/anjuta/valgrind/general/run-libc-freeres</applyto>
+      <owner>anjuta</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+         <short>Call __libc_freeres() at exit before checking for memory leaks</short>
+      </locale>
+    </schema>
+
+    <!-- Memcheck Valgrind settings -->
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/memcheck/leak-check</key>
+      <applyto>/apps/anjuta/valgrind/memcheck/leak-check</applyto>
+      <owner>anjuta</owner>
+      <type>string</type>
+      <default>false</default>
+      <locale name="C">
+         <short>Search for memory leaks at exit</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/memcheck/show-reachable</key>
+      <applyto>/apps/anjuta/valgrind/memcheck/show-reachable</applyto>
+      <owner>anjuta</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+         <short>Show reachable blocks in leak check</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/memcheck/leak-resolution</key>
+      <applyto>/apps/anjuta/valgrind/memcheck/leak-resolution</applyto>
+      <owner>anjuta</owner>
+      <type>string</type>
+      <default>low</default>
+      <locale name="C">
+         <short>Amount of bt merging in leak check</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/memcheck/freelist-vol</key>
+      <applyto>/apps/anjuta/valgrind/memcheck/freelist-vol</applyto>
+      <owner>anjuta</owner>
+      <type>int</type>
+      <default>1000000</default>
+      <locale name="C">
+         <short>Volume of freed blocks queue</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/memcheck/workaround-gcc296-bugs</key>
+      <applyto>/apps/anjuta/valgrind/memcheck/workaround-gcc296-bugs</applyto>
+      <owner>anjuta</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+         <short>Work around gcc 2.96 bugs</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/memcheck/avoid-strlen-errors</key>
+      <applyto>/apps/anjuta/valgrind/memcheck/avoid-strlen-errors</applyto>
+      <owner>anjuta</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+         <short>Suppress errors from inlined strlen</short>
+      </locale>
+    </schema>
+
+    <!-- Cachegrind settings -->
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/cachegrind/I1/override</key>
+      <applyto>/apps/anjuta/valgrind/cachegrind/I1/override</applyto>
+      <owner>anjuta</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+         <short>Override I1 cache settings</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/cachegrind/I1/settings</key>
+      <applyto>/apps/anjuta/valgrind/cachegrind/I1/settings</applyto>
+      <owner>anjuta</owner>
+      <type>string</type>
+      <default></default>
+      <locale name="C">
+         <short>I1 cache settings to use in place of the defaults</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/cachegrind/D1/override</key>
+      <applyto>/apps/anjuta/valgrind/cachegrind/D1/override</applyto>
+      <owner>anjuta</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+         <short>Override D1 cache settings</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/cachegrind/D1/settings</key>
+      <applyto>/apps/anjuta/valgrind/cachegrind/D1/settings</applyto>
+      <owner>anjuta</owner>
+      <type>string</type>
+      <default></default>
+      <locale name="C">
+         <short>D1 cache settings to use in place of the defaults</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/cachegrind/L2/override</key>
+      <applyto>/apps/anjuta/valgrind/cachegrind/L2/override</applyto>
+      <owner>anjuta</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+         <short>Override L2 cache settings</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/cachegrind/L2/settings</key>
+      <applyto>/apps/anjuta/valgrind/cachegrind/L2/settings</applyto>
+      <owner>anjuta</owner>
+      <type>string</type>
+      <default></default>
+      <locale name="C">
+         <short>L2 cache settings to use in place of the defaults</short>
+      </locale>
+    </schema>
+
+    <!-- Helgrind settings -->
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/helgrind/private-stacks</key>
+      <applyto>/apps/anjuta/valgrind/helgrind/private-stacks</applyto>
+      <owner>anjuta</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+         <short>Assume thread stacks are used privately</short>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/anjuta/valgrind/helgrind/show-last-access</key>
+      <applyto>/apps/anjuta/valgrind/helgrind/show-last-access</applyto>
+      <owner>anjuta</owner>
+      <type>string</type>
+      <default>no</default>
+      <locale name="C">
+         <short>Show location of last word access on error</short>
+      </locale>
+    </schema>
+
+  </schemalist>
+</gconfschemafile>

Added: trunk/plugins/valgrind/anjuta-valgrind.ui
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/anjuta-valgrind.ui	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,19 @@
+<!--*- xml -*-->
+<ui>
+	<menubar name="MenuMain">
+		<placeholder name="PlaceHolderDebugMenus">
+			<menu name="MenuDebug" action="ActionMenuDebug">
+				<placeholder name="PlaceholderValgrindMenus">			
+					<separator name="separator1"/>
+					<menu name="Valgrind" action="ActionMenuValgrind">
+						<menuitem name="Run" action="ActionValgrindRun" />
+						<menuitem name="Kill" action="ActionValgrindKill" />
+						<menuitem name="Load" action="ActionValgrindLoad" />
+						<menuitem name="Save" action="ActionValgrindSave" />
+						<menuitem name="Edit Rules" action="ActionValgrindEditRules" />
+					</menu>
+				</placeholder>
+			</menu>
+		</placeholder>
+	</menubar>
+</ui>

Added: trunk/plugins/valgrind/bugged-prg-test.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/bugged-prg-test.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,24 @@
+#include <stdlib.h>
+#include <stdio.h>
+
+
+struct _fake {
+	int a;
+	char *b;
+} fake;
+
+
+
+
+int main(int argc, char**argv)
+{
+	int i;
+	char **vec;
+	
+	vec = (char**)calloc (5, sizeof(char*));
+	
+	for (i=0; i < 10; i++)
+		vec[i] = (char *)'x';
+	
+	return 0;
+}

Added: trunk/plugins/valgrind/ldd.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/ldd.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,222 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include "ldd.h"
+
+
+LddParser *
+ldd_parser_new (int fd, LddSharedLibCallback shlib_cb, void *user_data)
+{
+	LddParser *ldd;
+	
+	ldd = g_new (LddParser, 1);
+	parser_init ((Parser *) ldd, fd);
+	
+	ldd->linebuf = g_malloc (128);
+	ldd->lineptr = ldd->linebuf;
+	ldd->lineleft = 128;
+	
+	ldd->shlib_cb = shlib_cb;
+	ldd->user_data = user_data;
+	
+	return ldd;
+}
+
+
+void
+ldd_parser_free (LddParser *ldd)
+{
+	if (ldd == NULL)
+		return;
+	
+	g_free (ldd->linebuf);
+	g_free (ldd);
+}
+
+
+void
+ldd_shared_lib_free (LddSharedLib *shlib)
+{
+	if (shlib == NULL)
+		return;
+	
+	g_free (shlib->libname);
+	g_free (shlib->path);
+	g_free (shlib);
+}
+
+
+/* "        libc.so.6 => /lib/libc.so.6 (0x40e50000)\n" */
+
+static void
+ldd_parse_linebuf (LddParser *ldd)
+{
+	register unsigned char *inptr;
+	LddSharedLib *shlib;
+	char *inend;
+	
+	shlib = g_new (LddSharedLib, 1);
+	
+	inptr = ldd->linebuf;
+	while (*inptr == '\t' || *inptr == ' ')
+		inptr++;
+	
+	shlib->libname = inptr;
+	while (*inptr && !(inptr[0] == ' ' && inptr[1] == '=' && inptr[2] == '>') && *inptr != '(')
+		inptr++;
+	
+	shlib->libname = (unsigned char *)g_strndup ((char *)shlib->libname, inptr - shlib->libname);
+	
+	if (!strncmp ((char *)inptr, " =>", 3))
+		inptr += 3;
+	
+	while (*inptr == ' ' || *inptr == '\t')
+		inptr++;
+	
+	shlib->path = inptr;
+	while (*inptr && *inptr != '(')
+		inptr++;
+	
+	if (*inptr != '(') {
+		/* error - no address component; ignore */
+		g_free (shlib->libname);
+		g_free (shlib);
+		goto reset;
+	}
+	
+	if (inptr == shlib->path) {
+		/* special case - no path component */
+		if (shlib->libname[0] != '/') {
+			/* unhandled */
+			g_free (shlib->libname);
+			g_free (shlib);
+			goto reset;
+		}
+		
+		/* name is a path */
+		shlib->path = (unsigned char *)g_strdup ((char *)shlib->libname);
+		inptr++;
+	} else {
+		if (inptr[-1] == ' ')
+			inptr--;
+		shlib->path = (unsigned char *)g_strndup ((char *)shlib->path, inptr - shlib->path);
+		inptr += 2;
+	}
+	
+	shlib->addr = strtoul ((const char *) inptr, &inend, 16);
+	
+	ldd->shlib_cb (ldd, shlib, ldd->user_data);
+	
+ reset:
+	
+	ldd->lineleft += (ldd->lineptr - ldd->linebuf);
+	ldd->lineptr = ldd->linebuf;
+}
+
+
+#define ldd_backup_linebuf(ldd, start, len) G_STMT_START {                \
+	if (ldd->lineleft <= len) {                                       \
+		unsigned int llen, loff;                                  \
+		                                                          \
+		llen = loff = ldd->lineptr - ldd->linebuf;                \
+		llen = llen ? llen : 1;                                   \
+		                                                          \
+		while (llen < (loff + len + 1))                           \
+			llen <<= 1;                                       \
+		                                                          \
+		ldd->linebuf = g_realloc (ldd->linebuf, llen);            \
+		ldd->lineptr = ldd->linebuf + loff;                       \
+		ldd->lineleft = llen - loff;                              \
+	}                                                                 \
+	                                                                  \
+	memcpy (ldd->lineptr, start, len);                                \
+	ldd->lineptr += len;                                              \
+	ldd->lineleft -= len;                                             \
+} G_STMT_END
+
+
+int
+ldd_parser_step (LddParser *ldd)
+{
+	register unsigned char *inptr;
+	unsigned char *start;
+	Parser *parser;
+	int ret;
+	
+	parser = (Parser *) ldd;
+	
+	if ((ret = parser_fill (parser)) == 0) {
+		return 0;
+	} else if (ret == -1) {
+		return -1;
+	}
+	
+	start = inptr = parser->inptr;
+	*parser->inend = '\n';
+	
+	while (inptr < parser->inend) {
+		while (*inptr != '\n')
+			inptr++;
+		
+		if (inptr == parser->inend)
+			break;
+		
+		*inptr++ = '\0';
+		ldd_backup_linebuf (ldd, start, inptr - start);
+		ldd_parse_linebuf (ldd);
+		start = inptr;
+	}
+	
+	if (inptr > start)
+		ldd_backup_linebuf (ldd, start, inptr - start);
+	
+	parser->inptr = inptr;
+	
+	return 1;
+}
+
+
+int
+ldd_parser_flush (LddParser *ldd)
+{
+	Parser *parser = (Parser *) ldd;
+	
+	if (parser->inptr < parser->inend)
+		return ldd_parser_step (ldd);
+	
+	return 0;
+}

Added: trunk/plugins/valgrind/ldd.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/ldd.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,68 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __LDD_H__
+#define __LDD_H__
+
+#include "parser.h"
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+typedef struct _LddParser LddParser;
+typedef struct _LddSharedLib LddSharedLib;
+
+struct _LddSharedLib {
+	unsigned char *libname;
+	unsigned char *path;
+	unsigned int addr;
+};
+
+typedef void (* LddSharedLibCallback) (LddParser *ldd, LddSharedLib *shlib, void *user_data);
+
+struct _LddParser {
+	Parser parser;
+	
+	unsigned char *linebuf;
+	unsigned char *lineptr;
+	unsigned int lineleft;
+	
+	LddSharedLibCallback shlib_cb;
+	void *user_data;
+};
+
+LddParser *ldd_parser_new (int fd, LddSharedLibCallback shlib_cb, void *user_data);
+void ldd_parser_free (LddParser *ldd);
+
+void ldd_shared_lib_free (LddSharedLib *shlib);
+
+int ldd_parser_step (LddParser *ldd);
+int ldd_parser_flush (LddParser *ldd);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LDD_H__ */

Added: trunk/plugins/valgrind/list.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/list.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,128 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "list.h"
+
+
+void
+list_init (List *list)
+{
+	list->head = (ListNode *) &list->tail;
+	list->tail = NULL;
+	list->tailpred = (ListNode *) &list->head;
+}
+
+
+int
+list_is_empty (List *list)
+{
+	return list->head == (ListNode *) &list->tail;
+}
+
+
+int
+list_length (List *list)
+{
+	ListNode *node;
+	int n = 0;
+	
+	node = list->head;
+	while (node->next) {
+		node = node->next;
+		n++;
+	}
+	
+	return n;
+}
+
+
+ListNode *
+list_unlink_head (List *list)
+{
+	ListNode *n, *nn;
+	
+	n = list->head;
+	nn = n->next;
+	if (nn) {
+		nn->prev = n->prev;
+		list->head = nn;
+		return n;
+	}
+	
+	return NULL;
+}
+
+
+ListNode *
+list_unlink_tail (List *list)
+{
+	ListNode *n, *np;
+	
+	n = list->tailpred;
+	np = n->prev;
+	if (np) {
+		np->next = n->next;
+		list->tailpred = np;
+		return n;
+	}
+	
+	return NULL;
+}
+
+
+ListNode *
+list_prepend_node (List *list, ListNode *node)
+{
+	node->next = list->head;
+	node->prev = (ListNode *) &list->head;
+	list->head->prev = node;
+	list->head = node;
+	
+	return node;
+}
+
+
+ListNode *
+list_append_node (List *list, ListNode *node)
+{
+	node->next = (ListNode *) &list->tail;
+	node->prev = list->tailpred;
+	list->tailpred->next = node;
+	list->tailpred = node;
+	
+	return node;
+}
+
+
+ListNode *
+list_node_unlink  (ListNode *node)
+{
+	node->next->prev = node->prev;
+        node->prev->next = node->next;
+	
+	return node;
+}

Added: trunk/plugins/valgrind/list.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/list.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,65 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __LIST_H__
+#define __LIST_H__
+
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+typedef struct _ListNode {
+	struct _ListNode *next;
+	struct _ListNode *prev;
+} ListNode;
+
+typedef struct {
+	ListNode *head;
+	ListNode *tail;
+	ListNode *tailpred;
+} List;
+
+#define LIST_INITIALIZER(l) { (ListNode *) &l.tail, NULL, (ListNode *) &l.head }
+
+void list_init (List *list);
+
+int list_is_empty (List *list);
+
+int list_length (List *list);
+
+ListNode *list_unlink_head (List *list);
+ListNode *list_unlink_tail (List *list);
+
+ListNode *list_prepend_node (List *list, ListNode *node);
+ListNode *list_append_node  (List *list, ListNode *node);
+
+ListNode *list_node_unlink (ListNode *node);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LIST_H__ */

Added: trunk/plugins/valgrind/menu-utils.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/menu-utils.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,119 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <string.h>
+
+#include "menu-utils.h"
+
+
+#if 0
+static void
+make_item (GtkMenu *menu, GtkMenuItem *item, const char *name, GtkWidget *pixmap)
+{
+	GtkWidget *label;
+	
+	if (*name == '\0')
+		return;
+	
+	/*
+	 * Ugh.  This needs to go into Gtk+
+	 */
+	label = gtk_label_new_with_mnemonic (name);
+	gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+	gtk_widget_show (label);
+	
+	gtk_container_add (GTK_CONTAINER (item), label);
+	
+	if (pixmap && GTK_IS_IMAGE_MENU_ITEM (item)){
+		gtk_widget_show (pixmap);
+		gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), pixmap);
+	}
+}
+#endif
+
+void
+menu_utils_construct_menu (GtkWidget *menu, struct _MenuItem *items, guint32 disable_mask, void *user_data)
+{
+	GtkWidget *item, *image;
+	GSList *group = NULL;
+	int i;
+	
+	for (i = 0; items[i].label; i++) {
+		const char *label, *stock_id;
+		
+		label = items[i].label;
+		stock_id = items[i].stock_id;
+		
+		if (items[i].is_stock) {
+			item = gtk_image_menu_item_new_with_mnemonic (label);
+			image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU);
+			gtk_widget_show (image);
+			
+			gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
+			/*item = gtk_image_menu_item_new_from_stock (stock_id, NULL);*/
+		} else if (strcmp (label, "") != 0) {
+			if (items[i].is_toggle)
+				item = gtk_check_menu_item_new_with_mnemonic (label);
+			else if (items[i].is_radio)
+				item = gtk_radio_menu_item_new_with_mnemonic (group, label);
+			else if (items[i].stock_id)
+				item = gtk_image_menu_item_new_with_mnemonic (label);
+			else
+				item = gtk_menu_item_new_with_mnemonic (label);
+			
+			if (items[i].is_toggle || items[i].is_radio)
+				gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), items[i].is_active);
+			if (items[i].is_radio)
+				group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item));
+			if (items[i].stock_id) {
+				if (stock_id[0] != '/')
+					image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU);
+				else
+					image = gtk_image_new_from_file (stock_id);
+				
+				gtk_widget_show (image);
+				gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
+			}
+		} else {
+			item = gtk_separator_menu_item_new ();
+		}
+		
+		if (items[i].callback)
+			g_signal_connect (item, "activate", items[i].callback, user_data);
+		else if (strcmp (label, "") != 0) {
+			/* unimplemented menu item? */
+			gtk_widget_set_sensitive (item, FALSE);
+		}
+		
+		if (items[i].disable_mask & disable_mask)
+			gtk_widget_set_sensitive (item, FALSE);
+		
+		gtk_widget_show (item);
+		gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+	}
+}

Added: trunk/plugins/valgrind/menu-utils.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/menu-utils.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,55 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __MENU_UTILS_H__
+#define __MENU_UTILS_H__
+
+#include <gtk/gtk.h>
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+struct _MenuItem {
+	char *label;
+	char *stock_id;
+	guint is_stock : 1;
+	guint is_toggle : 1;
+	guint is_radio : 1;
+	guint is_active : 1;
+	
+	GCallback callback;
+	guint32 disable_mask;
+};
+
+#define MENU_ITEM_SEPARATOR  { "",   NULL, FALSE, FALSE, FALSE, FALSE, NULL, 0 }
+#define MENU_ITEM_TERMINATOR { NULL, NULL, FALSE, FALSE, FALSE, FALSE, NULL, 0 }
+
+void menu_utils_construct_menu (GtkWidget *menu, struct _MenuItem *items, guint32 disable_mask, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __MENU_UTILS_H__ */

Added: trunk/plugins/valgrind/parser.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/parser.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,94 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include "parser.h"
+#include "vgio.h"
+
+
+void
+parser_init (Parser *parser, int fd)
+{
+	parser->inbuf = parser->realbuf + PARSER_SCAN_HEAD;
+	parser->inptr = parser->inbuf;
+	parser->inend = parser->inbuf;
+	
+	parser->fd = fd;
+}
+
+
+ssize_t
+parser_fill (Parser *parser)
+{
+	unsigned char *inbuf, *inptr, *inend;
+	ssize_t nread;
+	size_t inlen;
+	
+	inbuf = parser->inbuf;
+	inptr = parser->inptr;
+	inend = parser->inend;
+	inlen = inend - inptr;
+	
+	g_assert (inptr <= inend);
+	
+	/* attempt to align 'inend' with realbuf + PARSER_SCAN_HEAD */
+	if (inptr >= inbuf) {
+		inbuf -= inlen < PARSER_SCAN_HEAD ? inlen : PARSER_SCAN_HEAD;
+		memmove (inbuf, inptr, inlen);
+		inptr = inbuf;
+		inbuf += inlen;
+	} else if (inptr > parser->realbuf) {
+		size_t shift;
+		
+		shift = MIN (inptr - parser->realbuf, inend - inbuf);
+		memmove (inptr - shift, inptr, inlen);
+		inptr -= shift;
+		inbuf = inptr + inlen;
+	} else {
+		/* we can't shift... */
+		inbuf = inend;
+	}
+	
+	parser->inptr = inptr;
+	parser->inend = inbuf;
+	inend = parser->realbuf + PARSER_SCAN_HEAD + PARSER_SCAN_BUF - 1;
+	
+	if ((nread = vg_read (parser->fd, (char *)inbuf, inend - inbuf)) == -1)
+		return -1;
+	
+	parser->inend += nread;
+	
+	return parser->inend - parser->inptr;
+}

Added: trunk/plugins/valgrind/parser.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/parser.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,55 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __PARSER_H__
+#define __PARSER_H__
+
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+#define PARSER_SCAN_HEAD   (128)
+#define PARSER_SCAN_BUF    (4096)
+
+typedef struct _Parser {
+	unsigned char realbuf[PARSER_SCAN_HEAD + PARSER_SCAN_BUF + 1];
+	unsigned char *inbuf;
+	unsigned char *inptr;
+	unsigned char *inend;
+	
+	int fd;
+} Parser;
+
+
+void parser_init (Parser *parser, int fd);
+
+ssize_t parser_fill (Parser *parser);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __PARSER_H__ */

Added: trunk/plugins/valgrind/plugin.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/plugin.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,687 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * plugin.c
+ * Copyright (C) Massimo Cora' 2005 <maxcvs gmail com>
+ * 
+ * plugin.c 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, or (at your option) any later version.
+ * 
+ * plugin.c 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 plugin.c.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include <config.h>
+#include <glib/gi18n.h>
+#include <libgnome/gnome-util.h>
+#include <libgnomeui/gnome-about.h>
+#include <libanjuta/anjuta-shell.h>
+#include <libanjuta/anjuta-debug.h>
+#include <libanjuta/interfaces/ianjuta-document-manager.h>
+#include <libanjuta/interfaces/ianjuta-project-manager.h>
+#include <libanjuta/interfaces/ianjuta-preferences.h>
+
+#include "vgdefaultview.h"
+#include "plugin.h"
+#include "symtab.h"
+
+
+#define UI_FILE PACKAGE_DATA_DIR"/ui/anjuta-valgrind.ui"
+#define GLADE_FILE PACKAGE_DATA_DIR"/glade/anjuta-valgrind.glade"
+#define ICON_FILE "anjuta-valgrind-plugin-48.png"
+
+
+enum {
+	MEMCHECK_OPTION,
+	ADDRCHECK_OPTION,
+//	CACHEGRIND_OPTION,
+	HELGRIND_OPTION
+};
+
+static gpointer parent_class;
+
+static void
+register_stock_icons (AnjutaPlugin *plugin)
+{
+	static gboolean registered = FALSE;
+
+	if (registered)
+		return;
+	registered = TRUE;
+
+	/* Register stock icons */
+	BEGIN_REGISTER_ICON (plugin);
+	REGISTER_ICON (ICON_FILE, "valgrind-knight");
+	END_REGISTER_ICON;
+}
+
+static void
+project_root_added (AnjutaPlugin *plugin, const gchar *name,
+					const GValue *value, gpointer user_data)
+{
+	AnjutaValgrindPlugin *val_plugin;
+	const gchar *root_uri;
+
+	val_plugin = ANJUTA_PLUGIN_VALGRIND (plugin);
+	root_uri = g_value_get_string (value);
+	
+	if (root_uri)
+	{
+		gchar *root_dir = anjuta_util_get_local_path_from_uri (root_uri);
+		if (root_dir)
+			val_plugin->project_root_uri = g_strdup(root_dir);
+		else
+			val_plugin->project_root_uri = NULL;
+		g_free (root_dir);
+	}
+	else
+		val_plugin->project_root_uri = NULL;
+}
+
+static void
+project_root_removed (AnjutaPlugin *plugin, const gchar *name,
+					  gpointer user_data)
+{
+	AnjutaValgrindPlugin *val_plugin;
+	val_plugin = ANJUTA_PLUGIN_VALGRIND (plugin);
+	
+	if (val_plugin->project_root_uri)
+		g_free(val_plugin->project_root_uri);
+	val_plugin->project_root_uri = NULL;
+}
+
+static SymTab *
+load_symtab (const char *progname)
+{
+	SymTab *symtab;
+	char *filename;
+	
+	if (!(filename = vg_tool_view_scan_path (progname)))
+		return NULL;
+	
+	symtab = symtab_new (filename);
+	g_free (filename);
+	
+	return symtab;
+}
+
+/*---------------------------------------------------------------------------
+ * Perform some actions on select_and_run_dialog options button clicked.
+ * In particular it displays the option window for the selected [via combobox] valgrind 
+ * tool.
+ */
+static void
+on_options_button_clicked (GtkButton *button, GladeXML *gxml) 
+{
+	GtkWidget *tool_combobox, *vgtool;
+	GtkDialog *dlg;
+	gint active_option;
+
+	vgtool = NULL;
+	tool_combobox = glade_xml_get_widget (gxml, "val_tool");
+	
+	active_option = gtk_combo_box_get_active (GTK_COMBO_BOX (tool_combobox));
+	
+	dlg = GTK_DIALOG (gtk_dialog_new_with_buttons ( _("Options"), NULL, GTK_DIALOG_MODAL,
+										  GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL,
+										  NULL));
+	g_signal_connect_swapped (dlg, "response",
+							  G_CALLBACK (gtk_widget_destroy), dlg);
+	
+	switch (active_option) {
+		case MEMCHECK_OPTION:
+		case ADDRCHECK_OPTION:
+			vgtool = valgrind_plugin_prefs_get_memcheck_widget ();
+			break;
+/*		
+		case CACHEGRIND_OPTION:
+			vgtool = valgrind_plugin_prefs_get_cachegrind_widget ();
+			break;
+*/		
+		case HELGRIND_OPTION:
+			vgtool = valgrind_plugin_prefs_get_helgrind_widget ();
+			break;
+	}
+	
+	gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->vbox), 3);
+	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), vgtool, TRUE, TRUE, 0);
+	
+	gtk_widget_show_all (GTK_WIDGET (dlg));
+	gtk_dialog_run (dlg);
+}
+
+static void
+on_menu_editrules_activate (GtkAction *action, AnjutaValgrindPlugin *plugin)  
+{
+	vg_tool_view_show_rules (VG_TOOL_VIEW (plugin->valgrind_widget));
+}
+
+static void
+on_menu_kill_activate (GtkAction *action, AnjutaValgrindPlugin *plugin) 
+{
+	vg_actions_kill (plugin->val_actions);
+}
+
+static void
+on_menu_run_activate (GtkAction *action, AnjutaValgrindPlugin *plugin) 
+{
+	IAnjutaProjectManager *pm;
+	GList *exec_targets;
+			
+	pm = anjuta_shell_get_interface (ANJUTA_PLUGIN (plugin)->shell,
+									 IAnjutaProjectManager, NULL);
+	g_return_if_fail (pm != NULL);
+			
+	exec_targets =
+		ianjuta_project_manager_get_targets (pm,
+						 IANJUTA_PROJECT_MANAGER_TARGET_EXECUTABLE,
+						 NULL);
+
+	if (exec_targets) {
+		GladeXML *gxml;
+		GtkWidget *dlg, *treeview, *tool_combobox;
+		GtkTreeViewColumn *column;
+		GtkCellRenderer *renderer;
+		GtkButton *options_button;
+		GtkListStore *store;
+		gint response, tool_selected;
+		GList *node;
+		GtkTreeIter iter;
+		gchar *project_root_uri;
+		size_t project_root_uri_len;
+		gchar *sel_target = NULL;
+
+		tool_selected = 0;
+		gxml = glade_xml_new (GLADE_FILE, "select_and_run_dialog",
+							  NULL);
+		dlg = glade_xml_get_widget (gxml, "select_and_run_dialog");
+		treeview = glade_xml_get_widget (gxml, "programs_treeview");
+		
+		tool_combobox = glade_xml_get_widget (gxml, "val_tool");
+		gtk_combo_box_set_active (GTK_COMBO_BOX (tool_combobox), 0);
+		
+		options_button = GTK_BUTTON (glade_xml_get_widget (gxml, "options_button"));
+		
+		/* connect the signal to grab any click on it */
+		g_signal_connect (G_OBJECT (options_button), "clicked",
+				G_CALLBACK (on_options_button_clicked), gxml);
+				
+		gtk_window_set_transient_for (GTK_WINDOW (dlg),
+					  GTK_WINDOW (ANJUTA_PLUGIN(plugin)->shell));
+		store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
+		node = exec_targets;	
+
+		anjuta_shell_get (ANJUTA_PLUGIN (plugin)->shell,
+			"project_root_uri", G_TYPE_STRING,
+			&project_root_uri, NULL);
+		project_root_uri_len = strlen(project_root_uri) + 1;
+	
+		while (node) {
+			const gchar *rel_path;
+			rel_path = (gchar*)node->data + project_root_uri_len;
+			gtk_list_store_append (store, &iter);
+			gtk_list_store_set (store, &iter, 0, rel_path, 1,
+								node->data, -1);
+			g_free (node->data);
+			node = g_list_next (node);
+		}
+		g_list_free (exec_targets);
+
+		gtk_tree_view_set_model (GTK_TREE_VIEW (treeview),
+								 GTK_TREE_MODEL (store));
+		g_object_unref (store);
+				
+		column = gtk_tree_view_column_new ();
+		gtk_tree_view_column_set_sizing (column,
+										 GTK_TREE_VIEW_COLUMN_AUTOSIZE);
+		gtk_tree_view_column_set_title (column,
+										_("Select debugging target"));
+
+		renderer = gtk_cell_renderer_text_new ();
+		gtk_tree_view_column_pack_start (column, renderer, FALSE);
+		gtk_tree_view_column_add_attribute (column, renderer, "text",
+											0);
+		gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
+		gtk_tree_view_set_expander_column (GTK_TREE_VIEW (treeview),
+									   column);
+
+		/* Run dialog */
+		response = gtk_dialog_run (GTK_DIALOG (dlg));
+		if (response == GTK_RESPONSE_OK) {		
+			GtkTreeSelection *sel;
+			GtkTreeModel *model;
+					
+			sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
+			if (gtk_tree_selection_get_selected (sel, &model, &iter)) {
+				gtk_tree_model_get (model, &iter, 1, &sel_target, -1);
+			}
+			
+			/* get the selected tool before destroying the dialog */
+			tool_selected = gtk_combo_box_get_active (GTK_COMBO_BOX (tool_combobox));
+		}
+		
+		gtk_widget_destroy (dlg);
+		
+		if (sel_target) {
+			gchar *prgname;
+			gchar *program_dir;
+			SymTab *symtab;
+			VgToolView *vg_tool_view;
+			GFile *file;
+
+			file = g_file_new_for_uri (sel_target);
+			prgname = g_file_get_parse_name (file);
+			g_object_unref (file);
+			DEBUG_PRINT ("target program selected is %s", prgname);			
+			
+			/* lets set some infos */
+			program_dir = g_path_get_dirname (prgname);
+			DEBUG_PRINT ("target a basedir: %s", program_dir);
+			
+			vg_tool_view = VG_TOOL_VIEW (plugin->valgrind_widget);
+			
+			vg_tool_view_set_argv (vg_tool_view, sel_target, NULL);
+			vg_tool_view_set_srcdir (vg_tool_view, program_dir, NULL);
+			
+			g_free (sel_target);
+			g_free (program_dir);
+			
+			symtab = load_symtab (prgname);
+			vg_tool_view_set_symtab (vg_tool_view, symtab);			
+			
+			if (plugin->valgrind_displayed == FALSE) {
+				/* Add the widget to the shell */		
+				anjuta_shell_add_widget (ANJUTA_PLUGIN (plugin)->shell, plugin->valgrind_widget,
+								 "AnjutaValgrindPluginWidget", _("Valgrind"), "valgrind-knight",
+								 ANJUTA_SHELL_PLACEMENT_BOTTOM, NULL);	
+				plugin->valgrind_displayed = TRUE;
+			}
+							
+			switch (tool_selected) {
+				case MEMCHECK_OPTION:
+					/* this is not a blocking call. The process will fork */
+					vg_actions_run (plugin->val_actions,
+								prgname, "memcheck", NULL);
+					break;
+		
+				case ADDRCHECK_OPTION:
+					/* this is not a blocking call. The process will fork */
+					vg_actions_run (plugin->val_actions, 
+								prgname, "addrcheck", NULL);
+					break;
+		
+				case HELGRIND_OPTION:
+					/* this is not a blocking call. The process will fork */
+					vg_actions_run (plugin->val_actions, 
+								prgname, "helgrind", NULL);
+					break;
+			}
+		}
+		else {
+			if ( response == GTK_RESPONSE_OK ) {
+				anjuta_util_dialog_error (GTK_WINDOW (ANJUTA_PLUGIN (plugin)->shell),
+						_("No executable target selected for debugging with Valgrind. "
+						"Please select one."));
+			}
+		}
+		
+		g_object_unref (gxml);
+	}	
+	else {
+		anjuta_util_dialog_error (GTK_WINDOW (ANJUTA_PLUGIN (plugin)->shell),
+				_("There aren't any available executable targets for this project.\n"
+				"Please create one first."));
+	}
+}
+
+static void
+on_menu_save_log_activate (GtkAction *action, AnjutaValgrindPlugin *plugin)  
+{
+	GtkWidget *dialog;
+	gchar* uri = NULL;
+	GFile* file;
+	
+	dialog = gtk_file_chooser_dialog_new (_("Choose file where to save Valgrind log"),
+					NULL, GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_SAVE, 
+					GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, 
+					GTK_RESPONSE_CANCEL, NULL);
+
+	if(gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
+		uri = gtk_file_chooser_get_uri(GTK_FILE_CHOOSER(dialog));
+	}
+	else {
+		uri = NULL;
+	}
+
+	gtk_widget_destroy(dialog);
+
+	file = g_file_new_for_uri (uri);
+	if (g_file_query_exists (file, NULL))
+	{
+		GtkWidget *dialog;
+		dialog = gtk_message_dialog_new (NULL,
+										 GTK_DIALOG_DESTROY_WITH_PARENT,
+										 GTK_MESSAGE_QUESTION,
+										 GTK_BUTTONS_NONE,
+										 _("The file '%s' already exists.\n"
+										 "Do you want to replace it with the one you are saving?"),
+										 uri);
+										 
+		gtk_dialog_add_button (GTK_DIALOG(dialog),
+							   GTK_STOCK_CANCEL,
+							   GTK_RESPONSE_CANCEL);
+		anjuta_util_dialog_add_button (GTK_DIALOG (dialog),
+								  _("_Replace"),
+								  GTK_STOCK_REFRESH,
+								  GTK_RESPONSE_YES);
+		if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES)
+			vg_tool_view_save_log (VG_TOOL_VIEW (plugin->valgrind_widget), uri);
+		gtk_widget_destroy (dialog);
+	}
+	else {
+		vg_tool_view_save_log (VG_TOOL_VIEW (plugin->valgrind_widget), uri);
+	}
+
+	g_free (uri);
+	g_object_unref (file);
+}
+
+static void
+on_menu_load_log_activate (GtkAction *action, AnjutaValgrindPlugin *plugin)  
+{
+	gchar* uri = NULL;
+	GtkWidget* dialog = 
+		gtk_file_chooser_dialog_new (_("Open Valgrind log file"), 
+									NULL,
+									GTK_FILE_CHOOSER_ACTION_OPEN,
+									GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+									GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+									NULL);
+									
+	if(gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
+		uri = gtk_file_chooser_get_uri(GTK_FILE_CHOOSER(dialog));
+	}
+	else {
+		uri = NULL;
+	}
+									
+	gtk_widget_destroy(dialog);
+										
+	vg_tool_view_load_log (VG_TOOL_VIEW (plugin->valgrind_widget), 
+				plugin->val_actions, uri);
+
+	if (plugin->valgrind_displayed == FALSE) {
+		/* Add the widget to the shell */		
+		anjuta_shell_add_widget (ANJUTA_PLUGIN (plugin)->shell, plugin->valgrind_widget,
+						 "AnjutaValgrindPluginWidget", _("Valgrind"), "valgrind-knight",
+						 ANJUTA_SHELL_PLACEMENT_BOTTOM, NULL);	
+		plugin->valgrind_displayed = TRUE;
+	}
+				
+	g_free (uri);	
+}
+
+static GtkActionEntry actions_file[] = {
+	{
+		"ActionMenuDebug",                        /* Action name */
+		NULL,                                     /* Stock icon, if any */
+		N_("_Debug"),                             /* Display label */
+		NULL,                                     /* short-cut */
+		NULL,                                     /* Tooltip */
+		NULL                                      /* action callback */
+	},
+	{
+		"ActionMenuValgrind",                   /* Action name */
+		"valgrind-knight",                      /* Stock icon, if any */
+		N_("_Valgrind"),                     	/* Display label */
+		NULL,                                   /* short-cut */
+		NULL,                      				/* Tooltip */			
+		NULL    								/* action callback */
+	},
+	{
+		"ActionValgrindRun",                    /* Action name */
+		GTK_STOCK_EXECUTE,                      /* Stock icon, if any */
+		N_("_Select Tool and Run..."),			/* Display label */
+		NULL,                                   /* short-cut */
+		NULL,                      				/* Tooltip */			
+		G_CALLBACK(on_menu_run_activate)		/* action callback */
+	},
+	{
+		"ActionValgrindKill",                   /* Action name */
+		GTK_STOCK_CANCEL,                      	/* Stock icon, if any */
+		N_("_Kill Execution"),					/* Display label */
+		NULL,                                   /* short-cut */
+		NULL,                      				/* Tooltip */			
+		G_CALLBACK(on_menu_kill_activate)		/* action callback */
+	},
+	{
+		"ActionValgrindLoad",                   /* Action name */
+		NULL,                      	            /* Stock icon, if any */
+		N_("_Load Log"),						/* Display label */
+		NULL,                                   /* short-cut */
+		NULL,                      				/* Tooltip */			
+		G_CALLBACK(on_menu_load_log_activate)	/* action callback */
+	},
+	{
+		"ActionValgrindSave",                   /* Action name */
+		NULL,                               	/* Stock icon, if any */
+		N_("S_ave Log"),						/* Display label */
+		NULL,                                   /* short-cut */
+		NULL,                      				/* Tooltip */
+		G_CALLBACK(on_menu_save_log_activate)	/* action callback */
+	},
+	{
+		"ActionValgrindEditRules",              /* Action name */
+		NULL,                      				/* Stock icon, if any */
+		N_("Edit Rules"),						/* Display label */
+		NULL,                                   /* short-cut */
+		NULL,                      				/* Tooltip */			
+		G_CALLBACK(on_menu_editrules_activate)  /* action callback */
+	}
+};
+
+
+void
+valgrind_set_busy_status (AnjutaValgrindPlugin *plugin, gboolean status) {
+	plugin->is_busy = status;
+	
+}
+
+/*-----------------------------------------------------------------------------
+ * we adjourn the Debug->Valgrind->* menu status [i.e. sensitive or not].
+ */
+void
+valgrind_update_ui (AnjutaValgrindPlugin *plugin) 
+{
+	AnjutaUI *ui;
+	GtkAction *action;	
+	
+	ui = anjuta_shell_get_ui (ANJUTA_PLUGIN (plugin)->shell, NULL);
+
+	action = anjuta_ui_get_action (ui, "ActionGroupValgrind",
+								   "ActionValgrindRun");
+	g_object_set (G_OBJECT (action), "sensitive",
+				  !plugin->is_busy, NULL);
+	
+	action = anjuta_ui_get_action (ui, "ActionGroupValgrind",
+								   "ActionValgrindKill");
+	g_object_set (G_OBJECT (action), "sensitive",
+				  plugin->is_busy, NULL);
+
+	action = anjuta_ui_get_action (ui, "ActionGroupValgrind",
+								   "ActionValgrindLoad");
+	g_object_set (G_OBJECT (action), "sensitive",
+				  !plugin->is_busy, NULL);
+
+	action = anjuta_ui_get_action (ui, "ActionGroupValgrind",
+								   "ActionValgrindSave");
+	g_object_set (G_OBJECT (action), "sensitive",
+				  !plugin->is_busy, NULL);
+
+}
+
+static gboolean
+valgrind_activate (AnjutaPlugin *plugin)
+{
+	AnjutaUI *ui;
+	static gboolean initialized = FALSE;
+	AnjutaValgrindPlugin *valgrind;
+	
+	DEBUG_PRINT ("%s", "AnjutaValgrindPlugin: Activating AnjutaValgrindPlugin plugin ...");
+	valgrind = ANJUTA_PLUGIN_VALGRIND (plugin);
+
+	if (!initialized) {
+		register_stock_icons (plugin);
+	}
+
+	/* Add all UI actions and merge UI */
+	ui = anjuta_shell_get_ui (plugin->shell, NULL);
+	valgrind->action_group =
+		anjuta_ui_add_action_group_entries (ui, "ActionGroupValgrind",
+											_("Use Valgrind debug tool"),
+											actions_file,
+											G_N_ELEMENTS (actions_file),
+											GETTEXT_PACKAGE, TRUE, plugin);
+	valgrind->uiid = anjuta_ui_merge (ui, UI_FILE);
+
+	/* Create the main valgrind widget [a VgToolView object...]. Do NOT add it now,
+     * but only after a call to run () is made
+	 */
+	valgrind->valgrind_widget = vg_default_view_new (valgrind);
+	
+	/* And the VgActions */	
+	valgrind->val_actions = vg_actions_new (valgrind, &valgrind->val_prefs, 
+						valgrind->valgrind_widget);
+							 
+	/* set up project directory watch */
+	valgrind->project_root_uri = NULL;
+	valgrind->root_watch_id = anjuta_plugin_add_watch (plugin,
+									IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI,
+									project_root_added,
+									project_root_removed, NULL);
+
+	/* set busy status to FALSE: while initializing the plugin we're surely not 
+	 running valgrind */
+	valgrind_set_busy_status (valgrind, FALSE);
+	valgrind_update_ui (valgrind);
+
+	/* Create prefs */
+	valgrind->general_prefs = valgrind_plugin_prefs_get_anj_prefs ();
+	valgrind->val_prefs = valgrind_plugin_prefs_new ();
+	
+	initialized = TRUE;
+	return TRUE;
+}
+
+static gboolean
+valgrind_deactivate (AnjutaPlugin *plugin)
+{
+	AnjutaUI *ui;
+	AnjutaValgrindPlugin* valgrind;
+	
+	valgrind = ANJUTA_PLUGIN_VALGRIND (plugin);
+	
+	DEBUG_PRINT ("%s", "AnjutaValgrindPlugin: Dectivating AnjutaValgrindPlugin plugin ...");
+
+	if ( valgrind->valgrind_displayed ) {
+		valgrind->valgrind_displayed = FALSE;
+		anjuta_shell_remove_widget (plugin->shell, valgrind->valgrind_widget, NULL);
+	}
+
+	ui = anjuta_shell_get_ui (plugin->shell, NULL);
+	
+	anjuta_plugin_remove_watch (plugin, valgrind->root_watch_id, TRUE);
+	anjuta_ui_unmerge (ui, valgrind->uiid);
+	anjuta_ui_remove_action_group (ui, valgrind->action_group);
+	
+	/* unref VgToolView object */
+	g_object_unref (valgrind->val_actions);
+	
+	return TRUE;
+}
+
+static void
+valgrind_finalize (GObject *obj)
+{
+	/* Finalization codes here */
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+valgrind_dispose (GObject *obj)
+{
+	/* Disposition codes */
+	G_OBJECT_CLASS (parent_class)->dispose (obj);
+}
+
+static void
+anjuta_valgrind_plugin_instance_init (GObject *obj)
+{
+	AnjutaValgrindPlugin *plugin = ANJUTA_PLUGIN_VALGRIND (obj);
+
+	plugin->uiid = 0;
+
+	plugin->valgrind_widget = NULL;
+	plugin->general_prefs = NULL;
+	plugin->valgrind_displayed = FALSE;
+}
+
+static void
+anjuta_valgrind_plugin_class_init (GObjectClass *klass) 
+{
+	AnjutaPluginClass *plugin_class = ANJUTA_PLUGIN_CLASS (klass);
+
+	parent_class = g_type_class_peek_parent (klass);
+
+	plugin_class->activate = valgrind_activate;
+	plugin_class->deactivate = valgrind_deactivate;
+	klass->finalize = valgrind_finalize;
+	klass->dispose = valgrind_dispose;
+}
+
+static void 
+ipreferences_merge(IAnjutaPreferences* ipref, AnjutaPreferences* prefs, GError** e)
+{
+	GdkPixbuf* pixbuf;
+	AnjutaValgrindPlugin* valgrind = ANJUTA_PLUGIN_VALGRIND (ipref);
+
+	pixbuf = gdk_pixbuf_new_from_file (PACKAGE_PIXMAPS_DIR"/"ICON_FILE, NULL);
+
+	gtk_widget_show (valgrind->general_prefs);
+	anjuta_preferences_dialog_add_page (ANJUTA_PREFERENCES_DIALOG (anjuta_preferences_get_dialog (prefs)),
+						"Valgrind", _("Valgrind"), pixbuf, valgrind->general_prefs);
+	g_object_unref (pixbuf);
+}
+
+static void
+ipreferences_unmerge(IAnjutaPreferences* ipref, AnjutaPreferences* prefs, GError** e)
+{
+	AnjutaValgrindPlugin* valgrind = ANJUTA_PLUGIN_VALGRIND (ipref);
+	anjuta_preferences_dialog_remove_page(ANJUTA_PREFERENCES_DIALOG (anjuta_preferences_get_dialog (prefs)), 
+		_("Valgrind"));
+	/* Recreate object as it gets destroyed in the remove_page method */
+	valgrind->general_prefs = valgrind_plugin_prefs_get_anj_prefs ();
+}
+
+static void
+ipreferences_iface_init(IAnjutaPreferencesIface* iface)
+{
+	iface->merge = ipreferences_merge;
+	iface->unmerge = ipreferences_unmerge;	
+}
+
+ANJUTA_PLUGIN_BEGIN (AnjutaValgrindPlugin, anjuta_valgrind_plugin);
+ANJUTA_PLUGIN_ADD_INTERFACE(ipreferences, IANJUTA_TYPE_PREFERENCES);
+ANJUTA_PLUGIN_END;
+
+ANJUTA_SIMPLE_PLUGIN (AnjutaValgrindPlugin, anjuta_valgrind_plugin);

Added: trunk/plugins/valgrind/plugin.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/plugin.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,75 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * plugin.h
+ * Copyright (C) Massimo Cora' 2005 <maxcvs gmail com>
+ * 
+ * plugin.h 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, or (at your option) any later version.
+ * 
+ * plugin.h 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 plugin.h.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef _VALGRIND_PLUGIN_H_
+#define _VALGRIND_PLUGIN_H_
+
+#include <libanjuta/anjuta-plugin.h>
+#include "preferences.h"
+
+
+G_BEGIN_DECLS
+
+extern GType anjuta_valgrind_plugin_get_type (GTypeModule *module);
+#define ANJUTA_TYPE_PLUGIN_VALGRIND         (anjuta_valgrind_plugin_get_type (NULL))
+#define ANJUTA_PLUGIN_VALGRIND(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_PLUGIN_VALGRIND, AnjutaValgrindPlugin))
+#define ANJUTA_PLUGIN_VALGRIND_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), ANJUTA_TYPE_PLUGIN_VALGRIND, AnjutaValgrindPluginClass))
+#define ANJUTA_IS_PLUGIN_VALGRIND(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_PLUGIN_VALGRIND))
+#define ANJUTA_IS_PLUGIN_VALGRIND_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_PLUGIN_VALGRIND))
+#define ANJUTA_PLUGIN_VALGRIND_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), ANJUTA_TYPE_PLUGIN_VALGRIND, AnjutaValgrindPluginClass))
+
+typedef struct _AnjutaValgrindPlugin AnjutaValgrindPlugin;
+typedef struct _AnjutaValgrindPluginClass AnjutaValgrindPluginClass;
+
+#include "vgactions.h"
+
+struct _AnjutaValgrindPlugin{
+	AnjutaPlugin parent;
+
+	gboolean is_busy;
+	
+	gchar *project_root_uri;
+	gint root_watch_id;
+	
+	GtkWidget *valgrind_widget;			/* a VgToolView object */
+	gboolean valgrind_displayed;	
+	GtkWidget *general_prefs;
+	VgActions *val_actions;
+	
+	ValgrindPluginPrefs * val_prefs;
+	
+	gint uiid;
+	GtkActionGroup *action_group;
+};
+
+struct _AnjutaValgrindPluginClass{
+	AnjutaPluginClass parent_class;
+};
+
+
+void valgrind_set_busy_status (AnjutaValgrindPlugin *plugin, gboolean status);
+void valgrind_update_ui (AnjutaValgrindPlugin *plugin);
+
+G_END_DECLS
+
+#endif /* _VALGRIND_PLUGIN_H_ */

Added: trunk/plugins/valgrind/preferences.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/preferences.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,337 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ *  preferences.c
+ *
+ *  Copyright (C) Massimo Cora' 2006 <maxcvs gmail com> 
+ * 
+ * preferences.c 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, or (at your option) any later version.
+ * 
+ * plugin.h 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 plugin.h.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+ 
+#include "vggeneralprefs.h"
+#include "vgmemcheckprefs.h"
+#include "vgcachegrindprefs.h"
+#include "vghelgrindprefs.h"
+#include "preferences.h" 
+
+#include <string.h>
+#include <gconf/gconf-client.h>
+#include <libanjuta/anjuta-debug.h>
+
+#define EDITOR_KEY      "/apps/anjuta/valgrind/editor"
+#define NUM_LINES_KEY   "/apps/anjuta/valgrind/num-lines"
+#define EXE_PATH     	"/apps/anjuta/valgrind/exe-path"
+
+#define VALGRIND_DEFAULT_BIN	"/usr/bin/valgrind"
+
+enum {
+	PAGE_GENERAL    = 0,
+	PAGE_MEMCHECK   = 1,
+	PAGE_ADDRCHECK  = PAGE_MEMCHECK,
+	PAGE_CACHEGRIND = 2,
+	PAGE_HELGRIND   = 3,
+};
+
+struct _ValgrindPluginPrefsPriv {
+	GtkWidget * pages[4];	/* must be used only to retrieve gconf parameters.
+							 * Do NOT return these as widgets that can be destroyed */
+};
+
+ 
+static void valgrind_plugin_prefs_class_init(ValgrindPluginPrefsClass *klass);
+static void valgrind_plugin_prefs_init(ValgrindPluginPrefs *sp);
+static void valgrind_plugin_prefs_finalize(GObject *object);
+
+static GObjectClass *parent_class = NULL;
+
+static gboolean 
+spin_changed (GtkSpinButton *spin, GdkEvent *event, const char *key) 
+{
+	GConfClient *gconf;
+	gint num;
+	
+	gconf = gconf_client_get_default ();
+	
+	num = gtk_spin_button_get_value_as_int (spin);
+	gconf_client_set_int (gconf, key, num, NULL);
+	
+	g_object_unref (gconf);
+	
+	return FALSE;
+}
+
+
+/*-----------------------------------------------------------------------------
+ * Callback for valgrind exe file path selection
+ */
+
+static void
+on_exe_path_entry_changed (GtkFileChooser *chooser, const char *key)
+{
+	GConfClient *gconf;
+	gchar *str;
+	
+	gconf = gconf_client_get_default ();
+	
+	str = gtk_file_chooser_get_filename (chooser);
+	
+	DEBUG_PRINT ("str is %s key is %s", str, key);
+	
+	gconf_client_set_string (gconf, key, str ? str : "", NULL);
+	g_free (str);
+
+	g_object_unref (gconf);
+}
+
+
+/*-----------------------------------------------------------------------------
+ * build and returns a widget containing the general prefs of alleyoop/valgrind
+ */
+
+static GtkWidget *
+build_general_prefs () 
+{
+	GConfClient *gconf;
+	GtkWidget *vbox, *hbox, *label, *main_label, *gen_page, *widget;
+	GtkSpinButton *numlines;
+	GError *err = NULL;
+	gint num;
+	gchar *str_file;
+
+	gconf = gconf_client_get_default ();	
+
+	vbox = gtk_vbox_new (FALSE, 6);
+
+	hbox = gtk_hbox_new (FALSE, 6);
+
+	main_label = gtk_label_new ("");
+	gtk_label_set_markup (GTK_LABEL (main_label), _("<b>Valgrind general preferences</b>"));	
+
+	gtk_box_pack_start (GTK_BOX (hbox), main_label, FALSE, FALSE, 0);
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+	
+	hbox = gtk_hbox_new (FALSE, 6);
+	label = gtk_label_new (_("Valgrind binary file path:"));
+	gtk_widget_show (label);
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+
+	str_file = gconf_client_get_string (gconf, EXE_PATH, &err);
+
+	if (str_file == NULL || err != NULL || strlen (str_file) <= 0) {
+		str_file = g_strdup (VALGRIND_DEFAULT_BIN);
+	}
+	
+	if (!g_path_is_absolute(str_file))
+		DEBUG_PRINT("%s", "Not absolute");
+	
+	widget = 
+		gtk_file_chooser_button_new (_("Choose Valgrind Binary File Path..."), 
+								GTK_FILE_CHOOSER_ACTION_OPEN);
+								
+	if ( gtk_file_chooser_select_filename (GTK_FILE_CHOOSER (widget), str_file) == FALSE )
+		DEBUG_PRINT ("%s", "error: could not select file uri with gtk_file_chooser_select_filename ()");
+		
+	g_free (str_file);
+
+	/* grab every change in file selection */
+	g_signal_connect (widget, "selection-changed", G_CALLBACK (on_exe_path_entry_changed), EXE_PATH);
+
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (hbox), widget, TRUE, TRUE, 0);
+
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+	
+	hbox = gtk_hbox_new (FALSE, 6);
+	
+	label = gtk_label_new (_("Preview"));
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+
+	num = gconf_client_get_int (gconf, NUM_LINES_KEY, NULL);
+	numlines = GTK_SPIN_BUTTON (gtk_spin_button_new_with_range (0, (gdouble) INT_MAX, 1));
+	gtk_spin_button_set_digits (numlines, 0);
+	gtk_spin_button_set_numeric (numlines, TRUE);
+	gtk_spin_button_set_value (numlines, (gdouble) num);
+
+	g_signal_connect (numlines, "focus-out-event", G_CALLBACK (spin_changed), NUM_LINES_KEY);
+	gtk_widget_show (GTK_WIDGET (numlines));
+	gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (numlines), FALSE, FALSE, 0);
+
+	label = gtk_label_new (_("lines above and below the target line."));
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+
+	/* create a fresh new general prefs widget and add it to the vbox */
+	gen_page = g_object_new (VG_TYPE_GENERAL_PREFS, NULL);
+	gtk_box_pack_start (GTK_BOX (vbox), gen_page, FALSE, FALSE, 0);
+	
+	gtk_widget_show_all (vbox);
+	return vbox;
+}
+
+GPtrArray *
+valgrind_plugin_prefs_create_argv (ValgrindPluginPrefs *valprefs, const char *tool)
+{
+	GPtrArray *argv;
+	int page;
+	ValgrindPluginPrefsPriv *priv;
+	GConfClient *gconf;
+	gchar *str_file;
+	
+	g_return_val_if_fail (valprefs != NULL, NULL);
+	
+	priv = valprefs->priv;
+	
+	argv = g_ptr_array_new ();
+	
+	gconf = gconf_client_get_default ();
+	str_file = gconf_client_get_string (gconf, EXE_PATH, NULL);
+	
+	g_ptr_array_add (argv, str_file);
+		
+	if (tool != NULL) {
+		if (!strcmp (tool, "memcheck")) {
+			g_ptr_array_add (argv, "--tool=memcheck");
+			page = PAGE_MEMCHECK;
+		} else if (!strcmp (tool, "addrcheck")) {
+			g_ptr_array_add (argv, "--tool=addrcheck");
+			page = PAGE_ADDRCHECK;
+		} else if (!strcmp (tool, "cachegrind")) {
+			g_ptr_array_add (argv, "--tool=cachegrind");
+			page = PAGE_CACHEGRIND;
+		} else if (!strcmp (tool, "helgrind")) {
+			g_ptr_array_add (argv, "--tool=helgrind");
+			page = PAGE_HELGRIND;
+		} else {
+			g_assert_not_reached ();
+		}
+	} else {
+		/* default tool */
+		g_ptr_array_add (argv, "--tool=memcheck");
+		page = PAGE_MEMCHECK;
+	}
+
+	/* next, apply the general prefs */
+	vg_tool_prefs_get_argv (VG_TOOL_PREFS (priv->pages[PAGE_GENERAL]), tool, argv);
+
+	/* finally, apply the current view's prefs */
+	vg_tool_prefs_get_argv (VG_TOOL_PREFS (priv->pages[page]), tool, argv);
+
+	return argv;
+}
+
+GtkWidget *
+valgrind_plugin_prefs_get_anj_prefs (void)
+{
+	return build_general_prefs ();
+}
+ 
+GtkWidget * 
+valgrind_plugin_prefs_get_general_widget (void) 
+{
+	return g_object_new (VG_TYPE_GENERAL_PREFS, NULL);
+}
+
+GtkWidget * 
+valgrind_plugin_prefs_get_memcheck_widget (void) 
+{
+	return g_object_new (VG_TYPE_MEMCHECK_PREFS, NULL);
+}
+
+GtkWidget * 
+valgrind_plugin_prefs_get_cachegrind_widget (void) 
+{
+	return g_object_new (VG_TYPE_CACHEGRIND_PREFS, NULL);
+}
+
+GtkWidget * 
+valgrind_plugin_prefs_get_helgrind_widget (void) 
+{
+	return g_object_new (VG_TYPE_HELGRIND_PREFS, NULL);
+}
+
+
+GType
+valgrind_plugin_prefs_get_type(void)
+{
+	static GType type = 0;
+
+	if(type == 0) {
+		static const GTypeInfo our_info = {
+			sizeof (ValgrindPluginPrefsClass),
+			NULL,
+			NULL,
+			(GClassInitFunc)valgrind_plugin_prefs_class_init,
+			NULL,
+			NULL,
+			sizeof (ValgrindPluginPrefs),
+			0,
+			(GInstanceInitFunc)valgrind_plugin_prefs_init,
+		};
+
+		type = g_type_register_static(G_TYPE_OBJECT, 
+			"ValgrindPluginPrefs", &our_info, 0);
+	}
+
+	return type;
+}
+
+static void
+valgrind_plugin_prefs_class_init(ValgrindPluginPrefsClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS(klass);
+
+	parent_class = g_type_class_peek_parent(klass);
+	object_class->finalize = valgrind_plugin_prefs_finalize;
+}
+
+static void
+valgrind_plugin_prefs_init(ValgrindPluginPrefs *obj)
+{
+	ValgrindPluginPrefsPriv *priv;
+	obj->priv = g_new0(ValgrindPluginPrefsPriv, 1);
+
+	priv = obj->priv;
+	
+	/* build our own widgets. These will be used only by VgActions to retrieve
+	 * the configs */
+	priv->pages[PAGE_GENERAL] = g_object_new (VG_TYPE_GENERAL_PREFS, NULL);	
+	priv->pages[PAGE_MEMCHECK] = g_object_new (VG_TYPE_MEMCHECK_PREFS, NULL);
+	priv->pages[PAGE_CACHEGRIND] = g_object_new (VG_TYPE_CACHEGRIND_PREFS, NULL);
+	priv->pages[PAGE_HELGRIND] = g_object_new (VG_TYPE_HELGRIND_PREFS, NULL);		
+}
+
+static void
+valgrind_plugin_prefs_finalize(GObject *object)
+{
+	ValgrindPluginPrefs *cobj;
+	cobj = VALGRIND_PLUGINPREFS(object);
+	
+	/* FIXME: Free private members, etc. */
+	g_free(cobj->priv);
+	G_OBJECT_CLASS(parent_class)->finalize(object);
+}
+
+ValgrindPluginPrefs *
+valgrind_plugin_prefs_new(void)
+{
+	ValgrindPluginPrefs *obj;
+	
+	obj = VALGRIND_PLUGINPREFS(g_object_new(VALGRIND_TYPE_PLUGINPREFS, NULL));
+	
+	return obj;
+}

Added: trunk/plugins/valgrind/preferences.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/preferences.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,73 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * preferences.c
+ *
+ *  Copyright (C) Jeffrey Stedfast 2003 <fejj ximian com>
+ *  Copyright (C) Ximian, Inc. 2003 (www.ximian.com)
+ *  Copyright (C) Massimo Cora' 2006 <maxcvs gmail com> 
+ * 
+ * preferences.c 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, or (at your option) any later version.
+ * 
+ * plugin.h 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 plugin.h.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+ 
+
+#ifndef _PREFERENCES_VALGRIND_H
+#define _PREFERENCES_VALGRIND_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <glib.h>
+#include <glib/gi18n.h>
+
+
+G_BEGIN_DECLS
+
+#define VALGRIND_TYPE_PLUGINPREFS         (valgrind_plugin_prefs_get_type ())
+#define VALGRIND_PLUGINPREFS(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), VALGRIND_TYPE_PLUGINPREFS, ValgrindPluginPrefs))
+#define VALGRIND_PLUGINPREFS_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), VALGRIND_TYPE_PLUGINPREFS, ValgrindPluginPrefsClass))
+#define VALGRIND_IS_PLUGINPREFS(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), VALGRIND_TYPE_PLUGINPREFS))
+#define VALGRIND_IS_PLUGINPREFS_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), VALGRIND_TYPE_PLUGINPREFS))
+#define VALGRIND_PLUGINPREFS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), VALGRIND_TYPE_PLUGINPREFS, ValgrindPluginPrefsClass))
+
+typedef struct _ValgrindPluginPrefsPriv ValgrindPluginPrefsPriv;
+
+typedef struct {
+	GObject parent;
+	ValgrindPluginPrefsPriv *priv;
+} ValgrindPluginPrefs;
+
+typedef struct {
+	GObjectClass parent_class;
+
+} ValgrindPluginPrefsClass;
+
+GType valgrind_plugin_prefs_get_type (void);
+ValgrindPluginPrefs *valgrind_plugin_prefs_new (void);
+
+
+GtkWidget *valgrind_plugin_prefs_get_anj_prefs (void);
+GtkWidget *valgrind_plugin_prefs_get_general_widget (void);
+GtkWidget *valgrind_plugin_prefs_get_memcheck_widget (void);
+GtkWidget *valgrind_plugin_prefs_get_cachegrind_widget (void);
+GtkWidget *valgrind_plugin_prefs_get_helgrind_widget (void);
+
+GPtrArray *valgrind_plugin_prefs_create_argv (ValgrindPluginPrefs *val, const char *tool);
+
+G_END_DECLS
+
+#endif /* _PREFERENCES_VALGRIND_H */

Added: trunk/plugins/valgrind/process.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/process.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,193 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib/gi18n.h>
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <signal.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include "process.h"
+
+#define d(x)
+
+pid_t
+process_fork (const char *path, char **argv, gboolean redirect, int ignfd, int *infd, int *outfd, int *errfd, GError **err)
+{
+	int errnosav, fds[6], i;
+	pid_t pid;
+	
+	for (i = 0; i < 6; i++)
+		fds[i] = -1;
+	
+	for (i = 0; i < 6; i += 2) {
+		if (pipe (fds + i) == -1) {
+			errnosav = errno;
+			g_set_error (err, g_quark_from_string ("process"), errno,
+				     _("Failed to create pipe to '%s': %s"),
+				     argv[0], g_strerror (errno));
+			
+			for (i = 0; i < 6; i++) {
+				if (fds[i] == -1)
+					break;
+				close (fds[i]);
+			}
+			
+			errno = errnosav;
+			
+			return -1;
+		}
+	}
+	
+#if d(!)0
+	fprintf (stderr, "exec()'ing %s\n", path);
+	for (i = 0; argv[i]; i++)
+		fprintf (stderr, "%s ", argv[i]);
+	fprintf (stderr, "\n");
+#endif
+	
+	if (!(pid = fork ())) {
+		/* child process */
+		int maxfd, nullfd = -1;
+		
+		if (!redirect) {
+			if (!infd || !outfd || !errfd)
+				nullfd = open ("/dev/null", O_WRONLY);
+			
+			if (dup2 (infd ? fds[0] : nullfd, STDIN_FILENO) == -1)
+				_exit (255);
+			
+			if (dup2 (outfd ? fds[3] : nullfd, STDOUT_FILENO) == -1)
+				_exit (255);
+			
+			if (dup2 (errfd ? fds[5] : nullfd, STDERR_FILENO) == -1)
+				_exit (255);
+		}
+		
+		setsid ();
+		
+		if ((maxfd = sysconf (_SC_OPEN_MAX)) > 0) {
+			int fd;
+			
+			for (fd = 3; fd < maxfd; fd++) {
+				if (fd != ignfd)
+					fcntl (fd, F_SETFD, FD_CLOEXEC);
+			}
+		}
+		
+		execv (path, argv);
+		_exit (255);
+	} else if (pid == -1) {
+		g_set_error (err, g_quark_from_string ("process"), errno,
+			     _("Failed to create child process '%s': %s"),
+			     argv[0], g_strerror (errno));
+		return -1;
+	}
+	
+	/* parent process */
+	close (fds[0]);
+	close (fds[3]);
+	close (fds[5]);
+	
+	if (infd)
+		*infd = fds[1];
+	else
+		close (fds[1]);
+	
+	if (outfd)
+		*outfd = fds[2];
+	else
+		close (fds[2]);
+	
+	if (errfd)
+		*errfd = fds[4];
+	else
+		close (fds[4]);
+	
+	return pid;
+}
+
+
+int
+process_wait (pid_t pid)
+{
+	sigset_t mask, omask;
+	int status;
+	pid_t r;
+	
+	sigemptyset (&mask);
+	sigaddset (&mask, SIGALRM);
+	sigprocmask (SIG_BLOCK, &mask, &omask);
+	alarm (1);
+	
+	r = waitpid (pid, &status, 0);
+	
+	alarm (0);
+	sigprocmask (SIG_SETMASK, &omask, NULL);
+	
+	if (r == (pid_t) -1 && errno == EINTR) {
+		kill (pid, SIGTERM);
+		sleep (1);
+		r = waitpid (pid, &status, WNOHANG);
+		if (r == (pid_t) 0) {
+			kill (pid, SIGKILL);
+			sleep (1);
+			r = waitpid (pid, &status, WNOHANG);
+		}
+	}
+	
+	if (r != (pid_t) -1 && WIFEXITED (status))
+		return WEXITSTATUS (status);
+	else
+		return -1;
+}
+
+
+int
+process_kill (pid_t pid)
+{
+	int status;
+	pid_t r;
+	
+	kill (pid, SIGTERM);
+	sleep (1);
+	r = waitpid (pid, &status, WNOHANG);
+	if (r == (pid_t) 0) {
+		kill (pid, SIGKILL);
+		sleep (1);
+		r = waitpid (pid, &status, WNOHANG);
+	}
+	
+	if (r != (pid_t) -1 && WIFEXITED (status))
+		return WEXITSTATUS (status);
+	else
+		return -1;
+}

Added: trunk/plugins/valgrind/process.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/process.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,46 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __PROCESS_H__
+#define __PROCESS_H__
+
+#include <glib.h>
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+pid_t process_fork (const char *path, char **argv, gboolean redirect, int ignfd,
+		    int *infd, int *outfd, int *errfd, GError **err);
+
+int process_wait (pid_t pid);
+
+int process_kill (pid_t pid);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __PROCESS_H__ */

Added: trunk/plugins/valgrind/symtab.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/symtab.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,323 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+// fixme
+#define LDD_PATH "/usr/bin/ldd"
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include "symtab.h"
+#include "process.h"
+#include "ldd.h"
+
+#define d(x)
+#define w(x) x
+
+#define POINTER_ARITHMETIC(POINTER, OFFSET) \
+    (void *)((char *)(POINTER) + (OFFSET))
+
+static asymbol **
+slurp_symtab (bfd *abfd, long *symcount)
+{
+	asymbol **syms = (asymbol **) NULL;
+	long storage;
+	
+	if (!(bfd_get_file_flags (abfd) & HAS_SYMS)) {
+		w(fprintf (stderr, "No symbols in \"%s\".\n", bfd_get_filename (abfd)));
+		*symcount = 0;
+		return NULL;
+	}
+	
+	storage = bfd_get_symtab_upper_bound (abfd);
+	if (storage < 0) {
+		w(fprintf (stderr, "%s: Invalid upper-bound\n", bfd_get_filename (abfd)));
+		*symcount = 0;
+		return NULL;
+	} else if (storage == 0) {
+		*symcount = 0;
+		return NULL;
+	}
+	
+	syms = g_malloc (storage);
+	
+	*symcount = bfd_canonicalize_symtab (abfd, syms);
+	
+	if (*symcount < 0) {
+		w(fprintf (stderr, "%s: Invalid symbol count\n", bfd_get_filename (abfd)));
+		g_free (syms);
+		return NULL;
+	}
+	
+	if (*symcount == 0) {
+		w(fprintf (stderr, "%s: No symbols\n", bfd_get_filename (abfd)));
+	}
+	
+	return syms;
+}
+
+static SymTabMap *
+symtab_map_new (const char *filename, const char *libname, void *load_addr)
+{
+	SymTabMap *map;
+	asection *section;
+	
+	map = g_new (SymTabMap, 1);
+	map->next = NULL;
+	
+	map->abfd = bfd_openr (filename, NULL);
+	if (map->abfd == NULL) {
+		g_free (map);
+		return NULL;
+	}
+	
+	if (!bfd_check_format (map->abfd, bfd_object)) {
+		bfd_close (map->abfd);
+		g_free (map);
+		return NULL;
+	}
+	
+	map->syms = slurp_symtab (map->abfd, &map->symcount);
+	if (!map->syms) {
+		bfd_close (map->abfd);
+		g_free (map);
+		return NULL;
+	}
+	
+	section = bfd_get_section_by_name (map->abfd, ".text");
+	if (!section) {
+		g_free (map->syms);
+		bfd_close (map->abfd);
+		g_free (map);
+		return NULL;
+	}
+
+	map->text_section = section;
+	map->text_start = POINTER_ARITHMETIC(load_addr, bfd_section_vma (map->abfd, section));
+#ifdef HAVE_BFD_GET_SECTION_SIZE_BEFORE_RELOC
+	map->text_end = POINTER_ARITHMETIC(map->text_start, bfd_get_section_size_before_reloc (section));
+#else
+	map->text_end = POINTER_ARITHMETIC(map->text_start, bfd_get_section_size (section));
+#endif
+	
+	map->filename = g_strdup (filename);
+	map->libname = g_strdup (libname);
+	map->load_addr = load_addr;
+	
+	return map;
+}
+
+static void
+load_shared_lib (LddParser *ldd, LddSharedLib *shlib, void *user_data)
+{
+	SymTab *symtab = user_data;
+	SymTabMap *lib;
+	
+	if (!(lib = symtab_map_new ((char *)shlib->path, (char *)shlib->libname, (void *) shlib->addr))) {
+		ldd_shared_lib_free (shlib);
+		return;
+	}
+	
+	symtab->tail->next = lib;
+	symtab->tail = lib;
+	
+	ldd_shared_lib_free (shlib);
+}
+
+
+SymTab *
+symtab_new (const char *filename)
+{
+	const char *basename;
+	SymTab *symtab;
+	LddParser *ldd;
+	char *argv[3];
+	pid_t pid;
+	int fd;
+	
+	symtab = g_new (SymTab, 1);
+	symtab->libs = NULL;
+	symtab->tail = (SymTabMap *) &symtab->libs;
+	
+	if (!(basename = strrchr (filename, '/')))
+		basename = filename;
+	else
+		basename++;
+	
+	if (!(symtab->prog = symtab_map_new (filename, basename, NULL))) {
+		g_free (symtab);
+		return NULL;
+	}
+	
+	argv[0] = LDD_PATH;
+	argv[1] = (char *) filename;
+	argv[2] = NULL;
+	
+	if ((pid = process_fork (LDD_PATH, argv, FALSE, -1, NULL, &fd, NULL, NULL)) == -1)
+		return symtab;
+	
+	ldd = ldd_parser_new (fd, load_shared_lib, symtab);
+	while (ldd_parser_step (ldd) > 0)
+		;
+	
+	ldd_parser_flush (ldd);
+	ldd_parser_free (ldd);
+	close (fd);
+	
+	process_wait (pid);
+	
+	symtab->prog->next = symtab->libs;
+	
+	return symtab;
+}
+
+static void
+symtab_map_free (SymTabMap *map)
+{
+	g_free (map->filename);
+	g_free (map->libname);
+	bfd_close (map->abfd);
+	g_free (map->syms);
+	g_free (map);
+}
+
+void
+symtab_free (SymTab *symtab)
+{
+	SymTabMap *n, *nn;
+	
+	if (symtab == NULL)
+		return;
+	
+	symtab_map_free (symtab->prog);
+	
+	n = symtab->libs;
+	while (n != NULL) {
+		nn = n->next;
+		symtab_map_free (n);
+		n = nn;
+	}
+	
+	g_free (symtab);
+}
+
+
+#define DMGL_PARAMS     (1 << 0)        /* Include function args */
+#define DMGL_ANSI       (1 << 1)        /* Include const, volatile, etc */
+
+extern char *cplus_demangle (const char *mangled, int options);
+
+static char *
+demangle (bfd *abfd, const char *name, int demangle_cpp)
+{
+	char *demangled = NULL;
+	
+	if (bfd_get_symbol_leading_char (abfd) == *name)
+		name++;
+	
+	if (demangle_cpp)
+		demangled = cplus_demangle (name, DMGL_PARAMS | DMGL_ANSI);
+	
+	return g_strdup (name);
+}
+
+static SymTabMap *
+symtab_find_lib (SymTab *symtab, void *addr)
+{
+	SymTabMap *map, *prev;
+	
+	d(fprintf (stderr, "looking for library with symbols for %p\n", addr));
+	
+	prev = map = symtab->prog;
+	while (map) {
+		d(fprintf (stderr, "%s: load_addr=%p; text_start=%p; text_end=%p\n",
+			   map->libname, map->load_addr, map->text_start, map->text_end));
+		
+		if (addr > map->text_start && addr < map->text_end)
+			return prev;
+		
+		map = map->next;
+	}
+	
+	return NULL;
+}
+
+SymTabSymbol *
+symtab_resolve_addr (SymTab *symtab, void *addr, int demangle_cpp)
+{
+	SymTabSymbol *sym;
+	const char *name;
+	SymTabMap *lib;
+    bfd_vma offset;
+	
+	if (!(lib = symtab_find_lib (symtab, addr))) {
+		d(fprintf (stderr, "can't figure out which lib %p is in\n", addr));
+		return NULL;
+	}
+	
+	if (lib->abfd->iostream == NULL) {
+		lib->abfd->iostream = (void *) fopen (lib->filename, "r+");
+		if (lib->abfd->iostream == NULL)
+			return NULL;
+	}
+	
+	sym = g_new (SymTabSymbol, 1);
+	
+    offset = (bfd_vma)((char *)addr - (char *)lib->load_addr);
+	
+	if (bfd_find_nearest_line (lib->abfd, lib->text_section, lib->syms,
+				   offset - lib->text_section->vma,
+				   &sym->filename, &name, &sym->lineno)) {
+		if (name)
+			sym->function = demangle (lib->abfd, name, demangle_cpp);
+		else
+			sym->function = NULL;
+	} else {
+		d(fprintf (stderr, "bfd failed to find symbols for %p\n", addr));
+		g_free (sym);
+		sym = NULL;
+	}
+	
+	return sym;
+}
+
+
+void
+symtab_symbol_free (SymTabSymbol *sym)
+{
+	if (sym == NULL)
+		return;
+	
+	g_free (sym->function);
+	g_free (sym);
+}

Added: trunk/plugins/valgrind/symtab.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/symtab.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,74 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __SYMTAB_H__
+#define __SYMTAB_H__
+
+#include <bfd.h>
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+
+typedef struct _SymTabMap {
+	struct _SymTabMap *next;
+	char *filename;
+	char *libname;
+	bfd *abfd;
+	asymbol **syms;
+	long symcount;
+	asection *text_section;
+	void *text_start;
+	void *text_end;
+	void *load_addr;
+} SymTabMap;
+
+typedef struct {
+	SymTabMap *prog;
+	SymTabMap *libs;
+	SymTabMap *tail;
+} SymTab;
+
+SymTab *symtab_new (const char *filename);
+
+void symtab_free (SymTab *symtab);
+
+
+typedef struct {
+	const char *filename;
+	char *function;
+	size_t lineno;
+} SymTabSymbol;
+
+SymTabSymbol *symtab_resolve_addr (SymTab *symtab, void *addr, int demangle_cpp);
+
+void symtab_symbol_free (SymTabSymbol *symbol);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __SYMTAB_H__ */

Added: trunk/plugins/valgrind/vgactions.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgactions.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,340 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * Copyright (C) Massimo Cora' 2005 <maxcvs gmail com>
+ *
+ * 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, or (at your option) any later version.
+ * 
+ * plugin.h 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 plugin.h.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include <libanjuta/anjuta-debug.h>
+
+#include "vgactions.h"
+#include "vgtoolview.h"
+#include "vgdefaultview.h"
+
+#define EXE_PATH     	"/apps/anjuta/valgrind/exe-path"
+ 
+static void vg_actions_class_init(VgActionsClass *klass);
+static void vg_actions_init(VgActions *sp);
+static void vg_actions_finalize(GObject *object);
+
+static GObjectClass *parent_class = NULL;
+
+struct _VgActionsPriv {
+	const gchar *program;
+	const char **srcdir;
+	SymTab *symtab;
+	
+	GtkWidget *view;
+	
+	GIOChannel *gio;
+	guint watch_id;
+	pid_t pid;
+	
+	AnjutaValgrindPlugin *anjuta_plugin;	/* mainly for valgrind_update_ui () */
+	ValgrindPluginPrefs **prefs;
+};
+
+
+GType
+vg_actions_get_type (void)
+{
+	static GType type = 0;
+
+	if(type == 0) {
+		static const GTypeInfo our_info = {
+			sizeof (VgActionsClass),
+			NULL,
+			NULL,
+			(GClassInitFunc)vg_actions_class_init,
+			NULL,
+			NULL,
+			sizeof (VgActions),
+			0,
+			(GInstanceInitFunc)vg_actions_init,
+		};
+
+		type = g_type_register_static(G_TYPE_OBJECT, 
+			"VgActions", &our_info, 0);
+	}
+
+	return type;
+}
+
+static void
+vg_actions_class_init(VgActionsClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS(klass);
+
+	parent_class = g_type_class_peek_parent(klass);
+	object_class->finalize = vg_actions_finalize;
+}
+
+static void
+vg_actions_init(VgActions *obj)
+{
+	VgActionsPriv *priv;
+	obj->priv = g_new0(VgActionsPriv, 1);
+	
+	priv = obj->priv;
+	
+	priv->srcdir = NULL;
+	priv->symtab = NULL;
+	
+	priv->view = NULL;
+	
+	priv->gio = NULL;
+	priv->watch_id = 0;
+	priv->pid = (pid_t) -1;
+	
+	priv->prefs = NULL;
+}
+
+static void
+vg_actions_finalize(GObject *object)
+{
+	VgActions *cobj;
+	cobj = VG_ACTIONS(object);
+
+	g_object_unref (G_OBJECT (cobj->priv->anjuta_plugin));
+	g_object_unref (G_OBJECT (cobj->priv->view));
+	
+	/* Free private members, etc. */
+	/* wouldn't be necessary.. anyway */
+	cobj->priv->anjuta_plugin = NULL;
+	cobj->priv->prefs = NULL;
+	
+	g_free(cobj->priv);
+	G_OBJECT_CLASS(parent_class)->finalize(object);
+}
+
+VgActions *
+vg_actions_new (AnjutaValgrindPlugin *anjuta_plugin, 
+		ValgrindPluginPrefs **prefs, GtkWidget *vg_default_view)
+{
+	VgActions *obj;
+    
+	g_return_val_if_fail(prefs != NULL, NULL);
+	
+	obj = VG_ACTIONS(g_object_new(VG_TYPE_ACTIONS, NULL));
+	
+	/* set the anjuta plugin object */
+	obj->priv->anjuta_plugin = anjuta_plugin;	
+	
+	/* set the prefs object */
+	obj->priv->prefs = prefs;
+		
+	/* and the view object */
+	obj->priv->view = GTK_WIDGET (vg_default_view);
+	
+	g_object_ref (G_OBJECT (obj->priv->anjuta_plugin));
+	g_object_ref (G_OBJECT (obj->priv->view));
+	
+	return obj;
+}
+
+static gboolean
+io_ready_cb (GIOChannel *gio, GIOCondition condition, gpointer user_data)
+{
+	VgActions *actions = user_data;
+	VgActionsPriv *priv;
+
+	priv = actions->priv;
+
+	if ((condition & G_IO_IN) && vg_tool_view_step (VG_TOOL_VIEW (priv->view)) <= 0) {
+		DEBUG_PRINT ("%s", "child program exited or error in GIOChannel [IO_IN], killing");
+		anjuta_util_dialog_info (NULL, _("Reached the end of the input file or error "
+								"in parsing valgrind output."));
+		vg_actions_kill (actions);
+		priv->watch_id = 0;
+		return FALSE;
+	}
+
+	if (condition & G_IO_HUP) {
+		DEBUG_PRINT ("%s", "child program exited or error in GIOChannel [IO_HUP], killing");
+		anjuta_util_dialog_info (NULL, _("Process exited."));
+		vg_actions_kill (actions);
+		priv->watch_id = 0;
+		return FALSE;
+	}
+	
+	return TRUE;
+}
+
+static gboolean
+check_valgrind_binary() 
+{
+	GConfClient *gconf;
+	gchar *str_valgrind_file;
+	GError *err = NULL;
+	
+	gconf = gconf_client_get_default ();	
+	if (!(str_valgrind_file = 
+			gconf_client_get_string (gconf, EXE_PATH, &err)) || err != NULL) {
+		anjuta_util_dialog_error (NULL, 
+				_("Could not get the right valgrind-binary gconf key:"));
+		g_free (str_valgrind_file);
+		return FALSE;
+	}
+	
+	if ( g_file_test (str_valgrind_file, 
+				G_FILE_TEST_EXISTS | G_FILE_TEST_IS_SYMLINK) == FALSE ) {;
+		anjuta_util_dialog_error (NULL, 
+			_("Valgrind binary [%s] does not exist. Please check "
+			"the preferences or install Valgrind package."), 
+			str_valgrind_file);
+			
+		g_free (str_valgrind_file);
+		return FALSE;
+	}
+	
+	g_free (str_valgrind_file);
+	return TRUE;
+}
+
+void
+vg_actions_run (VgActions *actions, gchar* prg_to_debug, gchar* tool, GError **err)
+{
+	char logfd_arg[30];
+	GPtrArray *args;
+	int logfd[2];
+	char **argv;
+	int i;
+	VgActionsPriv *priv;
+	
+	g_return_if_fail (actions != NULL);
+	
+	priv = actions->priv;
+
+	g_return_if_fail (priv->prefs != NULL);
+
+	/* check the valgrind binary availability */
+	if (!check_valgrind_binary ())
+        return;
+	
+	priv->program = g_strdup (prg_to_debug);
+
+	if (priv->pid != (pid_t) -1) {
+		anjuta_util_dialog_error (NULL, 
+				_("Could not get the right pipe for the process."));
+		
+		return;
+	}
+	
+	if (pipe (logfd) == -1) {
+		anjuta_util_dialog_error (NULL, 
+				_("Could not get the right pipe for the process."));
+		return;
+	}
+
+	args = valgrind_plugin_prefs_create_argv (*priv->prefs, tool);
+
+	sprintf (logfd_arg, "--log-fd=%d", logfd[1]);
+	g_ptr_array_add (args, logfd_arg);
+
+	for ( i=0; i < args->len; i++ ) {
+		DEBUG_PRINT ("arg %d is %s", i, (char*)g_ptr_array_index (args, i));
+	}
+
+	g_ptr_array_add (args, (gpointer)priv->program);
+	
+	DEBUG_PRINT("program noticed is %s", priv->program);
+	g_ptr_array_add (args, NULL);
+	
+	argv = (char **) args->pdata;
+	
+	priv->pid = process_fork (argv[0], argv, TRUE, logfd[1], NULL, NULL, NULL, err);
+
+	if (priv->pid == (pid_t) -1) {
+		close (logfd[0]);
+		close (logfd[1]);
+		return;
+	}
+	
+	g_ptr_array_free (args, TRUE);
+	close (logfd[1]);
+	
+	vg_tool_view_clear(VG_TOOL_VIEW (priv->view));
+	vg_tool_view_connect (VG_TOOL_VIEW (priv->view), logfd[0]);
+
+	priv->gio = g_io_channel_unix_new (logfd[0]);
+	priv->watch_id = g_io_add_watch (priv->gio, G_IO_IN | G_IO_HUP, 
+										io_ready_cb, actions);
+
+	/* let's update our menu status */
+	valgrind_set_busy_status (priv->anjuta_plugin, TRUE);
+	valgrind_update_ui (priv->anjuta_plugin);	
+}
+
+void
+vg_actions_kill (VgActions *actions)
+{
+	VgActionsPriv *priv;
+	
+	g_return_if_fail (actions != NULL);
+	priv = actions->priv;
+	
+	vg_tool_view_disconnect (VG_TOOL_VIEW (priv->view));
+	
+	if (priv->gio) {
+		g_io_channel_shutdown (priv->gio, TRUE, NULL);
+		g_io_channel_unref (priv->gio);
+		priv->watch_id = 0;
+		priv->gio = NULL;
+	}
+	
+	if (priv->pid != (pid_t) -1) {
+		process_kill (priv->pid);
+		priv->pid = (pid_t) -1;
+	}
+
+	/* let's set the correct sensitive menu */
+	valgrind_set_busy_status (priv->anjuta_plugin, FALSE);
+	valgrind_update_ui (priv->anjuta_plugin);	
+}
+
+void vg_actions_set_pid (VgActions *actions, pid_t pid) 
+{
+	VgActionsPriv *priv;
+	
+	g_return_if_fail (actions != NULL);
+	priv = actions->priv;
+
+	priv->pid = (pid_t) pid;
+
+}
+
+void vg_actions_set_giochan (VgActions *actions, GIOChannel*gio) 
+{
+	VgActionsPriv *priv;
+	
+	g_return_if_fail (actions != NULL);
+	priv = actions->priv;
+
+	priv->gio = gio;	
+	
+	priv->watch_id = g_io_add_watch (priv->gio, G_IO_IN | G_IO_HUP, 
+								io_ready_cb, actions);	
+}

Added: trunk/plugins/valgrind/vgactions.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgactions.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,74 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * Copyright (C) Massimo Cora' 2005 <maxcvs gmail com>
+ * 
+ * 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, or (at your option) any later version.
+ * 
+ * plugin.h 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 plugin.h.  See the file "COPYING".  If not,
+ * write to:  The Free Software Foundation, Inc.,
+ *            51 Franklin Street, Fifth Floor,
+ *            Boston,  MA  02110-1301, USA.
+ */
+
+#ifndef __VGACTIONS_H
+#define __VGACTIONS_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include "vgerror.h"
+#include "process.h"
+#include "symtab.h"
+#include "preferences.h"
+
+G_BEGIN_DECLS
+
+#define VG_TYPE_ACTIONS         (vg_actions_get_type ())
+#define VG_ACTIONS(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), VG_TYPE_ACTIONS, VgActions))
+#define VG_ACTIONS_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), VG_TYPE_ACTIONS, VgActionsClass))
+#define VG_IS_ACTIONS(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), VG_TYPE_ACTIONS))
+#define VG_IS_ACTIONS_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), VG_TYPE_ACTIONS))
+#define VG_ACTIONS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), VG_TYPE_ACTIONS, VgActionsClass))
+
+
+typedef struct _VgActionsClass VgActionsClass;
+typedef struct _VgActions VgActions;
+typedef struct _VgActionsPriv VgActionsPriv;
+
+#include "plugin.h"
+
+
+struct _VgActionsClass {
+	GObjectClass parent_class;
+
+};
+
+struct _VgActions {
+	GObject parent;
+	VgActionsPriv *priv;
+};
+
+
+
+GType vg_actions_get_type (void);
+VgActions *vg_actions_new (AnjutaValgrindPlugin *anjuta_plugin, 
+					ValgrindPluginPrefs **prefs, GtkWidget *vg_default_view);
+void vg_actions_run (VgActions *actions, gchar* prg_to_debug, gchar* tool, 
+					GError **err);
+void vg_actions_kill (VgActions *actions);
+void vg_actions_set_pid (VgActions *actions, pid_t pid);
+void vg_actions_set_giochan (VgActions *actions, GIOChannel*gio);
+void vg_actions_set_watch_id (VgActions *actions, guint watch_id);
+
+
+G_END_DECLS
+
+#endif /* __VGACTIONS_H */

Added: trunk/plugins/valgrind/vgcachegrindprefs.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgcachegrindprefs.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,358 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <limits.h>
+
+#include <gconf/gconf-client.h>
+#include <glib/gi18n.h>
+
+#include "vgcachegrindprefs.h"
+
+
+static const char *cache_labels[] = {
+	"I1 Cache", "D1 Cache", "L2 Cache"
+};
+
+static const char *override_keys[] = {
+	"/apps/anjuta/valgrind/cachegrind/I1/override",
+	"/apps/anjuta/valgrind/cachegrind/D1/override",
+	"/apps/anjuta/valgrind/cachegrind/L2/override"
+};
+
+static const char *cache_keys[] = {
+	"/apps/anjuta/valgrind/cachegrind/I1/settings",
+	"/apps/anjuta/valgrind/cachegrind/D1/settings",
+	"/apps/anjuta/valgrind/cachegrind/L2/settings"
+};
+
+static void vg_cachegrind_prefs_class_init (VgCachegrindPrefsClass *klass);
+static void vg_cachegrind_prefs_init (VgCachegrindPrefs *prefs);
+static void vg_cachegrind_prefs_destroy (GtkObject *obj);
+static void vg_cachegrind_prefs_finalize (GObject *obj);
+
+static void cachegrind_prefs_apply (VgToolPrefs *prefs);
+static void cachegrind_prefs_get_argv (VgToolPrefs *prefs, const char *tool, GPtrArray *argv);
+
+
+static VgToolPrefsClass *parent_class = NULL;
+
+
+GType
+vg_cachegrind_prefs_get_type (void)
+{
+	static GType type = 0;
+	
+	if (!type) {
+		static const GTypeInfo info = {
+			sizeof (VgCachegrindPrefsClass),
+			NULL, /* base_class_init */
+			NULL, /* base_class_finalize */
+			(GClassInitFunc) vg_cachegrind_prefs_class_init,
+			NULL, /* class_finalize */
+			NULL, /* class_data */
+			sizeof (VgCachegrindPrefs),
+			0,    /* n_preallocs */
+			(GInstanceInitFunc) vg_cachegrind_prefs_init,
+		};
+		
+		type = g_type_register_static (VG_TYPE_TOOL_PREFS, "VgCachegrindPrefs", &info, 0);
+	}
+	
+	return type;
+}
+
+static void
+vg_cachegrind_prefs_class_init (VgCachegrindPrefsClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
+	VgToolPrefsClass *tool_class = VG_TOOL_PREFS_CLASS (klass);
+	
+	parent_class = g_type_class_ref (VG_TYPE_TOOL_PREFS);
+	
+	object_class->finalize = vg_cachegrind_prefs_finalize;
+	gtk_object_class->destroy = vg_cachegrind_prefs_destroy;
+	
+	/* virtual methods */
+	tool_class->apply = cachegrind_prefs_apply;
+	tool_class->get_argv = cachegrind_prefs_get_argv;
+}
+
+
+static void
+toggle_button_toggled (GtkToggleButton *toggle, const char *key)
+{
+	GConfClient *gconf;
+	GtkWidget *hbox;
+	gboolean bool;
+	
+	gconf = gconf_client_get_default ();
+	
+	bool = gtk_toggle_button_get_active (toggle);
+	gconf_client_set_bool (gconf, key, bool, NULL);
+	
+	g_object_unref (gconf);
+	
+	hbox = g_object_get_data (G_OBJECT (toggle), "hbox");
+	gtk_widget_set_sensitive (hbox, bool);
+}
+
+static const char *
+cache_settings_get (GtkEntry *entry)
+{
+	register const char *inptr;
+	gboolean fixed = FALSE;
+	const char *settings;
+	char *out, *outptr;
+	GtkWidget *parent;
+	GtkWidget *dialog;
+	int offset, i;
+	
+	inptr = settings = gtk_entry_get_text (entry);
+	outptr = out = g_malloc (strlen (settings) + 1);
+	
+	if (*inptr == '\0') {
+		g_free (out);
+		return settings;
+	}
+	
+	for (i = 0; i < 3; i++) {
+		while (*inptr == ' ' || *inptr == '\t') {
+			fixed = TRUE;
+			inptr++;
+		}
+		
+		if (!(*inptr >= '0' && *inptr < '9')) {
+			if (i == 0 && *inptr == '\0') {
+				gtk_entry_set_text (entry, "");
+				g_free (out);
+				return "";
+			}
+			
+			goto invalid;
+		}
+		
+		while (*inptr >= '0' && *inptr <= '9')
+			*outptr++ = *inptr++;
+		
+		while (*inptr == ' ' || *inptr == '\t') {
+			fixed = TRUE;
+			inptr++;
+		}
+		
+		if ((i < 2 && *inptr != ',') || (i == 2 && *inptr != '\0'))
+			goto invalid;
+		
+		*outptr++ = *inptr++;
+	}
+	
+	if (fixed)
+		gtk_entry_set_text (entry, out);
+	
+	g_free (out);
+	
+	return fixed ? gtk_entry_get_text (entry) : settings;
+	
+ invalid:
+	
+	offset = outptr - out;
+	while (*inptr)
+		*outptr++ = *inptr++;
+	*outptr = '\0';
+	
+	if (fixed)
+		gtk_entry_set_text (entry, out);
+	
+	gtk_editable_select_region (GTK_EDITABLE (entry), offset, offset + 1);
+	
+	parent = gtk_widget_get_toplevel (GTK_WIDGET (entry));
+	parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
+	dialog = gtk_message_dialog_new (GTK_WINDOW (parent), GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
+					 GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+					 _("Invalid syntax in settings '%s'.\nPlease enter a value "
+					   "of the form \"<integer>,<integer>,<integer>\"."), out);
+	g_free (out);
+	
+	g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
+	gtk_widget_show (dialog);
+	
+	return NULL;
+}
+
+static gboolean
+entry_focus_out (GtkEntry *entry, GdkEventFocus *event, const char *key)
+{
+	const char *settings;
+	GConfClient *gconf;
+	
+	gconf = gconf_client_get_default ();
+	
+	if ((settings = cache_settings_get (entry)))
+		gconf_client_set_string (gconf, key, settings, NULL);
+	
+	g_object_unref (gconf);
+	
+	return FALSE;
+}
+
+static GtkWidget *
+cache_settings_new (VgCachegrindPrefs *prefs, const char *name, int index,
+		    gboolean override, const char *settings)
+{
+	GtkWidget *frame, *vbox, *hbox;
+	GtkWidget *widget, *label;
+	
+	frame = gtk_frame_new (name);
+	
+	vbox = gtk_vbox_new (FALSE, 6);
+	
+	widget = gtk_check_button_new_with_label (_("Override default settings"));
+	prefs->cache[index].override = GTK_TOGGLE_BUTTON (widget);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), override);
+	g_signal_connect (widget, "toggled", G_CALLBACK (toggle_button_toggled), (void *) override_keys[index]);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (vbox), widget,FALSE, FALSE, 0);
+	
+	hbox = gtk_hbox_new (FALSE, 6);
+	g_object_set_data (G_OBJECT (prefs->cache[index].override), "hbox", hbox);
+	
+	/* This is the format of the preference, simply translate the words
+	 * inside the <> */
+	label = gtk_label_new (_("Enter <size>,<assoc>,<line_size>:"));
+	gtk_widget_show (label);
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+	
+	widget = gtk_entry_new ();
+	prefs->cache[index].settings = GTK_ENTRY (widget);
+	gtk_entry_set_text (GTK_ENTRY (widget), settings ? settings : "");
+	g_signal_connect (widget, "focus-out-event", G_CALLBACK (entry_focus_out), (void *) cache_keys[index]);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (hbox), widget, TRUE, TRUE, 0);
+	
+	gtk_widget_show (hbox);
+	gtk_widget_set_sensitive (hbox, override);
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+	
+	gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
+	
+	gtk_widget_show (vbox);
+	gtk_container_add (GTK_CONTAINER (frame), vbox);
+	
+	return frame;
+}
+
+static void
+vg_cachegrind_prefs_init (VgCachegrindPrefs *prefs)
+{
+	GConfClient *gconf;
+	GtkWidget *widget;
+	gboolean override;
+	char *settings;
+	int i;
+	
+	gconf = gconf_client_get_default ();
+	
+	VG_TOOL_PREFS (prefs)->label = _("Cachegrind");
+	
+	gtk_box_set_spacing (GTK_BOX (prefs), 6);
+	
+	for (i = 0; i < 3; i++) {
+		override = gconf_client_get_bool (gconf, override_keys[i], NULL);
+		settings = gconf_client_get_string (gconf, cache_keys[i], NULL);
+		
+		widget = cache_settings_new (prefs, cache_labels[i], i, override, settings);
+		g_free (settings);
+		
+		gtk_widget_show (widget);
+		gtk_box_pack_start (GTK_BOX (prefs), widget, FALSE, FALSE, 0);
+	}
+	
+	g_object_unref (gconf);
+}
+
+static void
+vg_cachegrind_prefs_finalize (GObject *obj)
+{
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+vg_cachegrind_prefs_destroy (GtkObject *obj)
+{
+	GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+}
+
+
+static void
+cachegrind_prefs_apply (VgToolPrefs *prefs)
+{
+	;
+}
+
+
+static struct {
+	const char *arg;
+	char *buf;
+} cachegrind_args[] = {
+	{ "--I1", NULL },
+	{ "--D1", NULL },
+	{ "--L2", NULL }
+};
+
+static void
+cachegrind_prefs_get_argv (VgToolPrefs *prefs, const char *tool, GPtrArray *argv)
+{
+	GConfClient *gconf;
+	char *str;
+	int i;
+	
+	gconf = gconf_client_get_default ();
+	
+	for (i = 0; i < 3; i++) {
+		const char *arg = cachegrind_args[i].arg;
+		
+		g_free (cachegrind_args[i].buf);
+		
+		if (gconf_client_get_bool (gconf, override_keys[i], NULL)) {
+			if (!(str = gconf_client_get_string (gconf, cache_keys[i], NULL)) || *str == '\0') {
+				cachegrind_args[i].buf = NULL;
+				g_free (str);
+				continue;
+			}
+			
+			cachegrind_args[i].buf = g_strdup_printf ("%s=%s", arg, str);
+			g_free (str);
+			
+			g_ptr_array_add (argv, cachegrind_args[i].buf);
+		} else {
+			cachegrind_args[i].buf = NULL;
+		}
+	}
+	
+	g_object_unref (gconf);
+}

Added: trunk/plugins/valgrind/vgcachegrindprefs.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgcachegrindprefs.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,65 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __VG_CACHEGRIND_PREFS_H__
+#define __VG_CACHEGRIND_PREFS_H__
+
+#include "vgtoolprefs.h"
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+#define VG_TYPE_CACHEGRIND_PREFS            (vg_cachegrind_prefs_get_type ())
+#define VG_CACHEGRIND_PREFS(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), VG_TYPE_CACHEGRIND_PREFS, VgCachegrindPrefs))
+#define VG_CACHEGRIND_PREFS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), VG_TYPE_CACHEGRIND_PREFS, VgCachegrindPrefsClass))
+#define VG_IS_CACHEGRIND_PREFS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VG_TYPE_CACHEGRIND_PREFS))
+#define VG_IS_CACHEGRIND_PREFS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VG_TYPE_CACHEGRIND_PREFS))
+#define VG_CACHEGRIND_PREFS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), VG_TYPE_CACHEGRIND_PREFS, VgCachegrindPrefsClass))
+
+typedef struct _VgCachegrindPrefs VgCachegrindPrefs;
+typedef struct _VgCachegrindPrefsClass VgCachegrindPrefsClass;
+
+struct _VgCachegrindPrefs {
+	VgToolPrefs parent_object;
+	
+	struct {
+		GtkToggleButton *override;
+		GtkEntry *settings;
+	} cache[3];
+};
+
+struct _VgCachegrindPrefsClass {
+	VgToolPrefsClass parent_class;
+	
+};
+
+
+GType vg_cachegrind_prefs_get_type (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __VG_CACHEGRIND_PREFS_H__ */

Added: trunk/plugins/valgrind/vgdefaultview.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgdefaultview.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,1209 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *  Copyright (C) Massimo Cora' 2005 <maxcvs gmail com> 
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include <gconf/gconf-client.h>
+#include <glib/gi18n.h>
+#include <libanjuta/anjuta-debug.h>
+#include <libanjuta/interfaces/ianjuta-document-manager.h>
+
+#include "vgdefaultview.h"
+#include "vgrulepattern.h"
+#include "vgsearchbar.h"
+#include "vgrule-list.h"
+#include "menu-utils.h"
+#include "vgio.h"
+#include "vgactions.h"
+
+#define d(x)
+#define w(x) x
+
+
+#define NUM_LINES_KEY      "/apps/anjuta/valgrind/num-lines"
+#define CUSTOM_EDITOR_KEY  "/apps/anjuta/valgrind/editor"
+#define SUPPRESSIONS_KEY   "/apps/anjuta/valgrind/general/suppressions"
+
+enum {
+	COL_STRING_DISPLAY,
+	COL_POINTER_ERROR,
+	COL_POINTER_SUMMARY,
+	COL_POINTER_STACK,
+	COL_LOAD_SRC_PREVIEW,
+	COL_IS_SRC_PREVIEW,
+	COL_LAST
+};
+
+static GType col_types[] = {
+	G_TYPE_STRING,
+	G_TYPE_POINTER,
+	G_TYPE_POINTER,
+	G_TYPE_POINTER,
+	G_TYPE_BOOLEAN,
+	G_TYPE_BOOLEAN
+};
+
+static void vg_default_view_class_init (VgDefaultViewClass *klass);
+static void vg_default_view_init (VgDefaultView *view);
+static void vg_default_view_destroy (GtkObject *obj);
+static void vg_default_view_finalize (GObject *obj);
+
+static void valgrind_view_clear (VgToolView *tool);
+static void valgrind_view_reset (VgToolView *tool);
+static void valgrind_view_connect (VgToolView *tool, int sockfd);
+static int  valgrind_view_step (VgToolView *tool);
+static void valgrind_view_disconnect (VgToolView *tool);
+static int  valgrind_view_save_log (VgToolView *tool, gchar* uri);
+static int  valgrind_view_load_log (VgToolView *tool, VgActions *actions, gchar* uri);
+static void valgrind_view_cut (VgToolView *tool);
+static void valgrind_view_copy (VgToolView *tool);
+static void valgrind_view_paste (VgToolView *tool);
+static void valgrind_view_show_rules (VgToolView *tool);
+
+static void rule_added (VgRuleList *list, VgRule *rule, gpointer user_data);
+static void tree_row_expanded (GtkTreeView *treeview, GtkTreeIter *root, GtkTreePath *path, gpointer user_data);
+static gboolean tree_button_press (GtkWidget *treeview, GdkEventButton *event, gpointer user_data);
+
+static void view_show_error (VgDefaultView *view, GtkTreeStore *model, VgError *err);
+static void view_rebuild (VgDefaultView *view);
+
+
+static VgToolViewClass *parent_class = NULL;
+
+
+GType
+vg_default_view_get_type (void)
+{
+	static GType type = 0;
+	
+	if (!type) {
+		static const GTypeInfo info = {
+			sizeof (VgDefaultViewClass),
+			NULL, /* base_class_init */
+			NULL, /* base_class_finalize */
+			(GClassInitFunc) vg_default_view_class_init,
+			NULL, /* class_finalize */
+			NULL, /* class_data */
+			sizeof (VgDefaultView),
+			0,    /* n_preallocs */
+			(GInstanceInitFunc) vg_default_view_init,
+		};
+		
+		type = g_type_register_static (VG_TYPE_TOOL_VIEW, "VgDefaultView", &info, 0);
+	}
+	
+	return type;
+}
+
+static void
+vg_default_view_class_init (VgDefaultViewClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
+	VgToolViewClass *tool_class = VG_TOOL_VIEW_CLASS (klass);
+	
+	parent_class = g_type_class_ref (VG_TYPE_TOOL_VIEW);
+	
+	object_class->finalize = vg_default_view_finalize;
+	gtk_object_class->destroy = vg_default_view_destroy;
+	
+	/* virtual methods */
+	tool_class->clear = valgrind_view_clear;
+	tool_class->reset = valgrind_view_reset;
+	tool_class->connect = valgrind_view_connect;
+	tool_class->step = valgrind_view_step;
+	tool_class->disconnect = valgrind_view_disconnect;
+	tool_class->save_log = valgrind_view_save_log;
+	tool_class->load_log = valgrind_view_load_log;	
+	tool_class->cut = valgrind_view_cut;
+	tool_class->copy = valgrind_view_copy;
+	tool_class->paste = valgrind_view_paste;
+	tool_class->show_rules = valgrind_view_show_rules;
+}
+
+
+static GtkWidget *
+valgrind_table_new (void)
+{
+	GtkTreeSelection *selection;
+	GtkCellRenderer *renderer;
+	GtkTreeStore *model;
+	GtkWidget *table;
+	
+	model = gtk_tree_store_newv (COL_LAST, col_types);
+	table = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
+	
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (table), -1, "",
+						     renderer, "text", 0, NULL);
+	
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (table));
+	gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
+	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (table), FALSE);
+	
+	return table;
+}
+
+enum {
+	SEARCH_ID_NONE,
+	SEARCH_ID_ERROR,
+	SEARCH_ID_FUNCTION,
+	SEARCH_ID_OBJECT,
+	SEARCH_ID_SOURCE
+};	
+
+static VgSearchBarItem search_items[] = {
+	{ N_("Error contains"),           SEARCH_ID_ERROR    },
+	{ N_("Function contains"),        SEARCH_ID_FUNCTION },
+	{ N_("Object contains"),          SEARCH_ID_OBJECT   },
+	{ N_("Source filename contains"), SEARCH_ID_SOURCE   },
+	{ NULL, 0 }
+};
+
+static void
+set_search (VgDefaultView *view, int item_id, const char *expr)
+{
+	GtkWidget *parent, *dialog;
+	size_t size;
+	char *err;
+	int ret;
+	
+	if (view->search_id != SEARCH_ID_NONE)
+		regfree (&view->search_regex);
+	
+	view->search_id = item_id;
+	if (item_id == SEARCH_ID_NONE)
+		return;
+	
+	if ((ret = regcomp (&view->search_regex, expr, REG_EXTENDED | REG_NOSUB)) == 0)
+		return;
+	
+	/* regex compilation failed */
+	view->search_id = SEARCH_ID_NONE;
+	
+	size = regerror (ret, &view->search_regex, NULL, 0);
+	err = g_malloc (size);
+	regerror (ret, &view->search_regex, err, size);
+	
+	regfree (&view->search_regex);
+	
+	parent = gtk_widget_get_toplevel (GTK_WIDGET (view));
+	parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
+	
+	dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
+					 GTK_DIALOG_DESTROY_WITH_PARENT,
+					 GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+					 _("Invalid regular expression: '%s': %s"),
+					 expr, err);
+	g_free (err);
+	
+	gtk_dialog_run (GTK_DIALOG (dialog));
+	gtk_widget_destroy (dialog);
+}
+
+static void
+search_bar_search (VgSearchBar *bar, int item_id, VgDefaultView *view)
+{
+	const char *expr;
+	
+	expr = vg_search_bar_get_text (bar);
+	
+	set_search (view, item_id, expr);
+	view_rebuild (view);
+}
+
+static void
+search_bar_clear (VgSearchBar *bar, VgDefaultView *view)
+{
+	set_search (view, SEARCH_ID_NONE, NULL);
+	view_rebuild (view);
+}
+
+static void
+vg_default_view_init (VgDefaultView *view)
+{
+	GtkWidget *scrolled;
+	GtkWidget *search;
+	char *filename;
+	
+	view->suppressions = g_ptr_array_new ();
+	view->errors = g_ptr_array_new ();
+	view->search_id = SEARCH_ID_NONE;
+	view->parser = NULL;
+	view->rules_id = 0;
+	view->srclines = 0;
+	view->lines_id = 0;
+	
+	view->gconf = gconf_client_get_default ();
+	filename = gconf_client_get_string (view->gconf, SUPPRESSIONS_KEY, NULL);
+	view->rule_list = vg_rule_list_new (filename);
+	g_signal_connect (view->rule_list, "rule-added", G_CALLBACK (rule_added), view);
+	g_object_ref (view->rule_list);
+	gtk_object_sink (GTK_OBJECT (view->rule_list));
+	gtk_widget_show (view->rule_list);
+	g_free (filename);
+	
+	search = vg_search_bar_new ();
+	vg_search_bar_set_menu_items (VG_SEARCH_BAR (search), search_items);
+	g_signal_connect (search, "search", G_CALLBACK (search_bar_search), view);
+	g_signal_connect (search, "clear", G_CALLBACK (search_bar_clear), view);
+	gtk_widget_show (search);
+	gtk_box_pack_start (GTK_BOX (view), search, FALSE, FALSE, 3);
+	
+	scrolled = gtk_scrolled_window_new (NULL, NULL);
+	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+					GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled), GTK_SHADOW_IN);
+	
+	view->table = valgrind_table_new ();
+	gtk_widget_show (view->table);
+	
+	g_signal_connect (view->table, "row-expanded", G_CALLBACK (tree_row_expanded), view);
+	g_signal_connect (view->table, "button-press-event", G_CALLBACK (tree_button_press), view);
+	
+	gtk_container_add (GTK_CONTAINER (scrolled), view->table);
+	gtk_widget_show (scrolled);
+	
+	/*gtk_container_add (GTK_CONTAINER (view), scrolled);*/
+	gtk_box_pack_start (GTK_BOX (view), scrolled, TRUE, TRUE, 0);
+}
+
+static void
+vg_default_view_finalize (GObject *obj)
+{
+	VgDefaultView *view = VG_DEFAULT_VIEW (obj);
+	int i;
+	
+	for (i = 0; i < view->suppressions->len; i++)
+		vg_rule_pattern_free (view->suppressions->pdata[i]);
+	g_ptr_array_free (view->suppressions, TRUE);
+	
+	for (i = 0; i < view->errors->len; i++)
+		vg_error_free (view->errors->pdata[i]);
+	g_ptr_array_free (view->errors, TRUE);
+	
+	if (view->parser) {
+		vg_error_parser_free (view->parser);
+		view->parser = NULL;
+	}
+	
+	if (view->search_id != SEARCH_ID_NONE)
+		regfree (&view->search_regex);
+	
+	/* set to null AnjutaValgrindPlugin* object */
+	view->valgrind_plugin = NULL;
+	
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+vg_default_view_destroy (GtkObject *obj)
+{
+	VgDefaultView *view = VG_DEFAULT_VIEW (obj);
+	
+	if (view->rule_list) {
+		g_object_unref (view->rule_list);
+		view->rule_list = NULL;
+	}
+	
+	if (view->gconf) {
+		if (view->rules_id != 0) {
+			gconf_client_notify_remove (view->gconf, view->rules_id);
+			view->rules_id = 0;
+		}
+		
+		if (view->lines_id != 0) {
+			gconf_client_notify_remove (view->gconf, view->lines_id);
+			view->lines_id = 0;
+		}
+		
+		g_object_unref (view->gconf);
+		view->gconf = NULL;
+	}
+	
+	GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+}
+
+
+static void
+valgrind_view_clear (VgToolView *tool)
+{
+	VgDefaultView *view = VG_DEFAULT_VIEW (tool);
+	GtkTreeStore *model;
+	int i;
+	
+	model = GTK_TREE_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (view->table)));
+	
+	gtk_tree_store_clear (model);
+	
+	for (i = 0; i < view->errors->len; i++)
+		vg_error_free (view->errors->pdata[i]);
+	g_ptr_array_set_size (view->errors, 0);
+}
+
+static void
+valgrind_view_reset (VgToolView *tool)
+{
+	;
+}
+
+
+static void
+valgrind_init_src_preview (VgDefaultView *view, GtkTreeStore *model, GtkTreeIter *root, VgErrorStack *stack)
+{
+	VgToolView *tool = VG_TOOL_VIEW (view);
+	GtkTreeIter iter;
+	
+	if (!tool->symtab && !tool->srcdir)
+		return;
+	
+	gtk_tree_store_append (model, &iter, root);
+	gtk_tree_store_set (model, &iter,
+			    COL_STRING_DISPLAY, NULL,
+			    COL_POINTER_ERROR, stack->summary->parent,
+			    COL_POINTER_SUMMARY, stack->summary,
+			    COL_POINTER_STACK, stack,
+			    COL_LOAD_SRC_PREVIEW, TRUE,
+			    COL_IS_SRC_PREVIEW, TRUE,
+			    -1);
+}
+
+static void
+view_show_error (VgDefaultView *view, GtkTreeStore *model, VgError *err)
+{
+	VgErrorSummary *summary;
+	GtkTreeIter iter, root;
+	
+	summary = err->summary;
+	
+	gtk_tree_store_append (model, &iter, NULL);
+	gtk_tree_store_set (model, &iter,
+			    COL_STRING_DISPLAY, summary->report,
+			    COL_POINTER_ERROR, err,
+			    COL_POINTER_SUMMARY, summary,
+			    COL_POINTER_STACK, NULL,
+			    COL_LOAD_SRC_PREVIEW, FALSE,
+			    COL_IS_SRC_PREVIEW, FALSE,
+			    -1);
+	root = iter;
+	
+	do {
+		VgErrorStack *stack;
+		
+		stack = summary->frames;
+		while (stack != NULL) {
+			gboolean load = FALSE;
+			GString *str;
+			
+			gtk_tree_store_append (model, &iter, &root);
+			
+			str = g_string_new (stack->where == VG_WHERE_AT ? "at " : "by ");
+			g_string_append (str, stack->symbol ? stack->symbol : "??");
+			g_string_append (str, " [");
+			
+			if (stack->type == VG_STACK_SOURCE) {
+				if (stack->info.src.filename) {
+					g_string_append (str, stack->info.src.filename);
+					if (stack->info.src.lineno) {
+						g_string_append_printf (str, ":%u", stack->info.src.lineno);
+						load = TRUE;
+					}
+				}
+			} else {
+				g_string_append (str, "in ");
+				g_string_append (str, stack->info.object);
+			}
+			
+			g_string_append_c (str, ']');
+			
+			gtk_tree_store_set (model, &iter,
+					    COL_STRING_DISPLAY, str->str,
+					    COL_POINTER_ERROR, err,
+					    COL_POINTER_SUMMARY, summary,
+					    COL_POINTER_STACK, stack,
+					    COL_LOAD_SRC_PREVIEW, load,
+					    COL_IS_SRC_PREVIEW, FALSE,
+					    -1);
+			
+			g_string_free (str, TRUE);
+			
+			if (load)
+				valgrind_init_src_preview (view, model, &iter, stack);
+			
+			stack = stack->next;
+		}
+		
+		if ((summary = summary->next) != NULL) {
+			gtk_tree_store_append (model, &iter, &root);
+			gtk_tree_store_set (model, &iter,
+					    COL_STRING_DISPLAY, summary->report,
+					    COL_POINTER_ERROR, err,
+					    COL_POINTER_SUMMARY, summary,
+					    COL_POINTER_STACK, NULL,
+					    COL_LOAD_SRC_PREVIEW, FALSE,
+					    COL_IS_SRC_PREVIEW, FALSE,
+					    -1);
+		}
+	} while (summary != NULL);
+}
+
+static gboolean
+error_matches_search (VgError *err, int search_id, regex_t *regex)
+{
+	VgErrorSummary *summary;
+	VgErrorStack *stack;
+	
+	if (search_id == SEARCH_ID_NONE)
+		return TRUE;
+	
+	if (regex == NULL)
+		return FALSE;
+	
+	summary = err->summary;
+	if (search_id == SEARCH_ID_ERROR) {
+		return regexec (regex, summary->report, 0, NULL, 0) == 0;
+	} else {
+		do {
+			stack = summary->frames;
+			while (stack != NULL) {
+				const char *str;
+				
+				switch (search_id) {
+				case SEARCH_ID_FUNCTION:
+					str = stack->symbol;
+					break;
+				case SEARCH_ID_OBJECT:
+					str = stack->type == VG_STACK_OBJECT ? stack->info.object : NULL;
+					break;
+				case SEARCH_ID_SOURCE:
+					str = stack->type == VG_STACK_SOURCE ? stack->info.src.filename : NULL;
+					break;
+				default:
+					g_assert_not_reached ();
+				}
+				
+				if (str && regexec (regex, str, 0, NULL, 0) == 0)
+					return TRUE;
+				
+				stack = stack->next;
+			}
+			
+			summary = summary->next;
+		} while (summary != NULL);
+	}
+	
+	return FALSE;
+}
+
+static void
+view_rebuild (VgDefaultView *view)
+{
+	GtkTreeStore *model;
+	int i;
+	
+	model = GTK_TREE_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (view->table)));
+	
+	gtk_tree_store_clear (model);
+	
+	for (i = 0; i < view->errors->len; i++) {
+		VgError *err = view->errors->pdata[i];
+		
+		if (error_matches_search (err, view->search_id, &view->search_regex))
+			view_show_error (view, model, err);
+	}
+}
+
+static void
+recv_error_cb (VgErrorParser *parser, VgError *err, gpointer user_data)
+{
+	VgDefaultView *view = user_data;
+	GtkTreeStore *model;
+	int i;
+	
+	for (i = 0; i < view->suppressions->len; i++) {
+		VgRulePattern *pat = view->suppressions->pdata[i];
+		if (vg_rule_pattern_matches (pat, err)) {
+			/* suppress this error */
+			vg_error_free (err);
+			return;
+		}
+	}
+	
+	g_ptr_array_add (view->errors, err);
+	
+	model = GTK_TREE_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (view->table)));
+	
+	if (error_matches_search (err, view->search_id, &view->search_regex))
+		view_show_error (view, model, err);
+}
+
+static void
+valgrind_view_connect (VgToolView *tool, int sockfd)
+{
+	VgDefaultView *view = VG_DEFAULT_VIEW (tool);
+	
+	if (view->parser != NULL)
+		valgrind_view_disconnect (tool);
+	
+	view->parser = vg_error_parser_new (sockfd, recv_error_cb, view);
+}
+
+static int
+valgrind_view_step (VgToolView *tool)
+{
+	VgDefaultView *view = VG_DEFAULT_VIEW (tool);
+	g_return_val_if_fail (view->parser != NULL, -1);
+
+	return vg_error_parser_step (view->parser);
+}
+
+static void
+valgrind_view_disconnect (VgToolView *tool)
+{
+	VgDefaultView *view = VG_DEFAULT_VIEW (tool);
+	int i;
+	
+	if (view->parser) {
+		vg_error_parser_flush (view->parser);
+		vg_error_parser_free (view->parser);
+		view->parser = NULL;
+	}
+	
+	/* clear out suppressions added last session - a new `run'
+	 * will force valgrind to re-read it's own suppressions file
+	 * and so these will be unneeded */
+	for (i = 0; i < view->suppressions->len; i++)
+		vg_rule_pattern_free (view->suppressions->pdata[i]);
+	g_ptr_array_set_size (view->suppressions, 0);
+}
+
+/*------------------------------------------------------------------------------
+ * perform a GnomeVFS save of the file. 
+ * NOTE: the chosen file will be overwritten if it already exists.
+ */
+static int
+valgrind_view_save_log (VgToolView *tool, gchar* uri)
+{
+	VgDefaultView *view = VG_DEFAULT_VIEW (tool);
+	VgError *err;
+	GString *str;
+	GFile *file;
+	GFileOutputStream *file_output_stream;
+	
+	int i;
+	
+	if (uri == NULL) 
+		return -1;
+		
+	file = g_file_new_for_uri (uri);
+	file_output_stream  = g_file_replace (file,
+			NULL,  /* no etag */
+			FALSE, /* no backup */
+			G_FILE_CREATE_NONE,
+			NULL,
+			NULL);
+	g_object_unref (file);
+
+	/* Create file */
+	if (file_output_stream == NULL)	{
+		return -1;
+	}
+		
+	str = g_string_new ("");
+	
+	for (i = 0; i < view->errors->len; i++) {
+		gsize written;
+		err = view->errors->pdata[i];
+		vg_error_to_string (err, str);
+
+		written = g_output_stream_write (
+				G_OUTPUT_STREAM(file_output_stream),
+				str->str,
+				str->len,
+				NULL,
+				NULL);
+		if (written == -1) {
+			g_string_free (str, TRUE);
+			return -1;
+		}
+		g_string_truncate (str, 0);
+	}
+	
+	g_string_free (str, TRUE);
+	g_output_stream_close (G_OUTPUT_STREAM(file_output_stream), 
+			NULL, NULL);
+
+	return 0;
+}
+
+/*-----------------------------------------------------------------------------
+ * FIXME:
+ * We can only load local files. Support to VFS would require to change all the
+ * I/O [i.e. fopen/fwrite/etc...] calls for this plugin. I hope day somebody
+ * will write a gnomelib wrapper that supports old I/O methos.
+ * Perhaps a solution would be to save the file grabbed by the gvfs to /tmp
+ * and then open it with the I/O fopen/fwrite.
+ */
+ 
+static int
+valgrind_view_load_log (VgToolView *tool, VgActions *actions, gchar* uri)
+{
+	int fd;
+	gchar *filename;
+
+	filename = anjuta_util_get_local_path_from_uri (uri);
+	
+	if ((fd = open (filename, O_RDONLY)) != -1) {
+		vg_tool_view_connect (tool, fd);
+	}
+	valgrind_view_clear(tool);
+	
+	vg_actions_set_pid (actions, (pid_t)-1);
+	
+	/* with this call we'll set automatically the watch_id too. */
+	vg_actions_set_giochan (actions, g_io_channel_unix_new (fd));
+
+	g_free (filename);
+	return 0;	
+}
+
+
+static void
+valgrind_view_cut (VgToolView *tool)
+{
+	valgrind_view_copy (tool);
+}
+
+static void
+valgrind_view_copy (VgToolView *tool)
+{
+	VgDefaultView *view = VG_DEFAULT_VIEW (tool);
+	GtkTreeSelection *selection;
+	GtkClipboard *clipboard;
+	VgErrorSummary *summary;
+	GtkTreeModel *model;
+	GtkTreeIter iter;
+	VgError *err;
+	GString *str;
+	
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view->table));
+	if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+		return;
+	
+	gtk_tree_model_get (model, &iter, COL_POINTER_ERROR, &err, COL_POINTER_SUMMARY, &summary, -1);
+	
+	str = g_string_new ("");
+	vg_error_to_string (err, str);
+	
+	clipboard = gtk_widget_get_clipboard (GTK_WIDGET (view), GDK_SELECTION_CLIPBOARD);
+	gtk_clipboard_set_text (clipboard, str->str, str->len);
+	g_string_free (str, TRUE);
+}
+
+static void
+valgrind_view_paste (VgToolView *tool)
+{
+	;
+}
+
+static void
+rules_response_cb (GtkDialog *dialog, int response, gpointer user_data)
+{
+	VgDefaultView *view = user_data;
+	
+	if (response == GTK_RESPONSE_OK)
+		vg_rule_list_save (VG_RULE_LIST (view->rule_list));
+	
+	gtk_widget_hide (GTK_WIDGET (dialog));
+}
+
+static gboolean
+rules_delete_event_cb (GtkWidget *widget, gpointer user_data)
+{
+	gtk_widget_hide (widget);
+	
+	return TRUE;
+}
+
+static void
+valgrind_view_show_rules (VgToolView *tool)
+{
+	VgDefaultView *view = VG_DEFAULT_VIEW (tool);
+	GtkWidget *dialog;
+	GtkWidget *parent;
+	
+	if (tool->rules == NULL) {
+		parent = gtk_widget_get_toplevel (GTK_WIDGET (tool));
+		parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
+		
+		/* FIXME: we should really get this title from somewhere else? */
+		dialog = gtk_dialog_new_with_buttons (_("Valgrind Suppression Rules"),
+						      GTK_WINDOW (parent),
+						      GTK_DIALOG_DESTROY_WITH_PARENT,
+						      GTK_STOCK_CANCEL,
+						      GTK_RESPONSE_CANCEL,
+						      GTK_STOCK_OK,
+						      GTK_RESPONSE_OK,
+						      NULL);
+		
+		gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_NORMAL);
+		gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 3);
+		gtk_window_set_default_size (GTK_WINDOW (dialog), 450, 400);
+		
+		gtk_container_set_border_width (GTK_CONTAINER (view->rule_list), 6);
+		gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), view->rule_list, TRUE, TRUE, 0);
+		
+		g_signal_connect (dialog, "response", G_CALLBACK (rules_response_cb), view);
+		g_signal_connect (dialog, "delete-event", G_CALLBACK (rules_delete_event_cb), view);
+		
+		tool->rules = dialog;
+	}
+	
+	VG_TOOL_VIEW_CLASS (parent_class)->show_rules (tool);
+}
+
+
+static void
+rules_filename_changed (GConfClient *client, guint cnxn_id,
+			GConfEntry *entry, gpointer user_data)
+{
+	VgDefaultView *view = user_data;
+	char *filename;
+	
+	filename = gconf_client_get_string (client, SUPPRESSIONS_KEY, NULL);
+	vg_rule_list_set_filename (VG_RULE_LIST (view->rule_list), filename);
+	g_free (filename);
+}
+
+static void
+num_lines_changed (GConfClient *client, guint cnxn_id,
+		   GConfEntry *entry, gpointer user_data)
+{
+	VgDefaultView *view = user_data;
+	
+	view->srclines = gconf_client_get_int (client, NUM_LINES_KEY, NULL);
+}
+
+
+GtkWidget *
+vg_default_view_new (AnjutaValgrindPlugin *valgrind_plugin)
+{
+	VgDefaultView *view;
+	
+	view = g_object_new (VG_TYPE_DEFAULT_VIEW, NULL);
+	
+	view->srclines = gconf_client_get_int (view->gconf, NUM_LINES_KEY, NULL);
+	
+	/* listen for changes in the number of lines to show above/below target src line */
+	gconf_client_add_dir (view->gconf, NUM_LINES_KEY, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+	
+	view->lines_id = gconf_client_notify_add (view->gconf, NUM_LINES_KEY,
+						  num_lines_changed, view, NULL, NULL);
+	
+	/* listen for suppression-file changes */
+	gconf_client_add_dir (view->gconf, SUPPRESSIONS_KEY, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+	
+	view->rules_id = gconf_client_notify_add (view->gconf, SUPPRESSIONS_KEY,
+						  rules_filename_changed, view, NULL, NULL);
+	
+	/* set up the ValgrindPlugin reference. It'll be setted to NULL on this->object
+	 * destroying */
+	view->valgrind_plugin = valgrind_plugin;
+	
+	return GTK_WIDGET (view);
+}
+
+
+
+/* signal callbacks */
+
+static void
+rule_added (VgRuleList *list, VgRule *rule, gpointer user_data)
+{
+	VgDefaultView *view = user_data;
+	VgRulePattern *pat;
+	int i;
+	
+	if (!(pat = vg_rule_pattern_new (rule)))
+		return;
+	
+	g_ptr_array_add (view->suppressions, pat);
+	
+	for (i = view->errors->len - 1; i >= 0; ) {
+		VgError *err = view->errors->pdata[i];
+		
+		if (vg_rule_pattern_matches (pat, err)) {
+			g_ptr_array_remove_index (view->errors, i);
+			vg_error_free (err);
+			
+			if (i == view->errors->len)
+				i--;
+		} else {
+			i--;
+		}
+	}
+	
+	view_rebuild (view);
+}
+
+static char *
+read_src_lines (const char *filename, size_t first, size_t last, size_t target)
+{
+	unsigned char linebuf[4097];
+	size_t len, buflen = 0;
+	size_t lineno = 1;
+	gboolean midline;
+	char *buf = NULL;
+	FILE *fp;
+	
+	d(printf ("read_src_lines (\"%s\", %u, %u)\n", filename, first, last));
+	
+	if ((fp = fopen (filename, "rt")) == NULL)
+		return NULL;
+	
+	midline = FALSE;
+	while (lineno <= last && fgets ((char *)linebuf, sizeof (linebuf), fp) != NULL) {
+		len = strlen ((char *)linebuf);
+		
+		if (lineno >= first) {
+			if (buf != NULL) {
+				buf = g_realloc (buf, buflen + len + 2);
+			} else {
+				buf = g_malloc (len + 2);
+			}
+			
+			d(printf ("read_src_lines(): added '%.*s'\n", len - 1, linebuf));
+			
+			if (!midline) {
+				if (lineno == target) {
+					buf[buflen++] = '=';
+					buf[buflen++] = '>';
+				} else {
+					buf[buflen++] = ' ';
+					buf[buflen++] = ' ';
+				}
+			} 
+			
+			memcpy (buf + buflen, linebuf, len);
+			buflen += len;
+		}
+		
+		if (linebuf[len - 1] == '\n') {
+			midline = FALSE;
+			lineno++;
+		} else {
+			midline = TRUE;
+		}
+	}
+	
+	fclose (fp);
+	
+	if (buf != NULL) {
+		buf[buflen - 1] = '\0';
+		d(printf ("read_src_lines(): returning:\n%s\n", buf));
+	} else {
+		d(printf ("read_src_lines(): returning: (null)\n", buf));
+	}
+	
+	return buf;
+}
+
+static int
+str_ends_with (const char *str, const char *match)
+{
+	return !(strcmp (str + strlen (str) - strlen (match), match));
+}
+
+static char *
+resolve_full_path (VgToolView *tool, VgErrorStack *stack)
+{
+	const char *filename;
+	SymTabSymbol *sym;
+	char *path;
+	
+	if (!(filename = stack->info.src.filename))
+		return NULL;
+	
+	if (*filename == '/')
+		return g_strdup (filename);
+	
+	if (tool->symtab && (sym = symtab_resolve_addr (tool->symtab, (void *) stack->addr, FALSE))) {
+		if (sym->filename != NULL) {
+			if (*sym->filename == '/' && str_ends_with (sym->filename, filename)) {
+				path = g_strdup (sym->filename);
+				symtab_symbol_free (sym);
+				return path;
+			} else {
+				w(g_warning ("symtab_resolve_addr() found the wrong symbol for 0x%.8x", stack->addr));
+			}
+		}
+		
+		symtab_symbol_free (sym);
+	}
+	
+	if (tool->srcdir) {
+		unsigned int buflen;
+		const char *dir;
+		struct stat st;
+		int flen, dlen;
+		char *p;
+		int i;
+		
+		buflen = 1024;
+		path = g_malloc (1024);
+		
+		flen = strlen (filename);
+		
+		for (i = 0; tool->srcdir[i] != NULL; i++) {
+			dir = tool->srcdir[i];
+			dlen = strlen (dir);
+			
+			if (dlen + flen + 2 > buflen) {
+				buflen = dlen + flen + 2;
+				buflen = ((buflen >> 5) << 5) + 64;
+				path = g_realloc (path, buflen);
+			}
+			
+			p = g_stpcpy (path, dir);
+			*p++ = '/';
+			strcpy (p, filename);
+			
+			if (stat (path, &st) != -1)
+				break;
+		}
+		
+		if (tool->srcdir[i] != NULL && S_ISREG (st.st_mode))
+			return path;
+		
+		g_free (path);
+	}
+	
+	return NULL;
+}
+
+static char *
+load_src_buf (VgToolView *tool, VgErrorStack *stack, int srclines)
+{
+	char *path, *srcbuf;
+	size_t lineno;
+	size_t first;
+	
+	lineno = stack->info.src.lineno;
+	first = lineno > (srclines + 1) ? lineno - srclines : 1;
+	
+	if (!(path = resolve_full_path (tool, stack)))
+		return NULL;
+	
+	srcbuf = read_src_lines (path, first, lineno + srclines, lineno);
+	g_free (path);
+	
+	return srcbuf;
+}
+
+static void
+tree_row_expanded (GtkTreeView *treeview, GtkTreeIter *parent, GtkTreePath *path, gpointer user_data)
+{
+	VgDefaultView *view = user_data;
+	VgToolView *tool = user_data;
+	VgErrorStack *stack = NULL;
+	GtkTreeStore *model;
+	GtkTreeIter iter;
+	gboolean load;
+	char *srcbuf;
+	
+	model = GTK_TREE_STORE (gtk_tree_view_get_model (treeview));
+	
+	gtk_tree_model_get (GTK_TREE_MODEL (model), parent, COL_LOAD_SRC_PREVIEW, &load, -1);
+	if (!load)
+		return;
+	
+	/* unset the LOAD_SRC_PREVIEW flag - pass or fail, we won't be trying this again */
+	gtk_tree_store_set (model, parent, COL_LOAD_SRC_PREVIEW, FALSE, -1);
+	
+	/* get the first child (which will be a dummy if we haven't loaded the src-preview yet) */
+	gtk_tree_model_iter_children (GTK_TREE_MODEL (model), &iter, parent);
+	
+	gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, COL_POINTER_STACK, &stack, -1);
+	
+	if (!(srcbuf = load_src_buf (tool, stack, view->srclines))) {
+		w(g_warning ("couldn't load src preview"));
+		gtk_tree_store_remove (model, &iter);
+		return;
+	}
+	
+	gtk_tree_store_set (model, &iter,
+			    COL_STRING_DISPLAY, srcbuf,
+			    COL_POINTER_ERROR, stack->summary->parent,
+			    COL_POINTER_SUMMARY, stack->summary,
+			    COL_POINTER_STACK, stack,
+			    COL_LOAD_SRC_PREVIEW, FALSE,
+			    COL_IS_SRC_PREVIEW, TRUE,
+			    -1);
+	
+	g_free (srcbuf);
+}
+
+
+static void
+cut_cb (GtkWidget *widget, gpointer user_data)
+{
+	VgToolView *tool = user_data;
+	
+	valgrind_view_cut (tool);
+}
+
+static void
+copy_cb (GtkWidget *widget, gpointer user_data)
+{
+	VgToolView *tool = user_data;
+	
+	valgrind_view_copy (tool);
+}
+
+static void
+suppress_cb (GtkWidget *widget, gpointer user_data)
+{
+	VgDefaultView *view = user_data;
+	GtkTreeSelection *selection;
+	VgErrorSummary *summary;
+	GtkTreeModel *model;
+	GtkWidget *parent;
+	GtkTreeIter iter;
+	
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view->table));
+	if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+		return;
+	
+	gtk_tree_model_get (model, &iter, COL_POINTER_SUMMARY, &summary, -1);
+	if (summary == NULL)
+		return;
+	
+	parent = gtk_widget_get_toplevel (GTK_WIDGET (view));
+	parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
+	
+	/* FIXME: we should really get this title from somewhere else? */
+	vg_rule_list_add_rule (VG_RULE_LIST (view->rule_list), _("Valgrind Suppression"),
+			       GTK_WINDOW (parent), summary);
+}
+
+static void
+custom_editor_cb (GtkWidget *widget, gpointer user_data)
+{
+	VgDefaultView *view = user_data;
+	IAnjutaDocumentManager* docman;
+	GtkTreeSelection *selection;
+	VgErrorStack *stack = NULL;
+	GtkTreeModel *model;
+	GtkTreeIter iter;
+	gchar *path;
+	
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view->table));
+	if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+		return;
+	
+	gtk_tree_model_get (model, &iter, COL_POINTER_STACK, &stack, -1);
+	if (stack == NULL)
+		return;
+	
+	if (!(path = resolve_full_path (VG_TOOL_VIEW (view), stack)))
+		return;
+	
+	DEBUG_PRINT ("got this path for file opening: %s and line %d", path, stack->info.src.lineno );
+	
+	/* Goto file line */
+	docman = anjuta_shell_get_interface (ANJUTA_PLUGIN (view->valgrind_plugin)->shell,
+									 IAnjutaDocumentManager, NULL);
+	if (docman)
+	{
+		GFile* file = g_file_new_for_path (path);
+		ianjuta_document_manager_goto_file_line (docman, file, stack->info.src.lineno, NULL);
+		g_object_unref (file);
+	}	
+	
+	g_free (path);
+}
+
+
+enum {
+	SELECTED_MASK    = (1 << 0),
+	STACK_MASK       = (1 << 1),
+};
+
+static struct _MenuItem popup_menu_items[] = {
+	{ N_("Cu_t"),     GTK_STOCK_CUT,     TRUE,  FALSE, FALSE, FALSE, G_CALLBACK (cut_cb),      SELECTED_MASK },
+	{ N_("_Copy"),    GTK_STOCK_COPY,    TRUE,  FALSE, FALSE, FALSE, G_CALLBACK (copy_cb),     SELECTED_MASK },
+	{ N_("_Paste"),   GTK_STOCK_PASTE,   TRUE,  FALSE, FALSE, FALSE, NULL,                     0             },
+	MENU_ITEM_SEPARATOR,
+	{ N_("Suppress"), NULL,              FALSE, FALSE, FALSE, FALSE, G_CALLBACK (suppress_cb), SELECTED_MASK },
+	MENU_ITEM_SEPARATOR,
+	{ N_("Edit in Custom Editor"), NULL,     FALSE, FALSE, FALSE, FALSE, G_CALLBACK (custom_editor_cb), STACK_MASK },
+	MENU_ITEM_TERMINATOR
+};
+
+static gboolean
+tree_button_press (GtkWidget *treeview, GdkEventButton *event, gpointer user_data)
+{
+	VgDefaultView *view = user_data;
+	GtkTreeSelection *selection;
+	VgErrorStack *stack = NULL;
+	GtkTreeModel *model;
+	GtkTreeIter iter;
+	guint32 mask = 0;
+	GtkWidget *menu;
+	
+	if (event->type == GDK_BUTTON_PRESS && event->button == 3) {
+		/* right-click */
+		selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
+		if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
+			gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, COL_POINTER_STACK, &stack, -1);
+			if (stack == NULL)
+				mask |= STACK_MASK;
+		} else {
+			mask |= (SELECTED_MASK | STACK_MASK);
+		}
+
+		menu = gtk_menu_new ();
+		menu_utils_construct_menu (menu, popup_menu_items, mask, view);
+		gtk_widget_show (menu);
+		
+		gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, event->button, event->time);
+	} else if (event->type == GDK_2BUTTON_PRESS && event->button == 1) {
+		/* double-click */
+		custom_editor_cb (treeview, user_data);
+	}
+	
+	return FALSE;
+}

Added: trunk/plugins/valgrind/vgdefaultview.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgdefaultview.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,95 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *  Copyright (C) Massimo Cora' 2005 <maxcvs gmail com>  
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __VG_DEFAULT_VIEW_H__
+#define __VG_DEFAULT_VIEW_H__
+
+#include <gtk/gtk.h>
+
+#include <gconf/gconf-client.h>
+
+#include <sys/types.h>
+#include <regex.h>
+
+#include "vgerror.h"
+#include "symtab.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+#define VG_TYPE_DEFAULT_VIEW            (vg_default_view_get_type ())
+#define VG_DEFAULT_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), VG_TYPE_DEFAULT_VIEW, VgDefaultView))
+#define VG_DEFAULT_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), VG_TYPE_DEFAULT_VIEW, VgDefaultViewClass))
+#define VG_IS_DEFAULT_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VG_TYPE_DEFAULT_VIEW))
+#define VG_IS_DEFAULT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VG_TYPE_DEFAULT_VIEW))
+#define VG_DEFAULT_VIEW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), VG_TYPE_DEFAULT_VIEW, VgDefaultViewClass))
+
+typedef struct _VgDefaultView VgDefaultView;
+typedef struct _VgDefaultViewClass VgDefaultViewClass;
+
+#include "vgtoolview.h"
+#include "plugin.h"
+
+struct _VgDefaultView {
+	VgToolView parent_object;
+	
+	GConfClient *gconf;
+	
+	GtkWidget *table;
+	GtkWidget *rule_list;
+	
+	GPtrArray *errors;
+	VgErrorParser *parser;
+	
+	GPtrArray *suppressions;
+	
+	int search_id;
+	regex_t search_regex;
+	
+	guint rules_id;
+	
+	int srclines;
+	guint lines_id;
+	
+	AnjutaValgrindPlugin *valgrind_plugin;
+};
+
+struct _VgDefaultViewClass {
+	VgToolViewClass parent_class;
+	
+};
+
+
+GType vg_default_view_get_type (void);
+
+GtkWidget *vg_default_view_new (AnjutaValgrindPlugin *valgrind_plugin);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __VG_DEFAULT_VIEW_H__ */

Added: trunk/plugins/valgrind/vgerror.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgerror.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,734 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include "vgerror.h"
+#include "vgstrpool.h"
+
+
+#define d(x)
+
+#define TIME_STAMP_FORMAT "%u-%.2u-%.2u %.2u:%.2u:%.2u.%.3u"
+
+enum {
+	VG_ERROR_PARSER_STATE_INIT,
+	VG_ERROR_PARSER_STATE_NEW_ERROR,
+	VG_ERROR_PARSER_STATE_PARTIAL_ERROR,
+	VG_ERROR_PARSER_STATE_WARNING = (1 << 8)
+};
+
+typedef struct _VgErrorListNode {
+	struct _VgErrorListNode *next;
+	struct _VgErrorListNode *prev;
+	
+	int state;
+	
+	pid_t pid;
+	
+	VgError *err_cur;
+	
+	VgErrorSummary *summ_cur;
+	VgErrorSummary *summ_tail;
+	
+	VgErrorStack *stack_tail;
+} VgErrorListNode;
+
+
+VgErrorParser *
+vg_error_parser_new (int fd, VgErrorCallback error_cb, void *user_data)
+{
+	VgErrorParser *parser;
+	
+	parser = g_new (VgErrorParser, 1);
+	parser_init ((Parser *) parser, fd);
+	
+	parser->pid_hash = g_hash_table_new (g_direct_hash, g_direct_equal);
+	list_init (&parser->errlist);
+	
+	parser->error_cb = error_cb;
+	parser->user_data = user_data;
+	
+	return parser;
+}
+
+
+void
+vg_error_parser_free (VgErrorParser *parser)
+{
+	VgErrorListNode *n;
+	
+	if (parser == NULL)
+		return;
+	
+	g_hash_table_destroy (parser->pid_hash);
+	
+	while (!list_is_empty (&parser->errlist)) {
+		n = (VgErrorListNode *) list_unlink_head (&parser->errlist);
+		
+		if (n->err_cur)
+			vg_error_free (n->err_cur);
+		
+		g_free (n);
+	}
+	
+	g_free (parser);
+}
+
+
+static int
+vg_error_get_state (VgErrorParser *parser, pid_t pid)
+{
+	VgErrorListNode *n;
+	
+	if (!(n = g_hash_table_lookup (parser->pid_hash, GINT_TO_POINTER (pid))))
+		return VG_ERROR_PARSER_STATE_INIT;
+	
+	return n->state;
+}
+
+static void
+vg_error_set_state (VgErrorParser *parser, pid_t pid, int state)
+{
+	VgErrorListNode *n;
+	
+	if (!(n = g_hash_table_lookup (parser->pid_hash, GINT_TO_POINTER (pid)))) {
+		d(fprintf (stderr, "VgErrorParser setting state on unknown pid??\n"));
+		return;
+	}
+	
+	n->state = state;
+}
+
+static VgError *
+vg_error_new (VgErrorParser *parser, pid_t pid, time_stamp_t *stamp)
+{
+	VgErrorListNode *n;
+	VgError *err;
+	
+	if (!(n = g_hash_table_lookup (parser->pid_hash, GINT_TO_POINTER (pid)))) {
+		n = g_new (VgErrorListNode, 1);
+		n->pid = pid;
+		
+		list_append_node (&parser->errlist, (ListNode *) n);
+		g_hash_table_insert (parser->pid_hash, GINT_TO_POINTER (pid), n);
+	} else if (n->state == VG_ERROR_PARSER_STATE_NEW_ERROR) {
+		return n->err_cur;
+	}
+	
+	err = g_new (VgError, 1);
+	memcpy (&err->stamp, stamp, sizeof (err->stamp));
+	err->pid = pid;
+	err->thread = (vgthread_t) -1;
+	err->summary = NULL;
+	
+	n->err_cur = err;
+	n->summ_cur = NULL;
+	n->summ_tail = (VgErrorSummary *) &err->summary;
+	n->stack_tail = NULL;
+	n->state = VG_ERROR_PARSER_STATE_NEW_ERROR;
+	
+	return err;
+}
+
+static void
+vg_error_pop (VgErrorParser *parser, pid_t pid)
+{
+	VgErrorListNode *n;
+	
+	if (!(n = g_hash_table_lookup (parser->pid_hash, GINT_TO_POINTER (pid))))
+		return;
+	
+	if (n->err_cur) {
+		if (n->err_cur->summary) {
+			parser->error_cb (parser, n->err_cur, parser->user_data);
+		} else {
+			d(fprintf (stderr, "Incomplete valgrind error being popped??\n"));
+			g_free (n->err_cur);
+		}
+	} else {
+		d(fprintf (stderr, "VgErrorParser stack underflow??\n"));
+	}
+	
+	n->state = VG_ERROR_PARSER_STATE_INIT;
+	
+	n->err_cur = NULL;
+	n->summ_cur = NULL;
+	n->summ_tail = NULL;
+	n->stack_tail = NULL;
+}
+
+static void
+vg_error_pop_all (VgErrorParser *parser)
+{
+	VgErrorListNode *n;
+	
+	n = (VgErrorListNode *) parser->errlist.head;
+	while (n->next != NULL) {
+		vg_error_pop (parser, n->pid);
+		n = n->next;
+	}
+}
+
+static void
+vg_error_summary_append (VgErrorParser *parser, pid_t pid, const char *report, int len)
+{
+	VgErrorSummary *summary;
+	VgErrorListNode *n;
+	
+	if (!(n = g_hash_table_lookup (parser->pid_hash, GINT_TO_POINTER (pid)))) {
+		d(fprintf (stderr, "VgErrorParser appending summary to non-existant error report??\n"));
+		return;
+	}
+	
+	summary = g_new (VgErrorSummary, 1);
+	summary->next = NULL;
+	summary->parent = n->err_cur;
+	summary->frames = NULL;
+	summary->report = vg_strndup (report, len);
+	
+	n->summ_cur = summary;
+	n->summ_tail->next = summary;
+	n->summ_tail = summary;
+	
+	n->stack_tail = (VgErrorStack *) &summary->frames;
+}
+
+static VgErrorStack *
+vg_error_stack_new (VgErrorParser *parser, pid_t pid)
+{
+	VgErrorStack *stack;
+	VgErrorListNode *n;
+	
+	if (!(n = g_hash_table_lookup (parser->pid_hash, GINT_TO_POINTER (pid)))) {
+		d(fprintf (stderr, "VgErrorParser appending stack frame to non-existant error report??\n"));
+		return NULL;
+	}
+	
+	stack = g_new (VgErrorStack, 1);
+	stack->next = NULL;
+	stack->summary = n->summ_cur;
+	stack->where = VG_WHERE_AT;
+	stack->addr = VG_STACK_ADDR_UNKNOWN;
+	stack->type = VG_STACK_SOURCE;
+	stack->symbol = NULL;
+	stack->info.src.filename = NULL;
+	stack->info.src.lineno = 0;
+	stack->info.object = NULL;
+	
+	n->stack_tail->next = stack;
+	n->stack_tail = stack;
+	
+	return stack;
+}
+
+int
+vg_error_parser_step (VgErrorParser *parser)
+{
+	register char *inptr;
+	char *start, *end;
+	time_stamp_t stamp;
+	vgthread_t thread;
+	unsigned int num;
+	int state, ret;
+	VgError *err;
+	Parser *priv;
+	pid_t pid;
+	
+	priv = (Parser *) parser;
+	
+	if ((ret = parser_fill (priv)) == 0) {
+		vg_error_pop_all (parser);
+		return 0;
+	} else if (ret == -1) {
+		return -1;
+	}
+	
+	start = inptr = (char *)priv->inptr;
+	
+	while (inptr < (char *)priv->inend) {
+		*priv->inend = '\n';
+		while (*inptr != '\n')
+			inptr++;
+		
+		d(fprintf (stderr, "parser_step: '%.*s'\n", inptr - start, start));
+		
+		if (inptr == (char *)priv->inend)
+			break;
+		
+		if (start[0] != '=' || start[1] != '=') {
+			d(fprintf (stderr, "Unexpected data received from valgrind: '%.*s'\n", inptr - start, start));
+			inptr++;
+			start = inptr;
+			continue;
+		}
+		
+		stamp.year = 0;
+		
+		start += 2;
+		if ((num = strtoul (start, &end, 10)) == 0 || end == start || *end != '=') {
+			/* possible time stamp */
+			if (*end != '-') {
+				d(fprintf (stderr, "Invalid pid or time stamp received from valgrind: '%.*s'\n", end - start, start));
+				inptr++;
+				start = inptr;
+				continue;
+			}
+			
+			stamp.year = num;
+			start = end + 1;
+			
+			if ((num = strtoul (start, &end, 10)) == 0 || num > 12 || end == start || *end != '-') {
+				d(fprintf (stderr, "Invalid pid or time stamp received from valgrind: '%.*s'\n", end - start, start));
+				inptr++;
+				start = inptr;
+				continue;
+			}
+			
+			stamp.month = num;
+			start = end + 1;
+			
+			if ((num = strtoul (start, &end, 10)) == 0 || num > 31 || end == start || *end != ' ') {
+				d(fprintf (stderr, "Invalid pid or time stamp received from valgrind: '%.*s'\n", end - start, start));
+				inptr++;
+				start = inptr;
+				continue;
+			}
+			
+			stamp.day = num;
+			start = end + 1;
+			
+			if ((num = strtoul (start, &end, 10)) > 23 || end == start || *end != ':') {
+				d(fprintf (stderr, "Invalid pid or time stamp received from valgrind: '%.*s'\n", end - start, start));
+				inptr++;
+				start = inptr;
+				continue;
+			}
+			
+			stamp.hour = num;
+			start = end + 1;
+			
+			if ((num = strtoul (start, &end, 10)) > 59 || end == start || *end != ':') {
+				d(fprintf (stderr, "Invalid pid or time stamp received from valgrind: '%.*s'\n", end - start, start));
+				inptr++;
+				start = inptr;
+				continue;
+			}
+			
+			stamp.min = num;
+			start = end + 1;
+			
+			if ((num = strtoul (start, &end, 10)) > 59 || end == start || *end != '.') {
+				d(fprintf (stderr, "Invalid pid or time stamp received from valgrind: '%.*s'\n", end - start, start));
+				inptr++;
+				start = inptr;
+				continue;
+			}
+			
+			stamp.sec = num;
+			start = end + 1;
+			
+			if ((num = strtoul (start, &end, 10)) > 1000 || end == start || *end != ' ') {
+				d(fprintf (stderr, "Invalid pid or time stamp received from valgrind: '%.*s'\n", end - start, start));
+				inptr++;
+				start = inptr;
+				continue;
+			}
+			
+			stamp.msec = num;
+			start = end + 1;
+			
+			if ((pid = strtoul (start, &end, 10)) == 0 || end == start || *end != '=') {
+				d(fprintf (stderr, "Invalid pid or time stamp received from valgrind: '%.*s'\n", end - start, start));
+				inptr++;
+				start = inptr;
+				continue;
+			}
+		} else {
+			pid = num;
+		}
+		
+		if (end[0] != '=' || end[1] != '=') {
+			d(fprintf (stderr, "Unexpected data received from valgrind: '%.*s'\n", (inptr - start) + 2, start - 2));
+			inptr++;
+			start = inptr;
+			continue;
+		}
+		
+		start = end + 3;
+		
+		*inptr = '\0';
+		if ((state = vg_error_get_state (parser, pid)) & VG_ERROR_PARSER_STATE_WARNING) {
+			while (*start == ' ')
+				start++;
+			
+			if (strcmp (start, "your program may misbehave as a result") == 0) {
+				/* this marks the end of the Valgrind warning spewage */
+				vg_error_set_state (parser, pid, state & ~VG_ERROR_PARSER_STATE_WARNING);
+			}
+			
+			inptr++;
+			start = inptr;
+			continue;
+		}
+		
+		if (state != VG_ERROR_PARSER_STATE_PARTIAL_ERROR) {
+			/* brand new error - first line is the general report or thread-id (1.9.6 and later) */
+			err = vg_error_new (parser, pid, &stamp);
+			
+			if (start[0] == ' ') {
+				d(fprintf (stderr, "Unexpected SPACE received from valgrind: '%.*s'\n", inptr - start, start));
+				
+				while (*start == ' ')
+					start++;
+			}
+			
+			if (start < inptr) {
+				if (strncmp (start, "discard syms in ", 16) == 0) {
+					/* "discard syms in /path/to/lib/libfoo.so" */
+					d(fprintf (stderr, "dropping 'discard syms in' spewage\n"));
+				} else if (strstr (start, "IGNORED call to:") != NULL) {
+					d(fprintf (stderr, "dropping ignored call notification\n"));
+				} else if (strstr (start, "KLUDGED call to:") != NULL) {
+					/* "valgrind's libpthread.so: KLUDGED call to: pthread_getschedparam" */
+					d(fprintf (stderr, "dropping kludged call notification\n"));
+				} else if (strncmp (start, "warning: ", 9) == 0) {
+					/* "warning: Valgrind's pthread_getschedparam is incomplete" */
+					d(fprintf (stderr, "dropping warning message\n"));
+					vg_error_set_state (parser, pid, state | VG_ERROR_PARSER_STATE_WARNING);
+				} else if (strncmp (start, "Thread ", 7) == 0) {
+					start += 7;
+					thread = strtoul (start, &end, 10);
+					if (*end != ':') {
+						start -= 7;
+						vg_error_summary_append (parser, pid, start, inptr - start);
+						vg_error_set_state (parser, pid, VG_ERROR_PARSER_STATE_PARTIAL_ERROR);
+					} else {
+						err->thread = thread;
+					}
+				} else {
+					vg_error_summary_append (parser, pid, start, inptr - start);
+					vg_error_set_state (parser, pid, VG_ERROR_PARSER_STATE_PARTIAL_ERROR);
+				}
+			}
+		} else {
+			/* another summary, a new stack frame, or end-of-info (ie. a blank line) */
+			while (*start == ' ')
+				start++;
+			
+			if (start < inptr) {
+				if (!strncmp (start, "discard syms in ", 16)) {
+					/* "discard syms in /path/to/lib/libfoo.so" */
+					d(fprintf (stderr, "dropping 'discard syms in' spew received from Valgrind\n"));
+				} else if (strstr (start, "IGNORED call to:") != NULL) {
+					d(fprintf (stderr, "dropping ignored call notification\n"));
+				} else if (strstr (start, "KLUDGED call to:") != NULL) {
+					/* "valgrind's libpthread.so: KLUDGED call to: pthread_getschedparam" */
+					d(fprintf (stderr, "dropping kludged call notification\n"));
+				} else if (strncmp (start, "warning: ", 9) == 0) {
+					/* "warning: Valgrind's pthread_getschedparam is incomplete" */
+					d(fprintf (stderr, "dropping warning message\n"));
+					vg_error_set_state (parser, pid, state | VG_ERROR_PARSER_STATE_WARNING);
+				} else if (strncmp (start, "at ", 3) != 0 && strncmp (start, "by ", 3) != 0) {
+					/* another summary report */
+					vg_error_summary_append (parser, pid, start, inptr - start);
+				} else {
+					VgErrorStack *stack;
+					
+					stack = vg_error_stack_new (parser, pid);
+					stack->where = *start == 'a' ? VG_WHERE_AT : VG_WHERE_BY;
+					start += 3;
+					
+					if (*start == '<') {
+						/* unknown address */
+						stack->addr = VG_STACK_ADDR_UNKNOWN;
+						
+						while (start < inptr && *start != '>')
+							start++;
+						
+						if (*start == '>')
+							start++;
+					} else {
+						/* symbol address in hex */
+						stack->addr = strtoul (start, (char **) &end, 16);
+						start = end;
+						
+						if (*start == ':')
+							start++;
+					}
+					
+					if (*start == ' ')
+						start++;
+					
+					if (strncmp (start, "??? ", 4) == 0) {
+						stack->symbol = NULL;
+						start += 3;
+					} else if (*start == '(') {
+						/* not a c/c++ program, hence no symbol */
+						stack->symbol = NULL;
+						start--;
+					} else {
+						/* symbol name */
+						end = start;
+						while (end < inptr && *end != ' ' && *end != '(')
+							end++;
+						
+						if (*end == '(') {
+							/* symbol name has a param list - probably a c++ symbol */
+							while (end < inptr && *end != ')')
+								end++;
+							
+							if (*end == ')')
+								end++;
+						}
+						
+						stack->symbol = vg_strndup (start, end - start);
+						start = end;
+					}
+					
+					if (*start == ' ')
+						start++;
+					
+					if (*start == '(') {
+						start++;
+						
+						/* if we have "([with]in foo)" then foo is an object... */
+						if (strncmp (start, "within ", 7) == 0) {
+							/* (within /usr/bin/emacs) */
+							stack->type = VG_STACK_OBJECT;
+							start += 7;
+						} else if (strncmp (start, "in ", 3) == 0) {
+							/* (in /lib/foo.so) */
+							stack->type = VG_STACK_OBJECT;
+							start += 3;
+						} else {
+							stack->type = VG_STACK_SOURCE;
+						}
+						
+						end = start;
+						while (end < inptr && *end != ':' && *end != ')')
+							end++;
+						
+						/* src filename or shared object */
+						if (stack->type == VG_STACK_SOURCE) {
+							stack->info.src.filename = vg_strndup (start, end - start);
+							
+							start = end;
+							if (*start++ == ':')
+								stack->info.src.lineno = strtoul (start, (char **) &end, 10);
+							else
+								stack->info.src.lineno = 0;
+						} else {
+							stack->info.object = vg_strndup (start, end - start);
+						}
+						
+						start = end;
+					}
+				}
+			} else {
+				/* end-of-info (ie. a blank line) */
+				vg_error_pop (parser, pid);
+			}
+		}
+		
+		inptr++;
+		start = inptr;
+	}
+	
+	priv->inptr = (unsigned char *)start;
+	
+	return 1;
+}
+
+
+void
+vg_error_parser_flush (VgErrorParser *parser)
+{
+	VgErrorListNode *n;
+	
+	n = (VgErrorListNode *) parser->errlist.head;
+	while (n->next != NULL) {
+		if (n->err_cur) {
+			if (n->state == VG_ERROR_PARSER_STATE_PARTIAL_ERROR) {
+				vg_error_pop (parser, n->pid);
+			} else {
+				g_free (n->err_cur);
+				n->err_cur = NULL;
+			}
+		}
+		
+		n = n->next;
+	}
+}
+
+
+static void
+vg_error_stack_free (VgErrorStack *stack)
+{
+	vg_strfree (stack->symbol);
+	if (stack->type == VG_STACK_SOURCE)
+		vg_strfree (stack->info.src.filename);
+	else
+		vg_strfree (stack->info.object);
+	
+	g_free (stack);
+}
+
+static void
+vg_error_summary_free (VgErrorSummary *summary)
+{
+	VgErrorStack *frame, *next;
+	
+	vg_strfree (summary->report);
+	
+	frame = summary->frames;
+	while (frame != NULL) {
+		next = frame->next;
+		vg_error_stack_free (frame);
+		frame = next;
+	}
+	
+	g_free (summary);
+}
+
+
+void
+vg_error_free (VgError *err)
+{
+	VgErrorSummary *summary, *next;
+	
+	if (err == NULL)
+		return;
+	
+	summary = err->summary;
+	while (summary != NULL) {
+		next = summary->next;
+		vg_error_summary_free (summary);
+		summary = next;
+	}
+	
+	g_free (err);
+}
+
+
+static void
+vg_error_stack_to_string (VgErrorStack *stack, GString *str)
+{
+	time_stamp_t *stamp = &stack->summary->parent->stamp;
+	pid_t pid = stack->summary->parent->pid;
+	
+	g_string_append (str, "==");
+	
+	if (stamp->year != 0) {
+		g_string_append_printf (str, TIME_STAMP_FORMAT " ", stamp->year,
+					stamp->month, stamp->day, stamp->hour,
+					stamp->min, stamp->sec, stamp->msec);
+	}
+	
+	g_string_append_printf (str, "%u==    %s ", pid, stack->where == VG_WHERE_AT ? "at" : "by");
+	
+	if (stack->addr != VG_STACK_ADDR_UNKNOWN)
+		g_string_append_printf (str, "0x%.8x: ", stack->addr);
+	else
+		g_string_append (str, "<unknown address> ");
+	
+	g_string_append (str, stack->symbol ? stack->symbol : "???");
+	
+	if (stack->type == VG_STACK_SOURCE) {
+		g_string_append_printf (str, " (%s:%u)\n", stack->info.src.filename, stack->info.src.lineno);
+	} else {
+		int in;
+		
+		in = !strcmp (stack->info.object + strlen (stack->info.object) - 3, ".so");
+		in = in || strstr (stack->info.object, ".so.") != NULL;
+		g_string_append_printf (str, " (%s %s)\n", in ? "in" : "within", stack->info.object);
+	}
+}
+
+static void
+vg_error_summary_to_string (VgErrorSummary *summary, int indent, GString *str)
+{
+	time_stamp_t *stamp = &summary->parent->stamp;
+	VgErrorStack *s;
+	
+	g_string_append (str, "==");
+	
+	if (stamp->year != 0) {
+		g_string_append_printf (str, TIME_STAMP_FORMAT " ", stamp->year,
+					stamp->month, stamp->day, stamp->hour,
+					stamp->min, stamp->sec, stamp->msec);
+	}
+	
+	g_string_append_printf (str, "%u== %s", summary->parent->pid, indent ? "   " : "");
+	g_string_append (str, summary->report);
+	g_string_append_c (str, '\n');
+	
+	s = summary->frames;
+	while (s != NULL) {
+		vg_error_stack_to_string (s, str);
+		s = s->next;
+	}
+}
+
+
+void
+vg_error_to_string (VgError *err, GString *str)
+{
+	VgErrorSummary *s;
+	int indent = 0;
+	
+	if (err->thread != (vgthread_t) -1) {
+		g_string_append (str, "==");
+		if (err->stamp.year != 0) {
+			g_string_append_printf (str, TIME_STAMP_FORMAT " ", err->stamp.year,
+						err->stamp.month, err->stamp.day, err->stamp.hour,
+						err->stamp.min, err->stamp.sec, err->stamp.msec);
+		}
+		g_string_append_printf (str, "%u== Thread %ld:\n", err->pid, err->thread);
+	}
+	
+	s = err->summary;
+	while (s != NULL) {
+		vg_error_summary_to_string (s, indent, str);
+		indent = indent || s->frames;
+		s = s->next;
+	}
+	
+	g_string_append (str, "==");
+	if (err->stamp.year != 0) {
+		g_string_append_printf (str, TIME_STAMP_FORMAT " ", err->stamp.year,
+					err->stamp.month, err->stamp.day, err->stamp.hour,
+					err->stamp.min, err->stamp.sec, err->stamp.msec);
+	}
+	g_string_append_printf (str, "%u==\n", err->pid);
+}

Added: trunk/plugins/valgrind/vgerror.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgerror.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,124 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __VG_ERROR_H__
+#define __VG_ERROR_H__
+
+#include <glib.h>
+
+#include <time.h>
+
+#include "list.h"
+#include "parser.h"
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+typedef enum {
+	VG_WHERE_AT,
+	VG_WHERE_BY,
+} vgwhere_t;
+
+typedef enum {
+	VG_STACK_SOURCE,
+	VG_STACK_OBJECT,
+} vgstack_t;
+
+#define VG_STACK_ADDR_UNKNOWN ((unsigned int) -1)
+
+typedef struct _VgError VgError;
+typedef struct _VgErrorStack VgErrorStack;
+typedef struct _VgErrorSummary VgErrorSummary;
+typedef struct _VgErrorParser VgErrorParser;
+
+struct _VgErrorStack {
+	struct _VgErrorStack *next;       /* next stack frame */
+	struct _VgErrorSummary *summary;  /* parent summary */
+	vgwhere_t where;                  /* "at", "by" */
+	unsigned int addr;                /* symbol address */
+	vgstack_t type;                   /* func/obj */
+	char *symbol;                     /* symbol name */
+	union {
+		struct {
+			char *filename;
+			size_t lineno;
+		} src;
+		char *object;
+	} info;
+};
+
+struct _VgErrorSummary {
+	struct _VgErrorSummary *next;
+	struct _VgErrorStack *frames;
+	struct _VgError *parent;
+	char *report;
+};
+
+typedef unsigned long vgthread_t;
+
+typedef struct _time_stamp {
+	unsigned int year;
+	unsigned int month;
+	unsigned int day;
+	unsigned int hour;
+	unsigned int min;
+	unsigned int sec;
+	unsigned int msec;
+} time_stamp_t;
+
+struct _VgError {
+	VgErrorSummary *summary;          /* first summary is the error, additional summary nodes are just more specifics */
+	time_stamp_t stamp;
+	vgthread_t thread;
+	pid_t pid;
+};
+
+typedef void (*VgErrorCallback) (VgErrorParser *parser, VgError *err, void *user_data);
+
+struct _VgErrorParser {
+	Parser parser;
+	
+	GHashTable *pid_hash;
+	List errlist;
+	
+	VgErrorCallback error_cb;
+	void *user_data;
+};
+
+VgErrorParser *vg_error_parser_new (int fd, VgErrorCallback error_cb, void *user_data);
+void vg_error_parser_free (VgErrorParser *parser);
+
+int vg_error_parser_step (VgErrorParser *parser);
+void vg_error_parser_flush (VgErrorParser *parser);
+
+void vg_error_free (VgError *err);
+
+void vg_error_to_string (VgError *err, GString *str);
+
+#ifdef _cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __VG_ERROR_H__ */

Added: trunk/plugins/valgrind/vggeneralprefs.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vggeneralprefs.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,387 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *  Copyright (C) Massimo Cora' 2005 <maxcvs gmail com>  
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <limits.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <string.h>
+
+#include <gconf/gconf-client.h>
+#include <glib/gi18n.h>
+#include <libanjuta/anjuta-debug.h>
+#include <libanjuta/anjuta-utils.h>
+
+#include "vggeneralprefs.h"
+
+
+#define DEMANGLE_KEY         "/apps/anjuta/valgrind/general/demangle"
+#define NUM_CALLERS_KEY      "/apps/anjuta/valgrind/general/num-callers"
+#define ERROR_LIMIT_KEY      "/apps/anjuta/valgrind/general/error-limit"
+#define SLOPPY_MALLOC_KEY    "/apps/anjuta/valgrind/general/sloppy-malloc"
+#define TRACE_CHILDREN_KEY   "/apps/anjuta/valgrind/general/trace-children"
+#define TRACK_FDS_KEY        "/apps/anjuta/valgrind/general/track-fds"
+#define TIME_STAMP_KEY       "/apps/anjuta/valgrind/general/time-stamp"
+#define RUN_LIBC_FREERES_KEY "/apps/anjuta/valgrind/general/run-libc-freeres"
+#define SUPPRESSIONS_KEY     "/apps/anjuta/valgrind/general/suppressions"
+
+#define SUPPRESSIONS_DEFAULT_FILE	"valgrind.supp"
+
+static void vg_general_prefs_class_init (VgGeneralPrefsClass *klass);
+static void vg_general_prefs_init (VgGeneralPrefs *prefs);
+static void vg_general_prefs_destroy (GtkObject *obj);
+static void vg_general_prefs_finalize (GObject *obj);
+
+static void general_prefs_apply (VgToolPrefs *prefs);
+static void general_prefs_get_argv (VgToolPrefs *prefs, const char *tool, GPtrArray *argv);
+
+
+static VgToolPrefsClass *parent_class = NULL;
+
+
+GType
+vg_general_prefs_get_type (void)
+{
+	static GType type = 0;
+	
+	if (!type) {
+		static const GTypeInfo info = {
+			sizeof (VgGeneralPrefsClass),
+			NULL, /* base_class_init */
+			NULL, /* base_class_finalize */
+			(GClassInitFunc) vg_general_prefs_class_init,
+			NULL, /* class_finalize */
+			NULL, /* class_data */
+			sizeof (VgGeneralPrefs),
+			0,    /* n_preallocs */
+			(GInstanceInitFunc) vg_general_prefs_init,
+		};
+		
+		type = g_type_register_static (VG_TYPE_TOOL_PREFS, "VgGeneralPrefs", &info, 0);
+	}
+	
+	return type;
+}
+
+static void
+vg_general_prefs_class_init (VgGeneralPrefsClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
+	VgToolPrefsClass *tool_class = VG_TOOL_PREFS_CLASS (klass);
+	
+	parent_class = g_type_class_ref (VG_TYPE_TOOL_PREFS);
+	
+	object_class->finalize = vg_general_prefs_finalize;
+	gtk_object_class->destroy = vg_general_prefs_destroy;
+	
+	/* virtual methods */
+	tool_class->apply = general_prefs_apply;
+	tool_class->get_argv = general_prefs_get_argv;
+}
+
+
+static void
+toggle_button_toggled (GtkToggleButton *toggle, const char *key)
+{
+	GConfClient *gconf;
+	gboolean bool;
+	
+	gconf = gconf_client_get_default ();
+	
+	bool = gtk_toggle_button_get_active (toggle);
+	gconf_client_set_bool (gconf, key, bool, NULL);
+	
+	g_object_unref (gconf);
+}
+
+static gboolean
+spin_focus_out (GtkSpinButton *spin, GdkEventFocus *event, const char *key)
+{
+	GConfClient *gconf;
+	int num;
+	
+	gconf = gconf_client_get_default ();
+	
+	num = gtk_spin_button_get_value_as_int (spin);
+	gconf_client_set_int (gconf, key, num, NULL);
+	
+	g_object_unref (gconf);
+	
+	return FALSE;
+}
+
+static void
+file_entry_changed (GtkFileChooser *chooser, const char *key)
+{
+	GConfClient *gconf;
+	gchar *str;
+	
+	gconf = gconf_client_get_default ();
+	
+	str = gtk_file_chooser_get_filename (chooser);
+	
+	DEBUG_PRINT ("str is %s key is %s", str, key);
+	
+	gconf_client_set_string (gconf, key, str ? str : "", NULL);
+	g_free (str);
+
+	g_object_unref (gconf);
+}
+
+static void
+vg_general_prefs_init (VgGeneralPrefs *prefs)
+{
+	GtkWidget *vbox, *hbox, *label;
+	GConfClient *gconf;
+	GError *err = NULL;
+	GtkWidget *widget;
+	gboolean bool;
+	gchar *str_file;
+	int num;
+	
+	gconf = gconf_client_get_default ();
+	
+	VG_TOOL_PREFS (prefs)->label = _("General");
+	
+	vbox = GTK_WIDGET (prefs);
+	gtk_box_set_spacing (GTK_BOX (vbox), 6);
+	
+	bool = gconf_client_get_bool (gconf, DEMANGLE_KEY, NULL);
+	/* demangle = decode C++ name encoding */
+	widget = gtk_check_button_new_with_label (_("Demangle C++ symbol names"));
+	g_signal_connect (widget, "toggled", G_CALLBACK (toggle_button_toggled), DEMANGLE_KEY);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), bool);
+	prefs->demangle = GTK_TOGGLE_BUTTON (widget);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
+	
+	hbox = gtk_hbox_new (FALSE, 6);
+	label = gtk_label_new (_("Show"));
+	gtk_widget_show (label);
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+	num = gconf_client_get_int (gconf, NUM_CALLERS_KEY, NULL);
+	widget = gtk_spin_button_new_with_range (0, (gdouble) 1024, 1);
+	gtk_widget_show (widget);
+	prefs->num_callers = GTK_SPIN_BUTTON (widget);
+	gtk_spin_button_set_digits (prefs->num_callers, 0);
+	gtk_spin_button_set_numeric (prefs->num_callers, TRUE);
+	gtk_spin_button_set_value (prefs->num_callers, (gdouble) num);
+	g_signal_connect (widget, "focus-out-event", G_CALLBACK (spin_focus_out), NUM_CALLERS_KEY);
+	gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
+	label = gtk_label_new (_("callers in stack trace"));
+	gtk_widget_show (label);
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+	
+	bool = gconf_client_get_bool (gconf, ERROR_LIMIT_KEY, NULL);
+	widget = gtk_check_button_new_with_label (_("Stop showing errors if there are too many"));
+	g_signal_connect (widget, "toggled", G_CALLBACK (toggle_button_toggled), ERROR_LIMIT_KEY);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), bool);
+	prefs->error_limit = GTK_TOGGLE_BUTTON (widget);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
+	
+	bool = gconf_client_get_bool (gconf, SLOPPY_MALLOC_KEY, NULL);
+	widget = gtk_check_button_new_with_label (_("Round malloc sizes to next word"));
+	g_signal_connect (widget, "toggled", G_CALLBACK (toggle_button_toggled), SLOPPY_MALLOC_KEY);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), bool);
+	prefs->sloppy_malloc = GTK_TOGGLE_BUTTON (widget);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
+	
+	bool = gconf_client_get_bool (gconf, TRACE_CHILDREN_KEY, NULL);
+	widget = gtk_check_button_new_with_label (_("Trace any child processes forked off by the program being debugged"));
+	g_signal_connect (widget, "toggled", G_CALLBACK (toggle_button_toggled), TRACE_CHILDREN_KEY);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), bool);
+	prefs->trace_children = GTK_TOGGLE_BUTTON (widget);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
+	
+	bool = gconf_client_get_bool (gconf, TRACK_FDS_KEY, NULL);
+	widget = gtk_check_button_new_with_label (_("Track open file descriptors"));
+	g_signal_connect (widget, "toggled", G_CALLBACK (toggle_button_toggled), TRACK_FDS_KEY);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), bool);
+	prefs->track_fds = GTK_TOGGLE_BUTTON (widget);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
+	
+	bool = gconf_client_get_bool (gconf, TIME_STAMP_KEY, NULL);
+	widget = gtk_check_button_new_with_label (_("Add time stamps to log messages"));
+	g_signal_connect (widget, "toggled", G_CALLBACK (toggle_button_toggled), TIME_STAMP_KEY);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), bool);
+	prefs->time_stamp = GTK_TOGGLE_BUTTON (widget);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
+	
+	bool = gconf_client_get_bool (gconf, RUN_LIBC_FREERES_KEY, NULL);
+	widget = gtk_check_button_new_with_label (_("Call __libc_freeres() at exit before checking for memory leaks"));
+	g_signal_connect (widget, "toggled", G_CALLBACK (toggle_button_toggled), RUN_LIBC_FREERES_KEY);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), bool);
+	prefs->run_libc_freeres = GTK_TOGGLE_BUTTON (widget);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
+	
+	hbox = gtk_hbox_new (FALSE, 6);
+	label = gtk_label_new (_("Suppressions File:"));
+	gtk_widget_show (label);
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+	
+	if (!(str_file = gconf_client_get_string (gconf, SUPPRESSIONS_KEY, &err)) || err != NULL) {
+		int fd;
+		
+		str_file = anjuta_util_get_user_config_file_path(SUPPRESSIONS_DEFAULT_FILE, NULL);
+		if ((fd = open (str_file, O_WRONLY | O_CREAT, 0666)) == -1) {
+			g_free (str_file);
+			str_file = NULL;
+		} else {
+			close (fd);
+		}
+		
+		g_clear_error (&err);
+	}
+	
+	
+	widget = 
+		gtk_file_chooser_button_new (_("Choose Valgrind Suppressions File..."), 
+								GTK_FILE_CHOOSER_ACTION_OPEN);
+
+	if ( gtk_file_chooser_select_filename (GTK_FILE_CHOOSER (widget), str_file) == FALSE )
+		DEBUG_PRINT ("%s", "error: could not select file uri with gtk_file_chooser_select_filename ()");
+	
+	/* grab every change in file selection */
+	g_signal_connect (widget, "selection-changed", G_CALLBACK (file_entry_changed), SUPPRESSIONS_KEY);
+
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (hbox), widget, TRUE, TRUE, 0);
+	
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+	
+	g_object_unref (gconf);
+}
+
+static void
+vg_general_prefs_finalize (GObject *obj)
+{
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+vg_general_prefs_destroy (GtkObject *obj)
+{
+	GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+}
+
+
+static void
+general_prefs_apply (VgToolPrefs *prefs)
+{
+	;
+}
+
+
+enum {
+	ARG_TYPE_BOOL,
+	ARG_TYPE_INT,
+	ARG_TYPE_STRING
+};
+
+static struct {
+	const char *key;
+	const char *arg;
+	char *buf;
+	int type;
+	int dval;
+} general_args[] = {
+	{ DEMANGLE_KEY,         "--demangle",         NULL, ARG_TYPE_BOOL,   1 },
+	{ NUM_CALLERS_KEY,      "--num-callers",      NULL, ARG_TYPE_INT,    4 },
+	{ ERROR_LIMIT_KEY,      "--error-limit",      NULL, ARG_TYPE_BOOL,   1 },
+	{ SLOPPY_MALLOC_KEY,    "--sloppy-malloc",    NULL, ARG_TYPE_BOOL,   0 },
+	{ TRACE_CHILDREN_KEY,   "--trace-children",   NULL, ARG_TYPE_BOOL,   0 },
+	{ TRACK_FDS_KEY,        "--track-fds",        NULL, ARG_TYPE_BOOL,   0 },
+	{ TIME_STAMP_KEY,       "--time-stamp",       NULL, ARG_TYPE_BOOL,   0 },
+	{ RUN_LIBC_FREERES_KEY, "--run-libc-freeres", NULL, ARG_TYPE_BOOL,   0 },
+	{ SUPPRESSIONS_KEY,     "--suppressions",     NULL, ARG_TYPE_STRING, 0 },
+};
+
+static void
+general_prefs_get_argv (VgToolPrefs *prefs, const char *tool, GPtrArray *argv)
+{
+	GConfClient *gconf;
+	int bool, num, i;
+	char *str;
+	
+	gconf = gconf_client_get_default ();
+	
+	g_ptr_array_add (argv, "--alignment=8");
+	
+	for (i = 0; i < G_N_ELEMENTS (general_args); i++) {
+		const char *arg = general_args[i].arg;
+		const char *key = general_args[i].key;
+		struct stat st;
+		
+		g_free (general_args[i].buf);
+		if (general_args[i].type == ARG_TYPE_INT) {
+			num = gconf_client_get_int (gconf, key, NULL);
+			if (num == general_args[i].dval)
+				continue;
+			
+			general_args[i].buf = g_strdup_printf ("%s=%d", arg, num);
+		} else if (general_args[i].type == ARG_TYPE_BOOL) {
+			bool = gconf_client_get_bool (gconf, key, NULL) ? 1 : 0;
+			if (bool == general_args[i].dval)
+				continue;
+			
+			general_args[i].buf = g_strdup_printf ("%s=%s", arg, bool ? "yes" : "no");
+		} else {
+			if (!(str = gconf_client_get_string (gconf, key, NULL)) || *str == '\0') {
+				general_args[i].buf = NULL;
+				g_free (str);
+				continue;
+			}
+			
+			if (g_str_equal (general_args[i].key, SUPPRESSIONS_KEY) &&
+			    (stat (str, &st) == -1 || !S_ISREG (st.st_mode))) {
+				general_args[i].buf = NULL;
+				g_free (str);
+				continue;
+			}
+			
+			general_args[i].buf = g_strdup_printf ("%s=%s", arg, str);
+			g_free (str);
+		}
+		
+		g_ptr_array_add (argv, general_args[i].buf);
+	}
+	
+	g_object_unref (gconf);
+}

Added: trunk/plugins/valgrind/vggeneralprefs.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vggeneralprefs.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,73 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *  Copyright (C) Massimo Cora' 2005 <maxcvs gmail com>  
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __VG_GENERAL_PREFS_H__
+#define __VG_GENERAL_PREFS_H__
+
+#include <gtk/gtk.h>
+
+#include "vgtoolprefs.h"
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+#define VG_TYPE_GENERAL_PREFS            (vg_general_prefs_get_type ())
+#define VG_GENERAL_PREFS(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), VG_TYPE_GENERAL_PREFS, VgGeneralPrefs))
+#define VG_GENERAL_PREFS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), VG_TYPE_GENERAL_PREFS, VgGeneralPrefsClass))
+#define VG_IS_GENERAL_PREFS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VG_TYPE_GENERAL_PREFS))
+#define VG_IS_GENERAL_PREFS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VG_TYPE_GENERAL_PREFS))
+#define VG_GENERAL_PREFS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), VG_TYPE_GENERAL_PREFS, VgGeneralPrefsClass))
+
+typedef struct _VgGeneralPrefs VgGeneralPrefs;
+typedef struct _VgGeneralPrefsClass VgGeneralPrefsClass;
+
+struct _VgGeneralPrefs {
+	VgToolPrefs parent_object;
+	
+	GtkToggleButton *demangle;
+	GtkSpinButton *num_callers;
+	GtkToggleButton *error_limit;
+	GtkToggleButton *sloppy_malloc;
+	/*GtkOptionMenu *alignment;*/  /* 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096 */
+	GtkToggleButton *trace_children;
+	GtkToggleButton *track_fds;
+	GtkToggleButton *time_stamp;
+	GtkToggleButton *run_libc_freeres;
+};
+
+struct _VgGeneralPrefsClass {
+	VgToolPrefsClass parent_class;
+	
+};
+
+
+GType vg_general_prefs_get_type (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __VG_GENERAL_PREFS_H__ */

Added: trunk/plugins/valgrind/vghelgrindprefs.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vghelgrindprefs.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,280 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <gconf/gconf-client.h>
+#include <glib/gi18n.h>
+
+#include "vghelgrindprefs.h"
+
+
+#define PRIVATE_STACKS_KEY    "/apps/anjuta/valgrind/helgrind/private-stacks"
+#define SHOW_LAST_ACCESS_KEY  "/apps/anjuta/valgrind/helgrind/show-last-access"
+
+static void vg_helgrind_prefs_class_init (VgHelgrindPrefsClass *klass);
+static void vg_helgrind_prefs_init (VgHelgrindPrefs *prefs);
+static void vg_helgrind_prefs_destroy (GtkObject *obj);
+static void vg_helgrind_prefs_finalize (GObject *obj);
+
+static void helgrind_prefs_apply (VgToolPrefs *prefs);
+static void helgrind_prefs_get_argv (VgToolPrefs *prefs, const char *tool, GPtrArray *argv);
+
+
+static VgToolPrefsClass *parent_class = NULL;
+
+enum {
+  COLUMN_STRING,
+  COLUMN_INT,
+  N_COLUMNS
+};
+
+GType
+vg_helgrind_prefs_get_type (void)
+{
+	static GType type = 0;
+	
+	if (!type) {
+		static const GTypeInfo info = {
+			sizeof (VgHelgrindPrefsClass),
+			NULL, /* base_class_init */
+			NULL, /* base_class_finalize */
+			(GClassInitFunc) vg_helgrind_prefs_class_init,
+			NULL, /* class_finalize */
+			NULL, /* class_data */
+			sizeof (VgHelgrindPrefs),
+			0,    /* n_preallocs */
+			(GInstanceInitFunc) vg_helgrind_prefs_init,
+		};
+		
+		type = g_type_register_static (VG_TYPE_TOOL_PREFS, "VgHelgrindPrefs", &info, 0);
+	}
+	
+	return type;
+}
+
+static void
+vg_helgrind_prefs_class_init (VgHelgrindPrefsClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
+	VgToolPrefsClass *tool_class = VG_TOOL_PREFS_CLASS (klass);
+	
+	parent_class = g_type_class_ref (VG_TYPE_TOOL_PREFS);
+	
+	object_class->finalize = vg_helgrind_prefs_finalize;
+	gtk_object_class->destroy = vg_helgrind_prefs_destroy;
+	
+	/* virtual methods */
+	tool_class->apply = helgrind_prefs_apply;
+	tool_class->get_argv = helgrind_prefs_get_argv;
+}
+
+
+static void
+toggle_button_toggled (GtkToggleButton *toggle, const char *key)
+{
+	GConfClient *gconf;
+	gboolean bool;
+	
+	gconf = gconf_client_get_default ();
+	
+	bool = gtk_toggle_button_get_active (toggle);
+	gconf_client_set_bool (gconf, key, bool, NULL);
+	
+	g_object_unref (gconf);
+}
+
+static void
+menu_item_activated (GtkComboBox *widget, const char *key)
+{
+	GConfClient *gconf;
+	const char *str;
+	gint i;
+	GtkTreeIter iter;
+	
+	gconf = gconf_client_get_default ();
+
+	gtk_combo_box_get_active_iter (widget, &iter);
+	gtk_tree_model_get (gtk_combo_box_get_model (widget), &iter, COLUMN_INT, &i, -1);
+	
+	str = GINT_TO_POINTER (i);
+	gconf_client_set_string (gconf, key, str, NULL);
+	
+	g_object_unref (gconf);
+}
+
+static char *show_last_access_opts[] = { "no", "some", "all" };
+
+static GtkWidget *
+show_last_access_new (GConfClient *gconf)
+{
+	GtkListStore *list_store;
+	GtkWidget *omenu;
+	int history = 0;
+	char *str;
+	int i;
+	GtkTreeIter iter;
+	GtkCellRenderer *cell;
+
+	list_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_INT);
+	
+
+	str = gconf_client_get_string (gconf, SHOW_LAST_ACCESS_KEY, NULL);
+	
+	for (i = 0; i < 3; i++) {
+		if (str && !strcmp (show_last_access_opts[i], str))
+			history = i;
+		
+		gtk_list_store_append (list_store, &iter);
+		gtk_list_store_set (list_store, &iter, COLUMN_STRING, show_last_access_opts[i], COLUMN_INT, GPOINTER_TO_INT (g_strdup (show_last_access_opts[i])), -1);
+	}
+
+	omenu = gtk_combo_box_new_with_model(GTK_TREE_MODEL(list_store));
+
+	cell = gtk_cell_renderer_text_new();
+	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(omenu), cell, TRUE);
+	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(omenu), cell, "text", 0, NULL);
+
+	gtk_combo_box_set_active (GTK_COMBO_BOX (omenu), history);
+	g_signal_connect (omenu, "changed", G_CALLBACK (menu_item_activated), SHOW_LAST_ACCESS_KEY);
+	
+	g_free (str);
+	
+	return omenu;
+}
+
+static void
+vg_helgrind_prefs_init (VgHelgrindPrefs *prefs)
+{
+	GtkWidget *widget, *hbox;
+	GConfClient *gconf;
+	gboolean bool;
+	
+	gconf = gconf_client_get_default ();
+	
+	VG_TOOL_PREFS (prefs)->label = _("Helgrind");
+	
+	gtk_box_set_spacing (GTK_BOX (prefs), 6);
+	
+	bool = gconf_client_get_bool (gconf, PRIVATE_STACKS_KEY, NULL);
+	widget = gtk_check_button_new_with_label (_("Assume thread stacks are used privately"));
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), bool);
+	g_signal_connect (widget, "toggled", G_CALLBACK (toggle_button_toggled), PRIVATE_STACKS_KEY);
+	prefs->private_stacks = GTK_TOGGLE_BUTTON (widget);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (prefs), widget, FALSE, FALSE, 0);
+	
+	hbox = gtk_hbox_new (FALSE, 6);
+	
+	widget = gtk_label_new (_("Show location of last word access on error:"));
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
+	
+	widget = show_last_access_new (gconf);
+	prefs->show_last_access = GTK_COMBO_BOX (widget);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
+	
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (prefs), hbox, FALSE, FALSE, 0);
+	
+	g_object_unref (gconf);
+}
+
+static void
+vg_helgrind_prefs_finalize (GObject *obj)
+{
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+vg_helgrind_prefs_destroy (GtkObject *obj)
+{
+	GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+}
+
+
+static void
+helgrind_prefs_apply (VgToolPrefs *prefs)
+{
+	;
+}
+
+enum {
+	ARG_TYPE_BOOL,
+	ARG_TYPE_STRING
+};
+
+static struct {
+	const char *key;
+	const char *arg;
+	char *buf;
+	int type;
+	int dval;
+} helgrind_args[] = {
+	{ PRIVATE_STACKS_KEY,   "--private-stacks",   NULL, ARG_TYPE_BOOL,   0 },
+	{ SHOW_LAST_ACCESS_KEY, "--show-last-access", NULL, ARG_TYPE_STRING, 0 },
+};
+
+static void
+helgrind_prefs_get_argv (VgToolPrefs *prefs, const char *tool, GPtrArray *argv)
+{
+	GConfClient *gconf;
+	gboolean bool;
+	char *str;
+	int i;
+	
+	gconf = gconf_client_get_default ();
+	
+	for (i = 0; i < G_N_ELEMENTS (helgrind_args); i++) {
+		const char *arg = helgrind_args[i].arg;
+		const char *key = helgrind_args[i].key;
+		
+		g_free (helgrind_args[i].buf);
+		if (helgrind_args[i].type == ARG_TYPE_BOOL) {
+			bool = gconf_client_get_bool (gconf, key, NULL) ? 1 : 0;
+			if (bool == helgrind_args[i].dval)
+				continue;
+			
+			helgrind_args[i].buf = g_strdup_printf ("%s=%s", arg, bool ? "yes" : "no");
+		} else {
+			if (!(str = gconf_client_get_string (gconf, key, NULL)) || *str == '\0') {
+				helgrind_args[i].buf = NULL;
+				g_free (str);
+				continue;
+			}
+			
+			helgrind_args[i].buf = g_strdup_printf ("%s=%s", arg, str);
+			g_free (str);
+		}
+		
+		g_ptr_array_add (argv, helgrind_args[i].buf);
+	}
+	
+	g_object_unref (gconf);
+}

Added: trunk/plugins/valgrind/vghelgrindprefs.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vghelgrindprefs.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,63 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __VG_HELGRIND_PREFS_H__
+#define __VG_HELGRIND_PREFS_H__
+
+#include "vgtoolprefs.h"
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+#define VG_TYPE_HELGRIND_PREFS            (vg_helgrind_prefs_get_type ())
+#define VG_HELGRIND_PREFS(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), VG_TYPE_HELGRIND_PREFS, VgHelgrindPrefs))
+#define VG_HELGRIND_PREFS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), VG_TYPE_HELGRIND_PREFS, VgHelgrindPrefsClass))
+#define VG_IS_HELGRIND_PREFS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VG_TYPE_HELGRIND_PREFS))
+#define VG_IS_HELGRIND_PREFS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VG_TYPE_HELGRIND_PREFS))
+#define VG_HELGRIND_PREFS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), VG_TYPE_HELGRIND_PREFS, VgHelgrindPrefsClass))
+
+typedef struct _VgHelgrindPrefs VgHelgrindPrefs;
+typedef struct _VgHelgrindPrefsClass VgHelgrindPrefsClass;
+
+struct _VgHelgrindPrefs {
+	VgToolPrefs parent_object;
+	
+	GtkToggleButton *private_stacks;
+	GtkComboBox *show_last_access;
+};
+
+struct _VgHelgrindPrefsClass {
+	VgToolPrefsClass parent_class;
+	
+};
+
+
+GType vg_helgrind_prefs_get_type (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __VG_HELGRIND_PREFS_H__ */

Added: trunk/plugins/valgrind/vgio.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgio.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,66 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include "vgio.h"
+
+ssize_t
+vg_read (int fd, char *buf, size_t n)
+{
+	ssize_t nread;
+	
+	do {
+		nread = read (fd, buf, n);
+	} while (nread == -1 && errno == EINTR);
+	
+	return nread;
+}
+
+
+ssize_t
+vg_write (int fd, const char *buf, size_t n)
+{
+	size_t nwritten = 0;
+	ssize_t w;
+	
+	do {
+		do {
+			w = write (fd, buf + nwritten, n - nwritten);
+		} while (w == -1 && errno == EINTR);
+		
+		if (w == -1)
+			return -1;
+		
+		nwritten += w;
+	} while (nwritten < n);
+	
+	return nwritten;
+}

Added: trunk/plugins/valgrind/vgio.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgio.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,42 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __VGIO_H__
+#define __VGIO_H__
+
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+ssize_t vg_read (int fd, char *buf, size_t n);
+
+ssize_t vg_write (int fd, const char *buf, size_t n);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __VGIO_H__ */

Added: trunk/plugins/valgrind/vgmarshal.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgmarshal.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,55 @@
+
+#include	<glib-object.h>
+
+
+#ifdef G_ENABLE_DEBUG
+#define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
+#define g_marshal_value_peek_char(v)     g_value_get_char (v)
+#define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
+#define g_marshal_value_peek_int(v)      g_value_get_int (v)
+#define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
+#define g_marshal_value_peek_long(v)     g_value_get_long (v)
+#define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)
+#define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)
+#define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)
+#define g_marshal_value_peek_enum(v)     g_value_get_enum (v)
+#define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
+#define g_marshal_value_peek_float(v)    g_value_get_float (v)
+#define g_marshal_value_peek_double(v)   g_value_get_double (v)
+#define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
+#define g_marshal_value_peek_param(v)    g_value_get_param (v)
+#define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
+#define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
+#define g_marshal_value_peek_object(v)   g_value_get_object (v)
+#else /* !G_ENABLE_DEBUG */
+/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
+ *          Do not access GValues directly in your code. Instead, use the
+ *          g_value_get_*() functions
+ */
+#define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
+#define g_marshal_value_peek_char(v)     (v)->data[0].v_int
+#define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
+#define g_marshal_value_peek_int(v)      (v)->data[0].v_int
+#define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
+#define g_marshal_value_peek_long(v)     (v)->data[0].v_long
+#define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
+#define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
+#define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
+#define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
+#define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
+#define g_marshal_value_peek_float(v)    (v)->data[0].v_float
+#define g_marshal_value_peek_double(v)   (v)->data[0].v_double
+#define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
+#define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
+#define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
+#define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
+#define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
+#endif /* !G_ENABLE_DEBUG */
+
+
+/* NONE:NONE (./vgmarshal.list:1) */
+
+/* NONE:INT (./vgmarshal.list:2) */
+
+/* NONE:POINTER (./vgmarshal.list:3) */
+

Added: trunk/plugins/valgrind/vgmarshal.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgmarshal.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,24 @@
+
+#ifndef __vg_marshal_MARSHAL_H__
+#define __vg_marshal_MARSHAL_H__
+
+#include	<glib-object.h>
+
+G_BEGIN_DECLS
+
+/* NONE:NONE (./vgmarshal.list:1) */
+#define vg_marshal_VOID__VOID	g_cclosure_marshal_VOID__VOID
+#define vg_marshal_NONE__NONE	vg_marshal_VOID__VOID
+
+/* NONE:INT (./vgmarshal.list:2) */
+#define vg_marshal_VOID__INT	g_cclosure_marshal_VOID__INT
+#define vg_marshal_NONE__INT	vg_marshal_VOID__INT
+
+/* NONE:POINTER (./vgmarshal.list:3) */
+#define vg_marshal_VOID__POINTER	g_cclosure_marshal_VOID__POINTER
+#define vg_marshal_NONE__POINTER	vg_marshal_VOID__POINTER
+
+G_END_DECLS
+
+#endif /* __vg_marshal_MARSHAL_H__ */
+

Added: trunk/plugins/valgrind/vgmarshal.list
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgmarshal.list	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,3 @@
+NONE:NONE
+NONE:INT
+NONE:POINTER

Added: trunk/plugins/valgrind/vgmemcheckprefs.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgmemcheckprefs.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,387 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <limits.h>
+
+#include <gconf/gconf-client.h>
+#include <glib/gi18n.h>
+
+#include "vgmemcheckprefs.h"
+
+
+#define LEAK_CHECK_KEY             "/apps/anjuta/valgrind/memcheck/leak-check"
+#define SHOW_REACHABLE_KEY         "/apps/anjuta/valgrind/memcheck/show-reachable"
+#define LEAK_RESOLUTION_KEY        "/apps/anjuta/valgrind/memcheck/leak-resolution"
+#define FREELIST_VOL_KEY           "/apps/anjuta/valgrind/memcheck/freelist-vol"
+#define WORKAROUND_GCC296_BUGS_KEY "/apps/anjuta/valgrind/memcheck/workaround-gcc296-bugs"
+#define AVOID_STRLEN_ERRORS_KEY    "/apps/anjuta/valgrind/memcheck/avoid-strlen-errors"
+
+static void vg_memcheck_prefs_class_init (VgMemcheckPrefsClass *klass);
+static void vg_memcheck_prefs_init (VgMemcheckPrefs *prefs);
+static void vg_memcheck_prefs_destroy (GtkObject *obj);
+static void vg_memcheck_prefs_finalize (GObject *obj);
+
+static void memcheck_prefs_apply (VgToolPrefs *prefs);
+static void memcheck_prefs_get_argv (VgToolPrefs *prefs, const char *tool, GPtrArray *argv);
+
+
+static VgToolPrefsClass *parent_class = NULL;
+
+enum {
+  COLUMN_STRING,
+  COLUMN_INT,
+  N_COLUMNS
+};
+
+GType
+vg_memcheck_prefs_get_type (void)
+{
+	static GType type = 0;
+	
+	if (!type) {
+		static const GTypeInfo info = {
+			sizeof (VgMemcheckPrefsClass),
+			NULL, /* base_class_init */
+			NULL, /* base_class_finalize */
+			(GClassInitFunc) vg_memcheck_prefs_class_init,
+			NULL, /* class_finalize */
+			NULL, /* class_data */
+			sizeof (VgMemcheckPrefs),
+			0,    /* n_preallocs */
+			(GInstanceInitFunc) vg_memcheck_prefs_init,
+		};
+		
+		type = g_type_register_static (VG_TYPE_TOOL_PREFS, "VgMemcheckPrefs", &info, 0);
+	}
+	
+	return type;
+}
+
+static void
+vg_memcheck_prefs_class_init (VgMemcheckPrefsClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
+	VgToolPrefsClass *tool_class = VG_TOOL_PREFS_CLASS (klass);
+	
+	parent_class = g_type_class_ref (VG_TYPE_TOOL_PREFS);
+	
+	object_class->finalize = vg_memcheck_prefs_finalize;
+	gtk_object_class->destroy = vg_memcheck_prefs_destroy;
+	
+	/* virtual methods */
+	tool_class->apply = memcheck_prefs_apply;
+	tool_class->get_argv = memcheck_prefs_get_argv;
+}
+
+
+static void
+toggle_button_toggled (GtkToggleButton *toggle, const char *key)
+{
+	GConfClient *gconf;
+	gboolean bool;
+	
+	gconf = gconf_client_get_default ();
+	
+	bool = gtk_toggle_button_get_active (toggle);
+	gconf_client_set_bool (gconf, key, bool, NULL);
+	
+	g_object_unref (gconf);
+}
+
+static void
+menu_item_activated (GtkComboBox *widget, const char *key)
+{
+	int i = 0;
+	GConfClient *gconf;
+	const char *str;
+	GtkTreeIter iter;
+	
+	gconf = gconf_client_get_default ();
+
+	gtk_combo_box_get_active_iter (widget, &iter);
+	gtk_tree_model_get (gtk_combo_box_get_model (widget), &iter, 1, &i, -1);
+
+	str = GINT_TO_POINTER (i);
+
+	gconf_client_set_string (gconf, key, str, NULL);
+	
+	g_object_unref (gconf);
+}
+
+static gboolean
+spin_focus_out (GtkSpinButton *spin, GdkEventFocus *event, const char *key)
+{
+	GConfClient *gconf;
+	int num;
+	
+	gconf = gconf_client_get_default ();
+	
+	num = gtk_spin_button_get_value_as_int (spin);
+	gconf_client_set_int (gconf, key, num, NULL);
+	
+	g_object_unref (gconf);
+	
+	return FALSE;
+}
+
+static GtkWidget *
+combo_box_new (GConfClient *gconf, char *key, char **values, int n, int def)
+{
+	GtkListStore *list_store;
+	GtkWidget *omenu;
+	GtkTreeIter iter;
+	GtkCellRenderer *cell;
+	int history = def;
+	char *str;
+	int i;
+	
+
+	list_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_INT);
+	str = gconf_client_get_string (gconf, key, NULL);
+	
+	for (i = 0; i < n; i++) {
+		if (str && !strcmp (values[i], str))
+			history = i;
+		
+		gtk_list_store_append (list_store, &iter);
+		gtk_list_store_set (list_store, &iter, COLUMN_STRING, _(values[i]), COLUMN_INT, GPOINTER_TO_INT (g_strdup (_(values[i]))), -1);
+	}
+	
+	omenu = gtk_combo_box_new_with_model(GTK_TREE_MODEL(list_store));
+
+	cell = gtk_cell_renderer_text_new();
+	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(omenu), cell, TRUE);
+	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(omenu), cell, "text", 0, NULL);
+
+	gtk_combo_box_set_active (GTK_COMBO_BOX (omenu), history);
+	g_signal_connect (omenu, "changed", G_CALLBACK (menu_item_activated), key);
+	
+	g_free (str);
+	
+	return omenu;
+}
+
+static char *leak_checks[] = { "no", "summary", "full" };
+static char *leak_resolutions[] = { "low", "med", "high" };
+
+static void
+vg_memcheck_prefs_init (VgMemcheckPrefs *prefs)
+{
+	GtkWidget *vbox, *hbox, *label, *frame;
+	GConfClient *gconf;
+	GtkWidget *widget;
+	gboolean bool;
+	int num;
+	
+	gconf = gconf_client_get_default ();
+	
+	VG_TOOL_PREFS (prefs)->label = _("Memcheck");
+	
+	vbox = GTK_WIDGET (prefs);
+	gtk_box_set_spacing (GTK_BOX (vbox), 6);
+	
+	frame = gtk_frame_new (_("Memory leaks"));
+	vbox = gtk_vbox_new (FALSE, 6);
+	gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
+	
+	hbox = gtk_hbox_new (FALSE, 6);
+	label = gtk_label_new (_("Leak check:"));
+	gtk_widget_show (label);
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+	widget = combo_box_new (gconf, LEAK_CHECK_KEY, leak_checks, G_N_ELEMENTS (leak_checks), 1);
+	prefs->leak_check = GTK_COMBO_BOX (widget);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+	
+	bool = gconf_client_get_bool (gconf, SHOW_REACHABLE_KEY, NULL);
+	widget = gtk_check_button_new_with_label (_("Show reachable blocks in leak check"));
+	g_signal_connect (widget, "toggled", G_CALLBACK (toggle_button_toggled), SHOW_REACHABLE_KEY);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), bool);
+	prefs->show_reachable = GTK_TOGGLE_BUTTON (widget);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
+	
+	hbox = gtk_hbox_new (FALSE, 6);
+	label = gtk_label_new (_("Leak resolution:"));
+	gtk_widget_show (label);
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+	widget = combo_box_new (gconf, LEAK_RESOLUTION_KEY, leak_resolutions, G_N_ELEMENTS (leak_resolutions), 0);
+	prefs->leak_resolution = GTK_COMBO_BOX (widget);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+	
+	gtk_widget_show (vbox);
+	gtk_container_add (GTK_CONTAINER (frame), vbox);
+	vbox = GTK_WIDGET (prefs);
+	
+	gtk_widget_show (frame);
+	gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
+	
+	hbox = gtk_hbox_new (FALSE, 6);
+	label = gtk_label_new (_("Keep up to"));
+	gtk_widget_show (label);
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+	num = gconf_client_get_int (gconf, FREELIST_VOL_KEY, NULL);
+	widget = gtk_spin_button_new_with_range (0, (gdouble) INT_MAX, 4);
+	gtk_widget_show (widget);
+	prefs->freelist_vol = GTK_SPIN_BUTTON (widget);
+	gtk_spin_button_set_digits (prefs->freelist_vol, 0);
+	gtk_spin_button_set_numeric (prefs->freelist_vol, TRUE);
+	gtk_spin_button_set_value (prefs->freelist_vol, (gdouble) num);
+	g_signal_connect (widget, "focus-out-event", G_CALLBACK (spin_focus_out), FREELIST_VOL_KEY);
+	gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
+	label = gtk_label_new (_("bytes in the queue after being free()'d"));
+	gtk_widget_show (label);
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+	
+	bool = gconf_client_get_bool (gconf, WORKAROUND_GCC296_BUGS_KEY, NULL);
+	widget = gtk_check_button_new_with_label (_("Work around bugs generated by gcc 2.96"));
+	g_signal_connect (widget, "toggled", G_CALLBACK (toggle_button_toggled), WORKAROUND_GCC296_BUGS_KEY);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), bool);
+	prefs->workaround_gcc296_bugs = GTK_TOGGLE_BUTTON (widget);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
+/*/	
+	bool = gconf_client_get_bool (gconf, AVOID_STRLEN_ERRORS_KEY, NULL);
+	widget = gtk_check_button_new_with_label (_("Ignore errors produced by inline strlen() calls"));
+	g_signal_connect (widget, "toggled", G_CALLBACK (toggle_button_toggled), AVOID_STRLEN_ERRORS_KEY);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), bool);
+	prefs->avoid_strlen_errors = GTK_TOGGLE_BUTTON (widget);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
+/*/	
+	g_object_unref (gconf);
+}
+
+static void
+vg_memcheck_prefs_finalize (GObject *obj)
+{
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+vg_memcheck_prefs_destroy (GtkObject *obj)
+{
+	GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+}
+
+
+static void
+memcheck_prefs_apply (VgToolPrefs *prefs)
+{
+	;
+}
+
+
+enum {
+	ARG_TYPE_BOOL,
+	ARG_TYPE_INT,
+	ARG_TYPE_STRING
+};
+
+enum {
+	ADDRCHECK = 1,
+	MEMCHECK  = 2,
+	BOTH      = 3
+};
+
+static struct {
+	const char *key;
+	const char *arg;
+	unsigned int mask;
+	char *buf;
+	int type;
+	int dval;
+} memcheck_args[] = {
+	{ LEAK_CHECK_KEY,             "--leak-check",             BOTH,     NULL, ARG_TYPE_STRING, 0       },
+	{ SHOW_REACHABLE_KEY,         "--show-reachable",         BOTH,     NULL, ARG_TYPE_BOOL,   0       },
+	{ LEAK_RESOLUTION_KEY,        "--leak-resolution",        BOTH,     NULL, ARG_TYPE_STRING, 0       },
+	{ FREELIST_VOL_KEY,           "--freelist-vol",           BOTH,     NULL, ARG_TYPE_INT,    1000000 },
+	{ WORKAROUND_GCC296_BUGS_KEY, "--workaround-gcc296-bugs", BOTH,     NULL, ARG_TYPE_BOOL,   0       }/*,
+	{ AVOID_STRLEN_ERRORS_KEY,    "--avoid-strlen-errors",    MEMCHECK, NULL, ARG_TYPE_BOOL,   1       },*/
+};
+
+static void
+memcheck_prefs_get_argv (VgToolPrefs *prefs, const char *tool, GPtrArray *argv)
+{
+	GConfClient *gconf;
+	unsigned int mode;
+        int bool, num, i;
+	char *str;
+	
+	if (tool != NULL && !strcmp (tool, "addrcheck"))
+		mode = ADDRCHECK;
+	else
+		mode = MEMCHECK;
+	
+	gconf = gconf_client_get_default ();
+	
+	for (i = 0; i < G_N_ELEMENTS (memcheck_args); i++) {
+		const char *arg = memcheck_args[i].arg;
+		const char *key = memcheck_args[i].key;
+		
+		g_free (memcheck_args[i].buf);
+		if (memcheck_args[i].mask & mode) {
+			if (memcheck_args[i].type == ARG_TYPE_INT) {
+				num = gconf_client_get_int (gconf, key, NULL);
+				if (num == memcheck_args[i].dval)
+					continue;
+				
+				memcheck_args[i].buf = g_strdup_printf ("%s=%d", arg, num);
+			} else if (memcheck_args[i].type == ARG_TYPE_BOOL) {
+				bool = gconf_client_get_bool (gconf, key, NULL) ? 1 : 0;
+				if (bool == memcheck_args[i].dval)
+					continue;
+				
+				memcheck_args[i].buf = g_strdup_printf ("%s=%s", arg, bool ? "yes" : "no");
+			} else {
+				if (!(str = gconf_client_get_string (gconf, key, NULL)) || *str == '\0') {
+					memcheck_args[i].buf = NULL;
+					g_free (str);
+					continue;
+				}
+				
+				memcheck_args[i].buf = g_strdup_printf ("%s=%s", arg, str);
+				g_free (str);
+			}
+			
+			g_ptr_array_add (argv, memcheck_args[i].buf);
+		} else {
+			memcheck_args[i].buf = NULL;
+		}
+	}
+	
+	g_object_unref (gconf);
+}

Added: trunk/plugins/valgrind/vgmemcheckprefs.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgmemcheckprefs.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,67 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __VG_MEMCHECK_PREFS_H__
+#define __VG_MEMCHECK_PREFS_H__
+
+#include "vgtoolprefs.h"
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+#define VG_TYPE_MEMCHECK_PREFS            (vg_memcheck_prefs_get_type ())
+#define VG_MEMCHECK_PREFS(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), VG_TYPE_MEMCHECK_PREFS, VgMemcheckPrefs))
+#define VG_MEMCHECK_PREFS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), VG_TYPE_MEMCHECK_PREFS, VgMemcheckPrefsClass))
+#define VG_IS_MEMCHECK_PREFS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VG_TYPE_MEMCHECK_PREFS))
+#define VG_IS_MEMCHECK_PREFS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VG_TYPE_MEMCHECK_PREFS))
+#define VG_MEMCHECK_PREFS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), VG_TYPE_MEMCHECK_PREFS, VgMemcheckPrefsClass))
+
+typedef struct _VgMemcheckPrefs VgMemcheckPrefs;
+typedef struct _VgMemcheckPrefsClass VgMemcheckPrefsClass;
+
+struct _VgMemcheckPrefs {
+	VgToolPrefs parent_object;
+	
+	GtkComboBox *leak_check;
+	GtkToggleButton *show_reachable;
+	GtkComboBox *leak_resolution;
+	GtkSpinButton *freelist_vol;
+	GtkToggleButton *workaround_gcc296_bugs;
+	GtkToggleButton *avoid_strlen_errors;
+};
+
+struct _VgMemcheckPrefsClass {
+	VgToolPrefsClass parent_class;
+	
+};
+
+
+GType vg_memcheck_prefs_get_type (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __VG_MEMCHECK_PREFS_H__ */

Added: trunk/plugins/valgrind/vgrule-editor.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgrule-editor.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,566 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include <glib/gi18n.h>
+
+#include "vgrule-editor.h"
+
+
+static void vg_rule_editor_class_init (VgRuleEditorClass *klass);
+static void vg_rule_editor_init (VgRuleEditor *editor);
+static void vg_rule_editor_destroy (GtkObject *obj);
+static void vg_rule_editor_finalize (GObject *obj);
+
+
+static GtkVBoxClass *parent_class = NULL;
+
+enum {
+  COLUMN_STRING,
+  COLUMN_INT,
+  N_COLUMNS
+};
+
+
+GType
+vg_rule_editor_get_type (void)
+{
+	static GType type = 0;
+	
+	if (!type) {
+		static const GTypeInfo info = {
+			sizeof (VgRuleEditorClass),
+			NULL, /* base_class_init */
+			NULL, /* base_class_finalize */
+			(GClassInitFunc) vg_rule_editor_class_init,
+			NULL, /* class_finalize */
+			NULL, /* class_data */
+			sizeof (VgRuleEditor),
+			0,    /* n_preallocs */
+			NULL /*(GInstanceInitFunc) vg_rule_editor_init*/,
+		};
+		
+		type = g_type_register_static (GTK_TYPE_VBOX, "VgRuleEditor", &info, 0);
+	}
+	
+	return type;
+}
+
+static void
+vg_rule_editor_class_init (VgRuleEditorClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
+	
+	parent_class = g_type_class_ref (GTK_TYPE_VBOX);
+	
+	object_class->finalize = vg_rule_editor_finalize;
+	gtk_object_class->destroy = vg_rule_editor_destroy;
+}
+
+
+static void
+type_menu_changed (GtkComboBox *widget, gpointer user_data)
+{
+	VgRuleEditor *editor = user_data;
+	vgrule_t type;
+	GtkTreeIter iter;
+	
+	gtk_combo_box_get_active_iter (widget, &iter);
+	gtk_tree_model_get (gtk_combo_box_get_model (widget), &iter, 1, &type, -1);
+
+	gtk_widget_set_sensitive (GTK_WIDGET (editor->syscall), type == VG_RULE_PARAM);
+}
+
+static GtkWidget *
+rule_type_menu_new (VgRuleEditor *editor)
+{
+	GtkListStore *list_store;
+	GtkWidget *omenu;
+	int i;
+	GtkTreeIter iter;
+	GtkCellRenderer *cell;
+
+	list_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_INT);
+	
+	for (i = 0; i < VG_RULE_LAST; i++) {
+		gtk_list_store_append (list_store, &iter);
+		gtk_list_store_set (list_store, &iter, COLUMN_STRING, vg_rule_type_to_name (i), COLUMN_INT, i, -1);
+	}
+
+	omenu = gtk_combo_box_new_with_model(GTK_TREE_MODEL(list_store));
+
+	cell = gtk_cell_renderer_text_new();
+	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(omenu), cell, TRUE);
+	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(omenu), cell, "text", 0, NULL);
+
+	gtk_combo_box_set_active (GTK_COMBO_BOX (omenu), 0);	
+	g_signal_connect (omenu, "changed", G_CALLBACK (type_menu_changed), editor);
+	
+	return omenu;
+}
+
+static GtkWidget *
+call_stack_frame_new (vgcaller_t type, const char *name)
+{
+	GtkListStore *list_store;
+	GtkWidget *hbox, *omenu, *entry;
+	GtkTreeIter iter;
+	GtkCellRenderer *cell;
+
+	hbox = gtk_hbox_new (FALSE, 6);
+	list_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_INT);
+
+	gtk_list_store_append (list_store, &iter);
+	gtk_list_store_set (list_store, &iter, COLUMN_STRING, _("Function"), COLUMN_INT, VG_CALLER_FUNCTION, -1);
+
+	gtk_list_store_append (list_store, &iter);
+	gtk_list_store_set (list_store, &iter, COLUMN_STRING, _("Shared Object"), COLUMN_INT, VG_CALLER_OBJECT, -1);
+
+	omenu = gtk_combo_box_new_with_model(GTK_TREE_MODEL(list_store));
+
+	cell = gtk_cell_renderer_text_new();
+	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(omenu), cell, TRUE);
+	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(omenu), cell, "text", 0, NULL);
+	
+	gtk_combo_box_set_active (GTK_COMBO_BOX (omenu), (int) type);
+	
+	gtk_widget_show (omenu);
+	gtk_box_pack_start (GTK_BOX (hbox), omenu, FALSE, FALSE, 0);
+	
+	entry = gtk_entry_new ();
+	gtk_entry_set_text (GTK_ENTRY (entry), name ? name : "");
+	gtk_widget_show (entry);
+	gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
+	
+	g_object_set_data (G_OBJECT (hbox), "omenu", omenu);
+	g_object_set_data (G_OBJECT (hbox), "entry", entry);
+	
+	return hbox;
+}
+
+static void
+grow_cb (GtkButton *button, VgRuleEditor *editor)
+{
+	GtkWidget *caller;
+	int len;
+	
+	len = editor->callers->len;
+	caller = call_stack_frame_new (0, NULL);
+	g_ptr_array_add (editor->callers, caller);
+	gtk_widget_show (caller);
+	gtk_box_pack_start (editor->call_stack, caller, FALSE, FALSE, 0);
+}
+
+static void
+shrink_cb (GtkButton *button, VgRuleEditor *editor)
+{
+	int i;
+	
+	if (editor->callers->len == 1)
+		return;
+	
+	i = editor->callers->len - 1;
+	gtk_widget_destroy (editor->callers->pdata[i]);
+	g_ptr_array_remove_index (editor->callers, editor->callers->len - 1);
+}
+
+static GtkWidget *
+call_stack_new (VgRuleEditor *editor)
+{
+	GtkWidget *vbox, *hbox, *button;
+	GtkWidget *widget;
+	int i;
+	
+	vbox = gtk_vbox_new (FALSE, 3);
+	
+	hbox = gtk_hbox_new (FALSE, 6);
+	button = gtk_button_new_with_label (_("Grow"));
+	gtk_widget_show (button);
+	gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+	g_signal_connect (button, "clicked", G_CALLBACK (grow_cb), editor);
+	button = gtk_button_new_with_label (_("Shrink"));
+	gtk_widget_show (button);
+	gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+	g_signal_connect (button, "clicked", G_CALLBACK (shrink_cb), editor);
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+	
+	for (i = 0; i < editor->callers->len; i++) {
+		widget = editor->callers->pdata[i];
+		gtk_widget_show (widget);
+		gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
+	}
+	
+	return vbox;
+}
+
+static void
+vg_rule_editor_init (VgRuleEditor *editor)
+{
+	GtkWidget *vbox, *hbox, *label;
+	GtkWidget *widget;
+	
+	vbox = GTK_WIDGET (editor);
+	gtk_box_set_spacing (GTK_BOX (vbox), 6);
+	
+	hbox = gtk_hbox_new (FALSE, 6);
+	label = gtk_label_new (_("Rule name:"));
+	gtk_widget_show (label);
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+	editor->name = GTK_ENTRY (widget = gtk_entry_new ());
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (hbox), widget, TRUE, TRUE, 0);
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+	
+	hbox = gtk_hbox_new (FALSE, 6);
+	label = gtk_label_new (_("Suppress messages of type:"));
+	gtk_widget_show (label);
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+	editor->type = GTK_COMBO_BOX (widget = rule_type_menu_new (editor));
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (hbox), widget, TRUE, TRUE, 0);
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+	
+	hbox = gtk_hbox_new (FALSE, 6);
+	label = gtk_label_new (_("Suppress when using:"));
+	gtk_widget_show (label);
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+	editor->addrcheck = GTK_TOGGLE_BUTTON (widget = gtk_check_button_new_with_label ("Addrcheck"));
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
+	editor->memcheck = GTK_TOGGLE_BUTTON (widget = gtk_check_button_new_with_label ("Memcheck"));
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+	
+	hbox = gtk_hbox_new (FALSE, 6);
+	label = gtk_label_new (_("System call:"));
+	gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
+	gtk_widget_show (label);
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+	editor->syscall = GTK_ENTRY (widget = gtk_entry_new ());
+	gtk_widget_show (widget);
+	gtk_widget_set_sensitive (widget, FALSE);
+	gtk_box_pack_start (GTK_BOX (hbox), widget, TRUE, TRUE, 0);
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+	
+	label = gtk_label_new (_("Call chain:"));
+	gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+	gtk_widget_show (label);
+	gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+	
+	/*editor->callers = g_ptr_array_new ();
+	  g_ptr_array_add (editor->callers, call_stack_frame_new (0, NULL));*/
+	
+	editor->call_stack = GTK_BOX (widget = call_stack_new (editor));
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (vbox), widget, TRUE, TRUE, 0);
+}
+
+static void
+vg_rule_editor_finalize (GObject *obj)
+{
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+vg_rule_editor_destroy (GtkObject *obj)
+{
+	GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+}
+
+
+GtkWidget *
+vg_rule_editor_new (void)
+{
+	VgRuleEditor *editor;
+	
+	editor = g_object_new (VG_TYPE_RULE_EDITOR, NULL);
+	editor->callers = g_ptr_array_new ();
+	g_ptr_array_add (editor->callers, call_stack_frame_new (0, NULL));
+	
+	vg_rule_editor_init (editor);
+	
+	gtk_toggle_button_set_active (editor->addrcheck, TRUE);
+	gtk_toggle_button_set_active (editor->memcheck, TRUE);
+	
+	return GTK_WIDGET (editor);
+}
+
+
+GtkWidget *
+vg_rule_editor_new_from_rule (VgRule *rule)
+{
+	VgRuleEditor *editor;
+	VgCaller *caller;
+	VgTool *tool;
+	
+	editor = g_object_new (VG_TYPE_RULE_EDITOR, NULL);
+	editor->callers = g_ptr_array_new ();
+	
+	caller = rule->callers;
+	while (caller != NULL) {
+		g_ptr_array_add (editor->callers, call_stack_frame_new (caller->type, caller->name));
+		
+		caller = caller->next;
+	}
+	
+	if (editor->callers->len == 0)
+		g_ptr_array_add (editor->callers, call_stack_frame_new (0, NULL));
+	
+	vg_rule_editor_init (editor);
+	
+	vg_rule_editor_set_type (editor, rule->type);
+	vg_rule_editor_set_name (editor, rule->name);
+	vg_rule_editor_set_syscall (editor, rule->syscall);
+	
+	tool = rule->tools;
+	while (tool != NULL) {
+		if (!strcasecmp (tool->name, "core")) {
+			/* special case... */
+			g_object_set_data (G_OBJECT (editor), "core", GINT_TO_POINTER (TRUE));
+		} else if (!strcasecmp (tool->name, "Addrcheck")) {
+			gtk_toggle_button_set_active (editor->addrcheck, TRUE);
+		} else if (!strcasecmp (tool->name, "Memcheck")) {
+			gtk_toggle_button_set_active (editor->memcheck, TRUE);
+		}
+		
+		tool = tool->next;
+	}
+	
+	return GTK_WIDGET (editor);
+}
+
+
+GtkWidget *
+vg_rule_editor_new_from_summary (VgErrorSummary *summary)
+{
+	VgRuleEditor *editor;
+	VgErrorStack *stack;
+	GString *rule_name;
+	vgrule_t rtype;
+	char *syscall;
+	
+	editor = g_object_new (VG_TYPE_RULE_EDITOR, NULL);
+	editor->callers = g_ptr_array_new ();
+	
+	rule_name = g_string_new ("");
+	
+	stack = summary->frames;
+	while (stack != NULL) {
+		const char *name = NULL;
+		const char *basename;
+		vgcaller_t ctype = 0;
+		
+		/* if we can get a symbol, use it - otherwise try and use the shared object */
+		if (stack->symbol) {
+			name = stack->symbol;
+			ctype = VG_CALLER_FUNCTION;
+			g_string_append (rule_name, name);
+		} else if (stack->type == VG_STACK_OBJECT) {
+			name = stack->info.object;
+			ctype = VG_CALLER_OBJECT;
+			
+			if (!(basename = strrchr (name, '/')))
+				basename = name;
+			else
+				basename++;
+			
+			g_string_append (rule_name, basename);
+		}
+		
+		if (stack->next)
+			g_string_append_c (rule_name, '/');
+		
+		g_ptr_array_add (editor->callers, call_stack_frame_new (ctype, name));
+		
+		stack = stack->next;
+	}
+	
+	if (editor->callers->len == 0)
+		g_ptr_array_add (editor->callers, call_stack_frame_new (0, NULL));
+	
+	vg_rule_editor_init (editor);
+	
+	gtk_toggle_button_set_active (editor->addrcheck, TRUE);
+	gtk_toggle_button_set_active (editor->memcheck, TRUE);
+	
+	syscall = NULL;
+	if (vg_rule_type_from_report (summary->report, &rtype, &syscall)) {
+		vg_rule_editor_set_type (editor, rtype);
+		if (syscall != NULL) {
+			vg_rule_editor_set_syscall (editor, syscall);
+			g_free (syscall);
+		}
+		
+		g_string_append_c (rule_name, '(');
+		g_string_append (rule_name, vg_rule_type_to_name (rtype));
+		g_string_append_c (rule_name, ')');
+	}
+	
+	vg_rule_editor_set_name (editor, rule_name->str);
+	g_string_free (rule_name, TRUE);
+	
+	return GTK_WIDGET (editor);
+}
+
+
+const char *
+vg_rule_editor_get_name (VgRuleEditor *editor)
+{
+	return gtk_entry_get_text (editor->name);
+}
+
+void
+vg_rule_editor_set_name (VgRuleEditor *editor, const char *name)
+{
+	gtk_entry_set_text (editor->name, name ? name : "");
+}
+
+void
+vg_rule_editor_set_type (VgRuleEditor *editor, vgrule_t type)
+{
+	gtk_combo_box_set_active (editor->type, (int) type);
+}
+
+void
+vg_rule_editor_set_syscall (VgRuleEditor *editor, const char *syscall)
+{
+	gtk_entry_set_text (editor->syscall, syscall ? syscall : "");
+}
+
+void
+vg_rule_editor_add_caller (VgRuleEditor *editor, vgcaller_t type, const char *name)
+{
+	GtkWidget *caller;
+	int len;
+	
+	len = editor->callers->len;
+	caller = call_stack_frame_new (0, NULL);
+	g_ptr_array_add (editor->callers, caller);
+	gtk_widget_show (caller);
+	gtk_box_pack_start (editor->call_stack, caller, FALSE, FALSE, 0);
+}
+
+VgRule *
+vg_rule_editor_get_rule (VgRuleEditor *editor)
+{
+	GtkWidget *omenu, *entry;
+	VgCaller *caller, *tail;
+	const char *name;
+	VgRule *rule;
+	int type, i;
+	
+	name = gtk_entry_get_text (editor->name);
+	type = gtk_combo_box_get_active (editor->type);
+	rule = vg_rule_new (type, name);
+	
+	if (type == VG_RULE_PARAM)
+		rule->syscall = g_strdup (gtk_entry_get_text (editor->syscall));
+	
+	if (gtk_toggle_button_get_active (editor->addrcheck))
+		vg_rule_add_tool (rule, "Addrcheck");
+	
+	if (gtk_toggle_button_get_active (editor->memcheck))
+		vg_rule_add_tool (rule, "Memcheck");
+	
+	if (!rule->tools && g_object_get_data (G_OBJECT (editor), "core")) {
+		/* this means we are editing a valgrind 1.9.x versioned supp file
+		   which needs at least 1 'tool' specified to suppress */
+		vg_rule_add_tool (rule, "core");
+	}
+	
+	tail = (VgCaller *) &rule->callers;
+	
+	for (i = 0; i < editor->callers->len; i++) {
+		omenu = g_object_get_data (G_OBJECT (editor->callers->pdata[i]), "omenu");
+		entry = g_object_get_data (G_OBJECT (editor->callers->pdata[i]), "entry");
+		
+		name = gtk_entry_get_text (GTK_ENTRY (entry));
+		type = gtk_combo_box_get_active (GTK_COMBO_BOX (omenu));
+		
+		caller = vg_caller_new (type, name);
+		tail->next = caller;
+		tail = caller;
+	}
+	
+	return rule;
+}
+
+void
+vg_rule_editor_save (VgRuleEditor *editor, const char *filename)
+{
+	GtkWindow *parent;
+	GtkWidget *dialog;
+	VgRule *rule;
+	off_t offset;
+	int fd;
+	
+	parent = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (editor)));
+	
+	if ((fd = open (filename, O_WRONLY | O_APPEND, 0666)) == -1) {
+		dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+						 GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+						 _("Error saving to suppression file '%s': %s"),
+						 filename, g_strerror (errno));
+		gtk_dialog_run (GTK_DIALOG (dialog));
+		gtk_widget_destroy (dialog);
+		return;
+	}
+	
+	rule = vg_rule_editor_get_rule (editor);
+	
+	/* find out where we currently are */
+	offset = lseek (fd, 0, SEEK_END);
+	
+	if (vg_suppressions_file_append_rule (fd, rule) == -1 || fsync (fd) == -1) {
+		dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+						 GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+						 _("Error saving to suppression file '%s': %s"),
+						 filename, g_strerror (errno));
+		gtk_dialog_run (GTK_DIALOG (dialog));
+		gtk_widget_destroy (dialog);
+		
+		ftruncate (fd, offset);
+	}
+	
+	vg_rule_free (rule);
+	
+	close (fd);
+}

Added: trunk/plugins/valgrind/vgrule-editor.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgrule-editor.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,88 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __VG_RULE_EDITOR_H__
+#define __VG_RULE_EDITOR_H__
+
+#include <gtk/gtk.h>
+
+#include "vgerror.h"
+#include "vgrule.h"
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+#define VG_TYPE_RULE_EDITOR            (vg_rule_editor_get_type ())
+#define VG_RULE_EDITOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), VG_TYPE_RULE_EDITOR, VgRuleEditor))
+#define VG_RULE_EDITOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), VG_TYPE_RULE_EDITOR, VgRuleEditorClass))
+#define IS_VG_RULE_EDITOR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VG_TYPE_RULE_EDITOR))
+#define IS_VG_RULE_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VG_TYPE_RULE_EDITOR))
+#define VG_RULE_EDITOR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), VG_TYPE_RULE_EDITOR, VgRuleEditorClass))
+
+typedef struct _VgRuleEditor VgRuleEditor;
+typedef struct _VgRuleEditorClass VgRuleEditorClass;
+
+struct _VgRuleEditor {
+	GtkVBox parent_object;
+	
+	GtkEntry *name;
+	GtkComboBox *type;
+	GtkEntry *syscall;
+	
+	GtkToggleButton *addrcheck;
+	GtkToggleButton *memcheck;
+	
+	GPtrArray *callers;
+	GtkBox *call_stack;
+};
+
+struct _VgRuleEditorClass {
+	GtkVBoxClass parent_class;
+	
+};
+
+
+GType vg_rule_editor_get_type (void);
+
+GtkWidget *vg_rule_editor_new (void);
+GtkWidget *vg_rule_editor_new_from_rule (VgRule *rule);
+GtkWidget *vg_rule_editor_new_from_summary (VgErrorSummary *summary);
+
+const char *vg_rule_editor_get_name (VgRuleEditor *editor);
+void vg_rule_editor_set_name (VgRuleEditor *editor, const char *name);
+
+void vg_rule_editor_set_type (VgRuleEditor *editor, vgrule_t type);
+void vg_rule_editor_set_syscall (VgRuleEditor *editor, const char *syscall);
+void vg_rule_editor_add_caller (VgRuleEditor *editor, vgcaller_t type, const char *name);
+
+VgRule *vg_rule_editor_get_rule (VgRuleEditor *editor);
+
+void vg_rule_editor_save (VgRuleEditor *editor, const char *filename);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __VG_RULE_EDITOR_H__ */

Added: trunk/plugins/valgrind/vgrule-list.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgrule-list.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,704 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include <glib/gi18n.h>
+#include <gconf/gconf-client.h>
+#include <libanjuta/anjuta-utils.h>
+
+#include "vgrule-list.h"
+#include "vgmarshal.h"
+
+
+typedef struct _RuleNode {
+	struct _RuleNode *next;
+	struct _RuleNode *prev;
+	VgRule *rule;
+} RuleNode;
+
+enum {
+	COL_STRING_NAME,
+	COL_POINTER_RULE,
+	COL_POINTER_RULE_NODE,
+	COL_LAST
+};
+
+static GType col_types[] = {
+	G_TYPE_STRING,
+	G_TYPE_POINTER,
+	G_TYPE_POINTER,
+};
+
+enum {
+	RULE_ADDED,
+	LAST_SIGNAL
+};
+
+static unsigned int signals[LAST_SIGNAL] = { 0 };
+
+#define SUPPRESSIONS_KEY "/apps/anjuta/valgrind/general/suppressions"
+
+
+static void vg_rule_list_class_init (VgRuleListClass *klass);
+static void vg_rule_list_init (VgRuleList *list);
+static void vg_rule_list_destroy (GtkObject *obj);
+static void vg_rule_list_finalize (GObject *obj);
+
+
+static GtkVBoxClass *parent_class = NULL;
+
+
+GType
+vg_rule_list_get_type (void)
+{
+	static GType type = 0;
+	
+	if (!type) {
+		static const GTypeInfo info = {
+			sizeof (VgRuleListClass),
+			NULL, /* base_class_init */
+			NULL, /* base_class_finalize */
+			(GClassInitFunc) vg_rule_list_class_init,
+			NULL, /* class_finalize */
+			NULL, /* class_data */
+			sizeof (VgRuleList),
+			0,    /* n_preallocs */
+			(GInstanceInitFunc) vg_rule_list_init,
+		};
+		
+		type = g_type_register_static (GTK_TYPE_VBOX, "VgRuleList", &info, 0);
+	}
+	
+	return type;
+}
+
+static void
+vg_rule_list_class_init (VgRuleListClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
+	
+	parent_class = g_type_class_ref (GTK_TYPE_VBOX);
+	
+	object_class->finalize = vg_rule_list_finalize;
+	gtk_object_class->destroy = vg_rule_list_destroy;
+	
+	signals[RULE_ADDED]
+		= g_signal_new ("rule-added",
+				G_OBJECT_CLASS_TYPE (object_class),
+				G_SIGNAL_RUN_FIRST,
+				G_STRUCT_OFFSET (VgRuleListClass, rule_added),
+				NULL, NULL,
+				vg_marshal_NONE__POINTER,
+				G_TYPE_NONE, 1,
+				G_TYPE_POINTER);
+}
+
+
+static GtkWidget *
+rule_editor_dialog_new (GtkWindow *parent, VgRule *rule)
+{
+	GtkWidget *dialog, *editor;
+	
+	/* FIXME: we should really get this title from somewhere else? */
+	dialog = gtk_dialog_new_with_buttons (_("Valgrind Suppression"), parent,
+					      GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+					      GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+					      GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
+	
+	if (rule != NULL)
+		editor = vg_rule_editor_new_from_rule (rule);
+	else
+		editor = vg_rule_editor_new ();
+	
+	gtk_container_set_border_width (GTK_CONTAINER (editor), 6);
+	gtk_widget_show (editor);
+	
+	gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 3);
+	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), editor, TRUE, TRUE, 0);
+	
+	g_object_set_data (G_OBJECT (dialog), "editor", editor);
+	
+	return dialog;
+}
+
+static void
+add_response_cb (GtkDialog *dialog, int response, gpointer user_data)
+{
+	VgRuleList *list = user_data;
+	GtkWidget *editor;
+	GtkTreeIter iter;
+	RuleNode *node;
+	VgRule *rule;
+	
+	if (response == GTK_RESPONSE_OK) {
+		const char *name;
+		GtkWidget *msg;
+		
+		editor = g_object_get_data (G_OBJECT (dialog), "editor");
+		
+		name = vg_rule_editor_get_name (VG_RULE_EDITOR (editor));
+		if (!name || *name == '\0') {
+			msg = gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL |
+						      GTK_DIALOG_DESTROY_WITH_PARENT,
+						      GTK_MESSAGE_WARNING,
+						      GTK_BUTTONS_CLOSE,
+						      _("You have forgotten to name your suppression rule."));
+			
+			gtk_dialog_run (GTK_DIALOG (msg));
+			gtk_widget_destroy (msg);
+			return;
+		}
+		
+		list->changed = TRUE;
+		
+		rule = vg_rule_editor_get_rule (VG_RULE_EDITOR (editor));
+		
+		node = g_new (RuleNode, 1);
+		node->rule = rule;
+		
+		list_append_node (&list->rules, (ListNode *) node);
+		
+		vg_rule_list_save (list);
+		
+		gtk_list_store_append (GTK_LIST_STORE (list->model), &iter);
+		
+		gtk_list_store_set (GTK_LIST_STORE (list->model), &iter,
+				    COL_STRING_NAME, rule->name,
+				    COL_POINTER_RULE, rule,
+				    COL_POINTER_RULE_NODE, node, -1);
+		
+		g_signal_emit (list, signals[RULE_ADDED], 0, rule);
+	}
+	
+	gtk_widget_destroy (GTK_WIDGET (dialog));
+}
+
+static void
+add_cb (GtkWidget *button, gpointer user_data)
+{
+	VgRuleList *list = user_data;
+	GtkWidget *parent;
+	GtkWidget *dialog;
+	
+	parent = gtk_widget_get_toplevel (GTK_WIDGET (list));
+	parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
+	
+	dialog = rule_editor_dialog_new (GTK_WINDOW (parent), NULL);
+	g_signal_connect (dialog, "response", G_CALLBACK (add_response_cb), list);
+	
+	gtk_widget_show (dialog);
+}
+
+static void
+edit_response_cb (GtkDialog *dialog, int response, gpointer user_data)
+{
+	VgRuleList *list = user_data;
+	GtkWidget *editor;
+	GtkTreePath *path;
+	GtkTreeIter iter;
+	RuleNode *node;
+	VgRule *rule;
+	
+	if (response == GTK_RESPONSE_OK) {
+		const char *name;
+		GtkWidget *msg;
+		
+		editor = g_object_get_data (G_OBJECT (dialog), "editor");
+		
+		name = vg_rule_editor_get_name (VG_RULE_EDITOR (editor));
+		if (!name || *name == '\0') {
+			msg = gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL |
+						      GTK_DIALOG_DESTROY_WITH_PARENT,
+						      GTK_MESSAGE_WARNING,
+						      GTK_BUTTONS_CLOSE,
+						      _("You have forgotten to name your suppression rule."));
+			
+			gtk_dialog_run (GTK_DIALOG (msg));
+			gtk_widget_destroy (msg);
+			return;
+		}
+		
+		list->changed = TRUE;
+		
+		rule = vg_rule_editor_get_rule (VG_RULE_EDITOR (editor));
+		
+		path = g_object_get_data (G_OBJECT (dialog), "path");
+		if (gtk_tree_model_get_iter (list->model, &iter, path)) {
+			/* replace the old rule node... */
+			gtk_tree_model_get (list->model, &iter, COL_POINTER_RULE_NODE, &node, -1);
+			vg_rule_free (node->rule);
+			node->rule = rule;
+		} else {
+			/* create a new rule node... */
+			node = g_new (RuleNode, 1);
+			node->rule = rule;
+			
+			list_append_node (&list->rules, (ListNode *) node);
+			
+			gtk_list_store_append (GTK_LIST_STORE (list->model), &iter);
+		}
+		
+		gtk_list_store_set (GTK_LIST_STORE (list->model), &iter,
+				    COL_STRING_NAME, rule->name,
+				    COL_POINTER_RULE, rule,
+				    COL_POINTER_RULE_NODE, node, -1);
+		
+		/* FIXME: only emit if we've changed something that matters? */
+		g_signal_emit (list, signals[RULE_ADDED], 0, rule);
+	}
+	
+	gtk_widget_destroy (GTK_WIDGET (dialog));
+}
+
+static void
+edit_cb (GtkWidget *button, gpointer user_data)
+{
+	VgRuleList *list = user_data;
+	GtkTreeSelection *selection;
+	GtkTreeModel *model = NULL;
+	VgRule *rule = NULL;
+	GtkWidget *parent;
+	GtkWidget *dialog;
+	GtkTreePath *path;
+	GtkTreeIter iter;
+	
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list->list));
+	if (gtk_tree_selection_get_selected (selection, &model, &iter))
+		gtk_tree_model_get (model, &iter, COL_POINTER_RULE, &rule, -1);
+	
+	if (rule == NULL)
+		return;
+	
+	path = gtk_tree_model_get_path (model, &iter);
+	
+	parent = gtk_widget_get_toplevel (GTK_WIDGET (list));
+	parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
+	
+	dialog = rule_editor_dialog_new (GTK_WINDOW (parent), rule);
+	g_signal_connect (dialog, "response", G_CALLBACK (edit_response_cb), list);
+	g_object_set_data_full (G_OBJECT (dialog), "path", path, (GDestroyNotify) gtk_tree_path_free);
+	
+	gtk_widget_show (dialog);
+}
+
+static void
+remove_cb (GtkWidget *button, gpointer user_data)
+{
+	VgRuleList *list = user_data;
+	GtkTreeSelection *selection;
+	GtkTreeModel *model = NULL;
+	RuleNode *node = NULL;
+	VgRule *rule = NULL;
+	GtkTreeIter iter;
+	
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list->list));
+	if (gtk_tree_selection_get_selected (selection, &model, &iter))
+		gtk_tree_model_get (model, &iter, COL_POINTER_RULE, &rule, COL_POINTER_RULE_NODE, &node, -1);
+	
+	if (rule == NULL)
+		return;
+	
+	list->changed = TRUE;
+	
+	gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
+	list_node_unlink ((ListNode *) node);
+	vg_rule_free (rule);
+	g_free (node);
+}
+
+static void
+row_activate_cb (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
+{
+	/* double-clicked on a rule, pop the rule up in an editor */
+	edit_cb (NULL, user_data);
+}
+
+static void
+selection_change_cb (GtkTreeSelection *selection, gpointer user_data)
+{
+	VgRuleList *list = user_data;
+	GtkTreeModel *model;
+	GtkTreeIter iter;
+	int state;
+	
+	state = gtk_tree_selection_get_selected (selection, &model, &iter);
+	if (state == 0)
+		gtk_widget_grab_focus (list->add);
+	
+	gtk_widget_set_sensitive (list->edit, state);
+	gtk_widget_set_sensitive (list->remove, state);
+}
+
+static void
+vg_rule_list_init (VgRuleList *list)
+{
+	GtkTreeSelection *selection;
+	GtkCellRenderer *renderer;
+	GtkWidget *hbox, *vbox;
+	GtkWidget *scrolled;
+	
+	hbox = gtk_hbox_new (FALSE, 6);
+	
+	scrolled = gtk_scrolled_window_new (NULL, NULL);
+	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+					GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled), GTK_SHADOW_IN);
+	
+	list->model = GTK_TREE_MODEL (gtk_list_store_newv (COL_LAST, col_types));
+	list->list = gtk_tree_view_new_with_model (list->model);
+	
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (list->list), -1, "",
+						     renderer, "text", 0, NULL);
+	
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list->list));
+	gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
+	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (list->list), FALSE);
+	
+	g_signal_connect (selection, "changed", G_CALLBACK (selection_change_cb), list);
+	g_signal_connect (list->list, "row-activated", G_CALLBACK (row_activate_cb), list);
+	
+	gtk_widget_show (list->list);
+	gtk_container_add (GTK_CONTAINER (scrolled), list->list);
+	
+	gtk_widget_show (scrolled);
+	gtk_box_pack_start (GTK_BOX (hbox), scrolled, TRUE, TRUE, 0);
+	
+	vbox = gtk_vbox_new (FALSE, 3);
+	
+	list->add = gtk_button_new_from_stock (GTK_STOCK_ADD);
+	g_signal_connect (list->add, "clicked", G_CALLBACK (add_cb), list);
+	gtk_widget_show (list->add);
+	gtk_box_pack_start (GTK_BOX (vbox), list->add, FALSE, FALSE, 0);
+	
+	list->edit = gtk_button_new_with_mnemonic (_("_Edit"));
+	gtk_widget_set_sensitive (list->edit, FALSE);
+	g_signal_connect (list->edit, "clicked", G_CALLBACK (edit_cb), list);
+	gtk_widget_show (list->edit);
+	gtk_box_pack_start (GTK_BOX (vbox), list->edit, FALSE, FALSE, 0);
+	
+	list->remove = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
+	gtk_widget_set_sensitive (list->remove, FALSE);
+	g_signal_connect (list->remove, "clicked", G_CALLBACK (remove_cb), list);
+	gtk_widget_show (list->remove);
+	gtk_box_pack_start (GTK_BOX (vbox), list->remove, FALSE, FALSE, 0);
+	
+	gtk_widget_show (vbox);
+	gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
+	
+	gtk_widget_show (hbox);
+	gtk_container_add (GTK_CONTAINER (list), hbox);
+	
+	/* init our data */
+	list_init (&list->rules);
+	list->changed = FALSE;
+	list->filename = NULL;
+	list->parser = NULL;
+	list->gio = NULL;
+	list->show_id = 0;
+	list->load_id = 0;
+}
+
+static void
+vg_rule_list_finalize (GObject *obj)
+{
+	VgRuleList *list = (VgRuleList *) obj;
+	RuleNode *n, *nn;
+	
+	g_free (list->filename);
+	
+	vg_rule_parser_free (list->parser);
+	
+	n = (RuleNode *) list->rules.head;
+	while (n->next != NULL) {
+		nn = n->next;
+		vg_rule_free (n->rule);
+		g_free (n);
+		n = nn;
+	}
+	
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+vg_rule_list_destroy (GtkObject *obj)
+{
+	VgRuleList *list = (VgRuleList *) obj;
+	
+	if (list->gio != NULL) {
+		g_io_channel_shutdown (list->gio, TRUE, NULL);
+		g_io_channel_unref (list->gio);
+		list->load_id = 0;
+		list->gio = NULL;
+	}
+	
+	GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+}
+
+
+static void
+load_rule_cb (VgRuleParser *parser, VgRule *rule, gpointer user_data)
+{
+	VgRuleList *list = user_data;
+	GtkTreeIter iter;
+	RuleNode *node;
+	
+	node = g_new (RuleNode, 1);
+	node->rule = rule;
+	
+	list_append_node (&list->rules, (ListNode *) node);
+	
+	gtk_list_store_append (GTK_LIST_STORE (list->model), &iter);
+	gtk_list_store_set (GTK_LIST_STORE (list->model), &iter,
+			    COL_STRING_NAME, rule->name,
+			    COL_POINTER_RULE, rule,
+			    COL_POINTER_RULE_NODE, node, -1);
+}
+
+static gboolean
+load_rules_step_cb (GIOChannel *gio, GIOCondition condition, gpointer user_data)
+{
+	VgRuleList *list = user_data;
+	
+	if ((condition & G_IO_IN) && vg_rule_parser_step (list->parser) <= 0)
+		goto disconnect;
+	
+	if (condition & G_IO_HUP)
+		goto disconnect;
+	
+	return TRUE;
+	
+ disconnect:
+	
+	vg_rule_parser_free (list->parser);
+	list->parser = NULL;
+	
+	g_io_channel_shutdown (list->gio, TRUE, NULL);
+	g_io_channel_unref (list->gio);
+	list->load_id = 0;
+	list->gio = NULL;
+	
+	return FALSE;
+}
+
+static void
+load_rules (GtkWidget *widget, gpointer user_data)
+{
+	VgRuleList *list = user_data;
+	int fd;
+	
+	list->changed = FALSE;
+	
+	if (list->show_id != 0) {
+		g_signal_handler_disconnect (list, list->show_id);
+		list->show_id = 0;
+	}
+	
+	if (list->filename == NULL)
+		return;
+	
+	if ((fd = open (list->filename, O_RDONLY)) == -1)
+		return;
+	
+	list->parser = vg_rule_parser_new (fd, load_rule_cb, list);
+	list->gio = g_io_channel_unix_new (fd);
+	list->load_id = g_io_add_watch (list->gio, G_IO_IN | G_IO_HUP, load_rules_step_cb, list);
+}
+
+
+GtkWidget *
+vg_rule_list_new (const char *filename)
+{
+	VgRuleList *list;
+	
+	list = g_object_new (VG_TYPE_RULE_LIST, NULL);
+	list->filename = g_strdup (filename);
+	
+	/* suppressions file may be large, so don't actually load it
+           until the user shows it for the first time */
+	list->show_id = g_signal_connect (list, "map", G_CALLBACK (load_rules), list);
+	
+	return GTK_WIDGET (list);
+}
+
+
+void
+vg_rule_list_set_filename (VgRuleList *list, const char *filename)
+{
+	RuleNode *n, *nn;
+	
+	g_free (list->filename);
+	list->filename = g_strdup (filename);
+	
+	if (list->show_id != 0) {
+		/* good, the user hasn't shown the dialog yet.
+		 * this means that we don't have to do anything special!
+		 */
+	} else {
+		if (list->load_id != 0) {
+			/* this means the file is currently being loaded. ugh */
+			vg_rule_parser_free (list->parser);
+			g_io_channel_shutdown (list->gio, TRUE, NULL);
+			g_io_channel_unref (list->gio);
+			list->load_id = 0;
+			list->gio = NULL;
+		}
+		
+		n = (RuleNode *) list->rules.head;
+		while (n->next != NULL) {
+			nn = n->next;
+			vg_rule_free (n->rule);
+			g_free (n);
+			n = nn;
+		}
+		
+		gtk_list_store_clear (GTK_LIST_STORE (list->model));
+		
+		if (!GTK_WIDGET_MAPPED (list))
+			list->show_id = g_signal_connect (list, "map", G_CALLBACK (load_rules), list);
+		else
+			load_rules (GTK_WIDGET (list), list);
+	}
+}
+
+
+int
+vg_rule_list_save (VgRuleList *list)
+{
+	GtkWidget *parent, *msg;
+	char *filename = NULL;
+	const char *basename;
+	RuleNode *node;
+	int fd = -1;
+	
+	/* only save if we need to... */
+	if (!list->changed)
+		return 0;
+	
+	if (list->filename == NULL)
+		goto exception;
+	
+	if (!(basename = strrchr (list->filename, '/')))
+		basename = list->filename;
+	else
+		basename++;
+	
+	filename = g_strdup_printf ("%.*s.#%s", (basename - list->filename),
+				    list->filename, basename);
+	
+	if ((fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 0666)) == -1)
+		goto exception;
+	
+	if (vg_suppressions_file_write_header (fd, "This Valgrind suppresion file was generated by Alleyoop") == -1)
+		goto exception;
+	
+	node = (RuleNode *) list->rules.head;
+	while (node->next != NULL) {
+		if (vg_suppressions_file_append_rule (fd, node->rule) == -1)
+			goto exception;
+		node = node->next;
+	}
+	
+	close (fd);
+	fd = -1;
+	
+	if (rename (filename, list->filename) == -1)
+		goto exception;
+	
+	g_free (filename);
+	
+	return 0;
+	
+ exception:
+	
+	parent = gtk_widget_get_toplevel (GTK_WIDGET (list));
+	parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
+	
+	msg = gtk_message_dialog_new (GTK_WINDOW (parent), GTK_DIALOG_MODAL,
+				      GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+				      _("Cannot save suppression rules: %s"),
+				      list->filename ? g_strerror (errno) :
+				      _("You have not set a suppressions file in your settings."));
+	
+	g_signal_connect_swapped (msg, "response", G_CALLBACK (gtk_widget_destroy), msg);
+	
+	gtk_widget_show (msg);
+	
+	if (fd != -1)
+		close (fd);
+	
+	if (filename) {
+		unlink (filename);
+		g_free (filename);
+	}
+	
+	return -1;
+}
+
+
+void
+vg_rule_list_add_rule (VgRuleList *list, const char *title, GtkWindow *parent, VgErrorSummary *summary)
+{
+	GtkWidget *dialog, *editor;
+	GConfClient *gconf;
+	
+	dialog = gtk_dialog_new_with_buttons (title, parent, GTK_DIALOG_MODAL |
+					      GTK_DIALOG_DESTROY_WITH_PARENT,
+					      GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+					      GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
+	
+	if (summary != NULL)
+		editor = vg_rule_editor_new_from_summary (summary);
+	else
+		editor = vg_rule_editor_new ();
+	
+	gtk_widget_show (editor);
+	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), editor, TRUE, TRUE, 0);
+	g_signal_connect (dialog, "response", G_CALLBACK (add_response_cb), list);
+	g_object_set_data (G_OBJECT (dialog), "editor", editor);
+	
+	if (list->filename == NULL) {
+		gconf = gconf_client_get_default ();
+		
+		// FIXME: hardcoded path
+		list->filename = anjuta_util_get_user_config_file_path ("valgrind.supp", NULL);
+		gconf_client_set_string (gconf, SUPPRESSIONS_KEY, list->filename, NULL);
+		g_object_unref (gconf);
+	}
+	
+	/* FIXME: what if the rules haven't finished loading before the user adds this rule? */
+	
+	gtk_widget_show (dialog);
+}

Added: trunk/plugins/valgrind/vgrule-list.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgrule-list.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,95 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __VG_RULE_LIST_H__
+#define __VG_RULE_LIST_H__
+
+#include <gtk/gtk.h>
+
+#include "vgrule-editor.h"
+
+#include "list.h"
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+#define VG_TYPE_RULE_LIST            (vg_rule_list_get_type ())
+#define VG_RULE_LIST(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), VG_TYPE_RULE_LIST, VgRuleList))
+#define VG_RULE_LIST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), VG_TYPE_RULE_LIST, VgRuleListClass))
+#define IS_VG_RULE_LIST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VG_TYPE_RULE_LIST))
+#define IS_VG_RULE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VG_TYPE_RULE_LIST))
+#define VG_RULE_LIST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), VG_TYPE_RULE_LIST, VgRuleListClass))
+
+typedef struct _VgRuleList VgRuleList;
+typedef struct _VgRuleListClass VgRuleListClass;
+
+struct _VgRuleList {
+	GtkVBox parent_object;
+	
+	GtkTreeModel *model;
+	GtkWidget *list;
+	
+	List rules;
+	
+	GtkWidget *add;
+	GtkWidget *edit;
+	GtkWidget *remove;
+	
+	char *filename;
+	VgRuleParser *parser;
+	GIOChannel *gio;
+	guint show_id;
+	guint load_id;
+	
+	gboolean changed;
+};
+
+struct _VgRuleListClass {
+	GtkVBoxClass parent_class;
+	
+	/* signals */
+	
+	void (* rule_added) (VgRuleList *list, VgRule *rule);
+};
+
+GType vg_rule_list_get_type (void);
+GType vg_rule_list_get_class (void);
+
+GtkWidget *vg_rule_list_new (const char *filename);
+
+void vg_rule_list_set_filename (VgRuleList *list, const char *filename);
+
+int vg_rule_list_save (VgRuleList *list);
+
+
+/* interface to get add a rule from another window */
+void vg_rule_list_add_rule (VgRuleList *list, const char *title, GtkWindow *parent,
+			    VgErrorSummary *summary);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __VG_RULE_LIST__ */

Added: trunk/plugins/valgrind/vgrule.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgrule.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,700 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <ctype.h>
+
+#include "vgstrpool.h"
+#include "vgrule.h"
+#include "vgio.h"
+
+
+static const char *vg_caller_types[] = { "fun", "obj", NULL };
+
+
+const char *
+vg_caller_type_to_name (vgcaller_t type)
+{
+	return vg_caller_types[type];
+}
+
+
+vgcaller_t
+vg_caller_type_from_name (const char *name)
+{
+	int i;
+	
+	for (i = 0; i < VG_CALLER_LAST; i++) {
+		if (!strcmp (vg_caller_types[i], name))
+			break;
+	}
+	
+	return i;
+}
+
+
+VgCaller *
+vg_caller_new (vgcaller_t type, const char *name)
+{
+	VgCaller *caller;
+	
+	caller = g_new (VgCaller, 1);
+	caller->next = NULL;
+	caller->type = type;
+	caller->name = g_strdup (name);
+	
+	return caller;
+}
+
+
+void
+vg_caller_free (VgCaller *caller)
+{
+	if (caller == NULL)
+		return;
+	
+	g_free (caller->name);
+	g_free (caller);
+}
+
+
+static const char *vg_rule_types[] = {
+	"Addr1", "Addr2", "Addr4", "Addr8", "Cond", "Free", "Leak",
+	"Param", "PThread", "Value1", "Value2", "Value4", "Value8", NULL
+};
+
+
+const char *
+vg_rule_type_to_name (vgrule_t type)
+{
+	return vg_rule_types[type];
+}
+
+
+vgrule_t
+vg_rule_type_from_name (const char *name)
+{
+	int i;
+	
+	for (i = 0; i < VG_RULE_LAST; i++) {
+		if (!strcmp (vg_rule_types[i], name))
+			break;
+	}
+	
+	return i;
+}
+
+
+int
+vg_rule_type_from_report (const char *report, vgrule_t *type, char **syscall)
+{
+	const char *inptr, *call;
+	unsigned int size;
+	char *end;
+	
+	if (syscall)
+		*syscall = NULL;
+	
+	/* FIXME: How can we auto-detect PThread errors? */
+	if (!strncmp (report, "Conditional ", 12)) {
+		*type = VG_RULE_COND;
+		return TRUE;
+	} else if (!strncmp (report, "Syscall param ", 14)) {
+		*type = VG_RULE_PARAM;
+		
+		if (syscall) {
+			call = report + 14;
+			if ((inptr = strchr (call, ' ')) != NULL)
+				*syscall = g_strndup (call, (inptr - call));
+		}
+		
+		return TRUE;
+	} else if (!strcmp (report, "Invalid free() / delete / delete[]")) {
+		*type = VG_RULE_FREE;
+		return TRUE;
+	} else if ((inptr = strstr (report, " are still reachable in loss record "))) {
+		*type = VG_RULE_LEAK;
+		return TRUE;
+	} else if (!strncmp (report, "Invalid read of size ", 21)) {
+		inptr = report + 21;
+		size = strtoul (inptr, &end, 10);
+		switch (size) {
+		case 1:
+			*type = VG_RULE_ADDR1;
+			break;
+		case 2:
+			*type = VG_RULE_ADDR2;
+			break;
+		case 4:
+			*type = VG_RULE_ADDR4;
+			break;
+		case 8:
+			*type = VG_RULE_ADDR8;
+			break;
+		default:
+			return FALSE;
+		}
+		
+		return TRUE;
+	} else if ((inptr = strstr (report, "value of size "))) {
+		/* only reason we strstr here instead of strncmp'ing
+		 * against "Use of uninitialised value of size " is
+		 * that someone may eventually convince the valgrind
+		 * authors to use the Americanised spelling and then
+		 * our strncmp would fail */
+		inptr += 14;
+		size = strtoul (inptr, &end, 10);
+		switch (size) {
+		case 1:
+			*type = VG_RULE_VALUE1;
+			break;
+		case 2:
+			*type = VG_RULE_VALUE2;
+			break;
+		case 4:
+			*type = VG_RULE_VALUE4;
+			break;
+		case 8:
+			*type = VG_RULE_VALUE8;
+			break;
+		default:
+			return FALSE;
+		}
+		
+		return TRUE;
+	}
+	
+	return FALSE;
+}
+
+
+VgRule *
+vg_rule_new (vgrule_t type, const char *name)
+{
+	VgRule *rule;
+	
+	rule = g_new (VgRule, 1);
+	rule->name = g_strdup (name);
+	rule->tools = NULL;
+	rule->type = type;
+	rule->syscall = NULL;
+	rule->callers = NULL;
+	
+	return rule;
+}
+
+
+static VgTool *
+parse_tool_list (unsigned char *tool_list)
+{
+	VgTool *tail, *n, *list = NULL;
+	register unsigned char *inptr;
+	unsigned char *start;
+	
+	tail = (VgTool *) &list;
+	
+	start = inptr = tool_list;
+	while (*inptr) {
+		while (*inptr && *inptr != ',')
+			inptr++;
+		
+		if (*inptr == ',')
+			*inptr++ = '\0';
+		
+		n = g_new (VgTool, 1);
+		n->next = NULL;
+		n->name = vg_strdup ((char *)start);
+		
+		tail->next = n;
+		tail = n;
+		
+		start = inptr;
+	}
+	
+	return list;
+}
+
+
+void
+vg_rule_add_tool (VgRule *rule, const char *tool)
+{
+	VgTool *tail, *n;
+	
+	n = g_new (VgTool, 1);
+	n->next = NULL;
+	n->name = vg_strdup (tool);
+	
+	tail = (VgTool *) &rule->tools;
+	while (tail->next != NULL)
+		tail = tail->next;
+	
+	tail->next = n;
+}
+
+
+void
+vg_rule_free (VgRule *rule)
+{
+	VgCaller *n, *nn;
+	VgTool *s, *sn;
+	
+	if (rule == NULL)
+		return;
+	
+	g_free (rule->name);
+	g_free (rule->syscall);
+	
+	s = rule->tools;
+	while (s != NULL) {
+		sn = s->next;
+		vg_strfree (s->name);
+		g_free (s);
+		s = sn;
+	}
+	
+	n = rule->callers;
+	while (n != NULL) {
+		nn = n->next;
+		vg_caller_free (n);
+		n = nn;
+	}
+	
+	g_free (rule);
+}
+
+
+enum {
+	VG_RULE_PARSER_STATE_INIT         = 0,
+	VG_RULE_PARSER_STATE_COMMENT      = (1 << 0),
+	VG_RULE_PARSER_STATE_RULE_NAME    = (1 << 1),
+	VG_RULE_PARSER_STATE_RULE_TYPE    = (1 << 2),
+	VG_RULE_PARSER_STATE_RULE_SYSCALL = (1 << 3),
+	VG_RULE_PARSER_STATE_RULE_CALLER  = (1 << 4),
+};
+
+VgRuleParser *
+vg_rule_parser_new (int fd, VgRuleParserRuleCallback rule_cb, void *user_data)
+{
+	VgRuleParser *parser;
+	
+	parser = g_new (VgRuleParser, 1);
+	parser_init ((Parser *) parser, fd);
+	
+	parser->linebuf = g_malloc (128);
+	parser->lineptr = parser->linebuf;
+	parser->lineleft = 128;
+	
+	parser->current = NULL;
+	parser->tail = NULL;
+	
+	parser->rule_cb = rule_cb;
+	parser->user_data = user_data;
+	
+	parser->state = VG_RULE_PARSER_STATE_INIT;
+	
+	return parser;
+}
+
+void
+vg_rule_parser_free (VgRuleParser *parser)
+{
+	if (parser == NULL)
+		return;
+	
+	g_free (parser->linebuf);
+	g_free (parser);
+}
+
+
+#define backup_linebuf(parser, start, len) G_STMT_START {                 \
+	if (parser->lineleft <= len) {                                    \
+		unsigned int llen, loff;                                  \
+		                                                          \
+		llen = loff = parser->lineptr - parser->linebuf;          \
+		llen = llen ? llen : 1;                                   \
+		                                                          \
+		while (llen < (loff + len + 1))                           \
+			llen <<= 1;                                       \
+		                                                          \
+		parser->linebuf = g_realloc (parser->linebuf, llen);      \
+		parser->lineptr = parser->linebuf + loff;                 \
+		parser->lineleft = llen - loff;                           \
+	}                                                                 \
+	                                                                  \
+	memcpy (parser->lineptr, start, len);                             \
+	parser->lineptr += len;                                           \
+	parser->lineleft -= len;                                          \
+} G_STMT_END
+
+static void
+vg_parser_parse_caller (VgRuleParser *parser)
+{
+	register unsigned char *inptr;
+	VgCaller *caller;
+	vgcaller_t type;
+	
+	*parser->lineptr = ':';
+	inptr = parser->linebuf;
+	while (*inptr != ':')
+		inptr++;
+	
+	if (inptr == parser->lineptr) {
+		*parser->lineptr = '\0';
+		fprintf (stderr, "Invalid caller field encountered: '%s'\n", parser->linebuf);
+		return;
+	}
+	
+	*inptr++ = '\0';
+	if ((type = vg_caller_type_from_name ((char *)parser->linebuf)) == VG_CALLER_LAST) {
+		fprintf (stderr, "Invalid caller type encountered: '%s'\n", parser->linebuf);
+		return;
+	}
+	
+	*parser->lineptr = '\0';
+	caller = vg_caller_new (type, (char *)inptr);
+	
+	parser->tail->next = caller;
+	parser->tail = caller;
+}
+
+int
+vg_rule_parser_step (VgRuleParser *parser)
+{
+	register unsigned char *inptr;
+	unsigned char *start;
+	Parser *priv;
+	int ret;
+	
+	priv = (Parser *) parser;
+	
+	if ((ret = parser_fill (priv)) == 0) {
+		return 0;
+	} else if (ret == -1) {
+		return -1;
+	}
+	
+	start = inptr = priv->inptr;
+	*priv->inend = '\n';
+	
+	while (inptr < priv->inend) {
+		if (parser->state == VG_RULE_PARSER_STATE_INIT) {
+			if (*inptr == '#') {
+				parser->state = VG_RULE_PARSER_STATE_COMMENT;
+				inptr++;
+			} else if (*inptr == '{') {
+				parser->state = VG_RULE_PARSER_STATE_RULE_NAME;
+				parser->current = vg_rule_new (0, NULL);
+				parser->tail = (VgCaller *) &parser->current->callers;
+				inptr++;
+			} else {
+				/* eat any whitespace?? */
+				while (*inptr == ' ' || *inptr == '\t')
+					inptr++;
+				
+				if (*inptr == '#' || *inptr == '{')
+					continue;
+				
+				/* unknown, skip this line??? */
+				*priv->inend = '\n';
+				while (*inptr != '\n')
+					inptr++;
+				
+				if (inptr == priv->inend)
+					break;
+				
+				inptr++;
+				
+				continue;
+			}
+		}
+		
+	comment:
+		if (parser->state & VG_RULE_PARSER_STATE_COMMENT) {
+			/* eat this line... in the future we may want to save comment lines? */
+			*priv->inend = '\n';
+			while (*inptr != '\n')
+				inptr++;
+			
+			if (inptr == priv->inend)
+				break;
+			
+			inptr++;
+			
+			parser->state &= ~VG_RULE_PARSER_STATE_COMMENT;
+			
+			if (parser->state == VG_RULE_PARSER_STATE_INIT)
+				continue;
+		}
+		
+		if (parser->lineptr == parser->linebuf) {
+			/* haven't come to the start of the actual rule data line yet */
+			
+			/* eat lwsp */
+			*priv->inend = '\0';
+			while (isspace ((int) *inptr))
+				inptr++;
+			
+			if (inptr == priv->inend)
+				break;
+			
+			if (*inptr == '#') {
+				/* comment within the rule brackets */
+				parser->state |= VG_RULE_PARSER_STATE_COMMENT;
+				inptr++;
+				
+				goto comment;
+			}
+		}
+		
+		if (*inptr == '}') {
+			inptr++;
+			
+			if (parser->state == VG_RULE_PARSER_STATE_RULE_CALLER) {
+				parser->rule_cb (parser, parser->current, parser->user_data);
+			} else {
+				fprintf (stderr, "Encountered unexpected '}'\n");
+				vg_rule_free (parser->current);
+			}
+			
+			parser->state = VG_RULE_PARSER_STATE_INIT;
+			
+			parser->current = NULL;
+			parser->tail = NULL;
+			
+			parser->lineleft += (parser->lineptr - parser->linebuf);
+			parser->lineptr = parser->linebuf;
+			
+			continue;
+		}
+		
+		*priv->inend = '\n';
+		start = inptr;
+		while (*inptr != '\n')
+			inptr++;
+		
+		backup_linebuf (parser, start, (inptr - start));
+		
+		if (inptr == priv->inend)
+			break;
+		
+		switch (parser->state) {
+		case VG_RULE_PARSER_STATE_RULE_NAME:
+			*parser->lineptr = '\0';
+			parser->current->name = g_strdup ((char *)parser->linebuf);
+			parser->state = VG_RULE_PARSER_STATE_RULE_TYPE;
+			break;
+		case VG_RULE_PARSER_STATE_RULE_TYPE:
+			/* The newer valgrind (1.9.5) suppression format contains
+			 * a list of tool names preceeding the suppression type:
+			 *
+			 * Memcheck,Addrcheck:Param
+			 *
+			 * The older format (1.0.x) contained just the type name.
+			 */
+			
+			/* trim tailing whitespc */
+			start = parser->lineptr - 1;
+			while (start > parser->linebuf && isspace ((int) *start))
+				start--;
+			
+			start[1] = '\0';
+			
+			/* does this suppression rule contain a list
+                           of tools that it is meant for? */
+			while (start > parser->linebuf && *start != ':')
+				start--;
+			
+			if (*start == ':') {
+				/* why yes, yes it does... */
+				*start++ = '\0';
+				parser->current->tools = parse_tool_list (parser->linebuf);
+			}
+			
+			parser->current->type = vg_rule_type_from_name ((char *)start);
+			g_assert (parser->current->type != VG_RULE_LAST);
+			if (parser->current->type == VG_RULE_PARAM)
+				parser->state = VG_RULE_PARSER_STATE_RULE_SYSCALL;
+			else
+				parser->state = VG_RULE_PARSER_STATE_RULE_CALLER;
+			break;
+		case VG_RULE_PARSER_STATE_RULE_SYSCALL:
+			parser->current->syscall = g_strndup ((char *)start, (inptr - start));
+			parser->state = VG_RULE_PARSER_STATE_RULE_CALLER;
+			break;
+		case VG_RULE_PARSER_STATE_RULE_CALLER:
+			vg_parser_parse_caller (parser);
+			break;
+		}
+		
+		parser->lineleft += (parser->lineptr - parser->linebuf);
+		parser->lineptr = parser->linebuf;
+		
+		inptr++;
+	}
+	
+	priv->inptr = inptr;
+	
+	return 1;
+}
+
+
+void
+vg_rule_parser_flush (VgRuleParser *parser)
+{
+	;
+}
+
+
+int
+vg_suppressions_file_write_header (int fd, const char *summary)
+{
+	GString *string;
+	
+	string = g_string_new ("##----------------------------------------------------------------------##\n\n");
+	g_string_append (string, "# ");
+	g_string_append (string, summary);
+	g_string_append (string, "\n\n");
+	
+	/* format specification header */
+	g_string_append (string, "# Format of this file is:\n");
+	g_string_append (string, "# {\n");
+	g_string_append (string, "#     name_of_suppression\n");
+	g_string_append (string, "#     tool_name:supp_kind\n");
+	g_string_append (string, "#     (optional extra info for some suppression types)\n");
+	g_string_append (string, "#     caller0 name, or /name/of/so/file.so\n");
+	g_string_append (string, "#     caller1 name, or ditto\n");
+	g_string_append (string, "#     (optionally: caller2 name)\n");
+	g_string_append (string, "#     (optionally: caller3 name)\n");
+	g_string_append (string, "# }\n");
+	g_string_append (string, "#\n");
+	g_string_append (string, "# For Memcheck, the supp_kinds are:\n");
+	g_string_append (string, "#\n");
+	g_string_append (string, "#     Param Value1 Value2 Value4 Value8\n");
+	g_string_append (string, "#     Free Addr1 Addr2 Addr4 Addr8 Leak\n");
+	g_string_append (string, "#     Cond (previously known as Value0)\n");
+	g_string_append (string, "#\n");
+	g_string_append (string, "# and the optional extra info is:\n");
+	g_string_append (string, "#     if Param: name of system call param\n");
+	g_string_append (string, "#     if Free: name of free-ing fn)\n\n");
+	
+	if (vg_write (fd, string->str, string->len) == -1) {
+		g_string_free (string, TRUE);
+		return -1;
+	}
+	
+	g_string_free (string, TRUE);
+	
+	return 0;
+}
+
+
+int
+vg_suppressions_file_append_rule (int fd, VgRule *rule)
+{
+	GString *string;
+	VgCaller *caller;
+	VgTool *tool;
+	
+	string = g_string_new ("{\n   ");
+	g_string_append (string, rule->name);
+	g_string_append (string, "\n   ");
+	
+	tool = rule->tools;
+	if (tool != NULL) {
+		while (tool != NULL) {
+			g_string_append (string, tool->name);
+			if (tool->next)
+				g_string_append_c (string, ',');
+			tool = tool->next;
+		}
+		
+		g_string_append_c (string, ':');
+	}
+	
+	g_string_append (string, vg_rule_types[rule->type]);
+	
+	if (rule->type == VG_RULE_PARAM) {
+		g_string_append (string, "\n   ");
+		g_string_append (string, rule->syscall);
+	}
+	
+	caller = rule->callers;
+	while (caller != NULL) {
+		g_string_append_printf (string, "\n   %s:%s", vg_caller_types[caller->type], caller->name);
+		caller = caller->next;
+	}
+	
+	g_string_append (string, "\n}\n");
+	
+	if (vg_write (fd, string->str, string->len) == -1) {
+		g_string_free (string, TRUE);
+		return -1;
+	}
+	
+	g_string_free (string, TRUE);
+	
+	return 0;
+}
+
+
+#if TEST
+static void
+my_rule_cb (VgRuleParser *parser, VgRule *rule, void *user_data)
+{
+	vg_suppressions_file_append_rule (1, rule);
+}
+
+int main (int argc, char **argv)
+{
+	VgRuleParser *parser;
+	int fd;
+	
+	if ((fd = open (argv[1], O_RDONLY)) == -1)
+		return 0;
+	
+	vg_suppressions_file_write_header (1, "Errors to suppress by default for glibc 2.1.3");
+	
+	parser = vg_rule_parser_new (fd, my_rule_cb, NULL);
+	
+	while (vg_rule_parser_step (parser) > 0)
+		;
+	
+	vg_rule_parser_free (parser);
+	
+	close (fd);
+	
+	return 0;
+}
+#endif

Added: trunk/plugins/valgrind/vgrule.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgrule.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,127 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __VG_RULE_H__
+#define __VG_RULE_H__
+
+#include "parser.h"
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+
+typedef enum {
+	VG_CALLER_FUNCTION,
+	VG_CALLER_OBJECT,
+	VG_CALLER_LAST
+} vgcaller_t;
+
+typedef struct _VgCaller {
+	struct _VgCaller *next;
+	vgcaller_t type;
+	char *name;
+} VgCaller;
+
+typedef struct _VgTool {
+	struct _VgTool *next;
+	char *name;
+} VgTool;
+
+typedef enum {
+	VG_RULE_ADDR1,
+	VG_RULE_ADDR2,
+	VG_RULE_ADDR4,
+	VG_RULE_ADDR8,
+	VG_RULE_COND,
+	VG_RULE_FREE,
+	VG_RULE_LEAK,
+	VG_RULE_PARAM,
+	VG_RULE_PTHREAD,
+	VG_RULE_VALUE1,
+	VG_RULE_VALUE2,
+	VG_RULE_VALUE4,
+	VG_RULE_VALUE8,
+	VG_RULE_LAST
+} vgrule_t;
+
+typedef struct _VgRule {
+	char *name;
+	VgTool *tools;
+	vgrule_t type;
+	char *syscall;
+	VgCaller *callers;
+} VgRule;
+
+const char *vg_caller_type_to_name (vgcaller_t type);
+vgcaller_t vg_caller_type_from_name (const char *name);
+
+VgCaller *vg_caller_new (vgcaller_t type, const char *name);
+void vg_caller_free (VgCaller *caller);
+
+const char *vg_rule_type_to_name (vgrule_t type);
+vgrule_t vg_rule_type_from_name (const char *name);
+
+int vg_rule_type_from_report (const char *report, vgrule_t *type, char **syscall);
+
+VgRule *vg_rule_new (vgrule_t type, const char *name);
+void vg_rule_add_tool (VgRule *rule, const char *tool);
+void vg_rule_free (VgRule *rule);
+
+
+typedef struct _VgRuleParser VgRuleParser;
+
+typedef void (* VgRuleParserRuleCallback) (VgRuleParser *parser, VgRule *rule, void *user_data);
+
+struct _VgRuleParser {
+	Parser parser;
+	
+	unsigned char *linebuf;
+	unsigned char *lineptr;
+	unsigned int lineleft;
+	
+	VgRule *current;
+	VgCaller *tail;
+	
+	VgRuleParserRuleCallback rule_cb;
+	void *user_data;
+	
+	int state;
+};
+
+
+VgRuleParser *vg_rule_parser_new (int fd, VgRuleParserRuleCallback rule_cb, void *user_data);
+void vg_rule_parser_free (VgRuleParser *parser);
+
+int vg_rule_parser_step (VgRuleParser *parser);
+void vg_rule_parser_flush (VgRuleParser *parser);
+
+int vg_suppressions_file_write_header (int fd, const char *summary);
+int vg_suppressions_file_append_rule (int fd, VgRule *rule);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __VG_RULE_H__ */

Added: trunk/plugins/valgrind/vgrulepattern.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgrulepattern.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,139 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <sys/types.h>
+#include <regex.h>
+
+#include "vgrulepattern.h"
+
+struct _VgRulePattern {
+	GPtrArray *patterns;
+	vgrule_t type;
+	char *syscall;
+};
+
+
+VgRulePattern *
+vg_rule_pattern_new (VgRule *rule)
+{
+	VgRulePattern *pat;
+	VgCaller *c;
+	
+	pat = g_new (VgRulePattern, 1);
+	pat->patterns = g_ptr_array_new ();
+	pat->type = rule->type;
+	pat->syscall = g_strdup (rule->syscall);
+	
+	c = rule->callers;
+	while (c != NULL) {
+		regex_t *regex;
+		
+		regex = g_new (regex_t, 1);
+		
+		if (regcomp (regex, c->name, REG_EXTENDED | REG_NOSUB) != 0) {
+			g_free (regex);
+			break;
+		}
+		
+		g_ptr_array_add (pat->patterns, regex);
+		
+		c = c->next;
+	}
+	
+	return pat;
+}
+
+
+void
+vg_rule_pattern_free (VgRulePattern *pat)
+{
+	int i;
+	
+	if (pat == NULL)
+		return;
+	
+	for (i = 0; i < pat->patterns->len; i++) {
+		regex_t *regex = pat->patterns->pdata[i];
+		
+		regfree (regex);
+		g_free (regex);
+	}
+	
+	g_ptr_array_free (pat->patterns, TRUE);
+	g_free (pat->syscall);
+	g_free (pat);
+}
+
+
+gboolean
+vg_rule_pattern_matches (VgRulePattern *pat, VgError *err)
+{
+	VgErrorStack *s = err->summary->frames;
+	vgrule_t type;
+	int i;
+	
+	if (s == NULL)
+		return FALSE;
+	
+	if (!vg_rule_type_from_report (err->summary->report, &type, NULL) || type != pat->type)
+		return FALSE;
+	
+	if (pat->type == VG_RULE_PARAM) {
+		const char *syscall;
+		int n;
+		
+		syscall = err->summary->report + 14;
+		n = strcspn (syscall, " ");
+		
+		if (n != strlen (pat->syscall) || strncmp (pat->syscall, syscall, n) != 0)
+			return FALSE;
+	}
+	
+	for (i = 0; s != NULL && i < pat->patterns->len; i++) {
+		regex_t *regex = pat->patterns->pdata[i];
+		const char *str;
+		
+		if (s->symbol) {
+			str = s->symbol;
+		} else if (s->type == VG_STACK_OBJECT) {
+			str = s->info.object;
+		} else {
+			return FALSE;
+		}
+		
+		if (regexec (regex, str, 0, NULL, 0) != 0)
+			return FALSE;
+		
+		s = s->next;
+	}
+	
+	if (i == pat->patterns->len)
+		return TRUE;
+	
+	return FALSE;
+}

Added: trunk/plugins/valgrind/vgrulepattern.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgrulepattern.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,46 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __VG_RULE_PATTERN_H__
+#define __VG_RULE_PATTERN_H__
+
+#include "vgrule.h"
+#include "vgerror.h"
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+typedef struct _VgRulePattern VgRulePattern;
+
+VgRulePattern *vg_rule_pattern_new (VgRule *rule);
+void vg_rule_pattern_free (VgRulePattern *pat);
+
+gboolean vg_rule_pattern_matches (VgRulePattern *pat, VgError *err);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __VG_RULE_PATTERN_H__ */

Added: trunk/plugins/valgrind/vgsearchbar.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgsearchbar.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,231 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib/gi18n.h>
+
+#include "vgsearchbar.h"
+#include "vgmarshal.h"
+
+enum {
+	SEARCH,
+	CLEAR,
+	LAST_SIGNAL
+};
+
+enum {
+  COLUMN_STRING,
+  COLUMN_INT,
+  N_COLUMNS
+};
+
+static int search_bar_signals[LAST_SIGNAL] = { 0, };
+
+
+static void vg_search_bar_class_init (VgSearchBarClass *klass);
+static void vg_search_bar_init (VgSearchBar *bar);
+static void vg_search_bar_destroy (GtkObject *obj);
+static void vg_search_bar_finalize (GObject *obj);
+
+static void search_bar_set_menu_items (VgSearchBar *bar, VgSearchBarItem *items);
+
+
+static GtkHBoxClass *parent_class = NULL;
+
+
+GType
+vg_search_bar_get_type (void)
+{
+	static GType type = 0;
+	
+	if (!type) {
+		static const GTypeInfo info = {
+			sizeof (VgSearchBarClass),
+			NULL, /* base_class_init */
+			NULL, /* base_class_finalize */
+			(GClassInitFunc) vg_search_bar_class_init,
+			NULL, /* class_finalize */
+			NULL, /* class_data */
+			sizeof (VgSearchBar),
+			0,    /* n_preallocs */
+			(GInstanceInitFunc) vg_search_bar_init,
+		};
+		
+		type = g_type_register_static (GTK_TYPE_HBOX, "VgSearchBar", &info, 0);
+	}
+	
+	return type;
+}
+
+static void
+vg_search_bar_class_init (VgSearchBarClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
+	
+	parent_class = g_type_class_ref (GTK_TYPE_VBOX);
+	
+	object_class->finalize = vg_search_bar_finalize;
+	gtk_object_class->destroy = vg_search_bar_destroy;
+	
+	/* virtual methods */
+	klass->set_menu_items = search_bar_set_menu_items;
+	
+	/* signals */
+	search_bar_signals[SEARCH] =
+		g_signal_new ("search",
+			      G_OBJECT_CLASS_TYPE (object_class),
+			      G_SIGNAL_RUN_LAST,
+			      G_STRUCT_OFFSET (VgSearchBarClass, search),
+			      NULL, NULL,
+			      vg_marshal_NONE__INT,
+			      G_TYPE_NONE, 1, G_TYPE_INT);
+	
+	search_bar_signals[CLEAR] =
+		g_signal_new ("clear",
+			      G_OBJECT_CLASS_TYPE (object_class),
+			      G_SIGNAL_RUN_LAST,
+			      G_STRUCT_OFFSET (VgSearchBarClass, clear),
+			      NULL, NULL,
+			      vg_marshal_NONE__NONE,
+			      G_TYPE_NONE, 0);
+}
+
+
+static void
+entry_activate (GtkEntry *entry, VgSearchBar *bar)
+{
+	g_signal_emit (bar, search_bar_signals[SEARCH], 0, bar->item_id);
+}
+
+static void
+clear_clicked (GtkWidget *widget, VgSearchBar *bar)
+{
+	gtk_entry_set_text (bar->entry, "");
+	gtk_combo_box_set_active (bar->menu, 0);
+	g_signal_emit (bar, search_bar_signals[CLEAR], 0);
+}
+
+static void
+vg_search_bar_init (VgSearchBar *bar)
+{
+	GtkWidget *widget;
+	
+	gtk_box_set_spacing (GTK_BOX(bar), 6);
+	
+	bar->item_id = -1;
+	
+	bar->menu = GTK_COMBO_BOX (widget = gtk_combo_box_new ());
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (bar), widget, FALSE, FALSE, 0);
+	
+	bar->entry = GTK_ENTRY (widget = gtk_entry_new ());
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (bar), widget, TRUE, TRUE, 0);
+	g_signal_connect (bar->entry, "activate", G_CALLBACK (entry_activate), bar);
+	
+	bar->clear = widget = gtk_button_new_from_stock (GTK_STOCK_CLEAR);
+	gtk_widget_show (widget);
+	gtk_box_pack_start (GTK_BOX (bar), widget, FALSE, FALSE, 0);
+	g_signal_connect (bar->clear, "clicked", G_CALLBACK (clear_clicked), bar);
+}
+
+static void
+vg_search_bar_finalize (GObject *obj)
+{
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+vg_search_bar_destroy (GtkObject *obj)
+{
+	GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+}
+
+
+GtkWidget *
+vg_search_bar_new (void)
+{
+	return g_object_new (VG_TYPE_SEARCH_BAR, NULL);
+}
+
+
+static void
+item_activate (GtkComboBox *widget, VgSearchBar *bar)
+{
+	GtkTreeIter iter;
+
+	gtk_combo_box_get_active_iter (widget, &iter);
+	gtk_tree_model_get (gtk_combo_box_get_model (widget), &iter, 1, &bar->item_id, -1);
+}
+
+static void
+search_bar_set_menu_items (VgSearchBar *bar, VgSearchBarItem *items)
+{
+	GtkTreeIter iter;
+	GtkCellRenderer *cell;
+	GtkListStore *list_store;
+	int i;
+
+	g_return_if_fail (VG_IS_SEARCH_BAR (bar));
+	g_return_if_fail (items != NULL);
+
+	list_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_INT);
+
+	bar->item_id = items->id;
+
+	for (i = 0; items[i].label != NULL; i++) {
+		gtk_list_store_append (list_store, &iter);
+		gtk_list_store_set (list_store, &iter, COLUMN_STRING, _(items[i].label), COLUMN_INT, items[i].id, -1);
+	}
+	
+	gtk_combo_box_set_model (bar->menu, GTK_TREE_MODEL (list_store));
+
+	cell = gtk_cell_renderer_text_new();
+	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(bar->menu), cell, TRUE);
+	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(bar->menu), cell, "text", 0, NULL);
+
+	g_signal_connect (bar->menu, "changed", G_CALLBACK (item_activate), bar);
+	gtk_combo_box_set_active (bar->menu, 0);
+}
+
+
+void
+vg_search_bar_set_menu_items (VgSearchBar *bar, VgSearchBarItem *items)
+{
+	g_return_if_fail (VG_IS_SEARCH_BAR (bar));
+	g_return_if_fail (items != NULL);
+	
+	VG_SEARCH_BAR_GET_CLASS (bar)->set_menu_items (bar, items);
+}
+
+const char *
+vg_search_bar_get_text (VgSearchBar *bar)
+{
+	g_return_val_if_fail (VG_IS_SEARCH_BAR (bar), NULL);
+	
+	return gtk_entry_get_text (bar->entry);
+}

Added: trunk/plugins/valgrind/vgsearchbar.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgsearchbar.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,83 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __VG_SEARCH_BAR_H__
+#define __VG_SEARCH_BAR_H__
+
+#include <gtk/gtk.h>
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+#define VG_TYPE_SEARCH_BAR            (vg_search_bar_get_type ())
+#define VG_SEARCH_BAR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), VG_TYPE_SEARCH_BAR, VgSearchBar))
+#define VG_SEARCH_BAR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), VG_TYPE_SEARCH_BAR, VgSearchBarClass))
+#define VG_IS_SEARCH_BAR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VG_TYPE_SEARCH_BAR))
+#define VG_IS_SEARCH_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VG_TYPE_SEARCH_BAR))
+#define VG_SEARCH_BAR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), VG_TYPE_SEARCH_BAR, VgSearchBarClass))
+
+typedef struct _VgSearchBar VgSearchBar;
+typedef struct _VgSearchBarClass VgSearchBarClass;
+
+typedef struct _VgSearchBarItem {
+	const char *label;
+	int id;
+} VgSearchBarItem;
+
+struct _VgSearchBar {
+	GtkHBox parent_object;
+	
+	GtkComboBox *menu;
+	GtkEntry *entry;
+	GtkWidget *clear;
+	
+	int item_id;
+};
+
+struct _VgSearchBarClass {
+	GtkHBoxClass parent_class;
+	
+	/* virtual methods */
+	void (* set_menu_items) (VgSearchBar *bar, VgSearchBarItem *items);
+	
+	/* signals */
+	void (* search)         (VgSearchBar *bar, int item_id);
+	void (* clear)          (VgSearchBar *bar);
+};
+
+
+GType vg_search_bar_get_type (void);
+
+GtkWidget *vg_search_bar_new (void);
+
+void vg_search_bar_set_menu_items (VgSearchBar *bar, VgSearchBarItem *items);
+
+const char *vg_search_bar_get_text (VgSearchBar *bar);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __VG_SEARCH_BAR_H__ */

Added: trunk/plugins/valgrind/vgstrpool.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgstrpool.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,146 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "vgstrpool.h"
+
+
+#ifdef ENABLE_STRPOOL
+
+struct _VgStrpoolNode {
+	unsigned int ref_count;
+	char *str;
+};
+
+static GHashTable *strpool = NULL;
+
+
+void
+vg_strpool_init (void)
+{
+	if (strpool != NULL)
+		return;
+	
+	strpool = g_hash_table_new (g_str_hash, g_str_equal);
+}
+
+
+static void
+strpool_foreach (gpointer key, gpointer val, gpointer user_data)
+{
+	struct _VgStrpoolNode *node = val;
+	
+	g_free (node->str);
+	g_free (node);
+}
+
+
+void
+vg_strpool_shutdown (void)
+{
+	if (strpool == NULL)
+		return;
+	
+	g_hash_table_foreach (strpool, strpool_foreach, NULL);
+	g_hash_table_destroy (strpool);
+	strpool = NULL;
+}
+
+
+char *
+vg_strpool_add (char *string, int own)
+{
+	struct _VgStrpoolNode *node;
+	
+	g_return_val_if_fail (strpool != NULL, string);
+	g_return_val_if_fail (string != NULL, NULL);
+	
+	if (!(node = g_hash_table_lookup (strpool, string))) {
+		node = g_new (struct _VgStrpoolNode, 1);
+		node->ref_count = 0;
+		node->str = own ? string : g_strdup (string);
+		
+		g_hash_table_insert (strpool, node->str, node);
+	} else if (own) {
+		g_free (string);
+	}
+	
+	node->ref_count++;
+	
+	return node->str;
+}
+
+
+char *
+vg_strdup (const char *string)
+{
+	if (string == NULL)
+		return NULL;
+	
+	return vg_strpool_add ((char *) string, FALSE);
+}
+
+
+char *
+vg_strndup (const char *string, size_t n)
+{
+	char *str;
+	
+	if (string == NULL)
+		return NULL;
+	
+	str = g_strndup (string, n);
+	
+	return vg_strpool_add (str, TRUE);
+}
+
+
+void
+vg_strfree (char *string)
+{
+	struct _VgStrpoolNode *node;
+	
+	g_return_if_fail (strpool != NULL);
+	
+	if (string == NULL)
+		return;
+	
+	if (!(node = g_hash_table_lookup (strpool, string))) {
+		g_warning ("tring to free a string (%p) not created with vg_str[n]dup", string);
+		g_free (string);
+		return;
+	}
+	
+	if (node->ref_count == 1) {
+		g_hash_table_remove (strpool, string);
+		g_free (node->str);
+		g_free (node);
+	} else {
+		node->ref_count--;
+	}
+}
+
+#endif /* ENABLE_STRPOOL */

Added: trunk/plugins/valgrind/vgstrpool.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgstrpool.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,57 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __VG_STRPOOL_H__
+#define __VG_STRPOOL_H__
+
+#include <glib.h>
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+#ifdef ENABLE_STRPOOL
+void vg_strpool_init (void);
+void vg_strpool_shutdown (void);
+
+char *vg_strpool_add (char *string, int own);
+
+char *vg_strdup (const char *string);
+char *vg_strndup (const char *string, size_t n);
+void vg_strfree (char *string);
+#else
+#define vg_strpool_init()
+#define vg_strpool_shutdown()
+#define vg_strpool_add(str,own) (own ? str : g_strdup (str))
+#define vg_strdup(str) g_strdup (str)
+#define vg_strndup(str, n) g_strndup (str, n)
+#define vg_strfree(str) g_free (str)
+#endif /* ENABLE_STRPOOL */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __VG_STRPOOL_H__ */

Added: trunk/plugins/valgrind/vgtoolprefs.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgtoolprefs.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,132 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "vgtoolprefs.h"
+
+
+static void vg_tool_prefs_class_init (VgToolPrefsClass *klass);
+static void vg_tool_prefs_init (VgToolPrefs *prefs);
+static void vg_tool_prefs_destroy (GtkObject *obj);
+static void vg_tool_prefs_finalize (GObject *obj);
+
+static void tool_prefs_apply (VgToolPrefs *prefs);
+static void tool_prefs_get_argv (VgToolPrefs *prefs, const char *tool, GPtrArray *argv);
+
+
+static GtkVBoxClass *parent_class = NULL;
+
+
+GType
+vg_tool_prefs_get_type (void)
+{
+	static GType type = 0;
+	
+	if (!type) {
+		static const GTypeInfo info = {
+			sizeof (VgToolPrefsClass),
+			NULL, /* base_class_init */
+			NULL, /* base_class_finalize */
+			(GClassInitFunc) vg_tool_prefs_class_init,
+			NULL, /* class_finalize */
+			NULL, /* class_data */
+			sizeof (VgToolPrefs),
+			0,    /* n_preallocs */
+			(GInstanceInitFunc) vg_tool_prefs_init,
+		};
+		
+		type = g_type_register_static (GTK_TYPE_VBOX, "VgToolPrefs", &info, 0);
+	}
+	
+	return type;
+}
+
+static void
+vg_tool_prefs_class_init (VgToolPrefsClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
+	
+	parent_class = g_type_class_ref (GTK_TYPE_VBOX);
+	
+	object_class->finalize = vg_tool_prefs_finalize;
+	gtk_object_class->destroy = vg_tool_prefs_destroy;
+	
+	/* virtual methods */
+	klass->apply = tool_prefs_apply;
+	klass->get_argv = tool_prefs_get_argv;
+}
+
+static void
+vg_tool_prefs_init (VgToolPrefs *prefs)
+{
+	;
+}
+
+static void
+vg_tool_prefs_finalize (GObject *obj)
+{
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+vg_tool_prefs_destroy (GtkObject *obj)
+{
+	GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+}
+
+
+static void
+tool_prefs_apply (VgToolPrefs *prefs)
+{
+	;
+}
+
+
+void
+vg_tool_prefs_apply (VgToolPrefs *prefs)
+{
+	g_return_if_fail (VG_IS_TOOL_PREFS (prefs));
+	
+	VG_TOOL_PREFS_GET_CLASS (prefs)->apply (prefs);
+}
+
+
+static void
+tool_prefs_get_argv (VgToolPrefs *prefs, const char *tool, GPtrArray *argv)
+{
+	;
+}
+
+
+void
+vg_tool_prefs_get_argv (VgToolPrefs *prefs, const char *tool, GPtrArray *argv)
+{
+	g_return_if_fail (VG_IS_TOOL_PREFS (prefs));
+	g_return_if_fail (argv != NULL);
+	
+	VG_TOOL_PREFS_GET_CLASS (prefs)->get_argv (prefs, tool, argv);
+}

Added: trunk/plugins/valgrind/vgtoolprefs.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgtoolprefs.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,69 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __VG_TOOL_PREFS_H__
+#define __VG_TOOL_PREFS_H__
+
+#include <gtk/gtk.h>
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+#define VG_TYPE_TOOL_PREFS            (vg_tool_prefs_get_type ())
+#define VG_TOOL_PREFS(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), VG_TYPE_TOOL_PREFS, VgToolPrefs))
+#define VG_TOOL_PREFS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), VG_TYPE_TOOL_PREFS, VgToolPrefsClass))
+#define VG_IS_TOOL_PREFS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VG_TYPE_TOOL_PREFS))
+#define VG_IS_TOOL_PREFS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VG_TYPE_TOOL_PREFS))
+#define VG_TOOL_PREFS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), VG_TYPE_TOOL_PREFS, VgToolPrefsClass))
+
+typedef struct _VgToolPrefs VgToolPrefs;
+typedef struct _VgToolPrefsClass VgToolPrefsClass;
+
+struct _VgToolPrefs {
+	GtkVBox parent_object;
+	
+	const char *label;
+};
+
+struct _VgToolPrefsClass {
+	GtkVBoxClass parent_class;
+	
+	/* virtual methods */
+	void (* apply) (VgToolPrefs *prefs);
+	void (* get_argv) (VgToolPrefs *prefs, const char *tool, GPtrArray *argv);
+};
+
+
+GType vg_tool_prefs_get_type (void);
+
+void vg_tool_prefs_apply (VgToolPrefs *prefs);
+
+void vg_tool_prefs_get_argv (VgToolPrefs *prefs, const char *tool, GPtrArray *argv);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __VG_TOOL_PREFS_H__ */

Added: trunk/plugins/valgrind/vgtoolview.c
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgtoolview.c	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,455 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *  Copyright (C) Massimo Cora' 2005 <maxcvs gmail com>  
+ *
+ *  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.
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include "vgtoolview.h"
+
+
+static void vg_tool_view_class_init (VgToolViewClass *klass);
+static void vg_tool_view_init (VgToolView *view);
+static void vg_tool_view_destroy (GtkObject *obj);
+static void vg_tool_view_finalize (GObject *obj);
+
+static void tool_view_clear (VgToolView *view);
+static void tool_view_reset (VgToolView *view);
+static void tool_view_connect (VgToolView *view, int sockfd);
+static int  tool_view_step (VgToolView *view);
+static void tool_view_disconnect (VgToolView *view);
+static int  tool_view_save_log (VgToolView *view, gchar* uri);
+static int  tool_view_load_log (VgToolView *view, VgActions *actions, gchar* uri);
+static void tool_view_cut (VgToolView *view);
+static void tool_view_copy (VgToolView *view);
+static void tool_view_paste (VgToolView *view);
+static void tool_view_show_rules (VgToolView *view);
+
+
+static GtkVBoxClass *parent_class = NULL;
+
+static void
+destroy_array_and_content (GPtrArray **array)
+{
+	g_return_if_fail (array != NULL);
+	if (*array)
+	{
+		g_ptr_array_foreach (*array, (GFunc)g_free, NULL);
+		g_ptr_array_free (*array, TRUE);
+		*array = NULL;
+	}
+}
+
+static void
+allocate_array_and_content (GPtrArray **array, va_list va_args)
+{
+	gchar* item;
+
+	g_return_if_fail (array != NULL);
+	g_return_if_fail (*array == NULL);
+
+	*array = g_ptr_array_new ();
+	for (item = va_arg (va_args, gchar *); item; item = va_arg (va_args, gchar *))
+		g_ptr_array_add (*array, g_strdup (item));
+}
+
+
+GType
+vg_tool_view_get_type (void)
+{
+	static GType type = 0;
+	
+	if (!type) {
+		static const GTypeInfo info = {
+			sizeof (VgToolViewClass),
+			NULL, /* base_class_init */
+			NULL, /* base_class_finalize */
+			(GClassInitFunc) vg_tool_view_class_init,
+			NULL, /* class_finalize */
+			NULL, /* class_data */
+			sizeof (VgToolView),
+			0,    /* n_preallocs */
+			(GInstanceInitFunc) vg_tool_view_init,
+		};
+		
+		type = g_type_register_static (GTK_TYPE_VBOX, "VgToolView", &info, 0);
+	}
+	
+	return type;
+}
+
+static void
+vg_tool_view_class_init (VgToolViewClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
+	
+	parent_class = g_type_class_ref (GTK_TYPE_VBOX);
+	
+	object_class->finalize = vg_tool_view_finalize;
+	gtk_object_class->destroy = vg_tool_view_destroy;
+	
+	/* virtual methods */
+	klass->clear = tool_view_clear;
+	klass->reset = tool_view_reset;
+	klass->connect = tool_view_connect;
+	klass->step = tool_view_step;
+	klass->disconnect = tool_view_disconnect;
+	klass->save_log = tool_view_save_log;
+	klass->load_log = tool_view_load_log;
+	klass->cut = tool_view_cut;
+	klass->copy = tool_view_copy;
+	klass->paste = tool_view_paste;
+	klass->show_rules = tool_view_show_rules;
+}
+
+static void
+vg_tool_view_init (VgToolView *view)
+{
+	view->argv = NULL;
+	view->symtab = NULL;
+	view->srcdir = NULL;
+	view->rules = NULL;
+
+	view->argv_array = NULL;
+	view->srcdir_array = NULL;
+}
+
+static void
+vg_tool_view_finalize (GObject *obj)
+{
+	G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+vg_tool_view_destroy (GtkObject *obj)
+{
+	VgToolView *view = VG_TOOL_VIEW (obj);
+	destroy_array_and_content (&view->srcdir_array);
+	destroy_array_and_content (&view->argv_array);
+
+	GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+}
+
+
+void
+vg_tool_view_set_argv (VgToolView *view, char *arg0, ...)
+{
+	va_list va_args;
+	g_return_if_fail (VG_IS_TOOL_VIEW (view));
+	destroy_array_and_content (&view->argv_array);
+
+	va_start (va_args, arg0);
+	allocate_array_and_content (&view->argv_array, va_args);
+	va_end (va_args);
+
+	view->argv = (const char**)view->argv_array->pdata;
+}
+
+void
+vg_tool_view_set_srcdir (VgToolView *view, char *srcdir0, ...)
+{
+	va_list va_args;
+	g_return_if_fail (VG_IS_TOOL_VIEW (view));
+	destroy_array_and_content (&view->srcdir_array);
+
+	va_start (va_args, srcdir0);
+	allocate_array_and_content (&view->srcdir_array, va_args);
+	va_end (va_args);
+
+	view->srcdir = (const char**)view->srcdir_array->pdata;
+}
+
+
+void
+vg_tool_view_set_symtab (VgToolView *view, SymTab *symtab)
+{
+	g_return_if_fail (VG_IS_TOOL_VIEW (view));
+	
+	view->symtab = symtab;
+}
+
+
+static void
+tool_view_clear (VgToolView *view)
+{
+	;
+}
+
+
+void
+vg_tool_view_clear (VgToolView *view)
+{
+	g_return_if_fail (VG_IS_TOOL_VIEW (view));
+	
+	VG_TOOL_VIEW_GET_CLASS (view)->clear (view);
+}
+
+
+static void
+tool_view_reset (VgToolView *view)
+{
+	;
+}
+
+
+void
+vg_tool_view_reset (VgToolView *view)
+{
+	g_return_if_fail (VG_IS_TOOL_VIEW (view));
+	
+	VG_TOOL_VIEW_GET_CLASS (view)->reset (view);
+}
+
+
+static void
+tool_view_connect (VgToolView *view, int sockfd)
+{
+	;
+}
+
+
+void
+vg_tool_view_connect (VgToolView *view, int sockfd)
+{
+	g_return_if_fail (VG_IS_TOOL_VIEW (view));
+	
+	VG_TOOL_VIEW_GET_CLASS (view)->connect (view, sockfd);
+}
+
+
+static int
+tool_view_step (VgToolView *view)
+{
+	return -1;
+}
+
+
+int
+vg_tool_view_step (VgToolView *view)
+{
+	g_return_val_if_fail (VG_IS_TOOL_VIEW (view), -1);
+	
+	return VG_TOOL_VIEW_GET_CLASS (view)->step (view);
+}
+
+
+static void
+tool_view_disconnect (VgToolView *view)
+{
+	;
+}
+
+
+void
+vg_tool_view_disconnect (VgToolView *view)
+{
+	g_return_if_fail (VG_IS_TOOL_VIEW (view));
+	
+	VG_TOOL_VIEW_GET_CLASS (view)->disconnect (view);
+}
+
+
+static int
+tool_view_save_log (VgToolView *view, gchar* uri)
+{
+	errno = ENOTSUP;
+	return -1;
+}
+
+
+int
+vg_tool_view_save_log (VgToolView *view, gchar *uri)
+{
+	g_return_val_if_fail (VG_IS_TOOL_VIEW (view), -1);
+	
+	return VG_TOOL_VIEW_GET_CLASS (view)->save_log (view, uri);
+}
+
+
+static int
+tool_view_load_log (VgToolView *view, VgActions *actions, gchar* uri)
+{
+	errno = ENOTSUP;
+	return -1;
+}
+
+
+int
+vg_tool_view_load_log (VgToolView *view, VgActions *actions, gchar *uri)
+{
+	g_return_val_if_fail (VG_IS_TOOL_VIEW (view), -1);
+	
+	return VG_TOOL_VIEW_GET_CLASS (view)->load_log (view, actions, uri);
+}
+
+
+static void
+tool_view_cut (VgToolView *view)
+{
+	;
+}
+
+
+void
+vg_tool_view_cut (VgToolView *view)
+{
+	g_return_if_fail (VG_IS_TOOL_VIEW (view));
+	
+	VG_TOOL_VIEW_GET_CLASS (view)->cut (view);
+}
+
+
+static void
+tool_view_copy (VgToolView *view)
+{
+	;
+}
+
+
+void
+vg_tool_view_copy (VgToolView *view)
+{
+	g_return_if_fail (VG_IS_TOOL_VIEW (view));
+	
+	VG_TOOL_VIEW_GET_CLASS (view)->copy (view);
+}
+
+
+static void
+tool_view_paste (VgToolView *view)
+{
+	;
+}
+
+
+void
+vg_tool_view_paste (VgToolView *view)
+{
+	g_return_if_fail (VG_IS_TOOL_VIEW (view));
+	
+	VG_TOOL_VIEW_GET_CLASS (view)->paste (view);
+}
+
+
+static void
+tool_view_show_rules (VgToolView *view)
+{
+	if (view->rules == NULL)
+		return;
+	
+	if (GTK_WIDGET_MAPPED (view->rules))
+		gdk_window_raise (view->rules->window);
+	else
+		gtk_widget_show (view->rules);
+}
+
+
+void
+vg_tool_view_show_rules (VgToolView *view)
+{
+	g_return_if_fail (VG_IS_TOOL_VIEW (view));
+	
+	VG_TOOL_VIEW_GET_CLASS (view)->show_rules (view);
+}
+
+
+
+static char *
+path_concat (const char *dirname, int dirlen, const char *basename, int baselen)
+{
+	char *path, *p;
+	
+	p = path = g_malloc (dirlen + baselen + 2);
+	memcpy (path, dirname, dirlen);
+	p += dirlen;
+	*p++ = '/';
+	memcpy (p, basename, baselen);
+	p[baselen] = '\0';
+	
+	return path;
+}
+
+static gboolean
+path_is_rx (const char *path)
+{
+	struct stat st;
+	
+	if (stat (path, &st) != -1 && S_ISREG (st.st_mode)) {
+		if (access (path, R_OK | X_OK) != -1)
+			return TRUE;
+	}
+	
+	return FALSE;
+}
+
+
+char *
+vg_tool_view_scan_path (const char *program)
+{
+	const char *pathenv, *path, *p;
+	char *filename;
+	int len;
+	
+	if (program[0] == '/') {
+		if (path_is_rx (program))
+			return g_strdup (program);
+		
+		return NULL;
+	}
+	
+	if (!(pathenv = getenv ("PATH")))
+		return NULL;
+	
+	path = pathenv;
+	len = strlen (program);
+	while ((p = strchr (path, ':'))) {
+		if (p > path) {
+			filename = path_concat (path, (p - path), program, len);
+			if (path_is_rx (filename))
+				return filename;
+			
+			g_free (filename);
+		}
+		
+		path = p + 1;
+	}
+	
+	if (path[0] != '\0') {
+		filename = g_strdup_printf ("%s/%s", path, program);
+		if (path_is_rx (filename))
+			return filename;
+		
+		g_free (filename);
+	}
+	
+	return NULL;
+}

Added: trunk/plugins/valgrind/vgtoolview.h
==============================================================================
--- (empty file)
+++ trunk/plugins/valgrind/vgtoolview.h	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,114 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Authors: Jeffrey Stedfast <fejj ximian com>
+ *  Copyright 2003 Ximian, Inc. (www.ximian.com)
+ *  Copyright (C) Massimo Cora' 2005 <maxcvs gmail com>  
+ *
+ *  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.
+ *
+ */
+
+
+#ifndef __VG_TOOL_VIEW_H__
+#define __VG_TOOL_VIEW_H__
+
+#include <gtk/gtk.h>
+
+#include "symtab.h"
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+#define VG_TYPE_TOOL_VIEW            (vg_tool_view_get_type ())
+#define VG_TOOL_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), VG_TYPE_TOOL_VIEW, VgToolView))
+#define VG_TOOL_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), VG_TYPE_TOOL_VIEW, VgToolViewClass))
+#define VG_IS_TOOL_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VG_TYPE_TOOL_VIEW))
+#define VG_IS_TOOL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VG_TYPE_TOOL_VIEW))
+#define VG_TOOL_VIEW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), VG_TYPE_TOOL_VIEW, VgToolViewClass))
+
+typedef struct _VgToolView VgToolView;
+typedef struct _VgToolViewClass VgToolViewClass;
+
+#include "vgactions.h"
+
+struct _VgToolView {
+	GtkVBox parent_object;
+	
+	const char **argv;    /* args of program to debug */
+	const char **srcdir;  /* list src dir to check for src files */
+
+	GPtrArray *argv_array;
+	GPtrArray *srcdir_array;
+	
+	SymTab *symtab;
+	
+	GtkWidget *rules;
+};
+
+struct _VgToolViewClass {
+	GtkVBoxClass parent_class;
+	
+	/* virtual methods */
+	
+	/* state methods */
+	void (* clear)   (VgToolView *view);               /* clears the display (implies a disconnect if needed) */
+	void (* reset)   (VgToolView *view);               /* resets the state */
+	void (* connect) (VgToolView *view, int sockfd);   /* connect to valgrind's --logfile-fd */
+	int  (* step)    (VgToolView *view);               /* take 1 parse step over valgrind's output stream */
+	void (* disconnect) (VgToolView *view);            /* disconnect from valgrind's --logfile-fd */
+	
+	int (* save_log) (VgToolView *view, gchar* uri);
+	int (* load_log) (VgToolView *view, VgActions *actions, gchar* uri);
+	
+	/* cut/copy/paste methods */
+	void (* cut) (VgToolView *view);
+	void (* copy) (VgToolView *view);
+	void (* paste) (VgToolView *view);
+	
+	/* other methods */
+	void (* show_rules) (VgToolView *view);            /* show suppression rules dialog */
+};
+
+
+GType vg_tool_view_get_type (void);
+
+void vg_tool_view_set_argv (VgToolView *view, char *arg0, ...);
+void vg_tool_view_set_srcdir (VgToolView *view, char *srcdir0, ...);
+void vg_tool_view_set_symtab (VgToolView *view, SymTab *symtab);
+
+void vg_tool_view_clear (VgToolView *view);
+void vg_tool_view_reset (VgToolView *view);
+void vg_tool_view_connect (VgToolView *view, int sockfd);
+int  vg_tool_view_step (VgToolView *view);
+void vg_tool_view_disconnect (VgToolView *view);
+
+int vg_tool_view_save_log (VgToolView *view, gchar*uri);
+int vg_tool_view_load_log (VgToolView *view, VgActions *actions, gchar *uri);
+
+void vg_tool_view_cut (VgToolView *view);
+void vg_tool_view_copy (VgToolView *view);
+void vg_tool_view_paste (VgToolView *view);
+
+void vg_tool_view_show_rules (VgToolView *view);
+
+char *vg_tool_view_scan_path (const char *program);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __VG_TOOL_VIEW_H__ */

Modified: trunk/po/POTFILES
==============================================================================
--- trunk/po/POTFILES	(original)
+++ trunk/po/POTFILES	Tue Apr  7 13:46:31 2009
@@ -0,0 +1,304 @@
+	../anjuta.desktop.in.in \
+	../libanjuta/anjuta-c-module.c \
+	../libanjuta/anjuta-c-plugin-factory.c \
+	../libanjuta/anjuta-convert.c \
+	../libanjuta/anjuta-encodings.c \
+	../libanjuta/anjuta-launcher.c \
+	../libanjuta/anjuta-plugin.c \
+	../libanjuta/anjuta-plugin-description.c \
+	../libanjuta/anjuta-plugin-handle.c \
+	../libanjuta/anjuta-plugin-manager.c \
+	../libanjuta/anjuta-profile.c \
+	../libanjuta/anjuta-preferences.c \
+	../libanjuta/anjuta-preferences-dialog.c \
+	../libanjuta/anjuta-save-prompt.c \
+	../libanjuta/anjuta-serializer.c \
+	../libanjuta/anjuta-session.c \
+	../libanjuta/anjuta-shell.c \
+	../libanjuta/anjuta-status.c \
+	../libanjuta/anjuta-ui.c \
+	../libanjuta/anjuta-utils.c \
+	../libanjuta/anjuta-vcs-status-tree-view.c \
+	../libanjuta/cell-renderer-captioned-image.c \
+	../libanjuta/e-splash.c \
+	../libanjuta/resources.c \
+	../plugins/build-basic-autotools/anjuta-build-basic-autotools-plugin.glade \
+	../plugins/build-basic-autotools/build-options.c \
+	../plugins/build-basic-autotools/configuration-list.c \
+	../plugins/build-basic-autotools/executer.c \
+	../plugins/build-basic-autotools/plugin.c \
+	../plugins/build-basic-autotools/program.c \
+	../plugins/class-inheritance/class-inherit.c \
+	../plugins/class-inheritance/plugin.c \
+	../plugins/class-gen/anjuta-class-gen-plugin.glade \
+	../plugins/class-gen/cell-renderer-flags.c \
+	../plugins/class-gen/combo-flags.c \
+	../plugins/class-gen/element-editor.c \
+	../plugins/class-gen/generator.c \
+	../plugins/class-gen/plugin.c \
+	../plugins/class-gen/transform.c \
+	../plugins/class-gen/validator.c \
+	../plugins/class-gen/window.c \
+	../plugins/cvs-plugin/anjuta-cvs-plugin.glade \
+	../plugins/cvs-plugin/cvs-actions.c \
+	../plugins/cvs-plugin/cvs-callbacks.c \
+	../plugins/cvs-plugin/cvs-execute.c \
+	../plugins/cvs-plugin/plugin.c \
+	../plugins/debug-manager/anjuta-debug-manager.glade \
+	../plugins/debug-manager/breakpoints.c \
+	../plugins/debug-manager/chunk_view.c \
+	../plugins/debug-manager/data_buffer.c \
+	../plugins/debug-manager/data_view.c \
+	../plugins/debug-manager/debug_tree.c \
+	../plugins/debug-manager/disassemble.c \
+	../plugins/debug-manager/info.c \
+	../plugins/debug-manager/locals.c \
+	../plugins/debug-manager/memory.c \
+	../plugins/debug-manager/plugin.c \
+	../plugins/debug-manager/queue.c \
+	../plugins/debug-manager/registers.c \
+	../plugins/debug-manager/sexy-icon-entry.c \
+	../plugins/debug-manager/sharedlib.c \
+	../plugins/debug-manager/signals.c \
+	../plugins/debug-manager/sparse_buffer.c \
+	../plugins/debug-manager/sparse_view.c \
+	../plugins/debug-manager/stack_trace.c \
+	../plugins/debug-manager/start.c \
+	../plugins/debug-manager/threads.c \
+	../plugins/debug-manager/utilities.c \
+	../plugins/debug-manager/watch.c \
+	../plugins/devhelp/plugin.c \
+	../plugins/document-manager/action-callbacks.c \
+	../plugins/document-manager/anjuta-bookmarks.c \
+	../plugins/document-manager/anjuta-docman.c \
+	../plugins/document-manager/anjuta-document-manager.glade \
+	../plugins/document-manager/plugin.c \
+	../plugins/document-manager/search-box.c \
+	../plugins/file-loader/anjuta-recent-chooser-menu.c \
+	../plugins/file-loader/plugin.c \
+	../plugins/file-manager/file-manager.glade \
+	../plugins/file-manager/file-model.c \
+	../plugins/file-manager/file-view.c \
+	../plugins/file-manager/plugin.c \
+	../plugins/file-wizard/anjuta-file-wizard.glade \
+	../plugins/file-wizard/file.c \
+	../plugins/file-wizard/plugin.c \
+	../plugins/gbf-am/gbf-am-config.c \
+	../plugins/gbf-am/gbf-am-dialogs.glade \
+	../plugins/gbf-am/gbf-am-project.c \
+	../plugins/gbf-am/gbf-am-properties.c \
+	../plugins/gbf-mkfile/gbf-mkfile-config.c \
+	../plugins/gbf-mkfile/gbf-mkfile-project.c \
+	../plugins/gbf-mkfile/gbf-mkfile-properties.c \
+	../plugins/gdb/anjuta-gdb.glade \
+	../plugins/gdb/debugger.c \
+	../plugins/gdb/plugin.c \
+	../plugins/gdb/utilities.c \
+	../plugins/git/anjuta-git.glade \
+	../plugins/git/git-add-dialog.c \
+	../plugins/git/git-add-remote-dialog.c \
+	../plugins/git/git-bisect-dialog.c \
+	../plugins/git/git-cat-file-menu.c \
+	../plugins/git/git-checkout-files-dialog.c \
+	../plugins/git/git-commit-dialog.c \
+	../plugins/git/git-create-branch-dialog.c \
+	../plugins/git/git-create-tag-dialog.c \
+	../plugins/git/git-delete-branch-dialog.c \
+	../plugins/git/git-fetch-dialog.c \
+	../plugins/git/git-log-dialog.c \
+	../plugins/git/git-merge-dialog.c \
+	../plugins/git/git-pull-dialog.c \
+	../plugins/git/git-rebase-dialog.c \
+	../plugins/git/git-remove-dialog.c \
+	../plugins/git/git-reset-dialog.c \
+	../plugins/git/git-resolve-dialog.c \
+	../plugins/git/git-revert-dialog.c \
+	../plugins/git/git-switch-dialog.c \
+	../plugins/git/git-ui-utils.c \
+	../plugins/git/git-unstage-dialog.c \
+	../plugins/git/plugin.c \
+	../plugins/glade/anjuta-glade.glade \
+	../plugins/glade/designer-associations-item.c \
+	../plugins/glade/plugin.c \
+	../plugins/glade/anjuta-design-document.c \
+	../plugins/gtodo/add_edit_item.c \
+	../plugins/gtodo/callback.c \
+	../plugins/gtodo/export.c \
+	../plugins/gtodo/interface.c \
+	../plugins/gtodo/libgtodo.c \
+	../plugins/gtodo/list_tooltip.c \
+	../plugins/gtodo/mcategory.c \
+	../plugins/gtodo/notification.c \
+	../plugins/gtodo/plugin.c \
+	../plugins/gtodo/preferences.c \
+	../plugins/gtodo/tasklists.c \
+	../plugins/gtodo/todo_db.c \
+	../plugins/macro/anjuta-macro.glade \
+	../plugins/macro/macro-actions.c \
+	../plugins/macro/macro-db.c \
+	../plugins/macro/macro-dialog.c \
+	../plugins/macro/macro-edit.c \
+	../plugins/macro/macro-util.c \
+	../plugins/macro/plugin.c \
+	../plugins/message-view/anjuta-message-manager-plugin.glade \
+	../plugins/message-view/anjuta-msgman.c \
+	../plugins/message-view/message-view.c \
+	../plugins/message-view/plugin.c \
+	../plugins/patch/patch-plugin.c \
+	../plugins/patch/patch-plugin.glade \
+	../plugins/patch/plugin.c \
+	../plugins/profiler/gprof-call-graph-block.c \
+	../plugins/profiler/gprof-call-graph-block-entry.c \
+	../plugins/profiler/gprof-call-graph.c \
+	../plugins/profiler/gprof-call-graph-view.c \
+	../plugins/profiler/gprof-flat-profile.c \
+	../plugins/profiler/gprof-flat-profile-entry.c \
+	../plugins/profiler/gprof-flat-profile.h \
+	../plugins/profiler/gprof-flat-profile-view.c \
+	../plugins/profiler/gprof-function-call-tree-view.c \
+	../plugins/profiler/gprof-profile-data.c \
+	../plugins/profiler/gprof-view.c \
+	../plugins/profiler/gprof-view-manager.c \
+	../plugins/profiler/plugin.c \
+	../plugins/profiler/profiler-call-graph.glade \
+	../plugins/profiler/profiler-flat-profile.glade \
+	../plugins/profiler/profiler-function-call-tree.glade \
+	../plugins/profiler/profiler.glade \
+	../plugins/profiler/string-utils.c \
+	../plugins/project-import/plugin.c \
+	../plugins/project-import/project-import.glade \
+	../plugins/project-import/project-import-dialog.c \
+	../plugins/project-manager/create_dialogs.glade \
+	../plugins/project-manager/gbf-project-model.c \
+	../plugins/project-manager/gbf-project-util.c \
+	../plugins/project-manager/plugin.c \
+	../plugins/project-wizard/anjuta-project-wizard.ui \
+	../plugins/project-wizard/druid.c \
+	../plugins/project-wizard/install.c \
+	../plugins/project-wizard/plugin.c \
+	../plugins/project-wizard/property.c \
+	../plugins/project-wizard/templates/translatable-strings.h \
+	../plugins/run-program/anjuta-run-program.glade \
+	../plugins/run-program/execute.c \
+	../plugins/run-program/parameters.c \
+	../plugins/run-program/plugin.c \
+	../plugins/sample1/plugin.c \
+	../plugins/scintilla/anjuta-editor-scintilla.glade \
+	../plugins/scintilla/print.c \
+	../plugins/scintilla/plugin.c \
+	../plugins/scintilla/text_editor.c \
+	../plugins/scratchbox/anjuta-scratchbox.glade \
+	../plugins/scratchbox/plugin.c \
+	../plugins/search/anjuta-search.glade \
+	../plugins/search/plugin.c \
+	../plugins/search/search_preferences.c \
+	../plugins/search/search-replace.c \
+	../plugins/search/search-replace_backend.c \
+	../plugins/sourceview/sourceview.c \
+	../plugins/sourceview/sourceview-io.c \
+	../plugins/sourceview/sourceview-print.c \
+	../plugins/sourceview/anjuta-editor-sourceview.ui \
+	../plugins/starter/plugin.c \
+	../plugins/starter/starter.c \
+	../plugins/subversion/anjuta-subversion.glade \
+	../plugins/subversion/plugin.c \
+	../plugins/subversion/subversion-add-dialog.c \
+	../plugins/subversion/subversion-commit-dialog.c \
+	../plugins/subversion/subversion-copy-dialog.c \
+	../plugins/subversion/subversion-diff-dialog.c \
+	../plugins/subversion/subversion-log-dialog.c \
+	../plugins/subversion/subversion-merge-dialog.c \
+	../plugins/subversion/subversion-remove-dialog.c \
+	../plugins/subversion/subversion-resolve-dialog.c \
+	../plugins/subversion/subversion-revert-dialog.c \
+	../plugins/subversion/subversion-switch-dialog.c \
+	../plugins/subversion/subversion-ui-utils.c \
+	../plugins/subversion/subversion-update-dialog.c \
+	../plugins/subversion/svn-command.c \
+	../plugins/symbol-db/plugin.c \
+	../plugins/symbol-db/symbol-db-prefs.c \
+	../plugins/symbol-db/symbol-db-system.c \
+	../plugins/symbol-db/symbol-db-view-locals.c \
+	../plugins/symbol-db/symbol-db-view.c \
+	../plugins/symbol-db/anjuta-symbol-db.glade \
+	../plugins/terminal/anjuta-terminal-plugin.glade \
+	../plugins/terminal/terminal.c \
+	../plugins/tools/anjuta-tools.glade \
+	../plugins/tools/dialog.c \
+	../plugins/tools/editor.c \
+	../plugins/tools/execute.c \
+	../plugins/tools/fileop.c \
+	../plugins/tools/plugin.c \
+	../plugins/tools/variable.c \
+	../plugins/tools/tool.c \
+	../plugins/valgrind/anjuta-valgrind.glade \
+	../plugins/valgrind/plugin.c \
+	../plugins/valgrind/preferences.c \
+	../plugins/valgrind/process.c \
+	../plugins/valgrind/vgactions.c \
+	../plugins/valgrind/vgcachegrindprefs.c \
+	../plugins/valgrind/vgdefaultview.c \
+	../plugins/valgrind/vggeneralprefs.c \
+	../plugins/valgrind/vghelgrindprefs.c \
+	../plugins/valgrind/vgmemcheckprefs.c \
+	../plugins/valgrind/vgrule-editor.c \
+	../plugins/valgrind/vgrule-list.c \
+	../src/about.c \
+	../src/action-callbacks.c \
+	../src/anjuta.c \
+	../src/anjuta.glade \
+	../src/anjuta-actions.h \
+	../src/anjuta-app.c \
+	../src/main.c \
+	../libanjuta/anjuta-save-prompt.c \
+	../plugins/debug-manager/breakpoints.c \
+	../plugins/debug-manager/debug_tree.c \
+	../plugins/debug-manager/info.c \
+	../plugins/debug-manager/locals.c \
+	../plugins/debug-manager/memory.c \
+	../plugins/debug-manager/registers.c \
+	../plugins/debug-manager/sharedlib.c \
+	../plugins/debug-manager/signals.c \
+	../plugins/debug-manager/stack_trace.c \
+	../plugins/debug-manager/start.c \
+	../plugins/debug-manager/watch.c \
+	../plugins/language-support-cpp-java/anjuta-language-cpp-java.glade \
+	../plugins/language-support-cpp-java/plugin.c \
+	../plugins/sourceview/plugin.c \
+	../plugins/gdb/anjuta-gdb.plugin.in \
+	../plugins/git/git.plugin.in \
+	../plugins/devhelp/anjuta-devhelp.plugin.in \
+	../plugins/document-manager/anjuta-document-manager.plugin.in \
+	../plugins/file-wizard/anjuta-file-wizard.plugin.in \
+	../plugins/file-manager/file-manager.plugin.in \
+	../plugins/subversion/anjuta-subversion.plugin.in \
+	../plugins/class-inheritance/anjuta-class-inheritance.plugin.in \
+	../plugins/glade/anjuta-glade.plugin.in \
+	../plugins/gtodo/anjuta-gtodo.plugin.in \
+	../plugins/macro/anjuta-macro.plugin.in \
+	../plugins/patch/anjuta-patch.plugin.in \
+	../plugins/tools/anjuta-tools.plugin.in \
+	../plugins/sample1/anjuta-sample.plugin.in \
+	../plugins/build-basic-autotools/anjuta-build-basic-autotools.plugin.in \
+	../plugins/terminal/anjuta-terminal.plugin.in \
+	../plugins/cvs-plugin/anjuta-cvs.plugin.in \
+	../plugins/project-import/anjuta-project-import.plugin.in \
+	../plugins/sourceview/sourceview.plugin.in \
+	../plugins/scintilla/anjuta-editor.plugin.in \
+	../plugins/scratchbox/anjuta-scratchbox.plugin.in \
+	../plugins/starter/anjuta-starter.plugin.in \
+	../plugins/language-support-cpp-java/anjuta-language-cpp-java.plugin.in \
+	../plugins/project-wizard/anjuta-project-wizard.plugin.in \
+	../plugins/profiler/profiler.plugin.in \
+	../plugins/search/anjuta-search.plugin.in \
+	../plugins/class-gen/anjuta-class-gen.plugin.in \
+	../plugins/project-manager/anjuta-project-manager.plugin.in \
+	../plugins/symbol-db/symbol-db.plugin.in \
+	../plugins/message-view/anjuta-message-manager.plugin.in \
+	../plugins/valgrind/anjuta-valgrind.plugin.in \
+	../plugins/file-loader/anjuta-loader.plugin.in \
+	../plugins/debug-manager/anjuta-debug-manager.plugin.in \
+	../plugins/run-program/anjuta-run-program.plugin.in \
+	../plugins/language-manager/language-manager.plugin.in \
+	../plugins/gbf-mkfile/gbf-mkfile.plugin.in \
+	../plugins/gbf-am/gbf-am.plugin.in



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]