diff --git a/po/POTFILES.in b/po/POTFILES.in index 84b8741a..4ae5da3b 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -17,10 +17,10 @@ data/ui/time-selector.ui data/ui/weather-settings.ui data/ui/window.ui data/ui/year-view.ui -src/gcal-application.c src/main.c src/core/gcal-event.c src/core/gcal-manager.c +src/gui/gcal-application.c src/gui/gcal-date-selector.c src/gui/gcal-edit-dialog.c src/gui/gcal-event-widget.c diff --git a/src/gcal-context.c b/src/core/gcal-context.c similarity index 100% rename from src/gcal-context.c rename to src/core/gcal-context.c diff --git a/src/gcal-context.h b/src/core/gcal-context.h similarity index 95% rename from src/gcal-context.h rename to src/core/gcal-context.h index 497a47ac..eeb6d651 100644 --- a/src/gcal-context.h +++ b/src/core/gcal-context.h @@ -52,4 +52,6 @@ GTimeZone* gcal_context_get_timezone (GcalContext GcalWeatherService* gcal_context_get_weather_service (GcalContext *self); +void gcal_context_startup (GcalContext *self); + G_END_DECLS diff --git a/src/gcal-log.c b/src/core/gcal-log.c similarity index 100% rename from src/gcal-log.c rename to src/core/gcal-log.c diff --git a/src/gcal-log.h b/src/core/gcal-log.h similarity index 100% rename from src/gcal-log.h rename to src/core/gcal-log.h diff --git a/src/gcal-night-light-monitor.c b/src/core/gcal-night-light-monitor.c similarity index 100% rename from src/gcal-night-light-monitor.c rename to src/core/gcal-night-light-monitor.c diff --git a/src/gcal-night-light-monitor.h b/src/core/gcal-night-light-monitor.h similarity index 100% rename from src/gcal-night-light-monitor.h rename to src/core/gcal-night-light-monitor.h diff --git a/src/gcal-shell-search-provider.c b/src/core/gcal-shell-search-provider.c similarity index 100% rename from src/gcal-shell-search-provider.c rename to src/core/gcal-shell-search-provider.c diff --git a/src/gcal-shell-search-provider.h b/src/core/gcal-shell-search-provider.h similarity index 100% rename from src/gcal-shell-search-provider.h rename to src/core/gcal-shell-search-provider.h diff --git a/src/gcal-time-zone-monitor.c b/src/core/gcal-time-zone-monitor.c similarity index 100% rename from src/gcal-time-zone-monitor.c rename to src/core/gcal-time-zone-monitor.c diff --git a/src/gcal-time-zone-monitor.h b/src/core/gcal-time-zone-monitor.h similarity index 100% rename from src/gcal-time-zone-monitor.h rename to src/core/gcal-time-zone-monitor.h diff --git a/src/gcal-context-private.h b/src/gcal-context-private.h deleted file mode 100644 index db163624..00000000 --- a/src/gcal-context-private.h +++ /dev/null @@ -1,29 +0,0 @@ -/* gcal-context-private.h - * - * Copyright 2019 Georges Basile Stavracas Neto - * - * 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 3 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, see . - * - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -#pragma once - -#include "gcal-context.h" - -G_BEGIN_DECLS - -void gcal_context_startup (GcalContext *self); - -G_END_DECLS diff --git a/src/gcal-application.c b/src/gui/gcal-application.c similarity index 99% rename from src/gcal-application.c rename to src/gui/gcal-application.c index 84bfd902..a8cb2da9 100644 --- a/src/gcal-application.c +++ b/src/gui/gcal-application.c @@ -23,7 +23,7 @@ #include "css-code.h" #include "gcal-application.h" -#include "gcal-context-private.h" +#include "gcal-context.h" #include "gcal-debug.h" #include "gcal-log.h" #include "gcal-resources.h" diff --git a/src/gcal-application.h b/src/gui/gcal-application.h similarity index 100% rename from src/gcal-application.h rename to src/gui/gcal-application.h diff --git a/src/meson.build b/src/meson.build index d1fe8210..404bc6a0 100644 --- a/src/meson.build +++ b/src/meson.build @@ -22,10 +22,16 @@ gcal_deps = [ sources = files( 'core/gcal-calendar.c', 'core/gcal-clock.c', + 'core/gcal-context.c', 'core/gcal-event.c', + 'core/gcal-log.c', 'core/gcal-manager.c', + 'core/gcal-night-light-monitor.c', 'core/gcal-recurrence.c', + 'core/gcal-shell-search-provider.c', 'core/gcal-timer.c', + 'core/gcal-time-zone-monitor.c', + 'gui/gcal-application.c', 'gui/gcal-calendar-popover.c', 'gui/gcal-date-chooser.c', 'gui/gcal-date-chooser-day.c', @@ -57,24 +63,18 @@ sources = files( 'weather/gcal-weather-info.c', 'weather/gcal-weather-service.c', 'weather/gcal-weather-settings.c', - 'gcal-application.c', - 'gcal-context.c', - 'gcal-log.c', - 'gcal-night-light-monitor.c', - 'gcal-shell-search-provider.c', - 'gcal-time-zone-monitor.c', ) enum_types = 'gcal-enum-types' -sources += gnome.mkenums( +built_sources = gnome.mkenums( enum_types, sources: enum_headers, c_template: enum_types + '.c.template', h_template: enum_types + '.h.template' ) -sources += gnome.compile_resources( +built_sources += gnome.compile_resources( 'gcal-resources', gresource, source_dir: data_dir, @@ -83,7 +83,7 @@ sources += gnome.compile_resources( export: true ) -sources += gnome.gdbus_codegen( +built_sources += gnome.gdbus_codegen( 'gcal-shell-search-provider-generated', shell_search_provider_dbus_interfaces, interface_prefix: 'org.gnome.', @@ -101,7 +101,7 @@ debug_conf.set10('ENABLE_TRACING', enable_tracing) debug = 'gcal-debug.h' -sources += configure_file( +built_sources += configure_file( input: debug + '.in', output: debug, configuration: debug_conf @@ -139,6 +139,7 @@ libgcal = static_library( libgcal_dep = declare_dependency( link_with: libgcal, + sources: built_sources, dependencies: gcal_deps, include_directories: calendar_incs, ) @@ -151,8 +152,7 @@ libgcal_dep = declare_dependency( executable( meson.project_name(), files('main.c'), - include_directories: calendar_incs, dependencies: libgcal_dep, install: true, - install_dir: calendar_bindir + install_dir: calendar_bindir, )