[gnome-software/wip/exalm/lozenges: 157/158] Revert "build: Prepare for AdwCarousel API changes"
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/exalm/lozenges: 157/158] Revert "build: Prepare for AdwCarousel API changes"
- Date: Sat, 25 Dec 2021 13:10:22 +0000 (UTC)
commit 81855535c608ed2bf81ccf977e5eb40026329cb6
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed Dec 8 16:15:28 2021 +0500
Revert "build: Prepare for AdwCarousel API changes"
This reverts commit ac4bdf54a2125c3ec456e74e0258f83755f53215.
meson.build | 13 -------------
src/gs-featured-carousel.c | 8 --------
src/gs-screenshot-carousel.c | 7 +------
3 files changed, 1 insertion(+), 27 deletions(-)
---
diff --git a/meson.build b/meson.build
index 423519543..9098324ad 100644
--- a/meson.build
+++ b/meson.build
@@ -148,19 +148,6 @@ libadwaita = dependency('libadwaita-1',
]
)
-# FIXME: These libadwaita checks can be dropped when we depend on 1.0.0.beta.1
-if libadwaita.type_name() == 'internal'
- conf.set('HAVE_ADW_CAROUSEL_GET_ANIMATION_DURATION', '1')
- conf.set('HAVE_ADW_CAROUSEL_SCROLL_TO_FULL', '1')
-else
- if meson.get_compiler('c').has_function('adw_carousel_get_animation_duration', prefix: '#include
<adwaita.h>', dependencies: libadwaita)
- conf.set('HAVE_ADW_CAROUSEL_GET_ANIMATION_DURATION', '1')
- endif
- if meson.get_compiler('c').has_function('adw_carousel_scroll_to_full', prefix: '#include <adwaita.h>',
dependencies: libadwaita)
- conf.set('HAVE_ADW_CAROUSEL_SCROLL_TO_FULL', '1')
- endif
-endif
-
libsysprof_capture_dep = dependency('sysprof-capture-4',
required: get_option('sysprof'),
default_options: [
diff --git a/src/gs-featured-carousel.c b/src/gs-featured-carousel.c
index 5b83fe846..73b5938b8 100644
--- a/src/gs-featured-carousel.c
+++ b/src/gs-featured-carousel.c
@@ -83,11 +83,7 @@ show_relative_page (GsFeaturedCarousel *self,
guint n_pages = adw_carousel_get_n_pages (self->carousel);
gdouble new_page;
GtkWidget *new_page_widget;
-#ifdef HAVE_ADW_CAROUSEL_GET_ANIMATION_DURATION
gint64 animation_duration_ms = adw_carousel_get_animation_duration (self->carousel);
-#else
- gint64 animation_duration_ms = 1; /* Switch to boolean once the dependency is 1.0.0.beta.1 at least */
-#endif
if (n_pages == 0)
return;
@@ -105,11 +101,7 @@ show_relative_page (GsFeaturedCarousel *self,
if ((new_page == 0.0 && delta > 0) || (new_page == n_pages - 1 && delta < 0))
animation_duration_ms = 0;
-#ifdef HAVE_ADW_CAROUSEL_SCROLL_TO_FULL
adw_carousel_scroll_to_full (self->carousel, new_page_widget, animation_duration_ms);
-#else
- adw_carousel_scroll_to (self->carousel, new_page_widget, animation_duration_ms != 0);
-#endif
}
static gboolean
diff --git a/src/gs-screenshot-carousel.c b/src/gs-screenshot-carousel.c
index 09965d634..f9051892d 100644
--- a/src/gs-screenshot-carousel.c
+++ b/src/gs-screenshot-carousel.c
@@ -200,13 +200,8 @@ _carousel_navigate (AdwCarousel *carousel, AdwNavigationDirection direction)
position = MAX (0, position);
child = g_list_nth_data (children, position);
- if (child) {
-#ifdef HAVE_ADW_CAROUSEL_SCROLL_TO_FULL
+ if (child)
adw_carousel_scroll_to (carousel, child);
-#else
- adw_carousel_scroll_to (carousel, child, TRUE);
-#endif
- }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]