1
0
Fork 0

Fix regression in mutter translations

Switching meta/util.h to gi18n.h was wrong, mutter is a library
and needs gi18n-lib.h, but that cannot be included from a public
header (since it depends on config.h or command line options),
so split util.h into a public and a private part.

https://bugzilla.gnome.org/show_bug.cgi?id=707897

Conflicts:
	src/compositor/compositor.c
	src/meta/util.h
This commit is contained in:
Giovanni Campagna 2013-09-11 10:18:53 +02:00 committed by Jasper St. Pierre
parent 6ceddd626a
commit 5298a834ef
26 changed files with 63 additions and 25 deletions

View file

@ -142,6 +142,7 @@ libmutter_la_SOURCES = \
core/stack-tracker.h \ core/stack-tracker.h \
core/util.c \ core/util.c \
meta/util.h \ meta/util.h \
core/util-private.h \
core/window-props.c \ core/window-props.c \
core/window-props.h \ core/window-props.h \
core/window.c \ core/window.c \

View file

@ -75,6 +75,7 @@
#include "meta-window-group.h" #include "meta-window-group.h"
#include "window-private.h" /* to check window->hidden */ #include "window-private.h" /* to check window->hidden */
#include "display-private.h" /* for meta_display_lookup_x_window() */ #include "display-private.h" /* for meta_display_lookup_x_window() */
#include "util-private.h"
#include <X11/extensions/shape.h> #include <X11/extensions/shape.h>
#include <X11/extensions/Xcomposite.h> #include <X11/extensions/Xcomposite.h>

View file

@ -35,6 +35,7 @@
#include "mutter-enum-types.h" #include "mutter-enum-types.h"
#include <meta/errors.h> #include <meta/errors.h>
#include <meta/meta-background.h> #include <meta/meta-background.h>
#include "util-private.h"
#include "meta-background-actor-private.h" #include "meta-background-actor-private.h"
#define FRAGMENT_SHADER_DECLARATIONS \ #define FRAGMENT_SHADER_DECLARATIONS \

View file

@ -19,15 +19,14 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/ */
#include <config.h>
#include <meta/meta-plugin.h> #include <meta/meta-plugin.h>
#include <meta/window.h> #include <meta/window.h>
#include <meta/util.h>
#include <meta/meta-background-group.h> #include <meta/meta-background-group.h>
#include <meta/meta-background-actor.h> #include <meta/meta-background-actor.h>
#include <meta/util.h>
#include <libintl.h> #include <glib/gi18n-lib.h>
#define _(x) dgettext (GETTEXT_PACKAGE, x)
#define N_(x) x
#include <clutter/clutter.h> #include <clutter/clutter.h>
#include <gmodule.h> #include <gmodule.h>

View file

@ -51,6 +51,7 @@
#include "bell.h" #include "bell.h"
#include "screen-private.h" #include "screen-private.h"
#include "window-private.h" #include "window-private.h"
#include "util-private.h"
#include <meta/prefs.h> #include <meta/prefs.h>
#include <meta/compositor.h> #include <meta/compositor.h>
#ifdef HAVE_LIBCANBERRA #ifdef HAVE_LIBCANBERRA

View file

@ -27,6 +27,7 @@
#include "workspace-private.h" #include "workspace-private.h"
#include <meta/prefs.h> #include <meta/prefs.h>
#include <meta/errors.h> #include <meta/errors.h>
#include "util-private.h"
/* Looks up the MetaWindow representing the frame of the given X window. /* Looks up the MetaWindow representing the frame of the given X window.
* Used as a helper function by a bunch of the functions below. * Used as a helper function by a bunch of the functions below.

View file

@ -23,7 +23,7 @@
#define _XOPEN_SOURCE /* for kill() */ #define _XOPEN_SOURCE /* for kill() */
#include <config.h> #include <config.h>
#include <meta/util.h> #include "util-private.h"
#include "window-private.h" #include "window-private.h"
#include <meta/errors.h> #include <meta/errors.h>
#include <meta/workspace.h> #include <meta/workspace.h>

View file

@ -32,7 +32,7 @@
#include <config.h> #include <config.h>
#include "display-private.h" #include "display-private.h"
#include <meta/util.h> #include "util-private.h"
#include <meta/main.h> #include <meta/main.h>
#include "screen-private.h" #include "screen-private.h"
#include "window-private.h" #include "window-private.h"

View file

@ -41,7 +41,7 @@
#include "place.h" #include "place.h"
#include "screen-private.h" #include "screen-private.h"
#include <meta/prefs.h> #include <meta/prefs.h>
#include <meta/util.h> #include "util-private.h"
#include <X11/keysym.h> #include <X11/keysym.h>
#include <string.h> #include <string.h>

View file

@ -46,7 +46,7 @@
#include <config.h> #include <config.h>
#include <meta/main.h> #include <meta/main.h>
#include <meta/util.h> #include "util-private.h"
#include "display-private.h" #include "display-private.h"
#include <meta/errors.h> #include <meta/errors.h>
#include "ui.h" #include "ui.h"

View file

@ -31,7 +31,7 @@
#include <clutter/clutter.h> #include <clutter/clutter.h>
#include <meta/main.h> #include <meta/main.h>
#include <meta/util.h> #include "util-private.h"
#include <meta/errors.h> #include <meta/errors.h>
#include "monitor-private.h" #include "monitor-private.h"

