Philipp Hörist pushed to branch gajim_1.2 at gajim / gajim
Commits:
a9ed3dc9 by Daniel Brötzmann at 2020-07-08T20:30:59+02:00
Roster: Allow to add contacts from Not in contact list group via DND
- - - - -
2de6911d by Daniel Brötzmann at 2020-07-08T20:30:59+02:00
Roster: Allow sending messages to multiple groups
- - - - -
b7aa4aa9 by Daniel Brötzmann at 2020-07-08T20:30:59+02:00
InviteMenu: Create menuitem before checking for Transports group
Otherwise modifying this menuitem later will fail (UnboundLocalError)
- - - - -
67058ada by lovetox at 2020-07-08T20:31:00+02:00
Raise nbxmpp version
- - - - -
182b7be7 by Daniel Brötzmann at 2020-07-08T20:31:00+02:00
AccountWizard: Anonymous login wording
- - - - -
3 changed files:
- gajim/gajim.py
- gajim/gtk/account_wizard.py
- gajim/roster_window.py
Changes:
=====================================
gajim/gajim.py
=====================================
@@ -26,7 +26,7 @@ from packaging.version import Version as V
from gajim.common import i18n
-_MIN_NBXMPP_VER = '1.0.0'
+_MIN_NBXMPP_VER = '1.0.1'
_MIN_GTK_VER = '3.22.27'
_MIN_CAIRO_VER = '1.16.0'
_MIN_PYGOBJECT_VER = '3.32.0'
=====================================
gajim/gtk/account_wizard.py
=====================================
@@ -363,7 +363,8 @@ class AccountWizard(Assistant):
if error == 'anonymous-not-supported':
self._show_error_page(_('Anonymous login not supported'),
_('Anonymous login not supported'),
- _('This server does not support anonymous'))
+ _('This server does not support '
+ 'anonymous login.'))
else:
self._show_error_page(_('Authentication failed'),
SASL_ERRORS.get(error),
=====================================
gajim/roster_window.py
=====================================
@@ -4240,6 +4240,13 @@ class RosterWindow:
# we may not add contacts from special_groups
if grp_source in helpers.special_groups:
+ if grp_source == _('Not in contact list'):
+ AddNewContactWindow(
+ account=account_dest,
+ contact_jid=jid_source,
+ user_nick=c_source.name,
+ group=grp_dest)
+ return
return
# Is the contact we drag a meta contact?
@@ -4775,38 +4782,49 @@ class RosterWindow:
menu.show_all()
menu.popup(None, None, None, None, event_button, event.time)
- def make_group_menu(self, event, titer):
+ def make_group_menu(self, event, iters):
"""
Make group's popup menu
"""
model = self.modelfilter
- group = model[titer][Column.JID]
- account = model[titer][Column.ACCOUNT]
+ groups = []
+ accounts = []
- list_ = [] # list of (contact, account) tuples
- list_online = [] # list of (contact, account) tuples
+ list_ = [] # list of (contact, account) tuples
+ list_online = [] # list of (contact, account) tuples
+
+ for titer in iters:
+ groups.append(model[titer][Column.JID])
+ accounts.append(model[titer][Column.ACCOUNT])
+ # Don't show menu if groups of more than one account are selected
+ if accounts[0] != model[titer][Column.ACCOUNT]:
+ return
+ account = accounts[0]
show_bookmarked = True
- group = model[titer][Column.JID]
for jid in app.contacts.get_jid_list(account):
contact = app.contacts.get_contact_with_highest_priority(account,
jid)
- if group in contact.get_shown_groups():
- if contact.show not in ('offline', 'error'):
- list_online.append((contact, account))
- # Check that all contacts support direct NUC invite
- if not contact.supports(Namespace.CONFERENCE):
- show_bookmarked = False
- list_.append((contact, account))
+ for group in groups:
+ if group in contact.get_shown_groups():
+ if contact.show not in ('offline', 'error'):
+ list_online.append((contact, account))
+ # Check that all contacts support direct NUC invite
+ if not contact.supports(Namespace.CONFERENCE):
+ show_bookmarked = False
+ list_.append((contact, account))
menu = Gtk.Menu()
# Make special context menu if group is Groupchats
- if group == _('Group chats'):
- maximize_menuitem = Gtk.MenuItem.new_with_mnemonic(_(
- '_Maximize All'))
- maximize_menuitem.connect('activate',
- self.on_all_groupchat_maximized, list_)
- menu.append(maximize_menuitem)
+ if _('Group chats') in groups:
+ if len(groups) == 1:
+ maximize_menuitem = Gtk.MenuItem.new_with_mnemonic(
+ _('_Maximize All'))
+ maximize_menuitem.connect('activate',
+ self.on_all_groupchat_maximized, list_)
+ menu.append(maximize_menuitem)
+ else:
+ return
else:
# Send Group Message
send_group_message_item = Gtk.MenuItem.new_with_mnemonic(
@@ -4831,10 +4849,9 @@ class RosterWindow:
self.on_send_single_message_menuitem_activate, account, list_)
# Invite to
- if group != _('Transports'):
- invite_menuitem = Gtk.MenuItem.new_with_mnemonic(
- _('In_vite to'))
-
+ invite_menuitem = Gtk.MenuItem.new_with_mnemonic(
+ _('In_vite to'))
+ if _('Transports') not in groups:
gui_menu_builder.build_invite_submenu(invite_menuitem,
list_online, show_bookmarked=show_bookmarked)
menu.append(invite_menuitem)
@@ -4847,7 +4864,14 @@ class RosterWindow:
send_group_message_item.set_sensitive(False)
invite_menuitem.set_sensitive(False)
- if not group in helpers.special_groups:
+ special_group = False
+ for group in groups:
+ if group in helpers.special_groups:
+ special_group = True
+ break
+
+ if not special_group and len(groups) == 1:
+ group = groups[0]
item = Gtk.SeparatorMenuItem.new() # separator
menu.append(item)
@@ -5064,8 +5088,8 @@ class RosterWindow:
for titer in iters[1:]:
if model[titer][Column.TYPE] != type_:
return
- if type_ == 'group' and len(iters) == 1:
- self.make_group_menu(event, iters[0])
+ if type_ == 'group':
+ self.make_group_menu(event, iters)
if type_ == 'groupchat' and len(iters) == 1:
self.make_groupchat_menu(event, iters[0])
elif type_ == 'agent' and len(iters) == 1:
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/391256de30e6c9ff02dea5cb6977899…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/391256de30e6c9ff02dea5cb6977899…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
378e9579 by Daniel Brötzmann at 2020-07-08T17:09:46+02:00
AccountWizard: Anonymous login wording
- - - - -
1 changed file:
- gajim/gtk/account_wizard.py
Changes:
=====================================
gajim/gtk/account_wizard.py
=====================================
@@ -363,7 +363,8 @@ class AccountWizard(Assistant):
if error == 'anonymous-not-supported':
self._show_error_page(_('Anonymous login not supported'),
_('Anonymous login not supported'),
- _('This server does not support anonymous'))
+ _('This server does not support '
+ 'anonymous login.'))
else:
self._show_error_page(_('Authentication failed'),
SASL_ERRORS.get(error),
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/378e9579bba7738918f3bd3ed26b7555…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/378e9579bba7738918f3bd3ed26b7555…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
b31b01cb by lovetox at 2020-07-07T23:24:46+02:00
Raise nbxmpp version
- - - - -
1 changed file:
- gajim/gajim.py
Changes:
=====================================
gajim/gajim.py
=====================================
@@ -26,7 +26,7 @@ from packaging.version import Version as V
from gajim.common import i18n
-_MIN_NBXMPP_VER = '1.0.0'
+_MIN_NBXMPP_VER = '1.0.1'
_MIN_GTK_VER = '3.22.27'
_MIN_CAIRO_VER = '1.16.0'
_MIN_PYGOBJECT_VER = '3.32.0'
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/b31b01cb64605eccab5ec32697d107c7…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/b31b01cb64605eccab5ec32697d107c7…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
97a53a65 by Daniel Brötzmann at 2020-07-07T23:06:31+02:00
Roster: Allow sending messages to multiple groups
- - - - -
f309d2b1 by Daniel Brötzmann at 2020-07-07T23:06:32+02:00
InviteMenu: Create menuitem before checking for Transports group
Otherwise modifying this menuitem later will fail (UnboundLocalError)
- - - - -
1 changed file:
- gajim/roster_window.py
Changes:
=====================================
gajim/roster_window.py
=====================================
@@ -4782,38 +4782,49 @@ class RosterWindow:
menu.show_all()
menu.popup(None, None, None, None, event_button, event.time)
- def make_group_menu(self, event, titer):
+ def make_group_menu(self, event, iters):
"""
Make group's popup menu
"""
model = self.modelfilter
- group = model[titer][Column.JID]
- account = model[titer][Column.ACCOUNT]
+ groups = []
+ accounts = []
+
+ list_ = [] # list of (contact, account) tuples
+ list_online = [] # list of (contact, account) tuples
- list_ = [] # list of (contact, account) tuples
- list_online = [] # list of (contact, account) tuples
+ for titer in iters:
+ groups.append(model[titer][Column.JID])
+ accounts.append(model[titer][Column.ACCOUNT])
+ # Don't show menu if groups of more than one account are selected
+ if accounts[0] != model[titer][Column.ACCOUNT]:
+ return
+ account = accounts[0]
show_bookmarked = True
- group = model[titer][Column.JID]
for jid in app.contacts.get_jid_list(account):
contact = app.contacts.get_contact_with_highest_priority(account,
jid)
- if group in contact.get_shown_groups():
- if contact.show not in ('offline', 'error'):
- list_online.append((contact, account))
- # Check that all contacts support direct NUC invite
- if not contact.supports(Namespace.CONFERENCE):
- show_bookmarked = False
- list_.append((contact, account))
+ for group in groups:
+ if group in contact.get_shown_groups():
+ if contact.show not in ('offline', 'error'):
+ list_online.append((contact, account))
+ # Check that all contacts support direct NUC invite
+ if not contact.supports(Namespace.CONFERENCE):
+ show_bookmarked = False
+ list_.append((contact, account))
menu = Gtk.Menu()
# Make special context menu if group is Groupchats
- if group == _('Group chats'):
- maximize_menuitem = Gtk.MenuItem.new_with_mnemonic(_(
- '_Maximize All'))
- maximize_menuitem.connect('activate',
- self.on_all_groupchat_maximized, list_)
- menu.append(maximize_menuitem)
+ if _('Group chats') in groups:
+ if len(groups) == 1:
+ maximize_menuitem = Gtk.MenuItem.new_with_mnemonic(
+ _('_Maximize All'))
+ maximize_menuitem.connect('activate',
+ self.on_all_groupchat_maximized, list_)
+ menu.append(maximize_menuitem)
+ else:
+ return
else:
# Send Group Message
send_group_message_item = Gtk.MenuItem.new_with_mnemonic(
@@ -4838,10 +4849,9 @@ class RosterWindow:
self.on_send_single_message_menuitem_activate, account, list_)
# Invite to
- if group != _('Transports'):
- invite_menuitem = Gtk.MenuItem.new_with_mnemonic(
- _('In_vite to'))
-
+ invite_menuitem = Gtk.MenuItem.new_with_mnemonic(
+ _('In_vite to'))
+ if _('Transports') not in groups:
gui_menu_builder.build_invite_submenu(invite_menuitem,
list_online, show_bookmarked=show_bookmarked)
menu.append(invite_menuitem)
@@ -4854,7 +4864,14 @@ class RosterWindow:
send_group_message_item.set_sensitive(False)
invite_menuitem.set_sensitive(False)
- if not group in helpers.special_groups:
+ special_group = False
+ for group in groups:
+ if group in helpers.special_groups:
+ special_group = True
+ break
+
+ if not special_group and len(groups) == 1:
+ group = groups[0]
item = Gtk.SeparatorMenuItem.new() # separator
menu.append(item)
@@ -5071,8 +5088,8 @@ class RosterWindow:
for titer in iters[1:]:
if model[titer][Column.TYPE] != type_:
return
- if type_ == 'group' and len(iters) == 1:
- self.make_group_menu(event, iters[0])
+ if type_ == 'group':
+ self.make_group_menu(event, iters)
if type_ == 'groupchat' and len(iters) == 1:
self.make_groupchat_menu(event, iters[0])
elif type_ == 'agent' and len(iters) == 1:
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/7832e433f7852b5cef1ee53747184da…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/7832e433f7852b5cef1ee53747184da…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
7832e433 by Daniel Brötzmann at 2020-07-07T22:52:12+02:00
Roster: Allow to add contacts from Not in contact list group via DND
- - - - -
1 changed file:
- gajim/roster_window.py
Changes:
=====================================
gajim/roster_window.py
=====================================
@@ -4240,6 +4240,13 @@ class RosterWindow:
# we may not add contacts from special_groups
if grp_source in helpers.special_groups:
+ if grp_source == _('Not in contact list'):
+ AddNewContactWindow(
+ account=account_dest,
+ contact_jid=jid_source,
+ user_nick=c_source.name,
+ group=grp_dest)
+ return
return
# Is the contact we drag a meta contact?
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/7832e433f7852b5cef1ee53747184dae…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/7832e433f7852b5cef1ee53747184dae…
You're receiving this email because of your account on dev.gajim.org.