summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorRamiro Estrugo <ramiro@src.gnome.org>2001-04-20 01:19:23 +0000
committerRamiro Estrugo <ramiro@src.gnome.org>2001-04-20 01:19:23 +0000
commite1a79e2f6033e2c20a04fef911fb327cac50ea92 (patch)
tree3d6badfface54bb63ed8eb4cc3d27ac83f4c5b58 /components
parent7245763900b5b466e93fd4accd1d59ef19120048 (diff)
downloadnautilus-e1a79e2f6033e2c20a04fef911fb327cac50ea92.tar.gz
Make all standard components call the eel function to stop in the debugger
* components/hardware/main.c: (main): * components/help/hyperbola-main.c: (main): * components/history/nautilus-history-view.c: (main): * components/image-viewer/nautilus-image-view.c: (main): * components/music/main.c: (main): * components/notes/Makefile.am: * components/notes/nautilus-notes.c: (main): * components/text/main.c: (main): * components/throbber/main.c: (main): Make all standard components call the eel function to stop in the debugger after warnings and criticals. This also makes then spew nicer messages that include the process id and program name.
Diffstat (limited to 'components')
-rw-r--r--components/hardware/main.c10
-rw-r--r--components/help/hyperbola-main.c10
-rw-r--r--components/history/nautilus-history-view.c8
-rw-r--r--components/image-viewer/nautilus-image-view.c8
-rw-r--r--components/music/main.c8
-rw-r--r--components/notes/Makefile.am1
-rw-r--r--components/notes/nautilus-notes.c5
-rw-r--r--components/text/main.c8
-rw-r--r--components/throbber/main.c22
9 files changed, 57 insertions, 23 deletions
diff --git a/components/hardware/main.c b/components/hardware/main.c
index 3297e2cf0..4dbd10a6b 100644
--- a/components/hardware/main.c
+++ b/components/hardware/main.c
@@ -26,10 +26,11 @@
#include "nautilus-hardware-view.h"
+#include <bonobo.h>
+#include <eel/eel-debug.h>
#include <gnome.h>
#include <libgnomevfs/gnome-vfs.h>
#include <liboaf/liboaf.h>
-#include <bonobo.h>
static int object_count = 0;
@@ -75,6 +76,13 @@ int main(int argc, char *argv[])
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
textdomain (PACKAGE);
#endif
+
+ /* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
+ * Unfortunately, this has to be done explicitly for each domain.
+ */
+ if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
+ eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
+ }
CORBA_exception_init(&ev);
diff --git a/components/help/hyperbola-main.c b/components/help/hyperbola-main.c
index 7af9cf178..55ceb1d26 100644
--- a/components/help/hyperbola-main.c
+++ b/components/help/hyperbola-main.c
@@ -23,9 +23,10 @@
#include <config.h>
#include <bonobo.h>
+#include <eel/eel-debug.h>
#include <gnome.h>
-#include <liboaf/liboaf.h>
#include <libnautilus-extensions/nautilus-global-preferences.h>
+#include <liboaf/liboaf.h>
#include "hyperbola-nav.h"
@@ -83,6 +84,13 @@ main (int argc, char *argv[])
textdomain (PACKAGE);
#endif
+ /* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
+ * Unfortunately, this has to be done explicitly for each domain.
+ */
+ if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
+ eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
+ }
+
/* Disable session manager connection */
gnome_client_disable_master_connection ();
diff --git a/components/history/nautilus-history-view.c b/components/history/nautilus-history-view.c
index 1bae1a7d4..e4999596e 100644
--- a/components/history/nautilus-history-view.c
+++ b/components/history/nautilus-history-view.c
@@ -28,6 +28,7 @@
#include <config.h>
#include <bonobo/bonobo-ui-util.h>
+#include <eel/eel-debug.h>
#include <eel/eel-gdk-pixbuf-extensions.h>
#include <eel/eel-gtk-macros.h>
#include <gtk/gtkclist.h>
@@ -333,6 +334,13 @@ nautilus_history_view_destroy (GtkObject *object)
int
main (int argc, char *argv[])
{
+ /* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
+ * Unfortunately, this has to be done explicitly for each domain.
+ */
+ if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
+ eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
+ }
+
return nautilus_view_standard_main ("nautilus_history-view",
VERSION,
PACKAGE,
diff --git a/components/image-viewer/nautilus-image-view.c b/components/image-viewer/nautilus-image-view.c
index d3352d603..6bbf8032a 100644
--- a/components/image-viewer/nautilus-image-view.c
+++ b/components/image-viewer/nautilus-image-view.c
@@ -31,6 +31,7 @@
#include <bonobo.h>
+#include <eel/eel-debug.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk-pixbuf/gdk-pixbuf-loader.h>
#include <libart_lgpl/art_misc.h>
@@ -844,6 +845,13 @@ main (int argc, char *argv [])
textdomain (PACKAGE);
#endif
+ /* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
+ * Unfortunately, this has to be done explicitly for each domain.
+ */
+ if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
+ eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
+ }
+
init_server_factory (argc, argv);
init_bonobo_image_generic_factory ();
diff --git a/components/music/main.c b/components/music/main.c
index ef9b0ef9e..84f9dc717 100644
--- a/components/music/main.c
+++ b/components/music/main.c
@@ -30,6 +30,7 @@
#include "nautilus-music-view.h"
#include <libnautilus/nautilus-view-standard-main.h>
#include <libnautilus-extensions/nautilus-global-preferences.h>
+#include <eel/eel-debug.h>
#define FACTORY_IID "OAFIID:nautilus_music_view_factory:1be0c129-87cd-4daa-9d3a-94397de9bce2"
#define VIEW_IID "OAFIID:nautilus_music_view:9456b5d2-60a8-407f-a56e-d561e1821391"
@@ -37,6 +38,13 @@
int
main (int argc, char *argv[])
{
+ /* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
+ * Unfortunately, this has to be done explicitly for each domain.
+ */
+ if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
+ eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
+ }
+
return nautilus_view_standard_main ("nautilus-music-view",
VERSION,
PACKAGE,
diff --git a/components/notes/Makefile.am b/components/notes/Makefile.am
index 1e9a7ef21..a6275a6dc 100644
--- a/components/notes/Makefile.am
+++ b/components/notes/Makefile.am
@@ -3,6 +3,7 @@ NULL =
bin_PROGRAMS=nautilus-notes
INCLUDES=\
+ -DG_LOG_DOMAIN=\"Nautilus-Notes\" \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_builddir)/libnautilus \
diff --git a/components/notes/nautilus-notes.c b/components/notes/nautilus-notes.c
index 40302f856..41a678a36 100644
--- a/components/notes/nautilus-notes.c
+++ b/components/notes/nautilus-notes.c
@@ -423,9 +423,8 @@ main(int argc, char *argv[])
/* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
* Unfortunately, this has to be done explicitly for each domain.
*/
- if (g_getenv("NAUTILUS_DEBUG") != NULL) {
- eel_make_warnings_and_criticals_stop_in_debugger
- (G_LOG_DOMAIN, g_log_domain_glib, "Gdk", "Gtk", "GnomeVFS", "GnomeUI", "Bonobo", NULL);
+ if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
+ eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
}
return nautilus_view_standard_main ("nautilus-notes",
diff --git a/components/text/main.c b/components/text/main.c
index 40b32df18..83a271e2a 100644
--- a/components/text/main.c
+++ b/components/text/main.c
@@ -30,6 +30,7 @@
#include "nautilus-text-view.h"
#include <libnautilus-extensions/nautilus-global-preferences.h>
#include <libnautilus/nautilus-view-standard-main.h>
+#include <eel/eel-debug.h>
#define FACTORY_IID "OAFIID:nautilus_text_view_factory:124ae209-d356-418f-8757-54e071cb3a21"
#define VIEW_IID "OAFIID:nautilus_text_view:fa466311-17c1-435c-8231-c9fc434b6437"
@@ -37,6 +38,13 @@
int
main (int argc, char *argv[])
{
+ /* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
+ * Unfortunately, this has to be done explicitly for each domain.
+ */
+ if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
+ eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
+ }
+
return nautilus_view_standard_main ("nautilus-text-view",
VERSION,
PACKAGE,
diff --git a/components/throbber/main.c b/components/throbber/main.c
index fba42d93f..4a0d01860 100644
--- a/components/throbber/main.c
+++ b/components/throbber/main.c
@@ -31,6 +31,7 @@
#include <eel/eel-debug.h>
#include <libnautilus-extensions/nautilus-global-preferences.h>
#include <liboaf/liboaf.h>
+#include <eel/eel-debug.h>
static int object_count = 0;
@@ -72,26 +73,11 @@ main (int argc, char *argv[])
CORBA_ORB orb;
char *registration_id;
- /* Make criticals and warnings stop in the debugger if
- * NAUTILUS_DEBUG is set. Unfortunately, this has to be done
- * explicitly for each domain.
+ /* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set.
+ * Unfortunately, this has to be done explicitly for each domain.
*/
if (g_getenv ("NAUTILUS_DEBUG") != NULL) {
- eel_make_warnings_and_criticals_stop_in_debugger
- (G_LOG_DOMAIN, g_log_domain_glib,
- "Bonobo",
- "Gdk",
- "GnomeUI",
- "GnomeVFS",
- "GnomeVFS-CORBA",
- "GnomeVFS-pthread",
- "Gtk",
- "Gdk-Pixbuf",
- "Nautilus",
- "Nautilus-Authenticate",
- "Nautilus-Tree",
- "ORBit",
- NULL);
+ eel_make_warnings_and_criticals_stop_in_debugger (G_LOG_DOMAIN, NULL);
}
/* Disable session manager connection */