View file

@ -23,6 +23,7 @@
#include <meta/main.h> #include <meta/main.h>
#include <meta/util.h> #include <meta/util.h>
#include <glib/gi18n-lib.h>
#include "meta-plugin-manager.h" #include "meta-plugin-manager.h"
#include <glib.h> #include <glib.h>

View file

@ -29,7 +29,7 @@
#include <config.h> #include <config.h>
#include <meta/prefs.h> #include <meta/prefs.h>
#include "ui.h" #include "ui.h"
#include <meta/util.h> #include "util-private.h"
#include "meta-plugin-manager.h" #include "meta-plugin-manager.h"
#include <glib.h> #include <glib.h>
#include <gio/gio.h> #include <gio/gio.h>

View file

@ -31,7 +31,7 @@
#include <config.h> #include <config.h>
#include "screen-private.h" #include "screen-private.h"
#include <meta/main.h> #include <meta/main.h>
#include <meta/util.h> #include "util-private.h"
#include <meta/errors.h> #include <meta/errors.h>
#include "window-private.h" #include "window-private.h"
#include "frame.h" #include "frame.h"

View file

@ -23,6 +23,7 @@
#include <config.h> #include <config.h>
#include "util-private.h"
#include "session.h" #include "session.h"
#include <X11/Xatom.h> #include <X11/Xatom.h>

36
src/core/util-private.h Normal file
View file

@ -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 <meta/util.h>
#include <glib/gi18n-lib.h>
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

View file

@ -29,7 +29,7 @@
#include <config.h> #include <config.h>
#include <meta/common.h> #include <meta/common.h>
#include <meta/util.h> #include "util-private.h"
#include <meta/main.h> #include <meta/main.h>
#include <clutter/clutter.h> /* For clutter_threads_add_repaint_func() */ #include <clutter/clutter.h> /* For clutter_threads_add_repaint_func() */

View file

@ -46,6 +46,7 @@
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include "util-private.h"
#ifndef HOST_NAME_MAX #ifndef HOST_NAME_MAX
/* Solaris headers apparently don't define this so do so manually; #326745 */ /* Solaris headers apparently don't define this so do so manually; #326745 */

View file

@ -30,7 +30,7 @@
#include "window-private.h" #include "window-private.h"
#include "boxes-private.h" #include "boxes-private.h"
#include "edge-resistance.h" #include "edge-resistance.h"
#include <meta/util.h> #include "util-private.h"
#include "frame.h" #include "frame.h"
#include <meta/errors.h> #include <meta/errors.h>
#include "workspace-private.h" #include "workspace-private.h"

View file

@ -81,7 +81,7 @@ from The Open Group.
#include <config.h> #include <config.h>
#include "xprops.h" #include "xprops.h"
#include <meta/errors.h> #include <meta/errors.h>
#include <meta/util.h> #include "util-private.h"
#include "async-getprop.h" #include "async-getprop.h"
#include "ui.h" #include "ui.h"
#include "mutter-Xatomtype.h" #include "mutter-Xatomtype.h"

View file

@ -25,17 +25,12 @@
#include <glib.h> #include <glib.h>
#include <glib-object.h> #include <glib-object.h>
#include <glib/gi18n.h>
#include <meta/common.h> #include <meta/common.h>
gboolean meta_is_verbose (void); gboolean meta_is_verbose (void);
void meta_set_verbose (gboolean setting);
gboolean meta_is_debugging (void); gboolean meta_is_debugging (void);
void meta_set_debugging (gboolean setting);
gboolean meta_is_syncing (void); 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, void meta_debug_spew_real (const char *format,
...) G_GNUC_PRINTF (1, 2); ...) G_GNUC_PRINTF (1, 2);

View file

@ -26,7 +26,7 @@
#include <string.h> #include <string.h>
#include "menu.h" #include "menu.h"
#include <meta/main.h> #include <meta/main.h>
#include <meta/util.h> #include "util-private.h"
#include "core.h" #include "core.h"
#include "metaaccellabel.h" #include "metaaccellabel.h"
#include "ui.h" #include "ui.h"

View file

@ -33,7 +33,7 @@
#include "metaaccellabel.h" #include "metaaccellabel.h"
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <string.h> #include <string.h>
#include <meta/util.h> #include "util-private.h"
static void meta_accel_label_destroy (GtkWidget *object); static void meta_accel_label_destroy (GtkWidget *object);
static void meta_accel_label_finalize (GObject *object); static void meta_accel_label_finalize (GObject *object);

View file

@ -21,7 +21,7 @@
#include <config.h> #include <config.h>
#include "resizepopup.h" #include "resizepopup.h"
#include <meta/util.h> #include "util-private.h"
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <gdk/gdkx.h> #include <gdk/gdkx.h>

View file

@ -21,7 +21,7 @@
#include <config.h> #include <config.h>
#include "theme-private.h" #include "theme-private.h"
#include <meta/util.h> #include "util-private.h"
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>

View file

@ -37,7 +37,7 @@
#include <config.h> #include <config.h>
#include "theme-private.h" #include "theme-private.h"
#include "frames.h" /* for META_TYPE_FRAMES */ #include "frames.h" /* for META_TYPE_FRAMES */
#include <meta/util.h> #include "util-private.h"
#include <meta/gradient.h> #include <meta/gradient.h>
#include <meta/prefs.h> #include <meta/prefs.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>