[nautilus-actions] Move log handler to nautilus-module.c
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Subject: [nautilus-actions] Move log handler to nautilus-module.c
- Date: Fri, 29 May 2009 04:43:32 -0400 (EDT)
commit 9d56ad9bbcbc62177560e815e5f2ed9690d73011
Author: Pierre Wieser <pwieser trychlos org>
Date: Fri May 29 10:40:54 2009 +0200
Move log handler to nautilus-module.c
---
ChangeLog | 3 ++
plugin/nautilus-actions-module.c | 53 --------------------------------------
plugin/nautilus-actions.c | 43 ------------------------------
3 files changed, 3 insertions(+), 96 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 06c9473..9b0f623 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@
* plugin/nautilus-module.c:
Renamed from plugin/nautilus-actions-module.c.
+ * plugin/nautilus-actions.c:
+ Move log handler to nautilus-module.c.
+
* plugin/Makefile.am:
Updated accordingly.
diff --git a/plugin/nautilus-actions-module.c b/plugin/nautilus-actions-module.c
deleted file mode 100644
index 5fd74da..0000000
--- a/plugin/nautilus-actions-module.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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)
- */
-
-#include <libnautilus-extension/nautilus-extension-types.h>
-#include <libnautilus-extension/nautilus-column-provider.h>
-#include "nautilus-actions.h"
-#include "nautilus-actions-utils.h"
-
-void nautilus_module_initialize (GTypeModule*module)
-{
- nautilus_actions_register_type (module);
-}
-
-void nautilus_module_shutdown (void)
-{
-}
-
-void nautilus_module_list_types (const GType **types, int *num_types)
-{
- static GType type_list[1];
-
- type_list[0] = NAUTILUS_ACTIONS_TYPE;
- *types = type_list;
-
- *num_types = 1;
-}
diff --git a/plugin/nautilus-actions.c b/plugin/nautilus-actions.c
index 340ad47..6fd9b0f 100644
--- a/plugin/nautilus-actions.c
+++ b/plugin/nautilus-actions.c
@@ -30,7 +30,6 @@
#include <config.h>
#include <string.h>
-#include <syslog.h>
#include <libgnomevfs/gnome-vfs.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libgnomevfs/gnome-vfs-file-info.h>
@@ -46,11 +45,6 @@
static GObjectClass *parent_class = NULL;
static GType actions_type = 0;
-static guint 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
GType nautilus_actions_get_type (void)
{
@@ -264,15 +258,6 @@ static void nautilus_actions_instance_finalize (GObject* obj)
/*NautilusActions* self = NAUTILUS_ACTIONS (obj);*/
- /* remove the log handler
- * almost useless as the process is nonetheless terminating at this time
- * but this is the beauty of the code...
- */
- if( log_handler ){
- g_log_remove_handler( G_LOG_DOMAIN, log_handler );
- log_handler = 0;
- }
-
/* Chain up to the parent class */
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -339,16 +324,6 @@ static void nautilus_actions_class_init (NautilusActionsClass *actions_class)
void nautilus_actions_register_type (GTypeModule *module)
{
- /* install a debug log handler
- * (if development mode and not already done)
- */
-#ifdef NACT_MAINTAINER_MODE
- if( !log_handler ){
- openlog( G_LOG_DOMAIN, LOG_PID, LOG_USER );
- log_handler = g_log_set_handler( G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, nact_log_handler, NULL );
- }
-#endif
-
static const gchar *thisfn = "nautilus_actions_register_type";
g_debug( "%s: module=%p", thisfn, module );
@@ -380,21 +355,3 @@ void nautilus_actions_register_type (GTypeModule *module)
NAUTILUS_TYPE_MENU_PROVIDER,
&menu_provider_iface_info);
}
-
-/*
- * a log handler that we install when in development mode in order to be
- * able to log plugin runtime
- * TODO: add a debug flag in GConf, 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]