From 972b567f3c17c7b30957a4bbc12a9d428dc9d641 Mon Sep 17 00:00:00 2001 From: lyn1001 Date: Thu, 7 Sep 2023 09:32:11 +0800 Subject: [PATCH] kill appindicator support for now due to 12.10.1 GTK2 support removal --- lxsession-0.5.5-split-indicator-support.patch | 144 ++++++++++++++++++ lxsession.spec | 8 +- 2 files changed, 150 insertions(+), 2 deletions(-) create mode 100644 lxsession-0.5.5-split-indicator-support.patch diff --git a/lxsession-0.5.5-split-indicator-support.patch b/lxsession-0.5.5-split-indicator-support.patch new file mode 100644 index 0000000..095ca71 --- /dev/null +++ b/lxsession-0.5.5-split-indicator-support.patch @@ -0,0 +1,144 @@ +diff --git a/Makefile.am b/Makefile.am +index 5a1177e..7d20d37 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -459,9 +459,13 @@ lxsession_lxsession_CPPFLAGS += \ + lxsession_lxsession_LDADD += \ + $(GTK_LIBS) + ++if USE_INDICATOR ++lxsession_lxsession_VALAFLAGS += \ ++ --pkg appindicator-0.1 ++endif ++ + if USE_ADVANCED_NOTIFICATIONS + lxsession_lxsession_VALAFLAGS += \ +- --pkg appindicator-0.1 \ + --pkg libnotify \ + -D USE_ADVANCED_NOTIFICATIONS + +diff --git a/configure.ac b/configure.ac +index 38c6c93..33a6fc7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -108,7 +108,6 @@ else + AS_HELP_STRING([--enable-advanced-notifications], + [Build with advanced notification using indicators and libnotify (default: no)]), + use_advanced_notifications=$enableval, use_advanced_notifications="no") +- + fi + + AM_CONDITIONAL(USE_BUILDIN_CLIPBOARD, test "$use_buildin_clipboard" = "yes") +@@ -117,7 +116,8 @@ AM_CONDITIONAL(USE_GTK3, test "$enable_gtk3" = "yes") + AM_CONDITIONAL(USE_ADVANCED_NOTIFICATIONS, test "$use_advanced_notifications" = "yes") + + if test "$use_advanced_notifications" = "yes"; then +- PKG_CHECK_MODULES(INDICATORS, [indicator-0.4 >= 0.4.93 appindicator-0.1]) ++ use_indicator=no ++ PKG_CHECK_MODULES(INDICATORS, [indicator-0.4 >= 0.4.93 appindicator-0.1], [use_indicator=no], [use_indicator=no]) + AC_SUBST(INDICATORS_CFLAGS) + AC_SUBST(INDICATORS_LIBS) + +@@ -126,6 +126,9 @@ if test "$use_advanced_notifications" = "yes"; then + AC_SUBST(LIBNOTIFY_LIBS) + fi + ++AM_CONDITIONAL(USE_INDICATOR, test "$use_indicator" = "yes") ++ ++ + if test "$use_buildin_polkit" = "yes"; then + HIDE_LXPOLKIT_AUTOSTART=true + else +diff --git a/lxsession/notifications.vala b/lxsession/notifications.vala +index 5432aa8..b706ab8 100644 +--- a/lxsession/notifications.vala ++++ b/lxsession/notifications.vala +@@ -19,7 +19,9 @@ + #if USE_GTK + using Gtk; + #if USE_ADVANCED_NOTIFICATIONS ++#if USE_INDICATOR + using AppIndicator; ++#endif + using Notify; + #endif + #endif +@@ -78,7 +80,9 @@ namespace Lxsession + public MenuObject menu; + #if USE_GTK + #if USE_ADVANCED_NOTIFICATIONS ++#if USE_INDICATOR + public Indicator indicator; ++#endif + public Notify.Notification notification; + #endif + #endif +@@ -106,7 +110,9 @@ namespace Lxsession + this.menu = menu_param; + #if USE_GTK + #if USE_ADVANCED_NOTIFICATIONS ++#if USE_INDICATOR + this.indicator = new Indicator(this.name, this.icon_name, IndicatorCategory.APPLICATION_STATUS); ++#endif + this.notification = new Notify.Notification ("LXsession", this.notification_text, this.icon_name); + this.notification.set_timeout(6000); + #endif +@@ -117,6 +123,7 @@ namespace Lxsession + #if USE_ADVANCED_NOTIFICATIONS + public void init() + { ++#if USE_INDICATOR + if (this.indicator == null) + { + this.indicator = new Indicator(this.name, this.icon_name, IndicatorCategory.APPLICATION_STATUS); +@@ -128,10 +135,12 @@ namespace Lxsession + { + this.indicator.set_menu(this.menu); + } ++#endif + } + + public void activate() + { ++#if USE_INDICATOR + message("Try activate"); + if (this.indicator != null) + { +@@ -147,10 +156,12 @@ namespace Lxsession + } + message("Activate done"); + } ++#endif + } + + public void inactivate() + { ++#if USE_INDICATOR + message("Try inactivate"); + if (this.indicator != null) + { +@@ -158,19 +169,24 @@ namespace Lxsession + this.indicator.set_status(IndicatorStatus.PASSIVE); + message("Inactivate done"); + } ++#endif + } + + public void set_icon(string param_icon_name) + { ++#if USE_INDICATOR + this.icon_name = param_icon_name; + message("Set new icon"); + this.indicator.icon_name = param_icon_name; ++#endif + } + + public void set_menu(MenuObject param_menu) + { ++#if USE_INDICATOR + this.menu = param_menu; + this.indicator.set_menu(param_menu); ++#endif + } + + public void add_action (string action, string label, owned ActionCallback callback) diff --git a/lxsession.spec b/lxsession.spec index 333c6ad..fa75a9e 100644 --- a/lxsession.spec +++ b/lxsession.spec @@ -1,6 +1,6 @@ Name: lxsession Version: 0.5.5 -Release: 5 +Release: 6 Summary: Lightweight X11 session manager License: GPLv2+ URL: http://lxde.sourceforge.net/ @@ -10,8 +10,9 @@ Source0: https://netix.dl.sourceforge.net/project/lxde/LXSession%20%28sess # https://sourceforge.net/p/lxde/bugs/760/ Patch0: lxsession-0.5.2-git9f8d6133-reload.patch Patch1: lxsession-0.5.2-notify-daemon-default.patch +Patch2: lxsession-0.5.5-split-indicator-support.patch -BuildRequires: gtk2-devel libindicator-devel libappindicator-devel polkit-devel vala +BuildRequires: gtk2-devel polkit-devel vala BuildRequires: docbook-utils intltool gettext desktop-file-utils docbook-style-xsl BuildRequires: %{_bindir}/xsltproc automake autoconf libnotify-devel Requires: upower @@ -110,6 +111,9 @@ desktop-file-install \ %{_mandir}/man1/* %changelog +* Wed Sep 6 2023 liyanan - 0.5.5-6 +- kill appindicator support for now due to 12.10.1 GTK2 support removal + * Fri Oct 16 2020 gaihuiying - 0.5.5-5 - Type: requirement - ID: NA