Skip to content

Commit 4a49be0

Browse files
authored
Merge pull request #1426 from lwindolf/libpeas2
Switch to libpeas2
2 parents 614fef7 + 9ec75cb commit 4a49be0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+652
-950
lines changed

.github/workflows/cb.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
- run: |
2828
apt-get update -qq
29-
apt-get install -y -qq libxml2-dev libxslt1-dev libsqlite3-dev libwebkit2gtk-4.1-dev libjson-glib-dev libgirepository1.0-dev libpeas-dev gsettings-desktop-schemas-dev python3 libtool intltool valgrind libfribidi-dev gla11y appstream desktop-file-utils
29+
apt-get install -y -qq libxml2-dev libxslt1-dev libsqlite3-dev libwebkit2gtk-4.1-dev libjson-glib-dev libgirepository1.0-dev libpeas-2-dev gsettings-desktop-schemas-dev python3 libtool intltool valgrind libfribidi-dev gla11y appstream desktop-file-utils
3030
mkdir inst
3131
3232
- run: |

ChangeLog

+13-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,19 @@ To be released
22

33
Version 1.16-RC3
44

5-
65
* Removes long deprecated manual proxy setting
7-
(Lars Windolf)
6+
(Lars Windolf)
7+
8+
* #1462 Drop the possibility to save passwords to OPML feed list when
9+
no keyring is available. This is too insecure.
10+
(Lars Windolf)
11+
12+
* #1426 Migration to libpeas2, this means
13+
- simplified plugin manager
14+
- no more plugin installation supported
15+
- get_focus plugin looses configuration dialog
16+
17+
* #1426 New configure option to set girepository dependency version
818

919
* Fixes escaping of JS exception texts
1020
(Lars Windolf)
@@ -13,6 +23,7 @@ To be released
1323
(Lars Windolf)
1424

1525

26+
1627
2025-02-25 Lars Windolf <[email protected]>
1728

1829
Version 1.16-RC2

Makefile.am

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,13 @@ plugin_DATA = \
4343
plugins/download-manager.ui \
4444
plugins/getfocus.py \
4545
plugins/getfocus.plugin \
46+
plugins/getfocus.ui \
4647
plugins/gnome-keyring.py \
4748
plugins/gnome-keyring.plugin \
4849
plugins/headerbar.py \
4950
plugins/headerbar.plugin \
5051
plugins/libnotify.py \
5152
plugins/libnotify.plugin \
52-
plugins/plugin-installer.py \
53-
plugins/plugin-installer.plugin \
5453
plugins/trayicon.py \
5554
plugins/trayicon.plugin
5655

configure.ac

+8-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ pkg_modules=" gtk+-3.0 >= 3.24.0
4343
json-glib-1.0
4444
gobject-introspection-1.0
4545
gsettings-desktop-schemas
46-
libpeas-1.0 >= 1.0.0
47-
libpeas-gtk-1.0 >= 1.0.0
46+
libpeas-2
4847
fribidi >= 0.19.7"
4948

5049
################################################################################
@@ -74,6 +73,13 @@ AC_MSG_RESULT(user agent OS = $uname)
7473

7574
GOBJECT_INTROSPECTION_CHECK([0.9.3])
7675

76+
# Due to the mess in pygobject we need to know with which girepository we
77+
# are run. Please change to 2.0 if building again pygobject > 3.52.3
78+
# (See also https://github.com/lwindolf/liferea/issues/1425)
79+
#
80+
# At a later point the default here will switch to 2.0
81+
AC_DEFINE_UNQUOTED(GI_REPOSITORY, "girepository-1.0", [defines the girepository version to use])
82+
7783
################################################################################
7884

7985
AM_GLIB_GNU_GETTEXT

glade/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ glade_DATA = about.ui \
1313
new_subscription.ui \
1414
node_source.ui \
1515
opml_source.ui \
16+
plugins.ui \
1617
prefs.ui \
1718
properties.ui \
1819
reedah_source.ui \

glade/liferea_menu.ui

+8
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@
161161
<submenu id="tools_menu">
162162
<attribute name="label" translatable="yes">_Tools</attribute>
163163
<section>
164+
<item>
165+
<attribute name="action">app.discover-feeds</attribute>
166+
<attribute name="label" translatable="yes">_Discover Feeds</attribute>
167+
</item>
164168
<item>
165169
<attribute name="action">app.show-update-monitor</attribute>
166170
<attribute name="label" translatable="yes">_Update Monitor</attribute>
@@ -169,6 +173,10 @@
169173
<attribute name="action">app.show-preferences</attribute>
170174
<attribute name="label" translatable="yes">_Preferences</attribute>
171175
</item>
176+
<item>
177+
<attribute name="action">app.manage-plugins</attribute>
178+
<attribute name="label" translatable="yes">_Manage Plugins</attribute>
179+
</item>
172180
</section>
173181
</submenu>
174182
<submenu>

glade/plugins.ui

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- Generated with glade 3.40.0 -->
3+
<interface>
4+
<requires lib="gtk+" version="3.10"/>
5+
<object class="GtkDialog" id="plugins">
6+
<property name="can-focus">False</property>
7+
<property name="title" translatable="yes">Plugins</property>
8+
<property name="default-width">500</property>
9+
<property name="default-height">300</property>
10+
<property name="type-hint">dialog</property>
11+
<child internal-child="vbox">
12+
<object class="GtkBox" id="dialog_vbox">
13+
<property name="can-focus">False</property>
14+
<property name="orientation">vertical</property>
15+
<child internal-child="action_area">
16+
<object class="GtkButtonBox" id="dialog_action_area">
17+
<property name="visible">True</property>
18+
<property name="can-focus">False</property>
19+
<property name="layout-style">end</property>
20+
<child>
21+
<object class="GtkButton" id="configure">
22+
<property name="label" translatable="yes">_Configure</property>
23+
<property name="visible">True</property>
24+
<property name="can-focus">True</property>
25+
<property name="receives-default">True</property>
26+
<property name="use-underline">True</property>
27+
</object>
28+
<packing>
29+
<property name="expand">True</property>
30+
<property name="fill">True</property>
31+
<property name="position">0</property>
32+
</packing>
33+
</child>
34+
<child>
35+
<object class="GtkButton" id="close">
36+
<property name="label">gtk-close</property>
37+
<property name="visible">True</property>
38+
<property name="can-focus">True</property>
39+
<property name="can-default">True</property>
40+
<property name="receives-default">False</property>
41+
<property name="use-stock">True</property>
42+
<signal name="clicked" handler="gtk_widget_destroy" object="plugins" after="yes" swapped="yes"/>
43+
</object>
44+
<packing>
45+
<property name="expand">False</property>
46+
<property name="fill">False</property>
47+
<property name="position">1</property>
48+
</packing>
49+
</child>
50+
</object>
51+
<packing>
52+
<property name="expand">False</property>
53+
<property name="fill">False</property>
54+
<property name="position">0</property>
55+
</packing>
56+
</child>
57+
<child>
58+
<object class="GtkScrolledWindow">
59+
<property name="visible">True</property>
60+
<property name="can-focus">True</property>
61+
<property name="shadow-type">in</property>
62+
<child>
63+
<object class="GtkViewport">
64+
<property name="visible">True</property>
65+
<property name="can-focus">False</property>
66+
<child>
67+
<object class="GtkListBox" id="plugins_listbox">
68+
<property name="can-focus">False</property>
69+
<property name="hexpand">True</property>
70+
<property name="vexpand">True</property>
71+
</object>
72+
</child>
73+
</object>
74+
</child>
75+
</object>
76+
<packing>
77+
<property name="expand">True</property>
78+
<property name="fill">True</property>
79+
<property name="padding">6</property>
80+
<property name="position">1</property>
81+
</packing>
82+
</child>
83+
</object>
84+
</child>
85+
</object>
86+
</interface>

plugins/README.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,5 @@ To help you getting started there is a tutorial on writing plugins:
1919

2020
## Adding 3rd Party Plugins
2121

22-
Using the "plugin installer" Liferea allows installing plugins
23-
from a curated list of 3rd party (Github) sources. This list is
24-
the "plugin-list.json" file you find in this directory.
25-
26-
Open a PR to add useful 3rd party plugins you know about!
22+
3rd party plugins can only be manually installed by placing them into
23+
a subdirectory in ~/.local/share/liferea/plugins

plugins/add-bookmark-site.plugin

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[Plugin]
22
Module=add-bookmark-site
3-
Loader=python3
3+
Loader=python
44
IAge=2
55
Name=Add Bookmark Site
66
Icon=bookmark-new

