Commit 9f889030 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels

build: remove --disable-verbose-mode

parent dea69df1
......@@ -149,15 +149,6 @@ if test x$enable_canberra = xyes; then
METACITY_PC_MODULES="$METACITY_PC_MODULES libcanberra-gtk3"
fi
AC_ARG_ENABLE(verbose-mode,
AC_HELP_STRING([--disable-verbose-mode],
[disable metacity's ability to do verbose logging, for embedded/size-sensitive custom builds]),,
enable_verbose_mode=yes)
if test x$enable_verbose_mode = xyes; then
AC_DEFINE(WITH_VERBOSE_MODE,1,[Build with verbose mode support])
fi
AC_ARG_ENABLE(sm,
AC_HELP_STRING([--disable-sm],
[disable metacity's session management support, for embedded/size-sensitive custom non-GNOME builds]),,
......
......@@ -1305,7 +1305,6 @@ do_screen_and_xinerama_relative_constraints (
gboolean exit_early = FALSE, constraint_satisfied;
MetaRectangle how_far_it_can_be_smushed, min_size, max_size;
#ifdef WITH_VERBOSE_MODE
if (meta_is_verbose ())
{
/* First, log some debugging information */
......@@ -1316,7 +1315,6 @@ do_screen_and_xinerama_relative_constraints (
meta_rectangle_region_to_string (region_spanning_rectangles, ", ",
spanning_region));
}
#endif
/* Determine whether constraint applies; exit if it doesn't */
how_far_it_can_be_smushed = info->current;
......
......@@ -132,10 +132,8 @@ static MetaDisplay *the_display = NULL;
static gboolean mousemods_disabled = FALSE;
#ifdef WITH_VERBOSE_MODE
static void meta_spew_event (MetaDisplay *display,
XEvent *event);
#endif
static gboolean event_callback (XEvent *event,
gpointer data);
......@@ -983,9 +981,7 @@ meta_get_display (void)
return the_display;
}
#ifdef WITH_VERBOSE_MODE
static gboolean dump_events = TRUE;
#endif
static gboolean
grab_op_is_mouse_only (MetaGrabOp op)
......@@ -1581,7 +1577,6 @@ handle_window_focus_event (MetaDisplay *display,
XEvent *event)
{
MetaWindow *focus_window;
#ifdef WITH_VERBOSE_MODE
const char *window_type;
/* Note the event can be on either the window or the frame,
......@@ -1614,7 +1609,6 @@ handle_window_focus_event (MetaDisplay *display,
meta_event_mode_to_string (event->xfocus.mode),
meta_event_detail_to_string (event->xfocus.detail),
event->xfocus.serial);
#endif
/* FIXME our pointer tracking is broken; see how
* gtk+/gdk/x11/gdkevents-x11.c or XFree86/xc/programs/xterm/misc.c
......@@ -1714,10 +1708,8 @@ event_callback (XEvent *event,
display = data;
screen = display->screen;
#ifdef WITH_VERBOSE_MODE
if (dump_events)
meta_spew_event (display, event);
#endif
#ifdef HAVE_STARTUP_NOTIFICATION
sn_display_process_event (display->sn_display, event);
......@@ -2821,7 +2813,6 @@ event_get_time (MetaDisplay *display,
}
}
#ifdef WITH_VERBOSE_MODE
const char*
meta_event_detail_to_string (int d)
{
......@@ -2860,9 +2851,7 @@ meta_event_detail_to_string (int d)
return detail;
}
#endif /* WITH_VERBOSE_MODE */
#ifdef WITH_VERBOSE_MODE
const char*
meta_event_mode_to_string (int m)
{
......@@ -2892,9 +2881,7 @@ meta_event_mode_to_string (int m)
return mode;
}
#endif /* WITH_VERBOSE_MODE */
#ifdef WITH_VERBOSE_MODE
static const char*
stack_mode_to_string (int mode)
{
......@@ -2916,9 +2903,7 @@ stack_mode_to_string (int mode)
return "Unknown";
}
#endif /* WITH_VERBOSE_MODE */
#ifdef WITH_VERBOSE_MODE
static char*
key_event_description (Display *xdisplay,
XEvent *event)
......@@ -2931,9 +2916,7 @@ key_event_description (Display *xdisplay,
return "none";
#endif
}
#endif /* WITH_VERBOSE_MODE */
#ifdef WITH_VERBOSE_MODE
static gint64
sync_value_to_64 (const XSyncValue *value)
{
......@@ -2944,9 +2927,7 @@ sync_value_to_64 (const XSyncValue *value)
return v;
}
#endif /* WITH_VERBOSE_MODE */
#ifdef WITH_VERBOSE_MODE
static const char*
alarm_state_to_string (XSyncAlarmState state)
{
......@@ -2962,9 +2943,7 @@ alarm_state_to_string (XSyncAlarmState state)
return "(unknown)";
}
}
#endif /* WITH_VERBOSE_MODE */
#ifdef WITH_VERBOSE_MODE
static void
meta_spew_event (MetaDisplay *display,
XEvent *event)
......@@ -3274,7 +3253,6 @@ meta_spew_event (MetaDisplay *display,
if (extra)
g_free (extra);
}
#endif /* WITH_VERBOSE_MODE */
MetaWindow*
meta_display_lookup_x_window (MetaDisplay *display,
......
......@@ -774,7 +774,6 @@ cache_edges (MetaDisplay *display,
/*
* 0th: Print debugging information to the log about the edges
*/
#ifdef WITH_VERBOSE_MODE
if (meta_is_verbose())
{
int max_edges = MAX (MAX( g_list_length (window_edges),
......@@ -794,7 +793,6 @@ cache_edges (MetaDisplay *display,
meta_topic (META_DEBUG_EDGE_RESISTANCE,
"Screen edges for resistance : %s\n", big_buffer);
}
#endif
/*
* 1st: Get the total number of each kind of edge
......
......@@ -846,7 +846,6 @@ meta_window_ungrab_keys (MetaWindow *window)
}
}
#ifdef WITH_VERBOSE_MODE
static const char*
grab_status_to_string (int status)
{
......@@ -866,7 +865,6 @@ grab_status_to_string (int status)
return "(unknown)";
}
}
#endif /* WITH_VERBOSE_MODE */
static gboolean
grab_keyboard (MetaDisplay *display,
......
......@@ -551,7 +551,6 @@ find_first_fit (MetaWindow *window,
rect.height += borders->visible.top + borders->visible.bottom;
}
#ifdef WITH_VERBOSE_MODE
{
char xinerama_location_string[RECT_LENGTH];
meta_rectangle_to_string (&window->screen->xinerama_infos[xinerama].rect,
......@@ -560,7 +559,6 @@ find_first_fit (MetaWindow *window,
"Natural xinerama is %s\n",
xinerama_location_string);
}
#endif
meta_window_get_work_area_for_xinerama (window, xinerama, &work_area);
......
......@@ -1252,7 +1252,6 @@ meta_prefs_get_disable_workarounds (void)
return disable_workarounds;
}
#ifdef WITH_VERBOSE_MODE
const char*
meta_preference_to_string (MetaPreference pref)
{
......@@ -1361,7 +1360,6 @@ meta_preference_to_string (MetaPreference pref)
return "(unknown)";
}
#endif /* WITH_VERBOSE_MODE */
void
meta_prefs_set_num_workspaces (int n_workspaces)
......
......@@ -1971,8 +1971,6 @@ meta_screen_queue_workarea_recalc (MetaScreen *screen)
}
}
#ifdef WITH_VERBOSE_MODE
static const gchar *
meta_screen_corner_to_string (MetaScreenCorner corner)
{
......@@ -1992,7 +1990,6 @@ meta_screen_corner_to_string (MetaScreenCorner corner)
return "Unknown";
}
#endif /* WITH_VERBOSE_MODE */
void
meta_screen_calc_workspace_layout (MetaScreen *screen,
......@@ -2239,7 +2236,6 @@ meta_screen_calc_workspace_layout (MetaScreen *screen,
layout->current_row = current_row;
layout->current_col = current_col;
#ifdef WITH_VERBOSE_MODE
if (meta_is_verbose ())
{
r = 0;
......@@ -2262,7 +2258,6 @@ meta_screen_calc_workspace_layout (MetaScreen *screen,
++r;
}
}
#endif /* WITH_VERBOSE_MODE */
}
void
......
......@@ -39,8 +39,6 @@ static gboolean is_verbose = FALSE;
static gboolean is_debugging = FALSE;
static gboolean replace_current = FALSE;
static int no_prefix = 0;
#ifdef WITH_VERBOSE_MODE
static FILE* logfile = NULL;
static void
......@@ -87,7 +85,6 @@ ensure_logfile (void)
g_free (filename);
}
}
#endif
gboolean
meta_is_verbose (void)
......@@ -98,13 +95,8 @@ meta_is_verbose (void)
void
meta_set_verbose (gboolean setting)
{
#ifndef WITH_VERBOSE_MODE
if (setting)
meta_fatal (_("Metacity was compiled without support for verbose mode\n"));
#else
if (setting)
ensure_logfile ();
#endif
is_verbose = setting;
}
......@@ -118,10 +110,8 @@ meta_is_debugging (void)
void
meta_set_debugging (gboolean setting)
{
#ifdef WITH_VERBOSE_MODE
if (setting)
ensure_logfile ();
#endif
is_debugging = setting;
}
......@@ -180,9 +170,8 @@ meta_free_gslist_and_elements (GSList *list_to_deep_free)
g_slist_free (list_to_deep_free);
}
#ifdef WITH_VERBOSE_MODE
void
meta_verbose_real (const char *format, ...)
meta_verbose (const char *format, ...)
{
va_list args;
gchar *str;
......@@ -207,9 +196,7 @@ meta_verbose_real (const char *format, ...)
g_free (str);
}
#endif /* WITH_VERBOSE_MODE */
#ifdef WITH_VERBOSE_MODE
static const char*
topic_name (MetaDebugTopic topic)
{
......@@ -269,9 +256,9 @@ topic_name (MetaDebugTopic topic)
static int sync_count = 0;
void
meta_topic_real (MetaDebugTopic topic,
const char *format,
...)
meta_topic (MetaDebugTopic topic,
const char *format,
...)
{
va_list args;
gchar *str;
......@@ -303,7 +290,6 @@ meta_topic_real (MetaDebugTopic topic,
g_free (str);
}
#endif /* WITH_VERBOSE_MODE */
void
meta_bug (const char *format, ...)
......@@ -318,11 +304,7 @@ meta_bug (const char *format, ...)
str = g_strdup_vprintf (format, args);
va_end (args);
#ifdef WITH_VERBOSE_MODE
out = logfile ? logfile : stderr;
#else
out = stderr;
#endif
if (no_prefix == 0)
utf8_fputs (_("Bug in window manager: "), out);
......@@ -349,11 +331,7 @@ meta_warning (const char *format, ...)
str = g_strdup_vprintf (format, args);
va_end (args);
#ifdef WITH_VERBOSE_MODE
out = logfile ? logfile : stderr;
#else
out = stderr;
#endif
if (no_prefix == 0)
utf8_fputs (_("Window manager warning: "), out);
......@@ -377,11 +355,7 @@ meta_fatal (const char *format, ...)
str = g_strdup_vprintf (format, args);
va_end (args);
#ifdef WITH_VERBOSE_MODE
out = logfile ? logfile : stderr;
#else
out = stderr;
#endif
if (no_prefix == 0)
utf8_fputs (_("Window manager error: "), out);
......
......@@ -129,7 +129,6 @@ static gboolean idle_calc_showing (gpointer data);
static gboolean idle_move_resize (gpointer data);
static gboolean idle_update_icon (gpointer data);
#ifdef WITH_VERBOSE_MODE
static const char*
wm_state_to_string (int state)
{
......@@ -147,7 +146,6 @@ wm_state_to_string (int state)
return "Unknown";
}
#endif
static gboolean
is_desktop_or_dock_foreach (MetaWindow *window,
......@@ -1774,10 +1772,8 @@ idle_calc_showing (gpointer data)
return FALSE;
}
#ifdef WITH_VERBOSE_MODE
static const gchar* meta_window_queue_names[NUMBER_OF_QUEUES] =
{"calc_showing", "move_resize", "update_icon"};
#endif
static void
meta_window_unqueue (MetaWindow *window, guint queuebits)
......
......@@ -792,7 +792,6 @@ meta_workspace_get_onxinerama_region (MetaWorkspace *workspace,
return workspace->xinerama_region[which_xinerama];
}
#ifdef WITH_VERBOSE_MODE
static const gchar *
meta_motion_direction_to_string (MetaMotionDirection direction)
{
......@@ -812,7 +811,6 @@ meta_motion_direction_to_string (MetaMotionDirection direction)
return "Unknown";
}
#endif /* WITH_VERBOSE_MODE */
MetaWorkspace*
meta_workspace_get_neighbor (MetaWorkspace *workspace,
......
......@@ -35,8 +35,8 @@ void meta_set_syncing (gboolean setting);
gboolean meta_get_replace_current_wm (void);
void meta_set_replace_current_wm (gboolean setting);
void meta_verbose_real (const char *format,
...) G_GNUC_PRINTF (1, 2);
void meta_verbose (const char *format,
...) G_GNUC_PRINTF (1, 2);
void meta_bug (const char *format,
...) G_GNUC_PRINTF (1, 2);
......@@ -71,9 +71,9 @@ typedef enum
META_DEBUG_EDGE_RESISTANCE = 1 << 21
} MetaDebugTopic;
void meta_topic_real (MetaDebugTopic topic,
const char *format,
...) G_GNUC_PRINTF (2, 3);
void meta_topic (MetaDebugTopic topic,
const char *format,
...) G_GNUC_PRINTF (2, 3);
void meta_push_no_msg_prefix (void);
void meta_pop_no_msg_prefix (void);
......@@ -102,24 +102,4 @@ GPid meta_show_dialog (const char *type,
GSList *columns,
GSList *entries);
/* To disable verbose mode, we make these functions into no-ops */
#ifdef WITH_VERBOSE_MODE
#define meta_verbose meta_verbose_real
#define meta_topic meta_topic_real
#else
# ifdef G_HAVE_ISO_VARARGS
# define meta_verbose(...)
# define meta_topic(...)
# elif defined(G_HAVE_GNUC_VARARGS)
# define meta_verbose(format...)
# define meta_topic(format...)
# else
# error "This compiler does not support varargs macros and thus verbose mode can't be disabled meaningfully"
# endif
#endif /* !WITH_VERBOSE_MODE */
#endif /* META_UTIL_H */
......@@ -140,7 +140,6 @@ send_set_mousemods (gboolean enabled)
XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), False);
}
#ifdef WITH_VERBOSE_MODE
static void
send_toggle_verbose (void)
{
......@@ -168,7 +167,6 @@ send_toggle_verbose (void)
XFlush (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), False);
}
#endif
static void
usage (void)
......@@ -201,14 +199,7 @@ main (int argc, char **argv)
else if (strcmp (argv[1], "disable-mouse-button-modifiers") == 0)
send_set_mousemods (FALSE);
else if (strcmp (argv[1], "toggle-verbose") == 0)
{
#ifndef WITH_VERBOSE_MODE
g_printerr (_("Metacity was compiled without support for verbose mode\n"));
return 1;
#else
send_toggle_verbose ();
#endif
}
send_toggle_verbose ();
else
usage ();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment