[metacity] util: remove meta_fatal
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] util: remove meta_fatal
- Date: Fri, 10 Mar 2017 20:21:56 +0000 (UTC)
commit 7ca7e1e5a6c06d7f80ef51b1e272ee333b3235f7
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Mar 10 14:25:45 2017 +0200
util: remove meta_fatal
src/core/main.c | 11 +++++++----
src/core/util.c | 26 --------------------------
src/include/util.h | 3 ---
src/ui/ui.c | 5 ++++-
4 files changed, 11 insertions(+), 34 deletions(-)
---
diff --git a/src/core/main.c b/src/core/main.c
index 8fb5450..cb9b640 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -430,7 +430,10 @@ main (int argc, char **argv)
meta_set_replace_current_wm (TRUE);
if (meta_args.save_file && meta_args.client_id)
- meta_fatal ("Can't specify both SM save file and SM client id\n");
+ {
+ g_critical ("Can't specify both SM save file and SM client id");
+ exit (EXIT_FAILURE);
+ }
meta_main_loop = g_main_loop_new (NULL, FALSE);
@@ -498,9 +501,9 @@ main (int argc, char **argv)
NULL,
&err))
{
- meta_fatal (_("Failed to restart: %s\n"),
- err->message);
- g_error_free (err); /* not reached anyhow */
+ g_critical ("Failed to restart: %s", err->message);
+ g_error_free (err);
+
meta_exit_code = META_EXIT_ERROR;
}
}
diff --git a/src/core/util.c b/src/core/util.c
index f07d2b6..c1cbcb4 100644
--- a/src/core/util.c
+++ b/src/core/util.c
@@ -285,32 +285,6 @@ meta_topic (MetaDebugTopic topic,
}
void
-meta_fatal (const char *format, ...)
-{
- va_list args;
- gchar *str;
- FILE *out;
-
- g_return_if_fail (format != NULL);
-
- va_start (args, format);
- str = g_strdup_vprintf (format, args);
- va_end (args);
-
- out = logfile ? logfile : stderr;
-
- if (no_prefix == 0)
- utf8_fputs (_("Window manager error: "), out);
- utf8_fputs (str, out);
-
- fflush (out);
-
- g_free (str);
-
- meta_exit (META_EXIT_ERROR);
-}
-
-void
meta_push_no_msg_prefix (void)
{
++no_prefix;
diff --git a/src/include/util.h b/src/include/util.h
index d54a150..c5c05db 100644
--- a/src/include/util.h
+++ b/src/include/util.h
@@ -38,9 +38,6 @@ void meta_set_replace_current_wm (gboolean setting);
void meta_verbose (const char *format,
...) G_GNUC_PRINTF (1, 2);
-void meta_fatal (const char *format,
- ...) G_GNUC_PRINTF (1, 2);
-
typedef enum
{
META_DEBUG_FOCUS = 1 << 0,
diff --git a/src/ui/ui.c b/src/ui/ui.c
index 84fa4e0..533d0a6 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -74,7 +74,10 @@ meta_ui_init (int *argc, char ***argv)
gdk_set_allowed_backends ("x11");
if (!gtk_init_check (argc, argv))
- meta_fatal ("Unable to open X display %s\n", XDisplayName (NULL));
+ {
+ g_critical ("Unable to open X display %s", XDisplayName (NULL));
+ exit (EXIT_FAILURE);
+ }
/* We need to be able to fully trust that the window and monitor sizes
* that GDK reports corresponds to the X ones, so we disable the automatic
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]