Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
1a359df9 by lovetox at 2021-12-17T21:08:35+01:00
BaseError: Use correct method signature for get_text()
- - - - -
1 changed file:
- nbxmpp/errors.py
Changes:
=====================================
nbxmpp/errors.py
=====================================
@@ -32,7 +32,7 @@ class BaseError(Exception):
def __str__(self):
return self.text
- def get_text(self):
+ def get_text(self, pref_lang=None):
return self.text
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/1a359df9c6433ffaeb725cd1…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/1a359df9c6433ffaeb725cd1…
You're receiving this email because of your account on dev.gajim.org.
Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
5ffba61d by wurstsalat at 2021-12-16T20:53:59+01:00
ChatList: Fix nick spacing
- - - - -
d907f1b8 by wurstsalat at 2021-12-16T20:53:59+01:00
Notifications: Markup escape title and text
- - - - -
e4e58e7c by wurstsalat at 2021-12-16T21:05:59+01:00
Settings: Remove show_ascii_formatting_chars
- - - - -
c92f686e by wurstsalat at 2021-12-16T21:14:04+01:00
Settings: Remove opened_chat_controls account setting
- - - - -
699d7e6c by wurstsalat at 2021-12-16T21:18:00+01:00
Settings: Remove collapsed_rows
- - - - -
3 changed files:
- gajim/common/setting_values.py
- gajim/gtk/chat_list.py
- gajim/gtk/notification.py
Changes:
=====================================
gajim/common/setting_values.py
=====================================
@@ -32,7 +32,6 @@ class _ACCOUNT_DEFAULT:
'trayicon': 'always',
'allow_hide_roster': False,
'iconset': 'dcraven',
- 'collapsed_rows': '',
'roster_theme': 'default',
'sort_by_show_in_roster': True,
'sort_by_show_in_muc': False,
@@ -41,7 +40,6 @@ class _ACCOUNT_DEFAULT:
'speller_language': '',
'emoticons_theme': 'noto-emoticons',
'ascii_formatting': True,
- 'show_ascii_formatting_chars': True,
'sounds_on': True,
'gc_refer_to_nick_char': ',',
'mainwin_x_position': 0,
@@ -201,7 +199,6 @@ class _ACCOUNT_DEFAULT:
'roster_version': '',
'subscription_request_msg': '',
'ft_send_local_ips': True,
- 'opened_chat_controls': '',
'recent_groupchats': '',
'filetransfer_preference': 'httpupload',
'send_chatstate_default': 'composing_only',
@@ -332,7 +329,6 @@ class _ACCOUNT_DEFAULT:
'app': {
'allow_hide_roster': _('Allow to hide the contact list window even if the notification area icon is not shown.'),
'ascii_formatting': _('Treat * / _ pairs as possible formatting characters.'),
- 'show_ascii_formatting_chars': _('If enabled, do not remove */_ . So *abc* will be bold but with * * not removed.'),
'gc_refer_to_nick_char': _('Character to add after nickname when using nickname completion (tab) in group chat.'),
'save_main_window_position': _('If enabled, Gajim will save the main window position when hiding it, and restore it when showing the window again.'),
'time_stamp': _('This option lets you customize the timestamp that is printed in conversation. For example \'[%H:%M] \' will show \'[hour:minute] \'. See python doc on strftime for full documentation (https://docs.python.org/3/library/time.html#time.strftime).'),
=====================================
gajim/gtk/chat_list.py
=====================================
@@ -581,7 +581,7 @@ def __init__(self, workspace_id: str, account: str, jid: JID, type_: str,
if line.contact_name == our_nick:
self._ui.nick_label.set_text(_('Me:'))
else:
- self._ui.nick_label.set_text(_('%(muc_nick)s: ') % {
+ self._ui.nick_label.set_text(_('%(muc_nick)s:') % {
'muc_nick': line.contact_name})
self._ui.nick_label.show()
=====================================
gajim/gtk/notification.py
=====================================
@@ -206,6 +206,9 @@ def _issue_notification(self,
if timeout < 0:
timeout = app.settings.get('notification_timeout')
+ title = GLib.markup_escape_text(title)
+ text = GLib.markup_escape_text(text)
+
if sys.platform == 'win32':
self._withdraw()
self._win32_active_popup = PopupNotification(
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/fea3b71a2ed85a25000e7d5d42fc81d…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/fea3b71a2ed85a25000e7d5d42fc81d…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
fea3b71a by lovetox at 2021-12-16T20:51:15+01:00
CodeWidget: Add type annotations
- - - - -
1 changed file:
- gajim/gtk/conversation/code_widget.py
Changes:
=====================================
gajim/gtk/conversation/code_widget.py
=====================================
@@ -12,6 +12,7 @@
# You should have received a copy of the GNU General Public License
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
+from typing import Any
from typing import Tuple
from typing import Optional
@@ -25,6 +26,8 @@
from gajim.common import ged
from gajim.common.i18n import _
+from gajim.common.styling import PreBlock
+
log = logging.getLogger('gajim.gui.conversation.code_widget')
@@ -61,12 +64,12 @@ def __init__(self, account: str) -> None:
self.add(self._scrolled)
- def _on_copy(self, _button):
+ def _on_copy(self, _button: Gtk.Button) -> None:
text = self._textview.get_code()
clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
clipboard.set_text(text, -1)
- def add_content(self, block):
+ def add_content(self, block: PreBlock):
code, lang = self._prepare_code(block.text)
lang_name = self._textview.set_language(lang)
if lang is None:
@@ -107,7 +110,7 @@ def __init__(self) -> None:
if style_scheme is not None:
self.get_buffer().set_style_scheme(style_scheme)
- def _get_style_scheme(self):
+ def _get_style_scheme(self) -> Optional[GtkSource.StyleScheme]:
if app.css_config.prefer_dark:
style_scheme = self._style_scheme_manager.get_scheme(
'solarized-dark')
@@ -116,12 +119,12 @@ def _get_style_scheme(self):
'solarized-light')
return style_scheme
- def _on_style_changed(self, *args):
+ def _on_style_changed(self, *args: Any) -> None:
style_scheme = self._get_style_scheme()
if style_scheme is not None:
self.get_buffer().set_style_scheme(style_scheme)
- def set_language(self, language_string: Optional[str]) -> None:
+ def set_language(self, language_string: Optional[str]) -> str:
if language_string is None:
language_string = 'python3'
@@ -129,6 +132,8 @@ def set_language(self, language_string: Optional[str]) -> None:
if lang is None:
lang = self._source_manager.get_language('python3')
+ assert lang is not None
+
log.debug('Code snippet lang: %s', lang.get_name())
self.get_buffer().set_language(lang)
return lang.get_name()
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/fea3b71a2ed85a25000e7d5d42fc81d6…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/fea3b71a2ed85a25000e7d5d42fc81d6…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
9f8e2bda by lovetox at 2021-12-16T20:02:31+01:00
CodeWidget: Handle not available languages
Fixes #10726
- - - - -
1 changed file:
- gajim/gtk/conversation/code_widget.py
Changes:
=====================================
gajim/gtk/conversation/code_widget.py
=====================================
@@ -123,9 +123,12 @@ def _on_style_changed(self, *args):
def set_language(self, language_string: Optional[str]) -> None:
if language_string is None:
+ language_string = 'python3'
+
+ lang = self._source_manager.get_language(language_string)
+ if lang is None:
lang = self._source_manager.get_language('python3')
- else:
- lang = self._source_manager.get_language(language_string)
+
log.debug('Code snippet lang: %s', lang.get_name())
self.get_buffer().set_language(lang)
return lang.get_name()
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/9f8e2bda648f0b66f33221e37b4b0552…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/9f8e2bda648f0b66f33221e37b4b0552…
You're receiving this email because of your account on dev.gajim.org.