Version bumps
This commit is contained in:
parent
55b29a02ee
commit
948e833e31
@ -1 +0,0 @@
|
|||||||
DIST evolution-data-server-3.40.2.tar.xz 4625240 BLAKE2B f7c966e0e092ce46157e55d1a096e5ce69ae5103c0d777f262b62cac4185bec88c4cf84b9da4927cd8e008310f09bedcc017cb4ec39e4c90b3a36c1444b3507c SHA512 495e264cc92b31e6bb76b205641f4c030e82a010f0cf58f712d5c05b5a06f0a60c5b83b31f95ececf9e553f2e816bb9bab2df54cd9982a81eb2bb7f936016639
|
|
@ -1,156 +0,0 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
VALA_USE_DEPEND="vapigen"
|
|
||||||
|
|
||||||
inherit cmake db-use flag-o-matic gnome2 systemd vala virtualx
|
|
||||||
|
|
||||||
DESCRIPTION="Evolution groupware backend"
|
|
||||||
HOMEPAGE="https://wiki.gnome.org/Apps/Evolution"
|
|
||||||
|
|
||||||
# Note: explicitly "|| ( LGPL-2 LGPL-3 )", not "LGPL-2+".
|
|
||||||
LICENSE="|| ( LGPL-2 LGPL-3 ) BSD Sleepycat"
|
|
||||||
SLOT="0/62-26-20" # subslot = libcamel-1.2/libedataserver-1.2/libebook-1.2.so soname version
|
|
||||||
|
|
||||||
IUSE="berkdb +gnome-online-accounts +gtk gtk-doc +introspection ipv6 ldap kerberos oauth +phonenumber vala +weather"
|
|
||||||
REQUIRED_USE="vala? ( introspection )"
|
|
||||||
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
|
|
||||||
|
|
||||||
# gdata-0.17.7 soft required for new gdata_feed_get_next_page_token API to handle more than 100 google tasks
|
|
||||||
# berkdb needed only for migrating old addressbook data from <3.13 versions, bug #519512
|
|
||||||
gdata_depend=">=dev-libs/libgdata-0.17.7:=[vala?]"
|
|
||||||
RDEPEND="
|
|
||||||
>=app-crypt/gcr-3.4
|
|
||||||
>=app-crypt/libsecret-0.5[crypt]
|
|
||||||
>=dev-db/sqlite-3.7.17:=
|
|
||||||
>=dev-libs/glib-2.46:2
|
|
||||||
>=dev-libs/libical-3.0.8:=[glib,introspection?]
|
|
||||||
>=dev-libs/libxml2-2
|
|
||||||
>=dev-libs/nspr-4.4:=
|
|
||||||
>=dev-libs/nss-3.9:=
|
|
||||||
>=net-libs/libsoup-2.58:2.4
|
|
||||||
|
|
||||||
dev-libs/icu:=
|
|
||||||
sys-libs/zlib:=
|
|
||||||
virtual/libiconv
|
|
||||||
|
|
||||||
berkdb? ( >=sys-libs/db-4:= )
|
|
||||||
gtk? (
|
|
||||||
>=app-crypt/gcr-3.4[gtk]
|
|
||||||
>=x11-libs/gtk+-3.16:3
|
|
||||||
>=media-libs/libcanberra-0.25[gtk3]
|
|
||||||
)
|
|
||||||
oauth? (
|
|
||||||
>=dev-libs/json-glib-1.0.4
|
|
||||||
>=net-libs/webkit-gtk-2.28.0:4
|
|
||||||
${gdata_depend}
|
|
||||||
)
|
|
||||||
phonenumber? (
|
|
||||||
>=dev-libs/libphonenumber-8.12.24
|
|
||||||
)
|
|
||||||
gnome-online-accounts? (
|
|
||||||
>=net-libs/gnome-online-accounts-3.8:=
|
|
||||||
${gdata_depend} )
|
|
||||||
introspection? ( >=dev-libs/gobject-introspection-0.9.12:= )
|
|
||||||
kerberos? ( virtual/krb5:= )
|
|
||||||
ldap? ( >=net-nds/openldap-2:= )
|
|
||||||
weather? ( >=dev-libs/libgweather-3.10:2= )
|
|
||||||
"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
vala? ( $(vala_depend)
|
|
||||||
net-libs/libsoup:2.4[vala]
|
|
||||||
dev-libs/libical[vala]
|
|
||||||
)
|
|
||||||
"
|
|
||||||
BDEPEND="
|
|
||||||
dev-util/gdbus-codegen
|
|
||||||
dev-util/glib-utils
|
|
||||||
dev-util/gperf
|
|
||||||
gtk-doc? ( >=dev-util/gtk-doc-1.14
|
|
||||||
app-text/docbook-xml-dtd:4.1.2 )
|
|
||||||
>=dev-util/intltool-0.35.5
|
|
||||||
>=sys-devel/gettext-0.18.3
|
|
||||||
virtual/pkgconfig
|
|
||||||
"
|
|
||||||
|
|
||||||
# Some tests fail due to missing locales.
|
|
||||||
# Also, dbus tests are flaky, bugs #397975 #501834
|
|
||||||
# It looks like a nightmare to disable those for now.
|
|
||||||
RESTRICT="test !test? ( test )"
|
|
||||||
|
|
||||||
# global scope PATCHES or DOCS array mustn't be used due to double default_src_prepare call
|
|
||||||
src_prepare() {
|
|
||||||
use vala && vala_src_prepare
|
|
||||||
cmake_src_prepare
|
|
||||||
gnome2_src_prepare
|
|
||||||
|
|
||||||
eapply "${FILESDIR}"/3.36.5-gtk-doc-1.32-compat.patch
|
|
||||||
|
|
||||||
# Make CMakeLists versioned vala enabled
|
|
||||||
sed -e "s;\(find_program(VALAC\) valac);\1 ${VALAC});" \
|
|
||||||
-e "s;\(find_program(VAPIGEN\) vapigen);\1 ${VAPIGEN});" \
|
|
||||||
-i "${S}"/CMakeLists.txt || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
# /usr/include/db.h is always db-1 on FreeBSD
|
|
||||||
# so include the right dir in CPPFLAGS
|
|
||||||
use berkdb && append-cppflags "-I$(db_includedir)"
|
|
||||||
|
|
||||||
local google_enable
|
|
||||||
if use oauth || use gnome-online-accounts; then
|
|
||||||
google_enable="ON"
|
|
||||||
else
|
|
||||||
google_enable="OFF"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# phonenumber does not exist in tree
|
|
||||||
# chatty need phonenumber
|
|
||||||
local mycmakeargs=(
|
|
||||||
-DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc
|
|
||||||
-DENABLE_GTK_DOC=$(usex gtk-doc)
|
|
||||||
-DWITH_PRIVATE_DOCS=$(usex gtk-doc)
|
|
||||||
-DENABLE_SCHEMAS_COMPILE=OFF
|
|
||||||
-DENABLE_INTROSPECTION=$(usex introspection)
|
|
||||||
-DWITH_KRB5=$(usex kerberos)
|
|
||||||
-DWITH_KRB5_INCLUDES=$(usex kerberos "${EPREFIX}"/usr "")
|
|
||||||
-DWITH_KRB5_LIBS=$(usex kerberos "${EPREFIX}"/usr/$(get_libdir) "")
|
|
||||||
-DWITH_OPENLDAP=$(usex ldap)
|
|
||||||
-DWITH_PHONENUMBER=$(usex phonenumber)
|
|
||||||
-DENABLE_SMIME=ON
|
|
||||||
-DENABLE_GTK=$(usex gtk)
|
|
||||||
-DENABLE_CANBERRA=$(usex gtk)
|
|
||||||
-DENABLE_OAUTH2=$(usex oauth)
|
|
||||||
-DENABLE_EXAMPLES=OFF
|
|
||||||
-DENABLE_GOA=$(usex gnome-online-accounts)
|
|
||||||
-DWITH_LIBDB=$(usex berkdb "${EPREFIX}"/usr OFF)
|
|
||||||
# ENABLE_BACKTRACES requires libdwarf ?
|
|
||||||
-DENABLE_IPV6=$(usex ipv6)
|
|
||||||
-DENABLE_WEATHER=$(usex weather)
|
|
||||||
-DENABLE_GOOGLE=${google_enable}
|
|
||||||
-DENABLE_LARGEFILE=ON
|
|
||||||
-DENABLE_VALA_BINDINGS=$(usex vala)
|
|
||||||
)
|
|
||||||
|
|
||||||
cmake_src_configure
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
cmake_src_compile
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
virtx cmake_src_test
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
cmake_src_install
|
|
||||||
|
|
||||||
if use ldap; then
|
|
||||||
insinto /etc/openldap/schema
|
|
||||||
doins "${FILESDIR}"/calentry.schema
|
|
||||||
dosym ../../../usr/share/${PN}/evolutionperson.schema /etc/openldap/schema/evolutionperson.schema
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
From 24c7ca17eaf69211b75f2882c11aeff01a3cad01 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mart Raudsepp <leio@gentoo.org>
|
|
||||||
Date: Sat, 8 Aug 2020 18:59:25 +0300
|
|
||||||
Subject: [PATCH] I#158 - Workaround build error with gtk-doc-1.32
|
|
||||||
|
|
||||||
---
|
|
||||||
src/calendar/libecal/e-cal-time-util.h | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/calendar/libecal/e-cal-time-util.h b/src/calendar/libecal/e-cal-time-util.h
|
|
||||||
index 8acb13061..11c9d3369 100644
|
|
||||||
--- a/src/calendar/libecal/e-cal-time-util.h
|
|
||||||
+++ b/src/calendar/libecal/e-cal-time-util.h
|
|
||||||
@@ -150,6 +150,7 @@ void time_to_gdate_with_zone (GDate *date,
|
|
||||||
* struct tm manipulation
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
+#ifndef __GTK_DOC_IGNORE__
|
|
||||||
struct tm e_cal_util_icaltime_to_tm
|
|
||||||
(const ICalTime *itt);
|
|
||||||
struct tm e_cal_util_icaltime_to_tm_with_zone
|
|
||||||
@@ -159,6 +160,7 @@ struct tm e_cal_util_icaltime_to_tm_with_zone
|
|
||||||
ICalTime * e_cal_util_tm_to_icaltime
|
|
||||||
(struct tm *tm,
|
|
||||||
gboolean is_date);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
--
|
|
||||||
2.20.1
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
|||||||
From c95a70bfeae25ba11fbe50fe759a6cdb29388e44 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Milan Crha <mcrha@redhat.com>
|
|
||||||
Date: Wed, 14 Apr 2021 16:58:08 +0200
|
|
||||||
Subject: [PATCH] PrintableOptions.cmake: Correct variable name comparison
|
|
||||||
|
|
||||||
CMake 3.20.1 errors out with:
|
|
||||||
|
|
||||||
CMake Error at cmake/modules/PrintableOptions.cmake:38 (message):
|
|
||||||
variable name cannot be empty
|
|
||||||
Call Stack (most recent call first):
|
|
||||||
CMakeLists.txt:152 (add_printable_variable)
|
|
||||||
|
|
||||||
Change how the parameter value is compared, to fix it.
|
|
||||||
---
|
|
||||||
cmake/modules/PrintableOptions.cmake | 20 ++++++++++----------
|
|
||||||
1 file changed, 10 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/cmake/modules/PrintableOptions.cmake b/cmake/modules/PrintableOptions.cmake
|
|
||||||
index ba1c9d0b7..339f1da4b 100644
|
|
||||||
--- a/cmake/modules/PrintableOptions.cmake
|
|
||||||
+++ b/cmake/modules/PrintableOptions.cmake
|
|
||||||
@@ -19,40 +19,40 @@
|
|
||||||
# prints all the build options previously added with the above functions
|
|
||||||
|
|
||||||
macro(add_printable_variable_bare _name)
|
|
||||||
- if(_name STREQUAL "")
|
|
||||||
+ if("${_name}" STREQUAL "")
|
|
||||||
message(FATAL_ERROR "variable name cannot be empty")
|
|
||||||
- endif(_name STREQUAL "")
|
|
||||||
+ endif("${_name}" STREQUAL "")
|
|
||||||
list(APPEND _printable_options ${_name})
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
macro(add_printable_option _name _description _default_value)
|
|
||||||
- if(_name STREQUAL "")
|
|
||||||
+ if("${_name}" STREQUAL "")
|
|
||||||
message(FATAL_ERROR "option name cannot be empty")
|
|
||||||
- endif(_name STREQUAL "")
|
|
||||||
+ endif("${_name}" STREQUAL "")
|
|
||||||
option(${_name} ${_description} ${_default_value})
|
|
||||||
add_printable_variable_bare(${_name})
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
macro(add_printable_variable _name _description _default_value)
|
|
||||||
- if(_name STREQUAL "")
|
|
||||||
+ if("${_name}" STREQUAL "")
|
|
||||||
message(FATAL_ERROR "variable name cannot be empty")
|
|
||||||
- endif(_name STREQUAL "")
|
|
||||||
+ endif("${_name}" STREQUAL "")
|
|
||||||
set(${_name} ${_default_value} CACHE STRING ${_description})
|
|
||||||
add_printable_variable_bare(${_name})
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
macro(add_printable_variable_path _name _description _default_value)
|
|
||||||
- if(_name STREQUAL "")
|
|
||||||
+ if("${_name}" STREQUAL "")
|
|
||||||
message(FATAL_ERROR "path variable name cannot be empty")
|
|
||||||
- endif(_name STREQUAL "")
|
|
||||||
+ endif("${_name}" STREQUAL "")
|
|
||||||
set(${_name} ${_default_value} CACHE PATH ${_description})
|
|
||||||
add_printable_variable_bare(${_name})
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
macro(add_printable_variable_filepath _name _description _default_value)
|
|
||||||
- if(_name STREQUAL "")
|
|
||||||
+ if("${_name}" STREQUAL "")
|
|
||||||
message(FATAL_ERROR "filepath variable name cannot be empty")
|
|
||||||
- endif(_name STREQUAL "")
|
|
||||||
+ endif("${_name}" STREQUAL "")
|
|
||||||
set(${_name} ${_default_value} CACHE FILEPATH ${_description})
|
|
||||||
add_printable_variable_bare(${_name})
|
|
||||||
endmacro()
|
|
||||||
--
|
|
||||||
2.26.3
|
|
||||||
|
|
@ -1,108 +0,0 @@
|
|||||||
# RFC2739 calEntry schema for OpenLDAP 2.x
|
|
||||||
|
|
||||||
#
|
|
||||||
# From https://bugs.gentoo.org/show_bug.cgi?id=83988
|
|
||||||
# Please notify us of updated revisions by submitting a bug report at bugs.gentoo.org
|
|
||||||
#
|
|
||||||
|
|
||||||
# Version of RFC 2739 schema translated by Terrelle Shaw
|
|
||||||
# (xytek@xytek.org) # Nov. 7, 2002 # Modifications by Peter Marschall
|
|
||||||
# <peter.marschall@adpm.de> # Nov. 9, 2002
|
|
||||||
|
|
||||||
# Notes:
|
|
||||||
# * RFC2739 seems to be a bit sloppy about attribute type and
|
|
||||||
# objectclass definitions syntax and also about attribute syntax
|
|
||||||
# and matching rules.
|
|
||||||
# (It even counts the attributes in the calEntry objectclass wrong ;-)
|
|
||||||
# * The following changes have been applied to correct the schema
|
|
||||||
# - added description to each attributetype definition
|
|
||||||
# - changed SYNTAX from 'IA5String' to corresponding OID
|
|
||||||
# to make matching rules and syntax consistent
|
|
||||||
# - replaced illegal keyword SUBSTRING by SUBSTR
|
|
||||||
# - changed SUBSTR from caseIgnoreIA5Match to caseIgnoreIA5SubstringsMatch
|
|
||||||
# - removed illegal keyword MULTI-VALUE
|
|
||||||
# - added keyword SINGLE-VALUE where appropriate
|
|
||||||
# - removed USAGE since cwuserApplications is the default
|
|
||||||
# - added description to the objectclass defintion
|
|
||||||
# - corrected typo in objectclass definition
|
|
||||||
# - added the attributetypes defined but not used to the objectclass
|
|
||||||
|
|
||||||
|
|
||||||
# 2.4.4.1 calCalURI
|
|
||||||
attributetype ( 1.2.840.113556.1.4.478
|
|
||||||
NAME 'calCalURI'
|
|
||||||
DESC 'URI to a snapshot of the users entire default calendar'
|
|
||||||
EQUALITY caseIgnoreIA5Match
|
|
||||||
SUBSTR caseIgnoreIA5SubstringsMatch
|
|
||||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
|
|
||||||
SINGLE-VALUE )
|
|
||||||
|
|
||||||
# 2.4.4.2 calFBURL
|
|
||||||
attributetype ( 1.2.840.113556.1.4.479
|
|
||||||
NAME 'calFBURL'
|
|
||||||
DESC 'URI to the users default free/busy time data'
|
|
||||||
EQUALITY caseIgnoreIA5Match
|
|
||||||
SUBSTR caseIgnoreIA5SubstringsMatch
|
|
||||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
|
|
||||||
SINGLE-VALUE )
|
|
||||||
|
|
||||||
# 2.4.4.3 calCAPURI
|
|
||||||
attributetype ( 1.2.840.113556.1.4.480
|
|
||||||
NAME 'calCAPURI'
|
|
||||||
DESC 'URI used to communicate with the users calendar'
|
|
||||||
EQUALITY caseIgnoreIA5Match
|
|
||||||
SUBSTR caseIgnoreIA5SubstringsMatch
|
|
||||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
|
|
||||||
SINGLE-VALUE )
|
|
||||||
|
|
||||||
# 2.4.4.4 calCalAdrURI
|
|
||||||
attributetype ( 1.2.840.113556.1.4.481
|
|
||||||
NAME 'calCalAdrURI'
|
|
||||||
DESC 'URI to which event requests should be sent for the user'
|
|
||||||
EQUALITY caseIgnoreIA5Match
|
|
||||||
SUBSTR caseIgnoreIA5SubstringsMatch
|
|
||||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
|
|
||||||
SINGLE-VALUE )
|
|
||||||
|
|
||||||
# 2.4.4.5 calOtherCalURIs
|
|
||||||
attributetype ( 1.2.840.113556.1.4.482
|
|
||||||
NAME 'calOtherCalURIs'
|
|
||||||
DESC 'URIs to snapshots of non-default calendars belonging to the user'
|
|
||||||
EQUALITY caseIgnoreIA5Match
|
|
||||||
SUBSTR caseIgnoreIA5SubstringsMatch
|
|
||||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
|
||||||
|
|
||||||
# 2.4.4.6 calOtherFBURLs
|
|
||||||
attributetype ( 1.2.840.113556.1.4.483
|
|
||||||
NAME 'calOtherFBURLs'
|
|
||||||
DESC 'URIs to non-default free/busy data belonging to the user'
|
|
||||||
EQUALITY caseIgnoreIA5Match
|
|
||||||
SUBSTR caseIgnoreIA5SubstringsMatch
|
|
||||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
|
||||||
|
|
||||||
# 2.4.4.7 calOtherCAPURIs
|
|
||||||
attributetype ( 1.2.840.113556.1.4.484
|
|
||||||
NAME 'calOtherCAPURIs'
|
|
||||||
DESC 'URIs to non-default calendars belonging to the user'
|
|
||||||
EQUALITY caseIgnoreIA5Match
|
|
||||||
SUBSTR caseIgnoreIA5SubstringsMatch
|
|
||||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
|
||||||
|
|
||||||
# 2.4.4.8 calOtherCalAdrURIs
|
|
||||||
attributetype ( 1.2.840.113556.1.4.485
|
|
||||||
NAME 'calOtherCalAdrURIs'
|
|
||||||
DESC 'URIs of destinations for event requests to non-default calendars'
|
|
||||||
EQUALITY caseIgnoreIA5Match
|
|
||||||
SUBSTR caseIgnoreIA5SubstringsMatch
|
|
||||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
|
||||||
|
|
||||||
# 2.4.3.1 calEntry
|
|
||||||
objectclass ( 1.2.840.113556.1.5.87
|
|
||||||
NAME 'calEntry'
|
|
||||||
DESC 'Calendering and free/busy information'
|
|
||||||
SUP top AUXILIARY
|
|
||||||
MAY ( calCalURI $ calFBURL $ calCAPURI $ calCalAdrURI $
|
|
||||||
calOtherCAPURIs $ calOtherCalURIs $ calOtherFBURLs $
|
|
||||||
calOtherCalAdrURIs ) )
|
|
||||||
|
|
||||||
# EOF
|
|
@ -1,16 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
|
||||||
<pkgmetadata>
|
|
||||||
<maintainer type="project">
|
|
||||||
<email>gnome@gentoo.org</email>
|
|
||||||
<name>Gentoo GNOME Desktop</name>
|
|
||||||
</maintainer>
|
|
||||||
<use>
|
|
||||||
<flag name="berkdb"><pkg>sys-libs/db</pkg> support needed to migrate old (pre-3.13 evolution versions) addressbook data</flag>
|
|
||||||
<flag name="gnome-online-accounts">Enable <pkg>net-libs/gnome-online-accounts</pkg> based Google authentication support</flag>
|
|
||||||
<flag name="oauth">Enable internal OAuth2 authentication support for Google and Outlook.com.
|
|
||||||
If gnome-online-accounts is enabled and used, this is not necessary,
|
|
||||||
but both can be supported at the same time with different setup at runtime</flag>
|
|
||||||
<flag name="weather">Enable optional weather calendar support</flag>
|
|
||||||
</use>
|
|
||||||
</pkgmetadata>
|
|
@ -1,174 +0,0 @@
|
|||||||
From 3a1f2f4fd7448ce1093bc08b1167ece63121371c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Danct12 <danct12@disroot.org>
|
|
||||||
Date: Thu, 29 Oct 2020 16:00:28 +0700
|
|
||||||
Subject: [PATCH] Revert "home: Bind key to show overview"
|
|
||||||
|
|
||||||
This reverts commit f70af466ff57763bc94548e3086a3caa50c8eacc.
|
|
||||||
---
|
|
||||||
src/home.c | 108 -----------------------------------------------------
|
|
||||||
1 file changed, 108 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/home.c b/src/home.c
|
|
||||||
index b8fc99e..9b3b722 100644
|
|
||||||
--- a/src/home.c
|
|
||||||
+++ b/src/home.c
|
|
||||||
@@ -18,10 +18,6 @@
|
|
||||||
|
|
||||||
#include <handy.h>
|
|
||||||
|
|
||||||
-#define KEYBINDINGS_SCHEMA_ID "org.gnome.shell.keybindings"
|
|
||||||
-#define KEYBINDING_KEY_TOGGLE_OVERVIEW "toggle-overview"
|
|
||||||
-#define KEYBINDING_KEY_TOGGLE_APPLICATION_VIEW "toggle-application-view"
|
|
||||||
-
|
|
||||||
/**
|
|
||||||
* SECTION:home
|
|
||||||
* @short_description: The home surface contains the overview and
|
|
||||||
@@ -65,10 +61,6 @@ struct _PhoshHome
|
|
||||||
|
|
||||||
PhoshHomeState state;
|
|
||||||
|
|
||||||
- /* Keybinding */
|
|
||||||
- GArray *actions;
|
|
||||||
- GSettings *settings;
|
|
||||||
-
|
|
||||||
/* osk button */
|
|
||||||
gboolean osk_enabled;
|
|
||||||
};
|
|
||||||
@@ -207,77 +199,6 @@ key_press_event_cb (PhoshHome *self, GdkEventKey *event, gpointer data)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
-static void
|
|
||||||
-toggle_overview_action (GSimpleAction *action, GVariant *param, gpointer data)
|
|
||||||
-{
|
|
||||||
- PhoshHome *self = PHOSH_HOME (data);
|
|
||||||
- PhoshHomeState state;
|
|
||||||
-
|
|
||||||
- g_return_if_fail (PHOSH_IS_HOME (self));
|
|
||||||
-
|
|
||||||
- state = self->state == PHOSH_HOME_STATE_UNFOLDED ?
|
|
||||||
- PHOSH_HOME_STATE_FOLDED : PHOSH_HOME_STATE_UNFOLDED;
|
|
||||||
- phosh_home_set_state (self, state);
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-static void
|
|
||||||
-toggle_application_view_action (GSimpleAction *action, GVariant *param, gpointer data)
|
|
||||||
-{
|
|
||||||
- PhoshHome *self = PHOSH_HOME (data);
|
|
||||||
- PhoshHomeState state;
|
|
||||||
-
|
|
||||||
- g_return_if_fail (PHOSH_IS_HOME (self));
|
|
||||||
-
|
|
||||||
- state = self->state == PHOSH_HOME_STATE_UNFOLDED ?
|
|
||||||
- PHOSH_HOME_STATE_FOLDED : PHOSH_HOME_STATE_UNFOLDED;
|
|
||||||
- phosh_home_set_state (self, state);
|
|
||||||
- phosh_overview_focus_app_search (PHOSH_OVERVIEW (self->overview));
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-static void
|
|
||||||
-add_keybindings (PhoshHome *self)
|
|
||||||
-{
|
|
||||||
- g_auto (GStrv) bindings = NULL;
|
|
||||||
- g_autoptr (GSettings) settings = g_settings_new (KEYBINDINGS_SCHEMA_ID);
|
|
||||||
-
|
|
||||||
- bindings = g_settings_get_strv (settings, KEYBINDING_KEY_TOGGLE_OVERVIEW);
|
|
||||||
- for (int i = 0; i < g_strv_length (bindings); i++) {
|
|
||||||
- GActionEntry entry = { bindings[i],
|
|
||||||
- toggle_overview_action, };
|
|
||||||
- g_array_append_val (self->actions, entry);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- bindings = g_settings_get_strv (settings, KEYBINDING_KEY_TOGGLE_APPLICATION_VIEW);
|
|
||||||
- for (int i = 0; i < g_strv_length (bindings); i++) {
|
|
||||||
- GActionEntry entry = { bindings[i],
|
|
||||||
- toggle_application_view_action, };
|
|
||||||
- g_array_append_val (self->actions, entry);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- phosh_shell_add_global_keyboard_action_entries (phosh_shell_get_default (),
|
|
||||||
- (GActionEntry*)self->actions->data,
|
|
||||||
- self->actions->len,
|
|
||||||
- self);
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-static void
|
|
||||||
-on_keybindings_changed (PhoshHome *self,
|
|
||||||
- gchar *key,
|
|
||||||
- GSettings *settings)
|
|
||||||
-{
|
|
||||||
- /* For now just redo all keybindings */
|
|
||||||
- g_debug ("Updating keybindings");
|
|
||||||
- phosh_shell_remove_global_keyboard_action_entries (phosh_shell_get_default (),
|
|
||||||
- (GActionEntry*)self->actions->data,
|
|
||||||
- self->actions->len);
|
|
||||||
- g_array_set_size (self->actions, 0);
|
|
||||||
- add_keybindings (self);
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-
|
|
||||||
static gboolean
|
|
||||||
on_idle (PhoshOskButton *self)
|
|
||||||
{
|
|
||||||
@@ -332,14 +253,6 @@ phosh_home_constructed (GObject *object)
|
|
||||||
G_CALLBACK (key_press_event_cb),
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
- g_object_connect (self->settings,
|
|
||||||
- "swapped-signal::changed::" KEYBINDING_KEY_TOGGLE_OVERVIEW,
|
|
||||||
- on_keybindings_changed, self,
|
|
||||||
- "swapped-signal::changed::" KEYBINDING_KEY_TOGGLE_APPLICATION_VIEW,
|
|
||||||
- on_keybindings_changed, self,
|
|
||||||
- NULL);
|
|
||||||
- add_keybindings (self);
|
|
||||||
-
|
|
||||||
phosh_connect_feedback (self->btn_home);
|
|
||||||
|
|
||||||
g_idle_add ((GSourceFunc) on_idle, self);
|
|
||||||
@@ -348,24 +261,6 @@ phosh_home_constructed (GObject *object)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
-static void
|
|
||||||
-phosh_home_dispose (GObject *object)
|
|
||||||
-{
|
|
||||||
- PhoshHome *self = PHOSH_HOME (object);
|
|
||||||
-
|
|
||||||
- g_clear_object (&self->settings);
|
|
||||||
-
|
|
||||||
- if (self->actions) {
|
|
||||||
- phosh_shell_remove_global_keyboard_action_entries (phosh_shell_get_default (),
|
|
||||||
- (GActionEntry*)self->actions->data,
|
|
||||||
- self->actions->len);
|
|
||||||
- g_clear_pointer (&self->actions, g_array_unref);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- G_OBJECT_CLASS (phosh_home_parent_class)->dispose (object);
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-
|
|
||||||
static void
|
|
||||||
phosh_home_class_init (PhoshHomeClass *klass)
|
|
||||||
{
|
|
||||||
@@ -373,7 +268,6 @@ phosh_home_class_init (PhoshHomeClass *klass)
|
|
||||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
|
||||||
|
|
||||||
object_class->constructed = phosh_home_constructed;
|
|
||||||
- object_class->dispose = phosh_home_dispose;
|
|
||||||
|
|
||||||
object_class->set_property = phosh_home_set_property;
|
|
||||||
object_class->get_property = phosh_home_get_property;
|
|
||||||
@@ -419,8 +313,6 @@ phosh_home_init (PhoshHome *self)
|
|
||||||
{
|
|
||||||
self->state = PHOSH_HOME_STATE_FOLDED;
|
|
||||||
self->animation.progress = 1.0;
|
|
||||||
- self->actions = g_array_new (FALSE, TRUE, sizeof (GActionEntry));
|
|
||||||
- self->settings = g_settings_new (KEYBINDINGS_SCHEMA_ID);
|
|
||||||
|
|
||||||
gtk_widget_init_template (GTK_WIDGET (self));
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
From e88f5dee0cbb7fa0851b43a5ded5d94256c756d2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Arnaud Ferraris <arnaud.ferraris@gmail.com>
|
|
||||||
Date: Sat, 21 Mar 2020 03:00:34 +0100
|
|
||||||
Subject: [PATCH] system-prompt: allow blank passwords
|
|
||||||
|
|
||||||
---
|
|
||||||
src/system-prompt.c | 5 -----
|
|
||||||
1 file changed, 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/system-prompt.c b/src/system-prompt.c
|
|
||||||
index 30aa3f1..bd06ee0 100644
|
|
||||||
--- a/src/system-prompt.c
|
|
||||||
+++ b/src/system-prompt.c
|
|
||||||
@@ -256,8 +256,6 @@ phosh_system_prompt_password_async (GcrPrompt *prompt,
|
|
||||||
priv->task = g_task_new (self, NULL, callback, user_data);
|
|
||||||
g_task_set_source_tag (priv->task, phosh_system_prompt_password_async);
|
|
||||||
|
|
||||||
- if (!gtk_entry_get_text_length (GTK_ENTRY (priv->entry_password)))
|
|
||||||
- gtk_widget_set_sensitive (priv->btn_continue, FALSE);
|
|
||||||
gtk_widget_set_sensitive (priv->grid, TRUE);
|
|
||||||
|
|
||||||
obj = G_OBJECT (self);
|
|
||||||
@@ -315,7 +313,6 @@ phosh_system_prompt_confirm_async (GcrPrompt *prompt,
|
|
||||||
priv->task = g_task_new (self, NULL, callback, user_data);
|
|
||||||
g_task_set_source_tag (priv->task, phosh_system_prompt_confirm_async);
|
|
||||||
|
|
||||||
- gtk_widget_set_sensitive (priv->btn_continue, TRUE);
|
|
||||||
gtk_widget_set_sensitive (priv->grid, TRUE);
|
|
||||||
|
|
||||||
obj = G_OBJECT (self);
|
|
||||||
@@ -392,7 +389,6 @@ prompt_complete (PhoshSystemPrompt *self)
|
|
||||||
g_task_return_pointer (res, (gpointer)password, NULL);
|
|
||||||
g_object_unref (res);
|
|
||||||
|
|
||||||
- gtk_widget_set_sensitive (priv->btn_continue, FALSE);
|
|
||||||
gtk_widget_set_sensitive (priv->grid, FALSE);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
@@ -451,7 +447,6 @@ on_password_changed (PhoshSystemPrompt *self,
|
|
||||||
if (!gtk_entry_get_text_length (GTK_ENTRY (editable)))
|
|
||||||
return;
|
|
||||||
|
|
||||||
- gtk_widget_set_sensitive (priv->btn_continue, TRUE);
|
|
||||||
password = gtk_entry_get_text (GTK_ENTRY (editable));
|
|
||||||
|
|
||||||
/*
|
|
||||||
--
|
|
||||||
2.24.1
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
diff --git a/src/proximity.c b/src/proximity.c
|
|
||||||
index 0beca69..8e93b21 100644
|
|
||||||
--- a/src/proximity.c
|
|
||||||
+++ b/src/proximity.c
|
|
||||||
@@ -148,8 +155,9 @@ on_proximity_near_changed (PhoshProximity *self,
|
|
||||||
PhoshSensorProxyManager *sensor)
|
|
||||||
{
|
|
||||||
gboolean near;
|
|
||||||
- int ps_mode;
|
|
||||||
+ int ps_mode;
|
|
||||||
PhoshShell *shell = phosh_shell_get_default ();
|
|
||||||
+ PhoshWayland *wl = phosh_wayland_get_default ();
|
|
||||||
PhoshMonitor *monitor = phosh_shell_get_builtin_monitor (shell);
|
|
||||||
|
|
||||||
near = phosh_dbus_sensor_proxy_get_proximity_near (
|
|
||||||
@@ -157,8 +165,15 @@ on_proximity_near_changed (PhoshProximity *self,
|
|
||||||
|
|
||||||
g_debug ("Proximity near changed: %d", near);
|
|
||||||
if (near) {
|
|
||||||
- ps_mode = PHOSH_MONITOR_POWER_SAVE_MODE_OFF;
|
|
||||||
+ if (!self->fader) {
|
|
||||||
+ self->fader = phosh_fader_new (phosh_wayland_get_zwlr_layer_shell_v1 (wl),
|
|
||||||
+ monitor->wl_output);
|
|
||||||
+ gtk_widget_show (GTK_WIDGET (self->fader));
|
|
||||||
+ }
|
|
||||||
+ g_timeout_add_seconds (5, continue, self);
|
|
||||||
+ ps_mode = PHOSH_MONITOR_POWER_SAVE_MODE_OFF;
|
|
||||||
} else {
|
|
||||||
+ g_clear_pointer (&self->fader, phosh_cp_widget_destroy);
|
|
||||||
ps_mode = PHOSH_MONITOR_POWER_SAVE_MODE_ON;
|
|
||||||
}
|
|
||||||
phosh_monitor_set_power_save_mode (monitor, ps_mode);
|
|
@ -1,14 +0,0 @@
|
|||||||
diff -Npur a/data/phosh.in b/data/phosh.in
|
|
||||||
--- a/data/phosh.in 2021-03-20 13:53:32.367786000 +0100
|
|
||||||
+++ b/data/phosh.in 2021-03-20 13:55:19.327789721 +0100
|
|
||||||
@@ -56,6 +56,10 @@ elif [ -f /etc/phosh/rootston.ini ]; th
|
|
||||||
PHOC_INI=/etc/phosh/rootston.ini
|
|
||||||
fi
|
|
||||||
|
|
||||||
+# Set proper locale according to /etc/locale.conf
|
|
||||||
+source /etc/locale.conf
|
|
||||||
+export LANG=$LANG
|
|
||||||
+
|
|
||||||
# Run gnome-session through a login shell so it picks
|
|
||||||
# variables from /etc/profile.d (XDG_*)
|
|
||||||
[ -n "$WLR_BACKENDS" ] || WLR_BACKENDS=drm,libinput
|
|
@ -1,26 +0,0 @@
|
|||||||
diff --git a/src/shell.c b/src/shell.c
|
|
||||||
index 324b261..4a66866 100644
|
|
||||||
--- a/src/shell.c
|
|
||||||
+++ b/src/shell.c
|
|
||||||
@@ -535,15 +535,18 @@ static void
|
|
||||||
on_builtin_monitor_power_mode_changed (PhoshShell *self, GParamSpec *pspec, PhoshMonitor *monitor)
|
|
||||||
{
|
|
||||||
PhoshMonitorPowerSaveMode mode;
|
|
||||||
+ PhoshSensorProxyManager *sensor_proxy_manager;
|
|
||||||
+ gboolean near;
|
|
||||||
+
|
|
||||||
+ near = phosh_dbus_sensor_proxy_get_proximity_near (
|
|
||||||
+ PHOSH_DBUS_SENSOR_PROXY (sensor_proxy_manager));
|
|
||||||
|
|
||||||
g_return_if_fail (PHOSH_IS_SHELL (self));
|
|
||||||
g_return_if_fail (PHOSH_IS_MONITOR (monitor));
|
|
||||||
|
|
||||||
g_object_get (monitor, "power-mode", &mode, NULL);
|
|
||||||
-#if 0
|
|
||||||
- if (mode == PHOSH_MONITOR_POWER_SAVE_MODE_OFF)
|
|
||||||
+ if (!near && mode == PHOSH_MONITOR_POWER_SAVE_MODE_OFF)
|
|
||||||
phosh_shell_lock (self);
|
|
||||||
-#endif
|
|
||||||
|
|
||||||
phosh_shell_set_state (self, PHOSH_STATE_BLANKED, mode == PHOSH_MONITOR_POWER_SAVE_MODE_OFF);
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
From a85bf76c9c19a8f54657b7973a4b1ec50176f395 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
|
|
||||||
Date: Fri, 23 Oct 2020 13:40:44 +0200
|
|
||||||
Subject: [PATCH 44/47] shell: honor configured rotation
|
|
||||||
|
|
||||||
Resetting the default transform causes the user-configured rotation to
|
|
||||||
be ignored. In cases where the transform needs to be reset, this is
|
|
||||||
already done in lockscreen manager.
|
|
||||||
---
|
|
||||||
src/shell.c | 4 ----
|
|
||||||
1 file changed, 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/shell.c b/src/shell.c
|
|
||||||
index 42893d4..19a41fb 100644
|
|
||||||
--- a/src/shell.c
|
|
||||||
+++ b/src/shell.c
|
|
||||||
@@ -484,10 +484,6 @@ setup_idle_cb (PhoshShell *self)
|
|
||||||
|
|
||||||
phosh_session_register (PHOSH_APP_ID);
|
|
||||||
|
|
||||||
- /* If we start rotated, fix this up */
|
|
||||||
- if (phosh_shell_get_transform (self) != PHOSH_MONITOR_TRANSFORM_NORMAL)
|
|
||||||
- phosh_shell_set_transform (self, PHOSH_MONITOR_TRANSFORM_NORMAL);
|
|
||||||
-
|
|
||||||
priv->startup_finished = TRUE;
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
--
|
|
||||||
2.28.0
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
|||||||
--- a/src/proximity.c 2021-03-04 10:51:32.765179000 +0100
|
|
||||||
+++ b/src/proximity.c 2021-03-04 12:01:32.618475761 +0100
|
|
||||||
@@ -148,24 +148,24 @@ on_proximity_near_changed (PhoshProximit
|
|
||||||
PhoshSensorProxyManager *sensor)
|
|
||||||
{
|
|
||||||
gboolean near;
|
|
||||||
+ int ps_mode;
|
|
||||||
+ PhoshShell *shell = phosh_shell_get_default ();
|
|
||||||
+ PhoshMonitor *monitor = phosh_shell_get_builtin_monitor (shell);
|
|
||||||
|
|
||||||
near = phosh_dbus_sensor_proxy_get_proximity_near (
|
|
||||||
PHOSH_DBUS_SENSOR_PROXY (self->sensor_proxy_manager));
|
|
||||||
|
|
||||||
g_debug ("Proximity near changed: %d", near);
|
|
||||||
+
|
|
||||||
if (near) {
|
|
||||||
- PhoshShell *shell = phosh_shell_get_default ();
|
|
||||||
- PhoshWayland *wl = phosh_wayland_get_default ();
|
|
||||||
- PhoshMonitor *monitor = phosh_shell_get_builtin_monitor (shell);
|
|
||||||
-
|
|
||||||
- if (!self->fader) {
|
|
||||||
- self->fader = phosh_fader_new (phosh_wayland_get_zwlr_layer_shell_v1 (wl),
|
|
||||||
- monitor->wl_output);
|
|
||||||
- gtk_widget_show (GTK_WIDGET (self->fader));
|
|
||||||
- }
|
|
||||||
+ ps_mode = PHOSH_MONITOR_POWER_SAVE_MODE_OFF;
|
|
||||||
+ g_object_set(monitor, "proximity", TRUE, NULL);
|
|
||||||
} else {
|
|
||||||
- g_clear_pointer (&self->fader, phosh_cp_widget_destroy);
|
|
||||||
+ ps_mode = PHOSH_MONITOR_POWER_SAVE_MODE_ON;
|
|
||||||
+ g_object_set(monitor, "proximity", FALSE, NULL);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ phosh_monitor_set_power_save_mode (monitor, ps_mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
--- a/src/shell.c 2021-03-04 15:50:24.291677177 +0100
|
|
||||||
+++ b/src/shell.c 2021-03-04 15:50:54.228343514 +0100
|
|
||||||
@@ -529,13 +533,15 @@ static void
|
|
||||||
on_builtin_monitor_power_mode_changed (PhoshShell *self, GParamSpec *pspec, PhoshMonitor *monitor)
|
|
||||||
{
|
|
||||||
PhoshMonitorPowerSaveMode mode;
|
|
||||||
+ gboolean proximity;
|
|
||||||
|
|
||||||
g_return_if_fail (PHOSH_IS_SHELL (self));
|
|
||||||
g_return_if_fail (PHOSH_IS_MONITOR (monitor));
|
|
||||||
|
|
||||||
+ g_object_get (monitor, "proximity", &proximity, NULL);
|
|
||||||
g_object_get (monitor, "power-mode", &mode, NULL);
|
|
||||||
- if (mode == PHOSH_MONITOR_POWER_SAVE_MODE_OFF)
|
|
||||||
- phosh_shell_lock (self);
|
|
||||||
+ if (!proximity && mode == PHOSH_MONITOR_POWER_SAVE_MODE_OFF)
|
|
||||||
+ //phosh_shell_lock (self);
|
|
||||||
|
|
||||||
phosh_shell_set_state (self, PHOSH_STATE_BLANKED, mode == PHOSH_MONITOR_POWER_SAVE_MODE_OFF);
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
From: Daniel Dehennin <daniel.dehennin@baby-gnu.org>
|
|
||||||
Date: Wed, 17 Mar 2021 17:38:58 +0100
|
|
||||||
Subject: Fix locale issue in Service file
|
|
||||||
|
|
||||||
* data/phosh.service (Environment): do not override user language
|
|
||||||
setting.
|
|
||||||
---
|
|
||||||
data/phosh.service | 1 -
|
|
||||||
1 file changed, 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/data/phosh.service b/data/phosh.service
|
|
||||||
index fa18137..a585696 100644
|
|
||||||
--- a/data/phosh.service
|
|
||||||
+++ b/data/phosh.service
|
|
||||||
@@ -25,7 +25,6 @@ Before=graphical.target
|
|
||||||
ConditionPathExists=/dev/tty0
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
-Environment=LANG=C.UTF-8
|
|
||||||
Environment=XDG_CURRENT_DESKTOP=GNOME
|
|
||||||
Environment=XDG_SESSION_DESKTOP=phosh
|
|
||||||
Environment=XDG_SESSION_TYPE=wayland
|
|
@ -1,50 +0,0 @@
|
|||||||
From 50cffaa899230af7ac3d24c7e76f3a7e4dbac519 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
|
|
||||||
Date: Tue, 27 Oct 2020 15:07:37 +0100
|
|
||||||
Subject: [PATCH 45/47] shell: add an accessor for the mode manager
|
|
||||||
|
|
||||||
Other modules should be able to query the device type too.
|
|
||||||
---
|
|
||||||
src/shell.c | 13 +++++++++++++
|
|
||||||
src/shell.h | 1 +
|
|
||||||
2 files changed, 14 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/shell.c b/src/shell.c
|
|
||||||
index 19a41fb..48dd4c2 100644
|
|
||||||
--- a/src/shell.c
|
|
||||||
+++ b/src/shell.c
|
|
||||||
@@ -815,6 +815,19 @@ phosh_shell_get_lockscreen_manager (PhoshShell *self)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+PhoshModeManager *
|
|
||||||
+phosh_shell_get_mode_manager (PhoshShell *self)
|
|
||||||
+{
|
|
||||||
+ PhoshShellPrivate *priv;
|
|
||||||
+
|
|
||||||
+ g_return_val_if_fail (PHOSH_IS_SHELL (self), NULL);
|
|
||||||
+ priv = phosh_shell_get_instance_private (self);
|
|
||||||
+
|
|
||||||
+ g_return_val_if_fail (PHOSH_IS_MODE_MANAGER (priv->mode_manager), NULL);
|
|
||||||
+ return priv->mode_manager;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
PhoshMonitorManager *
|
|
||||||
phosh_shell_get_monitor_manager (PhoshShell *self)
|
|
||||||
{
|
|
||||||
diff --git a/src/shell.h b/src/shell.h
|
|
||||||
index 65680a5..541203d 100644
|
|
||||||
--- a/src/shell.h
|
|
||||||
+++ b/src/shell.h
|
|
||||||
@@ -47,6 +47,7 @@ void phosh_shell_set_primary_monitor (PhoshShell *self, PhoshMon
|
|
||||||
PhoshMonitor *phosh_shell_get_primary_monitor (PhoshShell *self);
|
|
||||||
PhoshMonitor *phosh_shell_get_builtin_monitor (PhoshShell *self);
|
|
||||||
PhoshLockscreenManager *phosh_shell_get_lockscreen_manager (PhoshShell *self);
|
|
||||||
+PhoshModeManager *phosh_shell_get_mode_manager (PhoshShell *self);
|
|
||||||
PhoshMonitorManager *phosh_shell_get_monitor_manager (PhoshShell *self);
|
|
||||||
PhoshOskManager *phosh_shell_get_osk_manager (PhoshShell *self);
|
|
||||||
PhoshToplevelManager *phosh_shell_get_toplevel_manager (PhoshShell *self);
|
|
||||||
--
|
|
||||||
2.28.0
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
|||||||
From 29f0773b1e60736c193b6e3118b5f93030a52bc5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
|
|
||||||
Date: Tue, 27 Oct 2020 17:14:07 +0100
|
|
||||||
Subject: [PATCH 46/47] lockscreen-manager: undo transform only for phones
|
|
||||||
|
|
||||||
If the display is large enough to make the keypad usable even when
|
|
||||||
rotated, we should not try to rotate it back to the default orientation.
|
|
||||||
---
|
|
||||||
src/lockscreen-manager.c | 12 ++++++++++--
|
|
||||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/lockscreen-manager.c b/src/lockscreen-manager.c
|
|
||||||
index dac21e8..cc09026 100644
|
|
||||||
--- a/src/lockscreen-manager.c
|
|
||||||
+++ b/src/lockscreen-manager.c
|
|
||||||
@@ -146,6 +146,7 @@ on_monitor_added (PhoshLockscreenManager *self,
|
|
||||||
static void
|
|
||||||
lockscreen_lock (PhoshLockscreenManager *self)
|
|
||||||
{
|
|
||||||
+ PhoshModeManager *mode_manager;
|
|
||||||
PhoshMonitor *primary_monitor;
|
|
||||||
PhoshWayland *wl = phosh_wayland_get_default ();
|
|
||||||
PhoshShell *shell = phosh_shell_get_default ();
|
|
||||||
@@ -156,9 +157,16 @@ lockscreen_lock (PhoshLockscreenManager *self)
|
|
||||||
primary_monitor = phosh_shell_get_primary_monitor (shell);
|
|
||||||
g_return_if_fail (primary_monitor);
|
|
||||||
|
|
||||||
- /* Undo any transform on the primary display so the keypad becomes usable */
|
|
||||||
+ mode_manager = phosh_shell_get_mode_manager(shell);
|
|
||||||
self->transform = phosh_shell_get_transform (shell);
|
|
||||||
- phosh_shell_set_transform (shell, PHOSH_MONITOR_TRANSFORM_NORMAL);
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
+ * The lockscreen won't likely fit on phones, so we have to undo any transform
|
|
||||||
+ * on the primary display to make the keypad usable on such devices
|
|
||||||
+ */
|
|
||||||
+ if (phosh_mode_manager_get_device_type(mode_manager) == PHOSH_MODE_DEVICE_TYPE_PHONE) {
|
|
||||||
+ phosh_shell_set_transform (shell, PHOSH_MONITOR_TRANSFORM_NORMAL);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
/* Listen for monitor changes */
|
|
||||||
g_signal_connect_object (monitor_manager, "monitor-added",
|
|
||||||
--
|
|
||||||
2.28.0
|
|
@ -1,18 +0,0 @@
|
|||||||
diff --git a/src/rotation-manager.c b/src/rotation-manager.c
|
|
||||||
index 9fa8abd..a627935 100644
|
|
||||||
--- a/src/rotation-manager.c
|
|
||||||
+++ b/src/rotation-manager.c
|
|
||||||
@@ -110,11 +110,11 @@ match_orientation (PhoshRotationManager *self)
|
|
||||||
if (!g_strcmp0 ("normal", orient)) {
|
|
||||||
transform = PHOSH_MONITOR_TRANSFORM_NORMAL;
|
|
||||||
} else if (!g_strcmp0 ("right-up", orient)) {
|
|
||||||
- transform = PHOSH_MONITOR_TRANSFORM_270;
|
|
||||||
+ transform = PHOSH_MONITOR_TRANSFORM_90;
|
|
||||||
} else if (!g_strcmp0 ("bottom-up", orient)) {
|
|
||||||
transform = PHOSH_MONITOR_TRANSFORM_180;
|
|
||||||
} else if (!g_strcmp0 ("left-up", orient)) {
|
|
||||||
- transform = PHOSH_MONITOR_TRANSFORM_90;
|
|
||||||
+ transform = PHOSH_MONITOR_TRANSFORM_270;
|
|
||||||
} else if (!g_strcmp0 ("undefined", orient)) {
|
|
||||||
return; /* just leave as is */
|
|
||||||
} else {
|
|
@ -1,27 +0,0 @@
|
|||||||
--- a/src/lockscreen.c 2020-11-13 14:57:08.191840783 +0100
|
|
||||||
+++ b/src/lockscreen.c 2020-11-13 14:55:38.355171909 +0100
|
|
||||||
@@ -21,6 +21,8 @@
|
|
||||||
#include <math.h>
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
+#include <shell.h>
|
|
||||||
+
|
|
||||||
#define HANDY_USE_UNSTABLE_API
|
|
||||||
#include <handy.h>
|
|
||||||
|
|
||||||
@@ -402,6 +404,7 @@ carousel_position_notified_cb (PhoshLock
|
|
||||||
GParamSpec *pspec,
|
|
||||||
HdyCarousel *carousel)
|
|
||||||
{
|
|
||||||
+ PhoshShell *shell = phosh_shell_get_default ();
|
|
||||||
PhoshLockscreenPrivate *priv = phosh_lockscreen_get_instance_private (self);
|
|
||||||
double position;
|
|
||||||
|
|
||||||
@@ -418,6 +421,7 @@ carousel_position_notified_cb (PhoshLock
|
|
||||||
priv->idle_timer = g_timeout_add_seconds (LOCKSCREEN_IDLE_SECONDS,
|
|
||||||
(GSourceFunc) keypad_check_idle,
|
|
||||||
self);
|
|
||||||
+ phosh_shell_set_transform (shell, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
File diff suppressed because it is too large
Load Diff
@ -1,211 +0,0 @@
|
|||||||
From c11bddfedd9d62410cd64720be91b1a3a5096231 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Tue, 29 Sep 2020 16:30:24 +0200
|
|
||||||
Subject: [PATCH] settings: Add torch brightness slider
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
This adds brightness slider when the torch is enabled.
|
|
||||||
|
|
||||||
Closes: #386
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/settings.c | 65 +++++++++++++++++++++++++++++++++++++++++
|
|
||||||
src/ui/settings-menu.ui | 49 +++++++++++++++++++++++++++++++
|
|
||||||
2 files changed, 114 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/settings.c b/src/settings.c
|
|
||||||
index 5dd823b8..bcfbe6f9 100644
|
|
||||||
--- a/src/settings.c
|
|
||||||
+++ b/src/settings.c
|
|
||||||
@@ -16,6 +16,8 @@
|
|
||||||
#include "quick-setting.h"
|
|
||||||
#include "settings/brightness.h"
|
|
||||||
#include "settings/gvc-channel-bar.h"
|
|
||||||
+#include "torch-info.h"
|
|
||||||
+#include "torch-manager.h"
|
|
||||||
#include "wwan/phosh-wwan-mm.h"
|
|
||||||
#include "feedback-manager.h"
|
|
||||||
#include "notifications/notify-manager.h"
|
|
||||||
@@ -64,6 +66,11 @@ typedef struct _PhoshSettings
|
|
||||||
GtkWidget *list_notifications;
|
|
||||||
GtkWidget *sw_notifications;
|
|
||||||
LfbEvent *notify_event;
|
|
||||||
+
|
|
||||||
+ /* Torch */
|
|
||||||
+ PhoshTorchManager *torch_manager;
|
|
||||||
+ GtkWidget *scale_torch;
|
|
||||||
+ gboolean setting_torch;
|
|
||||||
} PhoshSettings;
|
|
||||||
|
|
||||||
|
|
||||||
@@ -401,6 +408,41 @@ end_notify_feedback (PhoshSettings *self)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+static void
|
|
||||||
+on_torch_scale_value_changed (PhoshSettings *self, GtkScale *scale_torch)
|
|
||||||
+{
|
|
||||||
+ double value;
|
|
||||||
+
|
|
||||||
+ g_return_if_fail (PHOSH_IS_SETTINGS (self));
|
|
||||||
+ g_return_if_fail (PHOSH_IS_TORCH_MANAGER (self->torch_manager));
|
|
||||||
+
|
|
||||||
+ /* Only react to scale changes when torch is enabled */
|
|
||||||
+ if (!phosh_torch_manager_get_enabled (self->torch_manager))
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ self->setting_torch = TRUE;
|
|
||||||
+ value = gtk_range_get_value (GTK_RANGE (self->scale_torch));
|
|
||||||
+ g_debug ("Setting torch brightness to %.2f", value);
|
|
||||||
+ phosh_torch_manager_set_scaled_brightness (self->torch_manager, value / 100.0);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+on_torch_brightness_changed (PhoshSettings *self, GParamSpec *pspec, PhoshTorchManager *manager)
|
|
||||||
+{
|
|
||||||
+ g_return_if_fail (PHOSH_IS_SETTINGS (self));
|
|
||||||
+ g_return_if_fail (PHOSH_IS_TORCH_MANAGER (manager));
|
|
||||||
+
|
|
||||||
+ if (self->setting_torch) {
|
|
||||||
+ self->setting_torch = FALSE;
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ gtk_range_set_value (GTK_RANGE (self->scale_torch),
|
|
||||||
+ 100.0 * phosh_torch_manager_get_scaled_brightness (self->torch_manager));
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
on_notifcation_items_changed (PhoshSettings *self,
|
|
||||||
guint position,
|
|
||||||
@@ -441,6 +483,24 @@ setup_brightness_range (PhoshSettings *self)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+static void
|
|
||||||
+setup_torch (PhoshSettings *self)
|
|
||||||
+{
|
|
||||||
+ PhoshShell *shell = phosh_shell_get_default ();
|
|
||||||
+
|
|
||||||
+ self->torch_manager = g_object_ref(phosh_shell_get_torch_manager (shell));
|
|
||||||
+
|
|
||||||
+ gtk_range_set_range (GTK_RANGE (self->scale_torch), 40, 100);
|
|
||||||
+ gtk_range_set_value (GTK_RANGE (self->scale_torch),
|
|
||||||
+ phosh_torch_manager_get_scaled_brightness (self->torch_manager) * 100.0);
|
|
||||||
+ g_signal_connect_object (self->torch_manager,
|
|
||||||
+ "notify::brightness",
|
|
||||||
+ G_CALLBACK(on_torch_brightness_changed),
|
|
||||||
+ self,
|
|
||||||
+ G_CONNECT_SWAPPED);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
setup_volume_bar (PhoshSettings *self)
|
|
||||||
{
|
|
||||||
@@ -477,6 +537,7 @@ phosh_settings_constructed (GObject *object)
|
|
||||||
|
|
||||||
setup_brightness_range (self);
|
|
||||||
setup_volume_bar (self);
|
|
||||||
+ setup_torch (self);
|
|
||||||
|
|
||||||
g_signal_connect (self->quick_settings,
|
|
||||||
"child-activated",
|
|
||||||
@@ -515,6 +576,8 @@ phosh_settings_dispose (GObject *object)
|
|
||||||
g_clear_object (&self->notify_event);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ g_clear_object (&self->torch_manager);
|
|
||||||
+
|
|
||||||
G_OBJECT_CLASS (phosh_settings_parent_class)->dispose (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -552,6 +615,7 @@ phosh_settings_class_init (PhoshSettingsClass *klass)
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, PhoshSettings, list_notifications);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, PhoshSettings, quick_settings);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, PhoshSettings, scale_brightness);
|
|
||||||
+ gtk_widget_class_bind_template_child (widget_class, PhoshSettings, scale_torch);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, PhoshSettings, sw_notifications);
|
|
||||||
|
|
||||||
gtk_widget_class_bind_template_callback (widget_class, battery_setting_clicked_cb);
|
|
||||||
@@ -568,6 +632,7 @@ phosh_settings_class_init (PhoshSettingsClass *klass)
|
|
||||||
gtk_widget_class_bind_template_callback (widget_class, wifi_setting_clicked_cb);
|
|
||||||
gtk_widget_class_bind_template_callback (widget_class, wifi_setting_long_pressed_cb);
|
|
||||||
gtk_widget_class_bind_template_callback (widget_class, wwan_setting_clicked_cb);
|
|
||||||
+ gtk_widget_class_bind_template_callback (widget_class, on_torch_scale_value_changed);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/ui/settings-menu.ui b/src/ui/settings-menu.ui
|
|
||||||
index 38aa0d97..ba549be0 100644
|
|
||||||
--- a/src/ui/settings-menu.ui
|
|
||||||
+++ b/src/ui/settings-menu.ui
|
|
||||||
@@ -200,6 +200,52 @@
|
|
||||||
<property name="position">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkRevealer" id="revealer">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="reveal-child" bind-source="torchinfo" bind-property="enabled" bind-flags="sync-create"/>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkBox">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="can_focus">False</property>
|
|
||||||
+ <property name="margin_bottom">5</property>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkImage">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="can_focus">False</property>
|
|
||||||
+ <property name="margin_right">6</property>
|
|
||||||
+ <property name="icon_name">torch-enabled-symbolic</property>
|
|
||||||
+ </object>
|
|
||||||
+ <packing>
|
|
||||||
+ <property name="expand">False</property>
|
|
||||||
+ <property name="fill">True</property>
|
|
||||||
+ <property name="position">0</property>
|
|
||||||
+ </packing>
|
|
||||||
+ </child>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkScale" id="scale_torch">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="can_focus">True</property>
|
|
||||||
+ <property name="adjustment">adj_torch</property>
|
|
||||||
+ <property name="round_digits">0</property>
|
|
||||||
+ <property name="draw_value">False</property>
|
|
||||||
+ <signal name="value-changed" handler="on_torch_scale_value_changed" object="PhoshSettings" swapped="yes"/>
|
|
||||||
+ </object>
|
|
||||||
+ <packing>
|
|
||||||
+ <property name="expand">True</property>
|
|
||||||
+ <property name="fill">True</property>
|
|
||||||
+ <property name="position">1</property>
|
|
||||||
+ </packing>
|
|
||||||
+ </child>
|
|
||||||
+ </object>
|
|
||||||
+ </child>
|
|
||||||
+ </object>
|
|
||||||
+ <packing>
|
|
||||||
+ <property name="expand">False</property>
|
|
||||||
+ <property name="fill">True</property>
|
|
||||||
+ <property name="position">3</property>
|
|
||||||
+ </packing>
|
|
||||||
+ </child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkScrolledWindow" id="sw_notifications">
|
|
||||||
<property name="visible">False</property>
|
|
||||||
@@ -234,4 +280,7 @@
|
|
||||||
<class name="phosh-settings-menu"/>
|
|
||||||
</style>
|
|
||||||
</template>
|
|
||||||
+ <object class="GtkAdjustment" id="adj_torch">
|
|
||||||
+ <property name="step-increment">1</property>
|
|
||||||
+ </object>
|
|
||||||
</interface>
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
@ -1,365 +0,0 @@
|
|||||||
From 77913a24fc709cdbc1f2a91da7cf81834f1239a6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Wed, 19 May 2021 17:40:12 +0200
|
|
||||||
Subject: [PATCH 1/6] hacking: Fix property function names
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
We always use the singular form
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
HACKING.md | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/HACKING.md b/HACKING.md
|
|
||||||
index 242cceba..bd9fdd52 100644
|
|
||||||
--- a/HACKING.md
|
|
||||||
+++ b/HACKING.md
|
|
||||||
@@ -106,8 +106,8 @@ individual C files should be structured as (top to bottom of file):
|
|
||||||
```
|
|
||||||
- private methods and callbacks (these can also go at convenient
|
|
||||||
places above `phosh_thing_constructed ()`
|
|
||||||
- - `phosh_thing_set_properties ()`
|
|
||||||
- - `phosh_thing_get_properties ()`
|
|
||||||
+ - `phosh_thing_set_property ()`
|
|
||||||
+ - `phosh_thing_get_property ()`
|
|
||||||
- `phosh_thing_constructed ()`
|
|
||||||
- `phosh_thing_dispose ()`
|
|
||||||
- `phosh_thing_finalize ()`
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
||||||
|
|
||||||
From e5dc0790c0a265b4a30ad4cc04e306c31a05da3e Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Wed, 19 May 2021 17:20:28 +0200
|
|
||||||
Subject: [PATCH 2/6] batteryinfo: Drop superfluous NULL checks
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
g_clear_object() does this for us.
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/batteryinfo.c | 7 ++-----
|
|
||||||
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/batteryinfo.c b/src/batteryinfo.c
|
|
||||||
index a03cac8d..d8f02158 100644
|
|
||||||
--- a/src/batteryinfo.c
|
|
||||||
+++ b/src/batteryinfo.c
|
|
||||||
@@ -91,11 +91,8 @@ phosh_battery_info_dispose (GObject *object)
|
|
||||||
{
|
|
||||||
PhoshBatteryInfo *self = PHOSH_BATTERY_INFO (object);
|
|
||||||
|
|
||||||
- if (self->device)
|
|
||||||
- g_clear_object (&self->device);
|
|
||||||
-
|
|
||||||
- if (self->upower)
|
|
||||||
- g_clear_object (&self->upower);
|
|
||||||
+ g_clear_object (&self->device);
|
|
||||||
+ g_clear_object (&self->upower);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (phosh_battery_info_parent_class)->dispose (object);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
||||||
|
|
||||||
From 2e0db016397b0737f5abc2ec9f4c0289412c6fa3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Wed, 19 May 2021 18:00:49 +0200
|
|
||||||
Subject: [PATCH 3/6] panel: Always use bold font
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
So far all labels set this expicitly
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/style.css | 2 +-
|
|
||||||
src/ui/top-panel.ui | 3 ---
|
|
||||||
2 files changed, 1 insertion(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/style.css b/src/style.css
|
|
||||||
index caa845fd..2e707ae4 100644
|
|
||||||
--- a/src/style.css
|
|
||||||
+++ b/src/style.css
|
|
||||||
@@ -3,6 +3,7 @@
|
|
||||||
*/
|
|
||||||
.phosh-panel {
|
|
||||||
font: 15px Cantarell;
|
|
||||||
+ font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.phosh-panel-btn {
|
|
||||||
@@ -11,7 +12,6 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
.phosh-topbar-clock {
|
|
||||||
- font-weight: bold;
|
|
||||||
font-feature-settings: "tnum";
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/ui/top-panel.ui b/src/ui/top-panel.ui
|
|
||||||
index 26338b6f..e03c537e 100644
|
|
||||||
--- a/src/ui/top-panel.ui
|
|
||||||
+++ b/src/ui/top-panel.ui
|
|
||||||
@@ -168,9 +168,6 @@
|
|
||||||
<property name="margin_right">8</property>
|
|
||||||
<property name="margin_top">2</property>
|
|
||||||
<property name="justify">center</property>
|
|
||||||
- <attributes>
|
|
||||||
- <attribute name="weight" value="bold"/>
|
|
||||||
- </attributes>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
||||||
|
|
||||||
From 40a57d77346d2447e349a1a215fc9897fc9309ff Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Wed, 19 May 2021 17:40:44 +0200
|
|
||||||
Subject: [PATCH 4/6] batteryinfo: Add optional label with battery percentage
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/batteryinfo.c | 100 ++++++++++++++++++++++++++++++++++++++++++++--
|
|
||||||
src/batteryinfo.h | 2 +
|
|
||||||
2 files changed, 99 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/batteryinfo.c b/src/batteryinfo.c
|
|
||||||
index d8f02158..abd518d2 100644
|
|
||||||
--- a/src/batteryinfo.c
|
|
||||||
+++ b/src/batteryinfo.c
|
|
||||||
@@ -22,16 +22,63 @@
|
|
||||||
* @Title: PhoshBatteryInfo
|
|
||||||
*/
|
|
||||||
|
|
||||||
+enum {
|
|
||||||
+ PROP_0,
|
|
||||||
+ PROP_SHOW_DETAIL,
|
|
||||||
+ PROP_LAST_PROP
|
|
||||||
+};
|
|
||||||
+static GParamSpec *props[PROP_LAST_PROP];
|
|
||||||
+
|
|
||||||
+
|
|
||||||
typedef struct _PhoshBatteryInfo {
|
|
||||||
- PhoshStatusIcon parent;
|
|
||||||
- UpClient *upower;
|
|
||||||
- UpDevice *device;
|
|
||||||
+ PhoshStatusIcon parent;
|
|
||||||
+ UpClient *upower;
|
|
||||||
+ UpDevice *device;
|
|
||||||
+ gboolean show_detail;
|
|
||||||
} PhoshBatteryInfo;
|
|
||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (PhoshBatteryInfo, phosh_battery_info, PHOSH_TYPE_STATUS_ICON)
|
|
||||||
|
|
||||||
|
|
||||||
+static void
|
|
||||||
+phosh_battery_info_set_property (GObject *object,
|
|
||||||
+ guint property_id,
|
|
||||||
+ const GValue *value,
|
|
||||||
+ GParamSpec *pspec)
|
|
||||||
+{
|
|
||||||
+ PhoshBatteryInfo *self = PHOSH_BATTERY_INFO (object);
|
|
||||||
+
|
|
||||||
+ switch (property_id) {
|
|
||||||
+ case PROP_SHOW_DETAIL:
|
|
||||||
+ phosh_battery_info_set_show_detail (self, g_value_get_boolean (value));
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+phosh_battery_info_get_property (GObject *object,
|
|
||||||
+ guint property_id,
|
|
||||||
+ GValue *value,
|
|
||||||
+ GParamSpec *pspec)
|
|
||||||
+{
|
|
||||||
+ PhoshBatteryInfo *self = PHOSH_BATTERY_INFO (object);
|
|
||||||
+
|
|
||||||
+ switch (property_id) {
|
|
||||||
+ case PROP_SHOW_DETAIL:
|
|
||||||
+ g_value_set_boolean (value, self->show_detail);
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
setup_display_device (PhoshBatteryInfo *self)
|
|
||||||
{
|
|
||||||
@@ -82,6 +129,11 @@ phosh_battery_info_constructed (GObject *object)
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL);
|
|
||||||
+ g_object_bind_property (self,
|
|
||||||
+ "info",
|
|
||||||
+ phosh_status_icon_get_extra_widget (PHOSH_STATUS_ICON (self)),
|
|
||||||
+ "label",
|
|
||||||
+ G_BINDING_SYNC_CREATE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -105,12 +157,32 @@ phosh_battery_info_class_init (PhoshBatteryInfoClass *klass)
|
|
||||||
|
|
||||||
object_class->constructed = phosh_battery_info_constructed;
|
|
||||||
object_class->dispose = phosh_battery_info_dispose;
|
|
||||||
+ object_class->get_property = phosh_battery_info_get_property;
|
|
||||||
+ object_class->set_property = phosh_battery_info_set_property;
|
|
||||||
+
|
|
||||||
+ props[PROP_SHOW_DETAIL] =
|
|
||||||
+ g_param_spec_boolean (
|
|
||||||
+ "show-detail",
|
|
||||||
+ "",
|
|
||||||
+ "",
|
|
||||||
+ FALSE,
|
|
||||||
+ G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
||||||
+
|
|
||||||
+ g_object_class_install_properties (object_class, PROP_LAST_PROP, props);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
phosh_battery_info_init (PhoshBatteryInfo *self)
|
|
||||||
{
|
|
||||||
+ GtkWidget *percentage = gtk_label_new (NULL);
|
|
||||||
+ phosh_status_icon_set_extra_widget (PHOSH_STATUS_ICON (self), percentage);
|
|
||||||
+
|
|
||||||
+ g_object_bind_property (self,
|
|
||||||
+ "show-detail",
|
|
||||||
+ percentage,
|
|
||||||
+ "visible",
|
|
||||||
+ G_BINDING_SYNC_CREATE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -119,3 +191,25 @@ phosh_battery_info_new (void)
|
|
||||||
{
|
|
||||||
return g_object_new (PHOSH_TYPE_BATTERY_INFO, NULL);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+phosh_battery_info_set_show_detail (PhoshBatteryInfo *self, gboolean show)
|
|
||||||
+{
|
|
||||||
+ g_return_if_fail (PHOSH_IS_BATTERY_INFO (self));
|
|
||||||
+
|
|
||||||
+ if (self->show_detail == show)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ self->show_detail = !!show;
|
|
||||||
+ g_object_notify_by_pspec (G_OBJECT (self), props[PROP_SHOW_DETAIL]);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+gboolean
|
|
||||||
+phosh_battery_info_get_show_detail (PhoshBatteryInfo *self)
|
|
||||||
+{
|
|
||||||
+ g_return_val_if_fail (PHOSH_IS_BATTERY_INFO (self), FALSE);
|
|
||||||
+
|
|
||||||
+ return self->show_detail;
|
|
||||||
+}
|
|
||||||
diff --git a/src/batteryinfo.h b/src/batteryinfo.h
|
|
||||||
index 6d0114b6..6aef37bb 100644
|
|
||||||
--- a/src/batteryinfo.h
|
|
||||||
+++ b/src/batteryinfo.h
|
|
||||||
@@ -17,5 +17,7 @@ G_BEGIN_DECLS
|
|
||||||
G_DECLARE_FINAL_TYPE (PhoshBatteryInfo, phosh_battery_info, PHOSH, BATTERY_INFO, PhoshStatusIcon)
|
|
||||||
|
|
||||||
GtkWidget * phosh_battery_info_new (void);
|
|
||||||
+void phosh_battery_info_set_show_detail (PhoshBatteryInfo *self, gboolean show);
|
|
||||||
+gboolean phosh_battery_info_get_show_detail (PhoshBatteryInfo *self);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
||||||
|
|
||||||
From ff137645c53a9ff9125acb4a6bc8d10731e71b26 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Wed, 19 May 2021 17:48:09 +0200
|
|
||||||
Subject: [PATCH 5/6] panel: Honor show-battery-percentage
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
This allows to show the battery percentage in the top bar
|
|
||||||
|
|
||||||
Closes: https://source.puri.sm/Librem5/phosh/-/issues/268
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/panel.c | 11 +++++++++++
|
|
||||||
1 file changed, 11 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/panel.c b/src/panel.c
|
|
||||||
index 71319352..c9aaeada 100644
|
|
||||||
--- a/src/panel.c
|
|
||||||
+++ b/src/panel.c
|
|
||||||
@@ -50,10 +50,12 @@ typedef struct {
|
|
||||||
GtkWidget *lbl_clock;
|
|
||||||
GtkWidget *lbl_lang;
|
|
||||||
GtkWidget *settings; /* settings menu */
|
|
||||||
+ GtkWidget *batteryinfo;
|
|
||||||
|
|
||||||
GnomeWallClock *wall_clock;
|
|
||||||
GnomeXkbInfo *xkbinfo;
|
|
||||||
GSettings *input_settings;
|
|
||||||
+ GSettings *interface_settings;
|
|
||||||
GdkSeat *seat;
|
|
||||||
|
|
||||||
GSimpleActionGroup *actions;
|
|
||||||
@@ -344,6 +346,13 @@ phosh_panel_constructed (GObject *object)
|
|
||||||
"logout");
|
|
||||||
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), FALSE);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ priv->interface_settings = g_settings_new ("org.gnome.desktop.interface");
|
|
||||||
+ g_settings_bind (priv->interface_settings,
|
|
||||||
+ "show-battery-percentage",
|
|
||||||
+ priv->batteryinfo,
|
|
||||||
+ "show-detail",
|
|
||||||
+ G_SETTINGS_BIND_GET);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -356,6 +365,7 @@ phosh_panel_dispose (GObject *object)
|
|
||||||
g_clear_object (&priv->wall_clock);
|
|
||||||
g_clear_object (&priv->xkbinfo);
|
|
||||||
g_clear_object (&priv->input_settings);
|
|
||||||
+ g_clear_object (&priv->interface_settings);
|
|
||||||
g_clear_object (&priv->actions);
|
|
||||||
priv->seat = NULL;
|
|
||||||
|
|
||||||
@@ -380,6 +390,7 @@ phosh_panel_class_init (PhoshPanelClass *klass)
|
|
||||||
"/sm/puri/phosh/ui/top-panel.ui");
|
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, PhoshPanel, menu_power);
|
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, PhoshPanel, btn_top_panel);
|
|
||||||
+ gtk_widget_class_bind_template_child_private (widget_class, PhoshPanel, batteryinfo);
|
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, PhoshPanel, lbl_clock);
|
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, PhoshPanel, lbl_lang);
|
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, PhoshPanel, box);
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
From 1bdbfb9e3c1a86f659476017cb6210227c01d601 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Fri, 21 May 2021 12:41:41 +0200
|
|
||||||
Subject: [PATCH 1/2] po: Drop string from from jp translation
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
The translation switches %s and %d causing a crash.
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
po/ja.po | 7 -------
|
|
||||||
1 file changed, 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/po/ja.po b/po/ja.po
|
|
||||||
index a87bf11c..19710623 100644
|
|
||||||
--- a/po/ja.po
|
|
||||||
+++ b/po/ja.po
|
|
||||||
@@ -63,13 +63,6 @@ msgstr "ドック外"
|
|
||||||
msgid "Log Out"
|
|
||||||
msgstr "ログアウト"
|
|
||||||
|
|
||||||
-#: src/end-session-dialog.c:165
|
|
||||||
-#, c-format
|
|
||||||
-msgid "%s will be logged out automatically in %d second."
|
|
||||||
-msgid_plural "%s will be logged out automatically in %d seconds."
|
|
||||||
-msgstr[0] "%d秒後、%sさんは自動でログアウトされます。"
|
|
||||||
-msgstr[1] "%d秒後、%sさんは自動でログアウトされます。"
|
|
||||||
-
|
|
||||||
#: src/end-session-dialog.c:172
|
|
||||||
#, c-format
|
|
||||||
msgid "The system will power off automatically in %d second."
|
|
||||||
--
|
|
||||||
GitLab
|
|
@ -1,31 +0,0 @@
|
|||||||
From 078854ae6b15fce4d817772de521d9a226a52704 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Sun, 30 May 2021 20:37:31 +0200
|
|
||||||
Subject: [PATCH] data: Add gsd-wwan to required components
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
This makes sure it's also started in systemd mode so the PIN request
|
|
||||||
happens.
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
data/meson.build | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/data/meson.build b/data/meson.build
|
|
||||||
index 64f1cdec..a60eb7db 100644
|
|
||||||
--- a/data/meson.build
|
|
||||||
+++ b/data/meson.build
|
|
||||||
@@ -14,6 +14,7 @@ gsd_required_components = [
|
|
||||||
'org.gnome.SettingsDaemon.Sound',
|
|
||||||
'org.gnome.SettingsDaemon.UsbProtection',
|
|
||||||
'org.gnome.SettingsDaemon.Wacom',
|
|
||||||
+ 'org.gnome.SettingsDaemon.Wwan',
|
|
||||||
'org.gnome.SettingsDaemon.XSettings',
|
|
||||||
]
|
|
||||||
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
--- a/src/rotation-manager.c 2020-08-06 13:39:48.934458000 +0200
|
|
||||||
+++ b/src/rotation-manager.c 2020-08-06 13:40:52.711124361 +0200
|
|
||||||
@@ -79,11 +79,11 @@ match_orientation (PhoshRotationManager
|
|
||||||
|
|
||||||
if (!g_strcmp0 ("normal", orient)) {
|
|
||||||
transform = PHOSH_MONITOR_TRANSFORM_NORMAL;
|
|
||||||
- } else if (!g_strcmp0 ("right-up", orient)) {
|
|
||||||
+ } else if (!g_strcmp0 ("left-up", orient)) {
|
|
||||||
transform = PHOSH_MONITOR_TRANSFORM_270;
|
|
||||||
} else if (!g_strcmp0 ("bottom-up", orient)) {
|
|
||||||
transform = PHOSH_MONITOR_TRANSFORM_180;
|
|
||||||
- } else if (!g_strcmp0 ("left-up", orient)) {
|
|
||||||
+ } else if (!g_strcmp0 ("right-up", orient)) {
|
|
||||||
transform = PHOSH_MONITOR_TRANSFORM_90;
|
|
||||||
} else if (!g_strcmp0 ("undefined", orient)) {
|
|
||||||
return; /* just leave as is */
|
|
File diff suppressed because it is too large
Load Diff
@ -1,30 +0,0 @@
|
|||||||
From 1477bce780cd693614c5714103e84f6c1897b2c7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
|
|
||||||
Date: Fri, 23 Oct 2020 13:40:44 +0200
|
|
||||||
Subject: [PATCH] shell: honor configured rotation
|
|
||||||
|
|
||||||
Resetting the default transform causes the user-configured rotation to
|
|
||||||
be ignored. In cases where the transform needs to be reset, this is
|
|
||||||
already done in lockscreen manager.
|
|
||||||
---
|
|
||||||
src/shell.c | 4 ----
|
|
||||||
1 file changed, 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/shell.c b/src/shell.c
|
|
||||||
index f38bdab4..48dd4c2b 100644
|
|
||||||
--- a/src/shell.c
|
|
||||||
+++ b/src/shell.c
|
|
||||||
@@ -484,10 +484,6 @@ setup_idle_cb (PhoshShell *self)
|
|
||||||
|
|
||||||
phosh_session_register (PHOSH_APP_ID);
|
|
||||||
|
|
||||||
- /* If we start rotated, fix this up */
|
|
||||||
- if (phosh_shell_get_transform (self) != PHOSH_MONITOR_TRANSFORM_NORMAL)
|
|
||||||
- phosh_shell_set_transform (self, PHOSH_MONITOR_TRANSFORM_NORMAL);
|
|
||||||
-
|
|
||||||
priv->startup_finished = TRUE;
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,303 +0,0 @@
|
|||||||
From fa9abd53328b8a1f6d1fcab39aa0fa0de3af99b3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Tue, 10 Nov 2020 20:13:29 +0100
|
|
||||||
Subject: [PATCH 1/4] layer-surface: Add debugging when a surface goes away
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
This helps tracing the order of events
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/layersurface.c | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/src/layersurface.c b/src/layersurface.c
|
|
||||||
index 0cde3c35..5cf177fc 100644
|
|
||||||
--- a/src/layersurface.c
|
|
||||||
+++ b/src/layersurface.c
|
|
||||||
@@ -109,6 +109,7 @@ layer_surface_closed (void *data,
|
|
||||||
PhoshLayerSurfacePrivate *priv = phosh_layer_surface_get_instance_private (self);
|
|
||||||
|
|
||||||
g_return_if_fail (priv->layer_surface == surface);
|
|
||||||
+ g_debug ("Destroying layer surface '%s'", priv->namespace);
|
|
||||||
zwlr_layer_surface_v1_destroy (priv->layer_surface);
|
|
||||||
priv->layer_surface = NULL;
|
|
||||||
gtk_widget_destroy (GTK_WIDGET (self));
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
|
|
||||||
From 3f15d7658ca9dfc2e21d660ccf5620fff1bd1b89 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Wed, 11 Nov 2020 14:05:06 +0100
|
|
||||||
Subject: [PATCH 2/4] lockscreen-manager: Explain purpose
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/lockscreen-manager.c | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/lockscreen-manager.c b/src/lockscreen-manager.c
|
|
||||||
index dac21e86..52c58bb4 100644
|
|
||||||
--- a/src/lockscreen-manager.c
|
|
||||||
+++ b/src/lockscreen-manager.c
|
|
||||||
@@ -23,6 +23,10 @@
|
|
||||||
* SECTION:lockscreen-manager
|
|
||||||
* @short_description: The singleton that manages screen locking
|
|
||||||
* @Title: PhoshLockscreenManager
|
|
||||||
+ *
|
|
||||||
+ * The #PhoshLockscreenManager is responsible for putting the #PhoshLockscreen
|
|
||||||
+ * on the primary output and a #PhoshLockshield on other outputs when the session
|
|
||||||
+ * becomes idle or when invoked explicitly via phosh_lockscreen_manager_set_locked().
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* See https://people.gnome.org/~mccann/gnome-session/docs/gnome-session.html#org.gnome.SessionManager.Presence:status */
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
|
|
||||||
From e7c139c704231619ef28c93ae91bd5cc2fb82373 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Tue, 10 Nov 2020 20:39:23 +0100
|
|
||||||
Subject: [PATCH 3/4] lockscreen-manager: No need to disconnect signals from
|
|
||||||
lockscreen
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
We're about to destroy the lockscreen object a couple of lines later
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/lockscreen-manager.c | 6 +-----
|
|
||||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/lockscreen-manager.c b/src/lockscreen-manager.c
|
|
||||||
index 52c58bb4..bfd3da24 100644
|
|
||||||
--- a/src/lockscreen-manager.c
|
|
||||||
+++ b/src/lockscreen-manager.c
|
|
||||||
@@ -79,7 +79,6 @@ lockscreen_unlock_cb (PhoshLockscreenManager *self, PhoshLockscreen *lockscreen)
|
|
||||||
g_return_if_fail (PHOSH_IS_LOCKSCREEN (lockscreen));
|
|
||||||
g_return_if_fail (lockscreen == PHOSH_LOCKSCREEN (self->lockscreen));
|
|
||||||
|
|
||||||
- g_signal_handlers_disconnect_by_data (lockscreen, self);
|
|
||||||
g_signal_handlers_disconnect_by_data (monitor_manager, self);
|
|
||||||
g_clear_pointer (&self->lockscreen, phosh_cp_widget_destroy);
|
|
||||||
|
|
||||||
@@ -265,10 +264,7 @@ phosh_lockscreen_manager_dispose (GObject *object)
|
|
||||||
PhoshLockscreenManager *self = PHOSH_LOCKSCREEN_MANAGER (object);
|
|
||||||
|
|
||||||
g_clear_pointer (&self->shields, g_ptr_array_unref);
|
|
||||||
- if (self->lockscreen) {
|
|
||||||
- g_signal_handlers_disconnect_by_data (self->lockscreen, self);
|
|
||||||
- g_clear_pointer (&self->lockscreen, phosh_cp_widget_destroy);
|
|
||||||
- }
|
|
||||||
+ g_clear_pointer (&self->lockscreen, phosh_cp_widget_destroy);
|
|
||||||
g_clear_object (&self->settings);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (phosh_lockscreen_manager_parent_class)->dispose (object);
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
|
|
||||||
From 3e5e2c4a7f12b1e7bfb6fb6ea3e36b28b887cba1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Wed, 7 Oct 2020 16:25:36 +0200
|
|
||||||
Subject: [PATCH 4/4] lockscreen-manager: Move lock screen when output goes
|
|
||||||
away
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
We move the lock screen in case the monitor it's on goes away.
|
|
||||||
|
|
||||||
Closes: #385
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/lockscreen-manager.c | 99 +++++++++++++++++++++++++++++++---------
|
|
||||||
1 file changed, 78 insertions(+), 21 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/lockscreen-manager.c b/src/lockscreen-manager.c
|
|
||||||
index bfd3da24..781d131b 100644
|
|
||||||
--- a/src/lockscreen-manager.c
|
|
||||||
+++ b/src/lockscreen-manager.c
|
|
||||||
@@ -80,6 +80,7 @@ lockscreen_unlock_cb (PhoshLockscreenManager *self, PhoshLockscreen *lockscreen)
|
|
||||||
g_return_if_fail (lockscreen == PHOSH_LOCKSCREEN (self->lockscreen));
|
|
||||||
|
|
||||||
g_signal_handlers_disconnect_by_data (monitor_manager, self);
|
|
||||||
+ g_signal_handlers_disconnect_by_data (shell, self);
|
|
||||||
g_clear_pointer (&self->lockscreen, phosh_cp_widget_destroy);
|
|
||||||
|
|
||||||
/* Unlock all other outputs */
|
|
||||||
@@ -102,7 +103,7 @@ lockscreen_wakeup_output_cb (PhoshLockscreenManager *self, PhoshLockscreen *lock
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
-/* Lock a particular monitor bringing up a shield */
|
|
||||||
+/* Lock a non primary monitor bringing up a shield */
|
|
||||||
static void
|
|
||||||
lock_monitor (PhoshLockscreenManager *self,
|
|
||||||
PhoshMonitor *monitor)
|
|
||||||
@@ -114,22 +115,44 @@ lock_monitor (PhoshLockscreenManager *self,
|
|
||||||
phosh_wayland_get_zwlr_layer_shell_v1 (wl),
|
|
||||||
monitor->wl_output);
|
|
||||||
|
|
||||||
+ g_object_set_data (G_OBJECT (shield), "phosh-monitor", monitor);
|
|
||||||
+
|
|
||||||
g_ptr_array_add (self->shields, shield);
|
|
||||||
gtk_widget_show (shield);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+static void
|
|
||||||
+remove_shield_by_monitor (PhoshLockscreenManager *self,
|
|
||||||
+ PhoshMonitor *monitor)
|
|
||||||
+{
|
|
||||||
+ for (int i = 0; i < self->shields->len; i++) {
|
|
||||||
+ PhoshMonitor *shield_monitor;
|
|
||||||
+ PhoshLockshield *shield = g_ptr_array_index (self->shields, i);
|
|
||||||
+
|
|
||||||
+ shield_monitor = g_object_get_data (G_OBJECT (shield), "phosh-monitor");
|
|
||||||
+ g_return_if_fail (PHOSH_IS_MONITOR (shield_monitor));
|
|
||||||
+ if (shield_monitor == monitor) {
|
|
||||||
+ g_debug ("Removing shield %p", shield);
|
|
||||||
+ g_ptr_array_remove (self->shields, shield);
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
on_monitor_removed (PhoshLockscreenManager *self,
|
|
||||||
PhoshMonitor *monitor,
|
|
||||||
PhoshMonitorManager *monitormanager)
|
|
||||||
{
|
|
||||||
+
|
|
||||||
+
|
|
||||||
g_return_if_fail (PHOSH_IS_MONITOR (monitor));
|
|
||||||
g_return_if_fail (PHOSH_IS_LOCKSCREEN_MANAGER (self));
|
|
||||||
|
|
||||||
- g_debug ("Monitor removed");
|
|
||||||
- /* TODO: We just leave the widget dangling, it will be destroyed on
|
|
||||||
- * unlock */
|
|
||||||
+ g_debug ("Monitor '%s' removed", monitor->name);
|
|
||||||
+ remove_shield_by_monitor (self, monitor);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -141,28 +164,67 @@ on_monitor_added (PhoshLockscreenManager *self,
|
|
||||||
g_return_if_fail (PHOSH_IS_MONITOR (monitor));
|
|
||||||
g_return_if_fail (PHOSH_IS_LOCKSCREEN_MANAGER (self));
|
|
||||||
|
|
||||||
- g_debug ("Monitor added");
|
|
||||||
+ g_debug ("Monitor '%s' added", monitor->name);
|
|
||||||
lock_monitor (self, monitor);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
-lockscreen_lock (PhoshLockscreenManager *self)
|
|
||||||
+lock_primary_monitor (PhoshLockscreenManager *self)
|
|
||||||
{
|
|
||||||
PhoshMonitor *primary_monitor;
|
|
||||||
PhoshWayland *wl = phosh_wayland_get_default ();
|
|
||||||
PhoshShell *shell = phosh_shell_get_default ();
|
|
||||||
- PhoshMonitorManager *monitor_manager = phosh_shell_get_monitor_manager (shell);
|
|
||||||
-
|
|
||||||
- g_return_if_fail (!self->locked);
|
|
||||||
|
|
||||||
primary_monitor = phosh_shell_get_primary_monitor (shell);
|
|
||||||
- g_return_if_fail (primary_monitor);
|
|
||||||
|
|
||||||
/* Undo any transform on the primary display so the keypad becomes usable */
|
|
||||||
self->transform = phosh_shell_get_transform (shell);
|
|
||||||
phosh_shell_set_transform (shell, PHOSH_MONITOR_TRANSFORM_NORMAL);
|
|
||||||
|
|
||||||
+ /* The primary output gets the clock, keypad, ... */
|
|
||||||
+ self->lockscreen = PHOSH_LOCKSCREEN (phosh_lockscreen_new (
|
|
||||||
+ phosh_wayland_get_zwlr_layer_shell_v1 (wl),
|
|
||||||
+ primary_monitor->wl_output));
|
|
||||||
+
|
|
||||||
+ g_object_connect (
|
|
||||||
+ self->lockscreen,
|
|
||||||
+ "swapped-object-signal::lockscreen-unlock", G_CALLBACK (lockscreen_unlock_cb), self,
|
|
||||||
+ "swapped-object-signal::wakeup-output", G_CALLBACK (lockscreen_wakeup_output_cb), self,
|
|
||||||
+ NULL);
|
|
||||||
+
|
|
||||||
+ gtk_widget_show (GTK_WIDGET (self->lockscreen));
|
|
||||||
+ /* Old lockscreen gets remove due to `layer_surface_closed` */
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+on_primary_monitor_changed (PhoshLockscreenManager *self,
|
|
||||||
+ GParamSpec *pspec,
|
|
||||||
+ PhoshShell *shell)
|
|
||||||
+{
|
|
||||||
+ g_return_if_fail (PHOSH_IS_SHELL (shell));
|
|
||||||
+ g_return_if_fail (PHOSH_IS_LOCKSCREEN_MANAGER (self));
|
|
||||||
+
|
|
||||||
+ g_debug ("primary monitor changed, need to move lockscreen");
|
|
||||||
+ lock_primary_monitor (self);
|
|
||||||
+ /* We don't remove a shield that might exist to avoid the screen
|
|
||||||
+ content flickering in. The shield will be removed on unlock */
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+lockscreen_lock (PhoshLockscreenManager *self)
|
|
||||||
+{
|
|
||||||
+ PhoshMonitor *primary_monitor;
|
|
||||||
+ PhoshShell *shell = phosh_shell_get_default ();
|
|
||||||
+ PhoshMonitorManager *monitor_manager = phosh_shell_get_monitor_manager (shell);
|
|
||||||
+
|
|
||||||
+ g_return_if_fail (!self->locked);
|
|
||||||
+
|
|
||||||
+ primary_monitor = phosh_shell_get_primary_monitor (shell);
|
|
||||||
+ g_return_if_fail (primary_monitor);
|
|
||||||
+
|
|
||||||
/* Listen for monitor changes */
|
|
||||||
g_signal_connect_object (monitor_manager, "monitor-added",
|
|
||||||
G_CALLBACK (on_monitor_added),
|
|
||||||
@@ -174,12 +236,13 @@ lockscreen_lock (PhoshLockscreenManager *self)
|
|
||||||
self,
|
|
||||||
G_CONNECT_SWAPPED);
|
|
||||||
|
|
||||||
- /* The primary output gets the clock, keypad, ... */
|
|
||||||
- self->lockscreen = PHOSH_LOCKSCREEN (phosh_lockscreen_new (
|
|
||||||
- phosh_wayland_get_zwlr_layer_shell_v1 (wl),
|
|
||||||
- primary_monitor->wl_output));
|
|
||||||
- gtk_widget_show (GTK_WIDGET (self->lockscreen));
|
|
||||||
+ g_signal_connect_object (shell,
|
|
||||||
+ "notify::primary-monitor",
|
|
||||||
+ G_CALLBACK (on_primary_monitor_changed),
|
|
||||||
+ self,
|
|
||||||
+ G_CONNECT_SWAPPED);
|
|
||||||
|
|
||||||
+ lock_primary_monitor (self);
|
|
||||||
/* Lock all other outputs */
|
|
||||||
self->shields = g_ptr_array_new_with_free_func ((GDestroyNotify) (gtk_widget_destroy));
|
|
||||||
|
|
||||||
@@ -191,12 +254,6 @@ lockscreen_lock (PhoshLockscreenManager *self)
|
|
||||||
lock_monitor (self, monitor);
|
|
||||||
}
|
|
||||||
|
|
||||||
- g_object_connect (
|
|
||||||
- self->lockscreen,
|
|
||||||
- "swapped-object-signal::lockscreen-unlock", G_CALLBACK (lockscreen_unlock_cb), self,
|
|
||||||
- "swapped-object-signal::wakeup-output", G_CALLBACK (lockscreen_wakeup_output_cb), self,
|
|
||||||
- NULL);
|
|
||||||
-
|
|
||||||
self->locked = TRUE;
|
|
||||||
self->active_time = g_get_monotonic_time ();
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), props[PHOSH_LOCKSCREEN_MANAGER_PROP_LOCKED]);
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,261 +0,0 @@
|
|||||||
From 721d073ebbcb2ba973b21f8213af3d4cd7781110 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
|
|
||||||
Date: Tue, 27 Oct 2020 15:07:37 +0100
|
|
||||||
Subject: [PATCH 1/5] shell: add an accessor for the mode manager
|
|
||||||
|
|
||||||
Other modules should be able to query the device type too.
|
|
||||||
---
|
|
||||||
src/shell.c | 13 +++++++++++++
|
|
||||||
src/shell.h | 1 +
|
|
||||||
2 files changed, 14 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/shell.c b/src/shell.c
|
|
||||||
index 42893d44..f38bdab4 100644
|
|
||||||
--- a/src/shell.c
|
|
||||||
+++ b/src/shell.c
|
|
||||||
@@ -819,6 +819,19 @@ phosh_shell_get_lockscreen_manager (PhoshShell *self)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+PhoshModeManager *
|
|
||||||
+phosh_shell_get_mode_manager (PhoshShell *self)
|
|
||||||
+{
|
|
||||||
+ PhoshShellPrivate *priv;
|
|
||||||
+
|
|
||||||
+ g_return_val_if_fail (PHOSH_IS_SHELL (self), NULL);
|
|
||||||
+ priv = phosh_shell_get_instance_private (self);
|
|
||||||
+
|
|
||||||
+ g_return_val_if_fail (PHOSH_IS_MODE_MANAGER (priv->mode_manager), NULL);
|
|
||||||
+ return priv->mode_manager;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
PhoshMonitorManager *
|
|
||||||
phosh_shell_get_monitor_manager (PhoshShell *self)
|
|
||||||
{
|
|
||||||
diff --git a/src/shell.h b/src/shell.h
|
|
||||||
index 65680a57..541203db 100644
|
|
||||||
--- a/src/shell.h
|
|
||||||
+++ b/src/shell.h
|
|
||||||
@@ -47,6 +47,7 @@ void phosh_shell_set_primary_monitor (PhoshShell *self, PhoshMon
|
|
||||||
PhoshMonitor *phosh_shell_get_primary_monitor (PhoshShell *self);
|
|
||||||
PhoshMonitor *phosh_shell_get_builtin_monitor (PhoshShell *self);
|
|
||||||
PhoshLockscreenManager *phosh_shell_get_lockscreen_manager (PhoshShell *self);
|
|
||||||
+PhoshModeManager *phosh_shell_get_mode_manager (PhoshShell *self);
|
|
||||||
PhoshMonitorManager *phosh_shell_get_monitor_manager (PhoshShell *self);
|
|
||||||
PhoshOskManager *phosh_shell_get_osk_manager (PhoshShell *self);
|
|
||||||
PhoshToplevelManager *phosh_shell_get_toplevel_manager (PhoshShell *self);
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
|
|
||||||
From bb69665789137e9ee3391d55cd86ad7f01122790 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Fri, 13 Nov 2020 18:00:49 +0100
|
|
||||||
Subject: [PATCH 2/5] monitor: Add phosh_monitor_get_power_save_mode
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Simple getter
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/monitor/monitor.c | 12 ++++++++++++
|
|
||||||
src/monitor/monitor.h | 1 +
|
|
||||||
2 files changed, 13 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
|
|
||||||
index c7199ea8..8379c944 100644
|
|
||||||
--- a/src/monitor/monitor.c
|
|
||||||
+++ b/src/monitor/monitor.c
|
|
||||||
@@ -572,3 +572,15 @@ phosh_monitor_set_power_save_mode (PhoshMonitor *self, PhoshMonitorPowerSaveMode
|
|
||||||
|
|
||||||
zwlr_output_power_v1_set_mode (self->wlr_output_power, wl_mode);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+/**
|
|
||||||
+ * phosh_monitor_get_power_save_mode:
|
|
||||||
+ * @self: A #PhoshMonitor
|
|
||||||
+ *
|
|
||||||
+ * Returns: The current power save mode
|
|
||||||
+ */
|
|
||||||
+PhoshMonitorPowerSaveMode
|
|
||||||
+phosh_monitor_get_power_save_mode (PhoshMonitor *self)
|
|
||||||
+{
|
|
||||||
+ return self->power_mode;
|
|
||||||
+}
|
|
||||||
diff --git a/src/monitor/monitor.h b/src/monitor/monitor.h
|
|
||||||
index 7fbd4570..d7fea9cf 100644
|
|
||||||
--- a/src/monitor/monitor.h
|
|
||||||
+++ b/src/monitor/monitor.h
|
|
||||||
@@ -149,5 +149,6 @@ gboolean phosh_monitor_is_flipped (PhoshMonitor *self);
|
|
||||||
guint phosh_monitor_get_transform (PhoshMonitor *self);
|
|
||||||
void phosh_monitor_set_power_save_mode (PhoshMonitor *self,
|
|
||||||
PhoshMonitorPowerSaveMode mode);
|
|
||||||
+PhoshMonitorPowerSaveMode phosh_monitor_get_power_save_mode (PhoshMonitor *self);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
|
|
||||||
From 9f409166802e032b4f37586f88936ef9c8082d1e Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Fri, 13 Nov 2020 17:01:06 +0100
|
|
||||||
Subject: [PATCH 3/5] lockscreen-manager: Handle transform only on power mode
|
|
||||||
changes
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
This makes sure we rotate correctly when the screen unblanks and
|
|
||||||
we don't operate on disabled outputs which trips up phoc.
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/lockscreen-manager.c | 33 +++++++++++++++++++++++++++------
|
|
||||||
1 file changed, 27 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/lockscreen-manager.c b/src/lockscreen-manager.c
|
|
||||||
index 781d131b..81f562cb 100644
|
|
||||||
--- a/src/lockscreen-manager.c
|
|
||||||
+++ b/src/lockscreen-manager.c
|
|
||||||
@@ -72,14 +72,17 @@ lockscreen_unlock_cb (PhoshLockscreenManager *self, PhoshLockscreen *lockscreen)
|
|
||||||
{
|
|
||||||
PhoshShell *shell = phosh_shell_get_default ();
|
|
||||||
PhoshMonitorManager *monitor_manager = phosh_shell_get_monitor_manager (shell);
|
|
||||||
-
|
|
||||||
- phosh_shell_set_transform (shell, self->transform);
|
|
||||||
- self->transform = PHOSH_MONITOR_TRANSFORM_NORMAL;
|
|
||||||
+ PhoshMonitor *primary_monitor = phosh_shell_get_primary_monitor (shell);
|
|
||||||
|
|
||||||
g_return_if_fail (PHOSH_IS_LOCKSCREEN (lockscreen));
|
|
||||||
g_return_if_fail (lockscreen == PHOSH_LOCKSCREEN (self->lockscreen));
|
|
||||||
|
|
||||||
+ /* Fixup transform in case the lockscreen needed to rotate to unlock */
|
|
||||||
+ g_debug ("Restoring transform %d", self->transform);
|
|
||||||
+ phosh_shell_set_transform (shell, self->transform);
|
|
||||||
+
|
|
||||||
g_signal_handlers_disconnect_by_data (monitor_manager, self);
|
|
||||||
+ g_signal_handlers_disconnect_by_data (primary_monitor, self);
|
|
||||||
g_signal_handlers_disconnect_by_data (shell, self);
|
|
||||||
g_clear_pointer (&self->lockscreen, phosh_cp_widget_destroy);
|
|
||||||
|
|
||||||
@@ -168,6 +171,23 @@ on_monitor_added (PhoshLockscreenManager *self,
|
|
||||||
lock_monitor (self, monitor);
|
|
||||||
}
|
|
||||||
|
|
||||||
+static void
|
|
||||||
+on_primary_monitor_power_mode_changed (PhoshLockscreenManager *self,
|
|
||||||
+ GParamSpec *pspec,
|
|
||||||
+ PhoshMonitor *monitor)
|
|
||||||
+{
|
|
||||||
+ PhoshShell *shell = phosh_shell_get_default ();
|
|
||||||
+
|
|
||||||
+ switch (phosh_monitor_get_power_save_mode (monitor)) {
|
|
||||||
+ case PHOSH_MONITOR_POWER_SAVE_MODE_ON:
|
|
||||||
+ phosh_shell_set_transform (shell, PHOSH_MONITOR_TRANSFORM_NORMAL);
|
|
||||||
+ break;
|
|
||||||
+ case PHOSH_MONITOR_POWER_SAVE_MODE_OFF:
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ g_warn_if_reached ();
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
|
|
||||||
static void
|
|
||||||
lock_primary_monitor (PhoshLockscreenManager *self)
|
|
||||||
@@ -177,10 +197,7 @@ lock_primary_monitor (PhoshLockscreenManager *self)
|
|
||||||
PhoshShell *shell = phosh_shell_get_default ();
|
|
||||||
|
|
||||||
primary_monitor = phosh_shell_get_primary_monitor (shell);
|
|
||||||
-
|
|
||||||
- /* Undo any transform on the primary display so the keypad becomes usable */
|
|
||||||
self->transform = phosh_shell_get_transform (shell);
|
|
||||||
- phosh_shell_set_transform (shell, PHOSH_MONITOR_TRANSFORM_NORMAL);
|
|
||||||
|
|
||||||
/* The primary output gets the clock, keypad, ... */
|
|
||||||
self->lockscreen = PHOSH_LOCKSCREEN (phosh_lockscreen_new (
|
|
||||||
@@ -193,6 +210,10 @@ lock_primary_monitor (PhoshLockscreenManager *self)
|
|
||||||
"swapped-object-signal::wakeup-output", G_CALLBACK (lockscreen_wakeup_output_cb), self,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
+ g_signal_connect_swapped (primary_monitor, "notify::power-mode",
|
|
||||||
+ G_CALLBACK(on_primary_monitor_power_mode_changed),
|
|
||||||
+ self);
|
|
||||||
+
|
|
||||||
gtk_widget_show (GTK_WIDGET (self->lockscreen));
|
|
||||||
/* Old lockscreen gets remove due to `layer_surface_closed` */
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
|
|
||||||
From 6abda174169c3257230cfa5d9253e4ab83985572 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
|
|
||||||
Date: Tue, 27 Oct 2020 15:09:39 +0100
|
|
||||||
Subject: [PATCH 4/5] lockscreen-manager: undo transform only for phones
|
|
||||||
|
|
||||||
If the display is large enough to make the keypad usable even when
|
|
||||||
rotated, we should not try to rotate it back to the default orientation.
|
|
||||||
---
|
|
||||||
src/lockscreen-manager.c | 8 ++++++++
|
|
||||||
1 file changed, 8 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/lockscreen-manager.c b/src/lockscreen-manager.c
|
|
||||||
index 81f562cb..2dbc3111 100644
|
|
||||||
--- a/src/lockscreen-manager.c
|
|
||||||
+++ b/src/lockscreen-manager.c
|
|
||||||
@@ -177,6 +177,14 @@ on_primary_monitor_power_mode_changed (PhoshLockscreenManager *self,
|
|
||||||
PhoshMonitor *monitor)
|
|
||||||
{
|
|
||||||
PhoshShell *shell = phosh_shell_get_default ();
|
|
||||||
+ PhoshModeManager *mode_manager = phosh_shell_get_mode_manager(shell);
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
+ * Only phones need to switch orientation so that the lock screen fits
|
|
||||||
+ * https://source.puri.sm/Librem5/phosh/-/issues/388
|
|
||||||
+ */
|
|
||||||
+ if (phosh_mode_manager_get_device_type(mode_manager) != PHOSH_MODE_DEVICE_TYPE_PHONE)
|
|
||||||
+ return;
|
|
||||||
|
|
||||||
switch (phosh_monitor_get_power_save_mode (monitor)) {
|
|
||||||
case PHOSH_MONITOR_POWER_SAVE_MODE_ON:
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
|
|
||||||
From f2ab3ffd704ad4600ad254116829714029591ba4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Sat, 14 Nov 2020 11:32:15 +0100
|
|
||||||
Subject: [PATCH 5/5] lockscreen-manager: Don't rotate external screens
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
We keep the transform there as well assuming the lock screen fits.
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/lockscreen-manager.c | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/lockscreen-manager.c b/src/lockscreen-manager.c
|
|
||||||
index 2dbc3111..c731dae5 100644
|
|
||||||
--- a/src/lockscreen-manager.c
|
|
||||||
+++ b/src/lockscreen-manager.c
|
|
||||||
@@ -186,6 +186,10 @@ on_primary_monitor_power_mode_changed (PhoshLockscreenManager *self,
|
|
||||||
if (phosh_mode_manager_get_device_type(mode_manager) != PHOSH_MODE_DEVICE_TYPE_PHONE)
|
|
||||||
return;
|
|
||||||
|
|
||||||
+ /* Don't mess with transforms on external screens either */
|
|
||||||
+ if (!phosh_monitor_is_builtin (monitor))
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
switch (phosh_monitor_get_power_save_mode (monitor)) {
|
|
||||||
case PHOSH_MONITOR_POWER_SAVE_MODE_ON:
|
|
||||||
phosh_shell_set_transform (shell, PHOSH_MONITOR_TRANSFORM_NORMAL);
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,281 +0,0 @@
|
|||||||
From 3669f5caa68e026056dfc5359e373dbe193d4d32 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alexander Mikhaylenko <alexm@gnome.org>
|
|
||||||
Date: Mon, 16 Nov 2020 18:46:08 +0500
|
|
||||||
Subject: [PATCH 1/2] Slide back windows that failed to close
|
|
||||||
|
|
||||||
Fixes https://source.puri.sm/Librem5/phosh/-/issues/429
|
|
||||||
---
|
|
||||||
src/activity.c | 28 ++++++++++++++++++++++++++++
|
|
||||||
src/swipe-away-bin.c | 12 ++++++++++++
|
|
||||||
src/swipe-away-bin.h | 1 +
|
|
||||||
3 files changed, 41 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/activity.c b/src/activity.c
|
|
||||||
index 0d61aa79..96cbe38c 100644
|
|
||||||
--- a/src/activity.c
|
|
||||||
+++ b/src/activity.c
|
|
||||||
@@ -67,6 +67,7 @@ typedef struct
|
|
||||||
PhoshThumbnail *thumbnail;
|
|
||||||
|
|
||||||
gboolean hovering;
|
|
||||||
+ guint remove_timeout_id;
|
|
||||||
} PhoshActivityPrivate;
|
|
||||||
|
|
||||||
|
|
||||||
@@ -171,9 +172,31 @@ closed_cb (PhoshActivity *self)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+static gboolean
|
|
||||||
+remove_timeout_cb (PhoshActivity *self)
|
|
||||||
+{
|
|
||||||
+ PhoshActivityPrivate *priv = phosh_activity_get_instance_private (self);
|
|
||||||
+
|
|
||||||
+ phosh_swipe_away_bin_undo (PHOSH_SWIPE_AWAY_BIN (priv->swipe_bin));
|
|
||||||
+
|
|
||||||
+ priv->remove_timeout_id = 0;
|
|
||||||
+
|
|
||||||
+ return G_SOURCE_REMOVE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
removed_cb (PhoshActivity *self)
|
|
||||||
{
|
|
||||||
+ PhoshActivityPrivate *priv = phosh_activity_get_instance_private (self);
|
|
||||||
+
|
|
||||||
+ if (priv->remove_timeout_id)
|
|
||||||
+ g_source_remove (priv->remove_timeout_id);
|
|
||||||
+
|
|
||||||
+ priv->remove_timeout_id =
|
|
||||||
+ g_timeout_add_seconds (1, (GSourceFunc) remove_timeout_cb, self);
|
|
||||||
+ g_source_set_name_by_id (priv->remove_timeout_id, "[phosh] remove_timeout_id");
|
|
||||||
+
|
|
||||||
g_signal_emit (self, signals[CLOSED], 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -276,6 +299,11 @@ phosh_activity_dispose (GObject *object)
|
|
||||||
g_clear_object (&priv->thumbnail);
|
|
||||||
g_clear_object (&priv->info);
|
|
||||||
|
|
||||||
+ if (priv->remove_timeout_id) {
|
|
||||||
+ g_source_remove (priv->remove_timeout_id);
|
|
||||||
+ priv->remove_timeout_id = 0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
G_OBJECT_CLASS (phosh_activity_parent_class)->dispose (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/swipe-away-bin.c b/src/swipe-away-bin.c
|
|
||||||
index f38f6585..ff8be768 100644
|
|
||||||
--- a/src/swipe-away-bin.c
|
|
||||||
+++ b/src/swipe-away-bin.c
|
|
||||||
@@ -270,3 +270,15 @@ phosh_swipe_away_bin_remove (PhoshSwipeAwayBin *self)
|
|
||||||
|
|
||||||
animate (self, 200, 1);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+phosh_swipe_away_bin_undo (PhoshSwipeAwayBin *self)
|
|
||||||
+{
|
|
||||||
+ g_return_if_fail (PHOSH_IS_SWIPE_AWAY_BIN (self));
|
|
||||||
+
|
|
||||||
+ if (self->animation)
|
|
||||||
+ phosh_animation_stop (self->animation);
|
|
||||||
+
|
|
||||||
+ animate (self, 200, 0);
|
|
||||||
+}
|
|
||||||
diff --git a/src/swipe-away-bin.h b/src/swipe-away-bin.h
|
|
||||||
index ea618c3d..67930046 100644
|
|
||||||
--- a/src/swipe-away-bin.h
|
|
||||||
+++ b/src/swipe-away-bin.h
|
|
||||||
@@ -14,3 +14,4 @@
|
|
||||||
G_DECLARE_FINAL_TYPE (PhoshSwipeAwayBin, phosh_swipe_away_bin, PHOSH, SWIPE_AWAY_BIN, GtkEventBox)
|
|
||||||
|
|
||||||
void phosh_swipe_away_bin_remove (PhoshSwipeAwayBin *self);
|
|
||||||
+void phosh_swipe_away_bin_undo (PhoshSwipeAwayBin *self);
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
|
|
||||||
From 852326dcccbf9ad5ec59f6ecb93d23e1cce4f9e3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alexander Mikhaylenko <alexm@gnome.org>
|
|
||||||
Date: Mon, 16 Nov 2020 19:29:45 +0500
|
|
||||||
Subject: [PATCH 2/2] Use easeOutBounce interpolator for the slide back
|
|
||||||
animation
|
|
||||||
|
|
||||||
Make it a little fancier.
|
|
||||||
---
|
|
||||||
src/animation.c | 48 +++++++++++++++++++++++++++++++++++++++++++-
|
|
||||||
src/animation.h | 13 ++++++++++++
|
|
||||||
src/swipe-away-bin.c | 10 +++++----
|
|
||||||
3 files changed, 66 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/animation.c b/src/animation.c
|
|
||||||
index 6ba2f7ae..5770672b 100644
|
|
||||||
--- a/src/animation.c
|
|
||||||
+++ b/src/animation.c
|
|
||||||
@@ -24,6 +24,7 @@ struct _PhoshAnimation
|
|
||||||
double value_from;
|
|
||||||
double value_to;
|
|
||||||
gint64 duration;
|
|
||||||
+ PhoshAnimationType type;
|
|
||||||
|
|
||||||
gint64 start_time;
|
|
||||||
guint tick_cb_id;
|
|
||||||
@@ -43,6 +44,49 @@ set_value (PhoshAnimation *self,
|
|
||||||
|
|
||||||
#define LERP(a, b, t) (a) * (1.0 - (t)) + (b) * (t)
|
|
||||||
|
|
||||||
+/* Adapted from https://github.com/janrembold/es6-easings/blob/master/src/index.ts#L135 */
|
|
||||||
+/* TODO: Move to libhandy at some point */
|
|
||||||
+static double
|
|
||||||
+ease_out_bounce (double t)
|
|
||||||
+{
|
|
||||||
+ double p;
|
|
||||||
+
|
|
||||||
+ if (t < 1.0 / 2.75)
|
|
||||||
+ return 7.5625 * t * t;
|
|
||||||
+
|
|
||||||
+ if (t < 2.0 / 2.75) {
|
|
||||||
+ p = t - (1.5 / 2.75);
|
|
||||||
+
|
|
||||||
+ return 7.5625 * p * p + 0.75;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (t < 2.5 / 2.75) {
|
|
||||||
+ p = t - (2.25 / 2.75);
|
|
||||||
+
|
|
||||||
+ return 7.5625 * p * p + 0.9375;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ p = t - (2.625 / 2.75);
|
|
||||||
+
|
|
||||||
+ return 7.5625 * p * p + 0.984375;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static inline double
|
|
||||||
+interpolate (PhoshAnimationType type,
|
|
||||||
+ double t)
|
|
||||||
+{
|
|
||||||
+ switch (type) {
|
|
||||||
+ case PHOSH_ANIMATION_TYPE_EASE_OUT_CUBIC:
|
|
||||||
+ return hdy_ease_out_cubic (t);
|
|
||||||
+
|
|
||||||
+ case PHOSH_ANIMATION_TYPE_EASE_OUT_BOUNCE:
|
|
||||||
+ return ease_out_bounce (t);
|
|
||||||
+
|
|
||||||
+ default:
|
|
||||||
+ g_assert_not_reached ();
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static gboolean
|
|
||||||
tick_cb (GtkWidget *widget,
|
|
||||||
GdkFrameClock *frame_clock,
|
|
||||||
@@ -63,7 +107,7 @@ tick_cb (GtkWidget *widget,
|
|
||||||
return G_SOURCE_REMOVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
- set_value (self, LERP (self->value_from, self->value_to, hdy_ease_out_cubic (t)));
|
|
||||||
+ set_value (self, LERP (self->value_from, self->value_to, interpolate (self->type, t)));
|
|
||||||
|
|
||||||
return G_SOURCE_CONTINUE;
|
|
||||||
}
|
|
||||||
@@ -81,6 +125,7 @@ phosh_animation_new (GtkWidget *widget,
|
|
||||||
double from,
|
|
||||||
double to,
|
|
||||||
gint64 duration,
|
|
||||||
+ PhoshAnimationType type,
|
|
||||||
PhoshAnimationValueCallback value_cb,
|
|
||||||
PhoshAnimationDoneCallback done_cb,
|
|
||||||
gpointer user_data)
|
|
||||||
@@ -99,6 +144,7 @@ phosh_animation_new (GtkWidget *widget,
|
|
||||||
self->value_from = from;
|
|
||||||
self->value_to = to;
|
|
||||||
self->duration = duration;
|
|
||||||
+ self->type = type;
|
|
||||||
self->value_cb = value_cb;
|
|
||||||
self->done_cb = done_cb;
|
|
||||||
self->user_data = user_data;
|
|
||||||
diff --git a/src/animation.h b/src/animation.h
|
|
||||||
index 1e13791d..f474704e 100644
|
|
||||||
--- a/src/animation.h
|
|
||||||
+++ b/src/animation.h
|
|
||||||
@@ -13,6 +13,18 @@ G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define PHOSH_TYPE_ANIMATION (phosh_animation_get_type())
|
|
||||||
|
|
||||||
+/**
|
|
||||||
+ * PhoshAnimationType:
|
|
||||||
+ * @PHOSH_ANIMATION_TYPE_EASE_OUT_CUBIC: Use easeOutCubic interpolation.
|
|
||||||
+ * @PHOSH_ANIMATION_TYPE_EASE_OUT_BOUNCE: Use easeOutBounce interpolation.
|
|
||||||
+ *
|
|
||||||
+ * The animation type of #PhoshAnimationType.
|
|
||||||
+ */
|
|
||||||
+typedef enum {
|
|
||||||
+ PHOSH_ANIMATION_TYPE_EASE_OUT_CUBIC,
|
|
||||||
+ PHOSH_ANIMATION_TYPE_EASE_OUT_BOUNCE,
|
|
||||||
+} PhoshAnimationType;
|
|
||||||
+
|
|
||||||
typedef struct _PhoshAnimation PhoshAnimation;
|
|
||||||
|
|
||||||
typedef void (*PhoshAnimationValueCallback) (double value,
|
|
||||||
@@ -25,6 +37,7 @@ PhoshAnimation *phosh_animation_new (GtkWidget *widget,
|
|
||||||
double from,
|
|
||||||
double to,
|
|
||||||
gint64 duration,
|
|
||||||
+ PhoshAnimationType type,
|
|
||||||
PhoshAnimationValueCallback value_cb,
|
|
||||||
PhoshAnimationDoneCallback done_cb,
|
|
||||||
gpointer user_data);
|
|
||||||
diff --git a/src/swipe-away-bin.c b/src/swipe-away-bin.c
|
|
||||||
index ff8be768..dca4723c 100644
|
|
||||||
--- a/src/swipe-away-bin.c
|
|
||||||
+++ b/src/swipe-away-bin.c
|
|
||||||
@@ -76,13 +76,15 @@ animation_done_cb (PhoshSwipeAwayBin *self)
|
|
||||||
static void
|
|
||||||
animate (PhoshSwipeAwayBin *self,
|
|
||||||
gint64 duration,
|
|
||||||
- double to)
|
|
||||||
+ double to,
|
|
||||||
+ PhoshAnimationType type)
|
|
||||||
{
|
|
||||||
self->animation =
|
|
||||||
phosh_animation_new (GTK_WIDGET (self),
|
|
||||||
self->progress,
|
|
||||||
to,
|
|
||||||
duration,
|
|
||||||
+ type,
|
|
||||||
(PhoshAnimationValueCallback) animation_value_cb,
|
|
||||||
(PhoshAnimationDoneCallback) animation_done_cb,
|
|
||||||
self);
|
|
||||||
@@ -112,7 +114,7 @@ end_swipe_cb (PhoshSwipeAwayBin *self,
|
|
||||||
gint64 duration,
|
|
||||||
double to)
|
|
||||||
{
|
|
||||||
- animate (self, duration, to);
|
|
||||||
+ animate (self, duration, to, PHOSH_ANIMATION_TYPE_EASE_OUT_CUBIC);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -268,7 +270,7 @@ phosh_swipe_away_bin_remove (PhoshSwipeAwayBin *self)
|
|
||||||
if (self->animation)
|
|
||||||
phosh_animation_stop (self->animation);
|
|
||||||
|
|
||||||
- animate (self, 200, 1);
|
|
||||||
+ animate (self, 200, 1, PHOSH_ANIMATION_TYPE_EASE_OUT_CUBIC);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -280,5 +282,5 @@ phosh_swipe_away_bin_undo (PhoshSwipeAwayBin *self)
|
|
||||||
if (self->animation)
|
|
||||||
phosh_animation_stop (self->animation);
|
|
||||||
|
|
||||||
- animate (self, 200, 0);
|
|
||||||
+ animate (self, 600, 0, PHOSH_ANIMATION_TYPE_EASE_OUT_BOUNCE);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,392 +0,0 @@
|
|||||||
From e91c0b36899a05dfb9c95e60ccd0e28313b68e75 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Sun, 6 Dec 2020 18:46:37 +0100
|
|
||||||
Subject: [PATCH 1/2] notification: Fix phosh_notification_expires docstring
|
|
||||||
|
|
||||||
---
|
|
||||||
src/notifications/notification.c | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/notifications/notification.c b/src/notifications/notification.c
|
|
||||||
index 19ce8be8..8e5239f7 100644
|
|
||||||
--- a/src/notifications/notification.c
|
|
||||||
+++ b/src/notifications/notification.c
|
|
||||||
@@ -934,8 +934,8 @@ expired (gpointer data)
|
|
||||||
*
|
|
||||||
* Set @self to expire after @timeout (from this call)
|
|
||||||
*
|
|
||||||
- * Note doesn't close the notification, for that call
|
|
||||||
- * phosh_notification_close() is response to #PhoshNotification::expired
|
|
||||||
+ * Note: doesn't close the notification, for that call
|
|
||||||
+ * phosh_notification_close() in response to #PhoshNotification::expired
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
phosh_notification_expires (PhoshNotification *self,
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
|
|
||||||
From 8abbd9ae7efa99553a40f24da02d5e2d9c1de9f1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Sun, 6 Dec 2020 16:41:31 +0100
|
|
||||||
Subject: [PATCH 2/2] notification-content: Add close button on hover
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
This adds a close button when hovering with the mouse. Modeled like
|
|
||||||
176354a2e0b27b2508213a22bc0029eeda4dde93.
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/notifications/notification-content.c | 91 ++++++++++++
|
|
||||||
src/style.css | 7 +
|
|
||||||
src/ui/notification-content.ui | 180 ++++++++++++++---------
|
|
||||||
3 files changed, 212 insertions(+), 66 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/notifications/notification-content.c b/src/notifications/notification-content.c
|
|
||||||
index 3ea3dd2a..6cfa8ccc 100644
|
|
||||||
--- a/src/notifications/notification-content.c
|
|
||||||
+++ b/src/notifications/notification-content.c
|
|
||||||
@@ -35,12 +35,92 @@ struct _PhoshNotificationContent {
|
|
||||||
GtkWidget *lbl_body;
|
|
||||||
GtkWidget *img_image;
|
|
||||||
GtkWidget *box_actions;
|
|
||||||
+ GtkWidget *revealer;
|
|
||||||
+ GtkWidget *ev_box;
|
|
||||||
+
|
|
||||||
+ gboolean hovering;
|
|
||||||
};
|
|
||||||
typedef struct _PhoshNotificationContent PhoshNotificationContent;
|
|
||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (PhoshNotificationContent, phosh_notification_content, GTK_TYPE_LIST_BOX_ROW)
|
|
||||||
|
|
||||||
+static void
|
|
||||||
+closed_cb (PhoshNotificationContent *self)
|
|
||||||
+{
|
|
||||||
+ phosh_notification_close (self->notification, PHOSH_NOTIFICATION_REASON_CLOSED);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+set_hovering (PhoshNotificationContent *self,
|
|
||||||
+ gboolean hovering)
|
|
||||||
+{
|
|
||||||
+ if (hovering == self->hovering)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ self->hovering = hovering;
|
|
||||||
+
|
|
||||||
+ /* Revealer won't animate if not mapped, show it preemptively */
|
|
||||||
+ if (hovering)
|
|
||||||
+ gtk_widget_show (self->revealer);
|
|
||||||
+
|
|
||||||
+ gtk_revealer_set_reveal_child (GTK_REVEALER (self->revealer), hovering);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+static gboolean
|
|
||||||
+on_enter_notify_event (PhoshNotificationContent *self,
|
|
||||||
+ GdkEventCrossing *event,
|
|
||||||
+ GtkEventBox *box)
|
|
||||||
+{
|
|
||||||
+ if (event->window != gtk_widget_get_window (self->ev_box) ||
|
|
||||||
+ event->detail == GDK_NOTIFY_INFERIOR)
|
|
||||||
+ return GDK_EVENT_PROPAGATE;
|
|
||||||
+
|
|
||||||
+ /* enter-notify never happens on touch, so we don't need to check it */
|
|
||||||
+ set_hovering (self, TRUE);
|
|
||||||
+
|
|
||||||
+ return GDK_EVENT_PROPAGATE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+static gboolean
|
|
||||||
+on_leave_notify_event (PhoshNotificationContent *self,
|
|
||||||
+ GdkEventCrossing *event,
|
|
||||||
+ GtkEventBox *box)
|
|
||||||
+{
|
|
||||||
+ if (event->window != gtk_widget_get_window (self->ev_box) ||
|
|
||||||
+ event->detail == GDK_NOTIFY_INFERIOR)
|
|
||||||
+ return GDK_EVENT_PROPAGATE;
|
|
||||||
+
|
|
||||||
+ set_hovering (self, FALSE);
|
|
||||||
+
|
|
||||||
+ return GDK_EVENT_PROPAGATE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+static gboolean
|
|
||||||
+on_motion_notify_event (PhoshNotificationContent *self,
|
|
||||||
+ GdkEventMotion *event,
|
|
||||||
+ GtkEventBox *box)
|
|
||||||
+{
|
|
||||||
+ GdkDevice *source_device = gdk_event_get_source_device ((GdkEvent *) event);
|
|
||||||
+ GdkInputSource input_source = gdk_device_get_source (source_device);
|
|
||||||
+
|
|
||||||
+ if (input_source != GDK_SOURCE_TOUCHSCREEN)
|
|
||||||
+ set_hovering (self, TRUE);
|
|
||||||
+
|
|
||||||
+ return GDK_EVENT_PROPAGATE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+phosh_notification_content_unmap (GtkWidget *widget)
|
|
||||||
+{
|
|
||||||
+ set_hovering (PHOSH_NOTIFICATION_CONTENT (widget), FALSE);
|
|
||||||
+
|
|
||||||
+ GTK_WIDGET_CLASS (phosh_notification_content_parent_class)->unmap (widget);
|
|
||||||
+}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
set_image (GBinding *binding,
|
|
||||||
@@ -248,6 +328,8 @@ phosh_notification_content_class_init (PhoshNotificationContentClass *klass)
|
|
||||||
object_class->set_property = phosh_notification_content_set_property;
|
|
||||||
object_class->get_property = phosh_notification_content_get_property;
|
|
||||||
|
|
||||||
+ widget_class->unmap = phosh_notification_content_unmap;
|
|
||||||
+
|
|
||||||
/**
|
|
||||||
* PhoshNotificationContent:notification:
|
|
||||||
* @self: the #PhoshNotificationContent
|
|
||||||
@@ -271,6 +353,12 @@ phosh_notification_content_class_init (PhoshNotificationContentClass *klass)
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, PhoshNotificationContent, lbl_body);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, PhoshNotificationContent, img_image);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, PhoshNotificationContent, box_actions);
|
|
||||||
+ gtk_widget_class_bind_template_child (widget_class, PhoshNotificationContent, revealer);
|
|
||||||
+ gtk_widget_class_bind_template_child (widget_class, PhoshNotificationContent, ev_box);
|
|
||||||
+ gtk_widget_class_bind_template_callback (widget_class, closed_cb);
|
|
||||||
+ gtk_widget_class_bind_template_callback (widget_class, on_enter_notify_event);
|
|
||||||
+ gtk_widget_class_bind_template_callback (widget_class, on_leave_notify_event);
|
|
||||||
+ gtk_widget_class_bind_template_callback (widget_class, on_motion_notify_event);
|
|
||||||
|
|
||||||
gtk_widget_class_set_css_name (widget_class, "phosh-notification-content");
|
|
||||||
}
|
|
||||||
@@ -312,6 +400,9 @@ phosh_notification_content_init (PhoshNotificationContent *self)
|
|
||||||
G_ACTION_GROUP (map));
|
|
||||||
|
|
||||||
gtk_widget_init_template (GTK_WIDGET (self));
|
|
||||||
+
|
|
||||||
+ gtk_widget_add_events (GTK_WIDGET (self->ev_box),
|
|
||||||
+ GDK_ENTER_NOTIFY | GDK_LEAVE_NOTIFY | GDK_MOTION_NOTIFY);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/style.css b/src/style.css
|
|
||||||
index c279e946..4b0d6021 100644
|
|
||||||
--- a/src/style.css
|
|
||||||
+++ b/src/style.css
|
|
||||||
@@ -273,6 +273,13 @@ phosh-notification-content {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
+phosh-notification-content .close-button {
|
|
||||||
+ border-radius: 50%;
|
|
||||||
+ min-width: 24px;
|
|
||||||
+ min-height: 24px;
|
|
||||||
+ padding: 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
phosh-notification-content .message-area {
|
|
||||||
padding: 12px;
|
|
||||||
}
|
|
||||||
diff --git a/src/ui/notification-content.ui b/src/ui/notification-content.ui
|
|
||||||
index 0abe6249..db1b86e5 100644
|
|
||||||
--- a/src/ui/notification-content.ui
|
|
||||||
+++ b/src/ui/notification-content.ui
|
|
||||||
@@ -4,77 +4,125 @@
|
|
||||||
<template class="PhoshNotificationContent" parent="GtkListBoxRow">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<child>
|
|
||||||
- <object class="GtkBox">
|
|
||||||
- <property name="visible">True</property>
|
|
||||||
- <property name="valign">start</property>
|
|
||||||
- <property name="orientation">vertical</property>
|
|
||||||
- <child>
|
|
||||||
- <object class="GtkBox">
|
|
||||||
+
|
|
||||||
+ <object class="GtkEventBox" id="ev_box">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="valign">fill</property>
|
|
||||||
+ <property name="above-child">True</property>
|
|
||||||
+ <signal name="enter-notify-event" handler="on_enter_notify_event" swapped="true"/>
|
|
||||||
+ <signal name="leave-notify-event" handler="on_leave_notify_event" swapped="true"/>
|
|
||||||
+ <signal name="motion-notify-event" handler="on_motion_notify_event" swapped="true"/>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkOverlay">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
- <property name="spacing">12</property>
|
|
||||||
+ <property name="can_focus">False</property>
|
|
||||||
<child>
|
|
||||||
- <object class="GtkImage" id="img_image">
|
|
||||||
- <property name="visible">True</property>
|
|
||||||
- <property name="halign">start</property>
|
|
||||||
- <property name="valign">start</property>
|
|
||||||
- <property name="pixel_size">32</property>
|
|
||||||
- <property name="icon_name">dialog-information</property>
|
|
||||||
- <style>
|
|
||||||
- <class name="notification-image"/>
|
|
||||||
- </style>
|
|
||||||
- </object>
|
|
||||||
- </child>
|
|
||||||
- <child>
|
|
||||||
- <object class="GtkBox">
|
|
||||||
- <property name="visible">True</property>
|
|
||||||
- <property name="valign">center</property>
|
|
||||||
- <property name="orientation">vertical</property>
|
|
||||||
- <property name="spacing">2</property>
|
|
||||||
- <child>
|
|
||||||
- <object class="GtkLabel" id="lbl_summary">
|
|
||||||
+ <object class="GtkBox">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="valign">start</property>
|
|
||||||
+ <property name="orientation">vertical</property>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkBox">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
- <property name="label">Title</property>
|
|
||||||
- <property name="justify">center</property>
|
|
||||||
- <property name="ellipsize">end</property>
|
|
||||||
- <property name="single_line_mode">True</property>
|
|
||||||
- <property name="xalign">0</property>
|
|
||||||
- <attributes>
|
|
||||||
- <attribute name="weight" value="bold"/>
|
|
||||||
- </attributes>
|
|
||||||
- </object>
|
|
||||||
- </child>
|
|
||||||
- <child>
|
|
||||||
- <object class="GtkLabel" id="lbl_body">
|
|
||||||
+ <property name="spacing">12</property>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkImage" id="img_image">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="halign">start</property>
|
|
||||||
+ <property name="valign">start</property>
|
|
||||||
+ <property name="pixel_size">32</property>
|
|
||||||
+ <property name="icon_name">dialog-information</property>
|
|
||||||
+ <style>
|
|
||||||
+ <class name="notification-image"/>
|
|
||||||
+ </style>
|
|
||||||
+ </object>
|
|
||||||
+ </child>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkBox">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="valign">center</property>
|
|
||||||
+ <property name="orientation">vertical</property>
|
|
||||||
+ <property name="spacing">2</property>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkLabel" id="lbl_summary">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="label">Title</property>
|
|
||||||
+ <property name="justify">center</property>
|
|
||||||
+ <property name="ellipsize">end</property>
|
|
||||||
+ <property name="single_line_mode">True</property>
|
|
||||||
+ <property name="xalign">0</property>
|
|
||||||
+ <attributes>
|
|
||||||
+ <attribute name="weight" value="bold"/>
|
|
||||||
+ </attributes>
|
|
||||||
+ </object>
|
|
||||||
+ </child>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkLabel" id="lbl_body">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="valign">center</property>
|
|
||||||
+ <property name="label">Message</property>
|
|
||||||
+ <property name="use-markup">True</property>
|
|
||||||
+ <property name="justify">left</property>
|
|
||||||
+ <property name="wrap">True</property>
|
|
||||||
+ <property name="wrap-mode">word-char</property>
|
|
||||||
+ <property name="ellipsize">end</property>
|
|
||||||
+ <property name="lines">3</property>
|
|
||||||
+ <property name="xalign">0</property>
|
|
||||||
+ </object>
|
|
||||||
+ </child>
|
|
||||||
+ </object>
|
|
||||||
+ </child>
|
|
||||||
+ <style>
|
|
||||||
+ <class name="message-area"/>
|
|
||||||
+ </style>
|
|
||||||
+ </object>
|
|
||||||
+ </child>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkBox" id="box_actions">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
- <property name="valign">center</property>
|
|
||||||
- <property name="label">Message</property>
|
|
||||||
- <property name="use-markup">True</property>
|
|
||||||
- <property name="justify">left</property>
|
|
||||||
- <property name="wrap">True</property>
|
|
||||||
- <property name="wrap-mode">word-char</property>
|
|
||||||
- <property name="ellipsize">end</property>
|
|
||||||
- <property name="lines">3</property>
|
|
||||||
- <property name="xalign">0</property>
|
|
||||||
- </object>
|
|
||||||
- </child>
|
|
||||||
- </object>
|
|
||||||
+ <property name="orientation">vertical</property>
|
|
||||||
+ <property name="valign">end</property>
|
|
||||||
+ <style>
|
|
||||||
+ <class name="linked"/>
|
|
||||||
+ <class name="actions-area"/>
|
|
||||||
+ </style>
|
|
||||||
+ </object>
|
|
||||||
+ </child>
|
|
||||||
+ </object>
|
|
||||||
</child>
|
|
||||||
- <style>
|
|
||||||
- <class name="message-area"/>
|
|
||||||
- </style>
|
|
||||||
- </object>
|
|
||||||
- </child>
|
|
||||||
- <child>
|
|
||||||
- <object class="GtkBox" id="box_actions">
|
|
||||||
- <property name="visible">True</property>
|
|
||||||
- <property name="orientation">vertical</property>
|
|
||||||
- <property name="valign">end</property>
|
|
||||||
- <style>
|
|
||||||
- <class name="linked"/>
|
|
||||||
- <class name="actions-area"/>
|
|
||||||
- </style>
|
|
||||||
- </object>
|
|
||||||
- </child>
|
|
||||||
+ <child type="overlay">
|
|
||||||
+ <object class="GtkRevealer" id="revealer">
|
|
||||||
+ <property name="transition-type">crossfade</property>
|
|
||||||
+ <property name="visible" bind-source="revealer" bind-property="child-revealed" bind-flags="sync-create"/>
|
|
||||||
+ <property name="halign">end</property>
|
|
||||||
+ <property name="valign">start</property>
|
|
||||||
+ <property name="margin">12</property>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkButton" id="btn_close">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="can_focus">False</property>
|
|
||||||
+ <property name="receives_default">False</property>
|
|
||||||
+ <signal name="clicked" handler="closed_cb" swapped="true"/>
|
|
||||||
+ <child>
|
|
||||||
+ <object class="GtkImage" id="img_close_icon">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="can_focus">False</property>
|
|
||||||
+ <property name="icon_name">window-close-symbolic</property>
|
|
||||||
+ </object>
|
|
||||||
+ </child>
|
|
||||||
+ <style>
|
|
||||||
+ <class name="close-button"/>
|
|
||||||
+ <class name="osd"/>
|
|
||||||
+ </style>
|
|
||||||
+ </object>
|
|
||||||
+ </child>
|
|
||||||
+ </object>
|
|
||||||
+ <packing>
|
|
||||||
+ <property name="pass_through">True</property>
|
|
||||||
+ </packing>
|
|
||||||
+ </child>
|
|
||||||
+ </object>
|
|
||||||
+ </child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</template>
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,347 +0,0 @@
|
|||||||
From 849e8e5f450d5ba1fae9d8ee65b60ac693679cfd Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Tue, 8 Dec 2020 17:40:49 +0100
|
|
||||||
Subject: [PATCH 1/4] util: Add helper to munge app-id
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/util.c | 33 +++++++++++++++++++++++++++++++++
|
|
||||||
src/util.h | 1 +
|
|
||||||
2 files changed, 34 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/util.c b/src/util.c
|
|
||||||
index dd7ad50a..501179d9 100644
|
|
||||||
--- a/src/util.c
|
|
||||||
+++ b/src/util.c
|
|
||||||
@@ -58,3 +58,36 @@ phosh_clear_handler (gulong *handler, gpointer object)
|
|
||||||
*handler = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+/**
|
|
||||||
+ * phosh_munge_app_id:
|
|
||||||
+ * @app_id: the app_id
|
|
||||||
+ *
|
|
||||||
+ * Munges an app_id according to the rules used by
|
|
||||||
+ * gnome-shell, feedbackd and phoc:
|
|
||||||
+ *
|
|
||||||
+ * Returns: The munged_app id
|
|
||||||
+ */
|
|
||||||
+char *
|
|
||||||
+phosh_munge_app_id (const char *app_id)
|
|
||||||
+{
|
|
||||||
+ char *id = g_strdup (app_id);
|
|
||||||
+ int i;
|
|
||||||
+
|
|
||||||
+ if (g_str_has_suffix (id, ".desktop")) {
|
|
||||||
+ char *c = g_strrstr (id, ".desktop");
|
|
||||||
+ if (c)
|
|
||||||
+ *c = '\0';
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ g_strcanon (id,
|
|
||||||
+ "0123456789"
|
|
||||||
+ "abcdefghijklmnopqrstuvwxyz"
|
|
||||||
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
||||||
+ "-",
|
|
||||||
+ '-');
|
|
||||||
+ for (i = 0; id[i] != '\0'; i++)
|
|
||||||
+ id[i] = g_ascii_tolower (id[i]);
|
|
||||||
+
|
|
||||||
+ return id;
|
|
||||||
+}
|
|
||||||
diff --git a/src/util.h b/src/util.h
|
|
||||||
index 55f79eec..266eeef6 100644
|
|
||||||
--- a/src/util.h
|
|
||||||
+++ b/src/util.h
|
|
||||||
@@ -12,3 +12,4 @@
|
|
||||||
void phosh_cp_widget_destroy (void *widget);
|
|
||||||
char *phosh_fix_app_id (const char *app_id);
|
|
||||||
void phosh_clear_handler (gulong *handler, gpointer object);
|
|
||||||
+gchar *phosh_munge_app_id (const gchar *app_id);
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
|
|
||||||
From aecd9cdd2ae1b25b5ee4ef8490fa36b64a6c975f Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Tue, 8 Dec 2020 17:41:11 +0100
|
|
||||||
Subject: [PATCH 2/4] notification-manager: Add helper to determine if banners
|
|
||||||
should be shown
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/notifications/notify-manager.c | 43 ++++++++++++++++++++++++++++++
|
|
||||||
src/notifications/notify-manager.h | 4 +++
|
|
||||||
2 files changed, 47 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/notifications/notify-manager.c b/src/notifications/notify-manager.c
|
|
||||||
index 0911a3d6..4b380856 100644
|
|
||||||
--- a/src/notifications/notify-manager.c
|
|
||||||
+++ b/src/notifications/notify-manager.c
|
|
||||||
@@ -18,6 +18,7 @@
|
|
||||||
#include "notify-manager.h"
|
|
||||||
#include "shell.h"
|
|
||||||
#include "phosh-enums.h"
|
|
||||||
+#include "util.h"
|
|
||||||
|
|
||||||
#define NOTIFICATION_DEFAULT_TIMEOUT 5000 /* ms */
|
|
||||||
#define NOTIFICATIONS_SPEC_VERSION "1.2"
|
|
||||||
@@ -25,6 +26,10 @@
|
|
||||||
#define NOTIFICATIONS_SCHEMA_ID "org.gnome.desktop.notifications"
|
|
||||||
#define NOTIFICATIONS_KEY_SHOW_BANNERS "show-banners"
|
|
||||||
|
|
||||||
+#define NOTIFICATIONS_APP_SCHEMA_ID NOTIFICATIONS_SCHEMA_ID ".application"
|
|
||||||
+#define NOTIFICATIONS_APP_PREFIX "/org/gnome/desktop/notifications/application"
|
|
||||||
+#define NOTIFICATIONS_APP_KEY_SHOW_BANNERS "show-banners"
|
|
||||||
+
|
|
||||||
/**
|
|
||||||
* SECTION:notify-manager
|
|
||||||
* @short_description: Manages notifications
|
|
||||||
@@ -693,3 +698,41 @@ phosh_notify_manager_close_notification_by_id (PhoshNotifyManager *self,
|
|
||||||
phosh_notification_close (notification, reason);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+/**
|
|
||||||
+ * phosh_notify_manager_get_show_notfication_banner:
|
|
||||||
+ * @self: the #PhoshNotifyManager
|
|
||||||
+ * @notification: the #PhoshNotification in question
|
|
||||||
+ *
|
|
||||||
+ * Checks whether a #PhoshNotificationBanner should be displayed
|
|
||||||
+ * for the given #PhoshNotification according to current policy.
|
|
||||||
+ *
|
|
||||||
+ * Returns: %TRUE if the banner should be shown, otherwise %FALSE
|
|
||||||
+ */
|
|
||||||
+gboolean
|
|
||||||
+phosh_notify_manager_get_show_notification_banner (PhoshNotifyManager *self,
|
|
||||||
+ PhoshNotification *notification)
|
|
||||||
+{
|
|
||||||
+ g_autoptr (GSettings) settings = NULL;
|
|
||||||
+ g_autofree char *path = NULL;
|
|
||||||
+ g_autofree char *munged_id = NULL;
|
|
||||||
+ GAppInfo *app_info;
|
|
||||||
+ gboolean show;
|
|
||||||
+
|
|
||||||
+ g_return_val_if_fail (PHOSH_IS_NOTIFY_MANAGER (self), FALSE);
|
|
||||||
+
|
|
||||||
+ if (!self->show_banners)
|
|
||||||
+ return FALSE;
|
|
||||||
+
|
|
||||||
+ app_info = phosh_notification_get_app_info (notification);
|
|
||||||
+ if (!app_info)
|
|
||||||
+ return TRUE;
|
|
||||||
+
|
|
||||||
+ munged_id = phosh_munge_app_id (g_app_info_get_id(app_info));
|
|
||||||
+ path = g_strconcat (NOTIFICATIONS_APP_PREFIX, "/", munged_id, "/", NULL);
|
|
||||||
+ settings = g_settings_new_with_path (NOTIFICATIONS_APP_SCHEMA_ID, path);
|
|
||||||
+ show = g_settings_get_boolean (settings, NOTIFICATIONS_APP_KEY_SHOW_BANNERS);
|
|
||||||
+
|
|
||||||
+ g_debug ("Show banners for %s: %d", munged_id, show);
|
|
||||||
+ return show;
|
|
||||||
+}
|
|
||||||
diff --git a/src/notifications/notify-manager.h b/src/notifications/notify-manager.h
|
|
||||||
index 0f75107f..9282b685 100644
|
|
||||||
--- a/src/notifications/notify-manager.h
|
|
||||||
+++ b/src/notifications/notify-manager.h
|
|
||||||
@@ -30,4 +30,8 @@ void phosh_notify_manager_add_notification (PhoshNotifyManager
|
|
||||||
gboolean phosh_notify_manager_close_notification_by_id (PhoshNotifyManager *self,
|
|
||||||
int id,
|
|
||||||
PhoshNotificationReason reason);
|
|
||||||
+gboolean
|
|
||||||
+ phosh_notify_manager_get_show_notification_banner (
|
|
||||||
+ PhoshNotifyManager *self,
|
|
||||||
+ PhoshNotification *notification);
|
|
||||||
G_END_DECLS
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
|
|
||||||
From 1d8c7b2892dd80600f0cdabf6a86849309b9ee1b Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Tue, 8 Dec 2020 18:53:42 +0100
|
|
||||||
Subject: [PATCH 3/4] notification-manager: Keep a list of applications around
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
This allows users to configure their notification properties in
|
|
||||||
g-c-c.
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/notifications/notify-manager.c | 68 +++++++++++++++++++++++++++++-
|
|
||||||
1 file changed, 66 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/notifications/notify-manager.c b/src/notifications/notify-manager.c
|
|
||||||
index 4b380856..14c0c6b5 100644
|
|
||||||
--- a/src/notifications/notify-manager.c
|
|
||||||
+++ b/src/notifications/notify-manager.c
|
|
||||||
@@ -25,10 +25,12 @@
|
|
||||||
|
|
||||||
#define NOTIFICATIONS_SCHEMA_ID "org.gnome.desktop.notifications"
|
|
||||||
#define NOTIFICATIONS_KEY_SHOW_BANNERS "show-banners"
|
|
||||||
+#define NOTIFICATIONS_KEY_APP_CHILDREN "application-children"
|
|
||||||
|
|
||||||
#define NOTIFICATIONS_APP_SCHEMA_ID NOTIFICATIONS_SCHEMA_ID ".application"
|
|
||||||
#define NOTIFICATIONS_APP_PREFIX "/org/gnome/desktop/notifications/application"
|
|
||||||
#define NOTIFICATIONS_APP_KEY_SHOW_BANNERS "show-banners"
|
|
||||||
+#define NOTIFICATIONS_APP_KEY_APP_ID "application-id"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* SECTION:notify-manager
|
|
||||||
@@ -53,6 +55,7 @@ typedef struct _PhoshNotifyManager
|
|
||||||
guint next_id;
|
|
||||||
guint unknown_source;
|
|
||||||
gboolean show_banners;
|
|
||||||
+ GStrv app_children;
|
|
||||||
|
|
||||||
GSettings *settings;
|
|
||||||
|
|
||||||
@@ -277,6 +280,36 @@ parse_icon_string (const char *string)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+static void
|
|
||||||
+phosh_notify_manager_add_application (PhoshNotifyManager *self, GAppInfo *info)
|
|
||||||
+{
|
|
||||||
+ g_autofree char *munged_id = NULL;
|
|
||||||
+ g_autofree char *path = NULL;
|
|
||||||
+ g_autoptr (GSettings) settings = NULL;
|
|
||||||
+ g_autoptr(GPtrArray) new_apps = NULL;
|
|
||||||
+ const gchar *id;
|
|
||||||
+
|
|
||||||
+ id = g_app_info_get_id(info);
|
|
||||||
+ munged_id = phosh_munge_app_id (id);
|
|
||||||
+ if (g_strv_contains ((const gchar * const *)self->app_children, munged_id))
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ g_debug ("Adding new application: %s/%s", id, munged_id);
|
|
||||||
+ new_apps = g_ptr_array_sized_new (g_strv_length (self->app_children) + 1);
|
|
||||||
+ for (int i = 0; i < g_strv_length (self->app_children); i++) {
|
|
||||||
+ g_ptr_array_add (new_apps, self->app_children[i]);
|
|
||||||
+ }
|
|
||||||
+ g_ptr_array_add (new_apps, munged_id);
|
|
||||||
+ g_ptr_array_add (new_apps, NULL);
|
|
||||||
+
|
|
||||||
+ path = g_strconcat (NOTIFICATIONS_APP_PREFIX, "/", munged_id, "/", NULL);
|
|
||||||
+ settings = g_settings_new_with_path (NOTIFICATIONS_APP_SCHEMA_ID, path);
|
|
||||||
+ g_settings_set_string (settings, NOTIFICATIONS_APP_KEY_APP_ID, id);
|
|
||||||
+ g_settings_set_strv (self->settings, NOTIFICATIONS_KEY_APP_CHILDREN,
|
|
||||||
+ (const gchar * const *)new_apps->pdata);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static gboolean
|
|
||||||
handle_notify (PhoshNotifyDBusNotifications *skeleton,
|
|
||||||
GDBusMethodInvocation *invocation,
|
|
||||||
@@ -409,8 +442,10 @@ handle_notify (PhoshNotifyDBusNotifications *skeleton,
|
|
||||||
} else {
|
|
||||||
PhoshDBusNotification *dbus_notification;
|
|
||||||
|
|
||||||
- id = phosh_notify_manager_get_notification_id (self);
|
|
||||||
+ if (info)
|
|
||||||
+ phosh_notify_manager_add_application (self, info);
|
|
||||||
|
|
||||||
+ id = phosh_notify_manager_get_notification_id (self);
|
|
||||||
dbus_notification = phosh_dbus_notification_new (id,
|
|
||||||
app_name,
|
|
||||||
info,
|
|
||||||
@@ -460,6 +495,19 @@ on_notifications_setting_changed (PhoshNotifyManager *self,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+static void
|
|
||||||
+on_notification_apps_setting_changed (PhoshNotifyManager *self,
|
|
||||||
+ const char *key,
|
|
||||||
+ GSettings *settings)
|
|
||||||
+{
|
|
||||||
+ g_return_if_fail (PHOSH_IS_NOTIFY_MANAGER (self));
|
|
||||||
+ g_return_if_fail (G_IS_SETTINGS (settings));
|
|
||||||
+
|
|
||||||
+ g_strfreev (self->app_children);
|
|
||||||
+ self->app_children = g_settings_get_strv (settings, NOTIFICATIONS_KEY_APP_CHILDREN);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
on_name_acquired (GDBusConnection *connection,
|
|
||||||
const char *name,
|
|
||||||
@@ -508,6 +556,18 @@ phosh_notify_manager_dispose (GObject *object)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+static void
|
|
||||||
+phosh_notify_manager_finalize (GObject *object)
|
|
||||||
+{
|
|
||||||
+ PhoshNotifyManager *self = PHOSH_NOTIFY_MANAGER (object);
|
|
||||||
+
|
|
||||||
+ g_strfreev (self->app_children);
|
|
||||||
+
|
|
||||||
+ G_OBJECT_CLASS (phosh_notify_manager_parent_class)->finalize (object);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
phosh_notify_manager_constructed (GObject *object)
|
|
||||||
{
|
|
||||||
@@ -528,6 +588,10 @@ phosh_notify_manager_constructed (GObject *object)
|
|
||||||
g_signal_connect_swapped (self->settings, "changed::" NOTIFICATIONS_KEY_SHOW_BANNERS,
|
|
||||||
G_CALLBACK (on_notifications_setting_changed), self);
|
|
||||||
on_notifications_setting_changed (self, NULL, self->settings);
|
|
||||||
+
|
|
||||||
+ g_signal_connect_swapped (self->settings, "changed::" NOTIFICATIONS_KEY_APP_CHILDREN,
|
|
||||||
+ G_CALLBACK (on_notification_apps_setting_changed), self);
|
|
||||||
+ on_notification_apps_setting_changed (self, NULL, self->settings);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -538,7 +602,7 @@ phosh_notify_manager_class_init (PhoshNotifyManagerClass *klass)
|
|
||||||
|
|
||||||
object_class->constructed = phosh_notify_manager_constructed;
|
|
||||||
object_class->dispose = phosh_notify_manager_dispose;
|
|
||||||
-
|
|
||||||
+ object_class->finalize = phosh_notify_manager_finalize;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PhoshNotifyManager::new-notification:
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
|
|
||||||
From e86ce9f9706c3824c1ae3f3cd42c68f6306eacf6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Tue, 8 Dec 2020 18:54:22 +0100
|
|
||||||
Subject: [PATCH 4/4] shell: Only show banners for apps with show-banners
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/shell.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/shell.c b/src/shell.c
|
|
||||||
index 34833e6f..96152af9 100644
|
|
||||||
--- a/src/shell.c
|
|
||||||
+++ b/src/shell.c
|
|
||||||
@@ -417,7 +417,7 @@ on_new_notification (PhoshShell *self,
|
|
||||||
gtk_widget_destroy (priv->notification_banner);
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (phosh_notify_manager_get_show_banners (manager) &&
|
|
||||||
+ if (phosh_notify_manager_get_show_notification_banner (manager, notification) &&
|
|
||||||
!phosh_lockscreen_manager_get_locked (priv->lockscreen_manager) &&
|
|
||||||
phosh_panel_get_state (PHOSH_PANEL (priv->panel)) == PHOSH_PANEL_STATE_FOLDED) {
|
|
||||||
g_set_weak_pointer (&priv->notification_banner,
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,376 +0,0 @@
|
|||||||
From 88af8783a80be0871c8050a49e173d65727f2533 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Fri, 5 Mar 2021 11:30:41 +0100
|
|
||||||
Subject: [PATCH 1/5] wwan-iface: Add 'enabled' property
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
This indicates if the modem is enabled.
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/wwan/phosh-wwan-iface.c | 21 +++++++++++++++++++++
|
|
||||||
src/wwan/phosh-wwan-iface.h | 3 +++
|
|
||||||
2 files changed, 24 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/wwan/phosh-wwan-iface.c b/src/wwan/phosh-wwan-iface.c
|
|
||||||
index b2ee12d8..1fd96e6a 100644
|
|
||||||
--- a/src/wwan/phosh-wwan-iface.c
|
|
||||||
+++ b/src/wwan/phosh-wwan-iface.c
|
|
||||||
@@ -64,6 +64,14 @@ phosh_wwan_default_init (PhoshWWanInterface *iface)
|
|
||||||
FALSE,
|
|
||||||
G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY));
|
|
||||||
|
|
||||||
+ g_object_interface_install_property (
|
|
||||||
+ iface,
|
|
||||||
+ g_param_spec_boolean ("enabled",
|
|
||||||
+ "Modem enabled",
|
|
||||||
+ "Whether there modem is enabled",
|
|
||||||
+ FALSE,
|
|
||||||
+ G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY));
|
|
||||||
+
|
|
||||||
g_object_interface_install_property (
|
|
||||||
iface,
|
|
||||||
g_param_spec_string ("operator",
|
|
||||||
@@ -140,6 +148,19 @@ phosh_wwan_is_present (PhoshWWan *self)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+gboolean
|
|
||||||
+phosh_wwan_is_enabled (PhoshWWan *self)
|
|
||||||
+{
|
|
||||||
+ PhoshWWanInterface *iface;
|
|
||||||
+
|
|
||||||
+ g_return_val_if_fail (PHOSH_IS_WWAN (self), FALSE);
|
|
||||||
+
|
|
||||||
+ iface = PHOSH_WWAN_GET_IFACE (self);
|
|
||||||
+ g_return_val_if_fail (iface->is_enabled != NULL, FALSE);
|
|
||||||
+ return iface->is_enabled (self);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
const char *
|
|
||||||
phosh_wwan_get_operator (PhoshWWan *self)
|
|
||||||
{
|
|
||||||
diff --git a/src/wwan/phosh-wwan-iface.h b/src/wwan/phosh-wwan-iface.h
|
|
||||||
index eae9f55c..1e5fd201 100644
|
|
||||||
--- a/src/wwan/phosh-wwan-iface.h
|
|
||||||
+++ b/src/wwan/phosh-wwan-iface.h
|
|
||||||
@@ -20,6 +20,7 @@ G_DECLARE_INTERFACE (PhoshWWan, phosh_wwan, PHOSH, WWAN, GObject)
|
|
||||||
* @is_unlocked: whether the SIM in the modem is locked
|
|
||||||
* @has_sim: Whether there's a sim in the modem
|
|
||||||
* @is_present: whether a modem is present at all
|
|
||||||
+ * @is_enabled: whether a modem is enabled
|
|
||||||
* @get_operator: Get the current network operator name
|
|
||||||
*
|
|
||||||
* Provides an interface for interacting with a modem
|
|
||||||
@@ -34,6 +35,7 @@ struct _PhoshWWanInterface
|
|
||||||
gboolean (*is_unlocked) (PhoshWWan *self);
|
|
||||||
gboolean (*has_sim) (PhoshWWan *self);
|
|
||||||
gboolean (*is_present) (PhoshWWan *self);
|
|
||||||
+ gboolean (*is_enabled) (PhoshWWan *self);
|
|
||||||
const char* (*get_operator) (PhoshWWan *self);
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -42,4 +44,5 @@ const char* phosh_wwan_get_access_tec (PhoshWWan* self);
|
|
||||||
gboolean phosh_wwan_is_unlocked (PhoshWWan* self);
|
|
||||||
gboolean phosh_wwan_has_sim (PhoshWWan* self);
|
|
||||||
gboolean phosh_wwan_is_present (PhoshWWan* self);
|
|
||||||
+gboolean phosh_wwan_is_enabled (PhoshWWan *self);
|
|
||||||
const char *phosh_wwan_get_operator (PhoshWWan *self);
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
|
|
||||||
From fb5a00e994fb2103193a7dff26788efde9e3096d Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Fri, 5 Mar 2021 11:31:08 +0100
|
|
||||||
Subject: [PATCH 2/5] wwan-mm: Complete PhoshMMModemState
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
This matches MMModemState
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/wwan/phosh-wwan-mm.c | 10 +++++++++-
|
|
||||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/wwan/phosh-wwan-mm.c b/src/wwan/phosh-wwan-mm.c
|
|
||||||
index a5589419..ca0b1c45 100644
|
|
||||||
--- a/src/wwan/phosh-wwan-mm.c
|
|
||||||
+++ b/src/wwan/phosh-wwan-mm.c
|
|
||||||
@@ -55,7 +55,15 @@ typedef enum { /*< underscore_name=mm_modem_state >*/
|
|
||||||
MM_MODEM_STATE_UNKNOWN = 0,
|
|
||||||
MM_MODEM_STATE_INITIALIZING = 1,
|
|
||||||
MM_MODEM_STATE_LOCKED = 2,
|
|
||||||
- /* ... */
|
|
||||||
+ MM_MODEM_STATE_DISABLED = 3,
|
|
||||||
+ MM_MODEM_STATE_DISABLING = 4,
|
|
||||||
+ MM_MODEM_STATE_ENABLING = 5,
|
|
||||||
+ MM_MODEM_STATE_ENABLED = 6,
|
|
||||||
+ MM_MODEM_STATE_SEARCHING = 7,
|
|
||||||
+ MM_MODEM_STATE_REGISTERED = 8,
|
|
||||||
+ MM_MODEM_STATE_DISCONNECTING = 9,
|
|
||||||
+ MM_MODEM_STATE_CONNECTING = 10,
|
|
||||||
+ MM_MODEM_STATE_CONNECTED = 11,
|
|
||||||
} PhoshMMModemState;
|
|
||||||
|
|
||||||
enum {
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
|
|
||||||
From 1a75bcb4806897c1995dc2eebe599d3e8f1dba78 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Fri, 5 Mar 2021 11:32:45 +0100
|
|
||||||
Subject: [PATCH 3/5] wwan-mm: Handle 'enabled' property
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/wwan/phosh-wwan-mm.c | 43 ++++++++++++++++++++++++++++++++++++++++
|
|
||||||
1 file changed, 43 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/wwan/phosh-wwan-mm.c b/src/wwan/phosh-wwan-mm.c
|
|
||||||
index ca0b1c45..ec52e838 100644
|
|
||||||
--- a/src/wwan/phosh-wwan-mm.c
|
|
||||||
+++ b/src/wwan/phosh-wwan-mm.c
|
|
||||||
@@ -73,6 +73,7 @@ enum {
|
|
||||||
PHOSH_WWAN_MM_PROP_UNLOCKED,
|
|
||||||
PHOSH_WWAN_MM_PROP_SIM,
|
|
||||||
PHOSH_WWAN_MM_PROP_PRESENT,
|
|
||||||
+ PHOSH_WWAN_MM_PROP_ENABLED,
|
|
||||||
PHOSH_WWAN_MM_PROP_OPERATOR,
|
|
||||||
PHOSH_WWAN_MM_PROP_LAST_PROP,
|
|
||||||
};
|
|
||||||
@@ -96,6 +97,7 @@ typedef struct _PhoshWWanMM {
|
|
||||||
gboolean unlocked;
|
|
||||||
gboolean sim;
|
|
||||||
gboolean present;
|
|
||||||
+ gboolean enabled;
|
|
||||||
char *operator;
|
|
||||||
} PhoshWWanMM;
|
|
||||||
|
|
||||||
@@ -236,6 +238,25 @@ phosh_wwan_mm_update_present (PhoshWWanMM *self, gboolean present)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+static void
|
|
||||||
+phosh_wwan_mm_update_enabled (PhoshWWanMM *self)
|
|
||||||
+{
|
|
||||||
+ PhoshMMModemState state;
|
|
||||||
+ gboolean enabled;
|
|
||||||
+
|
|
||||||
+ g_return_if_fail (self);
|
|
||||||
+
|
|
||||||
+ state = phosh_mm_dbus_modem_get_state (self->proxy);
|
|
||||||
+
|
|
||||||
+ enabled = (state > MM_MODEM_STATE_ENABLING) ? TRUE : FALSE;
|
|
||||||
+ g_debug ("Modem is %senabled, state: %d", enabled ? "" : "not ", state);
|
|
||||||
+ if (self->enabled != enabled) {
|
|
||||||
+ self->enabled = enabled;
|
|
||||||
+ g_object_notify (G_OBJECT (self), "enabled");
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
phosh_wwan_mm_dbus_props_changed_cb (PhoshMMDBusModem *proxy,
|
|
||||||
GVariant *changed_properties,
|
|
||||||
@@ -256,6 +277,7 @@ phosh_wwan_mm_dbus_props_changed_cb (PhoshMMDBusModem *proxy,
|
|
||||||
phosh_wwan_mm_update_lock_status (self);
|
|
||||||
} else if (g_strcmp0 (property, "State") == 0) {
|
|
||||||
phosh_wwan_mm_update_lock_status (self);
|
|
||||||
+ phosh_wwan_mm_update_enabled (self);
|
|
||||||
} else if (g_strcmp0 (property, "Sim") == 0) {
|
|
||||||
phosh_wwan_mm_update_sim_status (self);
|
|
||||||
}
|
|
||||||
@@ -330,6 +352,9 @@ phosh_wwan_mm_destroy_modem (PhoshWWanMM *self)
|
|
||||||
|
|
||||||
phosh_wwan_mm_update_present (self, FALSE);
|
|
||||||
|
|
||||||
+ self->enabled = FALSE;
|
|
||||||
+ g_object_notify (G_OBJECT (self), "enabled");
|
|
||||||
+
|
|
||||||
self->signal_quality = 0;
|
|
||||||
g_object_notify (G_OBJECT (self), "signal-quality");
|
|
||||||
|
|
||||||
@@ -397,6 +422,7 @@ phosh_wwan_mm_on_proxy_new_for_bus_finish (GObject *source_object,
|
|
||||||
phosh_wwan_mm_update_lock_status (self);
|
|
||||||
phosh_wwan_mm_update_sim_status (self);
|
|
||||||
phosh_wwan_mm_update_present (self, TRUE);
|
|
||||||
+ phosh_wwan_mm_update_enabled (self);
|
|
||||||
g_object_unref (self);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -566,6 +592,9 @@ phosh_wwan_mm_class_init (PhoshWWanMMClass *klass)
|
|
||||||
g_object_class_override_property (object_class,
|
|
||||||
PHOSH_WWAN_MM_PROP_PRESENT,
|
|
||||||
"present");
|
|
||||||
+ g_object_class_override_property (object_class,
|
|
||||||
+ PHOSH_WWAN_MM_PROP_ENABLED,
|
|
||||||
+ "enabled");
|
|
||||||
g_object_class_override_property (object_class,
|
|
||||||
PHOSH_WWAN_MM_PROP_OPERATOR,
|
|
||||||
"operator");
|
|
||||||
@@ -637,6 +666,19 @@ phosh_wwan_mm_is_present (PhoshWWan *phosh_wwan)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+static gboolean
|
|
||||||
+phosh_wwan_mm_is_enabled (PhoshWWan *phosh_wwan)
|
|
||||||
+{
|
|
||||||
+ PhoshWWanMM *self;
|
|
||||||
+
|
|
||||||
+ g_return_val_if_fail (PHOSH_IS_WWAN_MM (phosh_wwan), FALSE);
|
|
||||||
+
|
|
||||||
+ self = PHOSH_WWAN_MM (phosh_wwan);
|
|
||||||
+
|
|
||||||
+ return self->enabled;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static const char *
|
|
||||||
phosh_wwan_mm_get_operator (PhoshWWan *phosh_wwan)
|
|
||||||
{
|
|
||||||
@@ -658,6 +700,7 @@ phosh_wwan_mm_interface_init (PhoshWWanInterface *iface)
|
|
||||||
iface->is_unlocked = phosh_wwan_mm_is_unlocked;
|
|
||||||
iface->has_sim = phosh_wwan_mm_has_sim;
|
|
||||||
iface->is_present = phosh_wwan_mm_is_present;
|
|
||||||
+ iface->is_enabled = phosh_wwan_mm_is_enabled;
|
|
||||||
iface->get_operator = phosh_wwan_mm_get_operator;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
|
|
||||||
From ecc3a8bff11b92f7a3608cf33913a4809533b851 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Fri, 5 Mar 2021 11:33:04 +0100
|
|
||||||
Subject: [PATCH 4/5] wwan-ofono: Handle enabled property
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
We always return TRUE here to not break existing users.
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/wwan/phosh-wwan-ofono.c | 14 ++++++++++++++
|
|
||||||
1 file changed, 14 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/wwan/phosh-wwan-ofono.c b/src/wwan/phosh-wwan-ofono.c
|
|
||||||
index 923d73aa..547590f8 100644
|
|
||||||
--- a/src/wwan/phosh-wwan-ofono.c
|
|
||||||
+++ b/src/wwan/phosh-wwan-ofono.c
|
|
||||||
@@ -30,6 +30,7 @@ enum {
|
|
||||||
PHOSH_WWAN_OFONO_PROP_UNLOCKED,
|
|
||||||
PHOSH_WWAN_OFONO_PROP_SIM,
|
|
||||||
PHOSH_WWAN_OFONO_PROP_PRESENT,
|
|
||||||
+ PHOSH_WWAN_OFONO_PROP_ENABLED,
|
|
||||||
PHOSH_WWAN_OFONO_PROP_OPERATOR,
|
|
||||||
PHOSH_WWAN_OFONO_PROP_LAST_PROP,
|
|
||||||
};
|
|
||||||
@@ -622,6 +623,9 @@ phosh_wwan_ofono_class_init (PhoshWWanOfonoClass *klass)
|
|
||||||
g_object_class_override_property (object_class,
|
|
||||||
PHOSH_WWAN_OFONO_PROP_PRESENT,
|
|
||||||
"present");
|
|
||||||
+ g_object_class_override_property (object_class,
|
|
||||||
+ PHOSH_WWAN_OFONO_PROP_ENABLED,
|
|
||||||
+ "enabled");
|
|
||||||
g_object_class_override_property (object_class,
|
|
||||||
PHOSH_WWAN_OFONO_PROP_OPERATOR,
|
|
||||||
"operator");
|
|
||||||
@@ -693,6 +697,15 @@ phosh_wwan_ofono_is_present (PhoshWWan *phosh_wwan)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+static gboolean
|
|
||||||
+phosh_wwan_ofono_is_enabled (PhoshWWan *phosh_wwan)
|
|
||||||
+{
|
|
||||||
+ g_return_val_if_fail (PHOSH_IS_WWAN_OFONO (phosh_wwan), FALSE);
|
|
||||||
+
|
|
||||||
+ return TRUE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static const char *
|
|
||||||
phosh_wwan_ofono_get_operator (PhoshWWan *phosh_wwan)
|
|
||||||
{
|
|
||||||
@@ -714,6 +727,7 @@ phosh_wwan_ofono_interface_init (PhoshWWanInterface *iface)
|
|
||||||
iface->is_unlocked = phosh_wwan_ofono_is_unlocked;
|
|
||||||
iface->has_sim = phosh_wwan_ofono_has_sim;
|
|
||||||
iface->is_present = phosh_wwan_ofono_is_present;
|
|
||||||
+ iface->is_enabled = phosh_wwan_ofono_is_enabled;
|
|
||||||
iface->get_operator = phosh_wwan_ofono_get_operator;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
|
|
||||||
From 8a56699ceb46e06c94061d5988c0968817ba0058 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
|
|
||||||
Date: Fri, 5 Mar 2021 11:33:36 +0100
|
|
||||||
Subject: [PATCH 5/5] wwaninfo: Correctly indicate disabled state
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
So far we used the signal-strength 0 icon which is confusing.
|
|
||||||
|
|
||||||
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
|
|
||||||
---
|
|
||||||
src/wwaninfo.c | 13 ++++++++-----
|
|
||||||
1 file changed, 8 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/wwaninfo.c b/src/wwaninfo.c
|
|
||||||
index 1abe4d2a..d473af18 100644
|
|
||||||
--- a/src/wwaninfo.c
|
|
||||||
+++ b/src/wwaninfo.c
|
|
||||||
@@ -110,7 +110,7 @@ update_icon_data(PhoshWWanInfo *self, GParamSpec *psepc, PhoshWWan *wwan)
|
|
||||||
guint quality;
|
|
||||||
const char *icon_name = NULL;
|
|
||||||
const char *access_tec;
|
|
||||||
- gboolean present;
|
|
||||||
+ gboolean present, enabled;
|
|
||||||
|
|
||||||
g_return_if_fail (PHOSH_IS_WWAN_INFO (self));
|
|
||||||
present = phosh_wwan_is_present (self->wwan);
|
|
||||||
@@ -122,13 +122,15 @@ update_icon_data(PhoshWWanInfo *self, GParamSpec *psepc, PhoshWWan *wwan)
|
|
||||||
|
|
||||||
access_tec_widget = phosh_status_icon_get_extra_widget (PHOSH_STATUS_ICON (self));
|
|
||||||
|
|
||||||
+ enabled = phosh_wwan_is_enabled (self->wwan);
|
|
||||||
if (!present) {
|
|
||||||
- icon_name = ("network-cellular-disabled-symbolic");
|
|
||||||
- } else if (!phosh_wwan_has_sim (self->wwan)) /* SIM missing */
|
|
||||||
+ icon_name = "network-cellular-disabled-symbolic";
|
|
||||||
+ } else if (!phosh_wwan_has_sim (self->wwan)) {
|
|
||||||
icon_name = "auth-sim-missing-symbolic";
|
|
||||||
- else { /* SIM unlock required */
|
|
||||||
- if (!phosh_wwan_is_unlocked (self->wwan))
|
|
||||||
+ } else if (!phosh_wwan_is_unlocked (self->wwan)) {
|
|
||||||
icon_name = "auth-sim-locked-symbolic";
|
|
||||||
+ } else if (!enabled) {
|
|
||||||
+ icon_name = "network-cellular-disabled-symbolic";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (icon_name) {
|
|
||||||
@@ -191,6 +193,7 @@ phosh_wwan_info_constructed (GObject *object)
|
|
||||||
"notify::unlocked",
|
|
||||||
"notify::sim",
|
|
||||||
"notify::present",
|
|
||||||
+ "notify::enabled",
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
From 41867cdcb20661ae11ac7f85eb367685978fcf59 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mohammed Sadiq <sadiq@sadiqpk.org>
|
|
||||||
Date: Wed, 28 Apr 2021 12:30:49 +0530
|
|
||||||
Subject: [PATCH] top-panel: Update power button and popover styles to match
|
|
||||||
design
|
|
||||||
|
|
||||||
---
|
|
||||||
src/ui/top-panel.ui | 6 ++++++
|
|
||||||
1 file changed, 6 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/ui/top-panel.ui b/src/ui/top-panel.ui
|
|
||||||
index 5dd7ca7a..9135b053 100644
|
|
||||||
--- a/src/ui/top-panel.ui
|
|
||||||
+++ b/src/ui/top-panel.ui
|
|
||||||
@@ -3,6 +3,9 @@
|
|
||||||
<interface>
|
|
||||||
<requires lib="gtk+" version="3.20"/>
|
|
||||||
<object class="GtkPopoverMenu" id="menu_power">
|
|
||||||
+ <style>
|
|
||||||
+ <class name="osd"/>
|
|
||||||
+ </style>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
@@ -260,8 +263,11 @@
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="popover">menu_power</property>
|
|
||||||
+ <property name="width-request">32</property>
|
|
||||||
+ <property name="height-request">32</property>
|
|
||||||
<style>
|
|
||||||
<class name="phosh-power-button"/>
|
|
||||||
+ <class name="circular"/>
|
|
||||||
</style>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
@ -1,234 +0,0 @@
|
|||||||
diff -Npur phosh.orig/src/flashlightinfo.c phosh/src/flashlightinfo.c
|
|
||||||
--- phosh.orig/src/flashlightinfo.c 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ phosh/src/flashlightinfo.c 2020-10-18 18:07:27.590688070 +0200
|
|
||||||
@@ -0,0 +1,86 @@
|
|
||||||
+/*
|
|
||||||
+ * Author: clover <m.alexanderrobinson@yahoo.com>
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#define G_LOG_DOMAIN "phosh-flashlightinfo"
|
|
||||||
+
|
|
||||||
+#include "config.h"
|
|
||||||
+
|
|
||||||
+#include "flashlightinfo.h"
|
|
||||||
+#include "shell.h"
|
|
||||||
+#include <fcntl.h>
|
|
||||||
+
|
|
||||||
+#define FLASH_SYSFS_PATH "/sys/devices/platform/led-controller/leds/white:flash/brightness"
|
|
||||||
+
|
|
||||||
+/**
|
|
||||||
+ * SECTION:flashlightinfo
|
|
||||||
+ * @short_description: A widget to display the flashlight status
|
|
||||||
+ * @Title: PhoshFlashlightInfo
|
|
||||||
+ *
|
|
||||||
+ * Flashlight Info widget
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+ typedef struct _PhoshFlashlightInfo {
|
|
||||||
+ PhoshStatusIcon parent;
|
|
||||||
+} PhoshFlashlightInfo;
|
|
||||||
+
|
|
||||||
+int flashlight_status;
|
|
||||||
+G_DEFINE_TYPE (PhoshFlashlightInfo, phosh_flashlight_info, PHOSH_TYPE_STATUS_ICON)
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+toggle_flashlight(int status)
|
|
||||||
+{
|
|
||||||
+ int fd = open(FLASH_SYSFS_PATH, O_WRONLY);
|
|
||||||
+ if (fd < 0)
|
|
||||||
+ {
|
|
||||||
+ // Unable to open file
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ write(fd, status ? "1" : "0", 1);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+set_flashlight_status(int new_status)
|
|
||||||
+{
|
|
||||||
+ toggle_flashlight(new_status);
|
|
||||||
+ flashlight_status = new_status;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int
|
|
||||||
+get_flashlight_status(void)
|
|
||||||
+{
|
|
||||||
+ return flashlight_status;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+phosh_flashlight_info_finalize (GObject *object)
|
|
||||||
+{
|
|
||||||
+ PhoshFlashlightInfo *self = PHOSH_FLASHLIGHT_INFO(object);
|
|
||||||
+
|
|
||||||
+ // possibly can remove
|
|
||||||
+ g_signal_handlers_disconnect_by_data (phosh_shell_get_default (), self);
|
|
||||||
+
|
|
||||||
+ G_OBJECT_CLASS (phosh_flashlight_info_parent_class)->finalize (object);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+phosh_flashlight_info_class_init (PhoshFlashlightInfoClass *klass)
|
|
||||||
+{
|
|
||||||
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
|
||||||
+ object_class->finalize = phosh_flashlight_info_finalize;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+phosh_flashlight_info_init (PhoshFlashlightInfo *self)
|
|
||||||
+{
|
|
||||||
+ phosh_status_icon_set_icon_name (PHOSH_STATUS_ICON (self), "torch-disabled-symbolic");
|
|
||||||
+ phosh_status_icon_set_info (PHOSH_STATUS_ICON (self), "Off");
|
|
||||||
+ set_flashlight_status(0);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+GtkWidget *
|
|
||||||
+phosh_flashlight_info_new (void)
|
|
||||||
+{
|
|
||||||
+ return g_object_new (PHOSH_TYPE_FLASHLIGHT_INFO, NULL);
|
|
||||||
+}
|
|
||||||
\ No newline at end of file
|
|
||||||
diff -Npur phosh.orig/src/flashlightinfo.h phosh/src/flashlightinfo.h
|
|
||||||
--- phosh.orig/src/flashlightinfo.h 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ phosh/src/flashlightinfo.h 2020-10-18 18:07:12.934021548 +0200
|
|
||||||
@@ -0,0 +1,20 @@
|
|
||||||
+/*
|
|
||||||
+ *
|
|
||||||
+ * SPDX-License-Identifier: GPL-3.0+
|
|
||||||
+ */
|
|
||||||
+#pragma once
|
|
||||||
+
|
|
||||||
+#include <gtk/gtk.h>
|
|
||||||
+#include "status-icon.h"
|
|
||||||
+
|
|
||||||
+G_BEGIN_DECLS
|
|
||||||
+
|
|
||||||
+#define PHOSH_TYPE_FLASHLIGHT_INFO (phosh_flashlight_info_get_type())
|
|
||||||
+
|
|
||||||
+G_DECLARE_FINAL_TYPE (PhoshFlashlightInfo, phosh_flashlight_info, PHOSH, FLASHLIGHT_INFO, PhoshStatusIcon)
|
|
||||||
+
|
|
||||||
+GtkWidget * phosh_flashlight_info_new (void);
|
|
||||||
+void set_flashlight_status (int);
|
|
||||||
+int get_flashlight_status (void);
|
|
||||||
+
|
|
||||||
+G_END_DECLS
|
|
||||||
\ No newline at end of file
|
|
||||||
diff -Npur phosh.orig/src/meson.build phosh/src/meson.build
|
|
||||||
--- phosh.orig/src/meson.build 2020-10-18 18:06:42.687355000 +0200
|
|
||||||
+++ phosh/src/meson.build 2020-10-18 18:07:18.194021496 +0200
|
|
||||||
@@ -126,6 +126,8 @@ libphosh_sources = [
|
|
||||||
'proximity.c',
|
|
||||||
'sensor-proxy-manager.c',
|
|
||||||
'sensor-proxy-manager.h',
|
|
||||||
+ 'flashlightinfo.c',
|
|
||||||
+ 'flashlightinfo.h',
|
|
||||||
'rotateinfo.c',
|
|
||||||
'rotateinfo.h',
|
|
||||||
'screen-saver-manager.c',
|
|
||||||
diff -Npur phosh.orig/src/settings.c phosh/src/settings.c
|
|
||||||
--- phosh.orig/src/settings.c 2020-10-18 18:06:42.690688000 +0200
|
|
||||||
+++ phosh/src/settings.c 2020-10-18 18:07:23.400688118 +0200
|
|
||||||
@@ -23,10 +23,12 @@
|
|
||||||
#include "rotateinfo.h"
|
|
||||||
#include "feedbackinfo.h"
|
|
||||||
#include "feedback-manager.h"
|
|
||||||
+#include "flashlightinfo.h"
|
|
||||||
#include "notifications/notify-manager.h"
|
|
||||||
#include "notifications/notification-frame.h"
|
|
||||||
#include "media-player.h"
|
|
||||||
#include "keyboard-events.h"
|
|
||||||
+#include <stdbool.h>
|
|
||||||
|
|
||||||
#include <pulse/pulseaudio.h>
|
|
||||||
#include "gvc-mixer-control.h"
|
|
||||||
@@ -72,6 +74,9 @@ typedef struct _PhoshSettings
|
|
||||||
GtkWidget *list_notifications;
|
|
||||||
GtkWidget *sw_notifications;
|
|
||||||
LfbEvent *notify_event;
|
|
||||||
+
|
|
||||||
+ /* Flashlight */
|
|
||||||
+ GtkWidget *flashlightinfo;
|
|
||||||
} PhoshSettings;
|
|
||||||
|
|
||||||
|
|
||||||
@@ -123,6 +128,26 @@ feedback_setting_clicked_cb (PhoshSettin
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
+flashlight_setting_clicked_cb (PhoshSettings *self)
|
|
||||||
+{
|
|
||||||
+ bool currently_on = get_flashlight_status() == 1;
|
|
||||||
+ bool currently_off = get_flashlight_status() == 0;
|
|
||||||
+
|
|
||||||
+ if (currently_on)
|
|
||||||
+ {
|
|
||||||
+ phosh_status_icon_set_icon_name(PHOSH_STATUS_ICON (self->flashlightinfo), "torch-disabled-symbolic");
|
|
||||||
+ phosh_status_icon_set_info (PHOSH_STATUS_ICON (self->flashlightinfo), "Off");
|
|
||||||
+ set_flashlight_status(0);
|
|
||||||
+ }
|
|
||||||
+ if (currently_off)
|
|
||||||
+ {
|
|
||||||
+ phosh_status_icon_set_icon_name(PHOSH_STATUS_ICON (self->flashlightinfo), "torch-enabled-symbolic");
|
|
||||||
+ phosh_status_icon_set_info (PHOSH_STATUS_ICON (self->flashlightinfo), "On");
|
|
||||||
+ set_flashlight_status(1);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
wifi_setting_clicked_cb (PhoshSettings *self)
|
|
||||||
{
|
|
||||||
phosh_quick_setting_open_settings_panel ("wifi");
|
|
||||||
@@ -499,7 +524,6 @@ phosh_settings_finalize (GObject *object
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
-
|
|
||||||
static void
|
|
||||||
phosh_settings_class_init (PhoshSettingsClass *klass)
|
|
||||||
{
|
|
||||||
@@ -520,6 +544,7 @@ phosh_settings_class_init (PhoshSettings
|
|
||||||
g_type_ensure (PHOSH_TYPE_BT_INFO);
|
|
||||||
g_type_ensure (PHOSH_TYPE_DOCKED_INFO);
|
|
||||||
g_type_ensure (PHOSH_TYPE_FEEDBACK_INFO);
|
|
||||||
+ g_type_ensure (PHOSH_TYPE_FLASHLIGHT_INFO);
|
|
||||||
g_type_ensure (PHOSH_TYPE_MEDIA_PLAYER);
|
|
||||||
g_type_ensure (PHOSH_TYPE_QUICK_SETTING);
|
|
||||||
g_type_ensure (PHOSH_TYPE_ROTATE_INFO);
|
|
||||||
@@ -530,6 +555,7 @@ phosh_settings_class_init (PhoshSettings
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, PhoshSettings, quick_settings);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, PhoshSettings, scale_brightness);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, PhoshSettings, sw_notifications);
|
|
||||||
+ gtk_widget_class_bind_template_child (widget_class, PhoshSettings, flashlightinfo);
|
|
||||||
|
|
||||||
gtk_widget_class_bind_template_callback (widget_class, battery_setting_clicked_cb);
|
|
||||||
gtk_widget_class_bind_template_callback (widget_class, bt_setting_clicked_cb);
|
|
||||||
@@ -538,6 +564,7 @@ phosh_settings_class_init (PhoshSettings
|
|
||||||
gtk_widget_class_bind_template_callback (widget_class, feedback_setting_long_pressed_cb);
|
|
||||||
gtk_widget_class_bind_template_callback (widget_class, on_media_player_raised);
|
|
||||||
gtk_widget_class_bind_template_callback (widget_class, rotation_setting_clicked_cb);
|
|
||||||
+ gtk_widget_class_bind_template_callback (widget_class, flashlight_setting_clicked_cb);
|
|
||||||
gtk_widget_class_bind_template_callback (widget_class, torch_setting_clicked_cb);
|
|
||||||
gtk_widget_class_bind_template_callback (widget_class, wifi_setting_clicked_cb);
|
|
||||||
gtk_widget_class_bind_template_callback (widget_class, wwan_setting_clicked_cb);
|
|
||||||
diff -Npur phosh.orig/src/ui/settings-menu.ui phosh/src/ui/settings-menu.ui
|
|
||||||
--- phosh.orig/src/ui/settings-menu.ui 2020-10-18 18:06:42.700688000 +0200
|
|
||||||
+++ phosh/src/ui/settings-menu.ui 2020-10-18 18:07:23.400688118 +0200
|
|
||||||
@@ -120,13 +120,13 @@
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
- <object class="PhoshQuickSetting" id="torch_quick_setting">
|
|
||||||
+ <object class="PhoshQuickSetting">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
- <property name="sensitive" bind-source="torchinfo" bind-property="present" bind-flags="sync-create"/>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
- <signal name="clicked" handler="torch_setting_clicked_cb" object="PhoshSettings" swapped="yes"/>
|
|
||||||
+ <signal name="clicked" handler="flashlight_setting_clicked_cb" object="PhoshSettings" swapped="yes"/>
|
|
||||||
+
|
|
||||||
<child>
|
|
||||||
- <object class="PhoshTorchInfo" id="torchinfo">
|
|
||||||
+ <object class="PhoshFlashlightInfo" id="flashlightinfo">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="icon-size">GTK_ICON_SIZE_LARGE_TOOLBAR</property>
|
|
@ -1,5 +0,0 @@
|
|||||||
#%PAM-1.0
|
|
||||||
|
|
||||||
auth include system-local-login
|
|
||||||
account include system-local-login
|
|
||||||
session include system-local-login
|
|
@ -1,52 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Phosh, a shell for mobile phones
|
|
||||||
Documentation=https://source.puri.sm/Librem5/phosh
|
|
||||||
|
|
||||||
# Make sure we are started after logins are permitted.
|
|
||||||
After=systemd-user-sessions.service
|
|
||||||
# If Plymouth is used, we want to start when it is on its way out.
|
|
||||||
After=plymouth-quit-wait.service
|
|
||||||
|
|
||||||
# D-Bus is necessary for contacting logind. Logind is required.
|
|
||||||
Wants=dbus.socket
|
|
||||||
After=dbus.socket
|
|
||||||
|
|
||||||
# This scope is created by pam_systemd when logging in as the user.
|
|
||||||
# This directive is a workaround to a systemd bug, where the setup of the
|
|
||||||
# user session by PAM has some race condition, possibly leading to a failure.
|
|
||||||
# See README for more details.
|
|
||||||
After=session-c1.scope
|
|
||||||
|
|
||||||
# Since we are part of the graphical session, make sure we are started before
|
|
||||||
# it is complete.
|
|
||||||
Before=graphical.target
|
|
||||||
|
|
||||||
# Prevent starting on systems without virtual consoles
|
|
||||||
ConditionPathExists=/dev/tty0
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/bin/phosh
|
|
||||||
TimeoutStartSec=30
|
|
||||||
User=1000
|
|
||||||
PAMName=login
|
|
||||||
WorkingDirectory=~
|
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5s
|
|
||||||
|
|
||||||
# A virtual terminal is needed.
|
|
||||||
TTYPath=/dev/tty7
|
|
||||||
TTYReset=yes
|
|
||||||
TTYVHangup=yes
|
|
||||||
TTYVTDisallocate=yes
|
|
||||||
|
|
||||||
# Fail to start if not controlling the tty.
|
|
||||||
StandardInput=tty-fail
|
|
||||||
StandardOutput=journal
|
|
||||||
StandardError=journal
|
|
||||||
|
|
||||||
# Log this user with utmp, letting it show up with commands 'w' and 'who'.
|
|
||||||
UtmpIdentifier=tty7
|
|
||||||
UtmpMode=user
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=graphical.target
|
|
@ -1,12 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Type=Application
|
|
||||||
Name=On-screen keyboard
|
|
||||||
Comment=Default on-screen keyboard
|
|
||||||
Exec=/usr/bin/osk-wayland
|
|
||||||
Categories=GNOME;Core;
|
|
||||||
OnlyShowIn=GNOME;
|
|
||||||
NoDisplay=true
|
|
||||||
X-GNOME-Autostart-Phase=Panel
|
|
||||||
X-GNOME-Provides=inputmethod
|
|
||||||
X-GNOME-Autostart-Notify=true
|
|
||||||
X-GNOME-AutoRestart=true
|
|
@ -1,79 +0,0 @@
|
|||||||
# Copyright 2020 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
|
|
||||||
inherit pam vala meson git-r3 gnome2-utils systemd readme.gentoo-r1 xdg
|
|
||||||
|
|
||||||
KEYWORDS="~amd64 ~arm64"
|
|
||||||
|
|
||||||
EGIT_REPO_URI="https://source.puri.sm/Librem5/phosh.git"
|
|
||||||
if [[ ${PV} != 9999 ]]; then
|
|
||||||
#EGIT_COMMIT="tags/v${PV}"
|
|
||||||
EGIT_COMMIT="2ca82ddbe6d08524d9153be7275db983c78a1053"
|
|
||||||
else
|
|
||||||
KEYWORDS=""
|
|
||||||
fi
|
|
||||||
EGIT_SUBMODULES=("subprojects/gvc")
|
|
||||||
|
|
||||||
DESCRIPTION="A pure Wayland shell prototype for GNOME on mobile devices"
|
|
||||||
HOMEPAGE="https://source.puri.sm/Librem5/phosh"
|
|
||||||
|
|
||||||
LICENSE="GPL-3"
|
|
||||||
SLOT="0"
|
|
||||||
|
|
||||||
DEPEND="
|
|
||||||
app-crypt/gcr
|
|
||||||
dev-libs/feedbackd
|
|
||||||
media-sound/pulseaudio
|
|
||||||
>=gui-libs/libhandy-1.1.90
|
|
||||||
net-misc/networkmanager
|
|
||||||
gnome-base/gnome-desktop
|
|
||||||
gnome-base/gnome-session
|
|
||||||
x11-themes/gnome-backgrounds
|
|
||||||
x11-wm/phoc
|
|
||||||
sys-apps/systemd
|
|
||||||
sys-power/upower
|
|
||||||
"
|
|
||||||
RDEPEND="${DEPEND}"
|
|
||||||
BDEPEND="
|
|
||||||
dev-util/ctags
|
|
||||||
dev-util/meson
|
|
||||||
"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
${FILESDIR}/0001-system-prompt-allow-blank-passwords.patch
|
|
||||||
${FILESDIR}/0002-fix-locale-issue.patch
|
|
||||||
${FILESDIR}/0003-fix-locale-issue-in-service-file.patch
|
|
||||||
${FILESDIR}/777.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
eapply_user
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
default
|
|
||||||
meson_src_install
|
|
||||||
newpamd "${FILESDIR}"/pam_phosh 'phosh'
|
|
||||||
systemd_newunit "${FILESDIR}"/phosh.service 'phosh.service'
|
|
||||||
insinto /usr/share/applications/
|
|
||||||
doins "${FILESDIR}"/sm.puri.OSK0.desktop
|
|
||||||
|
|
||||||
DOC_CONTENTS="To amend the existing password policy please see the man 5 passwdqc.conf
|
|
||||||
page and then edit the /etc/security/passwdqc.conf file to change enforce=none
|
|
||||||
to allow use digit only password as phosh only support passcode for now"
|
|
||||||
readme.gentoo_create_doc
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
xdg_pkg_postinst
|
|
||||||
gnome2_schemas_update
|
|
||||||
readme.gentoo_print_elog
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
xdg_pkg_postrm
|
|
||||||
gnome2_schemas_update
|
|
||||||
}
|
|
45
net-im/chatty/chatty-0.3.1.ebuild
Normal file
45
net-im/chatty/chatty-0.3.1.ebuild
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Copyright 2020 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
inherit meson gnome2-utils xdg git-r3
|
||||||
|
|
||||||
|
DESCRIPTION="Messaging client"
|
||||||
|
HOMEPAGE="https://source.puri.sm/Librem5/chatty"
|
||||||
|
EGIT_REPO_URI="https://source.puri.sm/Librem5/${PN}.git"
|
||||||
|
|
||||||
|
LICENSE="GPL-3"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE=""
|
||||||
|
KEYWORDS="~amd64 ~arm64 ~arm ~x86"
|
||||||
|
|
||||||
|
if [[ ${PV} != 9999 ]]; then
|
||||||
|
#EGIT_COMMIT="tags/v${PV}"
|
||||||
|
EGIT_COMMIT="6355b74eccf52c902b43f5d3445e9091ecb8d38a"
|
||||||
|
else
|
||||||
|
KEYWORDS=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
DEPEND="gnome-extra/evolution-data-server[phonenumber]
|
||||||
|
dev-libs/feedbackd
|
||||||
|
gui-libs/libhandy
|
||||||
|
x11-plugins/purple-mm-sms
|
||||||
|
dev-libs/olm
|
||||||
|
dev-libs/libphonenumber
|
||||||
|
x11-libs/gtk+:3
|
||||||
|
net-im/jabber-base
|
||||||
|
"
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
BDEPEND="${DEPEND}"
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
xdg_pkg_postinst
|
||||||
|
gnome2_schemas_update
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postrm() {
|
||||||
|
xdg_pkg_postrm
|
||||||
|
gnome2_schemas_update
|
||||||
|
}
|
@ -1,15 +1,3 @@
|
|||||||
DIST chromium-bin-90.0.4430.212-1-common-aarch64.tar.xz 5928052 BLAKE2B b1cdd0e59da717a847758128dbe37e67a0f1ba80b45f1a7e00199f9be77eb4c54b6e9a60348d110427bfc97f47ccc09777e1b909fdd68254dfb590d8ff2b3ee6 SHA512 abeb3ccbf085ee50db87d1c44687f55823aac4f87053ab5826bf1fa67ff8176c0e3598fd61f90740c61e7b15fa97106b4bccdcfb3f0d568c61f5f7be828c5c53
|
|
||||||
DIST chromium-bin-90.0.4430.212-1-common-i686.tar.xz 2172640 BLAKE2B 61703c4669789c0eb2d713d731bd5522e51f57af3ec7d594b0e29e694999aefc415a258c7a98edf247a41e313d7b126d4f5bdd7db9e4c0a1abe81ea05fd7c6a2 SHA512 8abf0878a54605aeeed1379d3bf3eae65db49761e79268571bc55e008ad2e842b0b2831185158c3cb30bba0423a5975c2110d6f6b5a490da8a1f1b48df7758d6
|
|
||||||
DIST chromium-bin-90.0.4430.212-1-common-x86_64.tar.xz 1640880 BLAKE2B a59f94070ebeb848a42a79588b7b8a26c10fb7af406fa04ab7d4c57cf832b1c2408e3e9c87579b65dc6ef94ada25ed491bae91c089356116101a5f6f28d2c7b0 SHA512 ad8d2c319dc5d2fbaa470c4e3ee25eb80e7e5617e4a4a938b2af39d8738d9a3adef8ff713abaad085c1a896ca46e67a77c4beaca3c3053c2490a54c7927e6e89
|
|
||||||
DIST chromium-bin-90.0.4430.212-1-common.tar.xz 1689260 BLAKE2B a70a6f1082db884cfbd51cbdac0b8c32195afe9f04487db9ff0190d8d8ceaee6c83877e96fe97154a01c283512ca116db2f86b7cdb199997db4abf513d8206a6 SHA512 64da5562c0e5a681593a935a85aa66de943f78556945e6e3b58b45125cb7fc972f368489756aee3af55e74899f79e5ff5b2c35d308b3caa597eda3147a9159d6
|
|
||||||
DIST chromium-bin-90.0.4430.212-1-l10n.tar.xz 3831652 BLAKE2B fad09064fe6e10bd63ef574778f192e8c6561fe73c8d02fab61b61a6002093e1157537179b86f4bdc6e3f081792f5775621f016f754d423ea39bb48519d388e9 SHA512 1e61cb072389d9731830799d3887765a7ccba75723116835c445e3135bbe0ab51b55821effc1ba5dfe7f56f5cca02219bb162da2b1f28fa2a732a8052728aca4
|
|
||||||
DIST chromium-bin-90.0.4430.212-1-resources.tar.xz 3309048 BLAKE2B a29bae09aafa903d5ce8bba9686b486582be9b9883bf34cfa1dab66347064bb44af63682c861714e2e3ec7ca4372b57b7caa0e284d110b1761ae9c8119f57777 SHA512 b3a4d20bc3315410b656621d51b14c3f943e498af13e249f41e74c08476133dd79b65c06b7d72dae323b64e9d9a9bad296b543ec3ca7d00fa68c25dde1d4df86
|
|
||||||
DIST chromium-bin-90.0.4430.212-1-wayland-aarch64.tar.xz 71529352 BLAKE2B 69c9e1caa826f794bb49633d00fd29f3a1497bdb3d01e48c384ed096cac5cf6175285e5ea4850e75e593bb756807d78f170e17cc2fa2ff860fb1d101170c8d5e SHA512 8a6797e8aa3a25756fd1884a7e172a81872d9d53b49a6a385639602cbd3052a69583acac2400781354628a228fcee0ab557ee228f38cc2b6618ea07634eeba25
|
|
||||||
DIST chromium-bin-90.0.4430.212-1-wayland-i686.tar.xz 93710084 BLAKE2B 8f078beec0255b861073ba365f3438d3e50ec6131affa7be74ed49b80366d3afd234e3a73c0ff984e82786f6369c2531bd56e794b0653f8c59fc8a71608a94f1 SHA512 8b7661fdf090a01a56af1ee023bcd6f93a628d970152f874178a1e8ffb135f4988529cd0e97a04e27608c8f97d9e19c4a1966ba2f634a7e4c68ad60ef63bd5a2
|
|
||||||
DIST chromium-bin-90.0.4430.212-1-wayland-x86_64.tar.xz 73345572 BLAKE2B 3fb529771990828b4846f3d38021f189e89e427c93b6852f8a3bff45ad89b5f12fcce47ba90672240508ba0ccedda762247cbcdd6e5822b9b06a679d87498f0b SHA512 42caf0cf951d06126e48faf5518f2c07563c72e5a6d2c744ed0d5b952b4a8abae2dcf7fdcbf830a2bf9299a64c75d5326f1bd7bfa867153db4272a1b02f084d4
|
|
||||||
DIST chromium-bin-90.0.4430.212-1-x11-aarch64.tar.xz 71402020 BLAKE2B 00c753a528a1990654d899dd80357f7ec0b2c8d2f2a72ad6eddf55ec3c388541b96ef54171dca443452c7cd44e59332c2875e8251874a5f224e36c6759ea1605 SHA512 b51ca82634c68ed8e40eb4ce3eb4438807447ea1403076d3ddd22bb80a222514626da77c94deca6c1a70ed3a2038df1dc42fa8bfc7499a7e4459e602c3675e65
|
|
||||||
DIST chromium-bin-90.0.4430.212-1-x11-i686.tar.xz 93425664 BLAKE2B bd83f75cb74d3d02ec62034cb4f83d76749c55344b7b93f7312fb0c14d358d607f51c305fa70f7601cab2a640424b92c141aa4ebd55be8dd6ad62560c4eba684 SHA512 bc607f5b5f742b3655ff91f05f42ead0f84311608eadfb88d10be7052d7c0834eb64fed037c551727b5f37946a5d74d06d1d199d3f179fc82f6276287551eac1
|
|
||||||
DIST chromium-bin-90.0.4430.212-1-x11-x86_64.tar.xz 73154292 BLAKE2B 87d66563a8875e0b40a892952fa4afa64003efe84a1667138dc02eb62ec4cf0756ee0d2c4b68be1c8b746f2e7a844fff137cc9c93a30c64b3ae80a750ae90e33 SHA512 180cc5d9bef0a737764564fa04dee8cf820e8628f45f370f97100d78c4c643680ed013194197303d99cd570041d83ef9b78ab0c8310c190cb106d4aaffe5cf57
|
|
||||||
DIST chromium-bin-91.0.4472.106-1-common-aarch64.tar.xz 5930796 BLAKE2B 6818da8bbea6cf3e8b3168d5774b174e00c75a9b8612a7ac64f6aa9a623148cc68befb7525aad8f7ac8a8fd18198e34747c7bfdae1a1cb637a8ffe238d524299 SHA512 83c5cb05d51a61f064dff260be3c253bf29f7060fbe00ab77c0f9262fd122defe4d5c3883ccce1fcce88d5e335dbf72e63ae3ecd082262f282edfabbb445ca27
|
DIST chromium-bin-91.0.4472.106-1-common-aarch64.tar.xz 5930796 BLAKE2B 6818da8bbea6cf3e8b3168d5774b174e00c75a9b8612a7ac64f6aa9a623148cc68befb7525aad8f7ac8a8fd18198e34747c7bfdae1a1cb637a8ffe238d524299 SHA512 83c5cb05d51a61f064dff260be3c253bf29f7060fbe00ab77c0f9262fd122defe4d5c3883ccce1fcce88d5e335dbf72e63ae3ecd082262f282edfabbb445ca27
|
||||||
DIST chromium-bin-91.0.4472.106-1-common-i686.tar.xz 2185968 BLAKE2B 1997a1b6a3c721e5aafa2b2b922cd7a866864c6c2dac1b1c634f1767b3167673101befee87a0b53452bb477ae92510e216decf5eb472667a86c1b6c693c4ccdf SHA512 9e04b05fc2638258c8f84c7c3287c53045036efd783f6989ea6c39093f1c04e357d634285cabc43680de98c059b93554bb25ff683941aa3cb61e08e55050605c
|
DIST chromium-bin-91.0.4472.106-1-common-i686.tar.xz 2185968 BLAKE2B 1997a1b6a3c721e5aafa2b2b922cd7a866864c6c2dac1b1c634f1767b3167673101befee87a0b53452bb477ae92510e216decf5eb472667a86c1b6c693c4ccdf SHA512 9e04b05fc2638258c8f84c7c3287c53045036efd783f6989ea6c39093f1c04e357d634285cabc43680de98c059b93554bb25ff683941aa3cb61e08e55050605c
|
||||||
DIST chromium-bin-91.0.4472.106-1-common-x86_64.tar.xz 1646160 BLAKE2B 4388a05754a478d3f181232f3219321755b34d69aabcebe2c60d31294e83548825e87ee9a79552bba3bf1eb88584cb6daf02f016edff4fa8533661c8fd45e555 SHA512 df869d884c49328129ffab0367192a103a61215b49ddf6008f3d70f8448c062a17ad987c683484ba530d257ace1d574f5b584f34c7257b1b74890f2dc5333dcd
|
DIST chromium-bin-91.0.4472.106-1-common-x86_64.tar.xz 1646160 BLAKE2B 4388a05754a478d3f181232f3219321755b34d69aabcebe2c60d31294e83548825e87ee9a79552bba3bf1eb88584cb6daf02f016edff4fa8533661c8fd45e555 SHA512 df869d884c49328129ffab0367192a103a61215b49ddf6008f3d70f8448c062a17ad987c683484ba530d257ace1d574f5b584f34c7257b1b74890f2dc5333dcd
|
||||||
@ -22,3 +10,12 @@ DIST chromium-bin-91.0.4472.106-1-wayland-x86_64.tar.xz 74067276 BLAKE2B eb4445c
|
|||||||
DIST chromium-bin-91.0.4472.106-1-x11-aarch64.tar.xz 71640280 BLAKE2B 1ec58ea0a0a0fae29140b91e0645211543e971d58b47f102d46ba38fa7a6b61260ecba2c33ba98de29406e1942d036e30b9f4893ff3d61194ac058f11b0fee0b SHA512 3f1febd6da0182a881e872fe29b38df554eb6a3b5c82ba58d59040cbe3cbf78eb966ee66292b40622ea2c7a73a77e863c6e54dca98360623503a78fac94fe31f
|
DIST chromium-bin-91.0.4472.106-1-x11-aarch64.tar.xz 71640280 BLAKE2B 1ec58ea0a0a0fae29140b91e0645211543e971d58b47f102d46ba38fa7a6b61260ecba2c33ba98de29406e1942d036e30b9f4893ff3d61194ac058f11b0fee0b SHA512 3f1febd6da0182a881e872fe29b38df554eb6a3b5c82ba58d59040cbe3cbf78eb966ee66292b40622ea2c7a73a77e863c6e54dca98360623503a78fac94fe31f
|
||||||
DIST chromium-bin-91.0.4472.106-1-x11-i686.tar.xz 94910168 BLAKE2B 3fb7e9832a621ab59a4c8afd691d3bd88ed95f1271e0c03cb39085ecd715c849325c4d93758796c07db1b8c5140be7da0948a18cf1bdbb5fb4d5cbf7ea49da95 SHA512 424e017cb7e5f19869c4e259adbbf53982d91f222037cc691c612699bbd43c9ee1f0a4e6db62eaf5e95e0365f718d6302aaa7c2d60b58227d1d061f884d09772
|
DIST chromium-bin-91.0.4472.106-1-x11-i686.tar.xz 94910168 BLAKE2B 3fb7e9832a621ab59a4c8afd691d3bd88ed95f1271e0c03cb39085ecd715c849325c4d93758796c07db1b8c5140be7da0948a18cf1bdbb5fb4d5cbf7ea49da95 SHA512 424e017cb7e5f19869c4e259adbbf53982d91f222037cc691c612699bbd43c9ee1f0a4e6db62eaf5e95e0365f718d6302aaa7c2d60b58227d1d061f884d09772
|
||||||
DIST chromium-bin-91.0.4472.106-1-x11-x86_64.tar.xz 73909708 BLAKE2B ffa4c5f3390b5f34a8f676f18fb1dee895b88fe7967bf50795fc8921552edfcb7b73e44f0409247874a4683718cdd23cde19129418b2308aaf37239392fa1dd8 SHA512 308a83e578df0371e5ba658d02a5367f07e457e94b98e8087adf0af37a24b5eb581460f036f1ac204d20fd3484de02326da22075eff127eefd063f39d9d8a50c
|
DIST chromium-bin-91.0.4472.106-1-x11-x86_64.tar.xz 73909708 BLAKE2B ffa4c5f3390b5f34a8f676f18fb1dee895b88fe7967bf50795fc8921552edfcb7b73e44f0409247874a4683718cdd23cde19129418b2308aaf37239392fa1dd8 SHA512 308a83e578df0371e5ba658d02a5367f07e457e94b98e8087adf0af37a24b5eb581460f036f1ac204d20fd3484de02326da22075eff127eefd063f39d9d8a50c
|
||||||
|
DIST chromium-bin-91.0.4472.114-1-common-i686.tar.xz 2186180 BLAKE2B f910811901be5769b750eff2d49cd1c84b636ffb913d3e4a7512212bd911c8a86a2788da281ee87cd4b69277d931b67094d68e596f408bad730e11201b13a2e4 SHA512 716882b9548c6aee9c8037cd1249509e6388ba631d9cb68912e2150708ab9f597599168390b39524573b6f80366e204ef148507cacef50377891bc0d13564891
|
||||||
|
DIST chromium-bin-91.0.4472.114-1-common-x86_64.tar.xz 1645624 BLAKE2B 2d6c64c58d8e5769e0ebf06d40ffaea6a3d6f94fb9f7bbf113a3c437fa873e48734700dc8de1962abe4b0b3aa182832d4b7417f3b3e2e09e6a6393af5f936096 SHA512 972cfecdf0969cb375b1ff44118babfa8880223f6768175a6e94a69be8545eec93b35500aafd91e0b1f82d67c3b936677632ae85f1724825f860cee6b9b294f3
|
||||||
|
DIST chromium-bin-91.0.4472.114-1-common.tar.xz 1683900 BLAKE2B c9f1acff299a957735eb263d7b29bf23741ed140264d02a87da117166bdad4a25ca25a853cc32385198bb9ccdaf667c9ef4ecfff37849e0e4cc4842c7258f208 SHA512 75aecf0ceaaaa65a32bb7ebebe0d615e140a0197f3a1163ea47d88837b3df2728afe62e15f77f8112e191ca99bddf2d5f66d96c9b0fc7fd75c9e2bb652d27680
|
||||||
|
DIST chromium-bin-91.0.4472.114-1-l10n.tar.xz 3893496 BLAKE2B 90936bd99d6f0158069bb2d62211eca368082dc1361a72f6ed0d921b8adf943077d97374c8f062091ce268a546be0bad31bd274c0adbe764e9d2a1e3d96b25ad SHA512 bb66bc151ed2f7905c387c69452ddb78a65cf92792d2feaacad2c7435f69f00135490958c7217cac134d066838ac6aa5c6dc5db93ad475a9cd9d7a49ea93ac34
|
||||||
|
DIST chromium-bin-91.0.4472.114-1-resources.tar.xz 21400 BLAKE2B c78c24dc497de3c2eea45453002633525e8279c1885ed4383d71e463a512ac6e5a02a20c458a4a547c9d23ad3a0a9c51345e21d077be341f517ea332e887d728 SHA512 8607c22d5430fd578464437659cc2b02b99244ae4350206c245399bd3178f7bac6d38f4a45d04573d6b8b11432eb427dfb0e653138879d3e7d0ed4d81150d7fb
|
||||||
|
DIST chromium-bin-91.0.4472.114-1-wayland-i686.tar.xz 95044376 BLAKE2B e4ba807b466ceb840b8f69e9135ab69278e86f0fdff6354d0a183c20b8aafbf7994d2ee59fe4715945cd9e3a0fa1ffcf46cc5b403e819f4bd879b916b1c2542a SHA512 a1814493b3535dec9f8bf8ea12cbf1f4833f90ea2dc7dd66de9ce17675a15a5d085111900b5ed2ddead56c6f6cce2b09998045cedfbd435568d21b6773fb2e32
|
||||||
|
DIST chromium-bin-91.0.4472.114-1-wayland-x86_64.tar.xz 74066832 BLAKE2B 89ed73e08ce3320957fa2c1635096d23ea49060cac9d166619cce839d5891716f07810c3309a73cd1348fae78f85ce77c8e4bd7e00a342263b7d65d5d3e6462c SHA512 4cec55016f44b30fb8bcfe71852fcd91277978832cfd0a889eba74cf92889f99a3c283f9f9803baf0c1d60ca280ffb23248302729c14b342c5d6981e18142d14
|
||||||
|
DIST chromium-bin-91.0.4472.114-1-x11-i686.tar.xz 94828952 BLAKE2B 4636116e84c155988a382c2cc87ba67913436ee431acb7bd314cd3c22c82a7ff99effc209bbcb1808bbc5325b1c702a4e9db07a6f1bdaf03943324f4bd74060a SHA512 22acc0beff7265391ac9db017ea814ea235aaa10c514ebb36c0c32b0605ed71e2182e2edb686bd713a10d7d175b85195a6c961442f0fcece1340aa324464305c
|
||||||
|
DIST chromium-bin-91.0.4472.114-1-x11-x86_64.tar.xz 73884448 BLAKE2B a19145d45f169982cfcf110b9c3b6615d5b450127244764a22b2351f9e1b96f62c381cdf97fa2106e4ab6b637afbf5b1e7129292aba320b113e7e68c0f4b7f0a SHA512 bf73f02c8a42ec6a097f8027051c5367c3737e16fe54e1ae0ae57b93fe75291693cf2bc676cfdc103aa04cdff1fa68b038d9ef1bbd575ea71ae670c38de8f7fd
|
||||||
|
@ -35,7 +35,7 @@ SRC_URI="https://dev.gentoo.org/~sultan/distfiles/www-client/chromium-bin/${MY_P
|
|||||||
|
|
||||||
LICENSE="BSD"
|
LICENSE="BSD"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="-* ~amd64 ~arm64 ~x86"
|
KEYWORDS="-* ~arm64"
|
||||||
IUSE="cpu_flags_x86_sse2 devtools selinux suid +swiftshader wayland widevine"
|
IUSE="cpu_flags_x86_sse2 devtools selinux suid +swiftshader wayland widevine"
|
||||||
|
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
|
@ -22,11 +22,6 @@ SRC_URI="https://dev.gentoo.org/~sultan/distfiles/www-client/chromium-bin/${MY_P
|
|||||||
wayland? ( https://dev.gentoo.org/~sultan/distfiles/www-client/chromium-bin/${MY_P}-wayland-x86_64.tar.xz )
|
wayland? ( https://dev.gentoo.org/~sultan/distfiles/www-client/chromium-bin/${MY_P}-wayland-x86_64.tar.xz )
|
||||||
!wayland? ( https://dev.gentoo.org/~sultan/distfiles/www-client/chromium-bin/${MY_P}-x11-x86_64.tar.xz )
|
!wayland? ( https://dev.gentoo.org/~sultan/distfiles/www-client/chromium-bin/${MY_P}-x11-x86_64.tar.xz )
|
||||||
)
|
)
|
||||||
arm64? (
|
|
||||||
https://dev.gentoo.org/~sultan/distfiles/www-client/chromium-bin/${MY_P}-common-aarch64.tar.xz
|
|
||||||
wayland? ( https://dev.gentoo.org/~sultan/distfiles/www-client/chromium-bin/${MY_P}-wayland-aarch64.tar.xz )
|
|
||||||
!wayland? ( https://dev.gentoo.org/~sultan/distfiles/www-client/chromium-bin/${MY_P}-x11-aarch64.tar.xz )
|
|
||||||
)
|
|
||||||
x86? (
|
x86? (
|
||||||
https://dev.gentoo.org/~sultan/distfiles/www-client/chromium-bin/${MY_P}-common-i686.tar.xz
|
https://dev.gentoo.org/~sultan/distfiles/www-client/chromium-bin/${MY_P}-common-i686.tar.xz
|
||||||
wayland? ( https://dev.gentoo.org/~sultan/distfiles/www-client/chromium-bin/${MY_P}-wayland-i686.tar.xz )
|
wayland? ( https://dev.gentoo.org/~sultan/distfiles/www-client/chromium-bin/${MY_P}-wayland-i686.tar.xz )
|
||||||
@ -35,7 +30,7 @@ SRC_URI="https://dev.gentoo.org/~sultan/distfiles/www-client/chromium-bin/${MY_P
|
|||||||
|
|
||||||
LICENSE="BSD"
|
LICENSE="BSD"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="-* ~amd64 ~arm64 ~x86"
|
KEYWORDS="-* ~amd64 ~x86"
|
||||||
IUSE="cpu_flags_x86_sse2 devtools selinux suid +swiftshader wayland widevine"
|
IUSE="cpu_flags_x86_sse2 devtools selinux suid +swiftshader wayland widevine"
|
||||||
|
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
@ -45,7 +40,7 @@ RDEPEND="
|
|||||||
dev-libs/atk
|
dev-libs/atk
|
||||||
dev-libs/expat
|
dev-libs/expat
|
||||||
dev-libs/glib:2
|
dev-libs/glib:2
|
||||||
dev-libs/icu:0/68.2
|
dev-libs/icu:0/69.1
|
||||||
dev-libs/libxml2[icu]
|
dev-libs/libxml2[icu]
|
||||||
dev-libs/libxslt
|
dev-libs/libxslt
|
||||||
dev-libs/nspr
|
dev-libs/nspr
|
||||||
@ -82,6 +77,7 @@ RDEPEND="
|
|||||||
x11-libs/libXext
|
x11-libs/libXext
|
||||||
x11-libs/libXfixes
|
x11-libs/libXfixes
|
||||||
x11-libs/libXrandr
|
x11-libs/libXrandr
|
||||||
|
x11-libs/libXtst
|
||||||
x11-libs/libxcb
|
x11-libs/libxcb
|
||||||
x11-libs/libxkbcommon
|
x11-libs/libxkbcommon
|
||||||
x11-libs/libxshmfence
|
x11-libs/libxshmfence
|
Loading…
Reference in New Issue
Block a user