[gnome-calendar/gbsneto/edit-dialog-cleanup: 3/23] project: Split GResource files in subdirs




commit 92863f578f8941afad717b146b8241cdb460c440
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Oct 30 14:17:40 2020 -0300

    project: Split GResource files in subdirs

 src/calendar.gresource.xml                         | 36 ----------------------
 .../calendar-management.gresource.xml              | 10 ++++++
 src/gui/calendar-management/meson.build            |  6 ++++
 src/gui/gui.gresource.xml                          | 15 +++++++++
 src/gui/meson.build                                |  6 ++++
 src/meson.build                                    | 13 ++++----
 src/theme/meson.build                              |  5 +++
 src/theme/theme.gresource.xml                      |  6 ++++
 src/views/meson.build                              |  6 ++++
 src/views/views.gresource.xml                      | 11 +++++++
 src/weather/meson.build                            |  6 ++++
 src/weather/weather.gresource.xml                  |  6 ++++
 12 files changed, 84 insertions(+), 42 deletions(-)
---
diff --git a/src/calendar.gresource.xml b/src/calendar.gresource.xml
index df7cc7e5..e59ea3b2 100644
--- a/src/calendar.gresource.xml
+++ b/src/calendar.gresource.xml
@@ -1,41 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gresources>
-  <gresource prefix="/org/gnome/calendar/ui">
-    <file compressed="true">gui/gcal-alarm-row.ui</file>
-    <file compressed="true">gui/gcal-calendar-popover.ui</file>
-    <file compressed="true">gui/gcal-date-chooser.ui</file>
-    <file compressed="true">gui/gcal-date-selector.ui</file>
-    <file compressed="true">gui/gcal-edit-dialog.ui</file>
-    <file compressed="true">gui/gcal-event-widget.ui</file>
-    <file compressed="true">gui/gcal-quick-add-popover.ui</file>
-    <file compressed="true">gui/gcal-multi-choice.ui</file>
-    <file compressed="true">gui/gcal-time-selector.ui</file>
-    <file compressed="true">gui/gcal-window.ui</file>
-
-    <!-- Calendar Management dialog -->
-    <file compressed="true">gui/calendar-management/calendar-row.ui</file>
-    <file compressed="true">gui/calendar-management/gcal-calendar-management-dialog.ui</file>
-    <file compressed="true">gui/calendar-management/gcal-calendars-page.ui</file>
-    <file compressed="true">gui/calendar-management/gcal-edit-calendar-page.ui</file>
-    <file compressed="true">gui/calendar-management/gcal-new-calendar-page.ui</file>
-
-    <!-- Views -->
-    <file compressed="true">views/gcal-month-cell.ui</file>
-    <file compressed="true">views/gcal-month-popover.ui</file>
-    <file compressed="true">views/gcal-month-view.ui</file>
-    <file compressed="true">views/gcal-week-header.ui</file>
-    <file compressed="true">views/gcal-week-view.ui</file>
-    <file compressed="true">views/gcal-year-view.ui</file>
-
-    <!-- Weather -->
-    <file compressed="true">weather/gcal-weather-settings.ui</file>
-  </gresource>
-
-  <!-- Theme -->
-  <gresource prefix="/org/gnome/calendar">
-    <file>theme/Adwaita.css</file>
-  </gresource>
-
   <!-- GTK -->
   <gresource prefix="/org/gnome/calendar/gtk">
     <file compressed="true">help-overlay.ui</file>
diff --git a/src/gui/calendar-management/calendar-management.gresource.xml 
b/src/gui/calendar-management/calendar-management.gresource.xml
new file mode 100644
index 00000000..d1cb4726
--- /dev/null
+++ b/src/gui/calendar-management/calendar-management.gresource.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/calendar/ui/gui/calendar-management">
+    <file compressed="true">calendar-row.ui</file>
+    <file compressed="true">gcal-calendar-management-dialog.ui</file>
+    <file compressed="true">gcal-calendars-page.ui</file>
+    <file compressed="true">gcal-edit-calendar-page.ui</file>
+    <file compressed="true">gcal-new-calendar-page.ui</file>
+  </gresource>
+</gresources>
diff --git a/src/gui/calendar-management/meson.build b/src/gui/calendar-management/meson.build
index 2b0e057f..d8c51c40 100644
--- a/src/gui/calendar-management/meson.build
+++ b/src/gui/calendar-management/meson.build
@@ -1,5 +1,11 @@
 calendar_incs +=  include_directories('.')
 
