Philipp Hörist pushed to branch master at gajim / gajim
Commits:
61ad7836 by Philipp Hörist at 2017-12-08T19:50:48+01:00
Add new interface to raise dialogs
- - - - -
2 changed files:
- + gajim/dialog_messages.py
- gajim/gui_interface.py
Changes:
=====================================
gajim/dialog_messages.py
=====================================
--- /dev/null
+++ b/gajim/dialog_messages.py
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2017 Philipp Hörist <philipp AT hoerist.com>
+#
+# This file is part of Gajim.
+#
+# Gajim is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Gajim is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
+
+from collections import namedtuple
+
+from gi.repository import GLib
+
+from gajim.common.app import app
+
+Message = namedtuple('Message', ['title', 'text', 'dialog'])
+
+messages = {}
+
+
+def get_dialog(name, *args, **kwargs):
+ message = messages.get(name, None)
+ if message is None:
+ raise ValueError('Dialog %s does not exist' % name)
+
+ # Set transient window
+ transient_for = kwargs.get('transient_for', None)
+ if transient_for is None:
+ transient_for = app.get_active_window()
+ else:
+ del kwargs['transient_for']
+
+ if args:
+ message_text = message.text % args
+ else:
+ message_text = message.text % kwargs
+ dialog = message.dialog(message.title,
+ GLib.markup_escape_text(message_text),
+ transient_for=transient_for)
+ return dialog
=====================================
gajim/gui_interface.py
=====================================
--- a/gajim/gui_interface.py
+++ b/gajim/gui_interface.py
@@ -67,6 +67,7 @@ from gajim import gui_menu_builder
from gajim import dialogs
from gajim import notify
from gajim import message_control
+from gajim.dialog_messages import get_dialog
from gajim.chat_control_base import ChatControlBase
from gajim.chat_control import ChatControl
@@ -143,6 +144,10 @@ class Interface:
cls(obj.pri_txt, GLib.markup_escape_text(obj.sec_txt))
+ @staticmethod
+ def raise_dialog(name, *args, **kwargs):
+ get_dialog(name, *args, **kwargs)
+
def handle_ask_new_nick(self, account, room_jid, parent_win):
title = _('Unable to join group chat')
prompt = _('Your desired nickname in group chat\n'
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/61ad783658266a6036dec0287136e34ee0…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/61ad783658266a6036dec0287136e34ee0…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
dc52f560 by Philipp Hörist at 2017-12-08T16:43:11+01:00
Update README.md
- - - - -
1 changed file:
- README.md
Changes:
=====================================
README.md
=====================================
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@
### Optional Runtime Requirements
-- python-pillow for support of webp avatars
+- python3-pil (pillow) for support of webp avatars
- python3-crypto to enable End to end encryption
- python3-gnupg to enable GPG encryption
- For zeroconf (bonjour) you need dbus-glib, python-avahi
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/dc52f560ed5775d001b67e13a26d5f1b4d…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/dc52f560ed5775d001b67e13a26d5f1b4d…
You're receiving this email because of your account on dev.gajim.org.
Yann Leboulanger pushed to branch gajim_0.16 at gajim / gajim
Commits:
12914d5c by Yann Leboulanger at 2017-12-03T20:09:06+01:00
correctly compute file hash when file is received
- - - - -
1 changed file:
- src/gui_interface.py
Changes:
=====================================
src/gui_interface.py
=====================================
--- a/src/gui_interface.py
+++ b/src/gui_interface.py
@@ -1006,7 +1006,8 @@ class Interface:
file_props=file_props))
else:
ft.set_status(file_props, 'stop')
- if file_props.stalled or file_props.paused:
+ if not file_props.completed and (file_props.stalled or \
+ file_props.paused):
return
if file_props.type_ == 'r': # we receive a file
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/12914d5c0b344fe6dfcbe8ac4870d17256…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/12914d5c0b344fe6dfcbe8ac4870d17256…
You're receiving this email because of your account on dev.gajim.org.
Yann Leboulanger pushed to branch master at gajim / gajim
Commits:
2a2217b8 by Yann Leboulanger at 2017-12-03T15:44:59+01:00
also check for W0102 warning (when mutable value is used as default
argument)
- - - - -
1 changed file:
- .gitlab-ci.yml
Changes:
=====================================
.gitlab-ci.yml
=====================================
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,7 +14,7 @@ run-test:
run-pylint:
stage: test
script:
- - pylint3 --additional-builtins=_ --disable=all --enable=E0001,E0011,E0012,E0100,E0101,E0102,E0103,E0104,E0105,E0106,E0107,E0108,E0202,E0221,E0222,E0235,E0501,E0502,E0503,E0602,E0603,E0604,E0701,E0702,E1001,E1002,E1003,E1004,E1111,E1120,E1121,E1122,E1123,E1124,E1125,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,E1310,E1700,E1701 gajim
+ - pylint3 --additional-builtins=_ --disable=all --enable=E0001,E0011,E0012,E0100,E0101,E0102,E0103,E0104,E0105,E0106,E0107,E0108,E0202,E0221,E0222,E0235,E0501,E0502,E0503,E0602,E0603,E0604,E0701,E0702,E1001,E1002,E1003,E1004,E1111,E1120,E1121,E1122,E1123,E1124,E1125,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,E1310,E1700,E1701,W0102 gajim
run-build:
stage: build
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/2a2217b80e5c75827f380c5889ab5a1116…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/2a2217b80e5c75827f380c5889ab5a1116…
You're receiving this email because of your account on dev.gajim.org.