1
0
mirror of https://gitlab.gnome.org/GNOME/nautilus synced 2024-07-07 20:07:07 +00:00

general: remove eel-debug

Oversight from https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/1319
where this was forgotten.
This commit is contained in:
Peter Eisenmann 2023-11-05 13:07:38 +01:00
parent f542b7fc84
commit ba8a8fd373
7 changed files with 0 additions and 154 deletions

View File

@ -1,105 +0,0 @@
/*
* eel-debug.c: Eel debugging aids.
*
* Copyright (C) 2000, 2001 Eazel, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library 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 Library General Public
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
*
* Author: Darin Adler <darin@eazel.com>
*/
#include <config.h>
#include "eel-debug.h"
#include <glib.h>
#include <signal.h>
#include <stdio.h>
typedef struct
{
gpointer data;
GFreeFunc function;
} ShutdownFunction;
static GList *shutdown_functions;
/* Raise a SIGINT signal to get the attention of the debugger.
* When not running under the debugger, we don't want to stop,
* so we ignore the signal for just the moment that we raise it.
*/
static void
eel_stop_in_debugger (void)
{
void (*saved_handler) (int);
saved_handler = signal (SIGINT, SIG_IGN);
raise (SIGINT);
signal (SIGINT, saved_handler);
}
/* Stop in the debugger after running the default log handler.
* This makes certain kinds of messages stop in the debugger
* without making them fatal (you can continue).
*/
static void
log_handler (const char *domain,
GLogLevelFlags level,
const char *message,
gpointer data)
{
g_log_default_handler (domain, level, message, data);
if ((level & (G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING)) != 0)
{
eel_stop_in_debugger ();
}
}
void
eel_make_warnings_and_criticals_stop_in_debugger (void)
{
g_log_set_default_handler (log_handler, NULL);
}
void
eel_debug_shut_down (void)
{
ShutdownFunction *f;
while (shutdown_functions != NULL)
{
f = shutdown_functions->data;
shutdown_functions = g_list_remove (shutdown_functions, f);
f->function (f->data);
g_free (f);
}
}
void
eel_debug_call_at_shutdown (EelFunction function)
{
eel_debug_call_at_shutdown_with_data ((GFreeFunc) function, NULL);
}
void
eel_debug_call_at_shutdown_with_data (GFreeFunc function,
gpointer data)
{
ShutdownFunction *f;
f = g_new (ShutdownFunction, 1);
f->data = data;
f->function = function;
shutdown_functions = g_list_prepend (shutdown_functions, f);
}

View File

@ -1,40 +0,0 @@
/*
eel-debug.h: Eel debugging aids.
Copyright (C) 2000, 2001 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library 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 Library General Public
License along with this program; if not, see <http://www.gnu.org/licenses/>.
Author: Darin Adler <darin@eazel.com>
*/
#pragma once
#include <glib.h>
G_BEGIN_DECLS
typedef void (* EelFunction) (void);
void eel_make_warnings_and_criticals_stop_in_debugger (void);
/* A way to do cleanup at exit for compatibility with shutdown tools
* like the ones in Bonobo.
*/
void eel_debug_shut_down (void);
void eel_debug_call_at_shutdown (EelFunction function);
void eel_debug_call_at_shutdown_with_data (GFreeFunc function,
gpointer data);
G_END_DECLS

View File

@ -1,6 +1,4 @@
libeel_2_sources = [
'eel-debug.h',
'eel-debug.c',
'eel-stock-dialogs.h',
'eel-stock-dialogs.c',
'eel-vfs-extensions.h',

View File

@ -34,7 +34,6 @@
#include "nautilus-search-directory.h"
#include "nautilus-starred-directory.h"
#include "nautilus-ui-utilities.h"
#include <eel/eel-debug.h>
#include <eel/eel-vfs-extensions.h>
#include <glib.h>
#include <glib/gi18n.h>

View File

@ -30,8 +30,6 @@
#include "nautilus-application.h"
#include "nautilus-resources.h"
#include <eel/eel-debug.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <gio/gdesktopappinfo.h>
@ -77,7 +75,5 @@ main (int argc,
g_object_unref (application);
eel_debug_shut_down ();
return retval;
}

View File

@ -23,7 +23,6 @@
#include <config.h>
#include "nautilus-module.h"
#include <eel/eel-debug.h>
#include <gmodule.h>
#define NAUTILUS_TYPE_MODULE (nautilus_module_get_type ())

View File

@ -26,7 +26,6 @@
#include <config.h>
#include "nautilus-signaller.h"
#include <eel/eel-debug.h>
typedef GObject NautilusSignaller;
typedef GObjectClass NautilusSignallerClass;