[openpgp] Refactor Plugin

- Adapt to nbxmpp now supporting openpgp
This commit is contained in:
Philipp Hörist
2019-02-09 20:38:20 +01:00
parent 0189214c41
commit 2b9780a9f9
10 changed files with 484 additions and 769 deletions

View File

@@ -1,20 +1,18 @@
# Copyright (C) 2018 Philipp Hörist <philipp AT hoerist.com>
# Copyright (C) 2019 Philipp Hörist <philipp AT hoerist.com>
#
# This file is part of Gajim.
# This file is part of the OpenPGP Gajim Plugin.
#
# Gajim is free software; you can redistribute it and/or modify
# OpenPGP Gajim Plugin is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; version 3 only.
#
# Gajim is distributed in the hope that it will be useful,
# OpenPGP Gajim Plugin is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
# XEP-0373: OpenPGP for XMPP
# along with OpenPGP Gajim Plugin. If not, see <http://www.gnu.org/licenses/>.
import logging
import time
@@ -24,7 +22,7 @@ from gi.repository import Gtk
from gajim.common import app
from gajim.common.const import DialogButton, ButtonAction
from gajim.gtk import NewConfirmationDialog
from gajim.gtk.dialogs import NewConfirmationDialog
from gajim.plugins.plugins_i18n import _
from openpgp.modules.util import Trust
@@ -49,8 +47,8 @@ TRUST_DATA = {
class KeyDialog(Gtk.Dialog):
def __init__(self, account, jid, transient):
flags = Gtk.DialogFlags.DESTROY_WITH_PARENT
super().__init__(_('Public Keys for %s') % jid, None, flags)
super().__init__(title=_('Public Keys for %s') % jid,
destroy_with_parent=True)
self.set_transient_for(transient)
self.set_resizable(True)