Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-shell-notification-center
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
ximper-shell-notification-center
Commits
79ce0af9
Verified
Commit
79ce0af9
authored
Mar 21, 2026
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
functions: replace deprecated get_preferred_size() with pixel_size
parent
1751b630
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
functions.vala
src/functions.vala
+5
-7
No files found.
src/functions.vala
View file @
79ce0af9
...
...
@@ -42,12 +42,11 @@ namespace XimperShellNotificationCenter {
uri
=
uri
.
slice
(
URI_PREFIX
.
length
,
uri
.
length
);
}
Gtk
.
Requisition
natural_size
;
img
.
get_preferred_size
(
null
,
out
natural_size
);
int
size
=
img
.
pixel_size
>
0
?
img
.
pixel_size
:
64
;
Gdk
.
Pixbuf
pixbuf
=
new
Gdk
.
Pixbuf
.
from_file_at_size
(
Uri
.
unescape_string
(
uri
),
natural_size
.
width
,
natural_size
.
height
);
size
,
size
);
Gdk
.
Texture
texture
=
Gdk
.
Texture
.
for_pixbuf
(
pixbuf
);
img
.
set_from_paintable
(
texture
);
...
...
@@ -68,8 +67,7 @@ namespace XimperShellNotificationCenter {
public
static
void
set_image_data
(
ImageData
data
,
Gtk
.
Image
img
)
{
Gtk
.
Requisition
natural_size
;
img
.
get_preferred_size
(
null
,
out
natural_size
);
int
size
=
img
.
pixel_size
>
0
?
img
.
pixel_size
:
64
;
Gdk
.
Pixbuf
pixbuf
=
new
Gdk
.
Pixbuf
.
with_unowned_data
(
data
.
data
,
Gdk
.
Colorspace
.
RGB
,
...
...
@@ -79,8 +77,8 @@ namespace XimperShellNotificationCenter {
data
.
height
,
data
.
rowstride
,
null
);
Gdk
.
Pixbuf
scaled
=
pixbuf
.
scale_simple
(
natural_size
.
width
,
natural_size
.
height
,
Gdk
.
Pixbuf
scaled
=
pixbuf
.
scale_simple
(
size
,
size
,
Gdk
.
InterpType
.
BILINEAR
);
Gdk
.
Texture
texture
=
Gdk
.
Texture
.
for_pixbuf
(
scaled
);
...
...
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