From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Date: Mon, 12 Sep 2022 15:26:25 +0000 Message-ID: <87pmg0pqam.fsf@posteo.net> References: <875yhzmz25.fsf@posteo.net> <875yhzmj50.fsf@gnus.org> <875yhzl3a1.fsf@posteo.net> <87fsh25bso.fsf@gnus.org> <871qsil3jm.fsf@posteo.net> <87fsgygo7c.fsf@gnus.org> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <871qsgc390.fsf@gnus.org> <871qsg4u0b.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22224"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 57639@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 12 17:48:52 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXlg4-0005Yj-8M for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Sep 2022 17:48:52 +0200 Original-Received: from localhost ([::1]:58826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXlL5-0006u3-KC for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Sep 2022 11:27:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXlKz-0006ts-C4 for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2022 11:27:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58901) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oXlKv-0003YJ-Sr for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2022 11:27:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oXlKv-00029p-IV for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2022 11:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Sep 2022 15:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57639 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.16629963988260 (code B ref 57639); Mon, 12 Sep 2022 15:27:01 +0000 Original-Received: (at 57639) by debbugs.gnu.org; 12 Sep 2022 15:26:38 +0000 Original-Received: from localhost ([127.0.0.1]:47600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXlKY-000299-1n for submit@debbugs.gnu.org; Mon, 12 Sep 2022 11:26:38 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:35089) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXlKV-00028x-SP for 57639@debbugs.gnu.org; Mon, 12 Sep 2022 11:26:37 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 7CA88240026 for <57639@debbugs.gnu.org>; Mon, 12 Sep 2022 17:26:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1662996389; bh=WosNo/hf8eJ4XDukylnSV0p6I5fQl8SMikVE/xbDxtc=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=UVr6qVhLaplQ4ydgxoSUP5qOCG7esXp8vClgqW/jSrCjUHXZzbwxgzEvlOHlZZrH6 8jTe+VCTwWiwmKYqu9WEOi8lVPPMgFjIYiszq6lw+7vzgu1oWnfrAMYQ/BNRT9UrNs x+b4WBnP1Kc0zZxQFSuhwdqylyJ3Um6+OuulNpAq311l33KCu9K+911PT/QWNkefSe gOlBMxZl9VSk6tLru7FwzmhLhXYGYkr/yRzYr3SFOG3smpha/Ly1BPImedw9REsJTS VpLybtU/25+JpzCaHVImpmFoCFxaLTAtQq7JnQ1Bi3ROtHOPUsLfWIBXBXCpkUxbg7 59LDKKOWkduwA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MR9Rl4fTxz9rxK; Mon, 12 Sep 2022 17:26:26 +0200 (CEST) In-Reply-To: <871qsg4u0b.fsf@yahoo.com> (Po Lu's message of "Mon, 12 Sep 2022 21:11:48 +0800") Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:242284 Archived-At: Po Lu writes: > Lars Ingebrigtsen writes: > >> Philip Kaludercic writes: >> >>>> I thought we already had support for this under Gtk? But I may be >>>> misremembering. >>> >>> Am I reading it correctly that `style_changed_cb' in gtkutils.c would be >>> a place to start looking for this functionality? >> >> Ah, yes, I think that's the one... Po Lu probably know more about this; >> added to the CCs. > > What exactly is the wanted feature? > > If it's automatically switching between dark and light themes For now it is just detecting that a switch should be made. > , then > style_changed_cb is probably not the right place. It's mostly vestigial > code from when we used to update the region face along with the GTK > stylesheet. Instead, TRT used to be to listen for changes to the > `gtk-application-prefer-dark-theme' property of the GtkSettings object. > > However, that has been superseeded by a dbus based interface in recent > versions of GNOME. I do not understand the details, but it seems like > it could be implemented in Lisp: > > https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings Would this have to be re-implemented for most desktop environments, or do most of them use DBus to signal these changes?