From af501ac4727f68bf313503bb31a34804c1876b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 1 Mar 2021 21:49:10 +0100 Subject: [PATCH] prefs: Make init function private Part-of: --- src/core/main.c | 2 +- src/core/prefs-private.h | 26 ++++++++++++++++++++++++++ src/core/prefs.c | 1 + src/meson.build | 1 + src/meta/prefs.h | 3 --- 5 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 src/core/prefs-private.h diff --git a/src/core/main.c b/src/core/main.c index 5b874a562..9b5a3acb5 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -79,11 +79,11 @@ #include "clutter/clutter.h" #include "core/display-private.h" #include "core/main-private.h" +#include "core/prefs-private.h" #include "core/util-private.h" #include "meta/compositor.h" #include "meta/meta-backend.h" #include "meta/meta-x11-errors.h" -#include "meta/prefs.h" #include "ui/ui.h" #include "x11/session.h" diff --git a/src/core/prefs-private.h b/src/core/prefs-private.h new file mode 100644 index 000000000..e587bfaa1 --- /dev/null +++ b/src/core/prefs-private.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2021 Red Hat Inc. + * + * 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 PREFS_PRIVATE_H +#define PREFS_PRIVATE_H + +void meta_prefs_init (void); + +#endif /* PREFS_PRIVATE_H */ diff --git a/src/core/prefs.c b/src/core/prefs.c index 60d7a278a..536d9dd57 100644 --- a/src/core/prefs.c +++ b/src/core/prefs.c @@ -36,6 +36,7 @@ #include "compositor/meta-plugin-manager.h" #include "core/keybindings-private.h" #include "core/meta-accel-parse.h" +#include "core/prefs-private.h" #include "core/util-private.h" #include "meta/prefs.h" #include "x11/meta-x11-display-private.h" diff --git a/src/meson.build b/src/meson.build index 284bdf522..64a65bc88 100644 --- a/src/meson.build +++ b/src/meson.build @@ -388,6 +388,7 @@ mutter_sources = [ 'core/meta-workspace-manager-private.h', 'core/place.c', 'core/place.h', + 'core/prefs-private.h', 'core/prefs.c', 'core/restart.c', 'core/stack.c', diff --git a/src/meta/prefs.h b/src/meta/prefs.h index e2c8b46cf..7a8bfab96 100644 --- a/src/meta/prefs.h +++ b/src/meta/prefs.h @@ -119,9 +119,6 @@ META_EXPORT void meta_prefs_remove_listener (MetaPrefsChangedFunc func, gpointer user_data); -META_EXPORT -void meta_prefs_init (void); - META_EXPORT const char* meta_preference_to_string (MetaPreference pref);