[mutter] Fix regression in mutter translations



commit 5298a834efef5eeacaea24a9752468277782cb04
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Wed Sep 11 10:18:53 2013 +0200

    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

 src/Makefile.am                  |    1 +
 src/compositor/compositor.c      |    1 +
 src/compositor/meta-background.c |    1 +
 src/compositor/plugins/default.c |    9 ++++-----
 src/core/bell.c                  |    1 +
 src/core/core.c                  |    1 +
 src/core/delete.c                |    2 +-
 src/core/display.c               |    2 +-
 src/core/keybindings.c           |    2 +-
 src/core/main.c                  |    2 +-
 src/core/monitor.c               |    2 +-
 src/core/mutter.c                |    1 +
 src/core/prefs.c                 |    2 +-
 src/core/screen.c                |    2 +-
 src/core/session.c               |    1 +
 src/core/util-private.h          |   36 ++++++++++++++++++++++++++++++++++++
 src/core/util.c                  |    2 +-
 src/core/window-props.c          |    1 +
 src/core/window.c                |    2 +-
 src/core/xprops.c                |    2 +-
 src/meta/util.h                  |    5 -----
 src/ui/menu.c                    |    2 +-
 src/ui/metaaccellabel.c          |    2 +-
 src/ui/resizepopup.c             |    2 +-
 src/ui/theme-parser.c            |    2 +-
 src/ui/theme.c                   |    2 +-
 26 files changed, 63 insertions(+), 25 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index b0442e0..34bfedc 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 a9cd391..fead306 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 <X11/extensions/shape.h>
 #include <X11/extensions/Xcomposite.h>
 
diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c
index 7cd3894..4337f70 100644
--- a/src/compositor/meta-background.c
+++ b/src/compositor/meta-background.c
@@ -35,6 +35,7 @@
 #include "mutter-enum-types.h"
 #include <meta/errors.h>
 #include <meta/meta-background.h>
+#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 8d5c558..4d51b30 100644
--- a/src/compositor/plugins/default.c
+++ b/src/compositor/plugins/default.c
@@ -19,15 +19,14 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
+
 #include <meta/meta-plugin.h>
 #include <meta/window.h>
-#include <meta/util.h>
 #include <meta/meta-background-group.h>
 #include <meta/meta-background-actor.h>
-
-#include <libintl.h>
-#define _(x) dgettext (GETTEXT_PACKAGE, x)
-#define N_(x) x
+#include <meta/util.h>
+#include <glib/gi18n-lib.h>
 
 #include <clutter/clutter.h>
 #include <gmodule.h>
diff --git a/src/core/bell.c b/src/core/bell.c
index e111d69..cc25a27 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 <meta/prefs.h>
 #include <meta/compositor.h>
 #ifdef HAVE_LIBCANBERRA
diff --git a/src/core/core.c b/src/core/core.c
index 4b5f939..25c5bf6 100644
--- a/src/core/core.c
+++ b/src/core/core.c
@@ -27,6 +27,7 @@
 #include "workspace-private.h"
 #include <meta/prefs.h>
 #include <meta/errors.h>
+#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 8e174f1..96e2ec5 100644
--- a/src/core/delete.c
+++ b/src/core/delete.c
@@ -23,7 +23,7 @@
 #define _XOPEN_SOURCE /* for kill() */
 
 #include <config.h>
-#include <meta/util.h>
+#include "util-private.h"
 #include "window-private.h"
 #include <meta/errors.h>
 #include <meta/workspace.h>
diff --git a/src/core/display.c b/src/core/display.c
index 796bca7..529f6b2 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -32,7 +32,7 @@
 
 #include <config.h>
 #include "display-private.h"
-#include <meta/util.h>
+#include "util-private.h"
 #include <meta/main.h>
 #include "screen-private.h"
 #include "window-private.h"
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index ee1e45a..2519d26 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -41,7 +41,7 @@
 #include "place.h"
 #include "screen-private.h"
 #include <meta/prefs.h>
-#include <meta/util.h>
+#include "util-private.h"
 
 #include <X11/keysym.h>
 #include <string.h>
diff --git a/src/core/main.c b/src/core/main.c
index 6246d8e..b2eb4cd 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -46,7 +46,7 @@
 
 #include <config.h>
 #include <meta/main.h>
-#include <meta/util.h>
+#include "util-private.h"
 #include "display-private.h"
 #include <meta/errors.h>
 #include "ui.h"
diff --git a/src/core/monitor.c b/src/core/monitor.c
index 4b5a144..f006052 100644
--- a/src/core/monitor.c
+++ b/src/core/monitor.c
@@ -31,7 +31,7 @@
 #include <clutter/clutter.h>
 
 #include <meta/main.h>
-#include <meta/util.h>
+#include "util-private.h"
 #include <meta/errors.h>
 #include "monitor-private.h"
 
