commit 9e2b7fd363c2dd91c675715ee53806e0f5586db5
Author: phantomjinx <[email protected]>
Date:   Sat Oct 10 22:51:25 2009 +0100

    * Advanced Helloworld plugin installed and working * Development 
environment set up in Makefiles for plugins to be tested without being 
installed.

 configure.in                               |   10 +-
 data/Makefile.am                           |    2 +-
 data/ui/Makefile.am                        |    6 +
 data/{ => ui}/gtkpod.ui                    |    0
 plugins/Makefile                           |  545 ----------------------------
 plugins/Makefile.am                        |    3 +-
 plugins/Makefile.in                        |  545 ----------------------------
 plugins/advhelloworld/Makefile.am          |   97 +++++
 plugins/advhelloworld/advhelloworld.glade  |   66 ++++
 plugins/advhelloworld/advhelloworld.plugin |    5 +
 plugins/advhelloworld/advhelloworld.png    |  Bin 0 -> 3463 bytes
 plugins/advhelloworld/advhelloworld.ui     |   10 +
 plugins/advhelloworld/plugin.c             |  154 ++++++++
 plugins/advhelloworld/plugin.h             |   41 ++
 plugins/helloworld/Makefile.am             |   26 +-
 src/anjuta-about.c                         |    2 +-
 src/anjuta-app.c                           |    1 +
 src/directories.c                          |   14 +-
 src/gtkpod.c                               |    6 +-
 19 files changed, 424 insertions(+), 1109 deletions(-)
---
diff --git a/configure.in b/configure.in
index 0697c1b..9175df9 100644
--- a/configure.in
+++ b/configure.in
@@ -207,10 +207,10 @@ AC_SUBST(GTKPOD_PLUGIN_LDFLAGS)
 dnl Setup Plugin directories
 dnl ------------------------
 gtkpod_plugin_dir='$(libdir)/$(PACKAGE)'
-gtkpod_data_dir='$(datadir)/$(PACKAGE)'
-gtkpod_ui_dir='$(gtkpod_data_dir)'
-gtkpod_glade_dir='$(gtkpod_data_dir)'
-gtkpod_image_dir='$(gtkpod_data_dir)'
+gtkpod_data_dir='$(datadir)/$(PACKAGE)/data'
+gtkpod_ui_dir='$(gtkpod_data_dir)/ui'
+gtkpod_glade_dir='$(gtkpod_data_dir)/glade'
+gtkpod_image_dir='$(gtkpod_data_dir)/icons'
 AC_SUBST(gtkpod_plugin_dir)
 AC_SUBST(gtkpod_data_dir)
 AC_SUBST(gtkpod_ui_dir)
@@ -247,10 +247,12 @@ data/icons/hicolor/scalable/Makefile
 data/icons/hicolor/scalable/places/Makefile
 data/man/Makefile
 data/man/gtkpod.1
+data/ui/Makefile
 doc/Makefile
 doc/figures/Makefile
 plugins/Makefile
 plugins/helloworld/Makefile
+plugins/advhelloworld/Makefile
 ])
 
 echo "
diff --git a/data/Makefile.am b/data/Makefile.am
index f0e8c1f..0cee4bf 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = icons man
+SUBDIRS = icons man ui
 
 desktopdir = $(datadir)/applications
 desktop_in_files = gtkpod.desktop.in
diff --git a/data/ui/Makefile.am b/data/ui/Makefile.am
new file mode 100644
index 0000000..4bf5b06
--- /dev/null
+++ b/data/ui/Makefile.am
@@ -0,0 +1,6 @@
+appdatadir = $(pkgdatadir)/data
+appdata_DATA =                         \
+       gtkpod.ui
+
+EXTRA_DIST =                           \
+       $(appdata_DATA)
diff --git a/data/gtkpod.ui b/data/ui/gtkpod.ui
similarity index 100%
rename from data/gtkpod.ui
rename to data/ui/gtkpod.ui
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index b4aa755..abef71b 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -1,6 +1,7 @@
 
 ## The '.' is to make sure install-data-hook rule is executed first
 SUBDIRS = . \
-       helloworld
+       helloworld \
+       advhelloworld
 
 # indent
