[gnome-calendar/gbsneto/edit-dialog-cleanup: 4/23] project: Move all UI-related files to src/gui/




commit e67ebcfc50ea514e3f98b44e821ef479554b6e6c
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Oct 30 14:44:33 2020 -0300

    project: Move all UI-related files to src/gui/
    
    So we can have a nice separation.

 src/gui/gcal-application.c                                | 3 ---
 src/{search => gui}/gcal-search-button.c                  | 0
 src/{search => gui}/gcal-search-button.h                  | 0
 src/{weather => gui}/gcal-weather-settings.c              | 2 +-
 src/{weather => gui}/gcal-weather-settings.h              | 0
 src/{weather => gui}/gcal-weather-settings.ui             | 0
 src/{calendar.gresource.xml => gui/gtk/gtk.gresource.xml} | 1 -
 src/{ => gui/gtk}/help-overlay.ui                         | 0
 src/gui/gtk/meson.build                                   | 5 +++++
 src/gui/gui.gresource.xml                                 | 1 +
 src/gui/meson.build                                       | 4 ++++
 src/{ => gui}/views/gcal-month-cell.c                     | 0
 src/{ => gui}/views/gcal-month-cell.h                     | 0
 src/{ => gui}/views/gcal-month-cell.ui                    | 0
 src/{ => gui}/views/gcal-month-popover.c                  | 0
 src/{ => gui}/views/gcal-month-popover.h                  | 0
 src/{ => gui}/views/gcal-month-popover.ui                 | 0
 src/{ => gui}/views/gcal-month-view.c                     | 0
 src/{ => gui}/views/gcal-month-view.h                     | 0
 src/{ => gui}/views/gcal-month-view.ui                    | 0
 src/{ => gui}/views/gcal-view.c                           | 0
 src/{ => gui}/views/gcal-view.h                           | 0
 src/{ => gui}/views/gcal-week-grid.c                      | 0
 src/{ => gui}/views/gcal-week-grid.h                      | 0
 src/{ => gui}/views/gcal-week-header.c                    | 0
 src/{ => gui}/views/gcal-week-header.h                    | 0
 src/{ => gui}/views/gcal-week-header.ui                   | 0
 src/{ => gui}/views/gcal-week-view.c                      | 0
 src/{ => gui}/views/gcal-week-view.h                      | 0
 src/{ => gui}/views/gcal-week-view.ui                     | 0
 src/{ => gui}/views/gcal-year-view.c                      | 0
 src/{ => gui}/views/gcal-year-view.h                      | 0
 src/{ => gui}/views/gcal-year-view.ui                     | 0
 src/{ => gui}/views/meson.build                           | 0
 src/{ => gui}/views/views.gresource.xml                   | 0
 src/meson.build                                           | 9 ---------
 src/search/meson.build                                    | 1 -
 src/weather/meson.build                                   | 7 -------
 src/weather/weather.gresource.xml                         | 6 ------
 39 files changed, 11 insertions(+), 28 deletions(-)
---
diff --git a/src/gui/gcal-application.c b/src/gui/gcal-application.c
index 591b95c8..99356732 100644
--- a/src/gui/gcal-application.c
+++ b/src/gui/gcal-application.c
@@ -26,7 +26,6 @@
 #include "gcal-context.h"
 #include "gcal-debug.h"
 #include "gcal-log.h"
-#include "gcal-resources.h"
 #include "gcal-shell-search-provider.h"
 #include "gcal-window.h"
 
