Bumped version requirements for libhandy and gtk-layer-shell (#357)

* Bumped version requirements for libhandy and gtk-layer-shell

* Bumped Ubuntu Action version to 23.10
This commit is contained in:
Erik Reider
2023-12-19 20:04:32 +01:00
committed by GitHub
parent bf3baba21a
commit 605f195585
6 changed files with 8 additions and 32 deletions

View File

@@ -1,6 +1,6 @@
# This is a basic workflow to help you get started with Actions # This is a basic workflow to help you get started with Actions
name: Check build for latest Ubuntu LTS. name: Check build for latest Ubuntu version.
# Controls when the workflow will run # Controls when the workflow will run
on: on:
@@ -14,8 +14,8 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
ubuntu-LTS-build: ubuntu-build:
container: ubuntu:22.04 container: ubuntu:23.10
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive

View File

@@ -396,14 +396,10 @@ namespace SwayNotificationCenter {
GtkLayerShell.set_exclusive_zone (this, exclusive_zone); GtkLayerShell.set_exclusive_zone (this, exclusive_zone);
// Grabs the keyboard input until closed // Grabs the keyboard input until closed
bool keyboard_shortcuts = ConfigModel.instance.keyboard_shortcuts; bool keyboard_shortcuts = ConfigModel.instance.keyboard_shortcuts;
#if HAVE_LATEST_GTK_LAYER_SHELL
var mode = keyboard_shortcuts ? var mode = keyboard_shortcuts ?
GtkLayerShell.KeyboardMode.EXCLUSIVE : GtkLayerShell.KeyboardMode.EXCLUSIVE :
GtkLayerShell.KeyboardMode.NONE; GtkLayerShell.KeyboardMode.NONE;
GtkLayerShell.set_keyboard_mode (this, mode); GtkLayerShell.set_keyboard_mode (this, mode);
#else
GtkLayerShell.set_keyboard_interactivity (this, keyboard_shortcuts);
#endif
// Set layer // Set layer
GtkLayerShell.Layer layer; GtkLayerShell.Layer layer;

View File

@@ -57,9 +57,7 @@ namespace SwayNotificationCenter.Widgets.Mpris {
carousel = new Hdy.Carousel () { carousel = new Hdy.Carousel () {
visible = true, visible = true,
}; };
#if HAVE_LATEST_LIBHANDY
carousel.allow_scroll_wheel = true; carousel.allow_scroll_wheel = true;
#endif
carousel.draw.connect (carousel_draw_cb); carousel.draw.connect (carousel_draw_cb);
carousel.page_changed.connect ((index) => { carousel.page_changed.connect ((index) => {
GLib.List<weak Gtk.Widget> children = carousel.get_children (); GLib.List<weak Gtk.Widget> children = carousel.get_children ();

View File

@@ -74,9 +74,12 @@ app_deps = [
dependency('gio-unix-2.0', version: '>= 2.50'), dependency('gio-unix-2.0', version: '>= 2.50'),
dependency('gtk+-3.0', version: '>= 3.22'), dependency('gtk+-3.0', version: '>= 3.22'),
dependency('json-glib-1.0', version: '>= 1.0'), dependency('json-glib-1.0', version: '>= 1.0'),
dependency('libhandy-1', version: '>= 1.2.3'), dependency('libhandy-1', version: '>= 1.8.0'),
dependency('granite', version: '>= 6.2.0'), dependency('granite', version: '>= 6.2.0'),
meson.get_compiler('c').find_library('gtk-layer-shell'), dependency('gtk-layer-shell-0',
fallback: ['gtk-layer-shell-0', 'gtk-layer-shell'],
version: '>= 0.8.0'
),
meson.get_compiler('c').find_library('m', required : true), meson.get_compiler('c').find_library('m', required : true),
meson.get_compiler('vala').find_library('posix'), meson.get_compiler('vala').find_library('posix'),
dependency('gee-0.8'), dependency('gee-0.8'),
@@ -104,21 +107,6 @@ if get_option('pulse-audio')
] ]
endif endif
# Detect libhandy version
libhandy = dependency('libhandy-1')
if libhandy.version() >= '1.3.9'
add_project_arguments('-D', 'HAVE_LATEST_LIBHANDY', language: 'vala')
endif
# Detect gtk-layer-shell version
gtk_layer_shell = dependency(
'gtk-layer-shell-0',
fallback: ['gtk-layer-shell-0', 'gtk-layer-shell'],
)
if gtk_layer_shell.version() >= '0.6.0'
add_project_arguments('-D', 'HAVE_LATEST_GTK_LAYER_SHELL', language: 'vala')
endif
args = [ args = [
'--target-glib=2.50', '--target-glib=2.50',
'--pkg=GtkLayerShell-0.1', '--pkg=GtkLayerShell-0.1',

View File

@@ -327,9 +327,7 @@ namespace SwayNotificationCenter {
} }
// Reset state // Reset state
this.carousel.scroll_to (event_box); this.carousel.scroll_to (event_box);
#if HAVE_LATEST_LIBHANDY
this.carousel.allow_scroll_wheel = false; this.carousel.allow_scroll_wheel = false;
#endif
if (this.progress_bar.visible = param.has_synch) { if (this.progress_bar.visible = param.has_synch) {
this.progress_bar.set_fraction (param.value * 0.01); this.progress_bar.set_fraction (param.value * 0.01);

View File

@@ -174,7 +174,6 @@ namespace SwayNotificationCenter {
private void remove_notification (Notification ? noti, bool dismiss) { private void remove_notification (Notification ? noti, bool dismiss) {
// Remove notification and its destruction timeout // Remove notification and its destruction timeout
if (noti != null) { if (noti != null) {
#if HAVE_LATEST_GTK_LAYER_SHELL
if (noti.has_inline_reply) { if (noti.has_inline_reply) {
inline_reply_notifications.remove (noti.param.applied_id); inline_reply_notifications.remove (noti.param.applied_id);
if (inline_reply_notifications.size == 0 if (inline_reply_notifications.size == 0
@@ -184,7 +183,6 @@ namespace SwayNotificationCenter {
this, GtkLayerShell.KeyboardMode.NONE); this, GtkLayerShell.KeyboardMode.NONE);
} }
} }
#endif
noti.remove_noti_timeout (); noti.remove_noti_timeout ();
noti.destroy (); noti.destroy ();
} }
@@ -206,7 +204,6 @@ namespace SwayNotificationCenter {
ConfigModel.instance.timeout, ConfigModel.instance.timeout,
ConfigModel.instance.timeout_low, ConfigModel.instance.timeout_low,
ConfigModel.instance.timeout_critical); ConfigModel.instance.timeout_critical);
#if HAVE_LATEST_GTK_LAYER_SHELL
if (noti.has_inline_reply) { if (noti.has_inline_reply) {
inline_reply_notifications.add (param.applied_id); inline_reply_notifications.add (param.applied_id);
@@ -216,7 +213,6 @@ namespace SwayNotificationCenter {
this, GtkLayerShell.KeyboardMode.ON_DEMAND); this, GtkLayerShell.KeyboardMode.ON_DEMAND);
} }
} }
#endif
if (list_reverse) { if (list_reverse) {
box.pack_start (noti); box.pack_start (noti);