diff --git a/plugins/advhelloworld/Makefile.am 
b/plugins/advhelloworld/Makefile.am
new file mode 100644
index 0000000..84326a8
--- /dev/null
+++ b/plugins/advhelloworld/Makefile.am
@@ -0,0 +1,97 @@
+# Sample Makefile for a anjuta plugin.
+
+plugin_name = advhelloworld
+plugin_lib = lib$(plugin_name).so
+plugin_file = $(plugin_name).plugin
+
+# Plugin UI file
+advhelloworld_uidir = $(gtkpod_ui_dir)
+advhelloworld_ui_DATA =  $(plugin_name).ui
+
+# Plugin Glade file
+advhelloworld_gladedir = $(gtkpod_glade_dir)
+advhelloworld_glade_DATA =  $(plugin_name).glade
+
+# Plugin Icon file
+advhelloworld_pixmapsdir = $(gtkpod_image_dir)
+advhelloworld_pixmaps_DATA = $(plugin_name).png
+
+# Plugin description file
+plugin_in_files = $(plugin_file)
+
+advhelloworld_plugindir = $(gtkpod_plugin_dir)
+advhelloworld_plugin_DATA = $(plugin_file)
+
+# Include paths
+AM_CPPFLAGS = \
+    -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+    -DGTKPOD_DATA_DIR=\"$(gtkpod_data_dir)\" \
+    -DGTKPDO_PLUGIN_DIR=\"$(gtkpod_plugin_dir)\" \
+    -DGTKPDO_IMAGE_DIR=\"$(gtkpod_image_dir)\" \
+    -DGTKPDO_GLADE_DIR=\"$(gtkpod_glade_dir)\" \
+    -DGTKPOD_UI_DIR=\"$(gtkpod_ui_dir)\" \
+    -DPACKAGE_DATA_DIR=\"$(datadir)\" \
+    -DPACKAGE_SRC_DIR=\"$(srcdir)\" \
+    $(LIBANJUTA_CFLAGS)
+
+# Where to install the plugin
+plugindir = $(gtkpod_plugin_dir)
+
+# The plugin
+plugin_LTLIBRARIES = libadvhelloworld.la
+
+# Plugin sources
+libadvhelloworld_la_SOURCES = plugin.c plugin.h
+
+libadvhelloworld_la_LDFLAGS = $(GTKPOD_PLUGIN_LDFLAGS)
+
+# Plugin dependencies
+libadvhelloworld_la_LIBADD = \
+    $(GCONF_LIBS) \
+    $(GLADE_LIBS) \
+    $(VTE_LIBS) \
+    $(LIBANJUTA_LIBS)
+
+EXTRA_DIST = \
+       $(plugin_in_files) \
+       $(advhelloworld_plugin_DATA) \
+       $(advhelloworld_ui_DATA) \
+       $(advhelloworld_glade_DATA) \
+       $(advhelloworld_pixmaps_DATA)
+
+all-local: create-plugin-links create-ui-link
+
+create-plugin-links:
+       echo "Creating symbolic links in plugin root directory"
+       if test ! -e ../$(plugin_lib); then \
+         ln -s `pwd`/.libs/$(plugin_lib) ../$(plugin_lib); \
+       fi; \
+       if test ! -e ../$(plugin_file); then \
+         ln -s `pwd`/$(plugin_file) ../$(plugin_file); \
+       fi;
+       
+create-ui-link: create-ui-dir
+       if test -e $(gtkpod_ui_dir)/$(advhelloworld_ui_DATA); then \
+         sudo rm -f $(gtkpod_ui_dir)/$(advhelloworld_ui_DATA); \
+       fi; \
+       sudo ln -s `pwd`/$(advhelloworld_ui_DATA) 
$(gtkpod_ui_dir)/$(advhelloworld_ui_DATA);
+
+create-ui-dir: create-data-dir
+       if test ! -d $(gtkpod_ui_dir); then \
+         sudo mkdir $(gtkpod_ui_dir); \
+       fi;
+
+create-data-dir: create-base-data-dir
+       if test ! -d $(gtkpod_data_dir); then \
+         sudo mkdir $(gtkpod_data_dir); \
+       fi;
+
+create-base-data-dir:
+       if test ! -d $(datadir)/$(PACKAGE); then \
+         sudo mkdir $(datadir)/$(PACKAGE); \
+       fi;
+
+
+clean-local:
+       rm -f ../$(plugin_lib) ../$(plugin_file)
+
diff --git a/plugins/advhelloworld/advhelloworld.glade 
b/plugins/advhelloworld/advhelloworld.glade
new file mode 100644
index 0000000..1355abb
--- /dev/null
+++ b/plugins/advhelloworld/advhelloworld.glade
@@ -0,0 +1,66 @@
+<?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="window1">
+  <property name="title" translatable="yes">window1</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <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>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+
+  <child>
+    <widget class="GtkHBox" id="top_widget">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+       <widget class="GtkScrolledWindow" id="scrolledwindow1">
+         <property name="visible">True</property>
+         <property name="can_focus">True</property>
+         <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+         <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+         <property name="shadow_type">GTK_SHADOW_IN</property>
+         <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+         <child>
+           <widget class="GtkTextView" id="textview1">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="editable">True</property>
+             <property name="overwrite">False</property>
+             <property name="accepts_tab">True</property>
+             <property name="justification">GTK_JUSTIFY_LEFT</property>
+             <property name="wrap_mode">GTK_WRAP_NONE</property>
+             <property name="cursor_visible">True</property>
+             <property name="pixels_above_lines">0</property>
+             <property name="pixels_below_lines">0</property>
+             <property name="pixels_inside_wrap">0</property>
+             <property name="left_margin">0</property>
+             <property name="right_margin">0</property>
+             <property name="indent">0</property>
+             <property name="text" translatable="yes">Anjuta Plugin User 
Interface</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>
diff --git a/plugins/advhelloworld/advhelloworld.plugin 
b/plugins/advhelloworld/advhelloworld.plugin
new file mode 100644
index 0000000..2f92828
--- /dev/null
+++ b/plugins/advhelloworld/advhelloworld.plugin
@@ -0,0 +1,5 @@
+[Anjuta Plugin]
+Location=advhelloworld:AdvHelloWorldPlugin
+Icon=advhelloworld.png
+Name=AdvHelloWorld Plugin
+Description=An Advanced HelloWorld plugin for gtkpod
diff --git a/plugins/advhelloworld/advhelloworld.png 
b/plugins/advhelloworld/advhelloworld.png
new file mode 100644
index 0000000..7f534e9
Binary files /dev/null and b/plugins/advhelloworld/advhelloworld.png differ
diff --git a/plugins/advhelloworld/advhelloworld.ui 
b/plugins/advhelloworld/advhelloworld.ui
new file mode 100644
index 0000000..e36792e
--- /dev/null
+++ b/plugins/advhelloworld/advhelloworld.ui
@@ -0,0 +1,10 @@
+<!--*- xml -*-->
+<ui>
+       <menubar name="MenuMain">
+               <menu name="MenuFile" action="ActionMenuFile">
+                       <placeholder name="PlaceholderFileMenus">
+                               <menuitem name="HelloWorldAction" 
action="ActionFileHelloWorld" />
+                       </placeholder>
+               </menu>
+       </menubar>
+</ui>
diff --git a/plugins/advhelloworld/plugin.c b/plugins/advhelloworld/plugin.c
new file mode 100644
index 0000000..89f317d
--- /dev/null
+++ b/plugins/advhelloworld/plugin.c
@@ -0,0 +1,154 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * plugin.c
+ * Copyright (C) phantomjinx 2009 <[email protected]>
+ *
+ * plugin.c 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 3 of the License, 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "plugin.h"
+
+/* Project configuration file */
+#include <config.h>
+
+/* Document manager interface */
+#include <libanjuta/interfaces/ianjuta-document-manager.h>
+
+/* Parent class. Part of standard class definition */
+static gpointer parent_class;
+
+static void
+on_hello_action_activate (GtkAction *action, AdvHelloWorldPlugin *plugin) {
+    IAnjutaDocument *doc;
+    IAnjutaDocumentManager *docman;
+    GtkWindow *parent_win;
+    gchar *filename;
+
+    /* We are using Anjuta widow as parent for displaying the dialog */
+    parent_win = GTK_WINDOW (ANJUTA_PLUGIN (plugin)->shell);
+
+    /* Query for object implementing IAnjutaDocumentManager interface */
+    docman = anjuta_shell_get_interface (ANJUTA_PLUGIN (plugin)->shell,
+            IAnjutaDocumentManager, NULL);
+
+    /* Get current document */
+    doc = ianjuta_document_manager_get_current_document(docman, NULL);
+    filename = ianjuta_document_get_filename(doc, NULL);
+
+    /* Display the filename */
+    anjuta_util_dialog_info(parent_win, "Current filename is: %s", filename);
+    g_free(filename);
+}
+
+static GtkActionEntry actions[] = {
+    {
+        "ActionFileHelloWorld",                   /* Action name */
+        GTK_STOCK_NEW,                            /* Stock icon, if any */
+        N_("_Hello world action"),                /* Display label */
+        NULL,                                     /* short-cut */
+        N_("This is hello world action"),         /* Tooltip */
+        G_CALLBACK (on_hello_action_activate)    /* action callback */
+    }
+};
+
+#define UI_FILE GTKPOD_UI_DIR"/advhelloworld.ui"
+
+static gboolean
+activate_plugin (AnjutaPlugin *plugin)
+{
+    GtkWidget *wid;
+    AnjutaUI *ui;
+    AdvHelloWorldPlugin *hello_plugin;
+    GtkActionGroup* action_group;
+
+    hello_plugin = (AdvHelloWorldPlugin*) plugin;
+    ui = anjuta_shell_get_ui (plugin->shell, NULL);
+
+    /* Create hello plugin widget */
+    wid = gtk_label_new ("Hello World Plugin!!");
+    hello_plugin->widget = wid;
+
+    /* Add our actions */
+    action_group = anjuta_ui_add_action_group_entries (ui,
+                                                        "ActionGroupHello",
+                                                        _("Hello world"),
+                                                        actions,
+                                                        G_N_ELEMENTS (actions),
+                                                        GETTEXT_PACKAGE, TRUE,
+                                                        plugin);
+    hello_plugin->action_group = action_group;
+
+    /* Merge UI */
+    hello_plugin->uiid = anjuta_ui_merge (ui, UI_FILE);
+
+    /* Add widget in Shell. Any number of widgets can be added */
+    anjuta_shell_add_widget (plugin->shell, wid,
+                             "AdvHelloWorldPlugin",
+                             _("AdvHelloWorldPlugin"),
+                             GTK_STOCK_ABOUT,
+                             ANJUTA_SHELL_PLACEMENT_CENTER,
+                             NULL);
+
+    return TRUE; /* FALSE if activation failed */
+}
+
+static gboolean
+deactivate_plugin (AnjutaPlugin *plugin)
+{
+    AnjutaUI *ui;
+    AdvHelloWorldPlugin *hello_plugin;
+
+    hello_plugin = (AdvHelloWorldPlugin*) plugin;
+    ui = anjuta_shell_get_ui (plugin->shell, NULL);
+
+    /* Remove widgets from Shell */
+    anjuta_shell_remove_widget (plugin->shell,
+                                hello_plugin->widget,
+                                NULL);
+    /* Unmerge UI */
+    anjuta_ui_unmerge (ui, hello_plugin->uiid);
+
+    /* Remove Action groups */
+    anjuta_ui_remove_action_group (ui, hello_plugin->action_group);
+
+    /* FALSE if plugin doesn't want to deactivate */
+    return TRUE;
+}
+
+static void
+adv_hello_world_plugin_instance_init (GObject *obj)
+{
+    AdvHelloWorldPlugin *plugin = (AdvHelloWorldPlugin*) obj;
+    plugin->uiid = 0;
+    plugin->widget = NULL;
+    plugin->action_group = NULL;
+}
+
+static void
+adv_hello_world_plugin_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;
+}
+
+/* This line will change when we implement interfaces */
+ANJUTA_PLUGIN_BOILERPLATE (AdvHelloWorldPlugin, adv_hello_world_plugin);
+
+/* This sets up codes to register our plugin */
+ANJUTA_SIMPLE_PLUGIN (AdvHelloWorldPlugin, adv_hello_world_plugin);
+
+;
diff --git a/plugins/advhelloworld/plugin.h b/plugins/advhelloworld/plugin.h
new file mode 100644
index 0000000..28e8538
--- /dev/null
+++ b/plugins/advhelloworld/plugin.h
@@ -0,0 +1,41 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * plugin.h
+ * Copyright (C) phantomjinx 2009 <[email protected]>
+ *
+ * plugin.h 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 3 of the License, 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _ADVHELLOWORLD_H_
+#define _ADVHELLOWORLD_H_
+
+#include <libanjuta/anjuta-plugin.h>
+
+typedef struct _AdvHelloWorldPlugin AdvHelloWorldPlugin;
+typedef struct _AdvHelloWorldPluginClass AdvHelloWorldPluginClass;
+
+struct _AdvHelloWorldPlugin{
+       AnjutaPlugin parent;
+       GtkWidget *widget;
+       gint uiid;
+       GtkActionGroup *action_group;
+};
+
+struct _AdvHelloWorldPluginClass{
+       AnjutaPluginClass parent_class;
+};
+
+gchar * UI_FILE;
+
+#endif
diff --git a/plugins/helloworld/Makefile.am b/plugins/helloworld/Makefile.am
index 9db7b99..f868756 100644
--- a/plugins/helloworld/Makefile.am
+++ b/plugins/helloworld/Makefile.am
@@ -1,20 +1,23 @@
 # Sample Makefile for a anjuta plugin.
 
