Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2022-08-20 21:06:32 +0300
committerlovetox <philipp@hoerist.com>2022-08-20 21:06:32 +0300
commit287ef4f7f193fb416985569bf8619334ecea5999 (patch)
tree18dc021d9c22010dcfbf9b61d2684a7fd38962a9
parent90c796c5a778b482b66c2810320923055ab582f1 (diff)
cq: Use correct cairo.Surface type
-rwxr-xr-xgajim/gtk/avatar_selector.py4
-rw-r--r--gajim/gtk/chat_banner.py2
-rw-r--r--gajim/gtk/profile.py2
-rw-r--r--gajim/gtk/util.py2
4 files changed, 6 insertions, 4 deletions
diff --git a/gajim/gtk/avatar_selector.py b/gajim/gtk/avatar_selector.py
index 1a7c8d020..c4964a440 100755
--- a/gajim/gtk/avatar_selector.py
+++ b/gajim/gtk/avatar_selector.py
@@ -178,7 +178,9 @@ class AvatarSelector(Gtk.Box):
return scaled_pixbuf, width, height
return pixbuf, width, height
- def get_avatar_surface(self) -> Optional[tuple[cairo.Surface, int, int]]:
+ def get_avatar_surface(self) -> Optional[tuple[cairo.ImageSurface,
+ int,
+ int]]:
pixbuf = self._crop_area.get_pixbuf()
if pixbuf is None:
return None
diff --git a/gajim/gtk/chat_banner.py b/gajim/gtk/chat_banner.py
index 5ba105e21..1166080fe 100644
--- a/gajim/gtk/chat_banner.py
+++ b/gajim/gtk/chat_banner.py
@@ -236,7 +236,7 @@ class ChatBanner(Gtk.Box, EventHelper):
scale = app.window.get_scale_factor()
assert self._contact
surface = self._contact.get_avatar(AvatarSize.CHAT, scale)
- assert isinstance(surface, cairo.Surface)
+ assert isinstance(surface, cairo.ImageSurface)
self._ui.avatar_image.set_from_surface(surface)
def _update_content(self) -> None:
diff --git a/gajim/gtk/profile.py b/gajim/gtk/profile.py
index 87ca800cf..a858e520a 100644
--- a/gajim/gtk/profile.py
+++ b/gajim/gtk/profile.py
@@ -94,7 +94,7 @@ class ProfileWindow(Gtk.ApplicationWindow):
self._add_actions()
self._avatar_selector: Optional[AvatarSelector] = None
- self._current_avatar: Optional[cairo.Surface] = None
+ self._current_avatar: Optional[cairo.ImageSurface] = None
self._current_vcard: Optional[VCard] = None
self._avatar_nick_public: Optional[bool] = None
diff --git a/gajim/gtk/util.py b/gajim/gtk/util.py
index 2e5eebd66..d4d5c0998 100644
--- a/gajim/gtk/util.py
+++ b/gajim/gtk/util.py
@@ -106,7 +106,7 @@ def load_icon_surface(
size: int = 16,
scale: Optional[int] = None,
flags: Gtk.IconLookupFlags = Gtk.IconLookupFlags.FORCE_SIZE
-) -> Optional[cairo.Surface]:
+) -> Optional[cairo.ImageSurface]:
icon_info = load_icon_info(icon_name, size, scale, flags)
if icon_info is None: