[libgweather/ebassi/gtk4] Remove GTK3 widgets



commit 6352a74f0933955050573215dbee72f7be44510b
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Oct 13 13:29:17 2021 +0100

    Remove GTK3 widgets
    
    The GTK3 widgets cannot exist in the same process as other versions of
    GTK, which means applications cannot port to GTK4 and link to
    libgweather.
    
    If we want to add GTK widgets back to libgweather we are going to do so
    in a separate shared library, with a separate namespace.

 data/glade/libgweather.xml             |  19 -
 data/meson.build                       |   6 -
 doc/libgweather.toml.in                |  10 +-
 doc/urlmap.js                          |   1 -
 libgweather/gweather-location-entry.c  | 860 ---------------------------------
 libgweather/gweather-location-entry.h  |  57 ---
 libgweather/gweather-timezone-menu.c   | 408 ----------------
 libgweather/gweather-timezone-menu.h   |  50 --
 libgweather/gweather.h                 |   2 -
 libgweather/meson.build                |  10 +-
 libgweather/tools/meson.build          |   6 -
 libgweather/tools/test_locations.c     |  72 ---
 libgweather/tools/test_locations_utc.c |  75 ---
 meson.build                            |  16 +-
 meson_options.txt                      |   2 -
 15 files changed, 9 insertions(+), 1585 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 5e04c298..e25732db 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,9 +1,3 @@
-if enable_glade_catalog
-  install_data('glade/libgweather.xml',
-    install_dir: glade_catalogdir,
-  )
-endif
-
 xmllint = find_program('xmllint', required: false)
 if xmllint.found()
   test('Valid Locations file',
diff --git a/doc/libgweather.toml.in b/doc/libgweather.toml.in
index 4199068a..0baa11b0 100644
--- a/doc/libgweather.toml.in
+++ b/doc/libgweather.toml.in
@@ -6,7 +6,7 @@ repository_url = "https://gitlab.gnome.org/GNOME/libgweather.git";
 authors = "The GWeather authors"
 license = "GPL-2.0-or-later"
 description = "Weather data collection"
-dependencies = [ "GObject-2.0", "Gio-2.0", "Gtk-3.0" ]
+dependencies = [ "GObject-2.0", "Gio-2.0", "GdkPixbuf-2.0" ]
 devhelp = true
 search_index = true
 
@@ -20,10 +20,10 @@ search_index = true
   description = "GObject interfaces and objects"
   docs_url = "https://docs.gtk.org/gio/";
 
-  [dependencies."Gtk-3.0"]
-  name = "Gtk"
-  description = "The GTK toolkit"
-  docs_url = "https://docs.gtk.org/gtk3/";
+  [dependencies."GdkPixbuf-2.0"]
+  name = "GdkPixbuf"
+  description = "Image loading library"
+  docs_url = "https://docs.gtk.org/gdk-pixbuf/";
 
 [theme]
 name = "basic"
diff --git a/doc/urlmap.js b/doc/urlmap.js
index 04776e14..d9e4599e 100644
--- a/doc/urlmap.js
+++ b/doc/urlmap.js
@@ -6,6 +6,5 @@ baseURLs = [
     [ 'GLib', 'https://docs.gtk.org/glib/' ],
     [ 'GObject', 'https://docs.gtk.org/gobject/' ],
     [ 'Gio', 'https://docs.gtk.org/gio/' ],
-    [ 'Gtk', 'https://docs.gtk.org/gtk3/' ],
     [ 'GdkPixbuf', 'https://docs.gtk.org/gdk-pixbuf/' ],
 ]
diff --git a/libgweather/gweather.h b/libgweather/gweather.h
index 131f3112..04a55069 100644
--- a/libgweather/gweather.h
+++ b/libgweather/gweather.h
@@ -15,7 +15,5 @@
 #include <libgweather/gweather-location.h>
 #include <libgweather/gweather-timezone.h>
 #include <libgweather/gweather-weather.h>
-#include <libgweather/gweather-location-entry.h>
-#include <libgweather/gweather-timezone-menu.h>
 
 #undef IN_GWEATHER_H
diff --git a/libgweather/meson.build b/libgweather/meson.build
index ccd8995b..944c08ed 100644
--- a/libgweather/meson.build
+++ b/libgweather/meson.build
@@ -96,7 +96,7 @@ configure_file(
 
 deps_libgweather = [
   dependency('gio-2.0', version: glib_req_version),
-  dependency('gtk+-3.0', version: gtk_req_version),
+  dependency('gdk-pixbuf-2.0'),
   dependency('libsoup-2.4', version: libsoup_req_version),
   dependency('libxml-2.0', version: libxml_req_version),
   dependency('geocode-glib-1.0'),
@@ -106,9 +106,7 @@ deps_libgweather = [
 
 gweather_headers = [
   'gweather-location.h',
-  'gweather-location-entry.h',
   'gweather-timezone.h',
-  'gweather-timezone-menu.h',
   'gweather-weather.h',
   'gweather-enums.h'
 ]
@@ -129,8 +127,6 @@ gweather_c_sources = [
   'gweather-weather.c',
   'gweather-location.c',
   'gweather-timezone.c',
-  'gweather-location-entry.c',
-  'gweather-timezone-menu.c',
 ]
 
 gweather_priv_sources = [
@@ -196,7 +192,7 @@ if build_gir
     dependencies: deps_libgweather,
     nsversion: libgweather_api_version,
     namespace: 'GWeather',
-    includes: ['GObject-2.0', 'Gtk-3.0'],
+    includes: ['Gio-2.0', 'GdkPixbuf-2.0'],
     symbol_prefix: 'gweather',
     identifier_prefix: 'GWeather',
     export_packages: 'gweather-' + libgweather_api_version,
@@ -225,7 +221,7 @@ libgweather_dep = declare_dependency(
 if build_vapi and build_gir
   gnome.generate_vapi('gweather-' + libgweather_api_version,
     sources: gweather_gir[0],
-    packages: ['gobject-2.0', 'gtk+-3.0'],
+    packages: ['gio-2.0', 'gdk-pixbuf-2.0'],
     metadata_dirs: '.',
     install: true,
   )
diff --git a/libgweather/tools/meson.build b/libgweather/tools/meson.build
index c1f63c68..b50e194b 100644
--- a/libgweather/tools/meson.build
+++ b/libgweather/tools/meson.build
@@ -1,10 +1,4 @@
 tools = [
-  {
-    'name': 'locations',
-  },
-  {
-    'name': 'locations_utc',
-  },
   {
     'name': 'metar',
   },
diff --git a/meson.build b/meson.build
index 774342d0..989b3c93 100644
--- a/meson.build
+++ b/meson.build
@@ -30,7 +30,6 @@ pkgdatadir = datadir / 'libgweather'
 pkglibdir = libdir / 'libgweather'
 
 glib_req_version = '>= 2.44.0'
-gtk_req_version = '>= 3.13.5'
 libsoup_req_version = '>= 2.44.0'
 libxml_req_version = '>= 2.6.0'
 
@@ -45,16 +44,6 @@ pylint_flags = [
   '-d', 'C0326',
 ]
 
-if get_option('glade_catalog') == 'false'
-  enable_glade_catalog = false
-else
-  glade_dep = dependency('gladeui-2.0', required: get_option('glade_catalog') == 'true')
-  enable_glade_catalog = glade_dep.found()
-  if enable_glade_catalog
-    glade_catalogdir = datadir / 'glade/catalogs'
-  endif
-endif
-
 gen_locations_variant = find_program('build-aux/meson/gen_locations_variant.py')
 
 subdir('data')
@@ -73,11 +62,9 @@ pkgconfig.generate(
   version: meson.project_version(),
   libraries: lib_libgweather,
   subdirs: libgweather_full_version,
-  requires: [
-    'gtk+-3.0',
-  ],
   requires_private: [
     'gio-2.0',
+    'gdk-pixbuf-2.0',
     'libsoup-2.4',
     'libxml-2.0',
     'geocode-glib-1.0',
@@ -96,7 +83,6 @@ summary({
 summary({
     'Debug': get_option('debug'),
     'Optimization': get_option('optimization'),
-    'Glade catalog': enable_glade_catalog,
     'Introspection': build_gir,
     'Generate VAPI': build_vapi,
     'API reference': get_option('gtk_doc'),
diff --git a/meson_options.txt b/meson_options.txt
index 9957f091..0e354dab 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -2,8 +2,6 @@ option('zoneinfo_dir', type: 'string', value: '/usr/share/zoneinfo',
        description: 'zoneinfo directory')
 option('owm_apikey', type: 'string', value: '',
        description: 'Specify an API key for OpenWeatherMap (optional)')
-option('glade_catalog', type: 'combo', choices : ['true', 'false', 'auto'], value : 'auto',
-       description: 'Install a glade catalog file')
 option('enable_vala', type: 'combo', choices : ['true', 'false', 'auto'], value : 'auto',
        description: 'Install vala bindings')
 option('gtk_doc', type: 'boolean', value: true,


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