+plugin_name = helloworld
+plugin_lib = lib$(plugin_name).so
+plugin_file = $(plugin_name).plugin
+
 # Plugin UI file
 helloworld_uidir = $(gtkpod_ui_dir)
-helloworld_ui_DATA =  helloworld.ui
-
+helloworld_ui_DATA =  $(plugin_name).ui
 
 # Plugin Glade file
 helloworld_gladedir = $(gtkpod_glade_dir)
-helloworld_glade_DATA =  helloworld.glade
+helloworld_glade_DATA =  $(plugin_name).glade
 
 # Plugin Icon file
 helloworld_pixmapsdir = $(gtkpod_image_dir)
-helloworld_pixmaps_DATA = helloworld.png
+helloworld_pixmaps_DATA = $(plugin_name).png
 
 # Plugin description file
-plugin_in_files = helloworld.plugin
+plugin_in_files = $(plugin_file)
 
 helloworld_plugindir = $(gtkpod_plugin_dir)
 helloworld_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
@@ -55,3 +58,16 @@ EXTRA_DIST = \
        $(helloworld_ui_DATA) \
        $(helloworld_glade_DATA) \
        $(helloworld_pixmaps_DATA)
+
+all-local:
+       echo "Creating symbolic links in plugin root directory"
+       if test ! -e ../$(plugin_lib); then \
+         ln -s `pwd`/.libs/$(plugin_lib) ../$(plugin_lib); \
+       fi; \
+       if test ! -e ../$(plugin_file); then \
+         ln -s `pwd`/$(plugin_file) ../$(plugin_file); \
+       fi;
+
+clean-local:
+       rm -f ../$(plugin_lib) ../$(plugin_file)
+
diff --git a/src/anjuta-about.c b/src/anjuta-about.c
index eda2d7a..61a6933 100644
--- a/src/anjuta-about.c
+++ b/src/anjuta-about.c
@@ -186,7 +186,7 @@ about_box_new ()
                g_error_free (error);
        }
 
