Philipp Hörist pushed to branch gajim_1.2 at gajim / gajim
Commits:
0aefeeae by André Apitzsch at 2020-06-30T20:07:16+02:00
PluginManager: Fix string format
- - - - -
85c1c835 by lovetox at 2020-06-30T20:07:16+02:00
PluginManager: Load plugins on Windows correctly
On Windows we ship compiled files
- - - - -
1 changed file:
- gajim/plugins/pluginmanager.py
Changes:
=====================================
gajim/plugins/pluginmanager.py
=====================================
@@ -79,7 +79,7 @@ class Plugin:
shipped = is_shipped_plugin(path)
manifest = path / 'manifest.ini'
if not manifest.exists() and not manifest.is_dir():
- raise ValueError('Not a plugin path: {path}')
+ raise ValueError(f'Not a plugin path: {path}')
conf = configparser.ConfigParser()
conf.remove_section('info')
@@ -130,11 +130,15 @@ class Plugin:
path=path)
def load_module(self):
- moduel_path = self.path / '__init__.py'
+ module_path = self.path / '__init__.py'
+ if not module_path.exists():
+ # On Windows we only ship compiled files
+ module_path = self.path/ '__init__.pyc'
+
module_name = self.path.stem
try:
- spec = spec_from_file_location(module_name, moduel_path)
+ spec = spec_from_file_location(module_name, module_path)
if spec is None:
return None
module = module_from_spec(spec)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/c57db6dddd8cbbb09b5290fb348207b…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/c57db6dddd8cbbb09b5290fb348207b…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
c057c605 by lovetox at 2020-06-30T20:05:26+02:00
PluginManager: Load plugins on Windows correctly
On Windows we ship compiled files
- - - - -
1 changed file:
- gajim/plugins/pluginmanager.py
Changes:
=====================================
gajim/plugins/pluginmanager.py
=====================================
@@ -130,11 +130,15 @@ class Plugin:
path=path)
def load_module(self):
- moduel_path = self.path / '__init__.py'
+ module_path = self.path / '__init__.py'
+ if not module_path.exists():
+ # On Windows we only ship compiled files
+ module_path = self.path/ '__init__.pyc'
+
module_name = self.path.stem
try:
- spec = spec_from_file_location(module_name, moduel_path)
+ spec = spec_from_file_location(module_name, module_path)
if spec is None:
return None
module = module_from_spec(spec)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/c057c605e3a0a7831e6870bf6bc52655…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/c057c605e3a0a7831e6870bf6bc52655…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
ca4c2d67 by André Apitzsch at 2020-06-30T11:22:22+02:00
PluginManager: Fix string format
- - - - -
1 changed file:
- gajim/plugins/pluginmanager.py
Changes:
=====================================
gajim/plugins/pluginmanager.py
=====================================
@@ -79,7 +79,7 @@ class Plugin:
shipped = is_shipped_plugin(path)
manifest = path / 'manifest.ini'
if not manifest.exists() and not manifest.is_dir():
- raise ValueError('Not a plugin path: {path}')
+ raise ValueError(f'Not a plugin path: {path}')
conf = configparser.ConfigParser()
conf.remove_section('info')
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/ca4c2d6764febae03c56171c21a565cb…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/ca4c2d6764febae03c56171c21a565cb…
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:
dafb82e8 by lovetox at 2020-06-29T20:26:39+02:00
Client: Determine allowed type and protocol correctly
Returns now the type and protocol set via custom_host instead of falling back to the allowed default type and protocol
- - - - -
1 changed file:
- nbxmpp/client.py
Changes:
=====================================
nbxmpp/client.py
=====================================
@@ -244,6 +244,8 @@ class Client(Observable):
@property
def connection_types(self):
+ if self._custom_host is not None:
+ return [self._custom_host[2]]
return list(self._allowed_con_types or [ConnectionType.DIRECT_TLS,
ConnectionType.START_TLS])
@@ -263,6 +265,8 @@ class Client(Observable):
@property
def protocols(self):
+ if self._custom_host is not None:
+ return [self._custom_host[1]]
return list(self._allowed_protocols or [ConnectionProtocol.TCP,
ConnectionProtocol.WEBSOCKET])
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/dafb82e82694cace846fb114…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/dafb82e82694cace846fb114…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
4010161a by lovetox at 2020-06-28T23:37:17+02:00
Plugins: Don't fail if plugins dir does not exist
- - - - -
1 changed file:
- gajim/plugins/helpers.py
Changes:
=====================================
gajim/plugins/helpers.py
=====================================
@@ -127,5 +127,7 @@ def get_builder(file_name: str, widgets: List[str] = None) -> Builder:
def is_shipped_plugin(path):
base = Path(configpaths.get('PLUGINS_BASE'))
+ if not base.exists():
+ return False
plugin_parent = Path(path).parent
return base.samefile(plugin_parent)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/4010161a203a6aa0f60cbea246539063…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/4010161a203a6aa0f60cbea246539063…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
9ee85427 by wurstsalat at 2020-06-28T22:04:27+02:00
Encryption menu: Make 'disabled' item translatable
- - - - -
1 changed file:
- gajim/gui_menu_builder.py
Changes:
=====================================
gajim/gui_menu_builder.py
=====================================
@@ -749,7 +749,8 @@ def build_accounts_menu():
def get_encryption_menu(control_id, control_type, zeroconf=False):
menu = Gio.Menu()
menu.append(
- 'Disabled', 'win.set-encryption-{}::{}'.format(control_id, 'disabled'))
+ _('Disabled'),
+ 'win.set-encryption-{}::{}'.format(control_id, 'disabled'))
for name, plugin in app.plugin_manager.encryption_plugins.items():
if control_type.is_groupchat:
if not hasattr(plugin, 'allow_groupchat'):
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/9ee8542755216985b2a89c18f7e82fe3…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/9ee8542755216985b2a89c18f7e82fe3…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
e195994b by lovetox at 2020-06-27T20:05:03+02:00
Interface: Use rsplit for extracting the port
- - - - -
1 changed file:
- gajim/gui_interface.py
Changes:
=====================================
gajim/gui_interface.py
=====================================
@@ -1533,7 +1533,7 @@ class Interface:
config['use_custom_host'] = use_custom_host
if custom_host:
host, _protocol, type_ = custom_host
- host, port = host.split(':')
+ host, port = host.rsplit(':', maxsplit=1)
config['custom_port'] = int(port)
config['custom_host'] = host
config['custom_type'] = type_.value
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/e195994b75feed11231d147ef66c648d…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/e195994b75feed11231d147ef66c648d…
You're receiving this email because of your account on dev.gajim.org.