plugins/add-bookmark-site.py

+11-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55
Add social bookmark site
66
7-
Copyright (C) 2022 Lars Windolf <[email protected]>
7+
Copyright (C) 2022-2025 Lars Windolf <[email protected]>
88
99
This program is free software: you can redistribute it and/or modify
1010
it under the terms of the GNU Lesser General Public License as published by
@@ -25,9 +25,8 @@
2525
import gi
2626

2727
gi.require_version('Gtk', '3.0')
28-
gi.require_version('PeasGtk', '1.0')
2928

30-
from gi.repository import GObject, Gtk, PeasGtk, Liferea
29+
from gi.repository import GObject, Gtk, Liferea
3130

3231
UI_FILE_PATH = os.path.join(os.path.dirname(__file__), "add-bookmark-site.ui")
3332

@@ -70,8 +69,8 @@ def register(name, url):
7069
Liferea.social_set_bookmark_site(name)
7170
return
7271

73-
class AddBookmarkSitePlugin (GObject.Object,
74-
Liferea.ShellActivatable, PeasGtk.Configurable):
72+
class AddBookmarkSitePlugin (GObject.Object, Liferea.Activatable,
73+
Liferea.ShellActivatable):
7574
__gtype_name__ = "AddBookmarkSitePlugin"
7675

7776
shell = GObject.property (type=Liferea.Shell)
@@ -105,11 +104,14 @@ def do_create_configure_widget(self):
105104
applyBtn = builder.get_object("applyBtn")
106105
applyBtn.connect('clicked', self.on_save_cb)
107106

108-
widget = builder.get_object("box1")
109-
parent = widget.get_parent()
110-
parent.remove(widget)
111-
return widget
107+
self.dialog = builder.get_object("configDialog")
108+
self.dialog.show_all()
109+
self.dialog.run()
112110

113111
def on_save_cb(self, user_data):
114112
save_config(self._nameEntry.get_text(), self._urlEntry.get_text())
113+
self.dialog.destroy()
114+
self.dialog = None
115+
self._urlEntry = None
116+
self._nameEntry = None
115117
return

plugins/bold-unread.plugin

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[Plugin]
22
Module=bold-unread
3-
Loader=python3
3+
Loader=python
44
Icon=format-text-bold
55
IAge=2
66
Name=Bold Unread

plugins/bold-unread.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def cell_func_bold_unread(column, cell, model, iterator, data):
2323
unread_count = model.get(iterator, 3)
2424
cell.set_property("weight", Pango.Weight.BOLD if (unread_count[0] > 0) else Pango.Weight.NORMAL)
2525

26-
class NrBoldUnreadPlugin(GObject.Object, Liferea.ShellActivatable):
26+
class NrBoldUnreadPlugin(GObject.Object, Liferea.Activatable, Liferea.ShellActivatable):
2727
__gtype_name__ = 'NrBoldUnreadPlugin'
2828
treeview = None
2929
ticol = None

plugins/download-manager.plugin

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[Plugin]
2-
Loader=python3
2+
Loader=python
33
Module=download-manager
44
IAge=3
55
Name=Download Manager

plugins/download-manager.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
import time
2525

2626
gi.require_version('Gtk', '3.0')
27-
gi.require_version('Peas', '1.0')
28-
gi.require_version('PeasGtk', '1.0')
2927
gi.require_version('Liferea', '3.0')
3028

3129
from gi.repository import GObject, GLib, Gtk, Gio, Liferea, Pango
@@ -47,7 +45,7 @@ def remove_menuitem(action, menus, level=0):
4745
if value == action:
4846
menus.remove(i)
4947

50-
class DownloadManagerPlugin(GObject.Object, Liferea.DownloadActivatable):
48+
class DownloadManagerPlugin(GObject.Object, Liferea.Activatable, Liferea.DownloadActivatable):
5149
__gtype_name__ = 'DownloadManagerPlugin'
5250

5351
shell = GObject.property(type=Liferea.Shell)

plugins/getfocus.plugin

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[Plugin]
22
Module=getfocus
3-
Loader=python3
3+
Loader=python
44
IAge=2
55
Name=Get focus!
66
Description=An automatic visual "focus mode" for Liferea, that makes the feedlist less prominent by change its opacity.

0 commit comments

Comments
 (0)