-       pix = gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S 
PACKAGE G_DIR_SEPARATOR_S "data" G_DIR_SEPARATOR_S "gtkpod-logo.png", NULL);
+       pix = gdk_pixbuf_new_from_file(GTKPOD_DATA_DIR G_DIR_SEPARATOR_S 
PACKAGE G_DIR_SEPARATOR_S "data" G_DIR_SEPARATOR_S "gtkpod-logo.png", NULL);
        dialog = gtk_about_dialog_new();
        gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(dialog), "Anjuta");
        gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), VERSION);
diff --git a/src/anjuta-app.c b/src/anjuta-app.c
index 1b36f0c..a98c450 100644
--- a/src/anjuta-app.c
+++ b/src/anjuta-app.c
@@ -406,6 +406,7 @@ anjuta_app_instance_init (AnjutaApp *app)
        g_object_add_weak_pointer (G_OBJECT (app->ui), (gpointer)&app->ui);
 
        /* Plugin Manager */
+       g_printf("Prepending %s to plugin directories\n", get_plugin_dir());
        plugins_dirs = g_list_prepend (plugins_dirs, get_plugin_dir());
        app->plugin_manager = anjuta_plugin_manager_new (G_OBJECT (app),
                                                                                
                         app->status,
diff --git a/src/directories.c b/src/directories.c
index d0a95cb..4b5efad 100644
--- a/src/directories.c
+++ b/src/directories.c
@@ -30,17 +30,21 @@
 #include "config.h"
 #include "directories.h"
 
+static int USING_LOCAL = 0;
+
 static gchar * init_dir(char *argv[], gchar *filename, gchar *installdir);
 static void debug_print_directories();
 
 static gchar *datadir = NULL;
 static gchar *icondir = NULL;
 static gchar *plugindir = NULL;
+static gchar *uidir = NULL;
 
 void init_directories(char *argv[])
 {
     datadir = init_dir (argv, "data", GTKPOD_DATA_DIR);
     icondir = init_dir (argv, "data/icons", GTKPOD_DATA_DIR);
+    uidir = init_dir (argv, "data/ui", GTKPOD_UI_DIR);
     plugindir = init_dir (argv, "plugins", GTKPOD_PLUGIN_DIR);
 
     debug_print_directories();
@@ -49,10 +53,10 @@ void init_directories(char *argv[])
 static void debug_print_directories()
 {
     g_printf("data directory: %s\n", get_data_dir());
+    g_printf("ui directory: %s\n", get_ui_dir());
     g_printf("glade directory: %s\n", get_glade_dir());
     g_printf("icon directory: %s\n", get_icon_dir());
-    g_printf("image directory: %s\n", get_image_dir());
-    g_printf("ui directory: %s\n", get_ui_dir());
+
     g_printf("plugin directory: %s\n", get_plugin_dir());
 }
 
@@ -104,11 +108,11 @@ static gchar * init_dir(char *argv[], gchar *filename, 
gchar *installdir)
         newdir = g_build_filename(installdir, filename, NULL);
     else
     {
+        USING_LOCAL = 1;
         g_printf(
                 "Using local %s file since program was started from source 
directory:\n%s\n", filename, newdir);
     }
 
-    g_printf("Returning for %s the path %s\n", filename, newdir);
     return newdir;
 }
 
@@ -129,12 +133,12 @@ gchar * get_icon_dir()
 
 gchar * get_image_dir()
 {
-    return datadir;
+    return icondir;
 }
 
 gchar * get_ui_dir()
 {
-    return datadir;
+    return uidir;
 }
 
 gchar * get_plugin_dir()
diff --git a/src/gtkpod.c b/src/gtkpod.c
index a88e05d..efff5b2 100644
--- a/src/gtkpod.c
+++ b/src/gtkpod.c
@@ -50,7 +50,7 @@ void gtkpod_init(int argc, char *argv[]) {
 
     GTKPOD_GLADE_XML_FILE = g_build_filename(get_glade_dir(), "gtkpod.glade", 
NULL);
     plugin_profile_file = g_build_filename(get_data_dir(), "default.profile", 
NULL);
-    ui_file = g_build_filename(get_data_dir(), "gtkpod.ui", NULL);
+    ui_file = g_build_filename(get_ui_dir(), "gtkpod.ui", NULL);
 
     anjuta_set_ui_file_path(ui_file);
 
@@ -190,7 +190,9 @@ void gtkpod_init(int argc, char *argv[]) {
     gtk_window_maximize(GTK_WINDOW(app));
 
     GList *plugins = anjuta_plugin_manager_get_active_plugins(plugin_manager);
-    g_printf("Number of installed plugins: %d\n", g_list_length(plugins));
+    g_printf("Number of active plugins: %d\n", g_list_length(plugins));
+
+
 }
 
 /* callback for gtkpod window's close button */

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to