Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
World
Feeds
Commits
e80b18f6
Verified
Commit
e80b18f6
authored
Sep 23, 2020
by
Gabriele Musco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new version; switched to handy avatar
parent
73fba14c
Pipeline
#215855
failed with stage
in 14 minutes and 17 seconds
Changes
10
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
155 additions
and
161 deletions
+155
-161
.gitlab-ci.yml
.gitlab-ci.yml
+1
-1
data/org.gabmus.gfeeds.appdata.xml.in
data/org.gabmus.gfeeds.appdata.xml.in
+8
-0
data/reader_mode_style.css
data/reader_mode_style.css
+0
-114
dist/flatpak/org.gabmus.gfeeds.json
dist/flatpak/org.gabmus.gfeeds.json
+4
-4
gfeeds/confManager.py
gfeeds/confManager.py
+15
-4
gfeeds/feeds_view.py
gfeeds/feeds_view.py
+4
-6
gfeeds/initials_icon.py
gfeeds/initials_icon.py
+15
-24
gfeeds/reader_mode_style.py
gfeeds/reader_mode_style.py
+103
-1
gfeeds/sidebar_row.py
gfeeds/sidebar_row.py
+4
-6
meson.build
meson.build
+1
-1
No files found.
.gitlab-ci.yml
View file @
e80b18f6
...
...
@@ -10,7 +10,7 @@ test:
-
pyflakes gfeeds
flatpak
:
image
:
'
registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.3
6
'
image
:
'
registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.3
8
'
variables
:
MANIFEST_PATH
:
"
dist/flatpak/org.gabmus.gfeeds.json"
MESON_ARGS
:
"
-Dprofile=Devel"
...
...
data/org.gabmus.gfeeds.appdata.xml.in
View file @
e80b18f6
...
...
@@ -54,6 +54,14 @@
<url
type=
"bugtracker"
>
https://gitlab.com/gabmus/gnome-feeds/issues
</url>
<update_contact>
gabmus@disroot.org
</update_contact>
<releases>
<release
version=
"0.15"
timestamp=
"1600839902"
>
<description>
<ul>
<li>
Switched to the new libhandy Avatar widget
</li>
<li>
Added Dutch translation courtesy of Heimen Stoffels
</li>
</ul>
</description>
</release>
<release
version=
"0.14.1"
timestamp=
"1595058263"
>
<description>
<ul>
...
...
data/reader_mode_style.css
View file @
e80b18f6
...
...
@@ -37,120 +37,6 @@
* https://www.w3.org/TR/css-fonts-3/#font-face-rule
*/
@font-face
{
font-family
:
ephy-reader-serif
;
src
:
local
(
'DejaVu Serif'
),
local
(
'DejaVu Serif Book'
);
font-weight
:
normal
;
font-style
:
normal
;
font-display
:
block
;
}
@font-face
{
font-family
:
ephy-reader-serif
;
src
:
local
(
'DejaVu Serif Italic'
);
font-weight
:
normal
;
font-style
:
italic
;
font-display
:
block
;
}
@font-face
{
font-family
:
ephy-reader-serif
;
src
:
local
(
'DejaVu Serif Bold'
);
font-weight
:
bold
;
font-style
:
normal
;
font-display
:
block
;
}
@font-face
{
font-family
:
ephy-reader-serif
;
src
:
local
(
'DejaVu Serif Bold Italic'
);
font-weight
:
bold
;
font-style
:
italic
;
font-display
:
block
;
}
@font-face
{
font-family
:
ephy-reader-sans
;
src
:
local
(
'Cantarell'
),
local
(
'DejaVu Sans'
);
font-weight
:
normal
;
font-style
:
normal
;
font-display
:
block
;
}
@font-face
{
font-family
:
ephy-reader-sans
;
src
:
local
(
'Cantarell Italic'
),
local
(
'DejaVu Sans Italic'
);
font-weight
:
normal
;
font-style
:
italic
;
font-display
:
block
;
}
@font-face
{
font-family
:
ephy-reader-sans
;
src
:
local
(
'Cantarell Bold'
),
local
(
'DejaVu Sans Bold'
)
format
(
'truetype'
);
font-weight
:
bold
;
font-style
:
normal
;
font-display
:
block
;
}
@font-face
{
font-family
:
ephy-reader-sans
;
src
:
local
(
'Cantarell Bold Italic'
),
local
(
'DejaVu Sans Bold Italic'
);
font-weight
:
bold
;
font-style
:
italic
;
font-display
:
block
;
}
@font-face
{
font-family
:
ephy-reader-mono
;
src
:
local
(
'Fira Mono'
),
local
(
'Source Code Pro'
),
local
(
'DejaVu Sans Mono'
),
local
(
'DejaVu Sans Mono Book'
);
font-weight
:
normal
;
font-style
:
normal
;
font-display
:
block
;
}
@font-face
{
font-family
:
ephy-reader-mono
;
src
:
local
(
'Fira Mono Italic'
),
local
(
'Source Code Pro Italic'
),
local
(
'DejaVu Sans Mono Italic'
),
local
(
'DejaVu Sans Mono Oblique'
);
font-weight
:
normal
;
font-style
:
italic
;
font-display
:
block
;
}
@font-face
{
font-family
:
ephy-reader-mono
;
src
:
local
(
'Fira Mono Bold'
),
local
(
'Source Code Pro Bold'
),
local
(
'DejaVu Sans Mono Bold'
);
font-weight
:
bold
;
font-style
:
normal
;
font-display
:
block
;
}
@font-face
{
font-family
:
ephy-reader-mono
;
src
:
local
(
'Fira Mono Bold Italic'
),
local
(
'Source Code Pro Bold Italic'
),
local
(
'DejaVu Sans Mono Bold Italic'
),
local
(
'DejaVu Sans Mono Bold Oblique'
);
font-weight
:
bold
;
font-style
:
italic
;
font-display
:
block
;
}
body
.sans
{
font-family
:
ephy-reader-sans
,
sans-serif
;
}
...
...
dist/flatpak/org.gabmus.gfeeds.json
View file @
e80b18f6
...
...
@@ -2,7 +2,7 @@
"app-id"
:
"org.gabmus.gfeeds"
,
"command"
:
"gfeeds"
,
"runtime"
:
"org.gnome.Platform"
,
"runtime-version"
:
"3.3
6
"
,
"runtime-version"
:
"3.3
8
"
,
"sdk"
:
"org.gnome.Sdk"
,
"finish-args"
:
[
"--device=dri"
,
...
...
@@ -27,7 +27,7 @@
{
"type"
:
"git"
,
"url"
:
"https://gitlab.gnome.org/GNOME/libhandy"
,
"tag"
:
"
0.84
.0"
"tag"
:
"
1.0
.0"
}
]
},
...
...
@@ -692,9 +692,9 @@
{
"type"
:
"git"
,
"url"
:
"https://gitlab.gnome.org/World/gfeeds"
,
"tag"
:
"0.1
4.1
"
"tag"
:
"0.1
5
"
}
]
}
]
}
}
\ No newline at end of file
gfeeds/confManager.py
View file @
e80b18f6
...
...
@@ -118,7 +118,7 @@ class ConfManager(metaclass=Singleton):
self
.
saved_cache_path
=
f
'
{
self
.
cache_path
}
/saved_articles'
self
.
conf
=
None
if
isfile
(
self
.
path
):
if
self
.
path
.
is_file
(
):
try
:
with
open
(
self
.
path
)
as
fd
:
self
.
conf
=
json
.
loads
(
fd
.
read
())
...
...
@@ -149,8 +149,8 @@ class ConfManager(metaclass=Singleton):
self
.
thumbs_cache_path
,
self
.
saved_cache_path
]:
if
not
isdir
(
p
):
makedirs
(
p
)
if
not
isdir
(
str
(
p
)
):
makedirs
(
str
(
p
)
)
self
.
read_feeds_items
=
SignalerList
(
self
.
conf
[
'read_items'
])
self
.
read_feeds_items
.
connect
(
...
...
@@ -168,6 +168,17 @@ class ConfManager(metaclass=Singleton):
'minimize:'
in
bl
)
# font_gsettings = Gio.Settings.new('org.gnome.destkop.interface')
# self.sans_font = font_gsettings.get_value(
# 'font-name'
# ).get_string()
# self.serif_font = font_gsettings.get_value(
# 'document-font-name'
# ).get_string()
# self.mono_font = font_gsettings.get_value(
# 'monospace-font-name'
# ).get_string()
@
property
def
max_article_age
(
self
)
->
timedelta
:
return
timedelta
(
days
=
self
.
conf
[
'max_article_age_days'
])
...
...
@@ -204,7 +215,7 @@ class ConfManager(metaclass=Singleton):
self
.
conf
[
'read_items'
]
=
self
.
read_feeds_items
.
get_list
()
def
save_conf
(
self
,
*
args
):
if
isfile
(
self
.
path
):
if
self
.
path
.
is_file
(
):
with
open
(
self
.
path
,
'r'
)
as
fd
:
if
json
.
loads
(
fd
.
read
())
==
self
.
conf
:
return
...
...
gfeeds/feeds_view.py
View file @
e80b18f6
...
...
@@ -42,12 +42,10 @@ class FeedsViewListboxRow(Gtk.ListBoxRow):
self
.
checkbox
.
hide
()
self
.
icon_container
=
self
.
builder
.
get_object
(
'icon_container'
)
if
isfile
(
self
.
feed
.
favicon_path
):
self
.
icon
=
Gtk
.
Image
.
new_from_file
(
self
.
feed
.
favicon_path
)
else
:
self
.
icon
=
InitialsIcon
(
self
.
feed
.
title
)
self
.
icon
=
InitialsIcon
(
self
.
feed
.
title
,
self
.
feed
.
favicon_path
)
self
.
icon_container
.
add
(
self
.
icon
)
self
.
name_label
=
self
.
builder
.
get_object
(
'title_label'
)
...
...
gfeeds/initials_icon.py
View file @
e80b18f6
from
gi.repository
import
Gtk
from
gfeeds.confManager
import
ConfManager
from
gi.repository
import
Gtk
,
Handy
,
GdkPixbuf
from
os.path
import
isfile
class
InitialsIcon
(
Gtk
.
Bin
):
confman
=
ConfManager
()
def
__init__
(
self
,
name
,
**
kwargs
):
def
__init__
(
self
,
name
,
image_path
,
**
kwargs
):
super
().
__init__
(
**
kwargs
)
self
.
name
=
name
self
.
label
=
Gtk
.
Label
()
namesplit
=
self
.
name
.
split
()
if
len
(
namesplit
)
>=
2
:
self
.
initials
=
f
'
{
namesplit
[
0
][
0
]
}{
namesplit
[
1
][
0
]
}
'
.
upper
()
else
:
self
.
initials
=
f
'
{
self
.
name
[
0
]
}{
self
.
name
[
1
]
}
'
.
upper
()
self
.
icon_overlay
=
Gtk
.
Overlay
()
image
=
Gtk
.
Image
.
new_from_icon_name
(
'circle-filled-symbolic'
,
Gtk
.
IconSize
.
INVALID
)
image
.
set_pixel_size
(
32
)
self
.
label
.
set_markup
(
'<span fgcolor="#{0}" weight="semibold">{1}</span>'
.
format
(
InitialsIcon
.
confman
.
get_background_color
(),
self
.
initials
)
self
.
image_path
=
image_path
self
.
avatar
=
Handy
.
Avatar
.
new
(
32
,
self
.
name
,
True
)
self
.
icon_overlay
.
add
(
image
)
self
.
icon_overlay
.
add_overlay
(
self
.
label
)
self
.
avatar
.
set_image_load_func
(
self
.
__set_avatar_func
)
self
.
add
(
self
.
avatar
)
self
.
add
(
self
.
icon_overlay
)
def
__set_avatar_func
(
self
,
*
args
):
return
(
GdkPixbuf
.
Pixbuf
.
new_from_file
(
self
.
image_path
)
if
isfile
(
self
.
image_path
)
else
None
)
gfeeds/reader_mode_style.py
View file @
e80b18f6
from
gfeeds.confManager
import
ConfManager
from
gi.repository
import
Gio
CSS
=
Gio
.
resources_lookup_data
(
confman
=
ConfManager
()
sans_font
=
'Cantarell'
# confman.sans_font
serif_font
=
'DejaVu Serif'
# confman.serif_font
mono_font
=
'DejaVu Sans Mono'
# confman.mono_font
CSS
=
f
'''@font-face {{
font-family: ephy-reader-serif;
src: local('
{
serif_font
}
');
font-weight: normal;
font-style: normal;
font-display: block;
}}
@font-face {{
font-family: ephy-reader-serif;
src: local('
{
serif_font
}
Italic');
font-weight: normal;
font-style: italic;
font-display: block;
}}
@font-face {{
font-family: ephy-reader-serif;
src:local('
{
serif_font
}
Bold');
font-weight: bold;
font-style: normal;
font-display: block;
}}
@font-face {{
font-family: ephy-reader-serif;
src:local('
{
serif_font
}
Bold Italic');
font-weight: bold;
font-style: italic;
font-display: block;
}}
@font-face {{
font-family: ephy-reader-sans;
src: local('
{
sans_font
}
');
font-weight: normal;
font-style: normal;
font-display: block;
}}
@font-face {{
font-family: ephy-reader-sans;
src: local('
{
sans_font
}
Italic');
font-weight: normal;
font-style: italic;
font-display: block;
}}
@font-face {{
font-family: ephy-reader-sans;
src: local('
{
sans_font
}
Bold');
font-weight: bold;
font-style: normal;
font-display: block;
}}
@font-face {{
font-family: ephy-reader-sans;
src: local('
{
sans_font
}
Bold Italic');
font-weight: bold;
font-style: italic;
font-display: block;
}}
@font-face {{
font-family: ephy-reader-mono;
src: local('
{
mono_font
}
');
font-weight: normal;
font-style: normal;
font-display: block;
}}
@font-face {{
font-family: ephy-reader-mono;
src: local('
{
mono_font
}
Italic');
font-weight: normal;
font-style: italic;
font-display: block;
}}
@font-face {{
font-family: ephy-reader-mono;
src: local('
{
mono_font
}
Bold');
font-weight: bold;
font-style: normal;
font-display: block;
}}
@font-face {{
font-family: ephy-reader-mono;
src: local('
{
mono_font
}
Bold Italic');
font-weight: bold;
font-style: italic;
font-display: block;
}}
'''
+
Gio
.
resources_lookup_data
(
'/org/gabmus/gfeeds/reader_mode_style.css'
,
Gio
.
ResourceLookupFlags
.
NONE
).
get_data
().
decode
()
...
...
gfeeds/sidebar_row.py
View file @
e80b18f6
...
...
@@ -34,12 +34,10 @@ class GFeedsSidebarRow(Gtk.ListBoxRow):
self
.
on_full_feed_name_changed
()
self
.
icon_container
=
self
.
builder
.
get_object
(
'icon_container'
)
if
isfile
(
self
.
feeditem
.
parent_feed
.
favicon_path
):
self
.
icon
=
Gtk
.
Image
.
new_from_file
(
self
.
feeditem
.
parent_feed
.
favicon_path
)
else
:
self
.
icon
=
InitialsIcon
(
self
.
feeditem
.
parent_feed
.
title
)
self
.
icon
=
InitialsIcon
(
self
.
feeditem
.
parent_feed
.
title
,
self
.
feeditem
.
parent_feed
.
favicon_path
)
self
.
icon_container
.
add
(
self
.
icon
)
# Date & time stuff is long
...
...
meson.build
View file @
e80b18f6
project('gfeeds',
version: '0.1
4.1
',
version: '0.1
5
',
meson_version: '>= 0.50.0',
license: 'GPL3'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment