forked from hasufell/hasufell-repository
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
4690dbf230
|
|||
|
|
0167ad861e | ||
|
|
b233d5d7c3 | ||
|
|
97b7f2f95f | ||
|
|
fbd87f95a0 | ||
|
|
afcb6da399 | ||
|
|
be19ecd345 | ||
|
|
b58f75baf1 | ||
|
|
898e90b0bd | ||
|
|
34d815c02b | ||
|
|
5614a7ae97 | ||
|
|
efffd2ee32 | ||
|
|
61d363930a | ||
| d763c528dc | |||
|
63f64a1e98
|
|||
| 190312ad0c | |||
|
d1bc53f91d
|
|||
|
|
e127e9c07d |
@@ -0,0 +1,25 @@
|
||||
Upstream: Yes
|
||||
|
||||
From 08c503bdd1e128118e45fa50be256e27415bbd41 Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Georgescu <ag@ag-projects.com>
|
||||
Date: Sat, 1 Jan 2022 15:19:37 +0000
|
||||
Subject: [PATCH] collections.MutableMapping was deprecated since Python 3.3
|
||||
|
||||
---
|
||||
application/python/weakref.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/application/python/weakref.py b/application/python/weakref.py
|
||||
index a785a7e..38fd664 100644
|
||||
--- a/application/python/weakref.py
|
||||
+++ b/application/python/weakref.py
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
import weakref
|
||||
|
||||
-from collections import MutableMapping, deque
|
||||
+from collections.abc import MutableMapping
|
||||
+from collections import deque
|
||||
from copy import deepcopy
|
||||
from threading import local
|
||||
|
||||
@@ -15,4 +15,7 @@ MYOPTIONS=""
|
||||
DEPENDENCIES="
|
||||
dev-python/zopeinterface[python_abis:*(-)?]
|
||||
"
|
||||
DEFAULT_SRC_PREPARE_PATCHES=(
|
||||
"${FILES}"/08c503bdd1e128118e45fa50be256e27415bbd41.patch
|
||||
)
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ DEPENDENCIES="
|
||||
|
||||
DEFAULT_SRC_PREPARE_PATCHES=(
|
||||
"${FILES}/${PN}-data-path.patch"
|
||||
"${FILES}/33c7f377d173d27b4611d061ca36077805250e78.patch"
|
||||
)
|
||||
|
||||
src_install() {
|
||||
@@ -0,0 +1,122 @@
|
||||
Upstream: Yes
|
||||
|
||||
From 33c7f377d173d27b4611d061ca36077805250e78 Mon Sep 17 00:00:00 2001
|
||||
From: Jose Lopes <josemslopes@gmail.com>
|
||||
Date: Tue, 8 Feb 2022 08:11:57 +0000
|
||||
Subject: [PATCH] Solve issues with python 3.10
|
||||
|
||||
GH-3
|
||||
---
|
||||
blink/chatwindow.py | 3 ++-
|
||||
blink/sessions.py | 6 +++---
|
||||
blink/widgets/buttons.py | 4 ++--
|
||||
blink/widgets/lineedit.py | 14 +++++++-------
|
||||
blink/widgets/video.py | 2 +-
|
||||
5 files changed, 15 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/blink/chatwindow.py b/blink/chatwindow.py
|
||||
index e55f590..40da6de 100644
|
||||
--- a/blink/chatwindow.py
|
||||
+++ b/blink/chatwindow.py
|
||||
@@ -18,7 +18,8 @@
|
||||
from application.python.descriptor import WriteOnceAttribute
|
||||
from application.python.types import MarkerType
|
||||
from application.system import makedirs
|
||||
-from collections import MutableSet, deque
|
||||
+from collections.abc import MutableSet
|
||||
+from collections import deque
|
||||
from datetime import datetime, timedelta
|
||||
from itertools import count
|
||||
from lxml import etree, html
|
||||
diff --git a/blink/sessions.py b/blink/sessions.py
|
||||
index 9805515..9928831 100644
|
||||
--- a/blink/sessions.py
|
||||
+++ b/blink/sessions.py
|
||||
@@ -5094,13 +5094,13 @@ def showEvent(self, event):
|
||||
total_width = width + window_frame_size.width()
|
||||
total_height = height + window_frame_size.height()
|
||||
|
||||
- x = limit(screen_geometry.center().x() - total_width/2, min=available_geometry.left(), max=available_geometry.right()-total_width)
|
||||
+ x = int(limit(screen_geometry.center().x() - total_width/2, min=available_geometry.left(), max=available_geometry.right()-total_width))
|
||||
if slot is None:
|
||||
y = -1
|
||||
elif slot % 2 == 0:
|
||||
- y = screen_geometry.center().y() + (slot-1)*total_height/2
|
||||
+ y = int(screen_geometry.center().y() + (slot-1)*total_height/2)
|
||||
else:
|
||||
- y = screen_geometry.center().y() - slot*total_height/2
|
||||
+ y = int(screen_geometry.center().y() - slot*total_height/2)
|
||||
|
||||
if available_geometry.top() <= y <= available_geometry.bottom() - total_height:
|
||||
self.setGeometry(x, y, width, height)
|
||||
diff --git a/blink/widgets/buttons.py b/blink/widgets/buttons.py
|
||||
index c3b18bf..72aefd5 100644
|
||||
--- a/blink/widgets/buttons.py
|
||||
+++ b/blink/widgets/buttons.py
|
||||
@@ -620,8 +620,8 @@ def pixmap(self, mode=QIcon.Normal, state=QIcon.Off):
|
||||
return pixmap
|
||||
|
||||
size = max(pixmap.width(), pixmap.height())
|
||||
- offset_x = (size - pixmap.width())/2
|
||||
- offset_y = (size - pixmap.height())/2
|
||||
+ offset_x = int((size - pixmap.width())/2)
|
||||
+ offset_y = int((size - pixmap.height())/2)
|
||||
|
||||
new_pixmap = QPixmap(size, size)
|
||||
new_pixmap.fill(Qt.transparent)
|
||||
diff --git a/blink/widgets/lineedit.py b/blink/widgets/lineedit.py
|
||||
index ee63e81..f03ac54 100644
|
||||
--- a/blink/widgets/lineedit.py
|
||||
+++ b/blink/widgets/lineedit.py
|
||||
@@ -68,13 +68,13 @@ def _update_side_widget_locations(self):
|
||||
text_rect.adjust(spacing, 0, -spacing, 0)
|
||||
mid_height = text_rect.center().y() + 1 - (text_rect.height() % 2) # need -1 correction for odd heights -Dan
|
||||
if self.left_layout.count() > 0:
|
||||
- left_height = mid_height - self.left_widget.height()/2
|
||||
+ left_height = int(mid_height - self.left_widget.height()/2)
|
||||
left_width = self.left_widget.width()
|
||||
if left_width == 0:
|
||||
- left_height = mid_height - self.left_widget.sizeHint().height()/2
|
||||
+ left_height = int(mid_height - self.left_widget.sizeHint().height()/2)
|
||||
self.left_widget.move(text_rect.x(), left_height)
|
||||
text_rect.setX(self.left_margin)
|
||||
- text_rect.setY(mid_height - self.right_widget.sizeHint().height()/2.0)
|
||||
+ text_rect.setY(int(mid_height - self.right_widget.sizeHint().height()/2.0))
|
||||
text_rect.setHeight(self.right_widget.sizeHint().height())
|
||||
self.right_widget.setGeometry(text_rect)
|
||||
|
||||
@@ -201,8 +201,8 @@ def __init__(self, parent=None, size=16):
|
||||
def paintEvent(self, event):
|
||||
painter = QPainter(self)
|
||||
if self.icon is not None:
|
||||
- x = (self.width() - self.icon.width()) / 2
|
||||
- y = (self.height() - self.icon.height()) / 2
|
||||
+ x = int((self.width() - self.icon.width()) / 2)
|
||||
+ y = int((self.height() - self.icon.height()) / 2)
|
||||
painter.drawPixmap(x, y, self.icon)
|
||||
|
||||
|
||||
@@ -232,8 +232,8 @@ def paintEvent(self, event):
|
||||
painter = QPainter(self)
|
||||
icon = self.icon_pressed if self.isDown() else self.icon
|
||||
if icon is not None:
|
||||
- x = (self.width() - icon.width()) / 2
|
||||
- y = (self.height() - icon.height()) / 2
|
||||
+ x = int((self.width() - icon.width()) / 2)
|
||||
+ y = int((self.height() - icon.height()) / 2)
|
||||
painter.drawPixmap(x, y, icon)
|
||||
else:
|
||||
width = self.width()
|
||||
diff --git a/blink/widgets/video.py b/blink/widgets/video.py
|
||||
index eff4f7c..5ecab6a 100644
|
||||
--- a/blink/widgets/video.py
|
||||
+++ b/blink/widgets/video.py
|
||||
@@ -56,7 +56,7 @@ def __init__(self, parent=None, framerate=None):
|
||||
self.cursors.resize_bottom = QCursor(QIcon(Resources.get('icons/resize-bottom.svg')).pixmap(16), hotX=8, hotY=16)
|
||||
if framerate is not None:
|
||||
self._clock = QTimer()
|
||||
- self._clock.setInterval(1000/framerate)
|
||||
+ self._clock.setInterval(int(1000/framerate))
|
||||
self._clock.timeout.connect(self.update)
|
||||
else:
|
||||
self._clock = None
|
||||
@@ -40,7 +40,6 @@ DEPENDENCIES="
|
||||
x11-dri/mesa
|
||||
)
|
||||
run:
|
||||
dev-lang/python:*[>3.5] [[ note = [ bin/compton-convgen.py ] ]]
|
||||
x11-apps/xprop
|
||||
x11-apps/xwininfo
|
||||
"
|
||||
@@ -50,6 +49,7 @@ DEFAULT_SRC_INSTALL_EXTRA_DOCS=(
|
||||
)
|
||||
|
||||
MESON_SRC_CONFIGURE_PARAMS=(
|
||||
"-Dcompton=false"
|
||||
"-Dunittest=true"
|
||||
"-Dwith_docs=true"
|
||||
)
|
||||
@@ -59,13 +59,6 @@ MESON_SRC_CONFIGURE_OPTION_SWITCHES=(
|
||||
"opengl"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
meson_src_prepare
|
||||
# don't install compat symlink
|
||||
# this script is also broken
|
||||
echo "#!/bin/sh" > meson/install.sh
|
||||
}
|
||||
|
||||
src_install() {
|
||||
meson_src_install
|
||||
option dbus && dodoc -r dbus-examples
|
||||
Reference in New Issue
Block a user