Philipp Hörist pushed to branch master at gajim / gajim
Commits:
139156ba by Philipp Hörist at 2019-03-31T19:52:22Z
FeaturesDialog: Replace python-dbus for avahi
- - - - -
1 changed file:
- gajim/gtk/features.py
Changes:
=====================================
gajim/gtk/features.py
=====================================
@@ -108,7 +108,7 @@ class FeaturesDialog(Gtk.Dialog):
app.is_installed('ZEROCONF'),
_('Enables Gajim to automatically detected clients in a '
'local network for serverless chats'),
- _('Requires: python-dbus'),
+ _('Requires: gir1.2-avahi-0.6'),
_('Requires: pybonjour and bonjour SDK running (%(url)s)')
% {'url': 'https://developer.apple.com/opensource/)'},
None),
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/139156ba5ef17b6390c29b5bda775c1e05…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/139156ba5ef17b6390c29b5bda775c1e05…
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:
414b12cb by Philipp Hörist at 2019-03-31T08:23:38Z
Handle None timestring gracefully
- - - - -
1 changed file:
- nbxmpp/modules/date_and_time.py
Changes:
=====================================
nbxmpp/modules/date_and_time.py
=====================================
@@ -145,6 +145,8 @@ def parse_datetime(timestring, check_utc=False,
return a datetime or epoch
'''
+ if timestring is None:
+ return None
if convert not in (None, 'utc', 'local'):
raise TypeError('"%s" is not a valid value for convert')
if check_utc:
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/414b12cb028e9c5e420a1c24ed…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/414b12cb028e9c5e420a1c24ed…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
f838c2fa by Philipp Hörist at 2019-03-27T22:36:55Z
MUC: Use NewConfirmationDialog for file transfer
- - - - -
ae29c937 by Philipp Hörist at 2019-03-27T22:36:55Z
ChatControl: Use NewConfirmationDialog
- - - - -
3 changed files:
- gajim/chat_control.py
- gajim/chat_control_base.py
- gajim/groupchat_control.py
Changes:
=====================================
gajim/chat_control.py
=====================================
@@ -54,7 +54,8 @@ from gajim import gui_menu_builder
from gajim import message_control
from gajim import dialogs
-from gajim.gtk.dialogs import ConfirmationDialog
+from gajim.gtk.dialogs import NewConfirmationDialog
+from gajim.gtk.dialogs import DialogButton
from gajim.gtk.add_contact import AddNewContactWindow
from gajim.gtk.util import get_icon_name
from gajim.gtk.util import get_cursor
@@ -1168,25 +1169,22 @@ class ChatControl(ChatControlBase):
def safe_shutdown(self):
return False
- def allow_shutdown(self, method, on_yes, on_no, on_minimize):
- if time.time() - app.last_message_time[self.account]\
- [self.get_full_jid()] < 2:
+ def allow_shutdown(self, method, on_yes, on_no, _on_minimize):
+ time_ = app.last_message_time[self.account][self.get_full_jid()]
+ if time.time() - time_ < 2:
# 2 seconds
- def on_ok():
- on_yes(self)
-
- def on_cancel():
- on_no(self)
-
- ConfirmationDialog(
- #%s is being replaced in the code with JID
- _('You just received a new message from "%s"') % \
- self.contact.jid,
- _('If you close this tab and you have history disabled, '\
- 'this message will be lost.'), on_response_ok=on_ok,
- on_response_cancel=on_cancel,
- transient_for=self.parent_win.window)
+ NewConfirmationDialog(
+ _('Close'),
+ _('You just received a new message from %s') % self.contact.jid,
+ _('If you close this tab and you have history disabled, '
+ 'this message will be lost.'),
+ [DialogButton.make('Cancel',
+ callback=lambda: on_no(self)),
+ DialogButton.make('OK',
+ text=_('Close'),
+ callback=lambda: on_yes(self))],
+ transient_for=self.parent_win.window).show()
return
on_yes(self)
=====================================
gajim/chat_control_base.py
=====================================
@@ -51,7 +51,8 @@ from gajim.message_control import MessageControl
from gajim.conversation_textview import ConversationTextview
from gajim.message_textview import MessageTextView
-from gajim.gtk.dialogs import NonModalConfirmationDialog
+from gajim.gtk.dialogs import NewConfirmationDialog
+from gajim.gtk.dialogs import DialogButton
from gajim.gtk import util
from gajim.gtk.util import convert_rgb_to_hex
from gajim.gtk.util import at_the_end
@@ -1042,29 +1043,38 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
"""
def _on_ok(c):
app.interface.instances['file_transfers'].show_file_send_request(
- self.account, c)
+ self.account, c)
if self.type_id == message_control.TYPE_PM:
gc_contact = self.gc_contact
- if gc_contact:
- # gc or pm
- gc_control = app.interface.msg_win_mgr.get_gc_control(
- gc_contact.room_jid, self.account)
- self_contact = app.contacts.get_gc_contact(self.account,
- gc_control.room_jid, gc_control.nick)
- if gc_control.is_anonymous and gc_contact.affiliation.value not in ['admin',
- 'owner'] and self_contact.affiliation.value in ['admin', 'owner']:
- contact = app.contacts.get_contact(self.account, gc_contact.jid)
- if not contact or contact.sub not in ('both', 'to'):
- prim_text = _('Really send file?')
- sec_text = _('If you send a file to %s, your real JID will '
- 'be revealed.') % gc_contact.name
- dialog = NonModalConfirmationDialog(prim_text,
- sec_text, on_response_ok=(_on_ok, gc_contact))
- dialog.popup()
- return
- _on_ok(gc_contact)
+
+ if not gc_contact:
+ _on_ok(self.contact)
return
- _on_ok(self.contact)
+
+ # gc or pm
+ gc_control = app.interface.msg_win_mgr.get_gc_control(
+ gc_contact.room_jid, self.account)
+ self_contact = app.contacts.get_gc_contact(self.account,
+ gc_control.room_jid,
+ gc_control.nick)
+ if (gc_control.is_anonymous and
+ gc_contact.affiliation.value not in ['admin', 'owner'] and
+ self_contact.affiliation.value in ['admin', 'owner']):
+ contact = app.contacts.get_contact(self.account, gc_contact.jid)
+ if not contact or contact.sub not in ('both', 'to'):
+
+ NewConfirmationDialog(
+ _('Privacy'),
+ _('Warning'),
+ _('If you send a file to <b>%s</b>, '
+ 'your real JID will be revealed.' % gc_contact.name),
+ [DialogButton.make('Cancel'),
+ DialogButton.make(
+ 'OK',
+ text=_('Continue'),
+ callback=lambda: _on_ok(gc_contact))]).show()
+ return
+ _on_ok(gc_contact)
def on_notify_menuitem_toggled(self, widget):
app.config.set_per('rooms', self.contact.jid, 'notify_on_all_messages',
=====================================
gajim/groupchat_control.py
=====================================
@@ -2786,12 +2786,12 @@ class GroupchatControl(ChatControlBase):
self.handlers[id_] = item
item = xml.get_object('send_file_menuitem')
- if not c.resource:
+ if not c.jid:
item.set_sensitive(False)
else:
- item.set_sensitive(False)
+ item.set_sensitive(True)
# ToDo: integrate HTTP File Upload
- id_ = item.connect('activate', self._on_send_file_jingle, c)
+ id_ = item.connect('activate', lambda x: self._on_send_file_jingle(c))
self.handlers[id_] = item
# show the popup now!
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/2080495efc8dcec53003c4ce58db382f3…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/2080495efc8dcec53003c4ce58db382f3…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist deleted branch wurstsalat/gajim-account-disable-offline at gajim / gajim
--
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist deleted branch wurstsalat/gajim-account-disable-offline at gajim / gajim
--
You're receiving this email because of your account on dev.gajim.org.