[Git][gajim/gajim][master] 3 commits: zeroconf: string.letters has been removed with Python 3
Philipp Hörist pushed to branch master at gajim / gajim Commits: c058a1e1 by André Apitzsch at 2017-04-10T23:48:52+02:00 zeroconf: string.letters has been removed with Python 3 use ascii_letters which should be sufficient - - - - - 4725858a by André Apitzsch at 2017-04-10T23:53:54+02:00 zeroconf: 'to' is of type JID and no string use a class method to remove the resource from JID - - - - - 8e3e9b4d by Philipp Hörist at 2017-04-19T18:55:25+02:00 Merge branch 'zeroconf' into 'master' fix python errors in client zeroconf See merge request !82 - - - - - 1 changed file: - src/common/zeroconf/client_zeroconf.py Changes: = src/common/zeroconf/client_zeroconf.py = --- a/src/common/zeroconf/client_zeroconf.py +++ b/src/common/zeroconf/client_zeroconf.py @@ -756,7 +756,7 @@ class ClientZeroconf: if to is None: # Can’t send undirected stanza over Zeroconf. return -1 -to = gajim.get_jid_without_resource(to) +to = to.getStripped() stanza.setFrom(self.roster.zeroconf.name) try: @@ -801,7 +801,7 @@ class ClientZeroconf: """ Generate a random id """ -return ''.join(Random().sample(string.letters + string.digits, 6)) +return ''.join(Random().sample(string.ascii_letters + string.digits, 6)) def RegisterDisconnectHandler(self, handler): """ View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/14091642c4b5dd33ca280504366b4caacbe52dc9...8e3e9b4d9db1a50ce11f94adf4053ec78aad0ad6 ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
[Git][gajim/gajim][master] 2 commits: Disable button if password changing is not supported
Philipp Hörist pushed to branch master at gajim / gajim Commits: 4d8379f4 by Marc Schink at 2017-04-19T18:17:22+02:00 Disable button if password changing is not supported - - - - - 14091642 by Philipp Hörist at 2017-04-19T18:54:20+02:00 Merge branch 'change_password_fix' into 'master' Disable button if password changing is not supported See merge request !85 - - - - - 2 changed files: - src/common/connection.py - src/config.py Changes: = src/common/connection.py = --- a/src/common/connection.py +++ b/src/common/connection.py @@ -779,6 +779,7 @@ class Connection(CommonConnection, ConnectionHandlers): self.music_track_info = 0 self.location_info = {} self.pubsub_supported = False +self.register_supported = False self.pubsub_publish_options_supported = False # Do we auto accept insecure connection self.connection_auto_accepted = False @@ -2001,6 +2002,8 @@ class Connection(CommonConnection, ConnectionHandlers): if nbxmpp.NS_VCARD in obj.features: self.vcard_supported = True get_action(self.name + '-profile').set_enabled(True) +if nbxmpp.NS_REGISTER in obj.features: +self.register_supported = True if nbxmpp.NS_PUBSUB in obj.features: self.pubsub_supported = True if nbxmpp.NS_PUBSUB_PUBLISH_OPTIONS in obj.features: = src/config.py = --- a/src/config.py +++ b/src/config.py @@ -1541,6 +1541,7 @@ class AccountsWindow: self.accounts_treeview = self.xml.get_object('accounts_treeview') self.remove_button = self.xml.get_object('remove_button') self.rename_button = self.xml.get_object('rename_button') +self.change_password_button = self.xml.get_object('change_password_button1') path_to_kbd_input_img = gtkgui_helpers.get_icon_path('gajim-kbd_input') img = self.xml.get_object('rename_image') img.set_from_file(path_to_kbd_input_img) @@ -1604,6 +1605,7 @@ class AccountsWindow: """ self.remove_button.set_sensitive(False) self.rename_button.set_sensitive(False) +self.change_password_button.set_sensitive(False) self.current_account = None model = self.accounts_treeview.get_model() model.clear() @@ -1713,9 +1715,15 @@ class AccountsWindow: if account: self.remove_button.set_sensitive(True) self.rename_button.set_sensitive(True) + +if account != gajim.ZEROCONF_ACC_NAME: +self.change_password_button.set_sensitive( +gajim.connections[account].register_supported) + else: self.remove_button.set_sensitive(False) self.rename_button.set_sensitive(False) +self.change_password_button.set_sensitive(False) if iter_: self.current_account = account if account == gajim.ZEROCONF_ACC_NAME: View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/c5aa507ec05f178772944b1a9185cff74cf695a7...14091642c4b5dd33ca280504366b4caacbe52dc9 ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
[Git][gajim/gajim][master] 2 commits: Get rid of cairo dependency
Philipp Hörist pushed to branch master at gajim / gajim Commits: 358d410d by Philipp Hörist at 2017-04-19T16:58:16+02:00 Get rid of cairo dependency - - - - - c5aa507e by Philipp Hörist at 2017-04-19T17:10:01+02:00 Remove timeout id after AvatarWindow is shown - - - - - 3 changed files: - src/chat_control.py - src/dialogs.py - src/gtkgui_helpers.py Changes: = src/chat_control.py = --- a/src/chat_control.py +++ b/src/chat_control.py @@ -1671,6 +1671,8 @@ class ChatControl(ChatControlBase): dialogs.BigAvatarWindow(avatar_pixbuf, pos_x, pos_y, avatar_w, avatar_h, self.show_avatar) +self.show_bigger_avatar_timeout_id = None + def _on_send_file_menuitem_activate(self, widget): self._on_send_file() = src/dialogs.py = --- a/src/dialogs.py +++ b/src/dialogs.py @@ -34,7 +34,6 @@ from gi.repository import Gdk from gi.repository import GdkPixbuf from gi.repository import GObject from gi.repository import GLib -import cairo import os import nbxmpp import time @@ -5688,28 +5687,21 @@ class BigAvatarWindow(Gtk.Window): self.callback = callback self.screen = self.get_screen() self.visual = self.screen.get_rgba_visual() -if self.visual != None and self.screen.is_composited(): +if self.visual is not None and self.screen.is_composited(): self.set_visual(self.visual) self.set_app_paintable(True) self.set_size_request(width, height) self.move(pos_x, pos_y) -self.connect("draw", self.area_draw) # we should hide the window self.connect('leave_notify_event', self._on_window_avatar_leave_notify) self.connect('motion-notify-event', self._on_window_motion_notify) self.realize() # make the cursor invisible so we can see the image -invisible_cursor = gtkgui_helpers.get_invisible_cursor() -self.get_window().set_cursor(invisible_cursor) +self.get_window().set_cursor( +Gdk.Cursor.new(Gdk.CursorType.BLANK_CURSOR)) +self.add(Gtk.Image.new_from_pixbuf(self.avatar)) self.show_all() -def area_draw(self, widget, cr): -cr.set_source_rgba(.2, .2, .2, 0.0) -cr.set_operator(cairo.OPERATOR_SOURCE) -Gdk.cairo_set_source_pixbuf(cr, self.avatar, 0, 0) -cr.paint() -cr.set_operator(cairo.OPERATOR_OVER) - def _on_window_avatar_leave_notify(self, widget, event): """ Just left the popup window that holds avatar = src/gtkgui_helpers.py = --- a/src/gtkgui_helpers.py +++ b/src/gtkgui_helpers.py @@ -486,14 +486,6 @@ def get_pixbuf_from_data(file_data, want_type = False): else: return pixbuf -def get_invisible_cursor(): -import cairo -s = cairo.ImageSurface(cairo.FORMAT_A1, 1, 1) -cursor_pixbuf = Gdk.pixbuf_get_from_surface(s, 0, 0, 1, 1) -cursor = Gdk.Cursor.new_from_pixbuf(Gdk.Display.get_default(), \ -cursor_pixbuf, 0, 0) -return cursor - def get_cursor(attr): display = Gdk.Display.get_default() cursor = getattr(Gdk.CursorType, attr) View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/86e29fb7f460a9a93fe5af8981b041122df2e7b9...c5aa507ec05f178772944b1a9185cff74cf695a7 ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits