Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
f416844e13
!12 解决libappindicator升级到12.10.1版本后lxsession构建失败
From: @wk333 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
2023-09-07 02:48:03 +00:00
lyn1001
972b567f3c kill appindicator support for now due to 12.10.1 GTK2 support removal 2023-09-07 09:37:12 +08:00
openeuler-ci-bot
47d276bba3 !7 remove unique dependency
From: @eaglegai
Reviewed-by: @orange-snn
Signed-off-by: @orange-snn
2020-10-16 15:46:14 +08:00
eaglegai
7790ad5793 remove unique dependency 2020-10-16 10:33:22 +08:00
openeuler-ci-bot
eeba7071c8 !5 lxsession:fix source0 url
From: @lunankun
Reviewed-by: @orange-snn
Signed-off-by: @orange-snn
2020-09-28 17:27:37 +08:00
lunankun
93c48cedaa fix source0 url 2020-09-08 14:28:37 +08:00
openeuler-ci-bot
7cc357f6d9 !3 update to 0.5.5
Merge pull request !3 from cuibb1/master
2020-07-17 20:48:38 +08:00
cuibb1
8440d062b1 update to 0.5.5 2020-07-17 10:17:17 +08:00
openeuler-ci-bot
c37d45cd38 !2 add yaml file
Merge pull request !2 from yu_boyun/master
2020-06-15 17:30:31 +08:00
yu_boyun
14e2717362 add yaml file 2020-06-13 14:41:46 +08:00
6 changed files with 174 additions and 35 deletions

View File

@ -1,27 +0,0 @@
From e5efeb654c585dda622f2e8765f06f67f3230aa6 Mon Sep 17 00:00:00 2001
From: hexiujun1 <hexiujun1@huawei.com>
Date: Tue, 7 Jan 2020 14:25:59 +0800
Subject: [PATCH] Never free buffer returned by gtk_entry_get_text
Free() of invalid pointer may not die immediately and can cause
abort/segv on next free/malloc, so calling free() on the buffer
returned by gtk_entry_get_text() here must be removed.
---
lxsession-edit/lxsession-edit.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/lxsession-edit/lxsession-edit.c b/lxsession-edit/lxsession-edit.c
index af63edb..0bb23bf 100644
--- a/lxsession-edit/lxsession-edit.c
+++ b/lxsession-edit/lxsession-edit.c
@@ -144,7 +144,6 @@ int main(int argc, char** argv)
g_key_file_set_string( kf, "Session", "windows_manager/command", wm_cmd );
data = g_key_file_to_data(kf, &len, NULL);
g_file_set_contents(cfg, data, len, NULL);
- g_free( wm_cmd );
}
}
}
--
2.9.3

Binary file not shown.

View File

@ -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)

BIN
lxsession-0.5.5.tar.xz Normal file

Binary file not shown.

View File

@ -1,20 +1,20 @@
Name: lxsession
Version: 0.5.4
Release: 2
Version: 0.5.5
Release: 6
Summary: Lightweight X11 session manager
License: GPLv2+
URL: http://lxde.sourceforge.net/
Source0: http://downloads.sourceforge.net/sourceforge/lxde/%{name}-%{version}.tar.xz
Source0: https://netix.dl.sourceforge.net/project/lxde/LXSession%20%28session%20manager%29/LXSession%200.5.x/lxsession-0.5.5.tar.xz
# https://github.com/lxde/lxsession/pull/10
Patch0001: 0001-Never-free-buffer-returned-by-gtk_entry_get_text.patch
# https://sourceforge.net/p/lxde/bugs/760/
Patch1000: lxsession-0.5.2-git9f8d6133-reload.patch
Patch1001: lxsession-0.5.2-notify-daemon-default.patch
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 unique-devel libnotify-devel
BuildRequires: %{_bindir}/xsltproc automake autoconf libnotify-devel
Requires: upower
Provides: lxsession-lite = %{version}-%{release} lxde-settings-daemon = 0.4.1-3
@ -111,6 +111,24 @@ desktop-file-install \
%{_mandir}/man1/*
%changelog
* Wed Sep 6 2023 liyanan <thistleslyn@163.com> - 0.5.5-6
- kill appindicator support for now due to 12.10.1 GTK2 support removal
* Fri Oct 16 2020 gaihuiying <gaihuiying1@huawei.com> - 0.5.5-5
- Type: requirement
- ID: NA
- SUG: NA
- DESC: remove unique dependency
* Tue Sep 8 2020 lunankun <lunankun@huawei.com> - 0.5.5-4
- Type: bugfix
- ID: NA
- SUG: NA
- DESC: fix Source0 url
* Wed Jul 15 2020 cuibaobao <cuibaobao1@huaweir.com> - 0.5.5-3
- update to 0.5.5
* Tue Jan 7 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.5.4-2
- update software package

4
lxsession.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: lxde/lxsession
tag_prefix: v
seperator: .