[nautilus-actions] Move all sources directories under src/
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Subject: [nautilus-actions] Move all sources directories under src/
- Date: Fri, 29 May 2009 08:59:33 -0400 (EDT)
commit 5e24abd150ce0eb30608f864e0ea707e7247bad6
Author: Pierre Wieser <pwieser trychlos org>
Date: Fri May 29 14:56:47 2009 +0200
Move all sources directories under src/
---
ChangeLog | 9 ++
Makefile.am | 5 +-
configure.ac | 13 +-
{plugin => src}/Makefile.am | 30 +----
.../libnautilus-actions}/Makefile.am | 0
.../nautilus-actions-config-gconf-private.h | 0
.../nautilus-actions-config-gconf-reader.c | 0
.../nautilus-actions-config-gconf-reader.h | 0
.../nautilus-actions-config-gconf-writer.c | 0
.../nautilus-actions-config-gconf-writer.h | 0
.../nautilus-actions-config-gconf.c | 0
.../nautilus-actions-config-gconf.h | 0
.../nautilus-actions-config-schema-reader.c | 0
.../nautilus-actions-config-schema-reader.h | 0
.../nautilus-actions-config-schema-writer.c | 0
.../nautilus-actions-config-schema-writer.h | 0
.../libnautilus-actions}/nautilus-actions-config.c | 0
.../libnautilus-actions}/nautilus-actions-config.h | 0
{nact => src/nact}/.gitignore | 0
{nact => src/nact}/Makefile.am | 4 +-
{nact => src/nact}/nact-action-editor.c | 3 +
{nact => src/nact}/nact-action-editor.h | 0
{nact => src/nact}/nact-editor.c | 0
{nact => src/nact}/nact-editor.h | 0
{nact => src/nact}/nact-import-export.c | 0
{nact => src/nact}/nact-import-export.h | 0
{nact => src/nact}/nact-prefs.c | 0
{nact => src/nact}/nact-prefs.h | 0
{nact => src/nact}/nact-profile-editor.c | 0
{nact => src/nact}/nact-profile-editor.h | 0
{nact => src/nact}/nact-utils.c | 0
{nact => src/nact}/nact-utils.h | 0
{nact => src/nact}/nact.c | 0
{nact => src/nact}/nact.desktop.in | 0
{nact => src/nact}/nact.h | 0
{nact => src/nact}/nact.template | 0
{nact => src/nact}/nautilus-actions-config.glade | 0
{plugin => src/plugin}/Makefile.am | 4 +-
{plugin => src/plugin}/nautilus-actions-test.c | 0
{plugin => src/plugin}/nautilus-actions-test.h | 0
{plugin => src/plugin}/nautilus-actions-utils.c | 0
{plugin => src/plugin}/nautilus-actions-utils.h | 0
{plugin => src/plugin}/nautilus-actions.c | 0
{plugin => src/plugin}/nautilus-actions.h | 0
src/plugin/nautilus-module.c | 122 ++++++++++++++++++++
{utils => src/utils}/.gitignore | 0
{utils => src/utils}/Makefile.am | 8 +-
.../utils}/nautilus-actions-check-actions-change.c | 0
{utils => src/utils}/nautilus-actions-new-config.c | 0
.../utils}/nautilus-actions-tools-utils.c | 0
.../utils}/nautilus-actions-tools-utils.h | 0
51 files changed, 155 insertions(+), 43 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9b0f623..a01f511 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2009-05-29 Pierre Wieser <pwieser trychlos org>
+ Move all sources directories under src/
+
+ * configure.ac:
+ * Makefile.am:
+ Updated accordingly.
+ Build and install po/ directory after sources.
+
+2009-05-29 Pierre Wieser <pwieser trychlos org>
+
Include a short application description in all source headers
* plugin/nautilus-module.c:
diff --git a/Makefile.am b/Makefile.am
index 750b523..00fd9b2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -31,11 +31,8 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = \
m4 \
icons \
+ src \
po \
- libnautilus-actions \
- nact \
- $(OPTIONAL_SUBDIR) \
- plugin \
$(NULL)
# a foo directory so that make distcheck has a vpath which is prefixed
diff --git a/configure.ac b/configure.ac
index 3289499..3dab4ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,9 +33,9 @@ AC_INIT([nautilus-actions],[1.11],[maintainer nautilus-actions org])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
-AC_CONFIG_SRCDIR([plugin/nautilus-actions.c])
+AC_CONFIG_SRCDIR([src/plugin/nautilus-module.c])
-AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_FILES([
Makefile
@@ -46,11 +46,12 @@ AC_CONFIG_FILES([
icons/32x32/Makefile
icons/48x48/Makefile
icons/scalable/Makefile
+ src/Makefile
+ src/libnautilus-actions/Makefile
+ src/nact/Makefile
+ src/utils/Makefile
+ src/plugin/Makefile
po/Makefile.in
- libnautilus-actions/Makefile
- nact/Makefile
- utils/Makefile
- plugin/Makefile
])
AC_CONFIG_MACRO_DIR([m4])
diff --git a/plugin/Makefile.am b/src/Makefile.am
similarity index 62%
copy from plugin/Makefile.am
copy to src/Makefile.am
index 8c87bf3..0a618f4 100644
--- a/plugin/Makefile.am
+++ b/src/Makefile.am
@@ -26,29 +26,9 @@
# Pierre Wieser <pwieser trychlos org>
# ... and many others (see AUTHORS)
-AM_CPPFLAGS += \
- -I $(top_srcdir) \
- -DG_LOG_DOMAIN=\"nact\" \
- $(NAUTILUS_ACTIONS_CFLAGS) \
- $(NULL)
-
-nautilus_extensiondir = $(NAUTILUS_EXTENSIONS_DIR)
-
-nautilus_extension_LTLIBRARIES = libnautilus-actions.la
-
-libnautilus_actions_la_SOURCES = \
- nautilus-module.c \
- nautilus-actions.c \
- nautilus-actions.h \
- nautilus-actions-test.c \
- nautilus-actions-test.h \
- nautilus-actions-utils.c \
- nautilus-actions-utils.h \
- $(NULL)
-
-libnautilus_actions_la_LDFLAGS = -module -avoid-version
-
-libnautilus_actions_la_LIBADD = \
- $(top_builddir)/libnautilus-actions/libnautilus-actions.la \
- $(NAUTILUS_ACTIONS_LIBS) \
+SUBDIRS = \
+ libnautilus-actions \
+ nact \
+ $(OPTIONAL_SUBDIR) \
+ plugin \
$(NULL)
diff --git a/libnautilus-actions/Makefile.am b/src/libnautilus-actions/Makefile.am
similarity index 100%
rename from libnautilus-actions/Makefile.am
rename to src/libnautilus-actions/Makefile.am
diff --git a/libnautilus-actions/nautilus-actions-config-gconf-private.h b/src/libnautilus-actions/nautilus-actions-config-gconf-private.h
similarity index 100%
rename from libnautilus-actions/nautilus-actions-config-gconf-private.h
rename to src/libnautilus-actions/nautilus-actions-config-gconf-private.h
diff --git a/libnautilus-actions/nautilus-actions-config-gconf-reader.c b/src/libnautilus-actions/nautilus-actions-config-gconf-reader.c
similarity index 100%
rename from libnautilus-actions/nautilus-actions-config-gconf-reader.c
rename to src/libnautilus-actions/nautilus-actions-config-gconf-reader.c
diff --git a/libnautilus-actions/nautilus-actions-config-gconf-reader.h b/src/libnautilus-actions/nautilus-actions-config-gconf-reader.h
similarity index 100%
rename from libnautilus-actions/nautilus-actions-config-gconf-reader.h
rename to src/libnautilus-actions/nautilus-actions-config-gconf-reader.h
diff --git a/libnautilus-actions/nautilus-actions-config-gconf-writer.c b/src/libnautilus-actions/nautilus-actions-config-gconf-writer.c
similarity index 100%
rename from libnautilus-actions/nautilus-actions-config-gconf-writer.c
rename to src/libnautilus-actions/nautilus-actions-config-gconf-writer.c
diff --git a/libnautilus-actions/nautilus-actions-config-gconf-writer.h b/src/libnautilus-actions/nautilus-actions-config-gconf-writer.h
similarity index 100%
rename from libnautilus-actions/nautilus-actions-config-gconf-writer.h
rename to src/libnautilus-actions/nautilus-actions-config-gconf-writer.h
diff --git a/libnautilus-actions/nautilus-actions-config-gconf.c b/src/libnautilus-actions/nautilus-actions-config-gconf.c
similarity index 100%
rename from libnautilus-actions/nautilus-actions-config-gconf.c
rename to src/libnautilus-actions/nautilus-actions-config-gconf.c
diff --git a/libnautilus-actions/nautilus-actions-config-gconf.h b/src/libnautilus-actions/nautilus-actions-config-gconf.h
similarity index 100%
rename from libnautilus-actions/nautilus-actions-config-gconf.h
rename to src/libnautilus-actions/nautilus-actions-config-gconf.h
diff --git a/libnautilus-actions/nautilus-actions-config-schema-reader.c b/src/libnautilus-actions/nautilus-actions-config-schema-reader.c
similarity index 100%
rename from libnautilus-actions/nautilus-actions-config-schema-reader.c
rename to src/libnautilus-actions/nautilus-actions-config-schema-reader.c
diff --git a/libnautilus-actions/nautilus-actions-config-schema-reader.h b/src/libnautilus-actions/nautilus-actions-config-schema-reader.h
similarity index 100%
rename from libnautilus-actions/nautilus-actions-config-schema-reader.h
rename to src/libnautilus-actions/nautilus-actions-config-schema-reader.h
diff --git a/libnautilus-actions/nautilus-actions-config-schema-writer.c b/src/libnautilus-actions/nautilus-actions-config-schema-writer.c
similarity index 100%
rename from libnautilus-actions/nautilus-actions-config-schema-writer.c
rename to src/libnautilus-actions/nautilus-actions-config-schema-writer.c
diff --git a/libnautilus-actions/nautilus-actions-config-schema-writer.h b/src/libnautilus-actions/nautilus-actions-config-schema-writer.h
similarity index 100%
rename from libnautilus-actions/nautilus-actions-config-schema-writer.h
rename to src/libnautilus-actions/nautilus-actions-config-schema-writer.h
diff --git a/libnautilus-actions/nautilus-actions-config.c b/src/libnautilus-actions/nautilus-actions-config.c
similarity index 100%
rename from libnautilus-actions/nautilus-actions-config.c
rename to src/libnautilus-actions/nautilus-actions-config.c
diff --git a/libnautilus-actions/nautilus-actions-config.h b/src/libnautilus-actions/nautilus-actions-config.h
similarity index 100%
rename from libnautilus-actions/nautilus-actions-config.h
rename to src/libnautilus-actions/nautilus-actions-config.h
diff --git a/nact/.gitignore b/src/nact/.gitignore
similarity index 100%
rename from nact/.gitignore
rename to src/nact/.gitignore
diff --git a/nact/Makefile.am b/src/nact/Makefile.am
similarity index 95%
rename from nact/Makefile.am
rename to src/nact/Makefile.am
index 00f7e5f..9aeb178 100644
--- a/nact/Makefile.am
+++ b/src/nact/Makefile.am
@@ -54,8 +54,8 @@ nautilus_actions_config_SOURCES = \
$(NULL)
nautilus_actions_config_LDADD = \
- $(top_builddir)/libnautilus-actions/libnautilus-actions.la \
- $(NAUTILUS_ACTIONS_LIBS) \
+ $(top_builddir)/src/libnautilus-actions/libnautilus-actions.la \
+ $(NAUTILUS_ACTIONS_LIBS) \
$(NULL)
gladedir = $(datadir)/nautilus-actions/nact
diff --git a/nact/nact-action-editor.c b/src/nact/nact-action-editor.c
similarity index 99%
rename from nact/nact-action-editor.c
rename to src/nact/nact-action-editor.c
index 4f790d4..6a7b211 100644
--- a/nact/nact-action-editor.c
+++ b/src/nact/nact-action-editor.c
@@ -28,6 +28,9 @@
* ... and many others (see AUTHORS)
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <string.h>
#include <glib/gi18n.h>
#include <gtk/gtkdialog.h>
diff --git a/nact/nact-action-editor.h b/src/nact/nact-action-editor.h
similarity index 100%
rename from nact/nact-action-editor.h
rename to src/nact/nact-action-editor.h
diff --git a/nact/nact-editor.c b/src/nact/nact-editor.c
similarity index 100%
rename from nact/nact-editor.c
rename to src/nact/nact-editor.c
diff --git a/nact/nact-editor.h b/src/nact/nact-editor.h
similarity index 100%
rename from nact/nact-editor.h
rename to src/nact/nact-editor.h
diff --git a/nact/nact-import-export.c b/src/nact/nact-import-export.c
similarity index 100%
rename from nact/nact-import-export.c
rename to src/nact/nact-import-export.c
diff --git a/nact/nact-import-export.h b/src/nact/nact-import-export.h
similarity index 100%
rename from nact/nact-import-export.h
rename to src/nact/nact-import-export.h
diff --git a/nact/nact-prefs.c b/src/nact/nact-prefs.c
similarity index 100%
rename from nact/nact-prefs.c
rename to src/nact/nact-prefs.c
diff --git a/nact/nact-prefs.h b/src/nact/nact-prefs.h
similarity index 100%
rename from nact/nact-prefs.h
rename to src/nact/nact-prefs.h
diff --git a/nact/nact-profile-editor.c b/src/nact/nact-profile-editor.c
similarity index 100%
rename from nact/nact-profile-editor.c
rename to src/nact/nact-profile-editor.c
diff --git a/nact/nact-profile-editor.h b/src/nact/nact-profile-editor.h
similarity index 100%
rename from nact/nact-profile-editor.h
rename to src/nact/nact-profile-editor.h
diff --git a/nact/nact-utils.c b/src/nact/nact-utils.c
similarity index 100%
rename from nact/nact-utils.c
rename to src/nact/nact-utils.c
diff --git a/nact/nact-utils.h b/src/nact/nact-utils.h
similarity index 100%
rename from nact/nact-utils.h
rename to src/nact/nact-utils.h
diff --git a/nact/nact.c b/src/nact/nact.c
similarity index 100%
rename from nact/nact.c
rename to src/nact/nact.c
diff --git a/nact/nact.desktop.in b/src/nact/nact.desktop.in
similarity index 100%
rename from nact/nact.desktop.in
rename to src/nact/nact.desktop.in
diff --git a/nact/nact.h b/src/nact/nact.h
similarity index 100%
rename from nact/nact.h
rename to src/nact/nact.h
diff --git a/nact/nact.template b/src/nact/nact.template
similarity index 100%
rename from nact/nact.template
rename to src/nact/nact.template
diff --git a/nact/nautilus-actions-config.glade b/src/nact/nautilus-actions-config.glade
similarity index 100%
rename from nact/nautilus-actions-config.glade
rename to src/nact/nautilus-actions-config.glade
diff --git a/plugin/Makefile.am b/src/plugin/Makefile.am
similarity index 94%
rename from plugin/Makefile.am
rename to src/plugin/Makefile.am
index 8c87bf3..d79a4cd 100644
--- a/plugin/Makefile.am
+++ b/src/plugin/Makefile.am
@@ -49,6 +49,6 @@ libnautilus_actions_la_SOURCES = \
libnautilus_actions_la_LDFLAGS = -module -avoid-version
libnautilus_actions_la_LIBADD = \
- $(top_builddir)/libnautilus-actions/libnautilus-actions.la \
- $(NAUTILUS_ACTIONS_LIBS) \
+ $(top_builddir)/src/libnautilus-actions/libnautilus-actions.la \
+ $(NAUTILUS_ACTIONS_LIBS) \
$(NULL)
diff --git a/plugin/nautilus-actions-test.c b/src/plugin/nautilus-actions-test.c
similarity index 100%
rename from plugin/nautilus-actions-test.c
rename to src/plugin/nautilus-actions-test.c
diff --git a/plugin/nautilus-actions-test.h b/src/plugin/nautilus-actions-test.h
similarity index 100%
rename from plugin/nautilus-actions-test.h
rename to src/plugin/nautilus-actions-test.h
diff --git a/plugin/nautilus-actions-utils.c b/src/plugin/nautilus-actions-utils.c
similarity index 100%
rename from plugin/nautilus-actions-utils.c
rename to src/plugin/nautilus-actions-utils.c
diff --git a/plugin/nautilus-actions-utils.h b/src/plugin/nautilus-actions-utils.h
similarity index 100%
rename from plugin/nautilus-actions-utils.h
rename to src/plugin/nautilus-actions-utils.h
diff --git a/plugin/nautilus-actions.c b/src/plugin/nautilus-actions.c
similarity index 100%
rename from plugin/nautilus-actions.c
rename to src/plugin/nautilus-actions.c
diff --git a/plugin/nautilus-actions.h b/src/plugin/nautilus-actions.h
similarity index 100%
rename from plugin/nautilus-actions.h
rename to src/plugin/nautilus-actions.h
diff --git a/src/plugin/nautilus-module.c b/src/plugin/nautilus-module.c
new file mode 100644
index 0000000..0df4742
--- /dev/null
+++ b/src/plugin/nautilus-module.c
@@ -0,0 +1,122 @@
+/*
+ * Nautilus Actions
+ * A Nautilus extension which offers configurable context menu actions.
+ *
+ * Copyright (C) 2005 The GNOME Foundation
+ * Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
+ * Copyright (C) 2009 Pierre Wieser and others (see AUTHORS)
+ *
+ * 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 Library; see the file COPYING. If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place,
+ * Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ * Frederic Ruaudel <grumz grumz net>
+ * Rodrigo Moya <rodrigo gnome-db org>
+ * Pierre Wieser <pwieser trychlos org>
+ * ... and many others (see AUTHORS)
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <syslog.h>
+#include <libnautilus-extension/nautilus-extension-types.h>
+#include "nautilus-actions.h"
+
+static guint st_log_handler = 0;
+
+#ifdef NACT_MAINTAINER_MODE
+static void nact_log_handler( const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data );
+#endif
+
+/*
+ * A nautilus extension must implement three functions :
+ *
+ * - nautilus_module_initialize
+ * - nautilus_module_list_types
+ * - nautilus_module_shutdown
+ *
+ * The first two functions are called at nautilus startup.
+ *
+ * The prototypes for these functions are defined in nautilus-extension-types.h
+ */
+
+void
+nautilus_module_initialize( GTypeModule *module )
+{
+#ifdef NACT_MAINTAINER_MODE
+ /*
+ * install a debug log handler
+ * (if development mode and not already done)
+ */
+ if( !st_log_handler ){
+ openlog( G_LOG_DOMAIN, LOG_PID, LOG_USER );
+ st_log_handler = g_log_set_handler( G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, nact_log_handler, NULL );
+ }
+#endif
+
+ static const gchar *thisfn = "nautilus_module_initialize";
+ g_debug( "%s: module=%p", thisfn, module );
+
+ nautilus_actions_register_type( module );
+}
+
+void
+nautilus_module_list_types( const GType **types, int *num_types )
+{
+ static const gchar *thisfn = "nautilus_module_list_types";
+ g_debug( "%s: types=%p, num_types=%p", thisfn, types, num_types );
+
+ static GType type_list[1];
+
+ type_list[0] = NAUTILUS_ACTIONS_TYPE;
+ *types = type_list;
+
+ *num_types = 1;
+}
+
+void
+nautilus_module_shutdown( void )
+{
+ static const gchar *thisfn = "nautilus_module_shutdown";
+ g_debug( "%s", thisfn );
+
+ /* remove the log handler
+ * almost useless as the process is nonetheless terminating at this time
+ * but this is the art of coding...
+ */
+ if( st_log_handler ){
+ g_log_remove_handler( G_LOG_DOMAIN, st_log_handler );
+ st_log_handler = 0;
+ }
+}
+
+/*
+ * a log handler that we install when in development mode in order to be
+ * able to log plugin runtime
+ * TODO: the debug flag should be dynamic, so that an advanced user could
+ * setup a given key and obtain a full log to send to Bugzilla..
+ * For now, is always install when compiled in maintainer mode, never else
+ */
+#ifdef NACT_MAINTAINER_MODE
+static void
+nact_log_handler( const gchar *log_domain,
+ GLogLevelFlags log_level,
+ const gchar *message,
+ gpointer user_data )
+{
+ syslog( LOG_USER | LOG_DEBUG, "%s", message );
+}
+#endif
diff --git a/utils/.gitignore b/src/utils/.gitignore
similarity index 100%
rename from utils/.gitignore
rename to src/utils/.gitignore
diff --git a/utils/Makefile.am b/src/utils/Makefile.am
similarity index 89%
rename from utils/Makefile.am
rename to src/utils/Makefile.am
index dfeb77c..d5c6595 100644
--- a/utils/Makefile.am
+++ b/src/utils/Makefile.am
@@ -44,14 +44,14 @@ nautilus_actions_new_config_SOURCES = \
$(NULL)
nautilus_actions_new_config_LDADD = \
- $(top_builddir)/libnautilus-actions/libnautilus-actions.la \
- $(NAUTILUS_ACTIONS_UTILS_LIBS) \
+ $(top_builddir)/src/libnautilus-actions/libnautilus-actions.la \
+ $(NAUTILUS_ACTIONS_UTILS_LIBS) \
$(NULL)
nautilus_actions_check_actions_change_SOURCES = \
nautilus-actions-check-actions-change.c
nautilus_actions_check_actions_change_LDADD = \
- $(top_builddir)/libnautilus-actions/libnautilus-actions.la \
- $(NAUTILUS_ACTIONS_LIBS) \
+ $(top_builddir)/src/libnautilus-actions/libnautilus-actions.la \
+ $(NAUTILUS_ACTIONS_LIBS) \
$(NULL)
diff --git a/utils/nautilus-actions-check-actions-change.c b/src/utils/nautilus-actions-check-actions-change.c
similarity index 100%
rename from utils/nautilus-actions-check-actions-change.c
rename to src/utils/nautilus-actions-check-actions-change.c
diff --git a/utils/nautilus-actions-new-config.c b/src/utils/nautilus-actions-new-config.c
similarity index 100%
rename from utils/nautilus-actions-new-config.c
rename to src/utils/nautilus-actions-new-config.c
diff --git a/utils/nautilus-actions-tools-utils.c b/src/utils/nautilus-actions-tools-utils.c
similarity index 100%
rename from utils/nautilus-actions-tools-utils.c
rename to src/utils/nautilus-actions-tools-utils.c
diff --git a/utils/nautilus-actions-tools-utils.h b/src/utils/nautilus-actions-tools-utils.h
similarity index 100%
rename from utils/nautilus-actions-tools-utils.h
rename to src/utils/nautilus-actions-tools-utils.h
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]