+built_sources += gnome.compile_resources(
+  'calendar-management-resources',
+  'calendar-management.gresource.xml',
+  c_name: 'calendar_management',
+)
+
 sources += files(
   'gcal-calendar-management-dialog.c',
   'gcal-calendar-management-page.c',
diff --git a/src/gui/gui.gresource.xml b/src/gui/gui.gresource.xml
new file mode 100644
index 00000000..0bf4d1c1
--- /dev/null
+++ b/src/gui/gui.gresource.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/calendar/ui/gui">
+    <file compressed="true">gcal-alarm-row.ui</file>
+    <file compressed="true">gcal-calendar-popover.ui</file>
+    <file compressed="true">gcal-date-chooser.ui</file>
+    <file compressed="true">gcal-date-selector.ui</file>
+    <file compressed="true">gcal-edit-dialog.ui</file>
+    <file compressed="true">gcal-event-widget.ui</file>
+    <file compressed="true">gcal-quick-add-popover.ui</file>
+    <file compressed="true">gcal-multi-choice.ui</file>
+    <file compressed="true">gcal-time-selector.ui</file>
+    <file compressed="true">gcal-window.ui</file>
+  </gresource>
+</gresources>
diff --git a/src/gui/meson.build b/src/gui/meson.build
index 531bf7a4..66157850 100644
--- a/src/gui/meson.build
+++ b/src/gui/meson.build
@@ -2,6 +2,12 @@ subdir('calendar-management')
 
 calendar_incs +=  include_directories('.')
 
+built_sources += gnome.compile_resources(
+  'gui-resources',
+  'gui.gresource.xml',
+  c_name: 'gui',
+)
+
 sources += files(
   'gcal-alarm-row.c',
   'gcal-application.c',
diff --git a/src/meson.build b/src/meson.build
index 8a23ce2a..1acf2493 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -60,12 +60,6 @@ built_sources += configure_file(
   configuration: debug_conf
 )
 
-libgcal_generated_sources_dep = declare_dependency(
-  sources: built_sources,
-)
-
-gcal_deps += libgcal_generated_sources_dep
-
 
 #######################
 # Include directories #
@@ -84,10 +78,17 @@ sources = files()
 subdir('core')
 subdir('gui')
 subdir('search')
+subdir('theme')
 subdir('utils')
 subdir('views')
 subdir('weather')
 
+libgcal_generated_sources_dep = declare_dependency(
+  sources: built_sources,
+)
+
+gcal_deps += libgcal_generated_sources_dep
+
 libgcal = static_library(
                'gcal-private',
               sources: sources,
diff --git a/src/theme/meson.build b/src/theme/meson.build
new file mode 100644
index 00000000..0b25db40
--- /dev/null
+++ b/src/theme/meson.build
@@ -0,0 +1,5 @@
+built_sources += gnome.compile_resources(
+  'theme-resources',
+  'theme.gresource.xml',
+  c_name: 'theme',
+)
diff --git a/src/theme/theme.gresource.xml b/src/theme/theme.gresource.xml
new file mode 100644
index 00000000..2cbd4881
--- /dev/null
+++ b/src/theme/theme.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/calendar/theme">
+    <file>Adwaita.css</file>
+  </gresource>
+</gresources>
diff --git a/src/views/meson.build b/src/views/meson.build
index d838de3c..96c5a037 100644
--- a/src/views/meson.build
+++ b/src/views/meson.build
@@ -1,5 +1,11 @@
 calendar_incs +=  include_directories('.')
 
+built_sources += gnome.compile_resources(
+  'views-resources',
+  'views.gresource.xml',
+  c_name: 'views',
+)
+
 sources += files(
   'gcal-month-cell.c',
   'gcal-month-popover.c',
diff --git a/src/views/views.gresource.xml b/src/views/views.gresource.xml
new file mode 100644
index 00000000..4e6eddba
--- /dev/null
+++ b/src/views/views.gresource.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/calendar/ui/views">
+    <file compressed="true">gcal-month-cell.ui</file>
+    <file compressed="true">gcal-month-popover.ui</file>
+    <file compressed="true">gcal-month-view.ui</file>
+    <file compressed="true">gcal-week-header.ui</file>
+    <file compressed="true">gcal-week-view.ui</file>
+    <file compressed="true">gcal-year-view.ui</file>
+  </gresource>
+</gresources>
diff --git a/src/weather/meson.build b/src/weather/meson.build
index 44557dfd..9ce1985b 100644
--- a/src/weather/meson.build
+++ b/src/weather/meson.build
@@ -1,5 +1,11 @@
 calendar_incs +=  include_directories('.')
 
+built_sources += gnome.compile_resources(
+  'weather-resources',
+  'weather.gresource.xml',
+  c_name: 'weather',
+)
+
 sources += files(
   'gcal-weather-info.c',
   'gcal-weather-service.c',
diff --git a/src/weather/weather.gresource.xml b/src/weather/weather.gresource.xml
new file mode 100644
index 00000000..7c5ec595
--- /dev/null
+++ b/src/weather/weather.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/calendar/ui/weather">
+    <file compressed="true">gcal-weather-settings.ui</file>
+  </gresource>
+</gresources>


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