diff --git a/.github/workflows/ubuntu-build.yml b/.github/workflows/ubuntu-build.yml index ae3f385..4f77ade 100644 --- a/.github/workflows/ubuntu-build.yml +++ b/.github/workflows/ubuntu-build.yml @@ -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 diff --git a/src/controlCenter/controlCenter.vala b/src/controlCenter/controlCenter.vala index 15c2ab1..7321100 100644 --- a/src/controlCenter/controlCenter.vala +++ b/src/controlCenter/controlCenter.vala @@ -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; diff --git a/src/controlCenter/widgets/mpris/mpris.vala b/src/controlCenter/widgets/mpris/mpris.vala index f404acc..4c4cb98 100644 --- a/src/controlCenter/widgets/mpris/mpris.vala +++ b/src/controlCenter/widgets/mpris/mpris.vala @@ -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 children = carousel.get_children (); diff --git a/src/meson.build b/src/meson.build index a8579f1..2c26e4c 100644 --- a/src/meson.build +++ b/src/meson.build @@ -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', diff --git a/src/notification/notification.vala b/src/notification/notification.vala index b4d864c..03df0af 100644 --- a/src/notification/notification.vala +++ b/src/notification/notification.vala @@ -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); diff --git a/src/notificationWindow/notificationWindow.vala b/src/notificationWindow/notificationWindow.vala index 946621f..d35c781 100644 --- a/src/notificationWindow/notificationWindow.vala +++ b/src/notificationWindow/notificationWindow.vala @@ -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);