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:
6
.github/workflows/ubuntu-build.yml
vendored
6
.github/workflows/ubuntu-build.yml
vendored
@@ -1,6 +1,6 @@
|
||||
# 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
|
||||
on:
|
||||
@@ -14,8 +14,8 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
ubuntu-LTS-build:
|
||||
container: ubuntu:22.04
|
||||
ubuntu-build:
|
||||
container: ubuntu:23.10
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
@@ -396,14 +396,10 @@ namespace SwayNotificationCenter {
|
||||
GtkLayerShell.set_exclusive_zone (this, exclusive_zone);
|
||||
// Grabs the keyboard input until closed
|
||||
bool keyboard_shortcuts = ConfigModel.instance.keyboard_shortcuts;
|
||||
#if HAVE_LATEST_GTK_LAYER_SHELL
|
||||
var mode = keyboard_shortcuts ?
|
||||
GtkLayerShell.KeyboardMode.EXCLUSIVE :
|
||||
GtkLayerShell.KeyboardMode.NONE;
|
||||
GtkLayerShell.set_keyboard_mode (this, mode);
|
||||
#else
|
||||
GtkLayerShell.set_keyboard_interactivity (this, keyboard_shortcuts);
|
||||
#endif
|
||||
|
||||
// Set layer
|
||||
GtkLayerShell.Layer layer;
|
||||
|
@@ -57,9 +57,7 @@ namespace SwayNotificationCenter.Widgets.Mpris {
|
||||
carousel = new Hdy.Carousel () {
|
||||
visible = true,
|
||||
};
|
||||
#if HAVE_LATEST_LIBHANDY
|
||||
carousel.allow_scroll_wheel = true;
|
||||
#endif
|
||||
carousel.draw.connect (carousel_draw_cb);
|
||||
carousel.page_changed.connect ((index) => {
|
||||
GLib.List<weak Gtk.Widget> children = carousel.get_children ();
|
||||
|
@@ -74,9 +74,12 @@ app_deps = [
|
||||
dependency('gio-unix-2.0', version: '>= 2.50'),
|
||||
dependency('gtk+-3.0', version: '>= 3.22'),
|
||||
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'),
|
||||
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('vala').find_library('posix'),
|
||||
dependency('gee-0.8'),
|
||||
@@ -104,21 +107,6 @@ if get_option('pulse-audio')
|
||||
]
|
||||
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 = [
|
||||
'--target-glib=2.50',
|
||||
'--pkg=GtkLayerShell-0.1',
|
||||
|
@@ -327,9 +327,7 @@ namespace SwayNotificationCenter {
|
||||
}
|
||||
// Reset state
|
||||
this.carousel.scroll_to (event_box);
|
||||
#if HAVE_LATEST_LIBHANDY
|
||||
this.carousel.allow_scroll_wheel = false;
|
||||
#endif
|
||||
|
||||
if (this.progress_bar.visible = param.has_synch) {
|
||||
this.progress_bar.set_fraction (param.value * 0.01);
|
||||
|
@@ -174,7 +174,6 @@ namespace SwayNotificationCenter {
|
||||
private void remove_notification (Notification ? noti, bool dismiss) {
|
||||
// Remove notification and its destruction timeout
|
||||
if (noti != null) {
|
||||
#if HAVE_LATEST_GTK_LAYER_SHELL
|
||||
if (noti.has_inline_reply) {
|
||||
inline_reply_notifications.remove (noti.param.applied_id);
|
||||
if (inline_reply_notifications.size == 0
|
||||
@@ -184,7 +183,6 @@ namespace SwayNotificationCenter {
|
||||
this, GtkLayerShell.KeyboardMode.NONE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
noti.remove_noti_timeout ();
|
||||
noti.destroy ();
|
||||
}
|
||||
@@ -206,7 +204,6 @@ namespace SwayNotificationCenter {
|
||||
ConfigModel.instance.timeout,
|
||||
ConfigModel.instance.timeout_low,
|
||||
ConfigModel.instance.timeout_critical);
|
||||
#if HAVE_LATEST_GTK_LAYER_SHELL
|
||||
if (noti.has_inline_reply) {
|
||||
inline_reply_notifications.add (param.applied_id);
|
||||
|
||||
@@ -216,7 +213,6 @@ namespace SwayNotificationCenter {
|
||||
this, GtkLayerShell.KeyboardMode.ON_DEMAND);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (list_reverse) {
|
||||
box.pack_start (noti);
|
||||
|
Reference in New Issue
Block a user