[seahorse/bye-seahorse-widget-revoke] gpgme/revoke: Port to GtkTemplate
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse/bye-seahorse-widget-revoke] gpgme/revoke: Port to GtkTemplate
- Date: Fri, 26 Feb 2021 06:31:23 +0000 (UTC)
commit 0bee09259b90817a8781f29fef3462b8bddaed28
Author: Niels De Graef <nielsdegraef gmail com>
Date: Fri Feb 26 07:30:40 2021 +0100
gpgme/revoke: Port to GtkTemplate
data/seahorse.gresource.xml | 2 +-
pgp/meson.build | 2 +-
pgp/seahorse-gpgme-dialogs.h | 3 -
pgp/seahorse-gpgme-revoke-dialog.c | 277 ++++++++++++++++++++++++++++++++++++
pgp/seahorse-gpgme-revoke-dialog.h | 32 +++++
pgp/seahorse-gpgme-revoke-dialog.ui | 100 +++++++++++++
pgp/seahorse-gpgme-revoke.c | 176 -----------------------
pgp/seahorse-pgp-key-properties.c | 8 +-
pgp/seahorse-revoke.ui | 188 +++++++-----------------
po/POTFILES.in | 4 +-
10 files changed, 468 insertions(+), 324 deletions(-)
---
diff --git a/data/seahorse.gresource.xml b/data/seahorse.gresource.xml
index d389d25a..3e9f84da 100644
--- a/data/seahorse.gresource.xml
+++ b/data/seahorse.gresource.xml
@@ -31,13 +31,13 @@
<file alias="seahorse-gpgme-add-uid.ui"
preprocess="xml-stripblanks">../pgp/seahorse-gpgme-add-uid.ui</file>
<file alias="seahorse-gpgme-expires-dialog.ui"
preprocess="xml-stripblanks">../pgp/seahorse-gpgme-expires-dialog.ui</file>
<file alias="seahorse-gpgme-generate-dialog.ui"
preprocess="xml-stripblanks">../pgp/seahorse-gpgme-generate-dialog.ui</file>
+ <file alias="seahorse-gpgme-revoke-dialog.ui"
preprocess="xml-stripblanks">../pgp/seahorse-revoke.ui</file>
<file alias="seahorse-gpgme-sign-dialog.ui"
preprocess="xml-stripblanks">../pgp/seahorse-gpgme-sign-dialog.ui</file>
<file alias="seahorse-keyserver-results.ui"
preprocess="xml-stripblanks">../pgp/seahorse-keyserver-results.ui</file>
<file alias="seahorse-keyserver-search.ui"
preprocess="xml-stripblanks">../pgp/seahorse-keyserver-search.ui</file>
<file alias="seahorse-keyserver-sync.ui"
preprocess="xml-stripblanks">../pgp/seahorse-keyserver-sync.ui</file>
<file alias="seahorse-pgp-private-key-properties.ui"
preprocess="xml-stripblanks">../pgp/seahorse-pgp-private-key-properties.ui</file>
<file alias="seahorse-pgp-public-key-properties.ui"
preprocess="xml-stripblanks">../pgp/seahorse-pgp-public-key-properties.ui</file>
- <file alias="seahorse-revoke.ui" preprocess="xml-stripblanks">../pgp/seahorse-revoke.ui</file>
<file alias="seahorse-signer.ui" preprocess="xml-stripblanks">../pgp/seahorse-signer.ui</file>
<!-- PKCS#11 -->
diff --git a/pgp/meson.build b/pgp/meson.build
index 7f1010d9..756f292f 100644
--- a/pgp/meson.build
+++ b/pgp/meson.build
@@ -14,7 +14,7 @@ pgp_sources = files(
'seahorse-gpgme-keyring.c',
'seahorse-gpgme-photo.c',
'seahorse-gpgme-photos.c',
- 'seahorse-gpgme-revoke.c',
+ 'seahorse-gpgme-revoke-dialog.c',
'seahorse-gpgme-secret-deleter.c',
'seahorse-gpgme-sign-dialog.c',
'seahorse-gpgme-subkey.c',
diff --git a/pgp/seahorse-gpgme-dialogs.h b/pgp/seahorse-gpgme-dialogs.h
index bf73debd..94709882 100644
--- a/pgp/seahorse-gpgme-dialogs.h
+++ b/pgp/seahorse-gpgme-dialogs.h
@@ -56,9 +56,6 @@ void seahorse_gpgme_add_revoker_new (SeahorseGpgmeKey *pkey,
void seahorse_gpgme_expires_new (SeahorseGpgmeSubkey *subkey,
GtkWindow *parent);
-void seahorse_gpgme_revoke_new (SeahorseGpgmeSubkey *subkey,
- GtkWindow *parent);
-
gboolean seahorse_gpgme_photo_add (SeahorseGpgmeKey *pkey,
GtkWindow *parent,
const gchar *path);
diff --git a/pgp/seahorse-gpgme-revoke-dialog.c b/pgp/seahorse-gpgme-revoke-dialog.c
new file mode 100644
index 00000000..d7d39147
--- /dev/null
+++ b/pgp/seahorse-gpgme-revoke-dialog.c
@@ -0,0 +1,277 @@
+/*
+ * Seahorse
+ *
+ * Copyright (C) 2003 Jacob Perkins
+ *
+ * This program 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include "seahorse-gpgme-revoke-dialog.h"
+#include "seahorse-gpgme-key-op.h"
+#include "seahorse-pgp-dialogs.h"
+
+#include "libseahorse/seahorse-util.h"
+
+#include <glib/gi18n.h>
+
+#include <string.h>
+
+enum {
+ COLUMN_TEXT,
+ COLUMN_TOOLTIP,
+ COLUMN_INT,
+ N_COLUMNS
+};
+
+struct _SeahorseGpgmeRevokeDialog {
+ GtkDialog parent_instance;
+
+ SeahorseGpgmeSubkey *subkey;
+
+ GtkWidget *reason_combo;
+ GtkWidget *description_entry;
+};
+
+enum {
+ PROP_0,
+ PROP_SUBKEY,
+ N_PROPS
+};
+static GParamSpec *obj_props[N_PROPS] = { NULL, };
+
+G_DEFINE_TYPE (SeahorseGpgmeRevokeDialog, seahorse_gpgme_revoke_dialog, GTK_TYPE_DIALOG)
+
+
+static void
+on_gpgme_revoke_ok_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ SeahorseGpgmeRevokeDialog *self = SEAHORSE_GPGME_REVOKE_DIALOG (user_data);
+ SeahorseRevokeReason reason;
+ const char *description;
+ gpgme_error_t err;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ GValue value = G_VALUE_INIT;
+
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (self->reason_combo));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (self->reason_combo), &iter);
+
+ gtk_tree_model_get_value (model, &iter, COLUMN_INT, &value);
+ reason = g_value_get_int (&value);
+ g_value_unset (&value);
+
+ description = gtk_entry_get_text (GTK_ENTRY (self->description_entry));
+
+ err = seahorse_gpgme_key_op_revoke_subkey (self->subkey, reason, description);
+ if (!GPG_IS_OK (err))
+ seahorse_gpgme_handle_error (err, _("Couldn’t revoke subkey"));
+}
+
+static void
+seahorse_gpgme_revoke_dialog_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ SeahorseGpgmeRevokeDialog *self = SEAHORSE_GPGME_REVOKE_DIALOG (object);
+
+ switch (prop_id) {
+ case PROP_SUBKEY:
+ g_value_set_object (value, self->subkey);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+seahorse_gpgme_revoke_dialog_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ SeahorseGpgmeRevokeDialog *self = SEAHORSE_GPGME_REVOKE_DIALOG (object);
+
+ switch (prop_id) {
+ case PROP_SUBKEY:
+ g_clear_object (&self->subkey);
+ self->subkey = g_value_dup_object (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+seahorse_gpgme_revoke_dialog_finalize (GObject *obj)
+{
+ SeahorseGpgmeRevokeDialog *self = SEAHORSE_GPGME_REVOKE_DIALOG (obj);
+
+ g_clear_object (&self->subkey);
+
+ G_OBJECT_CLASS (seahorse_gpgme_revoke_dialog_parent_class)->finalize (obj);
+}
+
+static void
+seahorse_gpgme_revoke_dialog_constructed (GObject *obj)
+{
+ SeahorseGpgmeRevokeDialog *self = SEAHORSE_GPGME_REVOKE_DIALOG (obj);
+ g_autofree char *title = NULL;
+ const char *label;
+
+ G_OBJECT_CLASS (seahorse_gpgme_revoke_dialog_parent_class)->constructed (obj);
+
+ label = seahorse_pgp_subkey_get_description (SEAHORSE_PGP_SUBKEY (self->subkey));
+ title = g_strdup_printf (_("Revoke: %s"), label);
+ gtk_window_set_title (GTK_WINDOW (self), title);
+}
+
+static void
+seahorse_gpgme_revoke_dialog_init (SeahorseGpgmeRevokeDialog *self)
+{
+ GtkListStore *store;
+ GtkTreeIter iter;
+ GtkCellRenderer *renderer;
+
+ gtk_widget_init_template (GTK_WIDGET (self));
+
+ /* Initialize List Store for the Combo Box */
+ store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT);
+
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ COLUMN_TEXT, _("No reason"),
+ COLUMN_TOOLTIP, _("No reason for revoking key"),
+ COLUMN_INT, REVOKE_NO_REASON,
+ -1);
+
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ COLUMN_TEXT, _("Compromised"),
+ COLUMN_TOOLTIP, _("Key has been compromised"),
+ COLUMN_INT, REVOKE_COMPROMISED,
+ -1);
+
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ COLUMN_TEXT, _("Superseded"),
+ COLUMN_TOOLTIP, _("Key has been superseded"),
+ COLUMN_INT, REVOKE_SUPERSEDED,
+ -1);
+
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ COLUMN_TEXT, _("Not Used"),
+ COLUMN_TOOLTIP, _("Key is no longer used"),
+ COLUMN_INT, REVOKE_NOT_USED,
+ -1);
+
+ /* Finish Setting Up Combo Box */
+ gtk_combo_box_set_model (GTK_COMBO_BOX (self->reason_combo),
+ GTK_TREE_MODEL (store));
+ gtk_combo_box_set_active (GTK_COMBO_BOX (self->reason_combo), 0);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (self->reason_combo), renderer, TRUE);
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (self->reason_combo), renderer,
+ "text", COLUMN_TEXT,
+ NULL);
+}
+
+static void
+seahorse_gpgme_revoke_dialog_class_init (SeahorseGpgmeRevokeDialogClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+ gobject_class->constructed = seahorse_gpgme_revoke_dialog_constructed;
+ gobject_class->get_property = seahorse_gpgme_revoke_dialog_get_property;
+ gobject_class->set_property = seahorse_gpgme_revoke_dialog_set_property;
+ gobject_class->finalize = seahorse_gpgme_revoke_dialog_finalize;
+
+ obj_props[PROP_SUBKEY] =
+ g_param_spec_object ("subkey", "Subkey to revoke",
+ "The GPGME subkey you want to revoke",
+ SEAHORSE_GPGME_TYPE_SUBKEY,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS);
+
+ g_object_class_install_properties (gobject_class, N_PROPS, obj_props);
+
+ gtk_widget_class_set_template_from_resource (widget_class,
+ "/org/gnome/Seahorse/seahorse-gpgme-revoke-dialog.ui");
+ gtk_widget_class_bind_template_child (widget_class,
+ SeahorseGpgmeRevokeDialog,
+ reason_combo);
+ gtk_widget_class_bind_template_child (widget_class,
+ SeahorseGpgmeRevokeDialog,
+ description_entry);
+ gtk_widget_class_bind_template_callback (widget_class,
+ on_gpgme_revoke_ok_clicked);
+}
+
+GtkWidget *
+seahorse_gpgme_revoke_dialog_new (SeahorseGpgmeSubkey *subkey,
+ GtkWindow *parent)
+{
+ g_return_val_if_fail (SEAHORSE_GPGME_IS_SUBKEY (subkey), NULL);
+ g_return_val_if_fail (!parent || GTK_IS_WINDOW (parent), NULL);
+
+ return g_object_new (SEAHORSE_GPGME_TYPE_REVOKE_DIALOG,
+ "subkey", subkey,
+ "transient-for", parent,
+ "use-header-bar", 1,
+ NULL);
+}
+
+void
+seahorse_gpgme_add_revoker_new (SeahorseGpgmeKey *pkey, GtkWindow *parent)
+{
+ SeahorseGpgmeKey *revoker;
+ GtkWidget *dialog;
+ int response;
+ gpgme_error_t err;
+ const char *userid1, *userid2;
+
+ g_return_if_fail (pkey != NULL && SEAHORSE_GPGME_IS_KEY (pkey));
+
+ revoker = SEAHORSE_GPGME_KEY (seahorse_signer_get (parent));
+ if (revoker == NULL)
+ return;
+
+ userid1 = seahorse_object_get_label (SEAHORSE_OBJECT (revoker));
+ userid2 = seahorse_object_get_label (SEAHORSE_OBJECT (pkey));
+
+ dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL,
+ GTK_MESSAGE_WARNING, GTK_BUTTONS_YES_NO,
+ _("You are about to add %s as a revoker for %s."
+ " This operation cannot be undone! Are you sure you want to
continue?"),
+ userid1, userid2);
+
+ response = gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+
+ if (response != GTK_RESPONSE_YES)
+ return;
+
+ err = seahorse_gpgme_key_op_add_revoker (pkey, revoker);
+ if (!GPG_IS_OK (err))
+ seahorse_gpgme_handle_error (err, _("Couldn’t add revoker"));
+}
diff --git a/pgp/seahorse-gpgme-revoke-dialog.h b/pgp/seahorse-gpgme-revoke-dialog.h
new file mode 100644
index 00000000..81d9ad0f
--- /dev/null
+++ b/pgp/seahorse-gpgme-revoke-dialog.h
@@ -0,0 +1,32 @@
+/*
+ * Seahorse
+ *
+ * Copyright (C) 2020 Niels De Graef
+ *
+ * This program 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <gtk/gtk.h>
+
+#include "pgp/seahorse-gpgme-subkey.h"
+
+#define SEAHORSE_GPGME_TYPE_REVOKE_DIALOG (seahorse_gpgme_revoke_dialog_get_type ())
+G_DECLARE_FINAL_TYPE (SeahorseGpgmeRevokeDialog, seahorse_gpgme_revoke_dialog,
+ SEAHORSE_GPGME, REVOKE_DIALOG,
+ GtkDialog)
+
+GtkWidget * seahorse_gpgme_revoke_dialog_new (SeahorseGpgmeSubkey *subkey,
+ GtkWindow *parent);
diff --git a/pgp/seahorse-gpgme-revoke-dialog.ui b/pgp/seahorse-gpgme-revoke-dialog.ui
new file mode 100644
index 00000000..d126328f
--- /dev/null
+++ b/pgp/seahorse-gpgme-revoke-dialog.ui
@@ -0,0 +1,100 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="3.24"/>
+ <template class="SeahorseGpgmeRevokeDialog" parent="GtkDialog">
+ <property name="visible">True</property>
+ <property name="border_width">5</property>
+ <child internal-child="vbox">
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="margin">6</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="reason_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Reason:</property>
+ <property name="tooltip_text" translatable="yes">Reason for revoking the key</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">reason_combo</property>
+ </object>
+ <packing>
+ <property name="top_attach">0</property>
+ <property name="left_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="reason_combo">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">0</property>
+ <property name="left_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="desription_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Description:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">description</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="left_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="description">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">Optional description of
revocation</property>
+ <property name="activates_default">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="action">
+ <object class="GtkButton" id="cancelbutton">
+ <property name="label" translatable="yes">_Cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <signal name="clicked" handler="on_widget_closed"/>
+ </object>
+ </child>
+ <child type="action">
+ <object class="GtkButton" id="okbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Revoke key</property>
+ <property name="label" translatable="yes">Re_voke</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_gpgme_revoke_ok_clicked"/>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">cancelbutton</action-widget>
+ <action-widget response="-5">okbutton</action-widget>
+ </action-widgets>
+ </template>
+</interface>
diff --git a/pgp/seahorse-pgp-key-properties.c b/pgp/seahorse-pgp-key-properties.c
index 3ca41dcd..77a0d7f6 100644
--- a/pgp/seahorse-pgp-key-properties.c
+++ b/pgp/seahorse-pgp-key-properties.c
@@ -31,6 +31,7 @@
#include "seahorse-gpgme-exporter.h"
#include "seahorse-gpgme-key.h"
#include "seahorse-gpgme-key-op.h"
+#include "seahorse-gpgme-revoke-dialog.h"
#include "seahorse-gpgme-sign-dialog.h"
#include "seahorse-pgp-backend.h"
#include "seahorse-gpg-op.h"
@@ -1048,13 +1049,16 @@ on_subkeys_revoke (GSimpleAction *action, GVariant *param, gpointer user_data)
{
SeahorsePgpKeyProperties *self = SEAHORSE_PGP_KEY_PROPERTIES (user_data);
SeahorsePgpSubkey *subkey = get_selected_subkey (self);
+ GtkWidget *dialog;
if (!subkey)
return;
g_return_if_fail (SEAHORSE_GPGME_IS_SUBKEY (subkey));
- seahorse_gpgme_revoke_new (SEAHORSE_GPGME_SUBKEY (subkey),
- GTK_WINDOW (self));
+ dialog = seahorse_gpgme_revoke_dialog_new (SEAHORSE_GPGME_SUBKEY (subkey),
+ GTK_WINDOW (self));
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
}
static void
diff --git a/pgp/seahorse-revoke.ui b/pgp/seahorse-revoke.ui
index e2db53da..32b06412 100644
--- a/pgp/seahorse-revoke.ui
+++ b/pgp/seahorse-revoke.ui
@@ -1,70 +1,56 @@
<?xml version="1.0"?>
<interface>
- <requires lib="gtk+" version="2.16"/>
- <!-- interface-naming-policy toplevel-contextual -->
- <object class="GtkDialog" id="revoke">
- <property name="visible">True</property>
- <property name="border_width">5</property>
- <property name="type_hint">dialog</property>
- <signal name="delete_event" handler="on_widget_delete_event"/>
+ <requires lib="gtk+" version="3.24"/>
+ <template class="SeahorseGpgmeRevokeDialog" parent="GtkDialog">
+ <property name="border_width">12</property>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="spacing">2</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkTable" id="table1">
+ <object class="GtkGrid">
<property name="visible">True</property>
- <property name="border_width">5</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
+ <property name="margin">6</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
<child>
- <object class="GtkComboBox" id="reason">
+ <object class="GtkLabel" id="reason_label">
<property name="visible">True</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">_Reason:</property>
+ <property name="tooltip_text" translatable="yes">Reason for revoking the key</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">reason_combo</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"></property>
+ <property name="top_attach">0</property>
+ <property name="left_attach">0</property>
</packing>
</child>
<child>
- <object class="GtkEventBox" id="eventbox1">
+ <object class="GtkComboBox" id="reason_combo">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes">Reason for revoking the key</property>
- <child>
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Reason:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">reason</property>
- </object>
- </child>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="top_attach">0</property>
+ <property name="left_attach">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label2">
+ <object class="GtkLabel" id="desription_label">
<property name="visible">True</property>
- <property name="xalign">0</property>
+ <property name="xalign">1</property>
<property name="label" translatable="yes">_Description:</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">description</property>
+ <property name="mnemonic_widget">description_entry</property>
</object>
<packing>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="left_attach">0</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="description">
+ <object class="GtkEntry" id="description_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">Optional description of
revocation</property>
@@ -72,10 +58,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
</packing>
</child>
</object>
@@ -83,107 +66,34 @@
<property name="position">1</property>
</packing>
</child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="helpbutton1">
- <property name="label">gtk-help</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="on_widget_help"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="cancelbutton1">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="on_widget_closed"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="okbutton1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">Revoke key</property>
- <signal name="clicked" handler="on_gpgme_revoke_ok_clicked"/>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <child>
- <object class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-ok</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Re_voke</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
+ </object>
+ </child>
+ <child type="action">
+ <object class="GtkButton" id="cancelbutton">
+ <property name="label" translatable="yes">_Cancel</property>
+ <property name="visible">True</property>
+ <property name="use-underline">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ </object>
+ </child>
+ <child type="action">
+ <object class="GtkButton" id="okbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Revoke key</property>
+ <property name="label" translatable="yes">Re_voke</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_gpgme_revoke_ok_clicked"/>
</object>
</child>
<action-widgets>
- <action-widget response="-11">helpbutton1</action-widget>
- <action-widget response="-6">cancelbutton1</action-widget>
- <action-widget response="-5">okbutton1</action-widget>
+ <action-widget response="-6">cancelbutton</action-widget>
+ <action-widget response="-5">okbutton</action-widget>
</action-widgets>
- </object>
+ </template>
</interface>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 32960971..0434df80 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -54,7 +54,8 @@ pgp/seahorse-gpgme-key-deleter.c
pgp/seahorse-gpgme-key-op.c
pgp/seahorse-gpgme-keyring.c
pgp/seahorse-gpgme-photos.c
-pgp/seahorse-gpgme-revoke.c
+pgp/seahorse-gpgme-revoke-dialog.c
+pgp/seahorse-gpgme-revoke-dialog.ui
pgp/seahorse-gpgme-secret-deleter.c
pgp/seahorse-gpgme-sign-dialog.c
pgp/seahorse-gpgme-sign-dialog.ui
@@ -75,7 +76,6 @@ pgp/seahorse-pgp-key-properties.c
pgp/seahorse-pgp-private-key-properties.ui
pgp/seahorse-pgp-public-key-properties.ui
pgp/seahorse-pgp-subkey.c
-pgp/seahorse-revoke.ui
pgp/seahorse-server-source.c
pgp/seahorse-signer.c
pgp/seahorse-signer.ui
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]