@@ -613,8 +612,6 @@ gcal_application_init (GcalApplication *self)
 {
   GcalManager *manager;
 
-  g_resources_register (calendar_get_resource ());
-
   g_application_add_main_option_entries (G_APPLICATION (self), gcal_application_goptions);
 
   self->context = gcal_context_new ();
diff --git a/src/search/gcal-search-button.c b/src/gui/gcal-search-button.c
similarity index 100%
rename from src/search/gcal-search-button.c
rename to src/gui/gcal-search-button.c
diff --git a/src/search/gcal-search-button.h b/src/gui/gcal-search-button.h
similarity index 100%
rename from src/search/gcal-search-button.h
rename to src/gui/gcal-search-button.h
diff --git a/src/weather/gcal-weather-settings.c b/src/gui/gcal-weather-settings.c
similarity index 99%
rename from src/weather/gcal-weather-settings.c
rename to src/gui/gcal-weather-settings.c
index fec4e7f8..ff2a48f6 100644
--- a/src/weather/gcal-weather-settings.c
+++ b/src/gui/gcal-weather-settings.c
@@ -344,7 +344,7 @@ gcal_weather_settings_class_init (GcalWeatherSettingsClass *klass)
 
   g_object_class_install_properties (object_class, N_PROPS, properties);
 
-  gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/calendar/ui/weather/gcal-weather-settings.ui");
+  gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/calendar/ui/gui/gcal-weather-settings.ui");
 
   gtk_widget_class_bind_template_child (widget_class, GcalWeatherSettings, show_weather_switch);
   gtk_widget_class_bind_template_child (widget_class, GcalWeatherSettings, weather_auto_location_switch);
diff --git a/src/weather/gcal-weather-settings.h b/src/gui/gcal-weather-settings.h
similarity index 100%
rename from src/weather/gcal-weather-settings.h
rename to src/gui/gcal-weather-settings.h
diff --git a/src/weather/gcal-weather-settings.ui b/src/gui/gcal-weather-settings.ui
similarity index 100%
rename from src/weather/gcal-weather-settings.ui
rename to src/gui/gcal-weather-settings.ui
diff --git a/src/calendar.gresource.xml b/src/gui/gtk/gtk.gresource.xml
similarity index 92%
rename from src/calendar.gresource.xml
rename to src/gui/gtk/gtk.gresource.xml
index e59ea3b2..89f7f5a9 100644
--- a/src/calendar.gresource.xml
+++ b/src/gui/gtk/gtk.gresource.xml
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gresources>
-  <!-- GTK -->
   <gresource prefix="/org/gnome/calendar/gtk">
     <file compressed="true">help-overlay.ui</file>
   </gresource>
diff --git a/src/help-overlay.ui b/src/gui/gtk/help-overlay.ui
similarity index 100%
rename from src/help-overlay.ui
rename to src/gui/gtk/help-overlay.ui
diff --git a/src/gui/gtk/meson.build b/src/gui/gtk/meson.build
new file mode 100644
index 00000000..fb999e0c
--- /dev/null
+++ b/src/gui/gtk/meson.build
@@ -0,0 +1,5 @@
+built_sources += gnome.compile_resources(
+  'gtk-resources',
+  'gtk.gresource.xml',
+  c_name: 'gtk',
+)
diff --git a/src/gui/gui.gresource.xml b/src/gui/gui.gresource.xml
index 0bf4d1c1..1fd3d768 100644
--- a/src/gui/gui.gresource.xml
+++ b/src/gui/gui.gresource.xml
@@ -10,6 +10,7 @@
     <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-weather-settings.ui</file>
     <file compressed="true">gcal-window.ui</file>
   </gresource>
 </gresources>
diff --git a/src/gui/meson.build b/src/gui/meson.build
index 66157850..0a2d473a 100644
--- a/src/gui/meson.build
+++ b/src/gui/meson.build
@@ -1,4 +1,6 @@
 subdir('calendar-management')
+subdir('gtk')
+subdir('views')
 
 calendar_incs +=  include_directories('.')
 
@@ -19,6 +21,8 @@ sources += files(
   'gcal-event-widget.c',
   'gcal-multi-choice.c',
   'gcal-quick-add-popover.c',
+  'gcal-search-button.c',
   'gcal-time-selector.c',
+  'gcal-weather-settings.c',
   'gcal-window.c',
 )
diff --git a/src/views/gcal-month-cell.c b/src/gui/views/gcal-month-cell.c
similarity index 100%
rename from src/views/gcal-month-cell.c
rename to src/gui/views/gcal-month-cell.c
diff --git a/src/views/gcal-month-cell.h b/src/gui/views/gcal-month-cell.h
similarity index 100%
rename from src/views/gcal-month-cell.h
rename to src/gui/views/gcal-month-cell.h
diff --git a/src/views/gcal-month-cell.ui b/src/gui/views/gcal-month-cell.ui
similarity index 100%
rename from src/views/gcal-month-cell.ui
rename to src/gui/views/gcal-month-cell.ui
diff --git a/src/views/gcal-month-popover.c b/src/gui/views/gcal-month-popover.c
similarity index 100%
rename from src/views/gcal-month-popover.c
rename to src/gui/views/gcal-month-popover.c
diff --git a/src/views/gcal-month-popover.h b/src/gui/views/gcal-month-popover.h
similarity index 100%
rename from src/views/gcal-month-popover.h
rename to src/gui/views/gcal-month-popover.h
diff --git a/src/views/gcal-month-popover.ui b/src/gui/views/gcal-month-popover.ui
similarity index 100%
rename from src/views/gcal-month-popover.ui
rename to src/gui/views/gcal-month-popover.ui
diff --git a/src/views/gcal-month-view.c b/src/gui/views/gcal-month-view.c
similarity index 100%
rename from src/views/gcal-month-view.c
rename to src/gui/views/gcal-month-view.c
diff --git a/src/views/gcal-month-view.h b/src/gui/views/gcal-month-view.h
similarity index 100%
rename from src/views/gcal-month-view.h
rename to src/gui/views/gcal-month-view.h
diff --git a/src/views/gcal-month-view.ui b/src/gui/views/gcal-month-view.ui
similarity index 100%
rename from src/views/gcal-month-view.ui
rename to src/gui/views/gcal-month-view.ui
diff --git a/src/views/gcal-view.c b/src/gui/views/gcal-view.c
similarity index 100%
rename from src/views/gcal-view.c
rename to src/gui/views/gcal-view.c
diff --git a/src/views/gcal-view.h b/src/gui/views/gcal-view.h
similarity index 100%
rename from src/views/gcal-view.h
rename to src/gui/views/gcal-view.h
diff --git a/src/views/gcal-week-grid.c b/src/gui/views/gcal-week-grid.c
similarity index 100%
rename from src/views/gcal-week-grid.c
rename to src/gui/views/gcal-week-grid.c
diff --git a/src/views/gcal-week-grid.h b/src/gui/views/gcal-week-grid.h
similarity index 100%
rename from src/views/gcal-week-grid.h
rename to src/gui/views/gcal-week-grid.h
diff --git a/src/views/gcal-week-header.c b/src/gui/views/gcal-week-header.c
similarity index 100%
rename from src/views/gcal-week-header.c
rename to src/gui/views/gcal-week-header.c
diff --git a/src/views/gcal-week-header.h b/src/gui/views/gcal-week-header.h
similarity index 100%
rename from src/views/gcal-week-header.h
rename to src/gui/views/gcal-week-header.h
diff --git a/src/views/gcal-week-header.ui b/src/gui/views/gcal-week-header.ui
similarity index 100%
rename from src/views/gcal-week-header.ui
rename to src/gui/views/gcal-week-header.ui
diff --git a/src/views/gcal-week-view.c b/src/gui/views/gcal-week-view.c
similarity index 100%
rename from src/views/gcal-week-view.c
rename to src/gui/views/gcal-week-view.c
diff --git a/src/views/gcal-week-view.h b/src/gui/views/gcal-week-view.h
similarity index 100%
rename from src/views/gcal-week-view.h
rename to src/gui/views/gcal-week-view.h
diff --git a/src/views/gcal-week-view.ui b/src/gui/views/gcal-week-view.ui
similarity index 100%
rename from src/views/gcal-week-view.ui
rename to src/gui/views/gcal-week-view.ui
diff --git a/src/views/gcal-year-view.c b/src/gui/views/gcal-year-view.c
similarity index 100%
rename from src/views/gcal-year-view.c
rename to src/gui/views/gcal-year-view.c
diff --git a/src/views/gcal-year-view.h b/src/gui/views/gcal-year-view.h
similarity index 100%
rename from src/views/gcal-year-view.h
rename to src/gui/views/gcal-year-view.h
diff --git a/src/views/gcal-year-view.ui b/src/gui/views/gcal-year-view.ui
similarity index 100%
rename from src/views/gcal-year-view.ui
rename to src/gui/views/gcal-year-view.ui
diff --git a/src/views/meson.build b/src/gui/views/meson.build
similarity index 100%
rename from src/views/meson.build
rename to src/gui/views/meson.build
diff --git a/src/views/views.gresource.xml b/src/gui/views/views.gresource.xml
similarity index 100%
rename from src/views/views.gresource.xml
rename to src/gui/views/views.gresource.xml
diff --git a/src/meson.build b/src/meson.build
index 1acf2493..55d4f855 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -28,14 +28,6 @@ built_sources = gnome.mkenums(
   h_template: enum_types + '.h.template'
 )
 
-gresource = files('calendar.gresource.xml')
-built_sources += gnome.compile_resources(
-  'gcal-resources',
-         gresource,
-            c_name: 'calendar',
-            export: true
-)
-
 built_sources += gnome.gdbus_codegen(
   'gcal-shell-search-provider-generated',
   shell_search_provider_dbus_interfaces,
@@ -80,7 +72,6 @@ subdir('gui')
 subdir('search')
 subdir('theme')
 subdir('utils')
-subdir('views')
 subdir('weather')
 
 libgcal_generated_sources_dep = declare_dependency(
diff --git a/src/search/meson.build b/src/search/meson.build
index a39fa2df..b036c622 100644
--- a/src/search/meson.build
+++ b/src/search/meson.build
@@ -1,7 +1,6 @@
 calendar_incs +=  include_directories('.')
 
 sources += files(
-  'gcal-search-button.c',
   'gcal-search-engine.c',
   'gcal-search-hit.c',
   'gcal-search-hit-event.c',
diff --git a/src/weather/meson.build b/src/weather/meson.build
index 9ce1985b..10a5ccde 100644
--- a/src/weather/meson.build
+++ b/src/weather/meson.build
@@ -1,13 +1,6 @@
 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',
-  'gcal-weather-settings.c',
 )


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