diff --git a/src/core/mutter.c b/src/core/mutter.c
index 08cd4f2..00164c1 100644
--- a/src/core/mutter.c
+++ b/src/core/mutter.c
@@ -23,6 +23,7 @@
 
 #include <meta/main.h>
 #include <meta/util.h>
+#include <glib/gi18n-lib.h>
 #include "meta-plugin-manager.h"
 
 #include <glib.h>
diff --git a/src/core/prefs.c b/src/core/prefs.c
index b16a5f7..fde3e0e 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -29,7 +29,7 @@
 #include <config.h>
 #include <meta/prefs.h>
 #include "ui.h"
-#include <meta/util.h>
+#include "util-private.h"
 #include "meta-plugin-manager.h"
 #include <glib.h>
 #include <gio/gio.h>
diff --git a/src/core/screen.c b/src/core/screen.c
index 7b800e7..58346f3 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -31,7 +31,7 @@
 #include <config.h>
 #include "screen-private.h"
 #include <meta/main.h>
-#include <meta/util.h>
+#include "util-private.h"
 #include <meta/errors.h>
 #include "window-private.h"
 #include "frame.h"
diff --git a/src/core/session.c b/src/core/session.c
index 1fc937f..2a76619 100644
--- a/src/core/session.c
+++ b/src/core/session.c
@@ -23,6 +23,7 @@
 
 #include <config.h>
 
+#include "util-private.h"
 #include "session.h"
 #include <X11/Xatom.h>
 
diff --git a/src/core/util-private.h b/src/core/util-private.h
new file mode 100644
index 0000000..8e51b42
--- /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 <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
diff --git a/src/core/util.c b/src/core/util.c
index e721e44..cde58ee 100644
--- a/src/core/util.c
+++ b/src/core/util.c
@@ -29,7 +29,7 @@
 
 #include <config.h>
 #include <meta/common.h>
-#include <meta/util.h>
+#include "util-private.h"
 #include <meta/main.h>
 
 #include <clutter/clutter.h> /* For clutter_threads_add_repaint_func() */
diff --git a/src/core/window-props.c b/src/core/window-props.c
index 51f4b38..b7799db 100644
--- a/src/core/window-props.c
+++ b/src/core/window-props.c
@@ -46,6 +46,7 @@
 #include <X11/Xatom.h>
 #include <unistd.h>
 #include <string.h>
+#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 795bf3e..56266a4 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 <meta/util.h>
+#include "util-private.h"
 #include "frame.h"
 #include <meta/errors.h>
 #include "workspace-private.h"
diff --git a/src/core/xprops.c b/src/core/xprops.c
index 9a260b6..5c96319 100644
--- a/src/core/xprops.c
+++ b/src/core/xprops.c
@@ -81,7 +81,7 @@ from The Open Group.
 #include <config.h>
 #include "xprops.h"
 #include <meta/errors.h>
-#include <meta/util.h>
+#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 04655ee..9328a26 100644
--- a/src/meta/util.h
+++ b/src/meta/util.h
@@ -25,17 +25,12 @@
 
 #include <glib.h>
 #include <glib-object.h>
-#include <glib/gi18n.h>
 
 #include <meta/common.h>
 
 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 06cf98e..d59e242 100644
--- a/src/ui/menu.c
+++ b/src/ui/menu.c
@@ -26,7 +26,7 @@
 #include <string.h>
 #include "menu.h"
 #include <meta/main.h>
-#include <meta/util.h>
+#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 90d43ee..be65b35 100644
--- a/src/ui/metaaccellabel.c
+++ b/src/ui/metaaccellabel.c
@@ -33,7 +33,7 @@
 #include "metaaccellabel.h"
 #include <gtk/gtk.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_finalize     (GObject             *object);
diff --git a/src/ui/resizepopup.c b/src/ui/resizepopup.c
index 43055c5..ed793cd 100644
--- a/src/ui/resizepopup.c
+++ b/src/ui/resizepopup.c
@@ -21,7 +21,7 @@
 
 #include <config.h>
 #include "resizepopup.h"
-#include <meta/util.h>
+#include "util-private.h"
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
 
diff --git a/src/ui/theme-parser.c b/src/ui/theme-parser.c
index abfe324..e9ce028 100644
--- a/src/ui/theme-parser.c
+++ b/src/ui/theme-parser.c
@@ -21,7 +21,7 @@
 
 #include <config.h>
 #include "theme-private.h"
-#include <meta/util.h>
+#include "util-private.h"
 #include <string.h>
 #include <stdlib.h>
 
diff --git a/src/ui/theme.c b/src/ui/theme.c
index ec6371a..51255ee 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -37,7 +37,7 @@
 #include <config.h>
 #include "theme-private.h"
 #include "frames.h" /* for META_TYPE_FRAMES */
-#include <meta/util.h>
+#include "util-private.h"
 #include <meta/gradient.h>
 #include <meta/prefs.h>
 #include <gtk/gtk.h>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]