Commit c2f601a9 authored by Benjamin Berg's avatar Benjamin Berg
Browse files

Move common panel code from shell/ to panel/common

This creates a new static library called libwidget which the shell links
against.
parent e1593b3c
......@@ -26,7 +26,7 @@
#include <gdk/gdkx.h>
#include <libsoup/soup.h>
#include "shell/list-box-helper.h"
#include "list-box-helper.h"
#include "cc-color-calibrate.h"
#include "cc-color-cell-renderer-text.h"
#include "cc-color-panel.h"
......
......@@ -55,7 +55,7 @@ cflags += [
panels_libs += static_library(
cappletname,
sources: sources,
include_directories: top_inc,
include_directories: [ top_inc, common_inc ],
dependencies: deps,
c_args: cflags
)
......
......@@ -29,7 +29,7 @@
#include <gio/gio.h>
#include <gtk/gtk.h>
#include "shell/list-box-helper.h"
#include "list-box-helper.h"
#include "cc-common-language.h"
#include "cc-util.h"
......
......@@ -24,6 +24,23 @@ common_sources += gnome.mkenums(
vtail: ' { 0, NULL, NULL }\n };\n etype = g_@type@_register_static ("@EnumName@", values);\n }\n return etype;\n}\n'
)
sources = files(
'cc-hostname-entry.c',
'hostname-helper.c',
'list-box-helper.c',
)
libwidgets = static_library(
'widgets',
sources: sources,
include_directories: top_inc,
dependencies: common_deps + [ polkit_gobject_dep ]
)
libwidgets_dep = declare_dependency(
include_directories: common_inc,
link_with: libwidgets
)
sources = common_sources + files(
'cc-common-language.c',
'cc-language-chooser.c',
......@@ -121,3 +138,26 @@ run_target(
script_name,
command: script
)
test_unit = 'test-hostname'
sources = files(
'hostname-helper.c',
test_unit + '.c'
)
cflags = [
'-DTEST_SRCDIR="@0@"'.format(meson.current_source_dir()),
'-DTEST_TOPSRCDIR="@0@"'.format(meson.source_root())
]
exe = executable(
test_unit,
sources,
include_directories: top_inc,
dependencies: [ common_deps, libwidgets_dep ],
c_args: cflags
)
test(test_unit, exe)
......@@ -129,8 +129,8 @@ int main (int argc, char **argv)
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/shell/hostname", test_hostname);
g_test_add_func ("/shell/ssid", test_ssid);
g_test_add_func ("/common/hostname", test_hostname);
g_test_add_func ("/common/ssid", test_ssid);
return g_test_run ();
}
......@@ -25,7 +25,7 @@
#include <langinfo.h>
#include <sys/time.h>
#include "shell/list-box-helper.h"
#include "list-box-helper.h"
#include "cc-timezone-map.h"
#include "timedated.h"
#include "date-endian.h"
......
......@@ -186,7 +186,7 @@ cflags += [
panels_libs += static_library(
cappletname,
sources: sources + resources,
include_directories: top_inc,
include_directories: [ top_inc, common_inc ],
dependencies: deps,
c_args: cflags
)
......
......@@ -30,7 +30,7 @@
#include <math.h>
#include "shell/cc-object-storage.h"
#include "shell/list-box-helper.h"
#include "list-box-helper.h"
#include <libupower-glib/upower.h>
#include "cc-display-config-manager-dbus.h"
......
......@@ -58,7 +58,7 @@ cflags += [
panels_libs += static_library(
cappletname,
sources: sources,
include_directories: top_inc,
include_directories: [ top_inc, common_inc ],
dependencies: deps,
c_args: cflags
)
......
......@@ -21,8 +21,8 @@
#include <config.h>
#include "shell/cc-hostname-entry.h"
#include "shell/cc-object-storage.h"
#include "cc-hostname-entry.h"
#include "cc-info-resources.h"
#include "info-cleanup.h"
......
......@@ -67,7 +67,7 @@ deps = common_deps + [
panels_libs += static_library(
cappletname,
sources: sources,
include_directories: top_inc,
include_directories: [ top_inc, common_inc ],
dependencies: deps,
c_args: cflags
)
......
......@@ -35,7 +35,7 @@
#include "gnome-mouse-properties.h"
#include "gsd-input-helper.h"
#include "gsd-device-manager.h"
#include "shell/list-box-helper.h"
#include "list-box-helper.h"
#include "cc-mouse-caps-helper.h"
#include <sys/types.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment