Philipp Hörist pushed to branch master at gajim / gajim
Commits:
0e9aed6a by André Apitzsch at 2020-11-07T15:55:20+01:00
MusicTrackListener: Get currently playing song asynchronously
Fixes #10339.
- - - - -
1 changed file:
- gajim/common/dbus/music_track.py
Changes:
=====================================
gajim/common/dbus/music_track.py
=====================================
@@ -93,9 +93,7 @@ def start(self):
self._add_player(name)
for name in list(self.players):
- info = self._get_playing_track(name)
- if info is not None:
- self._emit(info)
+ self._get_playing_track(name)
def stop(self):
for name in list(self.players):
@@ -154,10 +152,7 @@ def _signal_received(self,
'''Signal handler for PropertiesChanged event'''
log.info('Signal received: %s - %s', interface_name, parameters)
-
- info = self._get_playing_track(user_data[0])
-
- self._emit(info)
+ self._get_playing_track(user_data[0])
@staticmethod
def _get_music_info(properties):
@@ -189,18 +184,23 @@ def _get_playing_track(self, name):
'org.freedesktop.DBus.Properties',
None)
- try:
- result = proxy.call_sync(
- "GetAll",
- GLib.Variant('(s)', ('org.mpris.MediaPlayer2.Player',)),
- Gio.DBusCallFlags.NONE,
- -1,
- None)
- except GLib.Error as error:
- log.debug("Could not enable music listener: %s", error.message)
- return None
+ def proxy_call_finished(proxy, res):
+ try:
+ result = proxy.call_finish(res)
+ except GLib.Error as error:
+ log.debug("Could not enable music listener: %s", error.message)
+ return
+
+ info = self._get_music_info(result[0])
+ if info is not None:
+ self._emit(info)
- return self._get_music_info(result[0])
+ proxy.call("GetAll",
+ GLib.Variant('(s)', ('org.mpris.MediaPlayer2.Player',)),
+ Gio.DBusCallFlags.NONE,
+ -1,
+ None,
+ proxy_call_finished)
def enable():
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/0e9aed6a32099ef88fdfd763a000417f…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/0e9aed6a32099ef88fdfd763a000417f…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
229d84f3 by André Apitzsch at 2020-11-07T14:54:54+01:00
Windows: Remove unused function from build script
- - - - -
9d949958 by André Apitzsch at 2020-11-07T15:01:03+01:00
Windows: Fix build instructions
- - - - -
26a8b374 by André Apitzsch at 2020-11-07T15:07:36+01:00
Windows: Clean up build instructions
- - - - -
2 changed files:
- win/README.md
- win/_base.sh
Changes:
=====================================
win/README.md
=====================================
@@ -1,32 +1,26 @@
# Windows Installer
-We use [msys2](http://www.msys2.org/) for creating the Windows installer
+We use [msys2](https://www.msys2.org/) for creating the Windows installer
and development on Windows.
-### Development
------------
+## Development
-Download [msys2](http://www.msys2.org/) (msys2-x86_64-xxx.exe) and follow the install instructions on the [msys2](http://www.msys2.org/) startpage (**Important!**)
+Download [msys2](https://www.msys2.org/) (msys2-x86_64-xxx.exe) and follow the install instructions on the [msys2](https://www.msys2.org/) startpage (**Important!**)
* Fork the master branch on dev.gajim.org
-* Execute ``C:\msys64\msys2_shell.cmd -mingw64``
-* Run ``pacman -S git`` to install git
-* Run ``git clone https://dev.gajim.org/USERNAME/gajim.git``
-* Run ``cd gajim/win`` to end up where this README exists.
-* Execute ``./dev_env.sh`` to install all the needed dependencies.
-* Now go to the git root dir ``cd ..``
-* Launch Gajim ``./launch.py``
+* Execute `C:\msys64\msys2_shell.cmd -mingw64`
+* Run `pacman -S git` to install git
+* Run `git clone https://dev.gajim.org/USERNAME/gajim.git`
+* Run `cd gajim/win` to end up where this README exists.
+* Execute `./dev_env.sh` to install all the needed dependencies.
+* Now go to the git root dir `cd ..`
+* Launch Gajim `./launch.py`
-### Build Gajim / Creating an Installer
----------------------
+## Build Gajim / Create an Installer
-Follow the steps in the Development section, but instead of ``./dev_env.sh`` execute ``./build.sh``.
-
-You can supply a git tag ``./build.sh [git-tag]``.
-
-Or dont supply it, then current HEAD is build.
+Follow the steps in the Development section, but instead of `./dev_env.sh` execute `./build.sh i686` or `./build.sh x86_64`.
Both the installer and the portable installer should appear in ``C:\msys64\home\USER\gajim\win\_build_root``.
=====================================
win/_base.sh
=====================================
@@ -72,12 +72,6 @@ function create_root {
build_pacman --noconfirm -S base
}
-function download_install_dep () {
- curl -o "${BUILD_ROOT}"/mingw-w64-"${ARCH}"-"$1"-any.pkg.tar.xz \
- http://repo.msys2.org/mingw/"${ARCH}"/mingw-w64-"${ARCH}"-"$1"-any.pkg.tar.xz
- build_pacman --noconfirm -U "${BUILD_ROOT}"/mingw-w64-"${ARCH}"-"$1"-any.pkg.tar.xz
-}
-
function install_deps {
build_pacman --noconfirm -S mingw-w64-"${ARCH}"-"${PYTHON_ID}" \
mingw-w64-"${ARCH}"-"${PYTHON_ID}"-gobject \
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/9980d079dc1e25757ff2f4ed293c7b5…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/9980d079dc1e25757ff2f4ed293c7b5…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
57a438b2 by lovetox at 2020-11-07T14:00:00+01:00
Task: Don’t allow to cancel a finished task
- - - - -
1 changed file:
- nbxmpp/task.py
Changes:
=====================================
nbxmpp/task.py
=====================================
@@ -137,7 +137,7 @@ class Task:
return self._state
def add_done_callback(self, callback, weak=True):
- if self._state in (TaskState.FINISHED, TaskState.CANCELLED):
+ if self._state.is_finished or self._state.is_cancelled:
raise RuntimeError('Task is finished')
if weak:
@@ -169,7 +169,7 @@ class Task:
def _sub_task_completed(self, task):
self._sub_task = None
- if self._state.is_cancelled:
+ if not self._state.is_running:
return
result = task.get_result()
@@ -263,7 +263,7 @@ class Task:
self._finalize_context = context
def cancel(self):
- if self._state.is_cancelled:
+ if not self._state.is_running:
return
self._state = TaskState.CANCELLED
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/57a438b2209863d50978afbe…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/57a438b2209863d50978afbe…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
d5d99c66 by lovetox at 2020-11-03T18:00:05+01:00
HTTPUpload: Correctly unpack headers
Fixes #10337
- - - - -
1 changed file:
- gajim/common/modules/httpupload.py
Changes:
=====================================
gajim/common/modules/httpupload.py
=====================================
@@ -217,7 +217,7 @@ def _upload_file(self, transfer):
message.props.request_headers.set_content_type(transfer.mime, None)
message.props.request_headers.set_content_length(transfer.size)
- for name, value in transfer.headers:
+ for name, value in transfer.headers.items():
message.props.request_headers.append(name, value)
message.connect('wrote-headers', self._on_wrote_headers, transfer)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/d5d99c66b8b6ec014621b620caf1b12c…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/d5d99c66b8b6ec014621b620caf1b12c…
You're receiving this email because of your account on dev.gajim.org.