[seahorse] keyserver-search: Cleanup the dialog
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] keyserver-search: Cleanup the dialog
- Date: Fri, 26 Feb 2021 01:22:48 +0000 (UTC)
commit 35957fc84b0572ff6b8b12c08cf79cf929c49e14
Author: Niels De Graef <nielsdegraef gmail com>
Date: Fri Feb 26 02:11:58 2021 +0100
keyserver-search: Cleanup the dialog
* Use a GtkListBox to display the keyservers
* Put actions in the headerbar
pgp/seahorse-keyserver-search.c | 485 ++++++++++++++-------------------------
pgp/seahorse-keyserver-search.ui | 51 +---
2 files changed, 178 insertions(+), 358 deletions(-)
---
diff --git a/pgp/seahorse-keyserver-search.c b/pgp/seahorse-keyserver-search.c
index 3f7ddd31..077b0f34 100644
--- a/pgp/seahorse-keyserver-search.c
+++ b/pgp/seahorse-keyserver-search.c
@@ -21,161 +21,43 @@
#include "config.h"
#include "seahorse-keyserver-search.h"
-
-#include "seahorse-discovery.h"
#include "seahorse-keyserver-results.h"
#include "seahorse-pgp-backend.h"
#include "seahorse-common.h"
-#include "libseahorse/seahorse-util.h"
-#include "libseahorse/seahorse-widget.h"
-
/**
* SECTION:seahorse-keyserver-search
* @short_description: Contains the functions to start a search for keys on a
* keyserver.
- **/
+ */
struct _SeahorseKeyserverSearch {
- GtkDialog parent_instance;
+ GtkDialog parent_instance;
- GtkWidget *search_entry;
- GtkWidget *key_server_list;
- GtkWidget *shared_keys_list;
+ GPtrArray *selected_servers; /* (element-type SeahorseServerSource) */
+ gboolean selected_servers_changed;
+
+ GtkWidget *search_entry;
+ GtkWidget *key_server_list;
};
G_DEFINE_TYPE (SeahorseKeyserverSearch, seahorse_keyserver_search, GTK_TYPE_DIALOG)
-/**
- * KeyserverSelection:
- * @names: A list of keyserver names
- * @uris: A list of keyserver URIs
- * @all: TRUE if all keyservers are selected
- **/
-typedef struct _KeyserverSelection {
- GPtrArray *names;
- GPtrArray *uris;
- gboolean all;
-} KeyserverSelection;
-
-
-/* Selection Retrieval ------------------------------------------------------ */
-
-/**
- * widget: CHECK_BUTTON widget to read
- * selection: will be updated depending on the state of the widget
- *
- * Adds the name/uri of the checked widget to the selection
- *
- **/
-static void
-get_checks (GtkWidget *widget, KeyserverSelection *selection)
-{
- const gchar *value;
-
- if (!GTK_IS_CHECK_BUTTON (widget))
- return;
-
- /* Pull in the selected name and uri */
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
- value = gtk_button_get_label (GTK_BUTTON (widget));
- g_ptr_array_add (selection->names, g_strdup (value));
- value = g_object_get_data (G_OBJECT (widget), "keyserver-uri");
- g_ptr_array_add (selection->uris, g_strdup (value));
-
- /* Note that not all checks are selected */
- } else {
- selection->all = FALSE;
- }
-}
-
-/**
- * extracts all keyservers in the sub-widgets "key-server-list" and
- * "shared-keys-list" and fills a KeyserverSelection structure.
- *
- * returns the selection
- **/
-static KeyserverSelection*
-get_keyserver_selection (SeahorseKeyserverSearch *self)
-{
- KeyserverSelection *selection;
-
- selection = g_new0 (KeyserverSelection, 1);
- selection->all = TRUE;
- selection->uris = g_ptr_array_new_with_free_func (g_free);
- selection->names = g_ptr_array_new_with_free_func (g_free);
-
- /* Key servers */
- gtk_container_foreach (GTK_CONTAINER (self->key_server_list), (GtkCallback)get_checks, selection);
- /* Shared Key */
- gtk_container_foreach (GTK_CONTAINER (self->shared_keys_list), (GtkCallback)get_checks, selection);
-
- g_ptr_array_add (selection->uris, NULL);
- g_ptr_array_add (selection->names, NULL);
-
- return selection;
-}
-
-/**
- * selection: The selection to free
- *
- * All data (string lists, structures) are freed
- *
- **/
-static void
-free_keyserver_selection (KeyserverSelection *selection)
-{
- if (selection) {
- g_ptr_array_free (selection->uris, TRUE);
- g_ptr_array_free (selection->names, TRUE);
- g_free (selection);
- }
-}
-
-/**
- * widget: a CHECK_BUTTON
- * checked: out- TRUE if the button is active, stays the same else.
- *
- **/
-static void
-have_checks (GtkWidget *widget, gboolean *checked)
-{
- if (GTK_IS_CHECK_BUTTON (widget)) {
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
- *checked = TRUE;
- }
-}
-
-/* returns TRUE if at least one of the key servers was selected */
-static gboolean
-have_keyserver_selection (SeahorseKeyserverSearch *self)
-{
- gboolean checked = FALSE;
-
- /* Key servers */
- gtk_container_foreach (GTK_CONTAINER (self->key_server_list), (GtkCallback)have_checks, &checked);
- /* Shared keys */
- gtk_container_foreach (GTK_CONTAINER (self->shared_keys_list), (GtkCallback)have_checks, &checked);
-
- return checked;
-}
-
/* Enables the "search" button if the edit-field contains text and at least a
* server is selected */
static void
-on_keyserver_search_control_changed (GtkWidget *widget, gpointer user_data)
+on_keyserver_search_control_changed (GtkWidget *entry, SeahorseKeyserverSearch *self)
{
- SeahorseKeyserverSearch *self = SEAHORSE_KEYSERVER_SEARCH (user_data);
gboolean enabled = TRUE;
/* Need to have at least one key server selected ... */
- if (!have_keyserver_selection (self)) {
+ if (self->selected_servers->len == 0) {
enabled = FALSE;
/* ... and some search text */
- } else {
- g_autofree gchar *text = NULL;
+ } else {
+ g_autofree char *text = NULL;
text = gtk_editable_get_chars (GTK_EDITABLE (self->search_entry), 0, -1);
if (!text || !text[0])
@@ -185,238 +67,205 @@ on_keyserver_search_control_changed (GtkWidget *widget, gpointer user_data)
gtk_dialog_set_response_sensitive (GTK_DIALOG (self), GTK_RESPONSE_ACCEPT, enabled);
}
-/* Initial Selection -------------------------------------------------------- */
-
-static void
-foreach_child_select_checks (GtkWidget *widget, gpointer user_data)
+char *
+seahorse_keyserver_search_get_search_text (SeahorseKeyserverSearch *self)
{
- gchar **names = user_data;
- guint i;
-
- if (GTK_IS_CHECK_BUTTON (widget)) {
- g_autofree gchar *name = NULL;
- gboolean checked;
-
- name = g_utf8_casefold (gtk_button_get_label (GTK_BUTTON (widget)), -1);
- checked = !(names != NULL && names[0] != NULL);
- for (i = 0; names && names[i] != NULL; i++) {
- if (g_utf8_collate (names[i], name) == 0) {
- checked = TRUE;
- break;
- }
- }
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), checked);
- }
+ g_return_val_if_fail (SEAHORSE_IS_KEYSERVER_SEARCH (self), NULL);
+
+ return g_strdup (gtk_entry_get_text (GTK_ENTRY (self->search_entry)));
}
-/* Reads key servers from settings and updates the UI content. */
+/* Extracts data, stores it in settings and starts a search using the entered
+ * search data. */
static void
-select_inital_keyservers (SeahorseKeyserverSearch *self)
+on_keyserver_search_ok_clicked (GtkButton *button, gpointer user_data)
{
+ SeahorseKeyserverSearch *self = SEAHORSE_KEYSERVER_SEARCH (user_data);
SeahorseAppSettings *app_settings;
- g_auto(GStrv) names = NULL;
-
- app_settings = seahorse_app_settings_instance ();
- names = seahorse_app_settings_get_last_search_servers (app_settings);
+ g_autoptr(GPtrArray) new_last_servers = NULL;
+ SeahorsePgpBackend *pgp_backend;
+ GListModel *remotes;
- /* We do case insensitive matches */
- for (guint i = 0; names[i] != NULL; i++) {
- char *name;
+ /* The keyservers to search, and save for next time */
+ if (!self->selected_servers_changed)
+ return;
- name = g_utf8_casefold (names[i], -1);
- g_free (names[i]);
- names[i] = name;
+ app_settings = seahorse_app_settings_instance ();
+ new_last_servers = g_ptr_array_new_full (self->selected_servers->len + 1,
+ g_free);
+
+ pgp_backend = seahorse_pgp_backend_get ();
+ remotes = seahorse_pgp_backend_get_remotes (pgp_backend);
+
+ /* Save an empty array if all are selected */
+ if (g_list_model_get_n_items (remotes) != self->selected_servers->len) {
+ for (guint i = 0; i < self->selected_servers->len; i++) {
+ SeahorseServerSource *ssrc = g_ptr_array_index (self->selected_servers, i);
+ g_ptr_array_add (new_last_servers,
+ seahorse_place_get_uri (SEAHORSE_PLACE (ssrc)));
+ }
}
+ g_ptr_array_add (new_last_servers, NULL);
- gtk_container_foreach (GTK_CONTAINER (self->key_server_list), foreach_child_select_checks, names);
- gtk_container_foreach (GTK_CONTAINER (self->shared_keys_list), foreach_child_select_checks, names);
+ seahorse_app_settings_set_last_search_servers (app_settings,
+ (char **) new_last_servers->pdata);
}
-/* Populating Lists --------------------------------------------------------- */
-
-/**
- * widget: a check button
- * unchecked: a hash table containing the state of the servers
- *
- * If the button is not checked, the hash table entry associate with it will be
- * replaced with ""
- *
- **/
static void
-remove_checks (GtkWidget *widget, GHashTable *unchecked)
+on_row_activated (GtkListBox *box,
+ GtkListBoxRow *row,
+ gpointer user_data)
{
- if (GTK_IS_CHECK_BUTTON (widget)) {
+ SeahorseKeyserverSearch *self = SEAHORSE_KEYSERVER_SEARCH (user_data);
+ SeahorseServerSource *ssrc;
+ GtkWidget *check;
+ gboolean found;
+ guint pos;
+
+ ssrc = g_object_get_data (G_OBJECT (row), "keyserver-uri");
- if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
- g_hash_table_replace (unchecked,
- g_strdup (gtk_button_get_label (GTK_BUTTON (widget))), "");
+ g_return_if_fail (SEAHORSE_IS_SERVER_SOURCE (ssrc));
- gtk_widget_destroy (widget);
+ self->selected_servers_changed = TRUE;
+ found = g_ptr_array_find (self->selected_servers, ssrc, &pos);
+ if (found) {
+ g_ptr_array_remove_index (self->selected_servers, pos);
+ } else {
+ g_ptr_array_add (self->selected_servers, ssrc);
}
-}
-/**
-* box: the GTK_CONTAINER with the checkboxes
-* uris: the uri list of the keyservers
-* names: the keyserver names
-*
-* Updates the box and adds checkboxes containing names/uris. The check-status
-* of already existing check boxes is not changed.
-**/
-static void
-populate_keyserver_list (SeahorseKeyserverSearch *self, GtkWidget *box, gchar **uris,
- gchar **names)
-{
- GtkContainer *cont = GTK_CONTAINER (box);
- GHashTable *unchecked;
- gboolean any = FALSE;
- GtkWidget *check;
- guint i;
-
- /* Remove all checks, and note which ones were unchecked */
- unchecked = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
- gtk_container_foreach (cont, (GtkCallback)remove_checks, unchecked);
-
- /* Now add the new ones back */
- for (i = 0; uris && uris[i] && names && names[i]; i++) {
- any = TRUE;
-
- /* A new checkbox with this the name as the label */
- check = gtk_check_button_new_with_label (names[i]);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check),
- g_hash_table_lookup (unchecked, names[i]) == NULL);
- g_signal_connect (check, "toggled", G_CALLBACK (on_keyserver_search_control_changed), self);
- gtk_widget_show (check);
-
- /* Save URI and set it as the tooltip */
- g_object_set_data_full (G_OBJECT (check), "keyserver-uri", g_strdup (uris[i]), g_free);
- gtk_widget_set_tooltip_text (check, uris[i]);
-
- gtk_container_add (cont, check);
- }
-
- g_hash_table_destroy (unchecked);
-
- /* Only display the container if we had some checks */
- gtk_widget_set_visible (box, any);
+ check = g_object_get_data (G_OBJECT (row), "check");
+ gtk_widget_set_visible (check, !found);
+
+ on_keyserver_search_control_changed (NULL, self);
}
-static void
-on_settings_keyservers_changed (GSettings *settings,
- const char *key,
- gpointer user_data)
+GtkWidget *
+create_row_for_server_source (gpointer item,
+ gpointer user_data)
{
SeahorseKeyserverSearch *self = SEAHORSE_KEYSERVER_SEARCH (user_data);
- SeahorsePgpSettings *pgp_settings = SEAHORSE_PGP_SETTINGS (settings);
- g_auto(GStrv) keyservers = NULL;
- g_auto(GStrv) names = NULL;
-
- keyservers = seahorse_pgp_settings_get_uris (pgp_settings);
- names = seahorse_pgp_settings_get_names (pgp_settings);
- populate_keyserver_list (self, self->key_server_list, keyservers, names);
+ SeahorseServerSource *ssrc = SEAHORSE_SERVER_SOURCE (item);
+ g_autofree char *uri = NULL;
+ GtkWidget *row;
+ GtkWidget *grid;
+ GtkWidget *label;
+ GtkWidget *check;
+ gboolean is_selected;
+
+ row = gtk_list_box_row_new ();
+ gtk_list_box_row_set_selectable (GTK_LIST_BOX_ROW (row), FALSE);
+ g_object_set_data (G_OBJECT (row), "keyserver-uri", ssrc);
+
+ grid = gtk_grid_new ();
+ g_object_set (grid, "margin", 6, NULL);
+ gtk_container_add (GTK_CONTAINER (row), grid);
+
+ uri = seahorse_place_get_uri (SEAHORSE_PLACE (ssrc));
+ label = gtk_label_new (uri);
+ gtk_widget_set_hexpand (label, TRUE);
+ gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
+
+ check = gtk_image_new_from_icon_name ("emblem-ok-symbolic",
+ GTK_ICON_SIZE_BUTTON);
+ is_selected = g_ptr_array_find (self->selected_servers, ssrc, NULL);
+ gtk_widget_set_visible (check, is_selected);
+ gtk_grid_attach (GTK_GRID (grid), check, 1, 0, 1, 1);
+ g_object_set_data (G_OBJECT (row), "check", check);
+
+ gtk_widget_show_all (row);
+
+ return row;
}
-/**
-* ssd: the SeahorseServiceDiscovery. List-data is read from there
-* name: ignored
-*
-* refreshes the "shared-keys-list"
-*
-**/
static void
-refresh_shared_keys (SeahorseDiscovery *ssd,
- const gchar *name,
- gpointer user_data)
+seahorse_keyserver_search_init (SeahorseKeyserverSearch *self)
{
- SeahorseKeyserverSearch *self = SEAHORSE_KEYSERVER_SEARCH (user_data);
- g_auto(GStrv) keyservers = NULL;
- g_auto(GStrv) names = NULL;
+ SeahorsePgpBackend *pgp_backend;
+ GListModel *remotes;
+ SeahorseAppSettings *app_settings;
+ g_auto(GStrv) last_servers = NULL;
+ g_autofree char *search_text = NULL;
- names = seahorse_discovery_list (ssd);
- keyservers = seahorse_discovery_get_uris (ssd, (const gchar **)names);
- populate_keyserver_list (self, self->shared_keys_list, keyservers, names);
-}
+ gtk_widget_init_template (GTK_WIDGET (self));
-/* -------------------------------------------------------------------------- */
+ /* Get the remotes */
+ pgp_backend = seahorse_pgp_backend_get ();
+ remotes = seahorse_pgp_backend_get_remotes (pgp_backend);
-gchar *
-seahorse_keyserver_search_get_search_text (SeahorseKeyserverSearch *self)
-{
- g_return_val_if_fail (SEAHORSE_IS_KEYSERVER_SEARCH (self), NULL);
+ /* Find what the user last searched for and use it to fill in which
+ * servers are selected initially */
+ app_settings = seahorse_app_settings_instance ();
+ self->selected_servers = g_ptr_array_new ();
- return g_strdup (gtk_entry_get_text (GTK_ENTRY (self->search_entry)));
-}
+ last_servers = seahorse_app_settings_get_last_search_servers (app_settings);
+ for (guint i = 0; i < g_list_model_get_n_items (remotes); i++) {
+ g_autoptr(SeahorseServerSource) ssrc = g_list_model_get_item (remotes, i);
+ g_autofree char *ssrc_name = NULL;
+ g_autofree char *ssrc_name_fold = NULL;
-/* Extracts data, stores it in settings and starts a search using the entered
- * search data. */
-static void
-on_keyserver_search_ok_clicked (GtkButton *button, gpointer user_data)
-{
- SeahorseKeyserverSearch *self = SEAHORSE_KEYSERVER_SEARCH (user_data);
- KeyserverSelection *selection;
+ /* If no search saved: select all */
+ if (!last_servers || !last_servers[0]) {
+ g_ptr_array_add (self->selected_servers, ssrc);
+ continue;
+ }
- /* The keyservers to search, and save for next time */
- selection = get_keyserver_selection (self);
- g_return_if_fail (selection->uris != NULL);
- g_settings_set_strv (G_SETTINGS (seahorse_app_settings_instance ()), "last-search-servers",
- selection->all ? NULL : (const gchar * const*)selection->uris->pdata);
+ ssrc_name = seahorse_place_get_uri (SEAHORSE_PLACE (ssrc));
+ ssrc_name_fold = g_utf8_casefold (ssrc_name, -1);
- free_keyserver_selection (selection);
-}
+ for (guint j = 0; last_servers[j]; j++) {
+ const char *name = last_servers[j];
-static void
-cleanup_signals (GtkWidget *widget, gpointer user_data)
-{
- SeahorseKeyserverSearch *self = SEAHORSE_KEYSERVER_SEARCH (user_data);
- SeahorseDiscovery *ssd = seahorse_pgp_backend_get_discovery (NULL);
- g_signal_handlers_disconnect_by_func (ssd, refresh_shared_keys, self);
+ if (g_utf8_collate (name, ssrc_name_fold) == 0)
+ g_ptr_array_add (self->selected_servers, ssrc);
+ }
+ }
+
+ search_text = seahorse_app_settings_get_last_search_text (app_settings);
+ if (search_text != NULL) {
+ gtk_entry_set_text (GTK_ENTRY (self->search_entry), search_text);
+ gtk_editable_select_region (GTK_EDITABLE (self->search_entry), 0, -1);
+ }
+
+ /* The key servers to list */
+ g_signal_connect (self->key_server_list,
+ "row-activated",
+ G_CALLBACK (on_row_activated),
+ self);
+ gtk_list_box_bind_model (GTK_LIST_BOX (self->key_server_list),
+ remotes,
+ create_row_for_server_source,
+ self,
+ NULL);
+
+ on_keyserver_search_control_changed (NULL, self);
}
static void
-seahorse_keyserver_search_init (SeahorseKeyserverSearch *self)
+seahorse_keyserver_search_finalize (GObject *object)
{
- g_autofree gchar *search_text = NULL;
- SeahorsePgpSettings *settings;
- SeahorseDiscovery *ssd;
-
- gtk_widget_init_template (GTK_WIDGET (self));
+ SeahorseKeyserverSearch *self = SEAHORSE_KEYSERVER_SEARCH (object);
- search_text = seahorse_app_settings_get_last_search_text (seahorse_app_settings_instance ());
- if (search_text != NULL) {
- gtk_entry_set_text (GTK_ENTRY (self->search_entry), search_text);
- gtk_editable_select_region (GTK_EDITABLE (self->search_entry), 0, -1);
- }
+ g_ptr_array_unref (self->selected_servers);
- /* The key servers to list */
- settings = seahorse_pgp_settings_instance ();
- on_settings_keyservers_changed (G_SETTINGS (settings), "keyservers", self);
- g_signal_connect_object (settings, "changed::keyservers",
- G_CALLBACK (on_settings_keyservers_changed), self, 0);
-
- /* Any shared keys to list */
- ssd = seahorse_pgp_backend_get_discovery (NULL);
- refresh_shared_keys (ssd, NULL, self);
- g_signal_connect (ssd, "added", G_CALLBACK (refresh_shared_keys), self);
- g_signal_connect (ssd, "removed", G_CALLBACK (refresh_shared_keys), self);
- g_signal_connect (GTK_WINDOW (self), "destroy", G_CALLBACK (cleanup_signals), self);
-
- select_inital_keyservers (self);
- on_keyserver_search_control_changed (NULL, self);
+ G_OBJECT_CLASS (seahorse_keyserver_search_parent_class)->finalize (object);
}
static void
seahorse_keyserver_search_class_init (SeahorseKeyserverSearchClass *klass)
{
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+ gobject_class->finalize = seahorse_keyserver_search_finalize;
- gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/Seahorse/seahorse-keyserver-search.ui");
+ gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/Seahorse/seahorse-keyserver-search.ui");
- gtk_widget_class_bind_template_child (widget_class, SeahorseKeyserverSearch, search_entry);
- gtk_widget_class_bind_template_child (widget_class, SeahorseKeyserverSearch, key_server_list);
- gtk_widget_class_bind_template_child (widget_class, SeahorseKeyserverSearch, shared_keys_list);
+ gtk_widget_class_bind_template_child (widget_class, SeahorseKeyserverSearch, search_entry);
+ gtk_widget_class_bind_template_child (widget_class, SeahorseKeyserverSearch, key_server_list);
- gtk_widget_class_bind_template_callback (widget_class, on_keyserver_search_control_changed);
- gtk_widget_class_bind_template_callback (widget_class, on_keyserver_search_ok_clicked);
+ gtk_widget_class_bind_template_callback (widget_class, on_keyserver_search_control_changed);
+ gtk_widget_class_bind_template_callback (widget_class, on_keyserver_search_ok_clicked);
}
/**
@@ -430,11 +279,11 @@ seahorse_keyserver_search_class_init (SeahorseKeyserverSearchClass *klass)
SeahorseKeyserverSearch *
seahorse_keyserver_search_new (GtkWindow *parent)
{
- g_autoptr(SeahorseKeyserverSearch) self = NULL;
+ g_autoptr(SeahorseKeyserverSearch) self = NULL;
- self = g_object_new (SEAHORSE_TYPE_KEYSERVER_SEARCH,
- "use-header-bar", 1,
- NULL);
+ self = g_object_new (SEAHORSE_TYPE_KEYSERVER_SEARCH,
+ "use-header-bar", 1,
+ NULL);
- return g_steal_pointer (&self);
+ return g_steal_pointer (&self);
}
diff --git a/pgp/seahorse-keyserver-search.ui b/pgp/seahorse-keyserver-search.ui
index f12d5d28..41dfa24a 100644
--- a/pgp/seahorse-keyserver-search.ui
+++ b/pgp/seahorse-keyserver-search.ui
@@ -3,14 +3,9 @@
<requires lib="gtk+" version="3.22"/>
<template class="SeahorseKeyserverSearch" parent="GtkDialog">
<property name="visible">True</property>
- <property name="border_width">6</property>
+ <property name="border_width">18</property>
<property name="use_header_bar">1</property>
<property name="title" translatable="yes">Find Remote Keys</property>
- <property name="resizable">False</property>
- <property name="window_position">center-on-parent</property>
- <property name="type_hint">dialog</property>
- <property name="skip_taskbar_hint">True</property>
- <property name="gravity">center</property>
<signal name="delete_event" handler="on_widget_delete_event"/>
<child internal-child="vbox">
<object class="GtkBox">
@@ -35,7 +30,7 @@
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">This will find keys for others on the Internet.
These keys can then be imported into your local key ring.</property>
- <property name="max_width_chars">70</property>
+ <property name="max_width_chars">60</property>
<property name="wrap">True</property>
</object>
</child>
@@ -80,45 +75,21 @@
</object>
</child>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="height_request">135</property>
+ <object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">etched-out</property>
+ <property name="propagate-natural-height">True</property>
+ <property name="max-content-height">250</property>
<child>
- <object class="GtkBox">
+ <object class="GtkListBox" id="key_server_list">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkBox" id="key_server_list">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="border_width">6</property>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Key Servers:</property>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkBox" id="shared_keys_list">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="border_width">6</property>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Shared Keys Near Me:</property>
- </object>
- </child>
- </object>
- </child>
+ <property name="margin-start">18</property>
+ <property name="margin-end">18</property>
+ <style>
+ <class name="content"/>
+ </style>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]