diff --git a/src/Makefile.am b/src/Makefile.am index b0442e069..34bfedc38 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -142,6 +142,7 @@ libmutter_la_SOURCES = \ core/stack-tracker.h \ core/util.c \ meta/util.h \ + core/util-private.h \ core/window-props.c \ core/window-props.h \ core/window.c \ diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index a9cd39180..fead306a2 100644 --- a/src/compositor/compositor.c +++ b/src/compositor/compositor.c @@ -75,6 +75,7 @@ #include "meta-window-group.h" #include "window-private.h" /* to check window->hidden */ #include "display-private.h" /* for meta_display_lookup_x_window() */ +#include "util-private.h" #include #include diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c index 7cd3894b9..4337f7053 100644 --- a/src/compositor/meta-background.c +++ b/src/compositor/meta-background.c @@ -35,6 +35,7 @@ #include "mutter-enum-types.h" #include #include +#include "util-private.h" #include "meta-background-actor-private.h" #define FRAGMENT_SHADER_DECLARATIONS \ diff --git a/src/compositor/plugins/default.c b/src/compositor/plugins/default.c index 8d5c55835..4d51b309c 100644 --- a/src/compositor/plugins/default.c +++ b/src/compositor/plugins/default.c @@ -19,15 +19,14 @@ * along with this program; if not, see . */ +#include + #include #include -#include #include #include - -#include -#define _(x) dgettext (GETTEXT_PACKAGE, x) -#define N_(x) x +#include +#include #include #include diff --git a/src/core/bell.c b/src/core/bell.c index e111d690e..cc25a27ec 100644 --- a/src/core/bell.c +++ b/src/core/bell.c @@ -51,6 +51,7 @@ #include "bell.h" #include "screen-private.h" #include "window-private.h" +#include "util-private.h" #include #include #ifdef HAVE_LIBCANBERRA diff --git a/src/core/core.c b/src/core/core.c index 4b5f93957..25c5bf6af 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -27,6 +27,7 @@ #include "workspace-private.h" #include #include +#include "util-private.h" /* Looks up the MetaWindow representing the frame of the given X window. * Used as a helper function by a bunch of the functions below. diff --git a/src/core/delete.c b/src/core/delete.c index 8e174f1f5..96e2ec59a 100644 --- a/src/core/delete.c +++ b/src/core/delete.c @@ -23,7 +23,7 @@ #define _XOPEN_SOURCE /* for kill() */ #include -#include +#include "util-private.h" #include "window-private.h" #include #include diff --git a/src/core/display.c b/src/core/display.c index 796bca760..529f6b20a 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -32,7 +32,7 @@ #include #include "display-private.h" -#include +#include "util-private.h" #include #include "screen-private.h" #include "window-private.h" diff --git a/src/core/keybindings.c b/src/core/keybindings.c index ee1e45a79..2519d26e5 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c @@ -41,7 +41,7 @@ #include "place.h" #include "screen-private.h" #include -#include +#include "util-private.h" #include #include diff --git a/src/core/main.c b/src/core/main.c index 6246d8ec3..b2eb4cdbb 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -46,7 +46,7 @@ #include #include -#include +#include "util-private.h" #include "display-private.h" #include #include "ui.h" diff --git a/src/core/monitor.c b/src/core/monitor.c index 4b5a14418..f006052f4 100644 --- a/src/core/monitor.c +++ b/src/core/monitor.c @@ -31,7 +31,7 @@ #include #include -#include +#include "util-private.h" #include #include "monitor-private.h" diff --git a/src/core/mutter.c b/src/core/mutter.c index 08cd4f234..00164c15c 100644 --- a/src/core/mutter.c +++ b/src/core/mutter.c @@ -23,6 +23,7 @@ #include #include +#include #include "meta-plugin-manager.h" #include diff --git a/src/core/prefs.c b/src/core/prefs.c index b16a5f793..fde3e0e75 100644 --- a/src/core/prefs.c +++ b/src/core/prefs.c @@ -29,7 +29,7 @@ #include #include #include "ui.h" -#include +#include "util-private.h" #include "meta-plugin-manager.h" #include #include diff --git a/src/core/screen.c b/src/core/screen.c index 7b800e775..58346f3fc 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -31,7 +31,7 @@ #include #include "screen-private.h" #include -#include +#include "util-private.h" #include #include "window-private.h" #include "frame.h" diff --git a/src/core/session.c b/src/core/session.c index 1fc937f79..2a76619d7 100644 --- a/src/core/session.c +++ b/src/core/session.c @@ -23,6 +23,7 @@ #include +#include "util-private.h" #include "session.h" #include diff --git a/src/core/util-private.h b/src/core/util-private.h new file mode 100644 index 000000000..8e51b42f4 --- /dev/null +++ b/src/core/util-private.h @@ -0,0 +1,36 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ + +/* Mutter utilities */ + +/* + * Copyright (C) 2001 Havoc Pennington + * Copyright (C) 2005 Elijah Newren + * + * 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 program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ + +#ifndef META_UTIL_PRIVATE_H +#define META_UTIL_PRIVATE_H + +#include +#include + +void meta_set_verbose (gboolean setting); +void meta_set_debugging (gboolean setting); +void meta_set_syncing (gboolean setting); +void meta_set_replace_current_wm (gboolean setting); + +#endif diff --git a/src/core/util.c b/src/core/util.c index e721e4425..cde58ee53 100644 --- a/src/core/util.c +++ b/src/core/util.c @@ -29,7 +29,7 @@ #include #include -#include +#include "util-private.h" #include #include /* For clutter_threads_add_repaint_func() */ diff --git a/src/core/window-props.c b/src/core/window-props.c index 51f4b38b9..b7799db18 100644 --- a/src/core/window-props.c +++ b/src/core/window-props.c @@ -46,6 +46,7 @@ #include #include #include +#include "util-private.h" #ifndef HOST_NAME_MAX /* Solaris headers apparently don't define this so do so manually; #326745 */ diff --git a/src/core/window.c b/src/core/window.c index 795bf3e71..56266a48b 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -30,7 +30,7 @@ #include "window-private.h" #include "boxes-private.h" #include "edge-resistance.h" -#include +#include "util-private.h" #include "frame.h" #include #include "workspace-private.h" diff --git a/src/core/xprops.c b/src/core/xprops.c index 9a260b66f..5c96319da 100644 --- a/src/core/xprops.c +++ b/src/core/xprops.c @@ -81,7 +81,7 @@ from The Open Group. #include #include "xprops.h" #include -#include +#include "util-private.h" #include "async-getprop.h" #include "ui.h" #include "mutter-Xatomtype.h" diff --git a/src/meta/util.h b/src/meta/util.h index 04655eea8..9328a26b9 100644 --- a/src/meta/util.h +++ b/src/meta/util.h @@ -25,17 +25,12 @@ #include #include -#include #include gboolean meta_is_verbose (void); -void meta_set_verbose (gboolean setting); gboolean meta_is_debugging (void); -void meta_set_debugging (gboolean setting); gboolean meta_is_syncing (void); -void meta_set_syncing (gboolean setting); -void meta_set_replace_current_wm (gboolean setting); void meta_debug_spew_real (const char *format, ...) G_GNUC_PRINTF (1, 2); diff --git a/src/ui/menu.c b/src/ui/menu.c index 06cf98e63..d59e24211 100644 --- a/src/ui/menu.c +++ b/src/ui/menu.c @@ -26,7 +26,7 @@ #include #include "menu.h" #include -#include +#include "util-private.h" #include "core.h" #include "metaaccellabel.h" #include "ui.h" diff --git a/src/ui/metaaccellabel.c b/src/ui/metaaccellabel.c index 90d43eec5..be65b3537 100644 --- a/src/ui/metaaccellabel.c +++ b/src/ui/metaaccellabel.c @@ -33,7 +33,7 @@ #include "metaaccellabel.h" #include #include -#include +#include "util-private.h" static void meta_accel_label_destroy (GtkWidget *object); static void meta_accel_label_finalize (GObject *object); diff --git a/src/ui/resizepopup.c b/src/ui/resizepopup.c index 43055c52c..ed793cde0 100644 --- a/src/ui/resizepopup.c +++ b/src/ui/resizepopup.c @@ -21,7 +21,7 @@ #include #include "resizepopup.h" -#include +#include "util-private.h" #include #include diff --git a/src/ui/theme-parser.c b/src/ui/theme-parser.c index abfe324b3..e9ce02827 100644 --- a/src/ui/theme-parser.c +++ b/src/ui/theme-parser.c @@ -21,7 +21,7 @@ #include #include "theme-private.h" -#include +#include "util-private.h" #include #include diff --git a/src/ui/theme.c b/src/ui/theme.c index ec6371aa3..51255ee92 100644 --- a/src/ui/theme.c +++ b/src/ui/theme.c @@ -37,7 +37,7 @@ #include #include "theme-private.h" #include "frames.h" /* for META_TYPE_FRAMES */ -#include +#include "util-private.h" #include #include #include