Skip to content

Commit 76a0b89

Browse files
authored
config.h and meson cleanup (#2542)
1 parent 346db71 commit 76a0b89

File tree

5 files changed

+10
-38
lines changed

5 files changed

+10
-38
lines changed

lib/CloseButton.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public class Gala.CloseButton : Clutter.Actor {
5151
if (close_pixbufs[height] == null) {
5252
try {
5353
close_pixbufs[height] = new Gdk.Pixbuf.from_resource_at_scale (
54-
Config.RESOURCEPATH + "/buttons/close.svg",
54+
"/org/pantheon/desktop/gala/buttons/close.svg",
5555
-1,
5656
height,
5757
true

lib/Utils.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ namespace Gala {
357357
if (resize_pixbufs[height] == null) {
358358
try {
359359
resize_pixbufs[height] = new Gdk.Pixbuf.from_resource_at_scale (
360-
Config.RESOURCEPATH + "/buttons/resize.svg",
360+
"/org/pantheon/desktop/gala/buttons/resize.svg",
361361
-1,
362362
height,
363363
true

lib/meson.build

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,5 @@ pkg.generate(
7171
name: 'Gala',
7272
description: 'Library to develop plugins for Gala',
7373
subdirs: 'gala',
74-
requires: [glib_dep, gobject_dep, gio_dep, gio_unix_dep, libmutter_dep],
75-
variables: [
76-
'datarootdir=${prefix}/@0@'.format(get_option('datadir')),
77-
'pkgdatadir=${datarootdir}/gala'
78-
]
74+
requires: [glib_dep, gobject_dep, gio_dep, gio_unix_dep, libmutter_dep]
7975
)

meson.build

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ project('gala',
55
license: 'GPL3',
66
)
77

8-
is_release = false
9-
108
gnome = import('gnome')
119
i18n = import('i18n')
1210
pkg = import('pkgconfig')
@@ -18,16 +16,11 @@ vapi_dir = meson.current_source_dir() / 'vapi'
1816
locale_dir = join_paths(get_option('prefix'), get_option('localedir'))
1917
data_dir = join_paths(get_option('prefix'), get_option('datadir'))
2018
plugins_dir = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name(), 'plugins')
21-
pkgdata_dir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
22-
pkglib_dir = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name())
2319

2420
conf = configuration_data()
2521
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
2622
conf.set_quoted('LOCALEDIR', locale_dir)
27-
conf.set_quoted('DATADIR', data_dir)
28-
conf.set_quoted('PKGDATADIR', pkgdata_dir)
2923
conf.set_quoted('PLUGINDIR', plugins_dir)
30-
conf.set_quoted('RESOURCEPATH', '/org/pantheon/desktop/gala')
3124
conf.set_quoted('VERSION', meson.project_version())
3225
config_h = configure_file(
3326
output: 'config.h',
@@ -41,9 +34,6 @@ config_dep = declare_dependency(
4134

4235
config_inc_dir = include_directories('.')
4336

44-
customconf = configuration_data()
45-
customconf.set('GETTEXT_PACKAGE', meson.project_name())
46-
4737
add_project_arguments([
4838
'--target-glib=2.44',
4939
'--hide-internal',

vapi/config.vapi

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,14 @@
1-
//
2-
// Copyright (C) 2011 Robert Dyer, Rico Tzschichholz
3-
//
4-
// This program is free software: you can redistribute it and/or modify
5-
// it under the terms of the GNU General Public License as published by
6-
// the Free Software Foundation, either version 3 of the License, or
7-
// (at your option) any later version.
8-
//
9-
// This program is distributed in the hope that it will be useful,
10-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
// GNU General Public License for more details.
13-
//
14-
// You should have received a copy of the GNU General Public License
15-
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16-
//
1+
/*
2+
* SPDX-License-Identifier: GPL-3.0-or-later
3+
* SPDX-FileCopyrightText: 2025 elementary, Inc. (https://elementary.io)
4+
* 2011 Robert Dyer
5+
* 2011 Rico Tzschichholz
6+
*/
177

188
[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
19-
namespace Config
20-
{
9+
namespace Config {
2110
public const string GETTEXT_PACKAGE;
2211
public const string LOCALEDIR;
23-
public const string DATADIR;
24-
public const string PKGDATADIR;
2512
public const string VERSION;
2613
public const string PLUGINDIR;
27-
public const string RESOURCEPATH;
2814
}

0 commit comments

Comments
 (0)